diff --git a/HBC/META.XML b/HBC/META.XML deleted file mode 100644 index 8bb0cfbb..00000000 --- a/HBC/META.XML +++ /dev/null @@ -1,45 +0,0 @@ - - - USB Loader GX - USB Loader GX Team - 2.0 r1069 - 201102061836 - - Loads games from USB-devices - 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. -Features are automatic widescreen detection, coverdownload, parental control, theme support and many more. - -Credits: -Coding: Dimok, nIxx, giantpune, ardi, Hungyip84, DrayX7, Lustar, r-win, WiiShizzza -Artworks: cyrex, NeoRame -WiiTDB / Hosting covers: Lustar -Hosting updates files: CorneliousJD -USBLoader sources: Waninkoko, Kwiirk, Hermes -Languages files updates: Kinyo and translaters -Hosting themes: Deak Phreak - -Libwiigui: Tantric -Libogc/Devkit: Shagkur and Wintermute -FreeTypeGX: Armin Tamzarian. - -Links: -USB Loader GX Project Page and Support Site: -http://code.google.com/p/usbloader-gui/ -Help Website: -http://usbloadergx.koureio.net/ -WiiTDB Site: -http://wiitdb.com -Themes Site: -http://wii.spiffy360.com -Languages Translaters Page: -http://gbatemp.net/index.php?showtopic=155252 - -Libwiigui Website: -http://wiibrew.org/wiki/Libwiigui/ -FreeTypeGX Project Page: -http://code.google.com/p/freetypegx/ -Gettext Official Page: -http://www.gnu.org/software/gettext/gettext.html - - diff --git a/HBC/icon.png b/HBC/icon.png deleted file mode 100644 index 951057cb..00000000 Binary files a/HBC/icon.png and /dev/null differ diff --git a/HBC/icon2.png b/HBC/icon2.png deleted file mode 100644 index 81499ae8..00000000 Binary files a/HBC/icon2.png and /dev/null differ diff --git a/HBC/readMii.txt b/HBC/readMii.txt deleted file mode 100644 index c979922d..00000000 --- a/HBC/readMii.txt +++ /dev/null @@ -1,1078 +0,0 @@ - - __,,__, ,__wywyywvyyyyywvywvyam,,_, _,,_ - _uWB&#MBM$Wg&MQ$#$K&RMKMA0$&xNH&&MN@2W&#MM&#$KQg - JN&B&MM#MQ$gM#Q$N#R&&#N$M$#�E$##V$WKG###B&$&NW#b - j8W0##&M$W&$###�##&$0MN#BX&5&#$xA$A$#$#&#z$MNQWK#L - 3#$$& N$&WK& XN#$&~~ ^VM#&#A~`^`"~^~"'K###2$M - SQN$# 9MB#@) $$$# ***, $&mR _,_ NU#$M - &0N## #M$$M# NA4 ****** *$g# *0$Q&H! ]$N$# - M\w&F ##&#@$ #W8- ~v"&N8&*#$# 0QB#&$& !#&$K - $QNNC E&M$0# g&&&_ "*$&QM #$MN$# - j$$0L $M@WWK #W&#M&k,,_ ~&$$ _,_ $NQN( - i&M4( N$K2## M#NNF$&####& 0#$ *0$Q&H! W#$( - j$B#N V&#AMS SRW $8$0M& 3M$ 0QB#&$& #N$I - jQ0&NL ""^ JB&ML '~^ jQ*A ` j##KF - K#$##& _#B#WNKM_ ,vB&#M _ _wp#&QAF - "&NAQAN&#$&MW#&###B#x$3@&$BA#WWWH$#KMM&K&NK###g&$# - *WN$&$$8QWNMMM#MM&«&A#&M$K&#WK@QM5#&*A$N&$&WM#@2 - "M*^&N##&$W8$2B#&MB&DWR0#$$0#W»&&M$#QQMN#&"" - \eeee6 F**A1 - jM0$e4 ?**G\! - imw{Q- x%%%m \%z%%e mxx _%*%@& -ve/v mmm\ wvm - V3Q%m& /#0^0E&~/&\ $&E/&%1e^"E 55t7JcVsm0-\ &^#l@&}&-" $7MAE&&%/ - $%x/z Wc&&t7-w&E4^ %VVM~1^\&$&&} e$&$$%$zQMxw w-v-#^ Q\W44 %-/%/\QS - et-SC e^00^ iF&E$- !%%$$%A*v 5^^4 EEZ/0 )%%0%4fimmEt" "$S8V -(WJ^%i m&MM#} /%\%%L 4Q\w WQ/Q\ &m«wS \v"v1 \74~1zM%&%/6s wEw// -&ssSs?s%wt&&-~~MM#& e1/'m% &5^jW &mw&\ SmVw^ S1&mw \^A5FE j7F*5, ~S3m% -j3Q"/&-&w&M%& ^^4$w^7QSQ@ t&&&%-"5w&E} e8"&&&&/%\W &5%1\%V*\0M &&7M -~?VW^$ ?&\81? ?mQ&&&- 00%%^~EE4E \&00 ^M43^ ^'"#5&$-^ ~wEE} - __ ,_ - __ggggggggggggggg& jggggg#p gMMMMMMM - &MMMMMMMMMMMMMMMMMMF "MMMMMMM& j#MMMMMMP - #MMMMMMMMMMMMMMMMMMMF #MMMMM&g#MMMMMMP - #MMMMMF "MMMMMMMMMMM#^ - #MMMMML pgppggggggp $MMMMMMMMF - $MMMMML 4#M#NRMMMMMF jMMMMMMMMMQ - $MMMMMF #MMMMF pMMMMMMMMMMMMp - 4MMMMMMNNN#MMMMMMMMMF jMMMMMMF MMMMMM&_ - MMMMMMMMMMMMMMMMMM& #MMMMM@~ ~MMMMMM& - """""""""""""""" """""" """"""^ - - -Congratulations! You are one of the proud Beta Testers for USB Loader GX. That's right. Beta tester. This means that you are using Beta software. This program is still under heavy development. Not everything works perfectly. If you are expecting it to, stop and look elsewhere. Some of the features covered here may be removed in your version of the application. And likewise, there may be features in your revision that are not covered here. - -By using a Beta revision, you are agreeing to not be an idiot. Most of the features should be self explanatory. The rest of them can be figured out by clicking around a trying stuff out. There is no button or combination of buttons that you can click that will brick your wii or make irreparable changes to your wii. So please try out all the features to see which options need to be enabled for your WII + TV + game combination. - -This was written 6/15/2009 regarding revision 529 -Last update on 10/1/09 regarding rev 772, updated/added a few images, updated cover path info, and added MIOS Patcher to download links. - - -Features - -* The GUI is completely based on the awesome libwiigui by Tantric -* Game information: reads game info from wiitdb.zip in your config folder like publisher, developer, year, rating, genre etc. -* Widescreen support: Without any special themes for widescreen -* Alternative dol loading: Supports special dol files needed to launch some games (e.g. Mortal Kombat) -* Loading from USB: Loads files (images, configs etc.) from SD or USB (needs a FAT32 partition on the drive to be primary and active). -* Global Settings and "per game" settings -* Parental control: Set levels for each game, set a password for install/remove/etc. -* View modes: simple List Mode, Game Grid and Game Carousel. -* Supports Themes: Create your own theme and use it with the loader -* Cover download: Download "normal" covers, 3D covers and disc images for all the games on your HDD (International Covers are downloaded based on your global language setting) -* Look and feel like the original Wii Menu: Use rumble feature, button sounds, background music, disc slot lights up etc. (you can also turn it off in the settings) -* Loads all the needed files from your SD/USB -* Language file support: use your native language for the loader. -* Custom sounds: for now only ogg custom sounds possible. -* Playstats: shows you how many times you played the game -* List sorting, Game Search, & Favorites: you can sort the list by playstats or names, search by name, or display only your favorites! -* Update function: update to the latest revision from inside the gui (requires internet connection). -* Homebrew & Title Launcher: Launch you favorite homebrew apps and channels from within the loader. -* Full Alternate Dol Support: Alternate dols can be loaded from SD/USB or from the game itself. Most altdols can be automatically chosen by the loader. - - -Useful links & Downloads - -Official site & help site -http://code.google.com/p/usbloader-gui/ -http://usbloadergx.koureio.net/help - -Changelog -http://code.google.com/p/usbloader-gui/source/list - -Sourcecode checkout -http://usbloader-gui.googlecode.com/svn/trunk/ - -Game compatibility list -http://wiki.gbatemp.net/wiki/index.php?title=USB_Loader_v1.x_Game_Compatibility - -Devices compatibility list -http://wiki.gbatemp.net/wiki/index.php?title=USB_Devices_Compatibility_List - -List of WBFS managers -http://wiki.gbatemp.net/wiki/index.php?title=WBFS_Managers - -More questions? -http://forum.koureio.net/ - -cIOS installers -cIOS38r12: http://gbatemp.net/index.php?download=6093 -cIOS38r13: http://gbatemp.net/index.php?download=6133 -cIOS38r13b: http://gbatemp.net/index.php?download=6127 -cIOS38r14: http://gbatemp.net/index.php?download=6531 -Hermes cIOS222/223 rev3: http://www.4shared.com/file/125087683/2b7948f1/Hermes_cIOS_222_rev3_installer.html -Hermes cIOS222/223 rev4: http://www.4shared.com/file/129761844/53c80425/Hermes_cIOS_222_rev4_installer.html - -MIOS Patcher -WiiGator's cMIOS http://www.4shared.com/file/136843685/99990ffc/miospatcher.html - -Other -Wad manager 1.5: http://teknoconsolas.tv/wanin/WAD-Manager_v1.5.zip (mirror) -Forwarder dol for preloader: http://www.mediafire.com/download.php?nykt4zyndzq -Fat32Format: http://www.ridgecrop.demon.co.uk/download/fat32format.zip -HJSplit http://www.freebyte.net/download/hjsplit.zip (this joins 001, 002, ... files) - - - -Contents - - 1. [1] Prerequisites & setup - 1. [1a] Installation - 2. [1b] Channel & Forwarder - 3. [1c] [OPTIONAL]Autobooting and returning to USB loader GX - 4. [1d] Files & paths - 2. [2] Usage - 1. [2a] [OPTIONAL] Compiling the loader - 2. [2b] Adding games & changing GameID ***** - 3. [2c] Getting Covers & Wiitdb.zip ***** - 3. [3] Main menu - 1. [3a] Controls - 2. [3b] On the screen - 3. [3c] View - 4. [3d] Game Info - 5. [3e] Game Prompt - 4. [4] Exit Menu - 5. [5] Homebrew&Title Launcher ***** - 1. [5a] Homebrew Launcher - 2. [5b] Title Launcher - 3. [5c] (Un)Installing WADs over wifi - 6. [6] Settings - 1. [6a] Gui settings - 2. [6b] Game load - 3. [6c] Parental control - 4. [6d] Sound - 5. [6e] Custom paths ***** - 6. [6f] Update ***** - 7. [6g] Default settings ***** - 8. [6h] Credits - 7. [7] Game settings ***** - 1. [7a]Game load - 2. [7b]Ocarina - 3. [7c] Uninstall Menu - 4. [7d]Default settings - 8. [8]Cheating - 1. [8a] Using a Computer - 2. [8b] Using the USB loader - 9. [9]Themes - 10. [10]Special Games - 1. [10a]Wii Sports Resort - 2. [10b]Metroid Prime Trilogy - 11. [11]FAQ - -Everything in this Guide that is marked with ***** can not be used if the loader is locked! -Text in red is a little harder and for advanced users only! -Blue text is Important Info! - - -________________ -[1] Prerequisites & setup -[1a] Installation - -STEP 1 – Installing the HBC (Homebrew Channel) and a cIOS (custom Input/Output System «- ignore that). - -If you are COMPLETELY new to homebrew, this little guide will tell you how to install the homebrew channel on your wii. The guide can be used for every system menu (up to 4.1, so updating is recommended) and any serial (LU64+). Do not use it on a Korean wii! - -First, follow steps 1 and 2 of this guide: http://gbatemp.net/index.php?showtopic=155844 to get the HBC on your wii. The hackmii installer can also install bootmii for you if you need brick protection. Our next step is to get a cIOS installed that is needed for the loader. Try installing a cIOS with a cIOS installer (using IOS36). If this doesn't work (if you get an error while installing), you don't have a patched IOS (needed by the cIOS installer) and you have to use one of the two methods below. - - -Online method (Using wifi on the wii) -Get the Trucha bug restorer by wiipower and run it with the HBC. You will see a lot of white text on a black screen. This is how many installers/patchers look like. It has no nice banner and stuff to keep the filesize low. - - -1) Select IOS36 and press A. Even more text appears, read it if you want. Wait for the text at the bottom to appear and press 1. -2) Choose Downgrade IOS15. Then download from NUS (2 times). Follow instructions on the screen. -3) Now we can use the downgraded IOS15 to restore the Trucha in IOS36. Run TBR again. This time choose IOS15 and again press A then 1 when the text appears. -4) Go into the IOS36 menu. Use these configurations: 36 (this is in what IOS-slot the patched IOS36 will be placed.) YES YES NO (actually you can choose what you want for the last 2 options), then select Install patched IOS36 and press A. Choose Download from NUS once again and follow on screen instructions. -5) Now we have the patched IOS36, we can restore our IOS15 again. Load the TBR one last time. Choose IOS36,... .This time choose restore IOS15. Get the IOS from NUS and let the app finish everything. - -We are ready to install our cIOS. I will explain here how to get cIOS38r14 by waninkoko. You can also install another rev of this cIOS (don't go lower than r9) or a rev of IOS222/223 by hermes. All IOS have different uses and bugs. Its up to you to find out what these are. - -Get the installer here: http://gbatemp.net/index.php?download=6531 . Follow all the instructions at the link, but choose IOS36 instead of IOS249 (this is why we have patched IOS36). When you are asked to use wad install or online install, choose online install. You will then have the cIOS needed by the USB loader. - -Offline method (no wifi on the wii) -Wad files of IOS are not legal, so we can not give them to you. Here is how to get them anyway: - -Get the NUS downloader and Trucha bug restorer. - -First open NUS downloader and Click 'Generate certs' if it asks to. First check Pack-»Wad. Click Database and Go to IOS, IOS15, v257. Then click Nus Download. Repeat this proces for IOS15 v266 and IOS36 v3094. -Now go to the place where NUS downloader is and there will be 3 new folders. Copy the WAD of each folder to the SD card. - - -Now follow steps 1 – 5 from the Online guide, but instead of choosing “Download IOS from NUS”, choose “Load IOS from SD card”. - -We are ready to install our cIOS. I will explain here how to get cIOS38r14 by waninkoko. You can also install another rev of this cIOS (don't go lower than r9) or a rev of IOS222/223 by hermes. All IOS have different uses and bugs. Its up to you to find out what these are. - - -First we need one more file from the NUS: check Pack-»Wad. Get IOS38 v3610. Place the wad of the new folder at the root of the SD card. Download the cIOS installer: http://gbatemp.net/index.php?download=6531 . Follow the instructions at the link, but choose IOS36 instead of IOS249 (this is why we needed to patch IOS36). You have to choose wad installation. You will then have the cIOS needed by the USB loader. - -NOTES: --You can have cIOS36/38 and cIOS222/223 installed at the same time. Every version has its own (dis)advantages. - - --If your global cIOS is 249 and you set an individual game's cIOS to 222/223, it will not always work. On the other hand, if you set your global boot to 222 and set an individual boot to 249, it should work fine. - --If you change your global boot cIOS you need to completely exit out of the loader and restart it in order for the change to take effect. If you do not do this you will get a black screen. It is also necessary to delete your GXgamesettings.cfg file from your config folder on your SD/USB to prevent any setting conflicts since anything in GXgamesettings.cfg overrides the GXglobal.cfg file. - --Setting your global boot to 222 rev 3(installed as 37 merge 36) or 222 rev 4(installed as 38 merge 37) and setting your global 002fix to ANTI will result in 99% compatibility with no glitching/stuttering on IN REGION games. For OUT OF REGION games you need to also set the Video Mode to AUTOPATCH. The 1% non-compatibility is from the "please insert disc" games. However, those games are fully playable by simply inserting any dvd into your drive (I just stick a blank one in) OR by loading those specific games with cIOS 249 rev 12 or higher. - --Make sure you always delete the 00000001 folder from the root of your SD/USB before doing any network installation of cIOS 222/223. - -STEP 2 – Preparing your USB device - -Optional -The USB loader can load images and other info of the same usb device as where the games are stored on. To be able to use this function, you will need to make two partitions on the USB device. The partition for the images should have enough with 2GB. You can also make more partitions for other purposes. Use GOOGLE to find out how to make partitions. (Or go here: http://gbatemp.net/index.php?showtopic=179085). -For linux: http://gwht.wikidot.com/gparted - -Required -The partitions have to be formatted to FAT. Mark the partition you want to use for WBFS as Active. - -If you make multiple partitions, the First partition must be the one for image,... and the second one for WBFS (for Wii games) - - -STEP 3 – Preparing the SD card - -You can also use the USB device for this if you made a second partition in Step 2. - -Using the easy installer - -The fastest way of installing the USB loader GX is to download the Easy installer. Run this tool and click next (be sure to have an internet connection).You will be asked what files to put on the SD card/ USB device (dependant on where you run homebrew from). Recommended is to download everything except following things: --The languages that you won’t use (only one language can be checked), --If you already have images for the loader, don’t check cleanup, as it will remove the images. - -Next, you will be asked where to install the loader to. Advised is to install it to SD:\apps\usbloader_gx or USB:\apps\usbloader_gx (replace SD/USB by the drive letter of the card/device). If you’re done, click install. - -Without the easy installer - -Sometimes its not possible to use the easy installer. You will have to put on the files manually. -1) Download the newest dol from http://usbloadergx.koureio.net/downloads/revisions. -2) Create a new folder on your SD card (or USB) in the apps folder, called usbloader_gx. Place the dol in this folder and rename it to boot.dol . - -STEP 4 – Running the loader - -When you first boot up the Loader (using the HBC or another method of booting homebrew), you will be asked to format a partition to WBFS. Choose your partition and press A. If your partition is formatted, you are ready to use all functions of this app! - -NOTE: You can also format a partition to WBFS by using a WBFS manager. - - -################################### - -[1b] Channel & Forwarder -If you don't like going to the HBC to load the loader every time, you have to install the channel or forwarder of this loader. -Both Channel and forwarder appear in the wii menu as a new channel. But there is a very important difference between them! The channel contains the app and can boot it without the SD card. The forwarder however simply loads the loader from SD:/apps/usbloader_gx/. There are (dis)advantages to both. Go here for more info: http://usbloadergx.koureio.net/downloads/forwarders - -To install the forwarder or channel, you need an application called Wad manager. Get it here: http://teknoconsolas.tv/wanin/WAD-Manager_v1.5.zip -Place it in its own folder in the apps folder of the SD card (or USB). - -Download forwarder: http://www.mediafire.com/?jdmiykainlm -Download channel (R649c): http://www.mediafire.com/download.php?ntuexwmycby -Create a new folder on the SD card (or USB) called wad. It has to be in the root of the SD card (so not in the apps folder). Place your wad here. - -Run the wad manager. Choose IOS249. Then choose SD or USB (depending on where you placed the wads). Select the wad to install and press A to install it. When its done, keep pressing B to go back to the HBC. Then go to the wii menu. You will see your new channel/forwarder on one of the pages. You can move it by holding A and B. - -Changing the location the forwarder loads the dol from: To do this, simply change the update path (see [6e]) - - -[1c] [Optional]Autobooting and returning to USB Loader GX - -It is possible to boot your wii directly into the USB loader GX. The only thing you need for this is a wii app called preloader. First download the newest rev of the loader or even better, the forwarder (dol format, see downloads at the top of the readmii). Place the dol you get in the root of your SD card (no need to rename it to boot.dol). In the preloader menu, choose install file and choose the dol to install. When its done, go to the main menu of preloader (B) and then choose 'settings'. You have to change 2 options here: Autoboot=file and Return to=preloader. Save the settings, then launch the Wii menu in the main menu. It will boot into the USB loader GX! - -################################### - -[1d] Files & paths - -There are other files that are not necessary to the core functionality of this loader, but are used for extra features. The dev. team has defined the following paths, most of which are configurable in the settings. - -Update Path - SD:/config/ -This is where the application will create files to save settings and statistics. All the files it makes start with GX to make them easy to find. -GxGlobal.cfg is the main settings and configuration for the loader. -GXGameSettings.cfg contains individual settings for games. -GXGameCount.cfg stores the game play count and favorites choices. A database of information about each game can be stored in this folder as well. Get you hands on wiitdb.zip and put it here. - -Covers Path - SD:/images/ -This is where box art is downloaded to and displayed from. All images must be sized in multiples of 4 or they won't show up. Create separate folders for 2D and 3D covers. When you direct each path to the proper folder the default displays are 3D for the List and Carousel views and 2D for the Grid view. -Official sizes: -2D covers = 160x224 -3D covers = 176x248 - -Disc Image Path - SD:/images/disc/ -This is where pictures of the actual game discs are downloaded to and displayed from. All images must be sized in multiples of 4 or they won't show up. -Official size: -Discart = 160x160 - -Background Music Path - SD:/config/backgroundmusic/ -This is the default folder for custom background music. - -Theme Path - SD:/theme/(SD:/wtheme for widescreen wii) -This is the default theme location. - -Cheatcodes Path - SD:/codes/ -This is the folder to put your gct cheat files. - -TXT Cheatcodes Path - SD:/txtcodes/ -Here is where you can place the txt files needed by the code manager. Files must have the full game ID (6 chars.) as name. The downloaded txt files (with the code manager) will be placed here. - -DOL Path - SD:/ -This is where replacement dols (used to fix certain broken games) go. - -Homebrew Apps Path - SD:/apps/ -This is where you can place the Homebrew apps for the Homebrew Loader. - - -________________ -[2] Usage - -Using this application is simple. Launch it in the same way that you did in the initial setup, pick a game (if you have any installed), and play the game. This is open source software. You are free to modify it, distribute it, and do anything you want with it. All we demand is that you do not claim our work as yours. We worked long and hard on this and let you use it for free. It would be a real bitch move if you put your name on it and said it was your own. -You are also free to distribute the software/source code as you like as long as this file (or a similar one approved by the dev team) companies it. If you don't follow these guidelines, you are a douche-bag. - -################################### - -[2a] [Optional] Compiling the loader - -THIS IS COMPLETELY OPTIONAL. IF YOU ARE NOT INTERESTED IN PROGRAMMING OR COMPILING, OR IF YOU DON'T MIND WAITING FOR SOMEONE ELSE TO COMPILE THE NEWEST REV, YOU CAN SKIP TO [2b]. - -This loader gets updated very frequently. The newest revision will not be available all the time to download. When that happens, you will have to compile the loader yourself. GBAtemp members emupaul and giantpune have made a guide that shows you how to compile the loader.The full guide can be found at http://gbatemp.net/index.php?showtopic=169078 - -1)Download a svn client. Reccomended is Tortoisesvn. If you want the loader to show the rev# in the settings, you also need sliksvn. -2)Download and install Devkitpro -3)Reboot your system -4)Create a new folder (can be anywhere) and name it USBGX (or any other name, as long as you know what it contains) -5)Right click your folder and select SVN Checkout (this option is added by Tortoisesvn) -6)Enter the url http://usbloader-gui.googlecode.com/svn/trunk/. Leave all other options as they are and click OK -7)Download http://usbloader-gui.googlecode.com/files/...-08-07-2009.zip and extract to the libogc folder -8)After it has downloaded the source, all folders will show a green OK mark. Open the file gui.pnproj -9)You are now in the programmers notepad. This utility is used to program wii apps. Press ALT + 1 (the 1 thats not on the Numpad) to compile the source. -10)Copy the boot.dol (or elf) to the SD card and run it. - -[OPTIONAL] Changing the source for the channel: You have to make a small change in the code to let the USB loader know its a channel. -1)Open Gui.pnproj, it wil open with the Programmers notepad. -2)Time to make a little change in the code (maybe your first time doing this :) ). You should see the file structure (If not, go to view»windows»projects and enable it, then place it somewhere). Open the prompts folder (if it isn't open already) by clicking the white arrow in front of it. Then open PromptWindows.h (double click) -3)It will appear in a new window. At the top of the file you should see #define NOTFULLCHANNEL -4)Put your cursor before the # at this line and type //. The line will become green and will look like: //#define NOTFULLCHANNEL. This line is now a comment. Comments are just extra information and are not compiled. -5)Compile the source by pressing ALT+1. Now you have the correct boot.dol, which you can inject in the channel. - -################################### - -[2b] Adding games & changing GameID ***** - -To add a game to your drive using this program, click the install button on the main screen and follow the on screen prompts. Games are automatically scrubbed (shrunk) and brickblocked (update partition removed) when adding them to the drive. - -Because of the way WBFS and the application work, you are only allowed to install 1 game for each game ID. If you do use another application to install 2 games with the same 6 character ID, only the first one on the drive will be loaded by our program. If the installation freezes (doesn't move for over 2 minutes) you can simply hold the power button on the Wii to turn it off. There is no danger of bricking your wii. The data that was written during the failed install is still present on the drive, but not marked as active so it will be treated as free space. It does not get added into the used space displayed on the screen and it will be overwritten next time you install a game. - -To install games (ISO or cISO) with your computer, you need a WBFS manager. Most popular are WBFS manager 3.0 and WBFS intelligent GUI v6. Using these programs should be self-explanatory. - - -***The following feature is for advanced users only! Do not use this feature unless you know exactly what you are doing!*** -As of revision 719, it is now possible to edit GameIDs via the loader which is useful with different games using the same GameID (ie; Guitar Hero mods). When viewing the GUI in list mode, simply click on the GameID displayed underneath the targeted game's cover (if GameID isn't displayed, see section [6a]) to bring up the ID change prompt. Keep in mind that this will create a new save file for the targeted game and will no longer load a previous save file unless the GameID is restored to it's original ID. - -################################### - -[2c] Getting Covers & Wiitdb.zip ***** - -This loader can show the boxart and discart for every game. The images have to be placed in the correct folder and must have the correct name and size (more info at [1a]). To download covers with this loader, you need to press 1 at the main menu. You can choose what covers you want to download (2D or 3D). Discart can also be downloaded. - -It is also possible to show the info for each game. You can show the game info by highlighting a game (don't press A, just point) and pressing 2. The data for the game info is stored in wiitdb.zip. There are two ways to get this file: - --Update with the loader and select update all or update wiitdb, it will also be updated if you update the full channel. --If you have no wifi, go to the game info screen of any game. Press 1 and you will see the text at the bottom change. Go to the file it shows and copy the URL. Then open the url with a web browser to download the wiitdb.zip. Once you got wiitdb.zip , place it in the titles.txt path (see Custom paths) - -NOTE: All images and wiitdb.zip are downloaded from the site www.wiitdb.com . - -________________ -[3] Main menu - -This is the main screen, the first one you see when you start the program. It looks a lot like the Wii system menu. (Default theme) - -################################### - -[3a] Controls - -User input for the main menu is accepted through WiiMote, Nunchuk, Gamecube controller, and Classic controller. While input is accepted from all these methods, the fastest and easiest method is with a WiiMote. - -Wiimote -A --- Main action Button -B --- Back/Cancel/Scroll (list view) -- Button --- Left (Grid/Carousel/game prompt/settings) -Home --- Open Exit menu -+ Button --- Right (Grid/Carousel/game prompt/settings) -1 --- Download covers -2 --- Show game info (select a game first) -D-Pad --- Choose -Pointer --- Choose - -Nunchuck -Control stick --- Choose - -GC Controller -Control stick --- Choose -D-Pad --- Choose -A --- Main Action button -B --- Back/Cancel/Scroll (list view) - -Classic controller -Left control stick --- Choose -D-Pad --- Choose -A --- Main action button -B --- Back/Cancel/Scroll (list view) -X --- Game info -Y --- Download covers -- Button --- Left (Grid/Carousel/game prompt/settings) -Home --- Open Exit menu -+ Button --- Right (Grid/Carousel/game prompt/settings) - -################################### - - -[3b] On the screen - -1.Install ***** -- (+) button at the left -- Press to add games to your HDD from the Wii's DVD drive. - - -2.Settings -- Button with gear on the left -- Use it to access all the settings and options. - - -3.Exit -- Button with 'wii' on the right -- Press this to view the exit menu. - - -4.Power -- Button with power logo at the right -- I bet you can figure out what it does. - - -5.Download ***** -- Listview: cover -- When you are in the list view, click a game box to download stuff. You can also use the 1 button in any display mode. - - -6.Reload -- SD card button -- Press it to reload your SD contents (images, themes,…). - - -7.Homebrew Loader -- Button right of the HDD info -- Run the Homebrew Loader - - -8.Sort bar -- Bar at the top -- contains 9 - 16 from left to right - - - 9.Favorites --- Press it to hide all games that are not marked as a favorite. - - 10. Game Search --- Use this button to only list games that start with a certain letter. - - 11.Abc --- Your games will be sorted alphabetically. - - 12.Playcount --- Sort games by the number of times you have launched them from this application. Games with the same count are sorted alphabetically. - - 13.List --- Press it to see games listed by name and any available box art for 1 game at a time. - - 14.Grid --- Use this button to see your games arranged in a grid. The number of rows available depends on how many games are on you drive. 39 games can be seen at the most. - - 15.Carousel --- Press this to see you games arranged in a rotating fan array. 7 games can be seen at a time. - - 16. Load from Disc --- Boot the current game disc that is inserted in the Wii disc drive. cMIOS is required in order to play Gamecube backups. - -17.Clock -- Above the HDD info -- This looks like a digital clock. Coincidently, it functions like a clock. - -18.HDD Info -- In the middle, at the bottom -- This shows some information about your connected HDD (only the WBFS partition). Free & total space in GB as well as the game count. GB is defined here as 1024MB. When you bought your drive, the manufacturer probably used 1000MB for GB so the size displayed here will be less than what your drive was advertised as. The game count will reflect the games you are choosing to display, not the actual amount of games on your drive. If you are hiding games with parental controls/favorites, they will not be added into this total. - -################################### - -[3c] View - -There are 3 different ways to view your games. - -List --- Games are listed by name (up to 9 at a time) box art for the selected game is displayed. This is currently the only screen you can initiate a download for artwork from. Also on this screen The B button has a slightly different use. If there are scrollbars present on your gamelist, holding B and moving the cursor scrolls the list. - -Grid --- Games are arranged in a grid (up to 320). The number of rows available depends on how many games are on you drive. By default, it is 3X14 (with the last column hidden)if there aren’t enough games to fill all 42 spots, it changes to 2x8 (2x7 shown on screen). Again, if there aren’t enough games to fill it up, the number of rows decreases. - -Carousel --- Games are arranged in a rotating fan array (up to 320). Up to 7 games can be seen at a time. - -################################### - -[3d] Game Info - -Pressing 2 (or X on CC input) brings a prompt with information about the selected game. This info is read from the wiitdb.zip file discussed earlier. Among the displayed information are the following: - -Accessories --- The supported accessories for the game are shown in the lower left. The max number of players is shown on the image of the WiiMote. Any required accessories are shown in light blue. - -Rating system --- The rating for the game is shown in the lower left of the screen. It is converted internally between PEGI,ESRB, and CERO (though not used for anything yet). - -Wifi --- The number of online players is displayed to the right of the accessories. Any other wifi features are listed above the accessories. - -Synopsis --- If a synopsis is present in the file, it can be viewed by pressing A on the game info screen. You need to set the game language to the language of synopsis you want to view! - -Wiitdb.zip will get updated when you update all or update the full channel. Only the info for the games and language you have will be downloaded. If you do not have the possibility to update with the loader because you have no Wifi, go to the game info screen and press 1 (Rev637 or higher needed). It will store a link in a file as shown at the bottom. Open the file and copy the link. Then open it with a web browser to download the file. Place the Wiitdb.zip in the titles.txt path. - -################################### - -[3e] Game Prompt - -This is the prompt that comes up when a game is selected (if the quickboot option is disabled). - -Play --- Click the spinning disc to launch this game. - -Rename ***** --- Click the title of the game in the top of the prompt to rename it directly on the WBFS file system. If you are using titles.txt or wiitdb.zip, this will have no (visible) effect. - -Back --- Closes this prompt. - -Favorite --- Click the star to add/remove this game from your favorites. - -Size --- The amount of space that the game occupies on the WBFS. - -Count --- The number of times you have launched this game using this application. - -Settings ***** --- Here is where you go to enter settings that will be used for this game only. - - -________________ -[4] Exit Menu - -This is the screen that appears when you press the home button on the WiiMote or the exit button in the main screen. - -Return to loader --- if you launched USB Loader GX from HBC, LoadMii, or similar chain loading application, you will see this button. Pressing it will take you back to the application you came from. - -Homebrew Channel --- Brings you to the homebrew channel - -Wii Menu --- Exits to the Wii System Menu. - -Batteries --- Status for all connected WiiMotes is displayed here. - -Close --- Closes this screen and returns you to where you were in the application before this screen was called. - - -________________ -[5] Homebrew&Title Launcher ***** -[5a] Homebrew Launcher - - -New since rev627 is the Homebrew Launcher. You can activate this function by clicking on the icon right of the HDD info at the main screen (the button looks like the Homebrew channel). Just like the HBC, all apps of the specified folder will be shown in groups of 4. The images of the apps are shown on the left, and the name to the right. When you click an app, the info in the meta.xml will be shown. - -Folders of homebrew must contain a .dol or .elf . Unlike the HBC they do not have to be renamed to boot.dol or boot.elf . -The folder may also contain an icon.png (size 128x48), meta.xml and other data that the app needs to run. - -################################### - -[5b] Title Launcher - -Since rev648 it is also possible to load channels. To access the title (channel) launcher, go to the Homebrew launcher. There you will see two buttons in the bottom right. The first (left) button leads to the title launcher. -If you want the correct names of the channels to display, you need a database.txt found here: http://pastebin.com/f6fb1533b. Place it in the config folder. -You are free to edit this file online, but do not add Homebrew channels. These have title IDs that can be different on other wiis. - -################################### - -[5c] (Un)Installing WADs over wifi - -FOR ADVANCED USERS ONLY! - -EASY METHOD - -Guide by GBAtemp member NeoRame - -1) Download the wiiload installer found here -2) Connect the wii to wifi. Go to the Homebrew channel and press Home. You will find your wiis IP here. -3) Run the Installer and choose next. Enter the wii IP and choose install. -4) Launch the USB loader GX and go to the Homebrew Launcher, then go to the Title (channel) launcher. -5) On your PC, double click a .wad .dol or .elf to send it to the Wii (You can also right click and choose Send to wii). If you send a wad, you will be asked to (un)install it or not. - -NOTE: If you can't get it to work, reboot your computer and try again. - -DIFFICULT METHOD (Use if the easy one doesn't work) - -Guide made by GBAtemp member Logan -What you will need: - - - * Your Wii's IP address (see below for details) - * WiiLoad - * This guide is for Windows only. I don't use Linux - - -1) Download WiiLoad from the above link and extract the contents. -2) Copy/Move wiiload.exe to C:\Windows\System32\ -3) Open Notepad and copy the following into it: - -Windows Registry Editor Version 5.00 - -[HKEY_CLASSES_ROOT\.WAD] -@="" - -[HKEY_CLASSES_ROOT\.WAD\shell] - -[HKEY_CLASSES_ROOT\.WAD\shell\Send to Wii!] - -[HKEY_CLASSES_ROOT\.WAD\shell\Send to Wii!\command] -@="c:\\windows\\system32\\wiiload.exe \"%1\"" -4) Save the file as "wiiload.reg" -5) Double click the file and accept entering the entries into the registry. -6) Boot up your Wii and load the USB loader GX. Go to the Homebrew Launcher and hover over the WiFi Wii icon. A tooltip will pop up showing your IP address. Make a note of it. -7) Set the environment variable by going to your computer's Control Panel -» System -» Advanced -» Environment Variables, then click "new" under either category. The variable name is WIILOAD and the value is tcp:yourIP, where yourIP is the Wii's IP/hostname. Click "OK" here and in System Properties. -8) Now go to the title (channel) browser on your wii. On your PC, right click on a .WAD file and you should now see a "Send to Wii!" option. Click on this and watch the magic work at the Wii end of business. -9) [Optional] Double click on a .WAD file and choose c:\windows\system32\wiiload.exe as the application to open it. Now double clicking .WAD files will send them to your Wii. -10) To uninstall, simply send the same .WAD file to the Wii. - -Use your noggin when dealing with WAD's. I won't be held accountable for any misuse! - - -________________ -[6] Settings - -This is where you customize the behavior of the program. - -################################### - -[6a] Gui settings - -These are the settings that affect the behavior and feel of the GUI. Your settings are saved when exiting back to the main screen, change custom paths, change views in the main screen, and a few other times. - -App language ***** --- If you have a language file to translate this program, you can select it here. You can change the path by clicking it at the top of the screen. The button in the lower right will restore the default (English). -NOTE: Newest revs will automatically load your language if it is found. - -Display --- In the list view, you can chose to display the selected game's region and ID here. - -Clock --- Choose how you want the clock displayed. - -Tooltips --- Enable tooltip help you with the various buttons and options. - -Flip-X --- This changes the behavior of left and right on the game prompt and Grid/Carrousel. If it feels un-natural, change this setting. - -Prompts/Buttons --- Select whether or not to apply the widescreen fix to prompt windows and certain buttons in the GUI. - -Keyboard --- Choose between different layouts for the on-screen keyboard used in the GUI. - -Discimage Download --- Select what discimages have to be downloaded -Only Original: Always get original discart -Only Customs: Always get custom discart -Original/Customs: Get original discart. Get custom discart if original is not available -Customs/Original: Get custom discart. Get original discart if cutom is not available - -Wiilight --- Change the behavior of the disc slot light. - -Rumble --- Turn rumble on/off. - -Auto init. network --- Turn this ON to automatically initialize the network at boot. If a new update is available, you will be asked if you want to download it. -IMPORTANT: Turning on this function may cause malfunctioning of the loader and games! - -Titles from XML --- Choose if you want to ignore the titles stored on the xml file (in wiitdb.zip) or titles.txt and use the ones stored on the WBFS. - -Screensaver --- Set how long it will take to activate the screensaver in case of inactivity. The screensaver switches off the Wiimote. - -################################### - -[6b] Game load - -Change settings that have to do with the way games are booted. These will be use as default if you don't set any specific settings for that game. - -Video mode --- Select the video mode to use for games. Most games work with disc default. If this doesn't work, try console default. Then if you still need to, try forcing your region. - -vidTV patch --- Patches the signal after the game has rendered it in the mode selected in video mode. If none of the video modes work, try this. - -Game language --- The language that is passed to the game when it is booted. If the language is supported by the game, it will be used in game. - -Patch country strings --- Use this for Japanese imports. - -Ocarina-- Turn on/off the ocarina cheat engine. You need gct files in the cheatcode path mentioned earlier. - -Boot/standard ***** --- Select the cIOS that is used to boot the program into. - -Quickboot --- Choose if you want to skip the game prompt when starting games. - -Error 002 fix --- With certain IOS, some games show an error that says "blablabla, 002, blablabla. Don't be a pirate." Turn this on to fix it. -Anti: Some cIOS have 002fix build-in. Unfortunately, this makes some games unplayable (the reason for this is that there are 2 types of 002 fix, and some games won't play with the one found in some cIOS). Activate the Anti002fx to play these games. Known games that need Anti002fix (they use 002fix on with some cIOS): Burger Island, Diabolik The Original Sin, Ghostbusters, Indiana Jones and the Staff of Kings, MySims Racing, Nutrition Matters, Solitaire And Mahjong, Takt of Magic - -################################### - -[6c] Parental control - -Settings for parents to control what content their kids see. Everything in this document with ***** beside it is hidden/unusable when the application is locked. - -Console --- Click here to lock/unlock advanced features. Requires password to unlock. - -Password ***** --- Click here to set a password. When locked it's shown as ******** - -Control level ***** --- Set the level of parental control here. Games will be excluded from the game list based on this and the settings you have for them in the game-specific settings. Also shown as ******** when the loader is locked. - -################################### - -[6d] Sound - -Settings related to audio are here. - -Background music --- You can chose custom BG music to be heard in the application here. Click the path at the top to change it. Format is OGG. Keep in mind that bigger songs will result in decreased memory available for other functions. It is possible to completely crash the loader with big files. Try to keep it «3MB to be safe. If you want to rock out to your music, use a media player. This is a game loader. - -Music volume --- Pick the volume for the BG music within this application, not in the games that are booted. - -SFX volume --- Pick the volume for the sound effects within this application, not in the games that are booted. - -################################### - -[6e] Custom paths ***** - -Below paths the program uses are customizable. Click a path to browse for its new destination. - -3D Cover Path --- For 3D boxart. When properly defined, 3D cover art will display in List and Carousel views by default. - -2D Cover Path --- For 2D boxart. When properly defined, 2D cover art will display in Grid view by default. - -Discimage path --- For Discart. - -Theme path --- For themes. - -XMLpath ---For wiitdb.zip - -Update path --- Used for updating the dol. If you are using our forwarder, it loads dols from this path. - -Cheatcodes path --- For gct & ocarina use. - -Txtcheatcodes path --- For txt files holding the codes for the code manager - -Dol path --- Contains replacement dols (Alternate dols) for certain broken games. - -Homebrew apps path --- Where you place your homebrew apps for the Homebrew Loader. - -################################### - -[6f] Update ***** - -Click to get updates online. Just because there is a newer revision than what you are using does not mean that it will be on the update server. Also, you get the choice to update dol or update all. The last option will update the dol, HBC icon.png and meta.xml - -It is also possible to update the full channel (This will also download wiitdb.zip). The channel needs a small change in the code before it can be updated. If you have a channel and you see the update all button, you can not update the channel. You have to get another one. - -################################### - -[6g] Default settings ***** - -Click here to restore default settings. You can also delete GXGlobal.cfg to do this if you get an error at boot. - -################################### - -[6h] Credits - -Look at the people that made this application possible. You get to rock out to some cool music, too. In the upper right corner you can see your rev# and the cIOS that your are currently running. - - -________________ -[7] Game settings ***** - - -Settings are available on a per-game basis from the prompt window. These settings have the same effect as the global settings, but are only used for the selected game. -NOTE: If quickboot is enabled, you cannot change the settings. So make sure you configure them before enabling quickboot. - -################################### - -[7a]Game load -After making changes, you must click the save button for them to take effect! - -Videomode --- see [6b] Game load -vidTV patch --- see [6b] Game load -Game language --- see [6b] Game load -Ocarina --- see [6b] Game load -Ios --- see [6b] Game load -Parental control --- see [6b] Game load -Error002 fix --- see [6b] Game load -Patch country strings --- see [6b] Game load - -Alternate dol --- This is for advanced users only. There are certain games that do not run because they reload IOS and this causes the USB to be dropped. -Select a dol: Use the next option to browse for an alt dol on the WBFS partition -Dol from SD/USB: Extract the proper dol from the ISO (using wiiscrubber) and name it with the 6 character game ID and put in the dolpath. - -Selected dol --- If you put Alternate dol on 'Select a dol', this function can be used to do so. (Even if the box is empty, you can click it) - -Save --- Writes the settings that are on the screen right now to the GXGameSettings file, behind the current game ID. - -################################### - -[7b]Ocarina - -Opens the cheat manager. For more info, see [8]Cheating - -################################### - -[7c] Uninstall Menu -If you click this button, you will see a new menu. You can uninstall everything here: the game, boxart, discart and TXTcheat file. You can also reset the playcounter here. - -################################### - -[7d]Default settings - -Restore all default settings for the game. (The default settings can be changed in [6b]Game load) - - -________________ -[8]Cheating - -With the build in application called Ocarina, it is possible to cheat by using the USB loader GX. To enable cheats, you will need a gct file with the gameID of the game in the correct path. (The cheatcodes path, see custom paths) - -There are two ways to create a gct file. For both, you will need a txt file that contains all the codes for the game. - -################################### - -[8a] Using a Computer - -All needed txt files can be found on http://geckocodes.org/. If you cannot find codes for your game, it means there are no codes available for that game. -To turn the txt files in gct files, you need the codemgr. It is included in the Ocarina download (check wiibrew.org). - -Open the txt file with the codemgr. You will see all the codes that are in the txt file. Sometimes the txt file has errors. In that case you need to open it manually with a txt editor. You can select all the cheats you want to enable. - -Some codes require that you fill in an amount of XX or other letters to make the code work. The values can usually be found in the comments. Select the letters you want to change and type the correct value over them. Then click ‘store settings’. - -If you filled everything in and enabled all cheats you want, click the ‘export to gct’ button. Choose the SD/USB you want to store the file to. It will create a file in the map codes. If you changed the path in the settings of the loader, you have to place the gct file in the right direction. - -################################### - -[8b] Using the USB loader - -Go to the Game settings. There, choose ocarina. If it doesn’t find a txt file with the gameID of the current game, you will be asked if you want to download it. You can also manually download the txt file, but don’t forget to rename it to the correct title ID (and place it in the txtcodes path, see custom paths). After you downloaded it, use the same Ocarina button to go to the code manager. Select all codes you want to enable, then click 'create' if you’re done. NO LETTERS CAN BE CHANGED USING THIS METHOD. TO MAKE THE CODES WORK THAT CONTAIN THEM, EDIT THE TXT FILE OR USE THE CODEMGR! It will bring you back to the gamesettings screen. - -################################### - -After you used on of above methods to create your gct file, enable ocarina in the game settings (game load), save and boot the game. - - -________________ -[9]Themes - -It is possible to theme this program. Many of the images can be replaced and moved. Every theme must include a GXTheme.cfg in the same folder as where you put the images. Here is a list of what you can put into the GXtheme.cfg : -#################### GXTheme.cfg ##################### -## Copy to a txt file and rename it to GXTheme.cfg. ## -## Don't touch lines starting with # ## -## Values between [] are defaults ## -###################################################### - -#### coordinates: x and y are coordinates in pixels, width and height are also in pixels #### - -## battery1_coords = x,y -- [245,400] -- For battery indicator 1 (exit menu) -battery1_coords = 245,400 - -## battery2_coords = x,y -- [335,400] -- For battery indicator 2 (exit menu) -battery2_coords = 335,400 - -## battery3_coords = x,y -- [245,425] -- For battery indicator 3 (exit menu) -battery3_coords = 245,425 - -## battery4_coords = x,y -- [335,425] -- For battery indicator 4 (exit menu) -battery4_coords = 335,425 - -## clock_coords = x,y -- [0,335] -- For the clock -clock_coords = 0,335 - -## covers_coords = x,y -- [26,58] -- For the game covers (list view) -covers_coords = 26,58 - -## gamecarousel_coords = x,y,width,height -- [0,-20,640,400] -- For the carousel (carousel view) -gamecarousel_coords = 0,-20,640,400 - -## gamecarousel_favorite_coords = x, y -- for the favoriteIcon in game-carousel-mode -## gamecarousel_search_coords = x, y -- for the searchIcon in game-carousel-mode -## gamecarousel_abc_coords = x, y -- for the abcIcon in game-carousel-mode -## gamecarousel_count_coords = x, y -- for the countIcon in game-carousel-mode -## gamecarousel_list_coords = x, y -- for the listIcon in game-carousel-mode -## gamecarousel_grid_coords = x, y -- for the gridIcon in game-carousel-mode -## gamecarousel_carousel_coords = x, y -- for the carouselIcon game-carousel-mode -## gamecarousel_dvd_coords = x, y -- for the dvdIcon game-carousel-mode - -## gamecount_coords = x,y -- [0,430] -- For the gamecount (below HDD info) -gamecount_coords = 0,430 - -## gamegrid_coords = x,y,width,height -- [0,20,640,400] -- For the gamegrid (grid view) -gamegrid_coords = 0,20,640,400 - -## gamegrid_favorite_coords = x, y -- for the favoriteIcon in game-grid-mode -## gamegrid_search_coords = x, y -- for the searchIcon in game-grid-mode -## gamegrid_abc_coords = x, y -- for the abcIcon in game-grid-mode -## gamegrid_count_coords = x, y -- for the countIcon in game-grid-mode -## gamegrid_list_coords = x, y -- for the listIcon in game-grid-mode -## gamegrid_grid_coords = x, y -- for the gridIcon in game-grid-mode -## gamegrid_carousel_coords = x, y -- for the carouselIcon in game-grid-mode -## gamegrid_dvd_coords = x, y -- for the dvdIcon in game-grid-mode - -## gamelist_coords = x,y,width,height -- [200,49,396,280] -- For the list of games (list view) -gamelist_coords = 200,49,396,280 - -## gamelist_favorite_coords = x, y -- for the favoriteIcon in game-list-mode -## gamelist_search_coords = x, y -- for the searchIcon in game-list-mode -## gamelist_abc_coords = x, y -- for the abcIcon in game-list-mode -## gamelist_count_coords = x, y -- for the countIcon in game-list-mode -## gamelist_list_coords = x, y -- for the listIcon in game-list-mode -## gamelist_grid_coords = x, y -- for the gridIcon in game-list-mode -## gamelist_carousel_coords = x, y -- for the carouselIcon in game-list-mode -## gamelist_dvd_coords = x, y -- for the dvdIcon in game-list-mode - -## hddinfo_coords = x,y -- [0,410] -- For the HDD info -hddinfo_coords = 0,410 - -## home_coords = x,y -- [485,367] -- For the exit menu button -home_coords = 485,367 - -## homebrew_coords = x,y - [425,400] -- For the Homebrew launcher button -homebrew_coords = 425,400 - -## id_coords = x,y -- [68,305] -- For the game ID (list view) -id_coords = 68,305 - -## install_coords = x,y -- [16,355] -- For the install button -install_coords = 16,355 - -## power_coords = x,y -- [576,355] -- For the power button -power_coords = 576,355 - -## region_coords = x,y -- [68,30] -- For the region (list view) -region_coords = 68,30 - -## sdcard_coords = x,y -- [150,390] -- For the Reload SD button -sdcard_coords = 150,390 - -## setting_coords = x,y -- [60,367] -- For the settings button -setting_coords = 60,367 - -#### show: 0 = don't show, 1 = show #### - -## show_battery = show -- [1] -- Show the battery indicators -show_battery = 1 - -## show_gamecount = show -- [1] -- Show the gamecount -show_gamecount = 1 - -## show_hddinfo = show -- [1] -- Show the hdd info -show_hddinfo = 1 - -## show_id = show -- [1] -- Show the game ID -show_id = 1 - -## show_region = show -- [1] -- Show the region -show_region = 1 - -## show_tooltip = show -- [1] -- Show tooltips -show_tooltip = 1 - -#### colors: red, green and blue go from 0 to 255 #### - -## clock_color = red,green,blue(,alpha) -- [138,138,138(,255)] -- Color of the clock -clock_color = 138,138,138(,255) - -## gametext_color = red,green,blue(,alpha) -- [0,0,0(,255)] -- Color of the gametext -gametext_color = 0,0,0(,255) - -## info_color = red,green,blue(,alpha) -- [55,190,237(,255)] -- Color of info (like HDD info) -info_color = 55,190,237(,255) - -## prompttext_color = red,green,blue(,alpha) -- [0,0,0(,255)] -- Color of text in prompts -prompttext_color = 0,0,0(,255) - -## settingstext_color = red,green,blue(,alpha) -- [0,0,0(,255)] -- Color of the text in the settings -settingstext_color = 0,0,0(,255) - -#### transparency: Alpha = from 0 (fully transparent) to 255 (Not transparent) - -## batteryUnused = Alpha -- [70] -- Transparancy of Battery indicators that are not used -batteryUnused = 70 - -## tooltipAlpha = Alpha -- [255] -- Transparency of tootltips -tooltipAlpha = 255 - -#### Allign: Allign = left/centre/right #### - -## clock_allign = Allign -- [centre] -- For the clock -clock_allign = centre - -## gamecount_allign = Allign -- [centre] -- Allign of the gamecount -gamecount_allign = centre - -## hddinfo_allign = Allign -- [centre] -- Align of the HDD info -hddinfo_allign = centre - -#### others #### - -## maxcharacters = x -- [36] -- Amount of characters shown before text starts scrolling left. (long text) -maxcharacters = 36 - -## pagesize = x -- [9] -- Amount of games in the list (list view) -pagesize = 9 - -## sortBarOffset = x -- [1] -- Amount of pixels the sortbar jump right when going to grid/carousel -sortBarOffset = 100 - - -________________ -[10]Special Games - -This section will explain on how to run some games with special boot methods. -The methods for Alt-dol from SD are explained here. You can also use Alt-dol from disc (use the same dols). If you have to rename the dol, replace the X by E (NTSC-U), P (PAL) or J (NTSC-J)! - - -[10a]Wii Sports Resort - -IMPORTANT: Wii sports resort requires the WII MOTION PLUS. If you do not have it, you can not run this game! -Booting WSR isn't too difficult. But as its different from usual booting methods, it is listed here. - -1) When you boot it for the first time, Alt dol loading must be enabled. -Alt dol info: Extract the player.dol and rename it to RZTX01.dol -Depending on your cIOS, 002fix or Anti002fix may be needed. -2) Watch the WM+ instruction video. After you watched it, the Wii will crash, so reboot. -3) From now on, load the game with Alt-Dol OFF - - -[10b]Metroid Prime Trilogy -Remove the disc before starting MPT! - -Select a DOL -1) First time boot the game without alt-dol (If this doesn't work, enable Dol from disc and use rs5fe_p.dol). Create a save file and exit the game. -2) From now, always use dol from Disc and choose the dol of the game you want to play: -rs5mp1_p.dol for Metroid Prime 1 -re5mp2_p.dol for Metroid Prime 2 -rs5mp3_p.dol for Metroid prime 3 -Then save and boot the game. -You need to do this EVERY time you boot the game - -Load From SD/USB -This is one of the most difficult games to boot from USB. First, you need to extract 3 alt-dols: -rs5mp1_p.dol for Metroid Prime 1 -re5mp2_p.dol for Metroid Prime 2 -rs5mp3_p.dol for Metroid prime 3 - -1) First time boot the game without alt-dol (If this doesn't work, extract rs5fe_p.dol, rename it to R3MX01.dol and boot the game with this alt-dol). Create a save file and exit the game. -2) Now the difficult part: All 3 alt dols have to be named R3MX01.dol . For this to be possible, you have to make a folder for each one. Every time you want to change game, you have to change the alt-dol path. The alt-dol that is used decides which game is play-able in the trilogy. - -Method to get MP3 working (NOTE: some versions of MPT can't boot MP3, evn with this method): -1) Install Hermes cIOS222 -2) In global game load, set Boot/standard to cIOS222 and enable 002fix -3) In specific game load, use cIOS222 -4) Run the game with the MP3 alt-dol -5) If the you get a black screen or an error message (Please Insert Metroid Prime 3 Disc), try inserting ANY DVD into the drive. Blank DVDs are acceptable. - - -________________ - -[11]FAQ - - -Q: Does this loader work on system menu X ? -A: Yes, it works on any system menu - - -Q: The Usb loader can’t find my HDD. What do I do now? -A: Be sure to have cIOSr9 or above (Or one of Hermes’ cIOS). If you use cIOSr12 or greater you have to try both USB ports! If this doesn’t work, check if your drive is compatible (use the devices compatibility wiki at the top of this readmii) - -Q: How can I use other usb devices (like Wii speak) in my games? -A: Install cIOSr12 or above. One port will be for the HDD and the other one for the device you want to use. - -Q:Do I have to rename all my games manually? -A:No. You can use wiitdb.zip to rename games automatically. More info in [2c] - -Q: Can I use the titles.txt to rename my games -A: No. Support for titles.txt has been dropped. Use wiitdb.zip - - -Q: I saw there is a newer rev available. Why can't update with the loader (it says no update available)? -A: The updates for the loader are on a different server. Not every rev will be available for download. Most revs will be available from http://usbloadergx.koureio.net/downloads/revisions. - - -Q: What does update all do? -A: It updates the dol (the loader itself), the icon.png and meta.xml for HBC, the language files and wiitdb.zip - -Q: Can I update the full channel? -A: Yes. If you have the channel version installed, there will be no update all function. If you do see this button, the channel is not correctly modified (see [2a]) so you can’t update it (also check the rev# in the credits, it should end with the letter c). In that case get another channel. - - -Q: Where can I see my rev# ? -A: Go to the Credits. The rev# will be at the top right corner. If it ends with c you are using the full channel. - - -Q: Can I use this loader in my own language? -A: This loader currently supports: Chinese (simple and trad.), Czech, Danish, Dutch, English, Finnish, French, German, Hungarian, Italian, Japanese, Korean, Norwegian, Polish, Portuguese, Russian, Spanish, Swedish, Thai and Turkish. -All languages are frequently updated by the GX language teams (I'm the Dutch translator). You can find us at http://gbatemp.net/index.php?showtopic=155252 - - -Q: I have a problem and the answer is not in this readmii. What do I do? -A: You can always ask questions at the GX forum: http://forum.koureio.net/ .You can find me (tj_cool) and the GX team there as well. \ No newline at end of file diff --git a/Languages/czech.lang b/Languages/czech.lang deleted file mode 100644 index 9dd2814c..00000000 --- a/Languages/czech.lang +++ /dev/null @@ -1,1551 +0,0 @@ -# USB Loader GX language source file. -# czech.lang - r1056 -# don't delete/change this line (é). -msgid "" -msgstr "" -"Project-Id-Version: USB Loader GX\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-06 19:36+0100\n" -"PO-Revision-Date: 2009-10-01 01:00+0200\n" -"Last-Translator: David Jelinek (djelinek@hotmail.com) e->e,r->r,u->u, c->c \n" -"Language-Team: r1056 - last version on http://djelinek.sweb.cz/_USBLoderGX/czech.lang \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -msgid " Wad Saved as:" -msgstr " WAD uložen jako:" - -msgid " could not be downloaded." -msgstr " nelze stáhnout." - -msgid " has been Saved. The text has not been verified. Some of the code may not work right with each other. If you experience trouble, open the text in a real text editor for more information." -msgstr " byl uložen. Soubor nebyl zkontrolován. Nekteré cásti kódu nemusí fungovat s ostaními. Pokud dojde k problémum, overte text v editoru." - -msgid " is not on the server." -msgstr " není na serveru" - -#, c-format -msgid "%i files not found on the server!" -msgstr "" - -#, c-format -msgid "%i missing files" -msgstr "" - -msgid "0 (Everyone)" -msgstr "0 (Každý)" - -msgid "1 (Child 7+)" -msgstr "1 (Díte 7+)" - -msgid "1 hour" -msgstr "1 hodina" - -msgid "10 min" -msgstr "10 minut" - -msgid "2 (Teen 12+)" -msgstr "2 (Mladistvý 12+)" - -msgid "20 min" -msgstr "20 minut" - -msgid "2D Cover Path" -msgstr "Cesta k 2D obalum" - -msgid "3 (Mature 16+)" -msgstr "3 (Zralý 16+)" - -msgid "3 min" -msgstr "3 minuty" - -msgid "30 min" -msgstr "30 minut" - -msgid "3D Cover Path" -msgstr "Cesta k 3D obalum" - -msgid "3D Covers" -msgstr "3D Obaly" - -msgid "4 (Adults Only 18+)" -msgstr "4 (Pouze dospelí 18+)" - -msgid "5 min" -msgstr "5 minut" - -msgid ">> Deleting tickets..." -msgstr ">> Odstraňuji tikety..." - -msgid ">> Deleting tickets...ERROR! " -msgstr ">> Odstraňuji tikety...CHYBA! " - -msgid ">> Deleting tickets...Ok! " -msgstr ">> Odstraňuji tikety...Ok! " - -msgid ">> Deleting title ...ERROR! " -msgstr ">> Odstraňuji titul...CHYBA! " - -msgid ">> Deleting title ...Ok!" -msgstr ">> Odstraňuji titul...Ok!" - -msgid ">> Deleting title contents..." -msgstr ">> Odstraňuji obsah titulu..." - -msgid ">> Deleting title contents...ERROR! " -msgstr ">> Odstraňuji obsah titulu...CHYBA! " - -msgid ">> Deleting title contents...Ok!" -msgstr ">> Odstraňuji obsah titulu...Ok!" - -msgid ">> Deleting title..." -msgstr ">> Odstraňuji titul..." - -msgid ">> Finishing installation..." -msgstr ">> Ukoncuji instalaci..." - -msgid ">> Installing content #" -msgstr ">> Instaluji obsah #" - -msgid ">> Installing ticket..." -msgstr ">> Instaluji tiket..." - -msgid ">> Installing title..." -msgstr ">> Instaluji titul..." - -msgid ">> Reading WAD data..." -msgstr ">> Nacítám WAD data..." - -msgid ">> Reading WAD data...ERROR! " -msgstr ">> Nacítám WAD data...CHYBA! " - -msgid ">> Reading WAD data...Ok!" -msgstr ">> Nacítám WAD data...Ok! " - -msgid "AUTO" -msgstr "" - -msgid "All Partitions" -msgstr "Vsechny oddíly" - -msgid "All images downloaded successfully." -msgstr "Všechny obrázky staženy úspešně." - -msgid "All the features of USB Loader GX are unlocked." -msgstr "Všechny možnosti USB Loader GX jsou odemceny" - -msgid "Alternate DOL" -msgstr "Náhradní DOL" - -msgid "Anti" -msgstr "" - -msgid "App Language" -msgstr "Jazyk aplikace" - -msgid "Apply" -msgstr "" - -msgid "Apr" -msgstr "Dub" - -msgid "Are you sure you want to lock USB Loader GX?" -msgstr "Opravdu si prejete uzamknout USB Loader GX?" - -msgid "Are you sure you want to reset?" -msgstr "Opravdu si prejete provest reset?" - -msgid "Are you sure?" -msgstr "Jste si jisti?" - -msgid "Aug" -msgstr "Srp" - -msgid "Author(s):" -msgstr "" - -msgid "AutoInit Network" -msgstr "Automatický start síte" - -msgid "Automatic port switching is done on the fly. You need to change all custom paths to SD-Card first for this option or else it could damage a filesystem." -msgstr "" - -msgid "BCA Codes Path" -msgstr "Cesta pro BCA kódy" - -msgid "Back" -msgstr "Zpet" - -msgid "Back to HBC or Wii Menu" -msgstr "Zpet do HBC nebo Wii nabídky" - -msgid "Backgroundmusic" -msgstr "Hudba na pozadí" - -msgid "Big thanks to:" -msgstr "Velké díky pro:" - -msgid "Block Cover Downloads" -msgstr "Zablokovat stažení obalů" - -msgid "Block Custom Paths" -msgstr "Zablokovat vlastní cesty" - -msgid "Block Game Install" -msgstr "Zablokovat instalaci her" - -msgid "Block Game Settings" -msgstr "Zablokovat nastavení her" - -msgid "Block GameID Change" -msgstr "Zablokovat zmenu ID hry" - -msgid "Block Global Settings" -msgstr "Zablokovat hlavní nastavení" - -msgid "Block Gui Settings" -msgstr "Zablokovat GUI nastavení" - -msgid "Block HBC Menu" -msgstr "Zablokovat HBC nabídku" - -msgid "Block IOS Reload" -msgstr "Zablokovat opetovné zavedení IOS" - -msgid "Block Loader Settings" -msgstr "Zablokovat nastavení spouštění" - -msgid "Block Parental Settings" -msgstr "Zablokovat rodičovskou kontrolu" - -msgid "Block Reset Settings" -msgstr "Zablokovat původní nastavení" - -msgid "Block Sound Settings" -msgstr "Zablokovat nastavení zvuku" - -msgid "Block Theme Downloader" -msgstr "Zablokovat stahování témat " - -msgid "Block Theme Menu" -msgstr "Zablokovat nabídku témat" - -msgid "Block Title Launcher" -msgstr "Zablokovat spouštění titulu" - -msgid "Block Updates" -msgstr "Zablokovat aktualizace" - -msgid "Boot/Standard" -msgstr "" - -msgid "Boot?" -msgstr "Spustit?" - -msgid "Both" -msgstr "Oboje" - -msgid "Both Ports" -msgstr "" - -msgid "Can't be formatted" -msgstr "Nelze naformátovat" - -msgid "Can't create directory" -msgstr "Nelze vytvorit adresár" - -#, c-format -msgid "Can't create path: %s" -msgstr "Nelze vytvorit adresár: %s" - -msgid "Can't delete:" -msgstr "Nelze smazat:" - -msgid "Cancel" -msgstr "Zrušit" - -msgid "Cannot write to destination." -msgstr "Nelze zapisovat na vybrané umístení." - -msgid "Change Play Path" -msgstr "Zmena cesty prehrávání" - -msgid "Cheatfile is blank" -msgstr "Soubor s cheaty je prázdný" - -msgid "Clear" -msgstr "Vycistit" - -msgid "Click to Download Covers" -msgstr "Kliknete pro stažení obalu" - -msgid "Click to change game ID" -msgstr "Kliknete pro zmenu ID hry" - -msgid "Clock" -msgstr "Hodiny" - -msgid "Close" -msgstr "zavrít" - -msgid "Code Download" -msgstr "Stažení kódu" - -#, c-format -msgid "Coded by: %s" -msgstr "Naprogramoval: %s" - -msgid "Coding:" -msgstr "Programování:" - -msgid "Connection to server timed out." -msgstr "Spojení se serverem vypršelo" - -msgid "Console" -msgstr "Konzole" - -msgid "Console Default" -msgstr "Puvodní nastavení konzole" - -msgid "Console Locked" -msgstr "Konzole uzamcena" - -msgid "Console must be unlocked for this option." -msgstr "Konzole musí být pro tuto možnost odemčena " - -msgid "Console should be unlocked to modify it." -msgstr "Konzole musí být odemcena pro tuto zmenu" - -msgid "Continue to install game?" -msgstr "Pokracovat pri instalaci hry" - -msgid "Controllevel" -msgstr "Úroven rízení" - -msgid "Correct Password" -msgstr "Správné heslo" - -msgid "Could not connect to the server." -msgstr "Nelze se pripojit na server" - -msgid "Could not create GCT file" -msgstr "Nelze vytvorit GCT soubor" - -#, c-format -msgid "Could not create path: %s" -msgstr "Nelze vytvorit adresar: %s" - -msgid "Could not find info for this game in the wiitdb.xml." -msgstr "Nelze nalézt informace pro tuto hru v wiitdb.xml." - -msgid "Could not initialize DIP module!" -msgstr "Nelze inicializovat DIP modul!" - -msgid "Could not initialize network!" -msgstr "Nelze inicializovat sítové pripojení" - -msgid "Could not open Disc" -msgstr "Nelze otevrít disk" - -msgid "Could not open wiitdb.xml." -msgstr "Nelze otevrít wiitdb.xml." - -msgid "Could not save." -msgstr "Nelze uložit." - -msgid "Cover Download" -msgstr "Stažení obalu" - -msgid "Create" -msgstr "Vytvorit" - -msgid "Credits" -msgstr "Zásluhy" - -msgid "Custom Discarts" -msgstr "" - -msgid "Custom Paths" -msgstr "Vlastní cesty" - -msgid "Customs/Original" -msgstr "Upravené/Originál" - -msgid "DOL Path" -msgstr "Cesta k DOL" - -msgid "Dec" -msgstr "List" - -msgid "Default" -msgstr "Puvodní" - -msgid "Default Gamesettings" -msgstr "Puvodní nastavení her" - -msgid "Default Settings" -msgstr "Puvodní nastavení" - -msgid "Delete" -msgstr "Smazat" - -msgid "Delete ?" -msgstr "Smazat?" - -msgid "Delete Cheat GCT" -msgstr "Smazat Cheat GCT" - -msgid "Delete Cheat TXT" -msgstr "Smazat Cheat TXT" - -msgid "Delete Cover Artwork" -msgstr "Smazat obal krabicky" - -msgid "Delete Disc Artwork" -msgstr "Smazat potisk DVD" - -msgid "Design:" -msgstr "" - -msgid "Developed by" -msgstr "Vyvinul" - -msgid "Directory does not exist!" -msgstr "Adresár neexistuje!" - -msgid "Disc Artwork Download" -msgstr "Stažení potisku DVD" - -msgid "Disc Artwork Path" -msgstr "Cesta k potiskum DVD" - -msgid "Disc Default" -msgstr "Puvodní nastavení disku" - -msgid "DiskFlip" -msgstr "" - -msgid "Display" -msgstr "Zobrazení" - -msgid "Display as a carousel" -msgstr "Zobrazit jako karusel" - -msgid "Display as a grid" -msgstr "Zobrazit do mrížky" - -msgid "Display as a list" -msgstr "Zobrait jako seznam" - -msgid "Display favorites only" -msgstr "Zobrazit pouze oblíbené" - -msgid "Do you want to apply it now?" -msgstr "Prejete si aplikovat zmeny hned?" - -msgid "Do you want to apply this theme?" -msgstr "" - -msgid "Do you want to change language?" -msgstr "Prejete si zmenit jazyk?" - -msgid "Do you want to download this theme?" -msgstr "Prejete si stáhnout toto téma?" - -msgid "Do you want to format:" -msgstr "Prejete si formátovat" - -msgid "Do you want to load the default theme?" -msgstr "Prejete si nahrát výchozí téma?" - -msgid "Do you want to sync free space info sector on all FAT32 partitions?" -msgstr "Prejete si synchronizovat informace o volných sektorech na vsech FAT 32 oddílech?" - -msgid "Do you wish to update/download all language files?" -msgstr "Prejete si zaktualizovat vsechny jazykové soubory?" - -msgid "Done!" -msgstr "Hotovo!" - -msgid "Download" -msgstr "Stažení" - -msgid "Download Now" -msgstr "Stáhnout nyní" - -msgid "Download finished" -msgstr "Stažení dokonceno" - -msgid "Downloading 3D Covers" -msgstr "Stahování 3D obalu" - -msgid "Downloading Flat Covers" -msgstr "Stahování plochých obalu" - -msgid "Downloading Full HQ Covers" -msgstr "" - -msgid "Downloading Full LQ Covers" -msgstr "" - -msgid "Downloading custom Discarts" -msgstr "Stahuji upravené potisky" - -msgid "Downloading file..." -msgstr "Stahuji soubor ..." - -msgid "Downloading image:" -msgstr "Stahuji obrázek:" - -msgid "Downloading original Discarts" -msgstr "Stahuji originální potisky" - -msgid "Downloading pagelist:" -msgstr "Stahuji stránku:" - -msgid "Dutch" -msgstr "Dánsky" - -msgid "ERROR" -msgstr "CHYBA" - -msgid "ERROR:" -msgstr "CHYBA:" - -msgid "ERROR: Can't set up theme." -msgstr "CHYBA: Nelze nastavit téma." - -msgid "English" -msgstr "Anglicky" - -msgid "Error" -msgstr "Chyba" - -msgid "Error !" -msgstr "Chyba !" - -msgid "Error 002 fix" -msgstr "Oprava chyby 002" - -#, c-format -msgid "Error creating path: %s" -msgstr "Chyba pri vytvareni adresare: %s" - -msgid "Error opening downloaded file" -msgstr "Chyba pri otevirani stazeneho souboru" - -msgid "Error reading Disc" -msgstr "Nelze císt disk" - -#, c-format -msgid "Error when downloading file: %i" -msgstr "Chyba pri stahovani souboru: %i" - -msgid "Error while downloding file" -msgstr "Chyba pri stahovani souboru" - -msgid "Error while opening the zip." -msgstr "Chyba pri otevirani ZIP" - -msgid "Error while transfering data." -msgstr "Chyba behem prenosu dat." - -msgid "Error while updating USB Loader GX." -msgstr "Chyba pri aktualizaci USB Loader GX." - -msgid "Error writing the data." -msgstr "Chyba pri zapisu dat." - -msgid "Error..." -msgstr "Chyba..." - -msgid "Error:" -msgstr "Chyba:" - -msgid "Exit" -msgstr "Ukoncit" - -msgid "Exit to where?" -msgstr "Opustit kam?" - -msgid "Extracting files..." -msgstr "Rozbaluji soubory..." - -msgid "Failed formating" -msgstr "Neúspešné formátování" - -msgid "Failed to extract." -msgstr "Nemohu rozbalit." - -msgid "Failed to open partition" -msgstr "Nelze otevrít diskový oddíl" - -msgid "Failed updating" -msgstr "Aktualizace selhala" - -msgid "Feb" -msgstr "Ún" - -msgid "File not found." -msgstr "Soubor nenalezen" - -#, c-format -msgid "Filesize is %i Byte." -msgstr "Velikost souboru je %i Bytu." - -msgid "Filesize is 0 Byte." -msgstr "Velikost souboru je 0 Bytu" - -msgid "Finishing installation... Ok!" -msgstr "Ukoncuji instalaci... Ok!" - -msgid "Flat Covers" -msgstr "Ploché obaly" - -msgid "Flip-X" -msgstr "" - -msgid "Force NTSC" -msgstr "Vynutit NTSC" - -msgid "Force PAL50" -msgstr "Vynutit PAL50" - -msgid "Force PAL60" -msgstr "Vynutit PAL60" - -msgid "Format" -msgstr "Formát" - -msgid "Formatting, please wait..." -msgstr "Formátuji, cekejte prosím ..." - -msgid "Found missing images." -msgstr "" - -msgid "Free Space" -msgstr "Volné místo" - -msgid "French" -msgstr "Francouzky" - -msgid "Full Cover Path" -msgstr "" - -msgid "Full HQ Covers" -msgstr "" - -msgid "Full LQ Covers" -msgstr "" - -msgid "Full Menu" -msgstr "Plná nabídka" - -msgid "Full shutdown" -msgstr "Uplné ukoncení" - -msgid "GAMEID_Gamename" -msgstr "IdHry_NazevHry" - -msgid "GCT Cheatcodes Path" -msgstr "Cesta pro cheat kódy" - -msgid "GCT File created" -msgstr "Soubor GCT vytvoren" - -msgid "GUI Settings" -msgstr "Nastavení GUI" - -msgid "Game ID" -msgstr "ID hry" - -msgid "Game IOS" -msgstr "IOS hry" - -msgid "Game Language" -msgstr "Jazyk hry" - -msgid "Game Load" -msgstr "Nahrání hry" - -msgid "Game Lock" -msgstr "Zámek hry" - -msgid "Game Only" -msgstr "Pouze hry" - -msgid "Game Region" -msgstr "Region hry" - -msgid "Game Size" -msgstr "Velikost hry" - -msgid "Game Sound Mode" -msgstr "Zvukový mód hry" - -msgid "Game Sound Volume" -msgstr "Nastavení hlasitosti hry" - -msgid "Game Split Size" -msgstr "Velikost rozdelení hry" - -msgid "Game is already installed:" -msgstr "Hra je již nainstalována:" - -msgid "Game/Install Partition" -msgstr "" - -msgid "Gamename [GAMEID]" -msgstr "Název hry [IdHry]" - -msgid "Games" -msgstr "Hry" - -msgid "Genre:" -msgstr "Zánr:" - -msgid "German" -msgstr "Nemecky" - -msgid "Global Settings" -msgstr "Hlavní nastavení" - -msgid "HOME Menu" -msgstr "Hlavní menu" - -msgid "Homebrew Apps Path" -msgstr "Cesta pro Homebrew aplikace" - -msgid "Homebrew Channel" -msgstr "Homebrew kanál" - -msgid "Homebrew Launcher" -msgstr "Spouštec Homebrew" - -msgid "Hour" -msgstr "Hodina" - -msgid "How do you want to update?" -msgstr "Jak si prejete provést aktualizaci?" - -msgid "How to Shutdown?" -msgstr "Jakým zpusobem ukoncit?" - -#, c-format -msgid "Incoming file %0.2fKB" -msgstr "Príchozí soubor %0.2fKB" - -#, c-format -msgid "Incoming file %0.2fMB" -msgstr "Príchozí soubor %0.2fMB" - -msgid "Initializing Network" -msgstr "Inicializuji sítové pripojení" - -msgid "Insert Disk" -msgstr "Vložte disk" - -msgid "Insert a Wii Disc!" -msgstr "Vložte Wii disk" - -msgid "Install" -msgstr "Instalace" - -msgid "Install Error!" -msgstr "Chyba pri instalaci" - -msgid "Install a game" -msgstr "Nainstalovat hru" - -msgid "Install directories" -msgstr "Instalacní adresáre" - -msgid "Install partitions" -msgstr "Instalacní oddíly" - -msgid "Installing content... Ok!" -msgstr "Instaluji obsah... Ok!" - -msgid "Installing game:" -msgstr "Instalace hry:" - -msgid "Installing ticket... Ok!" -msgstr "Instaluji tiket... Ok!" - -msgid "Installing title... Ok!" -msgstr "Instaluji titul... Ok!" - -msgid "Installing wad" -msgstr "Instaluji WAD" - -msgid "Issue manager /" -msgstr "Správce problému" - -msgid "It seems that you have some information that will be helpful to us. Please pass this information along to the DEV team." -msgstr "Zdá se, že máte informace, které by pro nás mohly být užitecné. Odešlete prosím tuto informaci na náš DEV tým." - -msgid "Italian" -msgstr "Italsky" - -msgid "Jan" -msgstr "Led" - -msgid "Japanese" -msgstr "Japonsky" - -msgid "July" -msgstr "Cervenec" - -msgid "June" -msgstr "Cerven" - -msgid "Keep" -msgstr "Držet" - -msgid "Keyboard" -msgstr "Klávesnice" - -msgid "Korean" -msgstr "Korejsky" - -msgid "Language File" -msgstr "Jazykový soubor" - -msgid "Language change:" -msgstr "Zmena jazyka:" - -msgid "Languagefiles Path" -msgstr "Cesta k jazykovym souborum" - -msgid "Languagepath changed." -msgstr "Cesta k jazykum zmenena" - -msgid "Left" -msgstr "Vlevo" - -msgid "Like SysMenu" -msgstr "Jako hlavní menu" - -msgid "List on Gamelaunch" -msgstr "Seznam pri spustení hry" - -msgid "Load" -msgstr "Spustit" - -msgid "Load From SD/USB" -msgstr "Nahrát z SD/USB" - -#, c-format -msgid "Load file from: %s ?" -msgstr "Nahrát soubor z: %s ?" - -msgid "Load this DOL as alternate DOL?" -msgstr "Spustit tento DOL jako náhradní DOL?" - -msgid "Loader Settings" -msgstr "Nstavení spoustení" - -msgid "Loading standard language." -msgstr "Nahrávám puvodní jazyk" - -msgid "Loading standard music." -msgstr "Nahrávám puvodní hudbu" - -msgid "Lock Console" -msgstr "Zamcení konzole" - -msgid "Lock USB Loader GX" -msgstr "Zamcení USB Loader GX" - -msgid "Locked" -msgstr "Zamceno" - -msgid "Loop Directory" -msgstr "Adresárová smycka" - -msgid "Loop Music" -msgstr "Hudební smycka" - -msgid "Loop Sound" -msgstr "Zvuková smycka" - -msgid "Main tester:" -msgstr "Muj tester:" - -msgid "Mar" -msgstr "Brez" - -msgid "Mark new games" -msgstr "Oznacir nové hry" - -msgid "May" -msgstr "Kvet" - -msgid "Messageboard Update" -msgstr "Aktualizace nástenky" - -msgid "Motion+ Video" -msgstr "WiiMotion+ Video" - -msgid "Mount DVD drive" -msgstr "Spustit z DVD" - -msgid "Multiple Partitions" -msgstr "" - -msgid "Music Loop Mode" -msgstr "Mód hudební smycky" - -msgid "Music Volume" -msgstr "Hlasitost hudby" - -msgid "Neither" -msgstr "Žádný" - -msgid "Network is not initiated." -msgstr "Sít není inicializována" - -msgid "New Disc Detected" -msgstr "Detekován nový disk" - -msgid "Next" -msgstr "Další" - -msgid "No" -msgstr "Ne" - -msgid "No Cheatfile found" -msgstr "Nebyl nalezen soubor s cheaty" - -msgid "No DOL file found on disc." -msgstr "Na disku nebyl nalezen DOL soubor." - -msgid "No Splitting" -msgstr "Bez rozdelování" - -msgid "No URL or Path specified." -msgstr "Nebylo zadano URL nebo cesta." - -msgid "No WBFS or FAT/NTFS/EXT partition found" -msgstr "Nebyl nalezen oddíl WBFS nebo FAT/NTFS/EXT" - -msgid "No cheats were selected" -msgstr "Nebyly vybrány žádné cheaty" - -msgid "No data could be read." -msgstr "Nelze císt data?" - -msgid "No favorites selected." -msgstr "Oblíbené nejsou oznaceny" - -msgid "No file missing!" -msgstr "Nechybí žádný soubor!" - -msgid "No new updates." -msgstr "Není dostupná žádná aktualizace." - -msgid "No themes found on the site." -msgstr "Žádné téma nebylo nalezeno na serveru." - -msgid "No themes found." -msgstr "" - -msgid "None" -msgstr "Žádný" - -msgid "Normal" -msgstr "Normální" - -msgid "Not a WAD file." -msgstr "Nejedná se o WAD soubor." - -msgid "Not a Wii Disc" -msgstr "Toto není Wii disk" - -msgid "Not a valid URL" -msgstr "Neplatné URL" - -msgid "Not a valid URL path" -msgstr "Neplatná URL cesta" - -msgid "Not a valid domain" -msgstr "Neplatný název domény" - -msgid "Not enough free memory." -msgstr "Není dostatek volné pameti." - -msgid "Not enough free space!" -msgstr "Není dostatek volného místa!" - -msgid "Not enough memory." -msgstr "Nedostatek pameti" - -msgid "Not required" -msgstr "Není nutné" - -msgid "Not supported format!" -msgstr "Nepodporovaný formát!" - -msgid "Nov" -msgstr "List" - -msgid "OFF" -msgstr "Vypnuto" - -msgid "OK" -msgstr "" - -msgid "ON" -msgstr "Zapnuto" - -msgid "Ocarina" -msgstr "Ocarina (cheaty)" - -msgid "Oct" -msgstr "Ríj" - -msgid "Official Site:" -msgstr "Oficiální místo:" - -msgid "Offset" -msgstr "Ofset" - -msgid "Only Game Partition" -msgstr "Pouze oddíl s hrami" - -msgid "Only for Install" -msgstr "Pouze pro instalaci" - -msgid "Original Discarts" -msgstr "" - -msgid "Original/Customs" -msgstr "Originál/Upravené" - -msgid "Parental Control" -msgstr "Rodicovský zámek" - -msgid "Partition" -msgstr "Oddíl" - -msgid "Password" -msgstr "Heslo" - -msgid "Password Changed" -msgstr "Heslo zmeneno" - -msgid "Password has been changed" -msgstr "Heslo bylo zmeneno" - -msgid "Patch Country Strings" -msgstr "Úprava nastavení zeme" - -msgid "Path Changed" -msgstr "Cesta zmenena" - -msgid "Permission denied." -msgstr "Prístup odmítnut" - -msgid "Pick from a list" -msgstr "Vyberte ze seznamu" - -msgid "Play Count" -msgstr "Spušteno" - -msgid "Play Next" -msgstr "Prehrát další" - -msgid "Play Once" -msgstr "Prehrát jednou" - -msgid "Play Previous" -msgstr "Prehrát predchozí" - -msgid "Playing Music:" -msgstr "Prehrávání hudby:" - -msgid "Please wait..." -msgstr "Cekejte prosím..." - -msgid "Power off the Wii" -msgstr "Vypnout Wii" - -msgid "Prev" -msgstr "Predchozí" - -msgid "Prompts Buttons" -msgstr "Potvrzovací tlacítka" - -msgid "Published by" -msgstr "Publikoval " - -msgid "Quick Boot" -msgstr "Rychlé zavedení" - -msgid "Random Directory Music" -msgstr "Náhodné prehrávání hudby" - -msgid "Reading WAD data... Ok!" -msgstr "Nacítám WAD data... Ok!" - -msgid "Receiving file from:" -msgstr "Prijímám soubor z:" - -msgid "Region Patch" -msgstr "Patch regionu" - -msgid "Released" -msgstr "Uvolnil" - -msgid "Reload SD" -msgstr "Znovunactení SD" - -msgid "Remove update" -msgstr "Odstranit aktualizaci" - -msgid "Rename Game on WBFS" -msgstr "Prejmenovat hru na WBFS" - -msgid "Reset" -msgstr "" - -msgid "Reset BG Music" -msgstr "Obnovit hudbu na pozadí" - -msgid "Reset Playcounter" -msgstr "Vynulovat cítac spuštení" - -msgid "Reset to default BGM?" -msgstr "Vrátit puvodní hudbu na pozadí?" - -msgid "Restarting..." -msgstr "Restartuji..." - -msgid "Return" -msgstr "Návrat" - -msgid "Return To" -msgstr "Návrat do" - -msgid "Return to Wii Menu" -msgstr "Návrat do Wii nabídky" - -msgid "Right" -msgstr "Vpravo" - -msgid "Rumble" -msgstr "Vibrace" - -msgid "SChinese" -msgstr "Cínsky" - -msgid "SFX Volume" -msgstr "Hlasitost SFX" - -msgid "Save" -msgstr "Uložit" - -msgid "Save Failed. No device inserted?" -msgstr "Ulození selhalo. Je pripojeno zarízení?" - -msgid "Save Game List to" -msgstr "Uložit seznam her do" - -msgid "Save List" -msgstr "" - -msgid "Saved" -msgstr "Uloženo" - -msgid "Screensaver" -msgstr "Sporic obrazovky" - -msgid "Select" -msgstr "Vyber" - -msgid "Select DOL Offset" -msgstr "Vyberte DOL ofset" - -msgid "Select a DOL" -msgstr "Vyberte DOL" - -msgid "Select a DOL from Game" -msgstr "Vybrat DOL ze hry" - -msgid "Sept" -msgstr "Zárí" - -msgid "Set Search-Filter" -msgstr "Nastavit vyhledávací filtr" - -msgid "Settings" -msgstr "Nastavení" - -msgid "Show Free Space" -msgstr "Zobrazit volné místo" - -msgid "Shutdown System" -msgstr "Ukoncit systém" - -msgid "Shutdown Wii" -msgstr "Vypnout Wii" - -msgid "Sort alphabetically" -msgstr "Trídení dle abecedy" - -msgid "Sort by number of players" -msgstr "" - -msgid "Sort by rank" -msgstr "Trídit podle hodnocení" - -msgid "Sort order by most played" -msgstr "Trídení podle spuštení" - -msgid "Sound" -msgstr "Zvuk" - -msgid "Sound Settings" -msgstr "Nastavení zvuku" - -msgid "Sound+BGM" -msgstr "Zvuk+BGM" - -msgid "Sound+Quiet" -msgstr "Zvuk+ticho" - -msgid "Spanish" -msgstr "Španelsky" - -msgid "Special thanks to:" -msgstr "Speciální podekování pro" - -msgid "Split each 2GB" -msgstr "Rozdelit po 2GB" - -msgid "Split each 4GB" -msgstr "Rozdelit po 4GB" - -msgid "Standby" -msgstr "Uspání" - -msgid "Success" -msgstr "Úspešne" - -msgid "Success:" -msgstr "Úspešne:" - -msgid "Successfully Saved" -msgstr "Úspešne uloženo" - -msgid "Successfully Updated" -msgstr "Úspešne zaktualizováno" - -msgid "Successfully Updated thanks to www.techjawa.com" -msgstr "Úspešne zaktualizováno díky www.techjawa.com" - -msgid "Successfully deleted:" -msgstr "Úspešne smazáno:" - -msgid "Successfully extracted theme." -msgstr "Úspešne rozbalené téma." - -msgid "Successfully installed:" -msgstr "Úspešne nainstalováno" - -msgid "Sync FAT32 FS Info" -msgstr "FAT32 volné místo" - -msgid "Synchronizing..." -msgstr "Synchronizuji ..." - -msgid "System Default" -msgstr "Puvodní nastavení systému" - -msgid "TChinese" -msgstr "Cínsky" - -msgid "TXT Cheatcodes Path" -msgstr "Cesta k TXT cheatum" - -msgid "The .them file was not found in the zip." -msgstr "Soubor .them nebyl nalezen v ZIP." - -msgid "The entered directory does not exist. Would you like to create it?" -msgstr "Zadaný adresár neexistuje. Chcete ho vytvorit?" - -msgid "The game installation is disabled under this IOS because of instability in usb write." -msgstr "Instalace her je zakázána s tímto IOS kvuli nestabilite v USB zápisu." - -msgid "The wad file was installed" -msgstr "Soubor WAD byl nainstalován" - -#, c-format -msgid "The wad installation failed with error %i" -msgstr "Instalace souboru WAD selhala s chybou %i" - -msgid "Theme Downloader" -msgstr "Stahování témat" - -msgid "Theme Menu" -msgstr "" - -msgid "Theme Path" -msgstr "Cesta k tématum" - -msgid "Theme Title:" -msgstr "Název tématu" - -msgid "Themes by www.spiffy360.com" -msgstr "Téma od www.spiffy360.com" - -msgid "This IOS is the BootMii ios. If you are sure it is not BootMii and you have something else installed there than ignore this warning." -msgstr "Tento IOS je BootMii IOS. Pokud si jste jisti ze toto není BootMii a máte zde nainstalováno neco jiného, pak ignorujte toto varování." - -msgid "This IOS was not found on the titles list. If you are sure you have it installed than ignore this warning." -msgstr "Tento IOS nebyl nalezen na seznamu. Pokud si jste jisti ze jej máte nainstalován, pak ignorujte toto varování." - -msgid "Time left:" -msgstr "Zbývá:" - -msgid "Title Launcher" -msgstr "Spouštec kanálu" - -msgid "Titles from WiiTDB" -msgstr "Názvy z WiiTDB" - -msgid "Tooltips" -msgstr "Popisky" - -msgid "Transfer failed" -msgstr "Prenos selhal" - -msgid "USB Device not found" -msgstr "USB zarízení nenalezeno" - -msgid "USB Loader GX is protected" -msgstr "USB Loader GX je zabezpecen" - -msgid "USB Port" -msgstr "" - -msgid "USB Port changing is only supported on Hermes cIOS." -msgstr "" - -msgid "Uninstall" -msgstr "Odinstalace" - -msgid "Uninstall Game" -msgstr "Odinstalace hry" - -msgid "Uninstall Menu" -msgstr "Menu odinstalací" - -msgid "Uninstall all" -msgstr "Odinstalovat vse" - -msgid "Uninstalling wad" -msgstr "Odinstalace WAD" - -msgid "Unknown" -msgstr "Neznámé" - -msgid "Unlock USB Loader GX" -msgstr "Odemknout USB Loader GX" - -msgid "Unlocked" -msgstr "Odemceno" - -msgid "Unsupported format, try to extract manually TempTheme.zip." -msgstr "Nepodporovaný formát, poskuste se rucne rozbalit TempTheme.zip." - -msgid "Update" -msgstr "Aktualizace" - -msgid "Update All" -msgstr "Plná aktualizace" - -msgid "Update DOL" -msgstr "Aktualizace DOL" - -msgid "Update Files" -msgstr "Zaktualizuj soubory" - -msgid "Update Path" -msgstr "Cesta pro aktualizaci" - -msgid "Update all Language Files" -msgstr "Zaktualizuj vsechny jazykové soubory" - -msgid "Update failed" -msgstr "Aktualizace selhala" - -msgid "Update successfull" -msgstr "Aktualizace probehla uspesne" - -msgid "Updating Language Files:" -msgstr "Aktualizuji jazykové soubory:" - -msgid "Uploaded ZIP file installed to homebrew directory." -msgstr "Odeslaný ZIP soubor nainstalován do adresáre homebrew" - -msgid "VIDTV Patch" -msgstr "VIDTV korekce" - -msgid "Version:" -msgstr "" - -#, c-format -msgid "Version: %s" -msgstr "Verze: %s" - -msgid "Video Mode" -msgstr "Video mód" - -msgid "WDM Files Path" -msgstr "Cesta k WDM soborum" - -msgid "WIP Patches Path" -msgstr "Cesta k WIP patchum" - -msgid "Waiting..." -msgstr "Cekám..." - -msgid "Warning:" -msgstr "Varování:" - -msgid "What do you want to update?" -msgstr "Co si prejete zaktualizovat?" - -msgid "What should be deleted for this game title:" -msgstr "Co si prejete smazat pro tento titul:" - -msgid "WiFi Features" -msgstr "WiFi možnosti" - -msgid "Widescreen Fix" -msgstr "Korekce širokoúhlé obrazovky" - -msgid "Wii Menu" -msgstr "Wii menu" - -msgid "Wii Settings" -msgstr "Nastavení Wii" - -msgid "WiiTDB Files" -msgstr "WiiTDB Soubory" - -msgid "WiiTDB Path" -msgstr "Cesta k WiiTDB" - -msgid "WiiTDB is up to date." -msgstr "WiiTDB je aktuální" - -msgid "Wiilight" -msgstr "Wii svetlo" - -msgid "Wrong Password" -msgstr "Špatné heslo" - -msgid "Yes" -msgstr "Ano" - -msgid "You are currently using IOS" -msgstr "Nyní pouzíváte IOS:" - -msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." -msgstr "Pokousíte se vybrat oddíl FAT32/NTFS/EXT s cIOS 249 Rev < 18. To není podporováno. Pokracujte na vasi odpovednost." - -msgid "You need to select or format a partition" -msgstr "Musíte vybrat nebo naformátovat oddíl" - -msgid "and translators for language files updates" -msgstr "a prekladatelé pro jazykové aktualizace" - -msgid "available" -msgstr "dostupný" - -msgid "does not exist!" -msgstr "neexistuje!" - -msgid "does not exist! Loading game without cheats." -msgstr "neexistuje. Nahrávání hry bez cheatu." - -msgid "files left" -msgstr "souboru zbývá" - -msgid "for FAT/NTFS support" -msgstr "pro FAT/NTFS podporu" - -msgid "for Ocarina" -msgstr "za Ocarina" - -msgid "for WiiTDB and hosting covers / disc images" -msgstr "za WiiTDB a hostování obalu / potisku DVD" - -msgid "for diverse patches" -msgstr "za ruzné opravy" - -msgid "for his awesome tool LibWiiGui" -msgstr "za jeho hrozný nástroj LibWiiGui" - -msgid "for hosting the themes" -msgstr "pro hostování témat" - -msgid "for hosting the update files" -msgstr "za umístení souboru pro aktualizaci " - -msgid "for the USB Loader source" -msgstr "za zdrojový kód pro USB Loader" - -msgid "formatted!" -msgstr "formátováno!" - -msgid "free" -msgstr "volné" - -msgid "not set" -msgstr "nenastaveno" - -msgid "of" -msgstr "z " - -msgid "seconds left" -msgstr "sekund zbývá" - -#~ msgid "Author:" -#~ msgstr "Autor:" - -#~ msgid "Do you want to load this theme?" -#~ msgstr "Prejete si nahrát toto téma?" - -#~ msgid "Loading default theme." -#~ msgstr "Nahrávám původní téma." - -#~ msgid "Theme path is changed." -#~ msgstr "Cesta k tématum zmenena" - -#~ msgid "Use IOS58" -#~ msgstr "Použít IOS58" - -#~ msgid "Custom Disc Images" -#~ msgstr "Vlastní potisky DVD" - -#~ msgid "Download Boxart image?" -#~ msgstr "Stáhnout obal krabicky?" - -#~ msgid "Download Discart image?" -#~ msgstr "Stáhnout potisk DVD?" - -#~ msgid "Downloading file" -#~ msgstr "Stahuji soubor" - -#~ msgid "Missing files" -#~ msgstr "Chybející soubory" - -#~ msgid "Original Disc Images" -#~ msgstr "Originální potisky DVD" - -#~ msgid "files not found on the server!" -#~ msgstr "souboru nenalezeno na serveru" diff --git a/Languages/danish.lang b/Languages/danish.lang deleted file mode 100644 index 9845ea49..00000000 --- a/Languages/danish.lang +++ /dev/null @@ -1,1851 +0,0 @@ -# USB Loader GX language source file. -# danish.lang - r1063 -# don't delete/change this line (é). -msgid "" -msgstr "" -"Project-Id-Version: USB Loader GX\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-06 19:36+0100\n" -"PO-Revision-Date: 2009-10-01 01:00+0200\n" -"Last-Translator: Fox888[dk]\n" -"Language-Team: [dk]\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -msgid " Wad Saved as:" -msgstr " WAD gemt som:" - -msgid " could not be downloaded." -msgstr " kunne ikke downloades." - -msgid " has been Saved. The text has not been verified. Some of the code may not work right with each other. If you experience trouble, open the text in a real text editor for more information." -msgstr " er blevet gemt. Koderne er ikke blevet kontrolleret. Nogle af koderne virker måske ikke samtidigt. Hvis der er problemer, åbn da tekstfilen i en editor for at få mere information." - -msgid " is not on the server." -msgstr " er ikke på serveren." - -#, c-format -msgid "%i files not found on the server!" -msgstr "%i filer ikke fundet på server!" - -#, c-format -msgid "%i missing files" -msgstr "%i filer mangler" - -msgid "0 (Everyone)" -msgstr "0 (Alle)" - -msgid "1 (Child 7+)" -msgstr "1 (Børn 7+)" - -msgid "1 hour" -msgstr "1 time" - -msgid "10 min" -msgstr "10 min." - -msgid "2 (Teen 12+)" -msgstr "2 (teenagere 12+)" - -msgid "20 min" -msgstr "20 min." - -msgid "2D Cover Path" -msgstr "Sti til 2-d covers" - -msgid "3 (Mature 16+)" -msgstr "3 (teenagere 16+)" - -msgid "3 min" -msgstr "3 min." - -msgid "30 min" -msgstr "30 min." - -msgid "3D Cover Path" -msgstr "Sti til 3-d covers" - -msgid "3D Covers" -msgstr "3D-Covers" - -msgid "4 (Adults Only 18+)" -msgstr "4 (Voksne 18+)" - -msgid "5 min" -msgstr "5 min." - -msgid ">> Deleting tickets..." -msgstr ">> Sletter tickets..." - -msgid ">> Deleting tickets...ERROR! " -msgstr ">> Sletter tickets...FEJL!" - -msgid ">> Deleting tickets...Ok! " -msgstr ">> Sletter tickets...Ok!" - -msgid ">> Deleting title ...ERROR! " -msgstr ">> Sletter titel...FEJL!" - -msgid ">> Deleting title ...Ok!" -msgstr ">> Sletter titel...Ok!" - -msgid ">> Deleting title contents..." -msgstr ">> Sletter titelindhold..." - -msgid ">> Deleting title contents...ERROR! " -msgstr ">> Sletter titelindhold...FEJL!" - -msgid ">> Deleting title contents...Ok!" -msgstr ">> Sletter titelindhold...Ok!" - -msgid ">> Deleting title..." -msgstr ">> Sletter titel..." - -msgid ">> Finishing installation..." -msgstr ">> Færdiggør installationen..." - -msgid ">> Installing content #" -msgstr ">> Installerer content #" - -msgid ">> Installing ticket..." -msgstr ">> Installerer ticket..." - -msgid ">> Installing title..." -msgstr ">> Installerer titel..." - -msgid ">> Reading WAD data..." -msgstr ">> Læser WAD-data" - -msgid ">> Reading WAD data...ERROR! " -msgstr ">> Læser WAD-data...FEJL!" - -msgid ">> Reading WAD data...Ok!" -msgstr ">> Læser WAD-data...Ok!" - -msgid "AUTO" -msgstr "" - -msgid "All Partitions" -msgstr "Alle Partitioner" - -msgid "All images downloaded successfully." -msgstr "Lykkedes at downloade alle billeder." - -msgid "All the features of USB Loader GX are unlocked." -msgstr "Alle USB Loader GX's funktioner er låst op." - -msgid "Alternate DOL" -msgstr "Alternativ DOL" - -msgid "Anti" -msgstr "" - -msgid "App Language" -msgstr "Programsprog" - -msgid "Apply" -msgstr "Indlæs" - -msgid "Apr" -msgstr "" - -msgid "Are you sure you want to lock USB Loader GX?" -msgstr "Er du sikker på at du vil låse USB Loader GX?" - -msgid "Are you sure you want to reset?" -msgstr "Er du sikker på at du vil nulstille?" - -msgid "Are you sure?" -msgstr "Er du sikker?" - -msgid "Aug" -msgstr "" - -msgid "Author(s):" -msgstr "Forfatter" - -msgid "AutoInit Network" -msgstr "AutoInit netværk" - -msgid "Automatic port switching is done on the fly. You need to change all custom paths to SD-Card first for this option or else it could damage a filesystem." -msgstr "Automatisk skift af port er gjort on the fly. For denne mulighed skal du skifte alle brugerdefinerede stier til SD kortet først, for ellers kan det skade dit fil system." - -msgid "BCA Codes Path" -msgstr "Sti til BCA koder" - -msgid "Back" -msgstr "Tilbage" - -msgid "Back to HBC or Wii Menu" -msgstr "Tilbage til HBC eller Wii-menuen" - -msgid "Backgroundmusic" -msgstr "Baggrundsmusik" - -msgid "Big thanks to:" -msgstr "En stor tak til:" - -msgid "Block Cover Downloads" -msgstr "Bloker Cover downloads" - -msgid "Block Custom Paths" -msgstr "Bloker brugdefineret sti" - -msgid "Block Game Install" -msgstr "Bloker spil installering" - -msgid "Block Game Settings" -msgstr "Bloker Spil indstillinger" - -msgid "Block GameID Change" -msgstr "Bloker Spil ID ændringer" - -msgid "Block Global Settings" -msgstr "Bloker hoved indstillinger" - -msgid "Block Gui Settings" -msgstr "Bloker Gui indstillinger" - -msgid "Block HBC Menu" -msgstr "Bloker HBC menu" - -msgid "Block IOS Reload" -msgstr "Blokér IOS-reload" - -msgid "Block Loader Settings" -msgstr "Bloker loader indstillinger" - -msgid "Block Parental Settings" -msgstr "Bloker forældre indstillinger" - -msgid "Block Reset Settings" -msgstr "Bloker nulstils indstillinger" - -msgid "Block Sound Settings" -msgstr "Bloker lyd indstillinger" - -msgid "Block Theme Downloader" -msgstr "Bloker tema downloader" - -msgid "Block Theme Menu" -msgstr "Bloker tema menu" - -msgid "Block Title Launcher" -msgstr "Bloker indlæsning af titler" - -msgid "Block Updates" -msgstr "Bloker opdateringer" - -msgid "Boot/Standard" -msgstr "" - -msgid "Boot?" -msgstr "Genstart?" - -msgid "Both" -msgstr "Begge" - -msgid "Both Ports" -msgstr "Begge porte" - -msgid "Can't be formatted" -msgstr "Kan ikke formateres" - -msgid "Can't create directory" -msgstr "Kan ikke lave ny mappe" - -#, c-format -msgid "Can't create path: %s" -msgstr "Kan ikke lave sti: %s" - -msgid "Can't delete:" -msgstr "Kan ikke slettes:" - -msgid "Cancel" -msgstr "Annullér" - -msgid "Cannot write to destination." -msgstr "Kan ikke skrive til destinationen." - -msgid "Change Play Path" -msgstr "Ændre sti til musik" - -msgid "Cheatfile is blank" -msgstr "Cheatfilen er tom" - -msgid "Clear" -msgstr "Ryd" - -msgid "Click to Download Covers" -msgstr "Klik for at downloade covers" - -msgid "Click to change game ID" -msgstr "Klik for at ændre spil-ID" - -msgid "Clock" -msgstr "Ur" - -msgid "Close" -msgstr "Luk" - -msgid "Code Download" -msgstr "Download af koder" - -#, c-format -msgid "Coded by: %s" -msgstr "Programmeret af: %s" - -msgid "Coding:" -msgstr "Programmering:" - -msgid "Connection to server timed out." -msgstr "Forbindelse til server timed out." - -msgid "Console" -msgstr "Konsol" - -msgid "Console Default" -msgstr "Konsol-standard" - -msgid "Console Locked" -msgstr "Konsollen er låst" - -msgid "Console must be unlocked for this option." -msgstr "Konsollen skal være låst op for denne mulighed." - -msgid "Console should be unlocked to modify it." -msgstr "Konsollen skal være låst op for ændre dette." - -msgid "Continue to install game?" -msgstr "Fortsæt med at installere spillet?" - -msgid "Controllevel" -msgstr "Kontrolniveau" - -msgid "Correct Password" -msgstr "Korrekt Password" - -msgid "Could not connect to the server." -msgstr "Kunne ikke forbinde til server." - -msgid "Could not create GCT file" -msgstr "Kunne ikke oprette GCT-fil" - -#, c-format -msgid "Could not create path: %s" -msgstr "Kunne ikke lave sti: %s" - -msgid "Could not find info for this game in the wiitdb.xml." -msgstr "Kunne ikke finde information for dette spil i wiitdb.xml" - -msgid "Could not initialize DIP module!" -msgstr "Kunne ikke initialisere DIP-modul!" - -msgid "Could not initialize network!" -msgstr "Kunne ikke initialisere netforbindelse!" - -msgid "Could not open Disc" -msgstr "Kunne ikke åbne DVD" - -msgid "Could not open wiitdb.xml." -msgstr "Kunne ikke åbne wiitdb.xml" - -msgid "Could not save." -msgstr "Kunne ikke gemme." - -msgid "Cover Download" -msgstr "Cover-download" - -msgid "Create" -msgstr "Opret" - -msgid "Credits" -msgstr "Lavet af:" - -msgid "Custom Discarts" -msgstr "Tilpasset DVD billeder" - -msgid "Custom Paths" -msgstr "Sti-indstillinger" - -msgid "Customs/Original" -msgstr "Tilpassede/Originale" - -msgid "DOL Path" -msgstr "Sti til DOL" - -msgid "Dec" -msgstr "" - -msgid "Default" -msgstr "Standard" - -msgid "Default Gamesettings" -msgstr "Standard spil-indstillinger" - -msgid "Default Settings" -msgstr "Standardindstillinger" - -msgid "Delete" -msgstr "Slet" - -msgid "Delete ?" -msgstr "Slet?" - -msgid "Delete Cheat GCT" -msgstr "Slet cheat GCT" - -msgid "Delete Cheat TXT" -msgstr "Slet Cheat TXT" - -msgid "Delete Cover Artwork" -msgstr "Slet boxart" - -msgid "Delete Disc Artwork" -msgstr "Slet DVD-billede" - -msgid "Design:" -msgstr "" - -msgid "Developed by" -msgstr "Udviklet af" - -msgid "Directory does not exist!" -msgstr "Mappen eksisterer ikke!" - -msgid "Disc Artwork Download" -msgstr "Download DVD-billeder" - -msgid "Disc Artwork Path" -msgstr "Sti til DVD-billeder" - -msgid "Disc Default" -msgstr "Spillets standard" - -msgid "DiskFlip" -msgstr "" - -msgid "Display" -msgstr "Spilinfo." - -msgid "Display as a carousel" -msgstr "Vis som karusel" - -msgid "Display as a grid" -msgstr "Vis som tabel" - -msgid "Display as a list" -msgstr "Vis som liste" - -msgid "Display favorites only" -msgstr "Vis kun favoritter" - -msgid "Do you want to apply it now?" -msgstr "Skal det aktiveres nu?" - -msgid "Do you want to apply this theme?" -msgstr "Vil du inlæse dette tema?" - -msgid "Do you want to change language?" -msgstr "Skal sproget ændres?" - -msgid "Do you want to download this theme?" -msgstr "Skal dette tema downloades?" - -msgid "Do you want to format:" -msgstr "Vil du formatere:" - -msgid "Do you want to load the default theme?" -msgstr "Vil du indlæse standard tema?" - -msgid "Do you want to sync free space info sector on all FAT32 partitions?" -msgstr "Vil du synkronisere fri plads info sector på alle FAT32 Partitioner?" - -msgid "Do you wish to update/download all language files?" -msgstr "Skal alle sprogfiler opdateres/downloades?" - -msgid "Done!" -msgstr "Færdig!" - -msgid "Download" -msgstr "" - -msgid "Download Now" -msgstr "Download nu" - -msgid "Download finished" -msgstr "Download færdig" - -msgid "Downloading 3D Covers" -msgstr "Downloader 3D Covers" - -msgid "Downloading Flat Covers" -msgstr "Downloader Flade Covers" - -msgid "Downloading Full HQ Covers" -msgstr "Downloader Fuld HQ Covers" - -msgid "Downloading Full LQ Covers" -msgstr "Downloader Fuld LQ Covers" - -msgid "Downloading custom Discarts" -msgstr "Downloader tilpasset DVD billeder" - -msgid "Downloading file..." -msgstr "Downloader fil..." - -msgid "Downloading image:" -msgstr "Downloader billede:" - -msgid "Downloading original Discarts" -msgstr "Downloader org. DVD billeder" - -msgid "Downloading pagelist:" -msgstr "Downloader pagelist:" - -msgid "Dutch" -msgstr "Hollandsk" - -msgid "ERROR" -msgstr "FEJL" - -msgid "ERROR:" -msgstr "FEJL:" - -msgid "ERROR: Can't set up theme." -msgstr "FEJL: Temaet kan ikke bruges." - -msgid "English" -msgstr "Engelsk" - -msgid "Error" -msgstr "Fejl" - -msgid "Error !" -msgstr "Fejl!" - -msgid "Error 002 fix" -msgstr "Error 002 fix" - -#, c-format -msgid "Error creating path: %s" -msgstr "Fejl kunne ikke lave sti: %s" - -msgid "Error opening downloaded file" -msgstr "Fejl kunne ikke åbne downloadet fil" - -msgid "Error reading Disc" -msgstr "DVDen kunne ikke læses" - -#, c-format -msgid "Error when downloading file: %i" -msgstr "Fejl kunne ikke download fil: %i" - -msgid "Error while downloding file" -msgstr "Fejl under hentning af fil" - -msgid "Error while opening the zip." -msgstr "Fejl under udpakning af zip fil." - -msgid "Error while transfering data." -msgstr "Fejl under overførsel af data." - -msgid "Error while updating USB Loader GX." -msgstr "Fejl under opdatering af USB Loader GX." - -msgid "Error writing the data." -msgstr "Fejl kunne ikke skrive data." - -msgid "Error..." -msgstr "Fejl..." - -msgid "Error:" -msgstr "Fejl:" - -msgid "Exit" -msgstr "Forlad" - -msgid "Exit to where?" -msgstr "Hvorhen?" - -msgid "Extracting files..." -msgstr "Pakker filer ud..." - -msgid "Failed formating" -msgstr "Formateringen mislykkedes" - -msgid "Failed to extract." -msgstr "Udpakningen mislykkedes." - -msgid "Failed to open partition" -msgstr "Kunne ikke åbne partition" - -msgid "Failed updating" -msgstr "Opdatering fejlede" - -msgid "Feb" -msgstr "" - -msgid "File not found." -msgstr "Fil ikke fundet." - -#, c-format -msgid "Filesize is %i Byte." -msgstr "Fil størrelse er %i Byte." - -msgid "Filesize is 0 Byte." -msgstr "Fil størrelse er 0 Byte." - -msgid "Finishing installation... Ok!" -msgstr "Afslutter installationen... Ok!" - -msgid "Flat Covers" -msgstr "Flad Cover" - -msgid "Flip-X" -msgstr "" - -msgid "Force NTSC" -msgstr "Tving NTSC" - -msgid "Force PAL50" -msgstr "Tving PAL50" - -msgid "Force PAL60" -msgstr "Tving PAL60" - -msgid "Format" -msgstr "Formater" - -msgid "Formatting, please wait..." -msgstr "Formatere, vent venligst..." - -msgid "Found missing images." -msgstr "Fundet manglende billeder" - -msgid "Free Space" -msgstr "Ledig plads" - -msgid "French" -msgstr "Fransk" - -msgid "Full Cover Path" -msgstr "Sti til Fuld Cover" - -msgid "Full HQ Covers" -msgstr "Fuld HQ Covers" - -msgid "Full LQ Covers" -msgstr "Fuld LQ Covers" - -msgid "Full Menu" -msgstr "Fuld Menu" - -msgid "Full shutdown" -msgstr "Luk helt ned" - -msgid "GAMEID_Gamename" -msgstr "" - -msgid "GCT Cheatcodes Path" -msgstr "Sti til cheatcodes" - -msgid "GCT File created" -msgstr "GCT-fil oprettet" - -msgid "GUI Settings" -msgstr "Konfigurér GUI" - -msgid "Game ID" -msgstr "Spil-ID" - -msgid "Game IOS" -msgstr "Spil-IOS" - -msgid "Game Language" -msgstr "Sprog" - -msgid "Game Load" -msgstr "Spilindstillinger" - -msgid "Game Lock" -msgstr "Spil låst" - -msgid "Game Only" -msgstr "Kun Spil" - -msgid "Game Region" -msgstr "Region" - -msgid "Game Size" -msgstr "Spilstørrelse" - -msgid "Game Sound Mode" -msgstr "Spillyd" - -msgid "Game Sound Volume" -msgstr "Spillyd lydstyrke" - -msgid "Game Split Size" -msgstr "Spil Split størrelse" - -msgid "Game is already installed:" -msgstr "Dette spil er allerede installeret:" - -msgid "Game/Install Partition" -msgstr "Spil/Installation partition" - -msgid "Gamename [GAMEID]" -msgstr "" - -msgid "Games" -msgstr "Spil" - -msgid "Genre:" -msgstr "" - -msgid "German" -msgstr "Tysk" - -msgid "Global Settings" -msgstr "Almindelig Indstillinger" - -msgid "HOME Menu" -msgstr "" - -msgid "Homebrew Apps Path" -msgstr "Sti til homebrew-programmer" - -msgid "Homebrew Channel" -msgstr "Homebrew Kanal" - -msgid "Homebrew Launcher" -msgstr "Homebrew-starter" - -msgid "Hour" -msgstr "timer" - -msgid "How do you want to update?" -msgstr "Hvordan skal der opdateres?" - -msgid "How to Shutdown?" -msgstr "Hvordan skal der slukkes?" - -#, c-format -msgid "Incoming file %0.2fKB" -msgstr "Henter fil %0.2fKB" - -#, c-format -msgid "Incoming file %0.2fMB" -msgstr "Henter fil %0.2fMB" - -msgid "Initializing Network" -msgstr "Initialiserer netforbindelse" - -msgid "Insert Disk" -msgstr "Indsæt en DVD" - -msgid "Insert a Wii Disc!" -msgstr "Indsæt en Wii-DVD!" - -msgid "Install" -msgstr "Installér" - -msgid "Install Error!" -msgstr "Installationsfejl!" - -msgid "Install a game" -msgstr "Installér nyt spil" - -msgid "Install directories" -msgstr "Installer mappe" - -msgid "Install partitions" -msgstr "Installationspartitioner" - -msgid "Installing content... Ok!" -msgstr "Installerer indhold... Ok!" - -msgid "Installing game:" -msgstr "Installerer spillet:" - -msgid "Installing ticket... Ok!" -msgstr "Installerer ticket... Ok!" - -msgid "Installing title... Ok!" -msgstr "Installerer titel... Ok!" - -msgid "Installing wad" -msgstr "Installerer WAD" - -msgid "Issue manager /" -msgstr "Problem manager /" - -msgid "It seems that you have some information that will be helpful to us. Please pass this information along to the DEV team." -msgstr "Det ser ud til, at du har information, der vil kunne hjælpe os. Vær rar at sende denne information til udviklerne." - -msgid "Italian" -msgstr "Italiensk" - -msgid "Jan" -msgstr "" - -msgid "Japanese" -msgstr "Japansk" - -msgid "July" -msgstr "Juli" - -msgid "June" -msgstr "Juni" - -msgid "Keep" -msgstr "Behold" - -msgid "Keyboard" -msgstr "Tastatur" - -msgid "Korean" -msgstr "Koreansk" - -msgid "Language File" -msgstr "Sprog Fil" - -msgid "Language change:" -msgstr "Skift sprog:" - -msgid "Languagefiles Path" -msgstr "Sti til sprog filer" - -msgid "Languagepath changed." -msgstr "Sti til sprogfiler ændret." - -msgid "Left" -msgstr "Venstre" - -msgid "Like SysMenu" -msgstr "Ligesom wii-menuen" - -msgid "List on Gamelaunch" -msgstr "Vis ved opstart af spil" - -msgid "Load" -msgstr "Indlæs" - -msgid "Load From SD/USB" -msgstr "Indlæs fra SD/USB" - -#, c-format -msgid "Load file from: %s ?" -msgstr "Indlæs fil fra %s ?" - -msgid "Load this DOL as alternate DOL?" -msgstr "Indlæs denne DOL som alternativ DOL?" - -msgid "Loader Settings" -msgstr "Loader Indstillinger" - -msgid "Loading standard language." -msgstr "Indlæser standardsprog." - -msgid "Loading standard music." -msgstr "Indlæser standardmusik." - -msgid "Lock Console" -msgstr "Lås konsol" - -msgid "Lock USB Loader GX" -msgstr "Lås USB Loader GX" - -msgid "Locked" -msgstr "Låst" - -msgid "Loop Directory" -msgstr "Afspil mappe i løkke" - -msgid "Loop Music" -msgstr "Afspil musik i løkke" - -msgid "Loop Sound" -msgstr "Afspil lyd i løkke" - -msgid "Main tester:" -msgstr "Hoved tester:" - -msgid "Mar" -msgstr "" - -msgid "Mark new games" -msgstr "Makér nye spil" - -msgid "May" -msgstr "Maj" - -msgid "Messageboard Update" -msgstr "Messageboard opdatering" - -msgid "Motion+ Video" -msgstr "" - -msgid "Mount DVD drive" -msgstr "Mount DVD-drev" - -msgid "Multiple Partitions" -msgstr "Multiple Partitioner" - -msgid "Music Loop Mode" -msgstr "Musik i løkke" - -msgid "Music Volume" -msgstr "Lydstyrke" - -msgid "Neither" -msgstr "Ingen" - -msgid "Network is not initiated." -msgstr "Netværk er ikke initialiseret." - -msgid "New Disc Detected" -msgstr "Har opdaget ny DVD" - -msgid "Next" -msgstr "Næste" - -msgid "No" -msgstr "Nej" - -msgid "No Cheatfile found" -msgstr "Cheat-fil ikke fundet" - -msgid "No DOL file found on disc." -msgstr "Der blev ikke fundet nogle DOL-filer på DVDen." - -msgid "No Splitting" -msgstr "Ingen Splitting" - -msgid "No URL or Path specified." -msgstr "Ingen URL eller sti er angivet." - -msgid "No WBFS or FAT/NTFS/EXT partition found" -msgstr "Ingen WBFS eller FAT/NTFS/EXT partition er fundet" - -msgid "No cheats were selected" -msgstr "Der blev ikke valgt nogle cheats" - -msgid "No data could be read." -msgstr "Data kunne ikke læses." - -msgid "No favorites selected." -msgstr "Ingen favoritter er valgt." - -msgid "No file missing!" -msgstr "Ingen filer mangler!" - -msgid "No new updates." -msgstr "Ingen nye opdateringer." - -msgid "No themes found on the site." -msgstr "Der blev ikke fundet nogle temaer på denne side." - -msgid "No themes found." -msgstr "Ingen temaer fundet." - -msgid "None" -msgstr "Ingen" - -msgid "Normal" -msgstr "Normal" - -msgid "Not a WAD file." -msgstr "Ikke en WAD-fil." - -msgid "Not a Wii Disc" -msgstr "Ikke en Wii-DVD" - -msgid "Not a valid URL" -msgstr "Ikke en gyldig URL" - -msgid "Not a valid URL path" -msgstr "Ikke en gyldig URL sti" - -msgid "Not a valid domain" -msgstr "Ikke et gyldig domæne" - -msgid "Not enough free memory." -msgstr "Ikke nok fri hukommelse." - -msgid "Not enough free space!" -msgstr "Ikke nok ledig plads!" - -msgid "Not enough memory." -msgstr "Ikke nok hukommelse." - -msgid "Not required" -msgstr "Ikke påkrævet" - -msgid "Not supported format!" -msgstr "Ikke et understøttet format" - -msgid "Nov" -msgstr "" - -msgid "OFF" -msgstr "Fra" - -msgid "OK" -msgstr "" - -msgid "ON" -msgstr "Til" - -msgid "Ocarina" -msgstr "" - -msgid "Oct" -msgstr "Okt" - -msgid "Official Site:" -msgstr "Officiel side:" - -msgid "Offset" -msgstr "" - -msgid "Only Game Partition" -msgstr "Kun spil Partition" - -msgid "Only for Install" -msgstr "Kun til installering" - -msgid "Original Discarts" -msgstr "Originale DVD Billeder" - -msgid "Original/Customs" -msgstr "Originale/Tilpassede" - -msgid "Parental Control" -msgstr "Børnelås" - -msgid "Partition" -msgstr "Partition" - -msgid "Password" -msgstr "Password" - -msgid "Password Changed" -msgstr "Password ændret" - -msgid "Password has been changed" -msgstr "Passwordet er blevet ændret" - -msgid "Patch Country Strings" -msgstr "Patch landeindstillinger" - -msgid "Path Changed" -msgstr "Sti er ændret" - -msgid "Permission denied." -msgstr "Tilladelse nægtet." - -msgid "Pick from a list" -msgstr "Vælg fra en liste" - -msgid "Play Count" -msgstr "Spiltæller" - -msgid "Play Next" -msgstr "Afspil næste" - -msgid "Play Once" -msgstr "Afspil én gang" - -msgid "Play Previous" -msgstr "Afspil forrige" - -msgid "Playing Music:" -msgstr "Afspiller musik:" - -msgid "Please wait..." -msgstr "Vent venligst..." - -msgid "Power off the Wii" -msgstr "Sluk Wiien" - -msgid "Prev" -msgstr "Forrige" - -msgid "Prompts Buttons" -msgstr "Knaptekster" - -msgid "Published by" -msgstr "Udgivet af" - -msgid "Quick Boot" -msgstr "Hurtig opstart" - -msgid "Random Directory Music" -msgstr "Musik fra tilfældig mappe" - -msgid "Reading WAD data... Ok!" -msgstr "Læser WAD-data... Ok!" - -msgid "Receiving file from:" -msgstr "Henter fil fra:" - -msgid "Region Patch" -msgstr "" - -msgid "Released" -msgstr "Udkommet" - -msgid "Reload SD" -msgstr "Genindlæs SD" - -msgid "Remove update" -msgstr "Fjern opdatering" - -msgid "Rename Game on WBFS" -msgstr "Omdøb spil på WBFS" - -msgid "Reset" -msgstr "Nulstil" - -msgid "Reset BG Music" -msgstr "Nulstil BG-musik" - -msgid "Reset Playcounter" -msgstr "Nulstil spiltæller" - -msgid "Reset to default BGM?" -msgstr "Nulstil til standard BGM?" - -msgid "Restarting..." -msgstr "Genstarter..." - -msgid "Return" -msgstr "Tilbage" - -msgid "Return To" -msgstr "Tilbage til" - -msgid "Return to Wii Menu" -msgstr "Tilbage til Wii-menuen" - -msgid "Right" -msgstr "Højre" - -msgid "Rumble" -msgstr "Vibration" - -msgid "SChinese" -msgstr "Kinesisk (std.)" - -msgid "SFX Volume" -msgstr "Lydstyrke for effekter" - -msgid "Save" -msgstr "Gem" - -msgid "Save Failed. No device inserted?" -msgstr "Gem fejlede. Ingen enheder indsat?" - -msgid "Save Game List to" -msgstr "Gem spilliste på" - -msgid "Save List" -msgstr "Gem list" - -msgid "Saved" -msgstr "Gemt" - -msgid "Screensaver" -msgstr "Pauseskærm" - -msgid "Select" -msgstr "Vælg" - -msgid "Select DOL Offset" -msgstr "Vælg DOL offset" - -msgid "Select a DOL" -msgstr "Vælg en DOL" - -msgid "Select a DOL from Game" -msgstr "Vælg DOL fra spil" - -msgid "Sept" -msgstr "" - -msgid "Set Search-Filter" -msgstr "Søgefilter" - -msgid "Settings" -msgstr "Indstillinger" - -msgid "Show Free Space" -msgstr "Vis fri plads" - -msgid "Shutdown System" -msgstr "Sluk (rødt lys)" - -msgid "Shutdown Wii" -msgstr "Sluk Wii" - -msgid "Sort alphabetically" -msgstr "Sortér alfabetisk" - -msgid "Sort by number of players" -msgstr "Sorter efter antal af spillere" - -msgid "Sort by rank" -msgstr "Sortér efter favoritstatus" - -msgid "Sort order by most played" -msgstr "Sortér efter popularitet" - -msgid "Sound" -msgstr "Lyd" - -msgid "Sound Settings" -msgstr "Lyd Indstillinger" - -msgid "Sound+BGM" -msgstr "Lyd+BGM" - -msgid "Sound+Quiet" -msgstr "Lyd+Stille" - -msgid "Spanish" -msgstr "Spansk" - -msgid "Special thanks to:" -msgstr "Specielt tak til:" - -msgid "Split each 2GB" -msgstr "Split hver 2GB" - -msgid "Split each 4GB" -msgstr "Split hver 4GB" - -msgid "Standby" -msgstr "" - -msgid "Success" -msgstr "Succes" - -msgid "Success:" -msgstr "Succes:" - -msgid "Successfully Saved" -msgstr "Gem lykkedes" - -msgid "Successfully Updated" -msgstr "Opdateringen lykkedes" - -msgid "Successfully Updated thanks to www.techjawa.com" -msgstr "Opdateringen lykkedes takket været www.techjawa.com" - -msgid "Successfully deleted:" -msgstr "Det lykkedes at slette:" - -msgid "Successfully extracted theme." -msgstr "Udpakning af tema lykkedes." - -msgid "Successfully installed:" -msgstr "Installationen lykkedes:" - -msgid "Sync FAT32 FS Info" -msgstr "Synkronisere FAT32 FS Info" - -msgid "Synchronizing..." -msgstr "Synkronisere..." - -msgid "System Default" -msgstr "System-standard" - -msgid "TChinese" -msgstr "Kinesisk (trad.)" - -msgid "TXT Cheatcodes Path" -msgstr "Sti til TXTCheatcodes" - -msgid "The .them file was not found in the zip." -msgstr "kunne ikke finde .them fil i zip" - -msgid "The entered directory does not exist. Would you like to create it?" -msgstr "Den angivne mappe eksisterer ikke. Skal den oprettes?" - -msgid "The game installation is disabled under this IOS because of instability in usb write." -msgstr "Spil installering er ikke aktiveret med denne IOS, på grund af ustabil skrivning til usb enheder." - -msgid "The wad file was installed" -msgstr "Wad fil var installeret" - -#, c-format -msgid "The wad installation failed with error %i" -msgstr "Installering af wad fil fejlede med fejl %i" - -msgid "Theme Downloader" -msgstr "Tema-downloader" - -msgid "Theme Menu" -msgstr "Tema menu" - -msgid "Theme Path" -msgstr "Sti til temaer" - -msgid "Theme Title:" -msgstr "Tematitel:" - -msgid "Themes by www.spiffy360.com" -msgstr "Temaer af www.spiffy360.com" - -msgid "This IOS is the BootMii ios. If you are sure it is not BootMii and you have something else installed there than ignore this warning." -msgstr "Denne IOS er BootMii ios. Hvis du er sikker på at det ikke er BootMii og du har noget andet installeret der, ignorer denne advarsel." - -msgid "This IOS was not found on the titles list. If you are sure you have it installed than ignore this warning." -msgstr "Denne IOS var ikke fundet i titel listen. Hvis du er sikker på at den er installeret ignorer denne advarsel." - -msgid "Time left:" -msgstr "Tid tilbage:" - -msgid "Title Launcher" -msgstr "Titel-starter" - -msgid "Titles from WiiTDB" -msgstr "Titler fra WiiTDB" - -msgid "Tooltips" -msgstr "Værktøjstips" - -msgid "Transfer failed" -msgstr "Overførelse fejlede" - -msgid "USB Device not found" -msgstr "USB-enhed ikke fundet" - -msgid "USB Loader GX is protected" -msgstr "USB Loader GX er beskyttet" - -msgid "USB Port" -msgstr "" - -msgid "USB Port changing is only supported on Hermes cIOS." -msgstr "Skift af USB port er kun muligt med Hermess cIOS." - -msgid "Uninstall" -msgstr "Afinstallér" - -msgid "Uninstall Game" -msgstr "Afinstallér spil" - -msgid "Uninstall Menu" -msgstr "Afinstallationsmenu" - -msgid "Uninstall all" -msgstr "Afinstaller alle" - -msgid "Uninstalling wad" -msgstr "Afinstallerer WAD" - -msgid "Unknown" -msgstr "Ukendt" - -msgid "Unlock USB Loader GX" -msgstr "Lås USB Loader GX op" - -msgid "Unlocked" -msgstr "Låst op" - -msgid "Unsupported format, try to extract manually TempTheme.zip." -msgstr "Format ikke understøttet, prøv at udpakke TempTheme.zip manuelt" - -msgid "Update" -msgstr "Opdatér" - -msgid "Update All" -msgstr "Opdatér alt" - -msgid "Update DOL" -msgstr "Opdatér DOL" - -msgid "Update Files" -msgstr "Opdatér filer" - -msgid "Update Path" -msgstr "Sti til opdateringer" - -msgid "Update all Language Files" -msgstr "Opdatér alle sprogfiler" - -msgid "Update failed" -msgstr "Opdateringen mislykkedes" - -msgid "Update successfull" -msgstr "Opdatering Lykkedes" - -msgid "Updating Language Files:" -msgstr "Opdaterer sprogfiler:" - -msgid "Uploaded ZIP file installed to homebrew directory." -msgstr "Den uploadede ZIP-fil er installeret i homebrew-mappen." - -msgid "VIDTV Patch" -msgstr "VIDTV-patch" - -msgid "Version:" -msgstr "" - -#, c-format -msgid "Version: %s" -msgstr "" - -msgid "Video Mode" -msgstr "Video-mode" - -msgid "WDM Files Path" -msgstr "Sti til WDM filer" - -msgid "WIP Patches Path" -msgstr "Sti til WIP patches" - -msgid "Waiting..." -msgstr "Venter..." - -msgid "Warning:" -msgstr "Advarsel:" - -msgid "What do you want to update?" -msgstr "Hvad skal opdateres?" - -msgid "What should be deleted for this game title:" -msgstr "Hvad skal der slettes for dette spil:" - -msgid "WiFi Features" -msgstr "WiFi-indstillinger" - -msgid "Widescreen Fix" -msgstr "Bredformat-fix" - -msgid "Wii Menu" -msgstr "" - -msgid "Wii Settings" -msgstr "Wii-indstillinger" - -msgid "WiiTDB Files" -msgstr "WiiTDB-filer" - -msgid "WiiTDB Path" -msgstr "Sti til WiiTDB" - -msgid "WiiTDB is up to date." -msgstr "WiiTDB er op til dato." - -msgid "Wiilight" -msgstr "" - -msgid "Wrong Password" -msgstr "Forkert password" - -msgid "Yes" -msgstr "Ja" - -msgid "You are currently using IOS" -msgstr "Du brug i øjeblikket IOS" - -msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." -msgstr "Du prøver at vælge en FAT32/NTFS/EXT partition med cIOS 249 Rev < 18. Dette er ikke understøttet. Fortsætte er på egen risiko" - -msgid "You need to select or format a partition" -msgstr "Du skal vælge eller formattere en partition" - -msgid "and translators for language files updates" -msgstr "og oversættere for sprog filer" - -msgid "available" -msgstr "tilgængelig" - -msgid "does not exist!" -msgstr "eksisterer ikke!" - -msgid "does not exist! Loading game without cheats." -msgstr "eksisterer ikke! Indlæser spillet uden cheats." - -msgid "files left" -msgstr "filer tilbage" - -msgid "for FAT/NTFS support" -msgstr "for FAT/NTFS understøttelse" - -msgid "for Ocarina" -msgstr "" - -msgid "for WiiTDB and hosting covers / disc images" -msgstr "for WiiTDB og for at hoste covers/DVD-billeder" - -msgid "for diverse patches" -msgstr "for diverse patches" - -msgid "for his awesome tool LibWiiGui" -msgstr "for hans seje værktøj LibWiiGui" - -msgid "for hosting the themes" -msgstr "for at hoste temaerne" - -msgid "for hosting the update files" -msgstr "for at hoste opdateringer" - -msgid "for the USB Loader source" -msgstr "for USB Loader sourcen" - -msgid "formatted!" -msgstr "formateret!" - -msgid "free" -msgstr "ledig" - -msgid "not set" -msgstr "ikke sat" - -msgid "of" -msgstr "af" - -msgid "seconds left" -msgstr "sekunder tilbage" - -#~ msgid "Author:" -#~ msgstr "Forfatter:" - -#~ msgid "Do you want to load this theme?" -#~ msgstr "Vil du indlæse dette tema?" - -#~ msgid "Loading default theme." -#~ msgstr "Indlæser standard tema." - -#~ msgid "Theme path is changed." -#~ msgstr "Sti til temaer er ændret." - -#~ msgid "Custom Disc Images" -#~ msgstr "Tilpasset DVD billeder" - -#~ msgid "Download Boxart image?" -#~ msgstr "Download boxart-billede?" - -#~ msgid "Download Discart image?" -#~ msgstr "Download DVD-billede?" - -#~ msgid "Downloading file" -#~ msgstr "Downloader fil" - -#~ msgid "Missing files" -#~ msgstr "Manglende filer" - -#~ msgid "Original Disc Images" -#~ msgstr "Originale DVD billeder" - -#~ msgid "Use IOS58" -#~ msgstr "Brug IOS58" - -#~ msgid "files not found on the server!" -#~ msgstr "filer blev ikke fundet på serveren!" - -#~ msgid "Disc Images" -#~ msgstr "DVD-billeder" - -#~ msgid "Downloading covers" -#~ msgstr "Downloader covers" - -#~ msgid "Only Customs" -#~ msgstr "Kun tilpassede" - -#~ msgid "Only Original" -#~ msgstr "Kun originale" - -#~ msgid "Trying custom Discarts" -#~ msgstr "Prøver tilpassede DVD billeder" - -#~ msgid "Trying original Discarts" -#~ msgstr "Prøver orginale DVD billeder" - -#~ msgid "Do you really want to delete:" -#~ msgstr "Vil du slette:" - -#~ msgid "Do you want to use the alternate DOL that is known to be correct?" -#~ msgstr "Skal den alternative DOL, der med sikkerhed er korrekt, bruges?" - -#~ msgid "0 (Locked and Unlocked Games)" -#~ msgstr "0 (låste og oplåste spil)" - -#~ msgid "1 (Unlocked Games Only)" -#~ msgstr "1 (kun oplåste spil)" - -#~ msgid "BETA revisions" -#~ msgstr "BETA-versioner" - -#~ msgid "Enabling this option on a FAT partition might slow the startup of the loader." -#~ msgstr "Aktiver denne muligheh på en FAT partition, vil gøre opstarten af denne loader langsommer." - -#~ msgid "GamesLevel" -#~ msgstr "Spil niveau" - -#~ msgid "Unlock console to use this option." -#~ msgstr "Lås op for konsollen for at benytte denne indstilling." - -#~ msgid "Full Shutdown" -#~ msgstr "Sluk helt" - -#~ msgid "GXtheme.cfg not found in any subfolder." -#~ msgstr "GXtheme.cfg blev ikke fundet i nogle undermapper" - -#~ msgid "If you don't have WiFi, press 1 to get an URL to get your WiiTDB.zip" -#~ msgstr "Hvis der ikke er netforbindelse, tryk da på 1 for at få en URL til WiiTDB.zip" - -#~ msgid "Paste it into your browser to get your WiiTDB.zip." -#~ msgstr "Brug den i en browser for at hente WiiTDB.zip." - -#~ msgid "Shutdown to Idle" -#~ msgstr "Standby" - -#~ msgid "Your URL has been saved in %sWiiTDB_URL.txt." -#~ msgstr "URLen er blevet gemt som %sWiiTDB_URL.txt." - -#~ msgid "Can't create file" -#~ msgstr "Kan ikke oprette fil" - -#~ msgid "Connection lost..." -#~ msgstr "Forbindelsen er væk..." - -#~ msgid "Download failed." -#~ msgstr "Download mislykkedes." - -#~ msgid "Download request failed." -#~ msgstr "Anmodning om download mislykkedes." - -#~ msgid "Downloading Page List:" -#~ msgstr "Downloader side:" - -#~ msgid "Theme Download Path" -#~ msgstr "Sti til download af temaer" - -#~ msgid "Transfer failed." -#~ msgstr "Overførslen mislykkedes" - -#~ msgid "Unsupported format, try to extract manually." -#~ msgstr "Formatet er ikke understøttet - prøv at udpakke manuelt." - -#~ msgid "and translaters for language files updates" -#~ msgstr "og oversætterne for opdateringer til sprogfilerne" - -#~ msgid "Insert an SD-Card to save." -#~ msgstr "Indsæt et SD-kort for at gemme." - -#~ msgid "Insert an SD-Card to use this option." -#~ msgstr "Indsæt et SD-kort for at bruge denne indstilling." - -#~ msgid "No SD-Card inserted!" -#~ msgstr "Intet SD-kort fundet!" - -#~ msgid "Waiting for USB Device" -#~ msgstr "Venter på USB-enhed" - -#~ msgid "Back to Loader" -#~ msgstr "Tilbage til Loaderen" - -#~ msgid "FAT: Use directories" -#~ msgstr "FAT: Brug mapper" - -#~ msgid "All partitions" -#~ msgstr "Alle partitioner" - -#~ msgid "Game partition" -#~ msgstr "Spilpartition" - -#~ msgid "Install 1:1 Copy" -#~ msgstr "Installér 1:1-kopi" - -#~ msgid "An Error occured" -#~ msgstr "Der skete en fejl" - -#~ msgid "Are you sure you want to enable Parent Control?" -#~ msgstr "Skal børnelåsen slås til?" - -#~ msgid "Checking for Updates" -#~ msgstr "Leder efter opdateringer" - -#~ msgid "Downloading" -#~ msgstr "Downloader" - -#~ msgid "Invalid PIN code" -#~ msgstr "Forkert PIN-kode" - -#~ msgid "Parental Control disabled" -#~ msgstr "Børnelåsen er slået fra" - -#~ msgid "The wad file was installed. But It could not be deleted from the SD card." -#~ msgstr "WAD-filen blev installeret. Den kunne ikke slettes fra SD-kortet." - -#~ msgid "The wad installation failed with error %ld" -#~ msgstr "WAD-installationen mislykkedes med fejl %ld" - -#~ msgid "Unable to open the wad that was just downloaded (%s)." -#~ msgstr "Ikke i stand til at åbne den WAD, der blev downloadet (%s)." - -#~ msgid "Unlock Parental Control" -#~ msgstr "Lås børnelåsen op" - -#~ msgid "Update to" -#~ msgstr "Opdatér til" - -#~ msgid "Updating" -#~ msgstr "Opdaterer..." - -#~ msgid "Updating Language Files..." -#~ msgstr "Opdaterer sprogfiler..." - -#~ msgid "Updating WiiTDB.zip" -#~ msgstr "Opdaterer WiiTDB.zip" - -#~ msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." -#~ msgstr "Børnelåsen er ikke slået til. Hvis børnelåsen skal bruges, skal den slås til i Wiiens indstillinger." - -#~ msgid "%s : %s May not boot correctly if your System Menu is not up to date." -#~ msgstr "%s : %s booter måske ikke korrekt, hvis system menuen ikke er opdateret." - -#~ msgid "BCA Codes Path changed" -#~ msgstr "Sti til BCA koder ændret" - -#~ msgid "Back to Wii Menu" -#~ msgstr "Tilbage til HBC" - -#~ msgid "Channels" -#~ msgstr "Kanaler" - -#~ msgid "Checking existing artwork" -#~ msgstr "Kontrollerer eksisterende billeder" - -#~ msgid "Confirm" -#~ msgstr "Bekræft" - -#~ msgid "Could not find a WBFS partition." -#~ msgstr "Kunne ikke finde en WBFS-partition." - -#~ msgid "Could not open WBFS partition" -#~ msgstr "Kunne ikke åbne WBFS-partition" - -#~ msgid "Could not read the disc." -#~ msgstr "Kunne ikke læse DVD." - -#~ msgid "Could not set USB." -#~ msgstr "Kunne ikke sætte USB." - -#~ msgid "Cover Path Changed" -#~ msgstr "Sti til covers ændret" - -#~ msgid "DOL path changed" -#~ msgstr "Sti til DOL ændret" - -#~ msgid "Disc Path Changed" -#~ msgstr "Sti til DVD-billeder" - -#~ msgid "Display favorites" -#~ msgstr "Vis favoritter" - -#~ msgid "Do you want to retry for 30 secs?" -#~ msgstr "Forsøg igen (i 30 sek.)?" - -#~ msgid "Enable Parental Control" -#~ msgstr "Slå børnelåsen til" - -#~ msgid "Force" -#~ msgstr "Tving" - -#~ msgid "GCT Cheatcodes Path changed" -#~ msgstr "Sti til cheatcodes ændret" - -#~ msgid "Homebrew Appspath changed" -#~ msgstr "Sti til homebrew-programmer ændret" - -#~ msgid "Insert an SD-Card to download images." -#~ msgstr "Indsæt et SD-kort for at downloade billeder." - -#~ msgid "Install not possible" -#~ msgstr "Kan ikke installere" - -#~ msgid "Most likely it has dimensions that are not evenly divisible by 4." -#~ msgstr "Sandsynligvis har det dimensioner, der ikke er delelige med fire." - -#~ msgid "Network init error" -#~ msgstr "Netforbindelsen kunne ikke intialiseres" - -#~ msgid "No .dol or .elf files found." -#~ msgstr "Der blev ikke fundet nogle .dol- eller .elf-filer." - -#~ msgid "No Favorites" -#~ msgstr "Ingen favoritter" - -#~ msgid "No USB Device" -#~ msgstr "Ingen USB-enhed tilsluttet" - -#~ msgid "No USB Device found." -#~ msgstr "Ingen USB-enhed fundet." - -#~ msgid "No WBFS or FAT/NTFS partition found" -#~ msgstr "Der blev ikke fundet en WBFS- eller FAT/NTFS-partition" - -#~ msgid "Normal Covers" -#~ msgstr "Normale Covers" - -#~ msgid "Not Found" -#~ msgstr "Ikke fundet" - -#~ msgid "Not a DOL/ELF file." -#~ msgstr "Ikke en DOL/ELF-fil." - -#~ msgid "Reset to standard BGM?" -#~ msgstr "Nulstil til standard-BGM" - -#~ msgid "Save Failed" -#~ msgstr "Gem mislykkedes" - -#~ msgid "Selected DOL" -#~ msgstr "Valgt DOL" - -#~ msgid "TXT Cheatcodes Path changed" -#~ msgstr "Sti til TXTCheatcodes ændret" - -#~ msgid "Theme Download Path changed" -#~ msgstr "Sti til download af temaer ændret" - -#~ msgid "Theme Path Changed" -#~ msgstr "Sti til temaer ændret" - -#~ msgid "USB Loader GX will only run with Hermes CIOS rev 4! Please make sure you have revision 4 installed!" -#~ msgstr "USB Loader GX fungerer kun med Hermes CIOS rev 4! Kontrollér, at revision 4 er installeret!" - -#~ msgid "Update Path changed." -#~ msgstr "Sti til opdateringer ændret." - -#~ msgid "WIP Patches Path changed" -#~ msgstr "Sti til WIP patches ændret" - -#~ msgid "WiiTDB Path changed." -#~ msgstr "Sti til WiiTDB ændret" - -#~ msgid "You are about to delete " -#~ msgstr "Du er ved at slette " - -#~ 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." - -#~ msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible." -#~ msgstr "Der bruges et NTFS filsystem. Da der kan forekomme skrivefejl på NTFS-partitioner, kan der ikke installeres spil." - -#~ msgid "You have attempted to load a bad image" -#~ msgstr "Du har forsøgt at indlæse et dårligt billede" - -#~ msgid "does not exist! You Messed something up, Idiot." -#~ msgstr "eksisterer ikke!" - -#~ msgid "file left" -#~ msgstr "fil tilbage" diff --git a/Languages/dutch.lang b/Languages/dutch.lang deleted file mode 100644 index e3b4998c..00000000 --- a/Languages/dutch.lang +++ /dev/null @@ -1,1854 +0,0 @@ -# USB Loader GX language source file. -# dutch.lang - r1068 -# don't delete/change this line (é). -msgid "" -msgstr "" -"Project-Id-Version: USB Loader GX\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-06 19:36+0100\n" -"PO-Revision-Date: 2011-02-07 08:11+0100\n" -"Last-Translator: glowy\n" -"Language-Team: tj_cool, glowy\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -msgid " Wad Saved as:" -msgstr " Wad opgeslagen als:" - -msgid " could not be downloaded." -msgstr " kon niet worden gedownload." - -msgid " has been Saved. The text has not been verified. Some of the code may not work right with each other. If you experience trouble, open the text in a real text editor for more information." -msgstr " is opgeslagen. De tekst is niet gecontroleerd. Delen van de code kunnen elkaar tegenwerken. Als je moeilijkheden ondervind, open de tekst in een echte tekstverwerker voor meer informatie." - -msgid " is not on the server." -msgstr " staat niet op de server." - -#, c-format -msgid "%i files not found on the server!" -msgstr "%i bestanden niet gevonden op de server!" - -#, c-format -msgid "%i missing files" -msgstr "%i missende bestanden" - -msgid "0 (Everyone)" -msgstr "0 (Iedereen 3+)" - -msgid "1 (Child 7+)" -msgstr "1 (Kinderen 7+)" - -msgid "1 hour" -msgstr "1 uur" - -msgid "10 min" -msgstr "" - -msgid "2 (Teen 12+)" -msgstr "2 (Tiener 12+)" - -msgid "20 min" -msgstr "" - -msgid "2D Cover Path" -msgstr "Locatie 2D hoesjes" - -msgid "3 (Mature 16+)" -msgstr "3 (Adolescenten 16+)" - -msgid "3 min" -msgstr "" - -msgid "30 min" -msgstr "" - -msgid "3D Cover Path" -msgstr "Locatie 3D hoesjes" - -msgid "3D Covers" -msgstr "3D Hoesjes" - -msgid "4 (Adults Only 18+)" -msgstr "4 (Volwassen 18+)" - -msgid "5 min" -msgstr "" - -msgid ">> Deleting tickets..." -msgstr ">> Tickets verwijderen..." - -msgid ">> Deleting tickets...ERROR! " -msgstr ">> Tickets verwijderen...FOUT! " - -msgid ">> Deleting tickets...Ok! " -msgstr ">> Tickets verwijderen...Ok! " - -msgid ">> Deleting title ...ERROR! " -msgstr ">> Titel verwijderen ...FOUT! " - -msgid ">> Deleting title ...Ok!" -msgstr ">> Titel verwijderen ...Ok!" - -msgid ">> Deleting title contents..." -msgstr ">> Titel inhoud verwijderen..." - -msgid ">> Deleting title contents...ERROR! " -msgstr ">> Titel inhoud verwijderen...FOUT! " - -msgid ">> Deleting title contents...Ok!" -msgstr ">> Titel inhoud verwijderen...Ok!" - -msgid ">> Deleting title..." -msgstr ">> Titel verwijderen..." - -msgid ">> Finishing installation..." -msgstr ">> Installatie afronden..." - -msgid ">> Installing content #" -msgstr ">> Installeren inhoud #" - -msgid ">> Installing ticket..." -msgstr ">> Ticket installeren..." - -msgid ">> Installing title..." -msgstr ">> Titel installeren..." - -msgid ">> Reading WAD data..." -msgstr ">> WAD data lezen..." - -msgid ">> Reading WAD data...ERROR! " -msgstr ">> WAD data lezen...FOUT! " - -msgid ">> Reading WAD data...Ok!" -msgstr ">> WAD data lezen...Ok!" - -msgid "AUTO" -msgstr "" - -msgid "All Partitions" -msgstr "Alle partities" - -msgid "All images downloaded successfully." -msgstr "Alle plaatjes succesvol gedownload." - -msgid "All the features of USB Loader GX are unlocked." -msgstr "Alle functies van USB Loader GX zijn vrijgegeven." - -msgid "Alternate DOL" -msgstr "Alternatieve DOL" - -msgid "Anti" -msgstr "" - -msgid "App Language" -msgstr "Applicatie Taal" - -msgid "Apply" -msgstr "Toepassen" - -msgid "Apr" -msgstr "" - -msgid "Are you sure you want to lock USB Loader GX?" -msgstr "Weet je zeker dat je USB Loader GX wilt vergrendelen" - -msgid "Are you sure you want to reset?" -msgstr "Wet je zeker dat je wilt resetten?" - -msgid "Are you sure?" -msgstr "Zeker weten?" - -msgid "Aug" -msgstr "" - -msgid "Author(s):" -msgstr "Auteur(s):" - -msgid "AutoInit Network" -msgstr "Netwerk Auto init." - -msgid "Automatic port switching is done on the fly. You need to change all custom paths to SD-Card first for this option or else it could damage a filesystem." -msgstr "Automatisch poort wisselen word zonder onderbreking gedaan. Je moet eerst alle aangepaste paden veranderen naar SD-kaart voor deze optie anders kan het je bestandssysteem beschadigen." - -msgid "BCA Codes Path" -msgstr "Locatie BCA codes" - -msgid "Back" -msgstr "Terug" - -msgid "Back to HBC or Wii Menu" -msgstr "Terug naar HBC of Wii Menu" - -msgid "Backgroundmusic" -msgstr "Achtergrondmuziek" - -msgid "Big thanks to:" -msgstr "Grote dank aan:" - -msgid "Block Cover Downloads" -msgstr "Blokkeer Downloads van Hoesjes" - -msgid "Block Custom Paths" -msgstr "Blokkeer Aangepaste Paden" - -msgid "Block Game Install" -msgstr "Blokkeer Spel Installatie" - -msgid "Block Game Settings" -msgstr "Blokkeer Spel Instellingen" - -msgid "Block GameID Change" -msgstr "Blokkeer SpelID Wijzigen" - -msgid "Block Global Settings" -msgstr "Blokkeer Globale Instellingen" - -msgid "Block Gui Settings" -msgstr "Blokkeer GUI Instellingen" - -msgid "Block HBC Menu" -msgstr "Blokkeer HBC Menu" - -msgid "Block IOS Reload" -msgstr "Stop IOS herladen" - -msgid "Block Loader Settings" -msgstr "Blokkeer Loader Instellingen" - -msgid "Block Parental Settings" -msgstr "Blokkeer Ouderlijk toezicht" - -msgid "Block Reset Settings" -msgstr "Blokkeer Reset Instellingen" - -msgid "Block Sound Settings" -msgstr "Blokkeer Geluid Instellingen" - -msgid "Block Theme Downloader" -msgstr "Blokkeer Thema Downloader" - -msgid "Block Theme Menu" -msgstr "Blokkeer Thema Menu" - -msgid "Block Title Launcher" -msgstr "Blokkeer Titel Launcher" - -msgid "Block Updates" -msgstr "Blokkeer Updates" - -msgid "Boot/Standard" -msgstr "Start/Standaard" - -msgid "Boot?" -msgstr "Start?" - -msgid "Both" -msgstr "Beide" - -msgid "Both Ports" -msgstr "Beide poorten" - -msgid "Can't be formatted" -msgstr "Kan niet geformatteerd worden" - -msgid "Can't create directory" -msgstr "Kan map niet aanmaken" - -#, c-format -msgid "Can't create path: %s" -msgstr "Kan pad niet maken: %s" - -msgid "Can't delete:" -msgstr "Kan niet verwijderen:" - -msgid "Cancel" -msgstr "Annuleren" - -msgid "Cannot write to destination." -msgstr "Kan niet naar bestemming schrijven." - -msgid "Change Play Path" -msgstr "Verander afspeel locatie" - -msgid "Cheatfile is blank" -msgstr "Cheatbestand is leeg" - -msgid "Clear" -msgstr "Wissen" - -msgid "Click to Download Covers" -msgstr "Klik om hoesjes te downloaden" - -msgid "Click to change game ID" -msgstr "Klik om het spel ID te wijzigen" - -msgid "Clock" -msgstr "Klok" - -msgid "Close" -msgstr "Sluiten" - -msgid "Code Download" -msgstr "" - -#, c-format -msgid "Coded by: %s" -msgstr "Geprogrammeerd door: %s" - -msgid "Coding:" -msgstr "Codering:" - -msgid "Connection to server timed out." -msgstr "Connectie naar de server verlopen" - -msgid "Console" -msgstr "" - -msgid "Console Default" -msgstr "Console standaard" - -msgid "Console Locked" -msgstr "Console vergrendeld" - -msgid "Console must be unlocked for this option." -msgstr "Console moet ontgrendeld zijn voor deze optie." - -msgid "Console should be unlocked to modify it." -msgstr "Console moet worden vrijgegeven om te wijzigen." - -msgid "Continue to install game?" -msgstr "Installatie spel voortzetten?" - -msgid "Controllevel" -msgstr "Controle niveau" - -msgid "Correct Password" -msgstr "Juiste Wachtwoord" - -msgid "Could not connect to the server." -msgstr "Kan geen verbinding met de server maken." - -msgid "Could not create GCT file" -msgstr "Kan GCT bestand niet aanmaken" - -#, c-format -msgid "Could not create path: %s" -msgstr "Kan pad niet maken: %s" - -msgid "Could not find info for this game in the wiitdb.xml." -msgstr "Kan geen info over dit spel vinden in de wiitdb.xml" - -msgid "Could not initialize DIP module!" -msgstr "Kan DIP module niet initialiseren!" - -msgid "Could not initialize network!" -msgstr "Kan netwerk niet initialiseren!" - -msgid "Could not open Disc" -msgstr "Kan disk niet openen" - -msgid "Could not open wiitdb.xml." -msgstr "Kan wiitdb.xml niet openen." - -msgid "Could not save." -msgstr "Kan niet opslaan." - -msgid "Cover Download" -msgstr "Download hoesjes" - -msgid "Create" -msgstr "Maak" - -msgid "Credits" -msgstr "" - -msgid "Custom Discarts" -msgstr "Aangepaste Disk Labels" - -msgid "Custom Paths" -msgstr "Bestandslocaties" - -msgid "Customs/Original" -msgstr "Aangepast/Origineel" - -msgid "DOL Path" -msgstr "Locatie DOL" - -msgid "Dec" -msgstr "" - -msgid "Default" -msgstr "Standaard" - -msgid "Default Gamesettings" -msgstr "Standaard spel instellingen" - -msgid "Default Settings" -msgstr "Standaardinstellingen" - -msgid "Delete" -msgstr "Verwijderen" - -msgid "Delete ?" -msgstr "Verwijderen ?" - -msgid "Delete Cheat GCT" -msgstr "Cheat GCT verwijderen" - -msgid "Delete Cheat TXT" -msgstr "Cheat TXT verwijderen" - -msgid "Delete Cover Artwork" -msgstr "Hoesjes verwijderen" - -msgid "Delete Disc Artwork" -msgstr "Disk labels verwijderen" - -msgid "Design:" -msgstr "Ontwerp:" - -msgid "Developed by" -msgstr "Ontwikkeld door" - -msgid "Directory does not exist!" -msgstr "Map bestaat niet!" - -msgid "Disc Artwork Download" -msgstr "Download disk labels" - -msgid "Disc Artwork Path" -msgstr "Locatie disk labels" - -msgid "Disc Default" -msgstr "Disk standaard" - -msgid "DiskFlip" -msgstr "" - -msgid "Display" -msgstr "Tonen" - -msgid "Display as a carousel" -msgstr "Carrouselweergave" - -msgid "Display as a grid" -msgstr "Rasterweergave" - -msgid "Display as a list" -msgstr "Lijstweergave" - -msgid "Display favorites only" -msgstr "Alleen favorieten weergeven" - -msgid "Do you want to apply it now?" -msgstr "Wil je dit nu toepassen?" - -msgid "Do you want to apply this theme?" -msgstr "Wil je dit thema toepassen?" - -msgid "Do you want to change language?" -msgstr "Wil je de taal wijzigen?" - -msgid "Do you want to download this theme?" -msgstr "Wil je dit thema downloaden?" - -msgid "Do you want to format:" -msgstr "Wil je formatteren:" - -msgid "Do you want to load the default theme?" -msgstr "Wil je het standaard thema laden?" - -msgid "Do you want to sync free space info sector on all FAT32 partitions?" -msgstr "Wil je de vrije ruimte informatie sector synchroniseren op alle FAT32 partities?" - -msgid "Do you wish to update/download all language files?" -msgstr "Wil je alle taalbestanden updaten/downloaden?" - -msgid "Done!" -msgstr "Klaar!" - -msgid "Download" -msgstr "" - -msgid "Download Now" -msgstr "Download nu" - -msgid "Download finished" -msgstr "Download voltooid" - -msgid "Downloading 3D Covers" -msgstr "3D hoesjes aan het downloaden" - -msgid "Downloading Flat Covers" -msgstr "Platte hoesjes aan het downloaden" - -msgid "Downloading Full HQ Covers" -msgstr "HQ volledige hoesjes downloaden" - -msgid "Downloading Full LQ Covers" -msgstr "LQ volledige hoesjes downloaden " - -msgid "Downloading custom Discarts" -msgstr "Aangepaste disc afbeeldingen downloaden" - -msgid "Downloading file..." -msgstr "Bestand downloaden..." - -msgid "Downloading image:" -msgstr "Afbeelding downloaden:" - -msgid "Downloading original Discarts" -msgstr "Originele disc afbeeldingen downloaden" - -msgid "Downloading pagelist:" -msgstr "Paginalijst downloaden:" - -msgid "Dutch" -msgstr "Nederlands" - -msgid "ERROR" -msgstr "FOUT" - -msgid "ERROR:" -msgstr "FOUT:" - -msgid "ERROR: Can't set up theme." -msgstr "FOUT: Kan thema niet instellen" - -msgid "English" -msgstr "Engels" - -msgid "Error" -msgstr "Fout" - -msgid "Error !" -msgstr "Fout !" - -msgid "Error 002 fix" -msgstr "Herstel fout 002" - -#, c-format -msgid "Error creating path: %s" -msgstr "Kan pad niet maken: %s" - -msgid "Error opening downloaded file" -msgstr "Fout bij het openen van gedownload bestand" - -msgid "Error reading Disc" -msgstr "Fout bij lezen disk" - -#, c-format -msgid "Error when downloading file: %i" -msgstr "Fout bij het downloaden van bestand: %i" - -msgid "Error while downloding file" -msgstr "Fout tijdens bestand downloaden" - -msgid "Error while opening the zip." -msgstr "Fout bij het openen van de zip." - -msgid "Error while transfering data." -msgstr "Fout bij overplaatsen van data." - -msgid "Error while updating USB Loader GX." -msgstr "Fout bij het updaten van USB Loader GX" - -msgid "Error writing the data." -msgstr "Fout bij het schrijven van de data." - -msgid "Error..." -msgstr "Fout..." - -msgid "Error:" -msgstr "Fout:" - -msgid "Exit" -msgstr "Stoppen" - -msgid "Exit to where?" -msgstr "Stoppen naar?" - -msgid "Extracting files..." -msgstr "Bestanden uitpakken..." - -msgid "Failed formating" -msgstr "Formatteren mislukt" - -msgid "Failed to extract." -msgstr "Uitpakken mislukt." - -msgid "Failed to open partition" -msgstr "Partitie openen mislukt" - -msgid "Failed updating" -msgstr "Updaten mislukt" - -msgid "Feb" -msgstr "" - -msgid "File not found." -msgstr "Bestand niet gevonden." - -#, c-format -msgid "Filesize is %i Byte." -msgstr "Bestandsgrootte is %i Byte." - -msgid "Filesize is 0 Byte." -msgstr "Bestandsgrootte is 0 Byte." - -msgid "Finishing installation... Ok!" -msgstr "Installatie afronden... Ok!" - -msgid "Flat Covers" -msgstr "Platte hoesjes" - -msgid "Flip-X" -msgstr "X omwisselen" - -msgid "Force NTSC" -msgstr "Forceer NTSC" - -msgid "Force PAL50" -msgstr "Forceer PAL50" - -msgid "Force PAL60" -msgstr "Forceer PAL60" - -msgid "Format" -msgstr "Formatteer" - -msgid "Formatting, please wait..." -msgstr "Bezig met formatteren..." - -msgid "Found missing images." -msgstr "Missende plaatje gevonden." - -msgid "Free Space" -msgstr "Vrije ruimte" - -msgid "French" -msgstr "Frans" - -msgid "Full Cover Path" -msgstr "Volledige hoesjes pad" - -msgid "Full HQ Covers" -msgstr "HQ volledige hoesjes" - -msgid "Full LQ Covers" -msgstr "LQ volledige hoesjes" - -msgid "Full Menu" -msgstr "Volledig Menu" - -msgid "Full shutdown" -msgstr "Volledig uitzetten" - -msgid "GAMEID_Gamename" -msgstr "SPELID_Spelnaam" - -msgid "GCT Cheatcodes Path" -msgstr "Locatie GCT cheatcodes" - -msgid "GCT File created" -msgstr "GCT bestand aangemaakt" - -msgid "GUI Settings" -msgstr "Menu opties" - -msgid "Game ID" -msgstr "Spel ID" - -msgid "Game IOS" -msgstr "Spel IOS" - -msgid "Game Language" -msgstr "Spel taal" - -msgid "Game Load" -msgstr "Spel opties" - -msgid "Game Lock" -msgstr "Spel vergrendelen" - -msgid "Game Only" -msgstr "Alleen Spel" - -msgid "Game Region" -msgstr "Spel Regio" - -msgid "Game Size" -msgstr "Spel grootte" - -msgid "Game Sound Mode" -msgstr "Spel geluid mode" - -msgid "Game Sound Volume" -msgstr "Spel geluid volume" - -msgid "Game Split Size" -msgstr "Spel splits grootte" - -msgid "Game is already installed:" -msgstr "Spel is al geïnstalleerd:" - -msgid "Game/Install Partition" -msgstr "Spel/Installatie partitie" - -msgid "Gamename [GAMEID]" -msgstr "Spelnaam [SPELID]" - -msgid "Games" -msgstr "Spellen" - -msgid "Genre:" -msgstr "" - -msgid "German" -msgstr "Duits" - -msgid "Global Settings" -msgstr "Globale instellingen" - -msgid "HOME Menu" -msgstr "" - -msgid "Homebrew Apps Path" -msgstr "Locatie homebrew apps" - -msgid "Homebrew Channel" -msgstr "" - -msgid "Homebrew Launcher" -msgstr "Homebrew starter" - -msgid "Hour" -msgstr "Uur" - -msgid "How do you want to update?" -msgstr "Hoe wil je updaten?" - -msgid "How to Shutdown?" -msgstr "Hoe uitzetten?" - -#, c-format -msgid "Incoming file %0.2fKB" -msgstr "Binnenkomend bestand %0.2fKB" - -#, c-format -msgid "Incoming file %0.2fMB" -msgstr "Binnenkomend bestand %0.2fMB" - -msgid "Initializing Network" -msgstr "Netwerk initialiseren" - -msgid "Insert Disk" -msgstr "Voer een disk in" - -msgid "Insert a Wii Disc!" -msgstr "Voer een Wii disk in!" - -msgid "Install" -msgstr "Installeer" - -msgid "Install Error!" -msgstr "Installatiefout!" - -msgid "Install a game" -msgstr "Spel installeren" - -msgid "Install directories" -msgstr "Installeer mappen" - -msgid "Install partitions" -msgstr "Installatie partitie" - -msgid "Installing content... Ok!" -msgstr "Installeren inhoud... Ok!" - -msgid "Installing game:" -msgstr "Bezig met installeren:" - -msgid "Installing ticket... Ok!" -msgstr "Ticket installeren... Ok!" - -msgid "Installing title... Ok!" -msgstr "Titel installeren... Ok!" - -msgid "Installing wad" -msgstr "Wad installeren" - -msgid "Issue manager /" -msgstr "" - -msgid "It seems that you have some information that will be helpful to us. Please pass this information along to the DEV team." -msgstr "Je hebt informatie gevonden die ons kan helpen. Geeft u alstublieft deze info door aan ons ontwikkelingsteam." - -msgid "Italian" -msgstr "Italiaans" - -msgid "Jan" -msgstr "" - -msgid "Japanese" -msgstr "Japans" - -msgid "July" -msgstr "Jul" - -msgid "June" -msgstr "Jun" - -msgid "Keep" -msgstr "Bijhouden" - -msgid "Keyboard" -msgstr "Toetsenbord" - -msgid "Korean" -msgstr "Koreaans" - -msgid "Language File" -msgstr "Taal bestand" - -msgid "Language change:" -msgstr "Taal wijzigen:" - -msgid "Languagefiles Path" -msgstr "Locatie Taalbestanden" - -msgid "Languagepath changed." -msgstr "Locatie taal gewijzigd." - -msgid "Left" -msgstr "Links" - -msgid "Like SysMenu" -msgstr "Als SysteemMenu" - -msgid "List on Gamelaunch" -msgstr "Lijst bij Spelstart" - -msgid "Load" -msgstr "Laad" - -msgid "Load From SD/USB" -msgstr "Laden van SD/USB" - -#, c-format -msgid "Load file from: %s ?" -msgstr "Laad bestand van %s ?" - -msgid "Load this DOL as alternate DOL?" -msgstr "Deze DOL als alt DOL gebruiken?" - -msgid "Loader Settings" -msgstr "Loader Instellingen" - -msgid "Loading standard language." -msgstr "Standaardtaal laden." - -msgid "Loading standard music." -msgstr "Standaardmuziek laden." - -msgid "Lock Console" -msgstr "Console vergrendelen" - -msgid "Lock USB Loader GX" -msgstr "Vergrendel USB Loader GX" - -msgid "Locked" -msgstr "Vergrendeld" - -msgid "Loop Directory" -msgstr "Herhaal Map" - -msgid "Loop Music" -msgstr "Herhaal Muziek" - -msgid "Loop Sound" -msgstr "Geluid herhalen" - -msgid "Main tester:" -msgstr "Hoofd tester:" - -msgid "Mar" -msgstr "Mrt" - -msgid "Mark new games" -msgstr "Markeer nieuwe spellen" - -msgid "May" -msgstr "Mei" - -msgid "Messageboard Update" -msgstr "" - -msgid "Motion+ Video" -msgstr "" - -msgid "Mount DVD drive" -msgstr "DVD Laden" - -msgid "Multiple Partitions" -msgstr "Meerdere partities" - -msgid "Music Loop Mode" -msgstr "Muziek Herhaal Mode" - -msgid "Music Volume" -msgstr "Muziekvolume" - -msgid "Neither" -msgstr "Geen" - -msgid "Network is not initiated." -msgstr "Netwerk is niet gestart." - -msgid "New Disc Detected" -msgstr "Nieuwe disk gevonden" - -msgid "Next" -msgstr "Volgende" - -msgid "No" -msgstr "Nee" - -msgid "No Cheatfile found" -msgstr "Geen cheatbestand gevonden" - -msgid "No DOL file found on disc." -msgstr "Geen DOL bestand gevonden op disk." - -msgid "No Splitting" -msgstr "Niet splitsen" - -msgid "No URL or Path specified." -msgstr "Geen URL of pad gespecificeerd." - -msgid "No WBFS or FAT/NTFS/EXT partition found" -msgstr "Geen WBFS of FAT/NTFS/EXT partitie gevonden" - -msgid "No cheats were selected" -msgstr "Geen cheats geselecteerd" - -msgid "No data could be read." -msgstr "Data kon niet gelezen worden." - -msgid "No favorites selected." -msgstr "Geen favorieten geselecteerd." - -msgid "No file missing!" -msgstr "Geen missende bestanden!" - -msgid "No new updates." -msgstr "Geen nieuwe updates." - -msgid "No themes found on the site." -msgstr "Geen thema's gevonden op de site." - -msgid "No themes found." -msgstr "Geen thema's gevonden." - -msgid "None" -msgstr "Geen" - -msgid "Normal" -msgstr "Normaal" - -msgid "Not a WAD file." -msgstr "Geen WAD bestand." - -msgid "Not a Wii Disc" -msgstr "Geen Wii disk" - -msgid "Not a valid URL" -msgstr "Geen geldige URL" - -msgid "Not a valid URL path" -msgstr "Geen geldig URL pad" - -msgid "Not a valid domain" -msgstr "Geen geldig domein" - -msgid "Not enough free memory." -msgstr "Niet genoeg vrije ruimte." - -msgid "Not enough free space!" -msgstr "Niet genoeg vrije ruimte!" - -msgid "Not enough memory." -msgstr "Onvoldoende geheugen." - -msgid "Not required" -msgstr "Niet nodig" - -msgid "Not supported format!" -msgstr "Formaat niet ondersteund!" - -msgid "Nov" -msgstr "" - -msgid "OFF" -msgstr "Uit" - -msgid "OK" -msgstr "" - -msgid "ON" -msgstr "Aan" - -msgid "Ocarina" -msgstr "" - -msgid "Oct" -msgstr "Okt" - -msgid "Official Site:" -msgstr "Officiële site:" - -msgid "Offset" -msgstr "" - -msgid "Only Game Partition" -msgstr "Alleen Spel Partitie" - -msgid "Only for Install" -msgstr "Alleen bij installeren" - -msgid "Original Discarts" -msgstr "Originele Disk Labels" - -msgid "Original/Customs" -msgstr "Origineel/Aangepast" - -msgid "Parental Control" -msgstr "Ouderlijk toezicht" - -msgid "Partition" -msgstr "Partitie" - -msgid "Password" -msgstr "Wachtwoord" - -msgid "Password Changed" -msgstr "Wachtwoord gewijzigd" - -msgid "Password has been changed" -msgstr "Wachtwoord is gewijzigd" - -msgid "Patch Country Strings" -msgstr "Regio's herstellen" - -msgid "Path Changed" -msgstr "Pad gewijzigd" - -msgid "Permission denied." -msgstr "Toegang geweigerd." - -msgid "Pick from a list" -msgstr "Kiezen van lijst" - -msgid "Play Count" -msgstr "Gespeeld" - -msgid "Play Next" -msgstr "Speel Volgende" - -msgid "Play Once" -msgstr "Speel één maal" - -msgid "Play Previous" -msgstr "Speel Vorige" - -msgid "Playing Music:" -msgstr "Speelt nu:" - -msgid "Please wait..." -msgstr "Even geduld..." - -msgid "Power off the Wii" -msgstr "Wii uitschakelen" - -msgid "Prev" -msgstr "Vorige" - -msgid "Prompts Buttons" -msgstr "Weergave knoppen" - -msgid "Published by" -msgstr "Uitgegeven door" - -msgid "Quick Boot" -msgstr "Snelle start" - -msgid "Random Directory Music" -msgstr "Willekeurige Map Muziek" - -msgid "Reading WAD data... Ok!" -msgstr "WAD data lezen... Ok!" - -msgid "Receiving file from:" -msgstr "Bestand ontvangen van:" - -msgid "Region Patch" -msgstr "Regio Patch" - -msgid "Released" -msgstr "Uitgegeven" - -msgid "Reload SD" -msgstr "SD herladen" - -msgid "Remove update" -msgstr "Verwijder update" - -msgid "Rename Game on WBFS" -msgstr "Spel hernoemen op WBFS" - -msgid "Reset" -msgstr "" - -msgid "Reset BG Music" -msgstr "Reset achtergrond muziek" - -msgid "Reset Playcounter" -msgstr "Speeltellers resetten" - -msgid "Reset to default BGM?" -msgstr "Reset naar standaard achtergrond muziek?" - -msgid "Restarting..." -msgstr "Herstarten..." - -msgid "Return" -msgstr "Terug" - -msgid "Return To" -msgstr "Terug naar" - -msgid "Return to Wii Menu" -msgstr "Terug naar Wii menu" - -msgid "Right" -msgstr "Rechts" - -msgid "Rumble" -msgstr "Trilfunctie" - -msgid "SChinese" -msgstr "SChinees" - -msgid "SFX Volume" -msgstr "Volume geluidseffecten" - -msgid "Save" -msgstr "Opslaan" - -msgid "Save Failed. No device inserted?" -msgstr "Opslaan Mislukt. Geen media aanwezig?" - -msgid "Save Game List to" -msgstr "Spellenlijst opslaan in" - -msgid "Save List" -msgstr "Save lijst" - -msgid "Saved" -msgstr "Opgeslagen" - -msgid "Screensaver" -msgstr "Schermbeveiliging" - -msgid "Select" -msgstr "Selecteer" - -msgid "Select DOL Offset" -msgstr "Selecteer DOL Offset" - -msgid "Select a DOL" -msgstr "Selecteer een DOL" - -msgid "Select a DOL from Game" -msgstr "Selecteer een DOL van Spel" - -msgid "Sept" -msgstr "Sep" - -msgid "Set Search-Filter" -msgstr "Zoekfilter instellen" - -msgid "Settings" -msgstr "Instellingen" - -msgid "Show Free Space" -msgstr "Vrije ruimte weergeven" - -msgid "Shutdown System" -msgstr "Systeem uitzetten" - -msgid "Shutdown Wii" -msgstr "Wii uitzetten" - -msgid "Sort alphabetically" -msgstr "Alfabetisch sorteren" - -msgid "Sort by number of players" -msgstr "Sorteer op aantal spelers" - -msgid "Sort by rank" -msgstr "Sorteren op rang" - -msgid "Sort order by most played" -msgstr "Sorteren op meest gespeeld" - -msgid "Sound" -msgstr "Geluid" - -msgid "Sound Settings" -msgstr "Geluids Instellingen" - -msgid "Sound+BGM" -msgstr "Geluid+Achtergrondmuziek" - -msgid "Sound+Quiet" -msgstr "Geluid+Stilte" - -msgid "Spanish" -msgstr "Spaans" - -msgid "Special thanks to:" -msgstr "Speciale dank aan:" - -msgid "Split each 2GB" -msgstr "Splits iedere 2GB" - -msgid "Split each 4GB" -msgstr "Splits iedere 4GB" - -msgid "Standby" -msgstr "" - -msgid "Success" -msgstr "Succes" - -msgid "Success:" -msgstr "Succes:" - -msgid "Successfully Saved" -msgstr "Met succes opgeslagen!" - -msgid "Successfully Updated" -msgstr "Met succes geüpdate!" - -msgid "Successfully Updated thanks to www.techjawa.com" -msgstr "Met succes geüpdate met dank aan www.techjawa.com" - -msgid "Successfully deleted:" -msgstr "Met succes verwijderd:" - -msgid "Successfully extracted theme." -msgstr "Thema succesvol uitgepakt." - -msgid "Successfully installed:" -msgstr "Met succes geïnstalleerd:" - -msgid "Sync FAT32 FS Info" -msgstr "FAT32 FS Info sync" - -msgid "Synchronizing..." -msgstr "Synchroniseren..." - -msgid "System Default" -msgstr "Systeem standaard" - -msgid "TChinese" -msgstr "Chinees Trad." - -msgid "TXT Cheatcodes Path" -msgstr "Locatie TXT cheats" - -msgid "The .them file was not found in the zip." -msgstr "Het .them bestand is niet gevonden in het zip bestand." - -msgid "The entered directory does not exist. Would you like to create it?" -msgstr "De opgegeven map bestaat niet. Wil je deze aanmaken?" - -msgid "The game installation is disabled under this IOS because of instability in usb write." -msgstr "Het installeren van spellen is uitgeschakeld met deze IOS door onstabiliteit met usb schrijven" - -msgid "The wad file was installed" -msgstr "Het wad bestand is geïnstalleerd." - -#, c-format -msgid "The wad installation failed with error %i" -msgstr "De wad installatie is mislukt met fout %i" - -msgid "Theme Downloader" -msgstr "Thema downloader" - -msgid "Theme Menu" -msgstr "Thema Menu" - -msgid "Theme Path" -msgstr "Locatie thema" - -msgid "Theme Title:" -msgstr "Thema Titel:" - -msgid "Themes by www.spiffy360.com" -msgstr "Thema's door www.spiffy360.com" - -msgid "This IOS is the BootMii ios. If you are sure it is not BootMii and you have something else installed there than ignore this warning." -msgstr "Deze IOS is de BootMii IOS. Als je zeker weet dat dit niet BootMii is en daar iets anders hebt geïnstalleerd kun je deze waarschuwing negeren." - -msgid "This IOS was not found on the titles list. If you are sure you have it installed than ignore this warning." -msgstr "Deze IOS is niet gevonden in de titel lijst. Als je zeker weet dat deze geïnstalleerd is kun je deze waarschuwing negeren." - -msgid "Time left:" -msgstr "Tijd over:" - -msgid "Title Launcher" -msgstr "Titel starter" - -msgid "Titles from WiiTDB" -msgstr "WiiTDB titels" - -msgid "Tooltips" -msgstr "Knopinfo" - -msgid "Transfer failed" -msgstr "Overdracht mislukt." - -msgid "USB Device not found" -msgstr "USB Apparaat niet gevonden" - -msgid "USB Loader GX is protected" -msgstr "USB Loader GX is vergrendeld" - -msgid "USB Port" -msgstr "USB Poort" - -msgid "USB Port changing is only supported on Hermes cIOS." -msgstr "USB Poort wisselen word alleen door Hermes cIOS ondersteund." - -msgid "Uninstall" -msgstr "Verwijderen" - -msgid "Uninstall Game" -msgstr "Spel verwijderen" - -msgid "Uninstall Menu" -msgstr "Verwijderen" - -msgid "Uninstall all" -msgstr "Verwijder alle" - -msgid "Uninstalling wad" -msgstr "Wad verwijderen" - -msgid "Unknown" -msgstr "Onbekend" - -msgid "Unlock USB Loader GX" -msgstr "Ontgrendel USB Loader GX" - -msgid "Unlocked" -msgstr "Vrijgegeven" - -msgid "Unsupported format, try to extract manually TempTheme.zip." -msgstr "Niet ondersteund formaat, probeer TempTheme.zip handmatig uit te pakken." - -msgid "Update" -msgstr "Updaten" - -msgid "Update All" -msgstr "Alles updaten" - -msgid "Update DOL" -msgstr "DOL updaten" - -msgid "Update Files" -msgstr "Updaten" - -msgid "Update Path" -msgstr "Updatelocatie" - -msgid "Update all Language Files" -msgstr "Alle taalbestanden updaten" - -msgid "Update failed" -msgstr "Update mislukt" - -msgid "Update successfull" -msgstr "Succesvol" - -msgid "Updating Language Files:" -msgstr "Taalbestanden updaten:" - -msgid "Uploaded ZIP file installed to homebrew directory." -msgstr "Geuploade ZIP is geïnstalleerd in je homebrew locatie." - -msgid "VIDTV Patch" -msgstr "VIDTV patchen" - -msgid "Version:" -msgstr "Versie:" - -#, c-format -msgid "Version: %s" -msgstr "Versie: %s" - -msgid "Video Mode" -msgstr "" - -msgid "WDM Files Path" -msgstr "Locatie WDM bestanden" - -msgid "WIP Patches Path" -msgstr "Locatie WIP patches" - -msgid "Waiting..." -msgstr "Wachten..." - -msgid "Warning:" -msgstr "Waarschuwing:" - -msgid "What do you want to update?" -msgstr "Wat wil je updaten?" - -msgid "What should be deleted for this game title:" -msgstr "Wat er verwijderd moet worden voor deze spel titel:" - -msgid "WiFi Features" -msgstr "WiFi functies" - -msgid "Widescreen Fix" -msgstr "Breedbeeld" - -msgid "Wii Menu" -msgstr "" - -msgid "Wii Settings" -msgstr "Wii instellingen" - -msgid "WiiTDB Files" -msgstr "WiiTDB bestanden" - -msgid "WiiTDB Path" -msgstr "Locatie WiiTDB" - -msgid "WiiTDB is up to date." -msgstr "" - -msgid "Wiilight" -msgstr "Wii verlichting" - -msgid "Wrong Password" -msgstr "Fout wachtwoord" - -msgid "Yes" -msgstr "Ja" - -msgid "You are currently using IOS" -msgstr "Je gebruikt op dit moment IOS" - -msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." -msgstr "Je probeert een FAT32/NTFS/EXT partitie te selecteren met cIOS 249 Rev < 18. Dit word niet ondersteund. Verder gaan is op eigen risico." - -msgid "You need to select or format a partition" -msgstr "Je moet een partitie selecteren of formatteren" - -msgid "and translators for language files updates" -msgstr "en vertalers voor taalbestand updates" - -msgid "available" -msgstr "beschikbaar" - -msgid "does not exist!" -msgstr "bestaat niet!" - -msgid "does not exist! Loading game without cheats." -msgstr "bestaat niet! Spel laden zonder cheats." - -msgid "files left" -msgstr "Bestanden resterend" - -msgid "for FAT/NTFS support" -msgstr "voor FAT/NTFS ondersteuning" - -msgid "for Ocarina" -msgstr "voor Ocarina" - -msgid "for WiiTDB and hosting covers / disc images" -msgstr "voor WiiTDB en upload afbeeldingen" - -msgid "for diverse patches" -msgstr "voor diverse correcties" - -msgid "for his awesome tool LibWiiGui" -msgstr "voor zijn geweldige tool LibWiiGui" - -msgid "for hosting the themes" -msgstr "voor het hosten van de thema's" - -msgid "for hosting the update files" -msgstr "voor het hosten van update bestanden" - -msgid "for the USB Loader source" -msgstr "voor USB Loader source" - -msgid "formatted!" -msgstr "geformatteerd!" - -msgid "free" -msgstr "vrij" - -msgid "not set" -msgstr "niet ingesteld" - -msgid "of" -msgstr "van" - -msgid "seconds left" -msgstr "seconden over" - -#~ msgid "Author:" -#~ msgstr "Auteur:" - -#~ msgid "Do you want to load this theme?" -#~ msgstr "Wil je dit thema laden?" - -#~ msgid "Loading default theme." -#~ msgstr "Standaard thema laden." - -#~ msgid "Theme path is changed." -#~ msgstr "Thema pad is gewijzigd." - -#~ msgid "Use IOS58" -#~ msgstr "Gebruik IOS58" - -#~ msgid "Custom Disc Images" -#~ msgstr "Aangepaste Disk Labels" - -#~ msgid "Download Boxart image?" -#~ msgstr "Hoesjes downloaden?" - -#~ msgid "Download Discart image?" -#~ msgstr "Disk label downloaden?" - -#~ msgid "Downloading file" -#~ msgstr "Bestand downloaden" - -#~ msgid "Missing files" -#~ msgstr "Missende bestanden" - -#~ msgid "Original Disc Images" -#~ msgstr "Originele Disk Labels" - -#~ msgid "files not found on the server!" -#~ msgstr "Bestanden niet gevonden op server!" - -#~ msgid "Disc Images" -#~ msgstr "Disk labels" - -#~ msgid "Downloading covers" -#~ msgstr "Covers downloaden" - -#~ msgid "Only Customs" -#~ msgstr "Enkel aangepast" - -#~ msgid "Only Original" -#~ msgstr "Enkel origineel" - -#~ msgid "Trying custom Discarts" -#~ msgstr "Aangepaste disc afbeeldingen proberen" - -#~ msgid "Trying original Discarts" -#~ msgstr "Origninele disc afbeeldingen proberen" - -#~ msgid "Do you really want to delete:" -#~ msgstr "Wil je echt verwijderen:" - -#~ msgid "Do you want to use the alternate DOL that is known to be correct?" -#~ msgstr "Wil je de alt DOL gebruiken waarvan is bevestigd dat deze werkt?" - -#~ msgid "0 (Locked and Unlocked Games)" -#~ msgstr "0 (Vergrendelde en Ontgrendelde spellen)" - -#~ msgid "1 (Unlocked Games Only)" -#~ msgstr "1 (Alleen ontgrendelde spellen" - -#~ msgid "BETA revisions" -#~ msgstr "BETA revisies" - -#~ msgid "Unlock console to use this option." -#~ msgstr "Console moet worden vrijgegeven." - -#~ msgid "Enabling this option on a FAT partition might slow the startup of the loader." -#~ msgstr "Het aanzetten van deze functie op een FAT partitie kan het opstarten van de lader vertragen." - -#~ msgid "Full Shutdown" -#~ msgstr "Volledig uitzetten" - -#~ msgid "GXtheme.cfg not found in any subfolder." -#~ msgstr "GXtheme.cfg in geen enkele submap gevonden." - -#~ msgid "If you don't have WiFi, press 1 to get an URL to get your WiiTDB.zip" -#~ msgstr "Als je geen WiFi hebt, druk dan op 1 om een URL voor je WiiTDB.zip te krijgen" - -#~ msgid "Paste it into your browser to get your WiiTDB.zip." -#~ msgstr "Plak het in je webbrowser om WiiTDB.zip te downloaden." - -#~ msgid "Shutdown to Idle" -#~ msgstr "Slaapstand" - -#~ msgid "Your URL has been saved in %sWiiTDB_URL.txt." -#~ msgstr "Je URL is opgeslagen in %sWiiTDB_URL.txt." - -#~ msgid "Can't create file" -#~ msgstr "Kan bestand niet aanmaken" - -#~ msgid "Connection lost..." -#~ msgstr "Verbinding verbroken..." - -#~ msgid "Download failed." -#~ msgstr "Download mislukt." - -#~ msgid "Download request failed." -#~ msgstr "Download aanvraag mislukt." - -#~ msgid "Downloading Page List:" -#~ msgstr "Download pagina lijst:" - -#~ msgid "Theme Download Path" -#~ msgstr "Thema download locatie" - -#~ msgid "Transfer failed." -#~ msgstr "Overdracht mislukt." - -#~ msgid "Unsupported format, try to extract manually." -#~ msgstr "Niet ondersteund formaat, probeer handmatig uit te pakken." - -#~ msgid "and translaters for language files updates" -#~ msgstr "en vertalers voor taalbestand updates" - -#~ msgid "Insert an SD-Card to save." -#~ msgstr "Voer een SD kaart in om op te slaan." - -#~ msgid "Insert an SD-Card to use this option." -#~ msgstr "Voer een SD kaart in om deze optie te gebruiken." - -#~ msgid "No SD-Card inserted!" -#~ msgstr "Geen SD kaart gevonden!" - -#~ msgid "Waiting for USB Device" -#~ msgstr "Wachten op USB apparaat" - -#~ msgid "Back to Loader" -#~ msgstr "Terug naar lader" - -#~ msgid "FAT: Use directories" -#~ msgstr "FAT: gebruik directories" - -#~ msgid "All partitions" -#~ msgstr "Alle partities" - -#~ msgid "Game partition" -#~ msgstr "Spel partitie" - -#~ msgid "Install 1:1 Copy" -#~ msgstr "Installeer 1:1 kopie" - -#~ msgid "An Error occured" -#~ msgstr "Er is een fout opgetreden" - -#~ msgid "Are you sure you want to enable Parent Control?" -#~ msgstr "Weet je zeker dat je ouderlijk toezicht wilt aanzetten?" - -#~ msgid "AutoPatch" -#~ msgstr "Automatisch patchen" - -#~ msgid "Checking for Updates" -#~ msgstr "Controleren op updates" - -#~ msgid "Downloading" -#~ msgstr "Downloaden" - -#~ msgid "Invalid PIN code" -#~ msgstr "Onjuiste PIN code" - -#~ msgid "Parental Control disabled" -#~ msgstr "Ouderlijk toezicht uitgeschakeld" - -#~ msgid "The wad file was installed. But It could not be deleted from the SD card." -#~ msgstr "Het wad bestand is geïnstalleerd. Maar kon niet van de SD kaart verwijderd worden." - -#~ msgid "The wad installation failed with error %ld" -#~ msgstr "De wad installatie is mislukt met fout %ld" - -#~ msgid "Unable to open the wad that was just downloaded (%s)." -#~ msgstr "Wad is gedownload maar kan niet worden geopend (%s)." - -#~ msgid "Unlock Parental Control" -#~ msgstr "Ontgrendel ouderlijk toezicht" - -#~ msgid "Update to" -#~ msgstr "Updaten naar" - -#~ msgid "Updating" -#~ msgstr "Updaten" - -#~ msgid "Updating Language Files..." -#~ msgstr "Taalbestanden updaten..." - -#~ msgid "Updating WiiTDB.zip" -#~ msgstr "WiiTDB.zip updaten" - -#~ 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." - -#~ msgid "%s : %s May not boot correctly if your System Menu is not up to date." -#~ msgstr "%s : %s Kan mogelijk niet goed opstarten als je Systeem Menu niet up to date is." - -#~ msgid "BCA Codes Path changed" -#~ msgstr "Locatie BCA codes gewijzigd" - -#~ msgid "Back to Wii Menu" -#~ msgstr "Terug naar Wii Menu" - -#~ msgid "Channels" -#~ msgstr "Kanalen" - -#~ msgid "Checking existing artwork" -#~ msgstr "Bestaande afbeeldingen controleren" - -#~ msgid "Confirm" -#~ msgstr "Bevestigen" - -#~ msgid "Could not find a WBFS partition." -#~ msgstr "Kan geen WBFS partitie vinden." - -#~ msgid "Could not open WBFS partition" -#~ msgstr "Kan WBFS partitie niet openen" - -#~ msgid "Could not read the disc." -#~ msgstr "Kan disk niet lezen." - -#~ msgid "Could not set USB." -#~ msgstr "Kan USB niet instellen." - -#~ msgid "Cover Path Changed" -#~ msgstr "Locatie hoesjes gewijzigd" - -#~ msgid "DOL path changed" -#~ msgstr "Locatie DOL gewijzigd" - -#~ msgid "Disc Path Changed" -#~ msgstr "Locatie disk labels gewijzigd" - -#~ msgid "Display favorites" -#~ msgstr "Favorieten" - -#~ msgid "Do you want to retry for 30 secs?" -#~ msgstr "Wil je 30 sec. lang opnieuw proberen?" - -#~ msgid "Enable Parental Control" -#~ msgstr "Ouderlijk toezicht inschakelen" - -#~ msgid "Force" -#~ msgstr "Forceer" - -#~ msgid "GCT Cheatcodes Path changed" -#~ msgstr "Locatie GCT cheatcodes gewijzigd" - -#~ msgid "Homebrew Appspath changed" -#~ msgstr "Locatie HB apps gewijzigd" - -#~ msgid "Insert an SD-Card to download images." -#~ msgstr "Voer een SD kaart in om afbeeldingen te downloaden." - -#~ msgid "Install not possible" -#~ msgstr "Installatie niet mogelijk" - -#~ msgid "Most likely it has dimensions that are not evenly divisible by 4." -#~ msgstr "Waarschijnlijk zijn de afmetingen niet deelbaar door 4." - -#~ msgid "Network init error" -#~ msgstr "Netwerk init. fout" - -#~ msgid "No .dol or .elf files found." -#~ msgstr "Geen .dol of .elf bestanden gevonden" - -#~ msgid "No Favorites" -#~ msgstr "Geen favorieten" - -#~ msgid "No USB Device" -#~ msgstr "Geen USB apparaat" - -#~ msgid "No USB Device found." -#~ msgstr "Geen USB apparaat gevonden." - -#~ msgid "No WBFS or FAT/NTFS partition found" -#~ msgstr "Geen WBFS of FAT/NTFS partitie gevonden" - -#~ msgid "Normal Covers" -#~ msgstr "Gewone hoesjes" - -#~ msgid "Not Found" -#~ msgstr "Niet gevonden" - -#~ msgid "Not a DOL/ELF file." -#~ msgstr "Geen DOL/ELF bestand." - -#~ msgid "Reset to standard BGM?" -#~ msgstr "Reset naar standaard achtergrond muziek?" - -#~ msgid "Save Failed" -#~ msgstr "Opslaan mislukt" - -#~ msgid "Selected DOL" -#~ msgstr "Gekozen DOL" - -#~ msgid "Standard" -#~ msgstr "Standaard" - -#~ msgid "TXT Cheatcodes Path changed" -#~ msgstr "Locatie TXT cheatcodes gewijzigd" - -#~ msgid "Theme Download Path changed" -#~ msgstr "Thema download locatie gewijzigd" - -#~ msgid "Theme Path Changed" -#~ msgstr "Locatie thema gewijzigd" - -#~ msgid "USB Loader GX will only run with Hermes CIOS rev 4! Please make sure you have revision 4 installed!" -#~ msgstr "USB Loader GX werkt alleen met Hermes cIOS rev 4! Zorg dat je revisie 4 hebt geïnstalleerd!" - -#~ msgid "Update Path changed." -#~ msgstr "Updatelocatie gewijzigd." - -#~ msgid "WIP Patches Path changed" -#~ msgstr "Locatie WIP Patches gewijzigd" - -#~ msgid "WiiTDB Path changed." -#~ msgstr "Locatie WiiTDB gewijzigd" - -#~ msgid "You are about to delete " -#~ msgstr "Je wilt nu verwijderen: " - -#~ 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." - -#~ msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible." -#~ msgstr "Je gebruikt het NTFS bestandssysteem. Door mogelijke schrijffouten naar een NTFS partitie, is een spel installeren niet mogelijk." - -#~ msgid "You have attempted to load a bad image" -#~ msgstr "Je probeerde een slechte afbeelding te laden" - -#~ msgid "does not exist! You Messed something up, Idiot." -#~ msgstr "bestaat niet! Je hebt iets fout gedaan, Idioot." - -#~ msgid "file left" -#~ msgstr "Bestand resterend" diff --git a/Languages/english.lang b/Languages/english.lang deleted file mode 100644 index 84e0a2f3..00000000 --- a/Languages/english.lang +++ /dev/null @@ -1,1515 +0,0 @@ -# USB Loader GX language source file. -# english.lang - rxxx -# don't delete/change this line (é). -msgid "" -msgstr "" -"Project-Id-Version: USB Loader GX\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-06 19:36+0100\n" -"PO-Revision-Date: 2009-10-01 01:00+0200\n" -"Last-Translator: \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -msgid " Wad Saved as:" -msgstr "" - -msgid " could not be downloaded." -msgstr "" - -msgid " has been Saved. The text has not been verified. Some of the code may not work right with each other. If you experience trouble, open the text in a real text editor for more information." -msgstr "" - -msgid " is not on the server." -msgstr "" - -#, c-format -msgid "%i files not found on the server!" -msgstr "" - -#, c-format -msgid "%i missing files" -msgstr "" - -msgid "0 (Everyone)" -msgstr "" - -msgid "1 (Child 7+)" -msgstr "" - -msgid "1 hour" -msgstr "" - -msgid "10 min" -msgstr "" - -msgid "2 (Teen 12+)" -msgstr "" - -msgid "20 min" -msgstr "" - -msgid "2D Cover Path" -msgstr "" - -msgid "3 (Mature 16+)" -msgstr "" - -msgid "3 min" -msgstr "" - -msgid "30 min" -msgstr "" - -msgid "3D Cover Path" -msgstr "" - -msgid "3D Covers" -msgstr "" - -msgid "4 (Adults Only 18+)" -msgstr "" - -msgid "5 min" -msgstr "" - -msgid ">> Deleting tickets..." -msgstr "" - -msgid ">> Deleting tickets...ERROR! " -msgstr "" - -msgid ">> Deleting tickets...Ok! " -msgstr "" - -msgid ">> Deleting title ...ERROR! " -msgstr "" - -msgid ">> Deleting title ...Ok!" -msgstr "" - -msgid ">> Deleting title contents..." -msgstr "" - -msgid ">> Deleting title contents...ERROR! " -msgstr "" - -msgid ">> Deleting title contents...Ok!" -msgstr "" - -msgid ">> Deleting title..." -msgstr "" - -msgid ">> Finishing installation..." -msgstr "" - -msgid ">> Installing content #" -msgstr "" - -msgid ">> Installing ticket..." -msgstr "" - -msgid ">> Installing title..." -msgstr "" - -msgid ">> Reading WAD data..." -msgstr "" - -msgid ">> Reading WAD data...ERROR! " -msgstr "" - -msgid ">> Reading WAD data...Ok!" -msgstr "" - -msgid "AUTO" -msgstr "" - -msgid "All Partitions" -msgstr "" - -msgid "All images downloaded successfully." -msgstr "" - -msgid "All the features of USB Loader GX are unlocked." -msgstr "" - -msgid "Alternate DOL" -msgstr "" - -msgid "Anti" -msgstr "" - -msgid "App Language" -msgstr "" - -msgid "Apply" -msgstr "" - -msgid "Apr" -msgstr "" - -msgid "Are you sure you want to lock USB Loader GX?" -msgstr "" - -msgid "Are you sure you want to reset?" -msgstr "" - -msgid "Are you sure?" -msgstr "" - -msgid "Aug" -msgstr "" - -msgid "Author(s):" -msgstr "" - -msgid "AutoInit Network" -msgstr "" - -msgid "Automatic port switching is done on the fly. You need to change all custom paths to SD-Card first for this option or else it could damage a filesystem." -msgstr "" - -msgid "BCA Codes Path" -msgstr "" - -msgid "Back" -msgstr "" - -msgid "Back to HBC or Wii Menu" -msgstr "" - -msgid "Backgroundmusic" -msgstr "" - -msgid "Big thanks to:" -msgstr "" - -msgid "Block Cover Downloads" -msgstr "" - -msgid "Block Custom Paths" -msgstr "" - -msgid "Block Game Install" -msgstr "" - -msgid "Block Game Settings" -msgstr "" - -msgid "Block GameID Change" -msgstr "" - -msgid "Block Global Settings" -msgstr "" - -msgid "Block Gui Settings" -msgstr "" - -msgid "Block HBC Menu" -msgstr "" - -msgid "Block IOS Reload" -msgstr "" - -msgid "Block Loader Settings" -msgstr "" - -msgid "Block Parental Settings" -msgstr "" - -msgid "Block Reset Settings" -msgstr "" - -msgid "Block Sound Settings" -msgstr "" - -msgid "Block Theme Downloader" -msgstr "" - -msgid "Block Theme Menu" -msgstr "" - -msgid "Block Title Launcher" -msgstr "" - -msgid "Block Updates" -msgstr "" - -msgid "Boot/Standard" -msgstr "" - -msgid "Boot?" -msgstr "" - -msgid "Both" -msgstr "" - -msgid "Both Ports" -msgstr "" - -msgid "Can't be formatted" -msgstr "" - -msgid "Can't create directory" -msgstr "" - -#, c-format -msgid "Can't create path: %s" -msgstr "" - -msgid "Can't delete:" -msgstr "" - -msgid "Cancel" -msgstr "" - -msgid "Cannot write to destination." -msgstr "" - -msgid "Change Play Path" -msgstr "" - -msgid "Cheatfile is blank" -msgstr "" - -msgid "Clear" -msgstr "" - -msgid "Click to Download Covers" -msgstr "" - -msgid "Click to change game ID" -msgstr "" - -msgid "Clock" -msgstr "" - -msgid "Close" -msgstr "" - -msgid "Code Download" -msgstr "" - -#, c-format -msgid "Coded by: %s" -msgstr "" - -msgid "Coding:" -msgstr "" - -msgid "Connection to server timed out." -msgstr "" - -msgid "Console" -msgstr "" - -msgid "Console Default" -msgstr "" - -msgid "Console Locked" -msgstr "" - -msgid "Console must be unlocked for this option." -msgstr "" - -msgid "Console should be unlocked to modify it." -msgstr "" - -msgid "Continue to install game?" -msgstr "" - -msgid "Controllevel" -msgstr "" - -msgid "Correct Password" -msgstr "" - -msgid "Could not connect to the server." -msgstr "" - -msgid "Could not create GCT file" -msgstr "" - -#, c-format -msgid "Could not create path: %s" -msgstr "" - -msgid "Could not find info for this game in the wiitdb.xml." -msgstr "" - -msgid "Could not initialize DIP module!" -msgstr "" - -msgid "Could not initialize network!" -msgstr "" - -msgid "Could not open Disc" -msgstr "" - -msgid "Could not open wiitdb.xml." -msgstr "" - -msgid "Could not save." -msgstr "" - -msgid "Cover Download" -msgstr "" - -msgid "Create" -msgstr "" - -msgid "Credits" -msgstr "" - -msgid "Custom Discarts" -msgstr "" - -msgid "Custom Paths" -msgstr "" - -msgid "Customs/Original" -msgstr "" - -msgid "DOL Path" -msgstr "" - -msgid "Dec" -msgstr "" - -msgid "Default" -msgstr "" - -msgid "Default Gamesettings" -msgstr "" - -msgid "Default Settings" -msgstr "" - -msgid "Delete" -msgstr "" - -msgid "Delete ?" -msgstr "" - -msgid "Delete Cheat GCT" -msgstr "" - -msgid "Delete Cheat TXT" -msgstr "" - -msgid "Delete Cover Artwork" -msgstr "" - -msgid "Delete Disc Artwork" -msgstr "" - -msgid "Design:" -msgstr "" - -msgid "Developed by" -msgstr "" - -msgid "Directory does not exist!" -msgstr "" - -msgid "Disc Artwork Download" -msgstr "" - -msgid "Disc Artwork Path" -msgstr "" - -msgid "Disc Default" -msgstr "" - -msgid "DiskFlip" -msgstr "" - -msgid "Display" -msgstr "" - -msgid "Display as a carousel" -msgstr "" - -msgid "Display as a grid" -msgstr "" - -msgid "Display as a list" -msgstr "" - -msgid "Display favorites only" -msgstr "" - -msgid "Do you want to apply it now?" -msgstr "" - -msgid "Do you want to apply this theme?" -msgstr "" - -msgid "Do you want to change language?" -msgstr "" - -msgid "Do you want to download this theme?" -msgstr "" - -msgid "Do you want to format:" -msgstr "" - -msgid "Do you want to load the default theme?" -msgstr "" - -msgid "Do you want to sync free space info sector on all FAT32 partitions?" -msgstr "" - -msgid "Do you wish to update/download all language files?" -msgstr "" - -msgid "Done!" -msgstr "" - -msgid "Download" -msgstr "" - -msgid "Download Now" -msgstr "" - -msgid "Download finished" -msgstr "" - -msgid "Downloading 3D Covers" -msgstr "" - -msgid "Downloading Flat Covers" -msgstr "" - -msgid "Downloading Full HQ Covers" -msgstr "" - -msgid "Downloading Full LQ Covers" -msgstr "" - -msgid "Downloading custom Discarts" -msgstr "" - -msgid "Downloading file..." -msgstr "" - -msgid "Downloading image:" -msgstr "" - -msgid "Downloading original Discarts" -msgstr "" - -msgid "Downloading pagelist:" -msgstr "" - -msgid "Dutch" -msgstr "" - -msgid "ERROR" -msgstr "" - -msgid "ERROR:" -msgstr "" - -msgid "ERROR: Can't set up theme." -msgstr "" - -msgid "English" -msgstr "" - -msgid "Error" -msgstr "" - -msgid "Error !" -msgstr "" - -msgid "Error 002 fix" -msgstr "" - -#, c-format -msgid "Error creating path: %s" -msgstr "" - -msgid "Error opening downloaded file" -msgstr "" - -msgid "Error reading Disc" -msgstr "" - -#, c-format -msgid "Error when downloading file: %i" -msgstr "" - -msgid "Error while downloding file" -msgstr "" - -msgid "Error while opening the zip." -msgstr "" - -msgid "Error while transfering data." -msgstr "" - -msgid "Error while updating USB Loader GX." -msgstr "" - -msgid "Error writing the data." -msgstr "" - -msgid "Error..." -msgstr "" - -msgid "Error:" -msgstr "" - -msgid "Exit" -msgstr "" - -msgid "Exit to where?" -msgstr "" - -msgid "Extracting files..." -msgstr "" - -msgid "Failed formating" -msgstr "" - -msgid "Failed to extract." -msgstr "" - -msgid "Failed to open partition" -msgstr "" - -msgid "Failed updating" -msgstr "" - -msgid "Feb" -msgstr "" - -msgid "File not found." -msgstr "" - -#, c-format -msgid "Filesize is %i Byte." -msgstr "" - -msgid "Filesize is 0 Byte." -msgstr "" - -msgid "Finishing installation... Ok!" -msgstr "" - -msgid "Flat Covers" -msgstr "" - -msgid "Flip-X" -msgstr "" - -msgid "Force NTSC" -msgstr "" - -msgid "Force PAL50" -msgstr "" - -msgid "Force PAL60" -msgstr "" - -msgid "Format" -msgstr "" - -msgid "Formatting, please wait..." -msgstr "" - -msgid "Found missing images." -msgstr "" - -msgid "Free Space" -msgstr "" - -msgid "French" -msgstr "" - -msgid "Full Cover Path" -msgstr "" - -msgid "Full HQ Covers" -msgstr "" - -msgid "Full LQ Covers" -msgstr "" - -msgid "Full Menu" -msgstr "" - -msgid "Full shutdown" -msgstr "" - -msgid "GAMEID_Gamename" -msgstr "" - -msgid "GCT Cheatcodes Path" -msgstr "" - -msgid "GCT File created" -msgstr "" - -msgid "GUI Settings" -msgstr "" - -msgid "Game ID" -msgstr "" - -msgid "Game IOS" -msgstr "" - -msgid "Game Language" -msgstr "" - -msgid "Game Load" -msgstr "" - -msgid "Game Lock" -msgstr "" - -msgid "Game Only" -msgstr "" - -msgid "Game Region" -msgstr "" - -msgid "Game Size" -msgstr "" - -msgid "Game Sound Mode" -msgstr "" - -msgid "Game Sound Volume" -msgstr "" - -msgid "Game Split Size" -msgstr "" - -msgid "Game is already installed:" -msgstr "" - -msgid "Game/Install Partition" -msgstr "" - -msgid "Gamename [GAMEID]" -msgstr "" - -msgid "Games" -msgstr "" - -msgid "Genre:" -msgstr "" - -msgid "German" -msgstr "" - -msgid "Global Settings" -msgstr "" - -msgid "HOME Menu" -msgstr "" - -msgid "Homebrew Apps Path" -msgstr "" - -msgid "Homebrew Channel" -msgstr "" - -msgid "Homebrew Launcher" -msgstr "" - -msgid "Hour" -msgstr "" - -msgid "How do you want to update?" -msgstr "" - -msgid "How to Shutdown?" -msgstr "" - -#, c-format -msgid "Incoming file %0.2fKB" -msgstr "" - -#, c-format -msgid "Incoming file %0.2fMB" -msgstr "" - -msgid "Initializing Network" -msgstr "" - -msgid "Insert Disk" -msgstr "" - -msgid "Insert a Wii Disc!" -msgstr "" - -msgid "Install" -msgstr "" - -msgid "Install Error!" -msgstr "" - -msgid "Install a game" -msgstr "" - -msgid "Install directories" -msgstr "" - -msgid "Install partitions" -msgstr "" - -msgid "Installing content... Ok!" -msgstr "" - -msgid "Installing game:" -msgstr "" - -msgid "Installing ticket... Ok!" -msgstr "" - -msgid "Installing title... Ok!" -msgstr "" - -msgid "Installing wad" -msgstr "" - -msgid "Issue manager /" -msgstr "" - -msgid "It seems that you have some information that will be helpful to us. Please pass this information along to the DEV team." -msgstr "" - -msgid "Italian" -msgstr "" - -msgid "Jan" -msgstr "" - -msgid "Japanese" -msgstr "" - -msgid "July" -msgstr "" - -msgid "June" -msgstr "" - -msgid "Keep" -msgstr "" - -msgid "Keyboard" -msgstr "" - -msgid "Korean" -msgstr "" - -msgid "Language File" -msgstr "" - -msgid "Language change:" -msgstr "" - -msgid "Languagefiles Path" -msgstr "" - -msgid "Languagepath changed." -msgstr "" - -msgid "Left" -msgstr "" - -msgid "Like SysMenu" -msgstr "" - -msgid "List on Gamelaunch" -msgstr "" - -msgid "Load" -msgstr "" - -msgid "Load From SD/USB" -msgstr "" - -#, c-format -msgid "Load file from: %s ?" -msgstr "" - -msgid "Load this DOL as alternate DOL?" -msgstr "" - -msgid "Loader Settings" -msgstr "" - -msgid "Loading standard language." -msgstr "" - -msgid "Loading standard music." -msgstr "" - -msgid "Lock Console" -msgstr "" - -msgid "Lock USB Loader GX" -msgstr "" - -msgid "Locked" -msgstr "" - -msgid "Loop Directory" -msgstr "" - -msgid "Loop Music" -msgstr "" - -msgid "Loop Sound" -msgstr "" - -msgid "Main tester:" -msgstr "" - -msgid "Mar" -msgstr "" - -msgid "Mark new games" -msgstr "" - -msgid "May" -msgstr "" - -msgid "Messageboard Update" -msgstr "" - -msgid "Motion+ Video" -msgstr "" - -msgid "Mount DVD drive" -msgstr "" - -msgid "Multiple Partitions" -msgstr "" - -msgid "Music Loop Mode" -msgstr "" - -msgid "Music Volume" -msgstr "" - -msgid "Neither" -msgstr "" - -msgid "Network is not initiated." -msgstr "" - -msgid "New Disc Detected" -msgstr "" - -msgid "Next" -msgstr "" - -msgid "No" -msgstr "" - -msgid "No Cheatfile found" -msgstr "" - -msgid "No DOL file found on disc." -msgstr "" - -msgid "No Splitting" -msgstr "" - -msgid "No URL or Path specified." -msgstr "" - -msgid "No WBFS or FAT/NTFS/EXT partition found" -msgstr "" - -msgid "No cheats were selected" -msgstr "" - -msgid "No data could be read." -msgstr "" - -msgid "No favorites selected." -msgstr "" - -msgid "No file missing!" -msgstr "" - -msgid "No new updates." -msgstr "" - -msgid "No themes found on the site." -msgstr "" - -msgid "No themes found." -msgstr "" - -msgid "None" -msgstr "" - -msgid "Normal" -msgstr "" - -msgid "Not a WAD file." -msgstr "" - -msgid "Not a Wii Disc" -msgstr "" - -msgid "Not a valid URL" -msgstr "" - -msgid "Not a valid URL path" -msgstr "" - -msgid "Not a valid domain" -msgstr "" - -msgid "Not enough free memory." -msgstr "" - -msgid "Not enough free space!" -msgstr "" - -msgid "Not enough memory." -msgstr "" - -msgid "Not required" -msgstr "" - -msgid "Not supported format!" -msgstr "" - -msgid "Nov" -msgstr "" - -msgid "OFF" -msgstr "" - -msgid "OK" -msgstr "" - -msgid "ON" -msgstr "" - -msgid "Ocarina" -msgstr "" - -msgid "Oct" -msgstr "" - -msgid "Official Site:" -msgstr "" - -msgid "Offset" -msgstr "" - -msgid "Only Game Partition" -msgstr "" - -msgid "Only for Install" -msgstr "" - -msgid "Original Discarts" -msgstr "" - -msgid "Original/Customs" -msgstr "" - -msgid "Parental Control" -msgstr "" - -msgid "Partition" -msgstr "" - -msgid "Password" -msgstr "" - -msgid "Password Changed" -msgstr "" - -msgid "Password has been changed" -msgstr "" - -msgid "Patch Country Strings" -msgstr "" - -msgid "Path Changed" -msgstr "" - -msgid "Permission denied." -msgstr "" - -msgid "Pick from a list" -msgstr "" - -msgid "Play Count" -msgstr "" - -msgid "Play Next" -msgstr "" - -msgid "Play Once" -msgstr "" - -msgid "Play Previous" -msgstr "" - -msgid "Playing Music:" -msgstr "" - -msgid "Please wait..." -msgstr "" - -msgid "Power off the Wii" -msgstr "" - -msgid "Prev" -msgstr "" - -msgid "Prompts Buttons" -msgstr "" - -msgid "Published by" -msgstr "" - -msgid "Quick Boot" -msgstr "" - -msgid "Random Directory Music" -msgstr "" - -msgid "Reading WAD data... Ok!" -msgstr "" - -msgid "Receiving file from:" -msgstr "" - -msgid "Region Patch" -msgstr "" - -msgid "Released" -msgstr "" - -msgid "Reload SD" -msgstr "" - -msgid "Remove update" -msgstr "" - -msgid "Rename Game on WBFS" -msgstr "" - -msgid "Reset" -msgstr "" - -msgid "Reset BG Music" -msgstr "" - -msgid "Reset Playcounter" -msgstr "" - -msgid "Reset to default BGM?" -msgstr "" - -msgid "Restarting..." -msgstr "" - -msgid "Return" -msgstr "" - -msgid "Return To" -msgstr "" - -msgid "Return to Wii Menu" -msgstr "" - -msgid "Right" -msgstr "" - -msgid "Rumble" -msgstr "" - -msgid "SChinese" -msgstr "" - -msgid "SFX Volume" -msgstr "" - -msgid "Save" -msgstr "" - -msgid "Save Failed. No device inserted?" -msgstr "" - -msgid "Save Game List to" -msgstr "" - -msgid "Save List" -msgstr "" - -msgid "Saved" -msgstr "" - -msgid "Screensaver" -msgstr "" - -msgid "Select" -msgstr "" - -msgid "Select DOL Offset" -msgstr "" - -msgid "Select a DOL" -msgstr "" - -msgid "Select a DOL from Game" -msgstr "" - -msgid "Sept" -msgstr "" - -msgid "Set Search-Filter" -msgstr "" - -msgid "Settings" -msgstr "" - -msgid "Show Free Space" -msgstr "" - -msgid "Shutdown System" -msgstr "" - -msgid "Shutdown Wii" -msgstr "" - -msgid "Sort alphabetically" -msgstr "" - -msgid "Sort by number of players" -msgstr "" - -msgid "Sort by rank" -msgstr "" - -msgid "Sort order by most played" -msgstr "" - -msgid "Sound" -msgstr "" - -msgid "Sound Settings" -msgstr "" - -msgid "Sound+BGM" -msgstr "" - -msgid "Sound+Quiet" -msgstr "" - -msgid "Spanish" -msgstr "" - -msgid "Special thanks to:" -msgstr "" - -msgid "Split each 2GB" -msgstr "" - -msgid "Split each 4GB" -msgstr "" - -msgid "Standby" -msgstr "" - -msgid "Success" -msgstr "" - -msgid "Success:" -msgstr "" - -msgid "Successfully Saved" -msgstr "" - -msgid "Successfully Updated" -msgstr "" - -msgid "Successfully Updated thanks to www.techjawa.com" -msgstr "" - -msgid "Successfully deleted:" -msgstr "" - -msgid "Successfully extracted theme." -msgstr "" - -msgid "Successfully installed:" -msgstr "" - -msgid "Sync FAT32 FS Info" -msgstr "" - -msgid "Synchronizing..." -msgstr "" - -msgid "System Default" -msgstr "" - -msgid "TChinese" -msgstr "" - -msgid "TXT Cheatcodes Path" -msgstr "" - -msgid "The .them file was not found in the zip." -msgstr "" - -msgid "The entered directory does not exist. Would you like to create it?" -msgstr "" - -msgid "The game installation is disabled under this IOS because of instability in usb write." -msgstr "" - -msgid "The wad file was installed" -msgstr "" - -#, c-format -msgid "The wad installation failed with error %i" -msgstr "" - -msgid "Theme Downloader" -msgstr "" - -msgid "Theme Menu" -msgstr "" - -msgid "Theme Path" -msgstr "" - -msgid "Theme Title:" -msgstr "" - -msgid "Themes by www.spiffy360.com" -msgstr "" - -msgid "This IOS is the BootMii ios. If you are sure it is not BootMii and you have something else installed there than ignore this warning." -msgstr "" - -msgid "This IOS was not found on the titles list. If you are sure you have it installed than ignore this warning." -msgstr "" - -msgid "Time left:" -msgstr "" - -msgid "Title Launcher" -msgstr "" - -msgid "Titles from WiiTDB" -msgstr "" - -msgid "Tooltips" -msgstr "" - -msgid "Transfer failed" -msgstr "" - -msgid "USB Device not found" -msgstr "" - -msgid "USB Loader GX is protected" -msgstr "" - -msgid "USB Port" -msgstr "" - -msgid "USB Port changing is only supported on Hermes cIOS." -msgstr "" - -msgid "Uninstall" -msgstr "" - -msgid "Uninstall Game" -msgstr "" - -msgid "Uninstall Menu" -msgstr "" - -msgid "Uninstall all" -msgstr "" - -msgid "Uninstalling wad" -msgstr "" - -msgid "Unknown" -msgstr "" - -msgid "Unlock USB Loader GX" -msgstr "" - -msgid "Unlocked" -msgstr "" - -msgid "Unsupported format, try to extract manually TempTheme.zip." -msgstr "" - -msgid "Update" -msgstr "" - -msgid "Update All" -msgstr "" - -msgid "Update DOL" -msgstr "" - -msgid "Update Files" -msgstr "" - -msgid "Update Path" -msgstr "" - -msgid "Update all Language Files" -msgstr "" - -msgid "Update failed" -msgstr "" - -msgid "Update successfull" -msgstr "" - -msgid "Updating Language Files:" -msgstr "" - -msgid "Uploaded ZIP file installed to homebrew directory." -msgstr "" - -msgid "VIDTV Patch" -msgstr "" - -msgid "Version:" -msgstr "" - -#, c-format -msgid "Version: %s" -msgstr "" - -msgid "Video Mode" -msgstr "" - -msgid "WDM Files Path" -msgstr "" - -msgid "WIP Patches Path" -msgstr "" - -msgid "Waiting..." -msgstr "" - -msgid "Warning:" -msgstr "" - -msgid "What do you want to update?" -msgstr "" - -msgid "What should be deleted for this game title:" -msgstr "" - -msgid "WiFi Features" -msgstr "" - -msgid "Widescreen Fix" -msgstr "" - -msgid "Wii Menu" -msgstr "" - -msgid "Wii Settings" -msgstr "" - -msgid "WiiTDB Files" -msgstr "" - -msgid "WiiTDB Path" -msgstr "" - -msgid "WiiTDB is up to date." -msgstr "" - -msgid "Wiilight" -msgstr "" - -msgid "Wrong Password" -msgstr "" - -msgid "Yes" -msgstr "" - -msgid "You are currently using IOS" -msgstr "" - -msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." -msgstr "" - -msgid "You need to select or format a partition" -msgstr "" - -msgid "and translators for language files updates" -msgstr "" - -msgid "available" -msgstr "" - -msgid "does not exist!" -msgstr "" - -msgid "does not exist! Loading game without cheats." -msgstr "" - -msgid "files left" -msgstr "" - -msgid "for FAT/NTFS support" -msgstr "" - -msgid "for Ocarina" -msgstr "" - -msgid "for WiiTDB and hosting covers / disc images" -msgstr "" - -msgid "for diverse patches" -msgstr "" - -msgid "for his awesome tool LibWiiGui" -msgstr "" - -msgid "for hosting the themes" -msgstr "" - -msgid "for hosting the update files" -msgstr "" - -msgid "for the USB Loader source" -msgstr "" - -msgid "formatted!" -msgstr "" - -msgid "free" -msgstr "" - -msgid "not set" -msgstr "" - -msgid "of" -msgstr "" - -msgid "seconds left" -msgstr "" diff --git a/Languages/finnish.lang b/Languages/finnish.lang deleted file mode 100644 index 4f0a4219..00000000 --- a/Languages/finnish.lang +++ /dev/null @@ -1,1719 +0,0 @@ -# USB Loader GX language source file. -# finnish.lang - r740 -# don't delete/change this line (é). -msgid "" -msgstr "" -"Project-Id-Version: USB Loader GX\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-06 19:36+0100\n" -"PO-Revision-Date: 2009-10-01 01:00+0200\n" -"Last-Translator: c64rmx\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -msgid " Wad Saved as:" -msgstr "Wad Tallennettu nimellä:" - -msgid " could not be downloaded." -msgstr "Latausta ei voitu suorittaa" - -msgid " has been Saved. The text has not been verified. Some of the code may not work right with each other. If you experience trouble, open the text in a real text editor for more information." -msgstr "" - -msgid " is not on the server." -msgstr "Tiedostoa ei löydy serveriltä" - -#, c-format -msgid "%i files not found on the server!" -msgstr "" - -#, c-format -msgid "%i missing files" -msgstr "" - -msgid "0 (Everyone)" -msgstr "0 (Kaikille)" - -msgid "1 (Child 7+)" -msgstr "1 (Lapset 7+)" - -msgid "1 hour" -msgstr " 1 tunti" - -msgid "10 min" -msgstr "" - -msgid "2 (Teen 12+)" -msgstr "2 (Teinit 12+)" - -msgid "20 min" -msgstr "" - -msgid "2D Cover Path" -msgstr "2D Kansien polku" - -msgid "3 (Mature 16+)" -msgstr "3 (Teinit 16+)" - -msgid "3 min" -msgstr "" - -msgid "30 min" -msgstr "" - -msgid "3D Cover Path" -msgstr "3D Kansien polku" - -msgid "3D Covers" -msgstr "3D Kannet" - -msgid "4 (Adults Only 18+)" -msgstr "4 (K18)" - -msgid "5 min" -msgstr "" - -msgid ">> Deleting tickets..." -msgstr ">> Tuhotaan lipukkeita..." - -msgid ">> Deleting tickets...ERROR! " -msgstr ">> Tuhotaan lipukkeita...VIRHE!" - -msgid ">> Deleting tickets...Ok! " -msgstr ">> Tuhotaan lipukkeita...Ok!" - -msgid ">> Deleting title ...ERROR! " -msgstr ">> Tuhotaan nimikettä...VIRHE!" - -msgid ">> Deleting title ...Ok!" -msgstr ">> Tuhotaan nimikettä...Ok!" - -msgid ">> Deleting title contents..." -msgstr ">> Tuhotaan nimikkeen sisältöä..." - -msgid ">> Deleting title contents...ERROR! " -msgstr ">> Tuhotaan nimikkeen sisältöä...VIRHE!" - -msgid ">> Deleting title contents...Ok!" -msgstr "Tuhotaan nimikkeen sisältöä...Ok!" - -msgid ">> Deleting title..." -msgstr ">> Tuhotaan nimikettä..." - -msgid ">> Finishing installation..." -msgstr ">> Viimeistellään asennusta..." - -msgid ">> Installing content #" -msgstr ">> Asennetaan sisältöä #" - -msgid ">> Installing ticket..." -msgstr ">> Asennetaan lipuketta..." - -msgid ">> Installing title..." -msgstr ">> Asennetaan nimikettä..." - -msgid ">> Reading WAD data..." -msgstr ">> Luetaan WAD:ia..." - -msgid ">> Reading WAD data...ERROR! " -msgstr ">> Luetaan WAD:ia...VIRHE!" - -msgid ">> Reading WAD data...Ok!" -msgstr ">> Luetaan WAD:ia...Ok!" - -msgid "AUTO" -msgstr "" - -msgid "All Partitions" -msgstr "" - -msgid "All images downloaded successfully." -msgstr "" - -msgid "All the features of USB Loader GX are unlocked." -msgstr "Kaikki asetukset on nyt käytettävissä." - -msgid "Alternate DOL" -msgstr "Vaihtoehto DOL" - -msgid "Anti" -msgstr "" - -msgid "App Language" -msgstr "Ohjelman kieli" - -msgid "Apply" -msgstr "" - -msgid "Apr" -msgstr "huhti" - -msgid "Are you sure you want to lock USB Loader GX?" -msgstr "" - -msgid "Are you sure you want to reset?" -msgstr "" - -msgid "Are you sure?" -msgstr "Oletko varma?" - -msgid "Aug" -msgstr "elo" - -msgid "Author(s):" -msgstr "" - -msgid "AutoInit Network" -msgstr "Autom. verkon käynnistys" - -msgid "Automatic port switching is done on the fly. You need to change all custom paths to SD-Card first for this option or else it could damage a filesystem." -msgstr "" - -msgid "BCA Codes Path" -msgstr "" - -msgid "Back" -msgstr "Takaisin" - -msgid "Back to HBC or Wii Menu" -msgstr "Takaisin HBC:hen tai Wii Menuun" - -msgid "Backgroundmusic" -msgstr "Taustamusiikki" - -msgid "Big thanks to:" -msgstr "Isot kiitokset:" - -msgid "Block Cover Downloads" -msgstr "" - -msgid "Block Custom Paths" -msgstr "" - -msgid "Block Game Install" -msgstr "" - -msgid "Block Game Settings" -msgstr "" - -msgid "Block GameID Change" -msgstr "" - -msgid "Block Global Settings" -msgstr "" - -msgid "Block Gui Settings" -msgstr "" - -msgid "Block HBC Menu" -msgstr "" - -msgid "Block IOS Reload" -msgstr "Blokkaa IOS:in uudelleenlataus" - -msgid "Block Loader Settings" -msgstr "" - -msgid "Block Parental Settings" -msgstr "" - -msgid "Block Reset Settings" -msgstr "" - -msgid "Block Sound Settings" -msgstr "" - -msgid "Block Theme Downloader" -msgstr "" - -msgid "Block Theme Menu" -msgstr "" - -msgid "Block Title Launcher" -msgstr "" - -msgid "Block Updates" -msgstr "" - -msgid "Boot/Standard" -msgstr "Käynnistys/Standardi" - -msgid "Boot?" -msgstr "Boottaa?" - -msgid "Both" -msgstr "Molemmat" - -msgid "Both Ports" -msgstr "" - -msgid "Can't be formatted" -msgstr "Ei voida formatoida" - -msgid "Can't create directory" -msgstr "Ei voi luoda kansiota" - -#, c-format -msgid "Can't create path: %s" -msgstr "" - -msgid "Can't delete:" -msgstr "Ei voida poistaa:" - -msgid "Cancel" -msgstr "Peruuta" - -msgid "Cannot write to destination." -msgstr "" - -msgid "Change Play Path" -msgstr "" - -msgid "Cheatfile is blank" -msgstr "Kooditiedosto tyhjä" - -msgid "Clear" -msgstr "" - -msgid "Click to Download Covers" -msgstr "Klikkaa ladataksesi kansia" - -msgid "Click to change game ID" -msgstr "Klikkaa vaihtaaksesi pelin ID" - -msgid "Clock" -msgstr "Kello" - -msgid "Close" -msgstr "Sulje" - -msgid "Code Download" -msgstr "Koodin lataus" - -#, c-format -msgid "Coded by: %s" -msgstr "Koodaus: %s" - -msgid "Coding:" -msgstr "Koodaus" - -msgid "Connection to server timed out." -msgstr "" - -msgid "Console" -msgstr "Konsoli" - -msgid "Console Default" -msgstr "Konsolin oletus" - -msgid "Console Locked" -msgstr "Konsoli lukittu" - -msgid "Console must be unlocked for this option." -msgstr "" - -msgid "Console should be unlocked to modify it." -msgstr "Avaa konsolin lukitus muokataksesi asetuksia." - -msgid "Continue to install game?" -msgstr "Jatka pelin asennusta?" - -msgid "Controllevel" -msgstr "Hallinta-aste" - -msgid "Correct Password" -msgstr "Oikea salasana" - -msgid "Could not connect to the server." -msgstr "" - -msgid "Could not create GCT file" -msgstr "GCT tiedostoa ei voitu luoda" - -#, c-format -msgid "Could not create path: %s" -msgstr "" - -msgid "Could not find info for this game in the wiitdb.xml." -msgstr "" - -msgid "Could not initialize DIP module!" -msgstr "DIP Moduulia ei voitu alustaa!" - -msgid "Could not initialize network!" -msgstr "Verkkoon ei voitu yhdistää!" - -msgid "Could not open Disc" -msgstr "Levyä ei voitu avata" - -msgid "Could not open wiitdb.xml." -msgstr "" - -msgid "Could not save." -msgstr "" - -msgid "Cover Download" -msgstr "Kansien lataus" - -msgid "Create" -msgstr "Luo" - -msgid "Credits" -msgstr "Tekijät" - -msgid "Custom Discarts" -msgstr "" - -msgid "Custom Paths" -msgstr "Omat polut" - -msgid "Customs/Original" -msgstr "Omat/Alkuperäiset" - -msgid "DOL Path" -msgstr "DOL:in polku" - -msgid "Dec" -msgstr "joulu" - -msgid "Default" -msgstr "Oletus" - -msgid "Default Gamesettings" -msgstr "Oletus peliasetukset" - -msgid "Default Settings" -msgstr "Oletusasetukset" - -msgid "Delete" -msgstr "Tuhoa" - -msgid "Delete ?" -msgstr "Tuhoa ?" - -msgid "Delete Cheat GCT" -msgstr "Tuhoa Koodi GCT" - -msgid "Delete Cheat TXT" -msgstr "Tuhoa Koodi TXT" - -msgid "Delete Cover Artwork" -msgstr "Tuhoa kannet" - -msgid "Delete Disc Artwork" -msgstr "Tuhoa levykuvat" - -msgid "Design:" -msgstr "Suunnittelu" - -msgid "Developed by" -msgstr "Kehitys" - -msgid "Directory does not exist!" -msgstr "" - -msgid "Disc Artwork Download" -msgstr "Levykuvien lataus" - -msgid "Disc Artwork Path" -msgstr "Levykuvien polku" - -msgid "Disc Default" -msgstr "Pelin oletus" - -msgid "DiskFlip" -msgstr "Levynvaihto" - -msgid "Display" -msgstr "Näyttö" - -msgid "Display as a carousel" -msgstr "Näytä karusellina" - -msgid "Display as a grid" -msgstr "Näytä taulukkona" - -msgid "Display as a list" -msgstr "Näytä listana" - -msgid "Display favorites only" -msgstr "" - -msgid "Do you want to apply it now?" -msgstr "" - -msgid "Do you want to apply this theme?" -msgstr "" - -msgid "Do you want to change language?" -msgstr "Haluatko vaihtaa kielen?" - -msgid "Do you want to download this theme?" -msgstr "" - -msgid "Do you want to format:" -msgstr "Haluatko formatoida:" - -msgid "Do you want to load the default theme?" -msgstr "" - -msgid "Do you want to sync free space info sector on all FAT32 partitions?" -msgstr "" - -msgid "Do you wish to update/download all language files?" -msgstr "Haluatko päivittää/ladata kaikki kielitiedostot?" - -msgid "Done!" -msgstr "Valmis!" - -msgid "Download" -msgstr "" - -msgid "Download Now" -msgstr "Lataa nyt" - -msgid "Download finished" -msgstr "Lataus valmistunut" - -msgid "Downloading 3D Covers" -msgstr "" - -msgid "Downloading Flat Covers" -msgstr "" - -msgid "Downloading Full HQ Covers" -msgstr "" - -msgid "Downloading Full LQ Covers" -msgstr "" - -msgid "Downloading custom Discarts" -msgstr "" - -msgid "Downloading file..." -msgstr "" - -msgid "Downloading image:" -msgstr "" - -msgid "Downloading original Discarts" -msgstr "" - -msgid "Downloading pagelist:" -msgstr "" - -msgid "Dutch" -msgstr "Hollanti" - -msgid "ERROR" -msgstr "VIRHE" - -msgid "ERROR:" -msgstr "VIRHE:" - -msgid "ERROR: Can't set up theme." -msgstr "" - -msgid "English" -msgstr "Englanti" - -msgid "Error" -msgstr "Virhe" - -msgid "Error !" -msgstr "Virhe !" - -msgid "Error 002 fix" -msgstr "Virhe 002 fix" - -#, c-format -msgid "Error creating path: %s" -msgstr "" - -msgid "Error opening downloaded file" -msgstr "" - -msgid "Error reading Disc" -msgstr "Virhe luettaessa levyä" - -#, c-format -msgid "Error when downloading file: %i" -msgstr "" - -msgid "Error while downloding file" -msgstr "" - -msgid "Error while opening the zip." -msgstr "" - -msgid "Error while transfering data." -msgstr "Virhe siirrettäessä dataa." - -msgid "Error while updating USB Loader GX." -msgstr "" - -msgid "Error writing the data." -msgstr "" - -msgid "Error..." -msgstr "Virhe..." - -msgid "Error:" -msgstr "Virhe:" - -msgid "Exit" -msgstr "" - -msgid "Exit to where?" -msgstr "" - -msgid "Extracting files..." -msgstr "" - -msgid "Failed formating" -msgstr "Formatointi ei onnistunut" - -msgid "Failed to extract." -msgstr "" - -msgid "Failed to open partition" -msgstr "Osion avaus epäonnistui" - -msgid "Failed updating" -msgstr "" - -msgid "Feb" -msgstr "helmi" - -msgid "File not found." -msgstr "Tiedostoa ei löytynyt" - -#, c-format -msgid "Filesize is %i Byte." -msgstr "" - -msgid "Filesize is 0 Byte." -msgstr "" - -msgid "Finishing installation... Ok!" -msgstr "Viimeistelee asennusta... Ok!" - -msgid "Flat Covers" -msgstr "" - -msgid "Flip-X" -msgstr "Käännä-X" - -msgid "Force NTSC" -msgstr "" - -msgid "Force PAL50" -msgstr "" - -msgid "Force PAL60" -msgstr "" - -msgid "Format" -msgstr "Formatoi" - -msgid "Formatting, please wait..." -msgstr "Formatoi, odota..." - -msgid "Found missing images." -msgstr "" - -msgid "Free Space" -msgstr "Vapaata tilaa" - -msgid "French" -msgstr "Ranska" - -msgid "Full Cover Path" -msgstr "" - -msgid "Full HQ Covers" -msgstr "" - -msgid "Full LQ Covers" -msgstr "" - -msgid "Full Menu" -msgstr "" - -msgid "Full shutdown" -msgstr "" - -msgid "GAMEID_Gamename" -msgstr "" - -msgid "GCT Cheatcodes Path" -msgstr "GCT Koodien polku" - -msgid "GCT File created" -msgstr "Gct tiedosto luotu" - -msgid "GUI Settings" -msgstr "GUI asetukset" - -msgid "Game ID" -msgstr "Peli ID" - -msgid "Game IOS" -msgstr "" - -msgid "Game Language" -msgstr "Kieli" - -msgid "Game Load" -msgstr "Pelin lataus" - -msgid "Game Lock" -msgstr "" - -msgid "Game Only" -msgstr "" - -msgid "Game Region" -msgstr "Alue" - -msgid "Game Size" -msgstr "Pelin koko" - -msgid "Game Sound Mode" -msgstr "" - -msgid "Game Sound Volume" -msgstr "" - -msgid "Game Split Size" -msgstr "" - -msgid "Game is already installed:" -msgstr "Peli on jo asennettu:" - -msgid "Game/Install Partition" -msgstr "" - -msgid "Gamename [GAMEID]" -msgstr "" - -msgid "Games" -msgstr "Pelejä" - -msgid "Genre:" -msgstr "" - -msgid "German" -msgstr "Saksa" - -msgid "Global Settings" -msgstr "" - -msgid "HOME Menu" -msgstr "" - -msgid "Homebrew Apps Path" -msgstr "Homebrew Apps polku" - -msgid "Homebrew Channel" -msgstr "" - -msgid "Homebrew Launcher" -msgstr "" - -msgid "Hour" -msgstr "Tunti" - -msgid "How do you want to update?" -msgstr "Kuinka haluat päivittää?" - -msgid "How to Shutdown?" -msgstr "Miten sammutetaan?" - -#, c-format -msgid "Incoming file %0.2fKB" -msgstr "" - -#, c-format -msgid "Incoming file %0.2fMB" -msgstr "" - -msgid "Initializing Network" -msgstr "Yhdistää verkkoon" - -msgid "Insert Disk" -msgstr "Aseta levy Wiihin" - -msgid "Insert a Wii Disc!" -msgstr "Aseta Wii-levy!" - -msgid "Install" -msgstr "Asenna" - -msgid "Install Error!" -msgstr "Asennusvirhe!" - -msgid "Install a game" -msgstr "Asenna peli" - -msgid "Install directories" -msgstr "" - -msgid "Install partitions" -msgstr "" - -msgid "Installing content... Ok!" -msgstr "Asennetaan sisältöä... Ok!" - -msgid "Installing game:" -msgstr "Asentaa peliä:" - -msgid "Installing ticket... Ok!" -msgstr "" - -msgid "Installing title... Ok!" -msgstr "" - -msgid "Installing wad" -msgstr "Asennetaan wadia" - -msgid "Issue manager /" -msgstr "" - -msgid "It seems that you have some information that will be helpful to us. Please pass this information along to the DEV team." -msgstr "Näyttää että sinulla on tietoa joka on hyödyllistä meille. Ole ystävällinen ja välitä se kehitystiimille." - -msgid "Italian" -msgstr "Italia" - -msgid "Jan" -msgstr "tammi" - -msgid "Japanese" -msgstr "Japani" - -msgid "July" -msgstr "heinä" - -msgid "June" -msgstr "kesä" - -msgid "Keep" -msgstr "Pidä" - -msgid "Keyboard" -msgstr "Näppäimistö" - -msgid "Korean" -msgstr "Korea" - -msgid "Language File" -msgstr "KieliTiedosto" - -msgid "Language change:" -msgstr "Kielen vaihto" - -msgid "Languagefiles Path" -msgstr "" - -msgid "Languagepath changed." -msgstr "Kielen polku vaihdettu" - -msgid "Left" -msgstr "Vasen" - -msgid "Like SysMenu" -msgstr "Kuin wii-menu" - -msgid "List on Gamelaunch" -msgstr "" - -msgid "Load" -msgstr "Lataa" - -msgid "Load From SD/USB" -msgstr "Lataa SD:ltä/USB:ltä" - -#, c-format -msgid "Load file from: %s ?" -msgstr "Lataa tiedosto: %s ?" - -msgid "Load this DOL as alternate DOL?" -msgstr "Lataa tämä vaihtoehtoisesti tämä dol?" - -msgid "Loader Settings" -msgstr "" - -msgid "Loading standard language." -msgstr "Ladataan standardia kieltä" - -msgid "Loading standard music." -msgstr "Ladataan standardia musiikkia" - -msgid "Lock Console" -msgstr "Lukitse konsoli" - -msgid "Lock USB Loader GX" -msgstr "" - -msgid "Locked" -msgstr "Lukittu" - -msgid "Loop Directory" -msgstr "" - -msgid "Loop Music" -msgstr "" - -msgid "Loop Sound" -msgstr "" - -msgid "Main tester:" -msgstr "" - -msgid "Mar" -msgstr "maalis" - -msgid "Mark new games" -msgstr "" - -msgid "May" -msgstr "touko" - -msgid "Messageboard Update" -msgstr "" - -msgid "Motion+ Video" -msgstr "" - -msgid "Mount DVD drive" -msgstr "" - -msgid "Multiple Partitions" -msgstr "" - -msgid "Music Loop Mode" -msgstr "" - -msgid "Music Volume" -msgstr "Voimakkuus" - -msgid "Neither" -msgstr "Ei kumpikaan" - -msgid "Network is not initiated." -msgstr "" - -msgid "New Disc Detected" -msgstr "" - -msgid "Next" -msgstr "Seuraava" - -msgid "No" -msgstr "Ei" - -msgid "No Cheatfile found" -msgstr "Kooditiedostoa ei löydy" - -msgid "No DOL file found on disc." -msgstr "Levyltä ei löydy dol tiedostoa" - -msgid "No Splitting" -msgstr "" - -msgid "No URL or Path specified." -msgstr "" - -msgid "No WBFS or FAT/NTFS/EXT partition found" -msgstr "" - -msgid "No cheats were selected" -msgstr "" - -msgid "No data could be read." -msgstr "Tietoa ei voitu lukea" - -msgid "No favorites selected." -msgstr "" - -msgid "No file missing!" -msgstr "Ei tiedostoja kadoksissa!" - -msgid "No new updates." -msgstr "Ei uusia päivityksiä" - -msgid "No themes found on the site." -msgstr "" - -msgid "No themes found." -msgstr "" - -msgid "None" -msgstr "" - -msgid "Normal" -msgstr "Normaali" - -msgid "Not a WAD file." -msgstr "" - -msgid "Not a Wii Disc" -msgstr "Ei Wii-levy" - -msgid "Not a valid URL" -msgstr "" - -msgid "Not a valid URL path" -msgstr "" - -msgid "Not a valid domain" -msgstr "" - -msgid "Not enough free memory." -msgstr "Ei tarpeeksi muistia." - -msgid "Not enough free space!" -msgstr "Ei tarpeeksi tilaa!" - -msgid "Not enough memory." -msgstr "" - -msgid "Not required" -msgstr "" - -msgid "Not supported format!" -msgstr "Ei tuettu formaatti!" - -msgid "Nov" -msgstr "marras" - -msgid "OFF" -msgstr "Pois" - -msgid "OK" -msgstr "" - -msgid "ON" -msgstr "Päälle" - -msgid "Ocarina" -msgstr "" - -msgid "Oct" -msgstr "loka" - -msgid "Official Site:" -msgstr "Virallinen sivusto:" - -msgid "Offset" -msgstr "" - -msgid "Only Game Partition" -msgstr "" - -msgid "Only for Install" -msgstr "Ainoastaan asennusta varten" - -msgid "Original Discarts" -msgstr "" - -msgid "Original/Customs" -msgstr "Alkuperäinen/Omatekoinen" - -msgid "Parental Control" -msgstr "Valvonta" - -msgid "Partition" -msgstr "Osio" - -msgid "Password" -msgstr "Salasana" - -msgid "Password Changed" -msgstr "Salasana muutettu" - -msgid "Password has been changed" -msgstr "Salasana on muutettu" - -msgid "Patch Country Strings" -msgstr "Patchaa maa merkkijonot" - -msgid "Path Changed" -msgstr "" - -msgid "Permission denied." -msgstr "" - -msgid "Pick from a list" -msgstr "Valitse listasta" - -msgid "Play Count" -msgstr "Pelauksen määrä" - -msgid "Play Next" -msgstr "" - -msgid "Play Once" -msgstr "" - -msgid "Play Previous" -msgstr "" - -msgid "Playing Music:" -msgstr "" - -msgid "Please wait..." -msgstr "" - -msgid "Power off the Wii" -msgstr "Sammuta Wii" - -msgid "Prev" -msgstr "Edellinen" - -msgid "Prompts Buttons" -msgstr "Napit" - -msgid "Published by" -msgstr "Julkaisu:" - -msgid "Quick Boot" -msgstr "" - -msgid "Random Directory Music" -msgstr "" - -msgid "Reading WAD data... Ok!" -msgstr "Luetaan WAD:ia... Ok!" - -msgid "Receiving file from:" -msgstr "Ladataan tiedostoa:" - -msgid "Region Patch" -msgstr "" - -msgid "Released" -msgstr "Julkaistu" - -msgid "Reload SD" -msgstr "Uudelleenlataa SD" - -msgid "Remove update" -msgstr "" - -msgid "Rename Game on WBFS" -msgstr "Uudelleennimeä peli" - -msgid "Reset" -msgstr "" - -msgid "Reset BG Music" -msgstr "" - -msgid "Reset Playcounter" -msgstr "Resetoi pelauksen määrä" - -msgid "Reset to default BGM?" -msgstr "" - -msgid "Restarting..." -msgstr "Boottaa..." - -msgid "Return" -msgstr "Palaa" - -msgid "Return To" -msgstr "" - -msgid "Return to Wii Menu" -msgstr "Palaa Wii menuun" - -msgid "Right" -msgstr "Oikea" - -msgid "Rumble" -msgstr "Värinä" - -msgid "SChinese" -msgstr "SKiina" - -msgid "SFX Volume" -msgstr "Ääniefektien voimakkuus" - -msgid "Save" -msgstr "Tallenna" - -msgid "Save Failed. No device inserted?" -msgstr "" - -msgid "Save Game List to" -msgstr "" - -msgid "Save List" -msgstr "" - -msgid "Saved" -msgstr "" - -msgid "Screensaver" -msgstr "Näytönsäästäjä" - -msgid "Select" -msgstr "" - -msgid "Select DOL Offset" -msgstr "" - -msgid "Select a DOL" -msgstr "Valitse DOL" - -msgid "Select a DOL from Game" -msgstr "" - -msgid "Sept" -msgstr "syys" - -msgid "Set Search-Filter" -msgstr "" - -msgid "Settings" -msgstr "Asetukset" - -msgid "Show Free Space" -msgstr "" - -msgid "Shutdown System" -msgstr "Sammuta järjestelmä" - -msgid "Shutdown Wii" -msgstr "" - -msgid "Sort alphabetically" -msgstr "Järjestä aakkosittain" - -msgid "Sort by number of players" -msgstr "" - -msgid "Sort by rank" -msgstr "" - -msgid "Sort order by most played" -msgstr "Aseta 'pelattu eniten' järjestykseen" - -msgid "Sound" -msgstr "Ääni" - -msgid "Sound Settings" -msgstr "" - -msgid "Sound+BGM" -msgstr "" - -msgid "Sound+Quiet" -msgstr "" - -msgid "Spanish" -msgstr "Espanja" - -msgid "Special thanks to:" -msgstr "Erityiskiitokset" - -msgid "Split each 2GB" -msgstr "" - -msgid "Split each 4GB" -msgstr "" - -msgid "Standby" -msgstr "" - -msgid "Success" -msgstr "Onnistui" - -msgid "Success:" -msgstr "Onnistui:" - -msgid "Successfully Saved" -msgstr "Tallennettu onnistuneesti" - -msgid "Successfully Updated" -msgstr "Päivitetty onnistuneesti" - -msgid "Successfully Updated thanks to www.techjawa.com" -msgstr "" - -msgid "Successfully deleted:" -msgstr "Poistettu onnistuneesti:" - -msgid "Successfully extracted theme." -msgstr "" - -msgid "Successfully installed:" -msgstr "Asennettu onnistuneesti:" - -msgid "Sync FAT32 FS Info" -msgstr "" - -msgid "Synchronizing..." -msgstr "" - -msgid "System Default" -msgstr "Wiin oletus" - -msgid "TChinese" -msgstr "TKiina" - -msgid "TXT Cheatcodes Path" -msgstr "TXT koodien polku" - -msgid "The .them file was not found in the zip." -msgstr "" - -msgid "The entered directory does not exist. Would you like to create it?" -msgstr "" - -msgid "The game installation is disabled under this IOS because of instability in usb write." -msgstr "" - -msgid "The wad file was installed" -msgstr "" - -#, c-format -msgid "The wad installation failed with error %i" -msgstr "" - -msgid "Theme Downloader" -msgstr "" - -msgid "Theme Menu" -msgstr "" - -msgid "Theme Path" -msgstr "Teeman sijainti" - -msgid "Theme Title:" -msgstr "" - -msgid "Themes by www.spiffy360.com" -msgstr "" - -msgid "This IOS is the BootMii ios. If you are sure it is not BootMii and you have something else installed there than ignore this warning." -msgstr "" - -msgid "This IOS was not found on the titles list. If you are sure you have it installed than ignore this warning." -msgstr "" - -msgid "Time left:" -msgstr "Aikaa jäljellä:" - -msgid "Title Launcher" -msgstr "Nimilaukaisin" - -msgid "Titles from WiiTDB" -msgstr "Nimet WiiTDB:stä" - -msgid "Tooltips" -msgstr "Vinkit" - -msgid "Transfer failed" -msgstr "" - -msgid "USB Device not found" -msgstr "USB-laitetta ei löytynyt" - -msgid "USB Loader GX is protected" -msgstr "USB Loader GX on suojattu." - -msgid "USB Port" -msgstr "" - -msgid "USB Port changing is only supported on Hermes cIOS." -msgstr "" - -msgid "Uninstall" -msgstr "Poista" - -msgid "Uninstall Game" -msgstr "Poista peli" - -msgid "Uninstall Menu" -msgstr "Poistomenu" - -msgid "Uninstall all" -msgstr "" - -msgid "Uninstalling wad" -msgstr "Poistetaan wad:ia" - -msgid "Unknown" -msgstr "" - -msgid "Unlock USB Loader GX" -msgstr "" - -msgid "Unlocked" -msgstr "Avattu" - -msgid "Unsupported format, try to extract manually TempTheme.zip." -msgstr "" - -msgid "Update" -msgstr "Päivitä" - -msgid "Update All" -msgstr "Päivitä kaikki" - -msgid "Update DOL" -msgstr "Päivitä DOL" - -msgid "Update Files" -msgstr "Päivitä tiedostot" - -msgid "Update Path" -msgstr "Päivityspolku" - -msgid "Update all Language Files" -msgstr "Päivitä kaikki kielitiedostot" - -msgid "Update failed" -msgstr "Päivitys epäonnistui" - -msgid "Update successfull" -msgstr "" - -msgid "Updating Language Files:" -msgstr "Päivittää kielitiedostoja:" - -msgid "Uploaded ZIP file installed to homebrew directory." -msgstr "" - -msgid "VIDTV Patch" -msgstr "VIDTV korjaus" - -msgid "Version:" -msgstr "" - -#, c-format -msgid "Version: %s" -msgstr "Versio: %s" - -msgid "Video Mode" -msgstr "Videotila" - -msgid "WDM Files Path" -msgstr "" - -msgid "WIP Patches Path" -msgstr "" - -msgid "Waiting..." -msgstr "Odottaa..." - -msgid "Warning:" -msgstr "" - -msgid "What do you want to update?" -msgstr "Mitä haluat päivittää?" - -msgid "What should be deleted for this game title:" -msgstr "" - -msgid "WiFi Features" -msgstr "WiFi ominaisuudet" - -msgid "Widescreen Fix" -msgstr "Laajakuva korjaus" - -msgid "Wii Menu" -msgstr "Wii Menu" - -msgid "Wii Settings" -msgstr "Wii asetukset" - -msgid "WiiTDB Files" -msgstr "WiiTDB tiedostot" - -msgid "WiiTDB Path" -msgstr "WiiTDB polku" - -msgid "WiiTDB is up to date." -msgstr "" - -msgid "Wiilight" -msgstr "" - -msgid "Wrong Password" -msgstr "Väärä salasana" - -msgid "Yes" -msgstr "Kyllä" - -msgid "You are currently using IOS" -msgstr "" - -msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." -msgstr "" - -msgid "You need to select or format a partition" -msgstr "" - -msgid "and translators for language files updates" -msgstr "" - -msgid "available" -msgstr "Saatavilla" - -msgid "does not exist!" -msgstr "Ei löydy!" - -msgid "does not exist! Loading game without cheats." -msgstr "Ei löydy! Ladataan peli ilman koodeja." - -msgid "files left" -msgstr "Tiedostoja jäljellä" - -msgid "for FAT/NTFS support" -msgstr "" - -msgid "for Ocarina" -msgstr "" - -msgid "for WiiTDB and hosting covers / disc images" -msgstr "WiiTDB:stä ja kansien hostauksesta" - -msgid "for diverse patches" -msgstr "Erinäisistä patcheista" - -msgid "for his awesome tool LibWiiGui" -msgstr "Hänen hienosta ohjelmasta LibWiiGui" - -msgid "for hosting the themes" -msgstr "" - -msgid "for hosting the update files" -msgstr "Tiedostojen hostauksesta" - -msgid "for the USB Loader source" -msgstr "lähdekoodin julkaisemisesta" - -msgid "formatted!" -msgstr "formatoitu!" - -msgid "free" -msgstr "vapaana" - -msgid "not set" -msgstr "ei asetettu" - -msgid "of" -msgstr "josta" - -msgid "seconds left" -msgstr "sekuntia jäljellä" - -#~ msgid "Download Boxart image?" -#~ msgstr "Lataa kansikuva?" - -#~ msgid "Download Discart image?" -#~ msgstr "Lataa levykuva?" - -#~ msgid "Downloading file" -#~ msgstr "Lataa tiedostoa:" - -#~ msgid "Missing files" -#~ msgstr "tiedostoja puuttuu" - -#~ msgid "files not found on the server!" -#~ msgstr "tiedostoja ei löytynyt serveriltä!" - -#~ msgid "Disc Images" -#~ msgstr "Levykuvat" - -#~ msgid "Only Customs" -#~ msgstr "Vain omatekoiset" - -#~ msgid "Only Original" -#~ msgstr "Vain alkuperäinen" - -#~ msgid "Do you really want to delete:" -#~ msgstr "Haluatko varmasti formatoida:" - -#~ msgid "Do you want to use the alternate DOL that is known to be correct?" -#~ msgstr "Haluatko käyttää vaihtoehtoista DOL tiedostoa jonka tiedetään toimivan?" - -#~ msgid "Unlock console to use this option." -#~ msgstr "Avaa konsoli käyttääksesi tätä vaihtoehtoa" - -#~ msgid "Full Shutdown" -#~ msgstr "Täysi sammutus" - -#~ msgid "If you don't have WiFi, press 1 to get an URL to get your WiiTDB.zip" -#~ msgstr "Jos sinulla ei ole WiFi:ä, paina 1 saadaksesi URL josta voi ladata WiiTDB.zip" - -#~ msgid "Paste it into your browser to get your WiiTDB.zip." -#~ msgstr "Liitä se nettiselaimeesi saadaksesi WiiTDB.zip" - -#~ msgid "Shutdown to Idle" -#~ msgstr "Valmiustila" - -#~ msgid "Your URL has been saved in %sWiiTDB_URL.txt." -#~ msgstr "URL:si on tallennettu %WiiTDB_URL.txt." - -#~ msgid "Insert an SD-Card to save." -#~ msgstr "Aseta SD-kortti tallentaaksesi asetuksia." - -#~ msgid "Insert an SD-Card to use this option." -#~ msgstr "Aseta SD-kortti käyttääksesi tätä vaihtoehtoa" - -#~ msgid "No SD-Card inserted!" -#~ msgstr "SD-korttia ei ole asetettu wiihin!" - -#~ msgid "Waiting for USB Device" -#~ msgstr "Odottaa USB-laitetta..." - -#~ msgid "Back to Loader" -#~ msgstr "HBC" - -#~ msgid "An Error occured" -#~ msgstr "Tapahtui virhe" - -#~ msgid "Checking for Updates" -#~ msgstr "Tarkastetaan päivityksiä" - -#~ msgid "Downloading" -#~ msgstr "Lataa" - -#~ msgid "The wad file was installed. But It could not be deleted from the SD card." -#~ msgstr "Wad tiedostoa ei asennettu mutta sitä ei voitu tuhota SD-kortilta" - -#~ msgid "The wad installation failed with error %ld" -#~ msgstr "Wad asennus epäonnistui: %ld" - -#~ msgid "Unable to open the wad that was just downloaded (%s)." -#~ msgstr "Wadia (%s) jonka juuri latasit ei voitu avata." - -#~ msgid "Update to" -#~ msgstr "Päivitä:" - -#~ msgid "Updating" -#~ msgstr "Päivittää" - -#~ msgid "Updating Language Files..." -#~ msgstr "Päivittää kielitiedostoja..." - -#~ msgid "Updating WiiTDB.zip" -#~ msgstr "Päivittää WiiTDB.zip" - -#~ msgid "Back to Wii Menu" -#~ msgstr "Takaisin Wii Menuun" - -#~ msgid "Checking existing artwork" -#~ msgstr "Tutkitaan olemassa olevia kansia" - -#~ msgid "Confirm" -#~ msgstr "Varmista" - -#~ msgid "Could not find a WBFS partition." -#~ msgstr "WBFS osiota ei löytynyt." - -#~ msgid "Could not open WBFS partition" -#~ msgstr "WBFS osiota ei voitu avata" - -#~ msgid "Could not read the disc." -#~ msgstr "Levyä ei voitu lukea" - -#~ msgid "Could not set USB." -#~ msgstr "USB:tä ei voitu asettaa" - -#~ msgid "Cover Path Changed" -#~ msgstr "Kansien polku muutettu" - -#~ msgid "DOL path changed" -#~ msgstr "DOL:in polku muutettu" - -#~ msgid "Disc Path Changed" -#~ msgstr "Levykuvien polku muutettu" - -#~ msgid "Display favorites" -#~ msgstr "Näytä suosikit" - -#~ msgid "Do you want to retry for 30 secs?" -#~ msgstr "Haluatko odottaa 30 sekuntia?" - -#~ msgid "Force" -#~ msgstr "Pakota" - -#~ msgid "GCT Cheatcodes Path changed" -#~ msgstr "GCT Koodien polku muutettu" - -#~ msgid "Homebrew Appspath changed" -#~ msgstr "Homebrew Apps polku vaihdettu" - -#~ msgid "Insert an SD-Card to download images." -#~ msgstr "Aseta SD-kortti ladataksesi kansia." - -#~ msgid "Most likely it has dimensions that are not evenly divisible by 4." -#~ msgstr "Todennäköisesti sisältää ulottuvuuksia jotka eivät ole jaollisia neljällä" - -#~ msgid "Network init error" -#~ msgstr "Verkon alustusvirhe" - -#~ msgid "No .dol or .elf files found." -#~ msgstr ".dol tai .elf tiedostoja ei löydy" - -#~ msgid "No Favorites" -#~ msgstr "Ei suosikkeja" - -#~ msgid "No USB Device" -#~ msgstr "Ei USB-laitetta" - -#~ msgid "No USB Device found." -#~ msgstr "USB-laitetta ei löytynyt." - -#~ msgid "Normal Covers" -#~ msgstr "Normaalit kannet" - -#~ msgid "Not Found" -#~ msgstr "Ei löytynyt" - -#~ msgid "Not a DOL/ELF file." -#~ msgstr "Tiedosto ei ole DOL/ELF." - -#~ msgid "Save Failed" -#~ msgstr "Tallennus ei onnistunut" - -#~ msgid "Selected DOL" -#~ msgstr "Valittu DOL" - -#~ msgid "Standard" -#~ msgstr "Standardi" - -#~ msgid "TXT Cheatcodes Path changed" -#~ msgstr "TXT koodien polku muutettu" - -#~ msgid "Theme Path Changed" -#~ msgstr "Teeman sijainti muutettu" - -#~ msgid "Update Path changed." -#~ msgstr "Päivityspolku muutettu" - -#~ msgid "WiiTDB Path changed." -#~ msgstr "WiiTDB polku muutettu" - -#~ msgid "You are about to delete " -#~ msgstr "Olet tuhoamassa " - -#~ 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." - -#~ msgid "You have attempted to load a bad image" -#~ msgstr "Yritit ladata huonoa levykuvaa" - -#~ msgid "does not exist! You Messed something up, Idiot." -#~ msgstr "Ei löydy! Kusit jotain, Typerys!" - -#~ msgid "file left" -#~ msgstr "Tiedosto jäljellä" diff --git a/Languages/french.lang b/Languages/french.lang deleted file mode 100644 index 0f7f7543..00000000 --- a/Languages/french.lang +++ /dev/null @@ -1,1857 +0,0 @@ -# USB Loader GX language source file. -# French.lang for r1065 -# don't delete/change this line (é). -msgid "" -msgstr "" -"Project-Id-Version: USB Loader GX\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-06 19:36+0100\n" -"PO-Revision-Date: 2009-10-01 01:00+0200\n" -"Last-Translator: Cyan\n" -"Language-Team: Badablek, Amour, ikya & Kin8\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -msgid " Wad Saved as:" -msgstr " WAD sauvegardé sous:" - -msgid " could not be downloaded." -msgstr " ne peut pas être téléchargé." - -msgid " has been Saved. The text has not been verified. Some of the code may not work right with each other. If you experience trouble, open the text in a real text editor for more information." -msgstr " sauvegardé. Certains codes ne peuvent fonctionner conjointement. En cas de mauvais résultats, ouvrez-le avec un éditeur de texte pour obtenir plus d'informations." - -msgid " is not on the server." -msgstr " indisponible sur le serveur." - -#, c-format -msgid "%i files not found on the server!" -msgstr "%i fichier(s) introuvable(s) sur le serveur !" - -#, c-format -msgid "%i missing files" -msgstr "%i fichier(s) manquant(s)" - -msgid "0 (Everyone)" -msgstr "0 (Tous 3+)" - -msgid "1 (Child 7+)" -msgstr "1 (Enfants 7+)" - -msgid "1 hour" -msgstr "1 heure" - -msgid "10 min" -msgstr "10 min." - -msgid "2 (Teen 12+)" -msgstr "2 (Adolescents 12+)" - -msgid "20 min" -msgstr "20 min." - -msgid "2D Cover Path" -msgstr "Dossier jaquettes 2D" - -msgid "3 (Mature 16+)" -msgstr "3 (Matures 16+)" - -msgid "3 min" -msgstr "3 min." - -msgid "30 min" -msgstr "30 min." - -msgid "3D Cover Path" -msgstr "Dossier jaquettes 3D" - -msgid "3D Covers" -msgstr "Jaquettes 3D" - -msgid "4 (Adults Only 18+)" -msgstr "4 (Adultes 18+)" - -msgid "5 min" -msgstr "5 min." - -msgid ">> Deleting tickets..." -msgstr ">> Suppression tickets..." - -msgid ">> Deleting tickets...ERROR! " -msgstr ">> Suppression tickets...ERREUR!" - -msgid ">> Deleting tickets...Ok! " -msgstr ">> Suppression tickets...OK!" - -msgid ">> Deleting title ...ERROR! " -msgstr ">> Suppression titre...ERREUR!" - -msgid ">> Deleting title ...Ok!" -msgstr ">> Suppression titre...OK!" - -msgid ">> Deleting title contents..." -msgstr ">> Suppression contenus titre..." - -msgid ">> Deleting title contents...ERROR! " -msgstr ">> Suppression contenus titre...ERREUR!" - -msgid ">> Deleting title contents...Ok!" -msgstr ">> Suppression contenus titre...OK!" - -msgid ">> Deleting title..." -msgstr ">> Suppression titre..." - -msgid ">> Finishing installation..." -msgstr ">> Finalisation de l'installation..." - -msgid ">> Installing content #" -msgstr ">> Installation contenu #" - -msgid ">> Installing ticket..." -msgstr ">> Installation ticket..." - -msgid ">> Installing title..." -msgstr ">> Installation titre..." - -msgid ">> Reading WAD data..." -msgstr ">> Lecture données WAD..." - -msgid ">> Reading WAD data...ERROR! " -msgstr ">> Lecture données WAD...ERREUR!" - -msgid ">> Reading WAD data...Ok!" -msgstr ">> Lecture données WAD...OK!" - -msgid "AUTO" -msgstr "" - -msgid "All Partitions" -msgstr "Toutes les partitions" - -msgid "All images downloaded successfully." -msgstr "Images correctement téléchargées" - -msgid "All the features of USB Loader GX are unlocked." -msgstr "Toutes les fonctionnalités sont déverrouillées." - -msgid "Alternate DOL" -msgstr "DOL alternatif" - -msgid "Anti" -msgstr "" - -msgid "App Language" -msgstr "Langue d'interface" - -msgid "Apply" -msgstr "Appliquer" - -msgid "Apr" -msgstr "Avr" - -msgid "Are you sure you want to lock USB Loader GX?" -msgstr "Êtes-vous sûr de vouloir verrouiller USB loader GX ?" - -msgid "Are you sure you want to reset?" -msgstr "Voulez-vous vraiment réinitialiser ?" - -msgid "Are you sure?" -msgstr "Êtes-vous sûr ?" - -msgid "Aug" -msgstr "Août" - -msgid "Author(s):" -msgstr "Auteur(s):" - -msgid "AutoInit Network" -msgstr "AutoInit réseau" - -msgid "Automatic port switching is done on the fly. You need to change all custom paths to SD-Card first for this option or else it could damage a filesystem." -msgstr "" - -msgid "BCA Codes Path" -msgstr "Dossier codes BCA" - -msgid "Back" -msgstr "Retour" - -msgid "Back to HBC or Wii Menu" -msgstr "Retour HBC / Menu Wii" - -msgid "Backgroundmusic" -msgstr "Fond sonore" - -msgid "Big thanks to:" -msgstr "Grand merci à:" - -msgid "Block Cover Downloads" -msgstr "Bloquer Téléch. jaquettes" - -msgid "Block Custom Paths" -msgstr "Bloquer Person. dossiers" - -msgid "Block Game Install" -msgstr "Bloquer Installation jeu" - -msgid "Block Game Settings" -msgstr "Bloquer Paramètres jeu" - -msgid "Block GameID Change" -msgstr "Bloquer Modif. IDJEU" - -msgid "Block Global Settings" -msgstr "Bloquer Paramètres" - -msgid "Block Gui Settings" -msgstr "Bloquer Config. GUI" - -msgid "Block HBC Menu" -msgstr "Bloquer Menu HBC" - -msgid "Block IOS Reload" -msgstr "Bloquer IOS reload" - -msgid "Block Loader Settings" -msgstr "Bloquer Param. du Loader" - -msgid "Block Parental Settings" -msgstr "Bloquer Contrôle parental" - -msgid "Block Reset Settings" -msgstr "Bloquer Réinit. paramètres" - -msgid "Block Sound Settings" -msgstr "Bloquer Sons" - -msgid "Block Theme Downloader" -msgstr "Bloquer Télech. thèmes" - -msgid "Block Theme Menu" -msgstr "Bloquer Thèmes" - -msgid "Block Title Launcher" -msgstr "Bloquer Menu Chaînes" - -msgid "Block Updates" -msgstr "Bloquer Mise à jour" - -msgid "Boot/Standard" -msgstr "IOS par défaut" - -msgid "Boot?" -msgstr "Lancer ?" - -msgid "Both" -msgstr "Les deux" - -msgid "Both Ports" -msgstr "" - -msgid "Can't be formatted" -msgstr "Formatage impossible" - -msgid "Can't create directory" -msgstr "Création du répertoire impossible" - -#, c-format -msgid "Can't create path: %s" -msgstr "Impossible de créer: %s" - -msgid "Can't delete:" -msgstr "Impossible de supprimer:" - -msgid "Cancel" -msgstr "Annuler" - -msgid "Cannot write to destination." -msgstr "Écriture impossible." - -msgid "Change Play Path" -msgstr "Changer dossier" - -msgid "Cheatfile is blank" -msgstr "Fichier de triches vide" - -msgid "Clear" -msgstr "Effacer" - -msgid "Click to Download Covers" -msgstr "Téléchargement des jaquettes" - -msgid "Click to change game ID" -msgstr "Changer l'ID du jeu" - -msgid "Clock" -msgstr "Horloge" - -msgid "Close" -msgstr "Fermer" - -msgid "Code Download" -msgstr "Téléchargement des codes" - -#, c-format -msgid "Coded by: %s" -msgstr "Développé par: %s" - -msgid "Coding:" -msgstr "Développement:" - -msgid "Connection to server timed out." -msgstr "Temps limite de connexion au serveur dépassé." - -msgid "Console" -msgstr "" - -msgid "Console Default" -msgstr "Console par défaut" - -msgid "Console Locked" -msgstr "Console verrouillée" - -msgid "Console must be unlocked for this option." -msgstr "La console doit être déverrouillée." - -msgid "Console should be unlocked to modify it." -msgstr "La console doit être déverrouillée." - -msgid "Continue to install game?" -msgstr "Continuer l'installation ?" - -msgid "Controllevel" -msgstr "Niveau moral" - -msgid "Correct Password" -msgstr "Mot de passe correct" - -msgid "Could not connect to the server." -msgstr "Connexion au serveur impossible" - -msgid "Could not create GCT file" -msgstr "Impossible de créer le fichier GCT" - -#, c-format -msgid "Could not create path: %s" -msgstr "Impossible de créer: %s" - -msgid "Could not find info for this game in the wiitdb.xml." -msgstr "Pas d'information pour ce jeu dans wiitdb.xml." - -msgid "Could not initialize DIP module!" -msgstr "Initialisation du module DIP impossible !" - -msgid "Could not initialize network!" -msgstr "Initialisation réseau impossible !" - -msgid "Could not open Disc" -msgstr "Ouverture DVD impossible" - -msgid "Could not open wiitdb.xml." -msgstr "Impossible d'ouvrir wiitdb.xml." - -msgid "Could not save." -msgstr "Sauvegarde impossible." - -msgid "Cover Download" -msgstr "Téléchargement des jaquettes" - -msgid "Create" -msgstr "Créer" - -msgid "Credits" -msgstr "Crédits" - -msgid "Custom Discarts" -msgstr "Labels DVD persos" - -msgid "Custom Paths" -msgstr "Personnalisation des dossiers" - -msgid "Customs/Original" -msgstr "Persos/Originaux" - -msgid "DOL Path" -msgstr "Dossier DOL alternatif" - -msgid "Dec" -msgstr "Déc" - -msgid "Default" -msgstr "Par défaut" - -msgid "Default Gamesettings" -msgstr "Réinitialiser les paramètres du jeu" - -msgid "Default Settings" -msgstr "Réinitialiser les paramètres" - -msgid "Delete" -msgstr "Supprimer" - -msgid "Delete ?" -msgstr "Supprimer ?" - -msgid "Delete Cheat GCT" -msgstr "Supprimer GCT de triches" - -msgid "Delete Cheat TXT" -msgstr "Supprimer TXT de triches" - -msgid "Delete Cover Artwork" -msgstr "Supprimer la jaquette" - -msgid "Delete Disc Artwork" -msgstr "Supprimer le label DVD" - -msgid "Design:" -msgstr "Graphisme:" - -msgid "Developed by" -msgstr "Développé par" - -msgid "Directory does not exist!" -msgstr "Répertoire inexistant!" - -msgid "Disc Artwork Download" -msgstr "Téléch. des labels DVD" - -msgid "Disc Artwork Path" -msgstr "Dossier labels DVD" - -msgid "Disc Default" -msgstr "Disque par défaut" - -msgid "DiskFlip" -msgstr "Inversion disque" - -msgid "Display" -msgstr "Affichage" - -msgid "Display as a carousel" -msgstr "Carrousel" - -msgid "Display as a grid" -msgstr "Grille" - -msgid "Display as a list" -msgstr "Liste" - -msgid "Display favorites only" -msgstr "Seulement les favoris" - -msgid "Do you want to apply it now?" -msgstr "L'appliquer maintenant ?" - -msgid "Do you want to apply this theme?" -msgstr "Voulez-vous appliquer ce thème ?" - -msgid "Do you want to change language?" -msgstr "Changer de langue ?" - -msgid "Do you want to download this theme?" -msgstr "Voulez-vous télécharger ce thème ?" - -msgid "Do you want to format:" -msgstr "Voulez-vous formater:" - -msgid "Do you want to load the default theme?" -msgstr "Voulez-vous charger le thème par défaut ?" - -msgid "Do you want to sync free space info sector on all FAT32 partitions?" -msgstr "Voulez-vous synchroniser l'information d'espace libre disponible sur toutes les partitions FAT32 ?" - -msgid "Do you wish to update/download all language files?" -msgstr "Voulez-vous actualiser/télécharger tous les fichiers langue ?" - -msgid "Done!" -msgstr "Terminé!" - -msgid "Download" -msgstr "Télécharger" - -msgid "Download Now" -msgstr "Télécharger" - -msgid "Download finished" -msgstr "Téléchargement terminé" - -msgid "Downloading 3D Covers" -msgstr "Téléchargement des jaquettes 3D" - -msgid "Downloading Flat Covers" -msgstr "Téléchargement des jaquettes 2D" - -msgid "Downloading Full HQ Covers" -msgstr "Téléch. des jaquettes complètes HD" - -msgid "Downloading Full LQ Covers" -msgstr "Téléch. des jaquettes complètes SD" - -msgid "Downloading custom Discarts" -msgstr "Téléch. des labels DVD persos" - -msgid "Downloading file..." -msgstr "Téléchargement du fichier..." - -msgid "Downloading image:" -msgstr "Téléchargement de l'image:" - -msgid "Downloading original Discarts" -msgstr "Téléch. des labels DVD originaux" - -msgid "Downloading pagelist:" -msgstr "Téléchargement de la liste:" - -msgid "Dutch" -msgstr "Néerlandais" - -msgid "ERROR" -msgstr "ERREUR" - -msgid "ERROR:" -msgstr "ERREUR:" - -msgid "ERROR: Can't set up theme." -msgstr "ERREUR: Configuration thème impossible." - -msgid "English" -msgstr "Anglais" - -msgid "Error" -msgstr "Erreur" - -msgid "Error !" -msgstr "Erreur !" - -msgid "Error 002 fix" -msgstr "Correctif Erreur 002" - -#, c-format -msgid "Error creating path: %s" -msgstr "Erreur lors de la création du chemin: %s" - -msgid "Error opening downloaded file" -msgstr "Erreur à l'ouverure du fichier téléchargé" - -msgid "Error reading Disc" -msgstr "Erreur à la lecture du disque" - -#, c-format -msgid "Error when downloading file: %i" -msgstr "Erreur lors du téléchargement de: %i" - -msgid "Error while downloding file" -msgstr "Erreur lors du téléchargement du fichier" - -msgid "Error while opening the zip." -msgstr "Erreur à l'ouverture du fichier zip." - -msgid "Error while transfering data." -msgstr "Erreur durant le transfert de données." - -msgid "Error while updating USB Loader GX." -msgstr "Erreur lors de la MàJ de USB Loader GX." - -msgid "Error writing the data." -msgstr "Erreur d'écriture des données" - -msgid "Error..." -msgstr "Erreur..." - -msgid "Error:" -msgstr "Erreur:" - -msgid "Exit" -msgstr "Quitter" - -msgid "Exit to where?" -msgstr "Quitter vers où ?" - -msgid "Extracting files..." -msgstr "Extraction des fichiers..." - -msgid "Failed formating" -msgstr "Échec du formatage" - -msgid "Failed to extract." -msgstr "Échec de l'extraction" - -msgid "Failed to open partition" -msgstr "Échec accès partition" - -msgid "Failed updating" -msgstr "Échec de la mise à jour" - -msgid "Feb" -msgstr "Fév" - -msgid "File not found." -msgstr "Fichier introuvable." - -#, c-format -msgid "Filesize is %i Byte." -msgstr "Taille du ficher: %i Octets." - -msgid "Filesize is 0 Byte." -msgstr "Fichier de taille 0 Octet." - -msgid "Finishing installation... Ok!" -msgstr "Finalisation de l'installation... OK!" - -msgid "Flat Covers" -msgstr "Jaquettes 2D" - -msgid "Flip-X" -msgstr "Inversion-X" - -msgid "Force NTSC" -msgstr "Forcer NTSC" - -msgid "Force PAL50" -msgstr "Forcer PAL50" - -msgid "Force PAL60" -msgstr "Forcer PAL60" - -msgid "Format" -msgstr "Formater" - -msgid "Formatting, please wait..." -msgstr "Formatage en cours, veuillez patienter..." - -msgid "Found missing images." -msgstr "Images manquantes trouvées." - -msgid "Free Space" -msgstr "Espace libre" - -msgid "French" -msgstr "Français" - -msgid "Full Cover Path" -msgstr "Dossier jaqu. complètes" - -msgid "Full HQ Covers" -msgstr "Jaqu. complètes HD" - -msgid "Full LQ Covers" -msgstr "Jaqu. complètes SD" - -msgid "Full Menu" -msgstr "Menu complet" - -msgid "Full shutdown" -msgstr "Éteindre" - -msgid "GAMEID_Gamename" -msgstr "IDJEU_NomJeu" - -msgid "GCT Cheatcodes Path" -msgstr "Dossier GCT de triches" - -msgid "GCT File created" -msgstr "Fichier GCT créé" - -msgid "GUI Settings" -msgstr "Configuration GUI" - -msgid "Game ID" -msgstr "ID du jeu" - -msgid "Game IOS" -msgstr "IOS du jeu" - -msgid "Game Language" -msgstr "Langue du jeu" - -msgid "Game Load" -msgstr "Paramètres du jeu" - -msgid "Game Lock" -msgstr "Verrouiller le jeu" - -msgid "Game Only" -msgstr "Seulement le jeu" - -msgid "Game Region" -msgstr "Région" - -msgid "Game Size" -msgstr "Taille du jeu" - -msgid "Game Sound Mode" -msgstr "Mode d'intro des jeux" - -msgid "Game Sound Volume" -msgstr "Volume des intros" - -msgid "Game Split Size" -msgstr "Découpage des jeux" - -msgid "Game is already installed:" -msgstr "Le jeu est déjà installé:" - -msgid "Game/Install Partition" -msgstr "Partition jeu/install." - -msgid "Gamename [GAMEID]" -msgstr "NomJeu [IDJEU]" - -msgid "Games" -msgstr "Jeux" - -msgid "Genre:" -msgstr "" - -msgid "German" -msgstr "Allemand" - -msgid "Global Settings" -msgstr "Paramètres" - -msgid "HOME Menu" -msgstr "Menu HOME" - -msgid "Homebrew Apps Path" -msgstr "Dossier Apps Homebrew" - -msgid "Homebrew Channel" -msgstr "Chaîne Homebrew" - -msgid "Homebrew Launcher" -msgstr "Menu Homebrew" - -msgid "Hour" -msgstr "heures" - -msgid "How do you want to update?" -msgstr "Comment faire la Mise à jour ?" - -msgid "How to Shutdown?" -msgstr "Arrêt de la Wii ?" - -#, c-format -msgid "Incoming file %0.2fKB" -msgstr "Fichier entrant %0.2fKo" - -#, c-format -msgid "Incoming file %0.2fMB" -msgstr "Fichier entrant %0.2fMo" - -msgid "Initializing Network" -msgstr "Initialisation du réseau" - -msgid "Insert Disk" -msgstr "Insérez un disque" - -msgid "Insert a Wii Disc!" -msgstr "Insérez un disque Wii !" - -msgid "Install" -msgstr "Installer" - -msgid "Install Error!" -msgstr "Erreur à l'installation !" - -msgid "Install a game" -msgstr "Installer un jeu" - -msgid "Install directories" -msgstr "Dossiers d'installation" - -msgid "Install partitions" -msgstr "Installation" - -msgid "Installing content... Ok!" -msgstr "Installation contenu... OK!" - -msgid "Installing game:" -msgstr "Installation du jeu:" - -msgid "Installing ticket... Ok!" -msgstr "Installation ticket... OK!" - -msgid "Installing title... Ok!" -msgstr "Installation titre... OK!" - -msgid "Installing wad" -msgstr "Installation WAD" - -msgid "Issue manager /" -msgstr "Gestion des erreurs/" - -msgid "It seems that you have some information that will be helpful to us. Please pass this information along to the DEV team." -msgstr "SVP, faîtes passer cette information qui serait très utile à la Team USB Loader GX." - -msgid "Italian" -msgstr "Italien" - -msgid "Jan" -msgstr "" - -msgid "Japanese" -msgstr "Japonais" - -msgid "July" -msgstr "Juil" - -msgid "June" -msgstr "Juin" - -msgid "Keep" -msgstr "Garder" - -msgid "Keyboard" -msgstr "Clavier" - -msgid "Korean" -msgstr "Coréen" - -msgid "Language File" -msgstr "Fichier de langue" - -msgid "Language change:" -msgstr "Changement de langue:" - -msgid "Languagefiles Path" -msgstr "Dossier langue" - -msgid "Languagepath changed." -msgstr "Dossier langue changé" - -msgid "Left" -msgstr "Gauche" - -msgid "Like SysMenu" -msgstr "Menu système" - -msgid "List on Gamelaunch" -msgstr "Proposer au démarrage" - -msgid "Load" -msgstr "Charger" - -msgid "Load From SD/USB" -msgstr "Charger depuis SD/USB" - -#, c-format -msgid "Load file from: %s ?" -msgstr "Charger le fichier de: %s ?" - -msgid "Load this DOL as alternate DOL?" -msgstr "Charger comme DOL alternatif ?" - -msgid "Loader Settings" -msgstr "Paramètres du Loader" - -msgid "Loading standard language." -msgstr "Chargement langue par défaut." - -msgid "Loading standard music." -msgstr "Chargement musique standard." - -msgid "Lock Console" -msgstr "Verrouiller la console" - -msgid "Lock USB Loader GX" -msgstr "Verrouiller USB Loader GX" - -msgid "Locked" -msgstr "Clic pour déverrouiller" - -msgid "Loop Directory" -msgstr "Répéter dossier" - -msgid "Loop Music" -msgstr "Répéter musique" - -msgid "Loop Sound" -msgstr "Intro en boucle" - -msgid "Main tester:" -msgstr "Testeur:" - -msgid "Mar" -msgstr "Mars" - -msgid "Mark new games" -msgstr "Marquer les nouveaux jeux" - -msgid "May" -msgstr "Mai" - -msgid "Messageboard Update" -msgstr "Mise à jour carnet Wii" - -msgid "Motion+ Video" -msgstr "Vidéo Motion+" - -msgid "Mount DVD drive" -msgstr "Charger le DVD" - -msgid "Multiple Partitions" -msgstr "Partitions multiples" - -msgid "Music Loop Mode" -msgstr "Type de boucle" - -msgid "Music Volume" -msgstr "Volume musique" - -msgid "Neither" -msgstr "Aucun" - -msgid "Network is not initiated." -msgstr "Réseau non initialisé" - -msgid "New Disc Detected" -msgstr "Nouveau DVD détecté" - -msgid "Next" -msgstr "Suivant" - -msgid "No" -msgstr "Non" - -msgid "No Cheatfile found" -msgstr "Aucun fichier de triches trouvé" - -msgid "No DOL file found on disc." -msgstr "Aucun DOL trouvé dans ce jeu." - -msgid "No Splitting" -msgstr "Aucun" - -msgid "No URL or Path specified." -msgstr "Pas d'adresse ou de chemin spécifié" - -msgid "No WBFS or FAT/NTFS/EXT partition found" -msgstr "Partition WBFS ou FAT/NTFS/EXT non trouvée" - -msgid "No cheats were selected" -msgstr "Aucune sélection de triches" - -msgid "No data could be read." -msgstr "Lecture des données impossible." - -msgid "No favorites selected." -msgstr "Pas de favoris sélectionnés" - -msgid "No file missing!" -msgstr "Aucun fichier manquant !" - -msgid "No new updates." -msgstr "Pas de nouvelle mise à jour." - -msgid "No themes found on the site." -msgstr "Aucun thème trouvé sur le site." - -msgid "No themes found." -msgstr "Aucun thème trouvé." - -msgid "None" -msgstr "Aucun" - -msgid "Normal" -msgstr "4:3" - -msgid "Not a WAD file." -msgstr "Ce n'est pas un fichier WAD" - -msgid "Not a Wii Disc" -msgstr "Ce n'est pas un jeu Wii" - -msgid "Not a valid URL" -msgstr "URL non valide" - -msgid "Not a valid URL path" -msgstr "Chemin URL non valide" - -msgid "Not a valid domain" -msgstr "Domaine non valide" - -msgid "Not enough free memory." -msgstr "Mémoire libre insuffisante !" - -msgid "Not enough free space!" -msgstr "Espace libre insuffisant !" - -msgid "Not enough memory." -msgstr "Mémoire insuffisante." - -msgid "Not required" -msgstr "Non requis" - -msgid "Not supported format!" -msgstr "Format non supporté !" - -msgid "Nov" -msgstr "" - -msgid "OFF" -msgstr "Inactif" - -msgid "OK" -msgstr "" - -msgid "ON" -msgstr "Actif" - -msgid "Ocarina" -msgstr "" - -msgid "Oct" -msgstr "" - -msgid "Official Site:" -msgstr "Site officiel:" - -msgid "Offset" -msgstr "" - -msgid "Only Game Partition" -msgstr "Uniquement la partition de jeu" - -msgid "Only for Install" -msgstr "Uniquement à l'installation" - -msgid "Original Discarts" -msgstr "Labels DVD originaux" - -msgid "Original/Customs" -msgstr "Originaux/Persos" - -msgid "Parental Control" -msgstr "Contrôle parental" - -msgid "Partition" -msgstr "" - -msgid "Password" -msgstr "Mot de passe" - -msgid "Password Changed" -msgstr "Mot de passe modifié" - -msgid "Password has been changed" -msgstr "Le mot de passe a été modifié" - -msgid "Patch Country Strings" -msgstr "Patch jeux import" - -msgid "Path Changed" -msgstr "Chemin changé" - -msgid "Permission denied." -msgstr "Permission refusée." - -msgid "Pick from a list" -msgstr "Sélectionner" - -msgid "Play Count" -msgstr "Utilisations" - -msgid "Play Next" -msgstr "Jouer suiv." - -msgid "Play Once" -msgstr "Jouer 1 fois" - -msgid "Play Previous" -msgstr "Jouer précéd." - -msgid "Playing Music:" -msgstr "Musique actuelle:" - -msgid "Please wait..." -msgstr "Veuillez patienter..." - -msgid "Power off the Wii" -msgstr "Éteindre la Wii" - -msgid "Prev" -msgstr "Précédent" - -msgid "Prompts Buttons" -msgstr "Interface" - -msgid "Published by" -msgstr "Publié par" - -msgid "Quick Boot" -msgstr "Démarrage rapide" - -msgid "Random Directory Music" -msgstr "Aléatoire" - -msgid "Reading WAD data... Ok!" -msgstr "Lecture données WAD... OK!" - -msgid "Receiving file from:" -msgstr "Réception du fichier de:" - -msgid "Region Patch" -msgstr "Région patch" - -msgid "Released" -msgstr "Date de sortie" - -msgid "Reload SD" -msgstr "Recharger la SD" - -msgid "Remove update" -msgstr "Supprimer MàJ" - -msgid "Rename Game on WBFS" -msgstr "Renommer un jeu" - -msgid "Reset" -msgstr "Réinitialisation" - -msgid "Reset BG Music" -msgstr "Fond sonore par defaut" - -msgid "Reset Playcounter" -msgstr "Remise à zéro du compteur d'utilisations" - -msgid "Reset to default BGM?" -msgstr "Remettre le fond sonore par defaut ?" - -msgid "Restarting..." -msgstr "Redémarrage..." - -msgid "Return" -msgstr "Retour" - -msgid "Return To" -msgstr "Retourner vers" - -msgid "Return to Wii Menu" -msgstr "Retourner au menu Wii" - -msgid "Right" -msgstr "Droite" - -msgid "Rumble" -msgstr "Vibrations" - -msgid "SChinese" -msgstr "Chinois simplifié" - -msgid "SFX Volume" -msgstr "Volume SFX" - -msgid "Save" -msgstr "Enregistrer" - -msgid "Save Failed. No device inserted?" -msgstr "Echec de la sauvegarde. Pas de périphérique inséré ?" - -msgid "Save Game List to" -msgstr "Sauvegarder la liste des jeux sous" - -msgid "Save List" -msgstr "Sauvegarder la liste" - -msgid "Saved" -msgstr "Sauvegardé" - -msgid "Screensaver" -msgstr "Économiseur d'écran" - -msgid "Select" -msgstr "Choisir" - -msgid "Select DOL Offset" -msgstr "Sélectionner l'offset du DOL" - -msgid "Select a DOL" -msgstr "Choisir un DOL" - -msgid "Select a DOL from Game" -msgstr "Sélectionner un DOL à partir du jeu" - -msgid "Sept" -msgstr "" - -msgid "Set Search-Filter" -msgstr "Filtre de Recherche" - -msgid "Settings" -msgstr "Paramètres" - -msgid "Show Free Space" -msgstr "Montrer l'espace libre" - -msgid "Shutdown System" -msgstr "Arrêt" - -msgid "Shutdown Wii" -msgstr "Éteindre la Wii" - -msgid "Sort alphabetically" -msgstr "Ordre alphabétique" - -msgid "Sort by number of players" -msgstr "Nombre de joueurs" - -msgid "Sort by rank" -msgstr "Classement favoris" - -msgid "Sort order by most played" -msgstr "Les plus joués" - -msgid "Sound" -msgstr "Sons" - -msgid "Sound Settings" -msgstr "Réglages du son" - -msgid "Sound+BGM" -msgstr "Intro + fond sonore" - -msgid "Sound+Quiet" -msgstr "Intro + silence" - -msgid "Spanish" -msgstr "Espagnol" - -msgid "Special thanks to:" -msgstr "Remerciements spéciaux à:" - -msgid "Split each 2GB" -msgstr "2Go" - -msgid "Split each 4GB" -msgstr "4Go" - -msgid "Standby" -msgstr "Veille" - -msgid "Success" -msgstr "Succès" - -msgid "Success:" -msgstr "Succès:" - -msgid "Successfully Saved" -msgstr "Enregistré avec succès" - -msgid "Successfully Updated" -msgstr "Mise à jour terminée" - -msgid "Successfully Updated thanks to www.techjawa.com" -msgstr "Mise à jour terminée. Merci à www.techjawa.com" - -msgid "Successfully deleted:" -msgstr "Supprimé avec succès:" - -msgid "Successfully extracted theme." -msgstr "Succès de l'extraction du thème." - -msgid "Successfully installed:" -msgstr "Installé avec succès:" - -msgid "Sync FAT32 FS Info" -msgstr "Synch. info FAT32" - -msgid "Synchronizing..." -msgstr "Synchronisation..." - -msgid "System Default" -msgstr "Console par défaut" - -msgid "TChinese" -msgstr "Chinois traditionnel" - -msgid "TXT Cheatcodes Path" -msgstr "Dossier TXT de triches" - -msgid "The .them file was not found in the zip." -msgstr "Fichier .them non trouvé dans le zip." - -msgid "The entered directory does not exist. Would you like to create it?" -msgstr "Répertoire indiqué inexistant. Souhaitez-vous le créer ?" - -msgid "The game installation is disabled under this IOS because of instability in usb write." -msgstr "L'installation d'un jeu est désactivée en utilisant cet IOS pour cause d'instabilité en écriture sur l'USB." - -msgid "The wad file was installed" -msgstr "Le fichier wad a été installé" - -#, c-format -msgid "The wad installation failed with error %i" -msgstr "L'installation du wad a échoué avec l'erreur %i" - -msgid "Theme Downloader" -msgstr "Téléchargement des thèmes" - -msgid "Theme Menu" -msgstr "Thèmes" - -msgid "Theme Path" -msgstr "Dossier thème" - -msgid "Theme Title:" -msgstr "Titre du thème:" - -msgid "Themes by www.spiffy360.com" -msgstr "Thèmes par www.spiffy360.com" - -msgid "This IOS is the BootMii ios. If you are sure it is not BootMii and you have something else installed there than ignore this warning." -msgstr "Cet IOS est l'IOS de BootMii. Si vous étes certain que ce n'est pas BootMii, ignorez cet avertissement." - -msgid "This IOS was not found on the titles list. If you are sure you have it installed than ignore this warning." -msgstr "Cet IOS n'a pas été trouvé dans la liste des titres. Si vous êtes certain de l'avoir installé, ignorez cet avertissement." - -msgid "Time left:" -msgstr "Fini dans:" - -msgid "Title Launcher" -msgstr "Menu Chaînes" - -msgid "Titles from WiiTDB" -msgstr "Titres de WiiTDB" - -msgid "Tooltips" -msgstr "Info-bulles" - -msgid "Transfer failed" -msgstr "Échec du transfert" - -msgid "USB Device not found" -msgstr "Périphérique USB introuvable" - -msgid "USB Loader GX is protected" -msgstr "USB Loader GX est verrouillé" - -msgid "USB Port" -msgstr "" - -msgid "USB Port changing is only supported on Hermes cIOS." -msgstr "" - -msgid "Uninstall" -msgstr "Désinstaller" - -msgid "Uninstall Game" -msgstr "Désinstaller le jeu" - -msgid "Uninstall Menu" -msgstr "Menu suppression" - -msgid "Uninstall all" -msgstr "Tout supprimer" - -msgid "Uninstalling wad" -msgstr "Désinstallation wad" - -msgid "Unknown" -msgstr "Inconnu" - -msgid "Unlock USB Loader GX" -msgstr "Déverrouiller USB Loader GX" - -msgid "Unlocked" -msgstr "Clic pour verrouiller" - -msgid "Unsupported format, try to extract manually TempTheme.zip." -msgstr "Format non supporté, essayez d'extraire manuellement TempTheme.zip." - -msgid "Update" -msgstr "Mise à jour" - -msgid "Update All" -msgstr "Totale" - -msgid "Update DOL" -msgstr "DOL seul" - -msgid "Update Files" -msgstr "MàJ Fichiers" - -msgid "Update Path" -msgstr "Dossier de mise à jour" - -msgid "Update all Language Files" -msgstr "Mise à jour des fichiers de langue" - -msgid "Update failed" -msgstr "Échec de la mise à jour" - -msgid "Update successfull" -msgstr "Mise à jour réussie" - -msgid "Updating Language Files:" -msgstr "Mise à jour du fichier de langue:" - -msgid "Uploaded ZIP file installed to homebrew directory." -msgstr "Fichier ZIP envoyé et installé dans le répertoire homebrew." - -msgid "VIDTV Patch" -msgstr "Patch VIDTV" - -msgid "Version:" -msgstr "" - -#, c-format -msgid "Version: %s" -msgstr "" - -msgid "Video Mode" -msgstr "Mode vidéo" - -msgid "WDM Files Path" -msgstr "Dossier fichiers WDM" - -msgid "WIP Patches Path" -msgstr "Dossier patchs WIP" - -msgid "Waiting..." -msgstr "En attente..." - -msgid "Warning:" -msgstr "Attention:" - -msgid "What do you want to update?" -msgstr "Choix de la mise à jour" - -msgid "What should be deleted for this game title:" -msgstr "Que voulez-vous supprimer pour ce titre?" - -msgid "WiFi Features" -msgstr "Connexion WiFi" - -msgid "Widescreen Fix" -msgstr "16:9" - -msgid "Wii Menu" -msgstr "Menu Wii" - -msgid "Wii Settings" -msgstr "Paramètres Wii" - -msgid "WiiTDB Files" -msgstr "Fichier WiiTDB" - -msgid "WiiTDB Path" -msgstr "Dossier WiiTDB" - -msgid "WiiTDB is up to date." -msgstr "WiiTDB est à jour." - -msgid "Wiilight" -msgstr "Illumination Wii" - -msgid "Wrong Password" -msgstr "Mot de passe incorrect" - -msgid "Yes" -msgstr "Oui" - -msgid "You are currently using IOS" -msgstr "Vous utilisez actuellement l'IOS" - -msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." -msgstr "Vous essayez de sélectionner une partition FAT32/NTFS/EXT avec un cIOS 249 Rev < 18 (non supporté). Continuez à vos risques." - -msgid "You need to select or format a partition" -msgstr "Vous devez choisir ou formater une partition" - -msgid "and translators for language files updates" -msgstr "et les traducteurs pour la MàJ des fichiers langue" - -msgid "available" -msgstr "disponible" - -msgid "does not exist!" -msgstr "inexistant!" - -msgid "does not exist! Loading game without cheats." -msgstr "inexistant! Chargement du jeu sans tricheries." - -msgid "files left" -msgstr "fichiers restants" - -msgid "for FAT/NTFS support" -msgstr "pour le support FAT/NTFS" - -msgid "for Ocarina" -msgstr "pour Ocarina" - -msgid "for WiiTDB and hosting covers / disc images" -msgstr "pour WiiTDB et l'hébergement des jaquettes" - -msgid "for diverse patches" -msgstr "pour les divers patchs" - -msgid "for his awesome tool LibWiiGui" -msgstr "pour son outil impressionnant LibWiiGui" - -msgid "for hosting the themes" -msgstr "pour l'hébergement des thèmes" - -msgid "for hosting the update files" -msgstr "pour l'hébergement des Mises à Jour" - -msgid "for the USB Loader source" -msgstr "pour les sources USBLoader" - -msgid "formatted!" -msgstr "formaté !" - -msgid "free" -msgstr "libre" - -msgid "not set" -msgstr "non défini" - -msgid "of" -msgstr "sur" - -msgid "seconds left" -msgstr "secondes restantes" - -#~ msgid "Author:" -#~ msgstr "Auteur:" - -#~ msgid "Do you want to load this theme?" -#~ msgstr "Voulez-vous charger ce thème ?" - -#~ msgid "Loading default theme." -#~ msgstr "Chargement thème par défaut." - -#~ msgid "Theme path is changed." -#~ msgstr "Dossier thème changé" - -#~ msgid "Use IOS58" -#~ msgstr "Utiliser IOS58" - -#~ msgid "Custom Disc Images" -#~ msgstr "Labels DVD persos" - -#~ msgid "Download Boxart image?" -#~ msgstr "Télécharger les jaquettes ?" - -#~ msgid "Download Discart image?" -#~ msgstr "Télécharger les labels DVD ?" - -#~ msgid "Downloading file" -#~ msgstr "Téléchargement du fichier" - -#~ msgid "Missing files" -#~ msgstr "Fichier(s) manquant(s)" - -#~ msgid "Original Disc Images" -#~ msgstr "Labels DVD originaux" - -#~ msgid "files not found on the server!" -#~ msgstr "fichiers introuvables sur le serveur !" - -#~ msgid "Disc Images" -#~ msgstr "Labels DVD" - -#~ msgid "Downloading covers" -#~ msgstr "Téléchargement des jaquettes" - -#~ msgid "Only Customs" -#~ msgstr "Personnalisés" - -#~ msgid "Only Original" -#~ msgstr "Originaux" - -#~ msgid "Trying custom Discarts" -#~ msgstr "Essai labels DVD persos" - -#~ msgid "Trying original Discarts" -#~ msgstr "Essai labels DVD originaux" - -#~ msgid "Do you really want to delete:" -#~ msgstr "Voulez-vous vraiment supprimer:" - -#~ msgid "Do you want to use the alternate DOL that is known to be correct?" -#~ msgstr "Voulez-vous utiliser le DOL alternatif actuellement connu comme correct ?" - -#~ msgid "0 (Locked and Unlocked Games)" -#~ msgstr "0 (Affiche les jeux verrouillés et non verrouillés)" - -#~ msgid "1 (Unlocked Games Only)" -#~ msgstr "1 (Affiche seulement les jeux non verrouillés)" - -#~ msgid "BETA revisions" -#~ msgstr "Révisions BETA" - -#~ msgid "GamesLevel" -#~ msgstr "Niv. verrou" - -#~ msgid "Unlock console to use this option." -#~ msgstr "Cette option requiert le déverrouillage de l'interface." - -#~ msgid "Enabling this option on a FAT partition might slow the startup of the loader." -#~ msgstr "Activer cette option sur une partition FAT peut ralentir le démarrage du loader." - -#~ msgid "Full Shutdown" -#~ msgstr "Éteindre" - -#~ msgid "GXtheme.cfg not found in any subfolder." -#~ msgstr "GXtheme.cfg non trouvé dans aucun sous-dossier." - -#~ msgid "If you don't have WiFi, press 1 to get an URL to get your WiiTDB.zip" -#~ msgstr "Pressez 1 pour obtenir un lien personnalisé pour votre WiiTDB.zip" - -#~ msgid "Paste it into your browser to get your WiiTDB.zip." -#~ msgstr "Collez ce lien dans votre navigateur pour télécharger." - -#~ msgid "Shutdown to Idle" -#~ msgstr "Veille" - -#~ msgid "Shutdown?" -#~ msgstr "Éteindre ?" - -#~ msgid "Your URL has been saved in %sWiiTDB_URL.txt." -#~ msgstr "Sauvegarde de l'URL sous %sWiiTDB_URL.txt." - -#~ msgid "Can't create file" -#~ msgstr "Création du fichier impossible" - -#~ msgid "Connection lost..." -#~ msgstr "Connexion perdue..." - -#~ msgid "Download failed." -#~ msgstr "Téléchargement échoué." - -#~ msgid "Download request failed." -#~ msgstr "Demande de téléchargement échouée" - -#~ msgid "Downloading Page List:" -#~ msgstr "Chargement Prévisualisations:" - -#~ msgid "Theme Download Path" -#~ msgstr "Dossier Thèmes Téléch." - -#~ msgid "Transfer failed." -#~ msgstr "Echec Transfert" - -#~ msgid "Unsupported format, try to extract manually." -#~ msgstr "Format non supporté, essayez d'extraire manuellement." - -#~ msgid "and translaters for language files updates" -#~ msgstr "et traducteurs pour les MàJ fichiers langues" - -#~ msgid "Insert an SD-Card to save." -#~ msgstr "Insérez une carte SD pour enregistrer." - -#~ msgid "Insert an SD-Card to use this option." -#~ msgstr "Insérez une carte SD pour utiliser cette option." - -#~ msgid "No SD-Card inserted!" -#~ msgstr "Aucune carte SD insérée !" - -#~ msgid "Waiting for USB Device" -#~ msgstr "Attente d'un périphérique USB" - -#~ msgid "Back to Loader" -#~ msgstr "Chaîne Homebrew" - -#~ msgid "FAT: Use directories" -#~ msgstr "FAT: Utiliser dossiers" - -#~ msgid "All partitions" -#~ msgstr "Toutes partitions" - -#~ msgid "Game partition" -#~ msgstr "Partition Jeu" - -#~ msgid "Install 1:1 Copy" -#~ msgstr "Installer Copie 1:1" - -#~ msgid "An Error occured" -#~ msgstr "Une Erreur s'est produite" - -#~ msgid "Are you sure you want to enable Parent Control?" -#~ msgstr "Confirmation activation du Contrôle Parental ?" - -#~ msgid "Checking for Updates" -#~ msgstr "Recherche de Mise à jour" - -#~ msgid "Downloading" -#~ msgstr "Téléchargement" - -#~ msgid "Invalid PIN code" -#~ msgstr "Code PIN invalide" - -#~ msgid "Parental Control disabled" -#~ msgstr "Contrôle Parental désactivé" - -#~ msgid "The wad file was installed. But It could not be deleted from the SD card." -#~ msgstr "Le Wad a été installé. Mais ne peut être supprimé de la carte SD." - -#~ msgid "The wad installation failed with error %ld" -#~ msgstr "L'installation WAD a échoué avec erreur %ld" - -#~ msgid "Unable to open the wad that was just downloaded (%s)." -#~ msgstr "Ouverture du WAD impossible (%s)." - -#~ msgid "Unlock Parental Control" -#~ msgstr "Déverrouiller Contrôle Parental" - -#~ msgid "Update to" -#~ msgstr "vers la" - -#~ msgid "Updating" -#~ msgstr "Mise à jour" - -#~ msgid "Updating Language Files..." -#~ msgstr "Mise à jour des fichiers Langue..." - -#~ msgid "Updating WiiTDB.zip" -#~ msgstr "Mise à jour de WiiTDB.zip" - -#~ 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." - -#~ msgid "%s : %s May not boot correctly if your System Menu is not up to date." -#~ msgstr "%s : %s Peut ne pas démarrer correctement si votre Menu Système n'est pas à jour." - -#~ msgid "BCA Codes Path changed" -#~ msgstr "Dossier Codes BCA modifié" - -#~ msgid "Back to Wii Menu" -#~ msgstr "Retour Menu Wii" - -#~ msgid "Channels" -#~ msgstr "Chaînes" - -#~ msgid "Checking existing artwork" -#~ msgstr "Contrôle images existantes" - -#~ msgid "Confirm" -#~ msgstr "Confirmer" - -#~ msgid "Could not find a WBFS partition." -#~ msgstr "Impossible de trouver une partition WBFS." - -#~ msgid "Could not open WBFS partition" -#~ msgstr "Ouverture partition WBFS impossible" - -#~ msgid "Could not read the disc." -#~ msgstr "Lecture impossible du DVD." - -#~ msgid "Could not set USB." -#~ msgstr "Accès USB impossible." - -#~ msgid "Cover Path Changed" -#~ msgstr "Dossier des jaquettes modifié" - -#~ msgid "DOL path changed" -#~ msgstr "Dossier DOL alternatif modifié" - -#~ msgid "Disc Path Changed" -#~ msgstr "Dossier des labels DVD modifié" - -#~ msgid "Display favorites" -#~ msgstr "Favoris" - -#~ msgid "Do you want to retry for 30 secs?" -#~ msgstr "Réessayer pendant 30 sec. ?" - -#~ msgid "Enable Parental Control" -#~ msgstr "Contrôle Parental activé" - -#~ msgid "Force" -#~ msgstr "Forcer" - -#~ msgid "GCT Cheatcodes Path changed" -#~ msgstr "Dossier GCT de triches modifié" - -#~ msgid "Hermes CIOS" -#~ msgstr "CIOS d'Hermès" - -#~ msgid "Homebrew Appspath changed" -#~ msgstr "Dossier Homebrew Apps modifié" - -#~ msgid "Insert an SD-Card to download images." -#~ msgstr "Insérez une carte SD pour télécharger les jaquettes." - -#~ msgid "Install not possible" -#~ msgstr "Installation impossible" - -#~ msgid "Most likely it has dimensions that are not evenly divisible by 4." -#~ msgstr "Il est fort probable que les dimensions ne soient pas des multiples de 4." - -#~ msgid "Network init error" -#~ msgstr "Erreur d'initialisation réseau" - -#~ msgid "No .dol or .elf files found." -#~ msgstr "Aucun fichier .dol ou .elf trouvé." - -#~ msgid "No Favorites" -#~ msgstr "Pas de favoris" - -#~ msgid "No USB Device" -#~ msgstr "Aucun périphérique USB" - -#~ msgid "No USB Device found." -#~ msgstr "Aucun périphérique USB trouvé." - -#~ msgid "No WBFS or FAT/NTFS partition found" -#~ msgstr "Partition WBFS/FAT/NTFS introuvable" - -#~ msgid "Normal Covers" -#~ msgstr "Jaquettes 2D" - -#~ msgid "Not Found" -#~ msgstr "Non trouvé" - -#~ msgid "Not a DOL/ELF file." -#~ msgstr "Ce n'est pas un fichier DOL/ELF" - -#~ msgid "Reset to standard BGM?" -#~ msgstr "Restaurer fond sonore standard ?" - -#~ msgid "Save Failed" -#~ msgstr "Échec de sauvegarde" - -#~ msgid "Selected DOL" -#~ msgstr "Choix du DOL" - -#~ msgid "TXT Cheatcodes Path changed" -#~ msgstr "Dossier TXT de triches modifié" - -#~ msgid "Theme Download Path changed" -#~ msgstr "Dossier Thèmes Téléch. modifié" - -#~ msgid "Theme Path Changed" -#~ msgstr "Dossier du thème modifié" - -#~ msgid "USB Loader GX will only run with Hermes CIOS rev 4! Please make sure you have revision 4 installed!" -#~ msgstr "USB Loader GX fonctionne avec le CIOS d'Hermès rev4 seulement! Assurez-vous qu'il soit installé!" - -#~ msgid "Update Path changed." -#~ msgstr "Dossier de mise à jour modifié." - -#~ msgid "WIP Patches Path changed" -#~ msgstr "Dossier Patchs WIP modifié" - -#~ msgid "WiiTDB Path changed." -#~ msgstr "Dossier de WiiTDB modifié" - -#~ msgid "You are about to delete " -#~ msgstr "Vous êtes sur le point de supprimer " - -#~ 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." - -#~ msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible." -#~ msgstr "Le système de fichier NTFS est utilisé. En raison à de possibles erreurs d'écriture sur une partition de NTFS, l'installation d'un jeu est impossible." - -#~ msgid "You have attempted to load a bad image" -#~ msgstr "Vous avez tenté de charger une image érronée" - -#~ msgid "does not exist! You Messed something up, Idiot." -#~ msgstr "Inexistant! Quelque chose vous a échappé!" - -#~ msgid "file left" -#~ msgstr "fichier restant" diff --git a/Languages/german.lang b/Languages/german.lang deleted file mode 100644 index 83aae515..00000000 --- a/Languages/german.lang +++ /dev/null @@ -1,1854 +0,0 @@ -# USB Loader GX -# german language source file - r1068 -# don't delete/change this line (é). -msgid "" -msgstr "" -"Project-Id-Version: USB Loader GX\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-06 22:00+0100\n" -"PO-Revision-Date: 2010-07-03 17:35-0800\n" -"Last-Translator: TheRealVisitor\n" -"Language-Team: Bertilax, Snoozer, wishmasterf, ZEN.13, TheRealVisitor\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -msgid " Wad Saved as:" -msgstr " WAD gespeichert als:" - -msgid " could not be downloaded." -msgstr " konnte nicht heruntergeladen werden." - -msgid " has been Saved. The text has not been verified. Some of the code may not work right with each other. If you experience trouble, open the text in a real text editor for more information." -msgstr " wurde gespeichert. Möglicherweise funktionieren einige der Codes nicht richtig miteinander. Wenn du Probleme hast, öffne den Text in einem Texteditor um mehr Informationen zu erhalten." - -msgid " is not on the server." -msgstr " ist nicht auf dem Server." - -#, c-format -msgid "%i files not found on the server!" -msgstr "%i Dateien auf dem Server nicht gefunden!" - -#, c-format -msgid "%i missing files" -msgstr "%i fehlende Dateien" - -msgid "0 (Everyone)" -msgstr "0 (Jeder)" - -msgid "1 (Child 7+)" -msgstr "1 (Kinder 6+) " - -msgid "1 hour" -msgstr "1 Stunde" - -msgid "10 min" -msgstr "10 Minuten" - -msgid "2 (Teen 12+)" -msgstr "2 (Jugendliche 12+)" - -msgid "20 min" -msgstr "20 Minuten" - -msgid "2D Cover Path" -msgstr "2D Cover" - -msgid "3 (Mature 16+)" -msgstr "3 (Erwachsene 16+)" - -msgid "3 min" -msgstr "3 Minuten" - -msgid "30 min" -msgstr "30 Minuten" - -msgid "3D Cover Path" -msgstr "3D Cover" - -msgid "3D Covers" -msgstr "3D Cover" - -msgid "4 (Adults Only 18+)" -msgstr "4 (Erwachsene 18+)" - -msgid "5 min" -msgstr "5 Minuten" - -msgid ">> Deleting tickets..." -msgstr ">> Lösche Tickets..." - -msgid ">> Deleting tickets...ERROR! " -msgstr ">> Lösche Tickets...FEHLER! " - -msgid ">> Deleting tickets...Ok! " -msgstr ">> Lösche Tickets...OK! " - -msgid ">> Deleting title ...ERROR! " -msgstr ">> Lösche Title...FEHLER! " - -msgid ">> Deleting title ...Ok!" -msgstr ">> Lösche Titel...OK! " - -msgid ">> Deleting title contents..." -msgstr ">> Lösche Titel Inhalte..." - -msgid ">> Deleting title contents...ERROR! " -msgstr ">> Lösche Titel Inhalte...FEHLER! " - -msgid ">> Deleting title contents...Ok!" -msgstr ">> Lösche Titel Inhalte...OK!" - -msgid ">> Deleting title..." -msgstr ">> Lösche Titel..." - -msgid ">> Finishing installation..." -msgstr ">> Beende Installation..." - -msgid ">> Installing content #" -msgstr ">> Installiere Inhalt #" - -msgid ">> Installing ticket..." -msgstr ">> Installiere Ticket..." - -msgid ">> Installing title..." -msgstr ">> Installiere Titel..." - -msgid ">> Reading WAD data..." -msgstr ">> Lese WAD Daten..." - -msgid ">> Reading WAD data...ERROR! " -msgstr ">> Lese WAD Daten...FEHLER! " - -msgid ">> Reading WAD data...Ok!" -msgstr ">> Lese WAD Daten...OK!" - -msgid "AUTO" -msgstr "AUTO" - -msgid "All Partitions" -msgstr "Alle Partitionen" - -msgid "All images downloaded successfully." -msgstr "Alle Bilder erfolgreich heruntergeladen" - -msgid "All the features of USB Loader GX are unlocked." -msgstr "Alle Funktionen des USB Loader GX sind jetzt freigeschaltet." - -msgid "Alternate DOL" -msgstr "Alternative DOL" - -msgid "Anti" -msgstr "Anti" - -msgid "App Language" -msgstr "Sprache" - -msgid "Apply" -msgstr "Anwenden" - -msgid "Apr" -msgstr "April" - -msgid "Are you sure you want to lock USB Loader GX?" -msgstr "Bist du sicher, dass du USB Loader GX sperren willst?" - -msgid "Are you sure you want to reset?" -msgstr "Bist du sicher, dass du resetten willst?" - -msgid "Are you sure?" -msgstr "Bist du sicher?" - -msgid "Aug" -msgstr "August" - -msgid "Author(s):" -msgstr "Autor(en)" - -msgid "AutoInit Network" -msgstr "Autoinit. Netzwerk" - -msgid "Automatic port switching is done on the fly. You need to change all custom paths to SD-Card first for this option or else it could damage a filesystem." -msgstr "Automatische Portumschaltung wird jetzt direkt zur Programmlaufzeit durchgeführt. Für diese Option müssen zuerst alle eigenen Pfade auf die SD Karte verweisen, da ansonsten das Dateisystem beschädigt werden könnte." - -msgid "BCA Codes Path" -msgstr "BCA Codes" - -msgid "Back" -msgstr "Zurück" - -msgid "Back to HBC or Wii Menu" -msgstr "Zurück zum Homebrewkanal oder Wii Menü" - -msgid "Backgroundmusic" -msgstr "Hintergrundmusik" - -msgid "Big thanks to:" -msgstr "Großen Dank an:" - -msgid "Block Cover Downloads" -msgstr "Blocke Cover-Downloads" - -msgid "Block Custom Paths" -msgstr "Blocke eigene Pfade" - -msgid "Block Game Install" -msgstr "Blocke Spieleinstallation" - -msgid "Block Game Settings" -msgstr "Blocke Spieleoptionen" - -msgid "Block GameID Change" -msgstr "Blocke SpieleID-Änderung" - -msgid "Block Global Settings" -msgstr "Blocke globale Optionen" - -msgid "Block Gui Settings" -msgstr "Blocke GUI-Optionen" - -msgid "Block HBC Menu" -msgstr "Blocke HBC Menü" - -msgid "Block IOS Reload" -msgstr "Blocke IOS-Neuladen" - -msgid "Block Loader Settings" -msgstr "Blocke Loaderoptionen" - -msgid "Block Parental Settings" -msgstr "Blocke Altersoptionen" - -msgid "Block Reset Settings" -msgstr "Blocke Resetoptionen" - -msgid "Block Sound Settings" -msgstr "Blocke Soundoptionen" - -msgid "Block Theme Downloader" -msgstr "Blocke Theme Downloader" - -msgid "Block Theme Menu" -msgstr "Blocke Theme Menü" - -msgid "Block Title Launcher" -msgstr "Blocke Title Launcher" - -msgid "Block Updates" -msgstr "Blocke Updates" - -msgid "Boot/Standard" -msgstr "Bootstandard (cIOS)" - -msgid "Boot?" -msgstr "Kanal starten?" - -msgid "Both" -msgstr "ID und Region" - -msgid "Both Ports" -msgstr "Beide Ports" - -msgid "Can't be formatted" -msgstr "Kann nicht formatiert werden." - -msgid "Can't create directory" -msgstr "Verzeichnis kann nicht erstellt werden." - -#, c-format -msgid "Can't create path: %s" -msgstr "Kann Pfad nicht erstellen: %s" - -msgid "Can't delete:" -msgstr "Löschen fehlgeschlagen:" - -msgid "Cancel" -msgstr "Abbrechen" - -msgid "Cannot write to destination." -msgstr "Ziel kann nicht beschrieben werden." - -msgid "Change Play Path" -msgstr "Pfad ändern" - -msgid "Cheatfile is blank" -msgstr "Cheatdatei ist leer" - -msgid "Clear" -msgstr "Freigeben" - -msgid "Click to Download Covers" -msgstr "Cover herunterladen" - -msgid "Click to change game ID" -msgstr "Spiel ID ändern" - -msgid "Clock" -msgstr "Uhr" - -msgid "Close" -msgstr "Schließen" - -msgid "Code Download" -msgstr "Cheatcodes werden heruntergeladen" - -#, c-format -msgid "Coded by: %s" -msgstr "Programmiert von: %s" - -msgid "Coding:" -msgstr "Programmierung:" - -msgid "Connection to server timed out." -msgstr "Zeitüberschreitung bei Serververbindung." - -msgid "Console" -msgstr "Konsolenstatus" - -msgid "Console Default" -msgstr "Konsolenstandard" - -msgid "Console Locked" -msgstr "Konsole gesperrt" - -msgid "Console must be unlocked for this option." -msgstr "Gerät muss für diese Option entsperrt werden." - -msgid "Console should be unlocked to modify it." -msgstr "Konsole muss zum Bearbeiten entsperrt werden." - -msgid "Continue to install game?" -msgstr "Fortfahren um Spiel zu installieren?" - -msgid "Controllevel" -msgstr "Alterseinstufung" - -msgid "Correct Password" -msgstr "Richtiges Passwort" - -msgid "Could not connect to the server." -msgstr "Konnte mit Server nicht verbinden." - -msgid "Could not create GCT file" -msgstr "GCT Datei konnte nicht erstellt werden." - -#, c-format -msgid "Could not create path: %s" -msgstr "Konnte Pfad nicht erstellen: %s" - -msgid "Could not find info for this game in the wiitdb.xml." -msgstr "Konnte keine Info für das Spiel in der wiitdb.xml finden." - -msgid "Could not initialize DIP module!" -msgstr "DIP Modul konnte nicht initialisiert werden!" - -msgid "Could not initialize network!" -msgstr "Netzwerk konnte nicht initialisiert werden!" - -msgid "Could not open Disc" -msgstr "Disk konnte nicht geöffnet werden." - -msgid "Could not open wiitdb.xml." -msgstr "Konnte wiitdb.xml nicht öffnen." - -msgid "Could not save." -msgstr "Es konnte nicht gespeichert werden." - -msgid "Cover Download" -msgstr "Welche Cover herunterladen?" - -msgid "Create" -msgstr "Erstelle GCT" - -msgid "Credits" -msgstr "Danksagungen" - -msgid "Custom Discarts" -msgstr "Eig. Diskbilder" - -msgid "Custom Paths" -msgstr "Pfade anpassen" - -msgid "Customs/Original" -msgstr "Community/Original" - -msgid "DOL Path" -msgstr "Alternative DOL" - -msgid "Dec" -msgstr "Dezember" - -msgid "Default" -msgstr "Standard" - -msgid "Default Gamesettings" -msgstr "Spieleinstellungen zurücksetzen" - -msgid "Default Settings" -msgstr "Einstellungen zurücksetzen" - -msgid "Delete" -msgstr "Löschen" - -msgid "Delete ?" -msgstr "Wirklich löschen?" - -msgid "Delete Cheat GCT" -msgstr "Lösche GCT Cheatdatei" - -msgid "Delete Cheat TXT" -msgstr "Lösche TXT Cheatdatei" - -msgid "Delete Cover Artwork" -msgstr "Lösche Cover" - -msgid "Delete Disc Artwork" -msgstr "Lösche Disc Cover" - -msgid "Design:" -msgstr "Design:" - -msgid "Developed by" -msgstr "Entwickelt von" - -msgid "Directory does not exist!" -msgstr "Verzeichnis existiert nicht!" - -msgid "Disc Artwork Download" -msgstr "Disk Cover Download" - -msgid "Disc Artwork Path" -msgstr "Disk Cover" - -msgid "Disc Default" -msgstr "Diskstandard" - -msgid "DiskFlip" -msgstr "DiskFlip" - -msgid "Display" -msgstr "Spielinfos anzeigen" - -msgid "Display as a carousel" -msgstr "Karussell-Ansicht" - -msgid "Display as a grid" -msgstr "Grid-Ansicht" - -msgid "Display as a list" -msgstr "Listen-Ansicht" - -msgid "Display favorites only" -msgstr "Zeige nur Favoriten" - -msgid "Do you want to apply it now?" -msgstr "Jetzt übernehmen?" - -msgid "Do you want to apply this theme?" -msgstr "Dieses Theme angewenden?" - -msgid "Do you want to change language?" -msgstr "Sprache ändern?" - -msgid "Do you want to download this theme?" -msgstr "Dieses Theme herunterladen?" - -msgid "Do you want to format:" -msgstr "Formatieren:" - -msgid "Do you want to load the default theme?" -msgstr "Soll das DEFAULT Theme geladen werden?" - -msgid "Do you want to sync free space info sector on all FAT32 partitions?" -msgstr "Soll die freier Speicher Info auf allen Partitionen synchronisiert werden?" - -msgid "Do you wish to update/download all language files?" -msgstr "Alle Sprachdateien aktualisieren?" - -msgid "Done!" -msgstr "Fertig!" - -msgid "Download" -msgstr "Herunterladen" - -msgid "Download Now" -msgstr "Herunterladen" - -msgid "Download finished" -msgstr "Download abgeschlossen" - -msgid "Downloading 3D Covers" -msgstr "Lade 3D Cover herunter" - -msgid "Downloading Flat Covers" -msgstr "Lade 2D Cover herunter" - -msgid "Downloading Full HQ Covers" -msgstr "Lade Box HQ Cover runter" - -msgid "Downloading Full LQ Covers" -msgstr "Lade Box LQ Cover runter" - -msgid "Downloading custom Discarts" -msgstr "Lade Community Diskcovers herunter" - -msgid "Downloading file..." -msgstr "Lade Datei herunter..." - -msgid "Downloading image:" -msgstr "Lade Bilder herunter:" - -msgid "Downloading original Discarts" -msgstr "Lade Diskcovers herunter" - -msgid "Downloading pagelist:" -msgstr "Lade Seitenliste herunter:" - -msgid "Dutch" -msgstr "Niederländisch" - -msgid "ERROR" -msgstr "FEHLER" - -msgid "ERROR:" -msgstr "FEHLER:" - -msgid "ERROR: Can't set up theme." -msgstr "FEHLER: Theme kann nicht eingerichtet werden." - -msgid "English" -msgstr "Englisch" - -msgid "Error" -msgstr "Fehler" - -msgid "Error !" -msgstr "Fehler !" - -msgid "Error 002 fix" -msgstr "Fehler 002 fix" - -#, c-format -msgid "Error creating path: %s" -msgstr "Fehler Pfad anlegen: %s" - -msgid "Error opening downloaded file" -msgstr "Fehler beim Öffnen der heruntergeladenen Datei" - -msgid "Error reading Disc" -msgstr "Fehler beim Lesen der Disk" - -#, c-format -msgid "Error when downloading file: %i" -msgstr "Fehler beim Dateidownload: %i" - -msgid "Error while downloding file" -msgstr "Fehler beim Dateidownload" - -msgid "Error while opening the zip." -msgstr "Fehler beim Öffnen der zip" - -msgid "Error while transfering data." -msgstr "Fehler während der Datenübertragung." - -msgid "Error while updating USB Loader GX." -msgstr "Fehler beim Update vom USB Loader GX" - -msgid "Error writing the data." -msgstr "Fehler beim Schreiben der Daten" - -msgid "Error..." -msgstr "Fehler..." - -msgid "Error:" -msgstr "Fehler:" - -msgid "Exit" -msgstr "Beenden" - -msgid "Exit to where?" -msgstr "Beenden zum..." - -msgid "Extracting files..." -msgstr "Entpacke Dateien..." - -msgid "Failed formating" -msgstr "Formatieren fehlgeschlagen" - -msgid "Failed to extract." -msgstr "Entpacken fehlgeschlagen." - -msgid "Failed to open partition" -msgstr "Öffnen der Partition fehlgeschlagen" - -msgid "Failed updating" -msgstr "Updaten fehlgeschlagen" - -msgid "Feb" -msgstr "Februar" - -msgid "File not found." -msgstr "Datei nicht gefunden." - -#, c-format -msgid "Filesize is %i Byte." -msgstr "Dateigröße ist %i Byte" - -msgid "Filesize is 0 Byte." -msgstr "Dateigröße ist 0 Byte" - -msgid "Finishing installation... Ok!" -msgstr "Beende Installation... OK!" - -msgid "Flat Covers" -msgstr "2D Cover" - -msgid "Flip-X" -msgstr "Flip-X" - -msgid "Force NTSC" -msgstr "Erzwinge NTSC" - -msgid "Force PAL50" -msgstr "Erzwinge PAL50" - -msgid "Force PAL60" -msgstr "Erzwinge PAL60" - -msgid "Format" -msgstr "Formatieren" - -msgid "Formatting, please wait..." -msgstr "Formatiere, bitte warten..." - -msgid "Found missing images." -msgstr "Fehlende Bilder gefunden." - -msgid "Free Space" -msgstr "Freier Speicher" - -msgid "French" -msgstr "Französisch" - -msgid "Full Cover Path" -msgstr "Box Cover" - -msgid "Full HQ Covers" -msgstr "Box HQ Cover" - -msgid "Full LQ Covers" -msgstr "Box LQ Cover" - -msgid "Full Menu" -msgstr "Ganzes Menü" - -msgid "Full shutdown" -msgstr "Ausschalten" - -msgid "GAMEID_Gamename" -msgstr "SPIELID_Spielname" - -msgid "GCT Cheatcodes Path" -msgstr "GCT Cheatdateien" - -msgid "GCT File created" -msgstr "GCT Datei erstellt" - -msgid "GUI Settings" -msgstr "GUI Einstellungen" - -msgid "Game ID" -msgstr "Spiel ID" - -msgid "Game IOS" -msgstr "Spiel IOS" - -msgid "Game Language" -msgstr "Sprache" - -msgid "Game Load" -msgstr "Spieleinstellungen" - -msgid "Game Lock" -msgstr "Spielsprerre" - -msgid "Game Only" -msgstr "Nur Spiel" - -msgid "Game Region" -msgstr "Region" - -msgid "Game Size" -msgstr "Größe" - -msgid "Game Sound Mode" -msgstr "Banner Modus" - -msgid "Game Sound Volume" -msgstr "Banner Lautstärke" - -msgid "Game Split Size" -msgstr "Spiel Split Größe" - -msgid "Game is already installed:" -msgstr "Spiel ist bereits installiert:" - -msgid "Game/Install Partition" -msgstr "Spiel/Instal. Partition" - -msgid "Gamename [GAMEID]" -msgstr "Spielname [SPIELID]" - -msgid "Games" -msgstr "Spiele" - -msgid "Genre:" -msgstr "Genre:" - -msgid "German" -msgstr "Deutsch" - -msgid "Global Settings" -msgstr "Globale Einstellungen" - -msgid "HOME Menu" -msgstr "HOME Menü" - -msgid "Homebrew Apps Path" -msgstr "Homebrew Apps" - -msgid "Homebrew Channel" -msgstr "Homebrew Kanal" - -msgid "Homebrew Launcher" -msgstr "Homebrew Starter" - -msgid "Hour" -msgstr "Stunden" - -msgid "How do you want to update?" -msgstr "Was soll aktualisiert werden?" - -msgid "How to Shutdown?" -msgstr "Wie soll ausgeschaltet werden?" - -#, c-format -msgid "Incoming file %0.2fKB" -msgstr "Eingehende Datei %0.2fKB" - -#, c-format -msgid "Incoming file %0.2fMB" -msgstr "Eingehende Datei %0.2fMB" - -msgid "Initializing Network" -msgstr "Initialisiere Netzwerk" - -msgid "Insert Disk" -msgstr "Disk einlegen" - -msgid "Insert a Wii Disc!" -msgstr "Eine Wii Disk einlegen!" - -msgid "Install" -msgstr "Installieren" - -msgid "Install Error!" -msgstr "Installationsfehler!" - -msgid "Install a game" -msgstr "Spiel installieren" - -msgid "Install directories" -msgstr "Installationsart" - -msgid "Install partitions" -msgstr "Partitionen installier." - -msgid "Installing content... Ok!" -msgstr "Installiere Inhalt... OK!" - -msgid "Installing game:" -msgstr "Installiere Spiel:" - -msgid "Installing ticket... Ok!" -msgstr "Installiere Ticket... OK!" - -msgid "Installing title... Ok!" -msgstr "Installiere Title... OK!" - -msgid "Installing wad" -msgstr "Installiere WAD" - -msgid "Issue manager /" -msgstr "Problem Manager /" - -msgid "It seems that you have some information that will be helpful to us. Please pass this information along to the DEV team." -msgstr "Es scheint als ob du Informationen hast, die hilfreich für uns sein könnten. Bitte sende diese Information ans DEV Team." - -msgid "Italian" -msgstr "Italienisch" - -msgid "Jan" -msgstr "Januar" - -msgid "Japanese" -msgstr "Japanisch" - -msgid "July" -msgstr "Juli" - -msgid "June" -msgstr "Juni" - -msgid "Keep" -msgstr "Behalten" - -msgid "Keyboard" -msgstr "Tastatur" - -msgid "Korean" -msgstr "Koreanisch" - -msgid "Language File" -msgstr "Sprachdatei" - -msgid "Language change:" -msgstr "Sprache ändern:" - -msgid "Languagefiles Path" -msgstr "Sprachdateien" - -msgid "Languagepath changed." -msgstr "Pfad geändert" - -msgid "Left" -msgstr "Links" - -msgid "Like SysMenu" -msgstr "System Menü" - -msgid "List on Gamelaunch" -msgstr "" - -msgid "Load" -msgstr "Laden" - -msgid "Load From SD/USB" -msgstr "Von SD/USB laden" - -#, c-format -msgid "Load file from: %s ?" -msgstr "Datei von %s laden?" - -msgid "Load this DOL as alternate DOL?" -msgstr "Diese DOL als Alternative DOL laden?" - -msgid "Loader Settings" -msgstr "Loader Einstellungen" - -msgid "Loading standard language." -msgstr "Lade Standardsprache." - -msgid "Loading standard music." -msgstr "Lade Standardmusik." - -msgid "Lock Console" -msgstr "Konsole sperren" - -msgid "Lock USB Loader GX" -msgstr "Sperre USB Loader GX" - -msgid "Locked" -msgstr "Gesperrt" - -msgid "Loop Directory" -msgstr "Verzeichnis wiederholen" - -msgid "Loop Music" -msgstr "Wiederholung" - -msgid "Loop Sound" -msgstr "Wiederholung" - -msgid "Main tester:" -msgstr "Haupttester:" - -msgid "Mar" -msgstr "März" - -msgid "Mark new games" -msgstr "Neue Spiele mark." - -msgid "May" -msgstr "Mai" - -msgid "Messageboard Update" -msgstr "Forum Update" - -msgid "Motion+ Video" -msgstr "Motion+ Video" - -msgid "Mount DVD drive" -msgstr "Spiel starten" - -msgid "Multiple Partitions" -msgstr "Mehrere Partitionen" - -msgid "Music Loop Mode" -msgstr "HGM Wiederholung" - -msgid "Music Volume" -msgstr "Musik Lautstärke" - -msgid "Neither" -msgstr "Keine" - -msgid "Network is not initiated." -msgstr "Netzwerk wurde nicht initialisiert." - -msgid "New Disc Detected" -msgstr "Neue Disk im Laufwerk festgestellt" - -msgid "Next" -msgstr "Weiter" - -msgid "No" -msgstr "Nein" - -msgid "No Cheatfile found" -msgstr "Keine Cheatdatei gefunden." - -msgid "No DOL file found on disc." -msgstr "Keine DOL auf der Disk gefunden." - -msgid "No Splitting" -msgstr "Nicht teilen" - -msgid "No URL or Path specified." -msgstr "Keine URL oder kein Pfad spezifiziert" - -msgid "No WBFS or FAT/NTFS/EXT partition found" -msgstr "Keine WBFS oder FAT/NTFS/EXT Partition vorhanden" - -msgid "No cheats were selected" -msgstr "Es wurden keine Cheats ausgewählt." - -msgid "No data could be read." -msgstr "Daten konnten nicht gelesen werden." - -msgid "No favorites selected." -msgstr "Keine Favoriten ausgewählt" - -msgid "No file missing!" -msgstr "Keine Datei fehlt!" - -msgid "No new updates." -msgstr "Keine Updates verfügbar." - -msgid "No themes found on the site." -msgstr "Keine Themes auf der Seite gefunden." - -msgid "No themes found." -msgstr "Keine Themes gefunden." - -msgid "None" -msgstr "Keine" - -msgid "Normal" -msgstr "Normal (4:3)" - -msgid "Not a WAD file." -msgstr "Das ist keine WAD Datei." - -msgid "Not a Wii Disc" -msgstr "Keine Wii Disk." - -msgid "Not a valid URL" -msgstr "Keine gültige URL" - -msgid "Not a valid URL path" -msgstr "Kein gültiger URL Pfad" - -msgid "Not a valid domain" -msgstr "Keine gültige Domain" - -msgid "Not enough free memory." -msgstr "Nicht genügend freier Speicher." - -msgid "Not enough free space!" -msgstr "Nicht genügend freier Speicher!" - -msgid "Not enough memory." -msgstr "Nicht genug Speicher." - -msgid "Not required" -msgstr "Nicht benötigt" - -msgid "Not supported format!" -msgstr "Nicht unterstütztes Format!" - -msgid "Nov" -msgstr "November" - -msgid "OFF" -msgstr "AUS" - -msgid "OK" -msgstr "OK" - -msgid "ON" -msgstr "AN" - -msgid "Ocarina" -msgstr "Ocarina" - -msgid "Oct" -msgstr "Oktober" - -msgid "Official Site:" -msgstr "Offizielle Seite:" - -msgid "Offset" -msgstr "Offset" - -msgid "Only Game Partition" -msgstr "Nur Spiele Partition" - -msgid "Only for Install" -msgstr "Nur beim Installieren" - -msgid "Original Discarts" -msgstr "Org. Diskbilder" - -msgid "Original/Customs" -msgstr "Original/Community" - -msgid "Parental Control" -msgstr "Altersbeschränkung" - -msgid "Partition" -msgstr "Partition" - -msgid "Password" -msgstr "Passwort" - -msgid "Password Changed" -msgstr "Passwort geändert" - -msgid "Password has been changed" -msgstr "Passwort wurde geändert" - -msgid "Patch Country Strings" -msgstr "Ländercode patchen" - -msgid "Path Changed" -msgstr "Pfad geändert" - -msgid "Permission denied." -msgstr "Erlaubnis verweigert" - -msgid "Pick from a list" -msgstr "Wähle aus der Liste" - -msgid "Play Count" -msgstr "Spielzähler" - -msgid "Play Next" -msgstr "Nächster Titel" - -msgid "Play Once" -msgstr "Einmal abspielen" - -msgid "Play Previous" -msgstr "Vorheriger Titel" - -msgid "Playing Music:" -msgstr "Aktuelle Musik:" - -msgid "Please wait..." -msgstr "Bitte warten..." - -msgid "Power off the Wii" -msgstr "Wii ausschalten" - -msgid "Prev" -msgstr "Zurück" - -msgid "Prompts Buttons" -msgstr "Anzeige" - -msgid "Published by" -msgstr "Veröffentlicht von" - -msgid "Quick Boot" -msgstr "Schnelles Laden" - -msgid "Random Directory Music" -msgstr "Zufällig" - -msgid "Reading WAD data... Ok!" -msgstr "Lese WAD Daten... OK!" - -msgid "Receiving file from:" -msgstr "Empfange Datei von:" - -msgid "Region Patch" -msgstr "Region Patch" - -msgid "Released" -msgstr "Erschienen am" - -msgid "Reload SD" -msgstr "SD Karte neuladen" - -msgid "Remove update" -msgstr "Update entfernen" - -msgid "Rename Game on WBFS" -msgstr "Spiel umbenennen" - -msgid "Reset" -msgstr "Zurücksetzen" - -msgid "Reset BG Music" -msgstr "Musik zurücksetzen" - -msgid "Reset Playcounter" -msgstr "Spielzähler zurücksetzen" - -msgid "Reset to default BGM?" -msgstr "Zur standard Musik resetten?" - -msgid "Restarting..." -msgstr "Starte neu..." - -msgid "Return" -msgstr "Zurück" - -msgid "Return To" -msgstr "Zurück zu" - -msgid "Return to Wii Menu" -msgstr "Zurück zum Wii Menü" - -msgid "Right" -msgstr "Rechts" - -msgid "Rumble" -msgstr "Rumble" - -msgid "SChinese" -msgstr "Vereinfachtes Chinesisch" - -msgid "SFX Volume" -msgstr "SFX Lautstärke" - -msgid "Save" -msgstr "Speichern" - -msgid "Save Failed. No device inserted?" -msgstr "Speichern fehlgeschlagen. Kein Gerät eingefügt?" - -msgid "Save Game List to" -msgstr "Liste speicheren unter" - -msgid "Save List" -msgstr "Speichere Liste" - -msgid "Saved" -msgstr "Gespeichert" - -msgid "Screensaver" -msgstr "Bildschirmschoner" - -msgid "Select" -msgstr "Auswählen" - -msgid "Select DOL Offset" -msgstr "Wähle DOL Offset" - -msgid "Select a DOL" -msgstr "Wähle eine DOL" - -msgid "Select a DOL from Game" -msgstr "Wähle eine DOL vom Spiel" - -msgid "Sept" -msgstr "September" - -msgid "Set Search-Filter" -msgstr "Setze Suchfilter" - -msgid "Settings" -msgstr "Einstellungen" - -msgid "Show Free Space" -msgstr "Zeige frei. Speicher" - -msgid "Shutdown System" -msgstr "System herunterfahren" - -msgid "Shutdown Wii" -msgstr "Wii ausschalten" - -msgid "Sort alphabetically" -msgstr "Alphabetisch ordnen" - -msgid "Sort by number of players" -msgstr "Sortiere nach Spielerzahl" - -msgid "Sort by rank" -msgstr "Nach Bewertungen ordnen" - -msgid "Sort order by most played" -msgstr "Nach Spielzähler ordnen" - -msgid "Sound" -msgstr "Ton" - -msgid "Sound Settings" -msgstr "Ton Einstellungen" - -msgid "Sound+BGM" -msgstr "mit Hintergrundmusik" - -msgid "Sound+Quiet" -msgstr "ohne Hintergrundmusik" - -msgid "Spanish" -msgstr "Spanisch" - -msgid "Special thanks to:" -msgstr "Besonderen Dank an:" - -msgid "Split each 2GB" -msgstr "Teile alle 2GB" - -msgid "Split each 4GB" -msgstr "Teile alle 4GB" - -msgid "Standby" -msgstr "Standby" - -msgid "Success" -msgstr "Erfolgreich" - -msgid "Success:" -msgstr "Erfolgreich:" - -msgid "Successfully Saved" -msgstr "Erfolgreich gespeichert" - -msgid "Successfully Updated" -msgstr "Erfolgreich aktualisiert" - -msgid "Successfully Updated thanks to www.techjawa.com" -msgstr "Erfolgreich aktualisiert. Danke an www.techjawa.com" - -msgid "Successfully deleted:" -msgstr "Erfolgreich gelöscht:" - -msgid "Successfully extracted theme." -msgstr "Theme erfolgreich entpackt." - -msgid "Successfully installed:" -msgstr "Erfolgreich installiert:" - -msgid "Sync FAT32 FS Info" -msgstr "Sync. FAT32 FS Info" - -msgid "Synchronizing..." -msgstr "Synchronisiere..." - -msgid "System Default" -msgstr "Konsolenstandard" - -msgid "TChinese" -msgstr "Traditionelles Chinesisch" - -msgid "TXT Cheatcodes Path" -msgstr "TXT Cheatdateien" - -msgid "The .them file was not found in the zip." -msgstr "Die .them Datei wurde in der zip nicht gefunden." - -msgid "The entered directory does not exist. Would you like to create it?" -msgstr "Das eingegebene Verzeichnis existiert nicht. Möchtest du es erstellen?" - -msgid "The game installation is disabled under this IOS because of instability in usb write." -msgstr "Das Installieren von Spielen ist bei Verwendung dieses IOS wegen Instabilität beim USB-Schreiben deaktiviert." - -msgid "The wad file was installed" -msgstr "Die Wad Datei wurde installiert" - -#, c-format -msgid "The wad installation failed with error %i" -msgstr "Die Wad installation schlug fehl mit dem Fehler %i" - -msgid "Theme Downloader" -msgstr "Theme Downloader" - -msgid "Theme Menu" -msgstr "Theme Menü" - -msgid "Theme Path" -msgstr "Theme" - -msgid "Theme Title:" -msgstr "Name:" - -msgid "Themes by www.spiffy360.com" -msgstr "Themes von www.spiffy360.com" - -msgid "This IOS is the BootMii ios. If you are sure it is not BootMii and you have something else installed there than ignore this warning." -msgstr "Dieses IOS ist das BootMii IOS. Solltest du sicher sein, dass es nicht das BootMii IOS ist und du dort etwas anderes installiert hast, ignoriere diese Warnung." - -msgid "This IOS was not found on the titles list. If you are sure you have it installed than ignore this warning." -msgstr "Dieses IOS wurde nicht in der Titelliste gefunden. Wenn su sicher bist sie installiert zu haben, ignoriere die Warnung." - -msgid "Time left:" -msgstr "Noch:" - -msgid "Title Launcher" -msgstr "Channel Launcher" - -msgid "Titles from WiiTDB" -msgstr "Namen aus WiiTDB" - -msgid "Tooltips" -msgstr "Quickinfo" - -msgid "Transfer failed" -msgstr "Transfer fehlgeschlagen" - -msgid "USB Device not found" -msgstr "USB Gerät nicht gefunden." - -msgid "USB Loader GX is protected" -msgstr "USB Loader GX ist jetzt geschützt." - -msgid "USB Port" -msgstr "USB Port" - -msgid "USB Port changing is only supported on Hermes cIOS." -msgstr "USB-Portwechsel wird nur vom Hermes cIOS unterstützt." - -msgid "Uninstall" -msgstr "Deinstallieren" - -msgid "Uninstall Game" -msgstr "Spiel deinstallieren" - -msgid "Uninstall Menu" -msgstr "Deinstallationsmenü" - -msgid "Uninstall all" -msgstr "Alles deinstallieren" - -msgid "Uninstalling wad" -msgstr "Deinstalliere WAD" - -msgid "Unknown" -msgstr "Unbekannt" - -msgid "Unlock USB Loader GX" -msgstr "Entsperre USB Loader GX" - -msgid "Unlocked" -msgstr "Entsperrt" - -msgid "Unsupported format, try to extract manually TempTheme.zip." -msgstr "Nichtunterstütztes Format, versuche die TempTheme.zip manuell zu entpacken." - -msgid "Update" -msgstr "Update" - -msgid "Update All" -msgstr "Alles Updaten" - -msgid "Update DOL" -msgstr "Nur DOL" - -msgid "Update Files" -msgstr "Aktualisieren" - -msgid "Update Path" -msgstr "Updates" - -msgid "Update all Language Files" -msgstr "Sprachdateien aktualisieren" - -msgid "Update failed" -msgstr "Update fehlgeschlagen" - -msgid "Update successfull" -msgstr "Update erfolgreich" - -msgid "Updating Language Files:" -msgstr "Aktualisiere Sprachdateien:" - -msgid "Uploaded ZIP file installed to homebrew directory." -msgstr "Die hochgeladene ZIP Datei wurde ins Homebrew Verzeichnis installiert." - -msgid "VIDTV Patch" -msgstr "VIDTV Patch" - -msgid "Version:" -msgstr "Version:" - -#, c-format -msgid "Version: %s" -msgstr "Version: %s" - -msgid "Video Mode" -msgstr "Videomodus" - -msgid "WDM Files Path" -msgstr "WDM Dateien" - -msgid "WIP Patches Path" -msgstr "WIP Patches" - -msgid "Waiting..." -msgstr "Warte..." - -msgid "Warning:" -msgstr "Warnung:" - -msgid "What do you want to update?" -msgstr "Was möchtest du aktualisieren?" - -msgid "What should be deleted for this game title:" -msgstr "Was sollte bei diesem Spiel gelöscht werden:" - -msgid "WiFi Features" -msgstr "WiFi Fähigkeiten" - -msgid "Widescreen Fix" -msgstr "Breitbild (16:9)" - -msgid "Wii Menu" -msgstr "Wii Menü" - -msgid "Wii Settings" -msgstr "Wii Datenverwaltung" - -msgid "WiiTDB Files" -msgstr "WiiTDB Dateien" - -msgid "WiiTDB Path" -msgstr "WiiTDB" - -msgid "WiiTDB is up to date." -msgstr "WiiTDB ist aktuell." - -msgid "Wiilight" -msgstr "Licht am Laufwerk" - -msgid "Wrong Password" -msgstr "Falsches Passwort" - -msgid "Yes" -msgstr "Ja" - -msgid "You are currently using IOS" -msgstr "Du benutzt zur Zeit das IOS" - -msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." -msgstr "Es wird versucht eine FAT32/NTFS/EXT Partition mit dem cIOS 249 Rev < 18 auszuwählen. Das wird nicht unterstützt. Weiter auf eigene Gefahr." - -msgid "You need to select or format a partition" -msgstr "Du must eine Partition auswählen oder formatieren." - -msgid "and translators for language files updates" -msgstr "und Übersetzer für Sprachdateien Updates" - -msgid "available" -msgstr "verfügbar" - -msgid "does not exist!" -msgstr "existiert nicht!" - -msgid "does not exist! Loading game without cheats." -msgstr "existiert nicht! Spiel wird ohne Cheats gestartet." - -msgid "files left" -msgstr "Dateien fehlen" - -msgid "for FAT/NTFS support" -msgstr "für den FAT/NTFS Support" - -msgid "for Ocarina" -msgstr "für Ocarina" - -msgid "for WiiTDB and hosting covers / disc images" -msgstr "für WiiTDB und dem Hosten der (Disc) Cover" - -msgid "for diverse patches" -msgstr "für diverse Patches" - -msgid "for his awesome tool LibWiiGui" -msgstr "für sein großartiges Tool LibWiiGui" - -msgid "for hosting the themes" -msgstr "für das Hosten der Themes" - -msgid "for hosting the update files" -msgstr "für das Hosten der Updates" - -msgid "for the USB Loader source" -msgstr "für die Veröffentlichung des USB Loader-Quellcodes" - -msgid "formatted!" -msgstr "formatiert!" - -msgid "free" -msgstr "frei" - -msgid "not set" -msgstr "Nicht gesetzt" - -msgid "of" -msgstr "von" - -msgid "seconds left" -msgstr "Sekunden verbleiben" - -#~ msgid "Author:" -#~ msgstr "Autor:" - -#~ msgid "Do you want to load this theme?" -#~ msgstr "Soll dieses Theme geladen werden?" - -#~ msgid "Loading default theme." -#~ msgstr "Lade Standardtheme" - -#~ msgid "Theme path is changed." -#~ msgstr "Theme Pfad geändert." - -#~ msgid "Use IOS58" -#~ msgstr "Benutze IOS58" - -#~ msgid "Custom Disc Images" -#~ msgstr "Eigene DVD Bilder" - -#~ msgid "Download Boxart image?" -#~ msgstr "Cover herunterladen?" - -#~ msgid "Download Discart image?" -#~ msgstr "Disc Cover herunterladen?" - -#~ msgid "Downloading file" -#~ msgstr "Theme wird heruntergeladen" - -#~ msgid "Missing files" -#~ msgstr "Fehlende Dateien" - -#~ msgid "Original Disc Images" -#~ msgstr "Original DVD Bilder" - -#~ msgid "files not found on the server!" -#~ msgstr "Dateien auf dem Server nicht gefunden!" - -#~ msgid "Disc Images" -#~ msgstr "Disk Cover" - -#~ msgid "Downloading covers" -#~ msgstr "Lade Cover herunter" - -#~ msgid "Only Customs" -#~ msgstr "Nur Community" - -#~ msgid "Only Original" -#~ msgstr "Nur Originale" - -#~ msgid "Trying custom Discarts" -#~ msgstr "Probiere community Diskcover" - -#~ msgid "Trying original Discarts" -#~ msgstr "Probiere original Diskcover" - -#~ msgid "Do you really want to delete:" -#~ msgstr "Löschvorgang bestätigen:" - -#~ msgid "Do you want to use the alternate DOL that is known to be correct?" -#~ msgstr "Die bekannte Alternative DOL verwenden?" - -#~ msgid "0 (Locked and Unlocked Games)" -#~ msgstr "0 (Gesperrte und nichtgesperrte Spiele)" - -#~ msgid "1 (Unlocked Games Only)" -#~ msgstr "1 (Nur nichtgesperrte Spiele)" - -#~ msgid "BETA revisions" -#~ msgstr "BETA Revisionen" - -#~ msgid "GamesLevel" -#~ msgstr "Spiele Level" - -#~ msgid "Unlock console to use this option." -#~ msgstr "Entsperre den Loader, um diese Option zu nutzen." - -#~ msgid "Enabling this option on a FAT partition might slow the startup of the loader." -#~ msgstr "Das Aktivieren dieser Option auf einer FAT Partition könnte das Starten des Loaders verlangsamen." - -#~ msgid "Full Shutdown" -#~ msgstr "Komplett ausschalten" - -#~ msgid "GXtheme.cfg not found in any subfolder." -#~ msgstr "GXtheme.cfg in keinem Unterordner gefunden." - -#~ msgid "If you don't have WiFi, press 1 to get an URL to get your WiiTDB.zip" -#~ msgstr "Wenn du kein WiFi hast, drücke 1 um eine URL zu generieren." - -#~ msgid "Paste it into your browser to get your WiiTDB.zip." -#~ msgstr "Füge sie in deinen Browser ein, um die WiiTDB.zip zu erhalten." - -#~ msgid "Shutdown to Idle" -#~ msgstr "WiiConnect24 an" - -#~ msgid "Your URL has been saved in %sWiiTDB_URL.txt." -#~ msgstr "Deine URL wurde in %sWiiTDB_URL.txt gespeichert." - -#~ msgid "%s : %s May not boot correctly if your System Menu is not up to date." -#~ msgstr "%s : %s startet evtl. nicht richtig, falls dein System Menü nicht aktuell ist." - -#~ msgid "All partitions" -#~ msgstr "Alle Partitionen" - -#~ msgid "An Error occured" -#~ msgstr "Ein Fehler ist aufgetreten." - -#~ msgid "Are you sure you want to enable Parent Control?" -#~ msgstr "Bist du sicher, dass du die Altersbeschränkung aktivieren möchtest?" - -#~ msgid "BCA Codes Path changed" -#~ msgstr "Pfad geändert" - -#~ msgid "Back to Loader" -#~ msgstr "Homebrewkanal" - -#~ msgid "Back to Wii Menu" -#~ msgstr "Wii Menü" - -#~ msgid "Can't create file" -#~ msgstr "Datei kann nicht erstellt werden." - -#~ msgid "Channels" -#~ msgstr "Kanäle" - -#~ msgid "Checking existing artwork" -#~ msgstr "Prüfe existierende Artworks" - -#~ msgid "Checking for Updates" -#~ msgstr "Suche nach Updates" - -#~ msgid "Confirm" -#~ msgstr "Bestätigen" - -#~ msgid "Connection lost..." -#~ msgstr "Verbindung abgebrochen..." - -#~ msgid "Could not find a WBFS partition." -#~ msgstr "Es wurde keine WBFS Partition gefunden." - -#~ msgid "Could not open WBFS partition" -#~ msgstr "WBFS Partition konnte nicht geöffnet werden." - -#~ msgid "Could not read the disc." -#~ msgstr "Disk konnte nicht gelesen werden." - -#~ msgid "Could not set USB." -#~ msgstr "USB konnte nicht gesetzt werden." - -#~ msgid "Cover Path Changed" -#~ msgstr "Pfad geändert" - -#~ msgid "DOL path changed" -#~ msgstr "Pfad geändert" - -#~ msgid "Disc Path Changed" -#~ msgstr "Pfad geändert" - -#~ msgid "Display favorites" -#~ msgstr "Favoriten anzeigen" - -#~ msgid "Do you want to retry for 30 secs?" -#~ msgstr "30 Sekunden lang erneut versuchen?" - -#~ msgid "Download failed." -#~ msgstr "Download fehlgeschlagen" - -#~ msgid "Download request failed." -#~ msgstr "Downloadanfrage fehlgeschlagen" - -#~ msgid "Downloading" -#~ msgstr "Dateien werden heruntergeladen" - -#~ msgid "Downloading Page List:" -#~ msgstr "Liste der nächsten Seite wird geladen:" - -#~ msgid "Enable Parental Control" -#~ msgstr "Altersbeschränkung aktivieren" - -#~ msgid "FAT: Use directories" -#~ msgstr "FAT: Unterverzeichnise" - -#~ msgid "Force" -#~ msgstr "Erzwinge" - -#~ msgid "GCT Cheatcodes Path changed" -#~ msgstr "Pfad geändert" - -#~ msgid "Game partition" -#~ msgstr "Spielpartition" - -#~ msgid "Hermes CIOS" -#~ msgstr "Hermes' cIOS" - -#~ msgid "Homebrew Appspath changed" -#~ msgstr "Pfad geändert" - -#~ msgid "Insert an SD-Card to download images." -#~ msgstr "SD Card einlegen um Bilder herunterzuladen." - -#~ msgid "Insert an SD-Card to save." -#~ msgstr "SD Card einlegen um zu Speichern." - -#~ msgid "Insert an SD-Card to use this option." -#~ msgstr "SD Card einlegen um diese Option zu nutzen." - -#~ msgid "Install 1:1 Copy" -#~ msgstr "1:1 Kopie installieren" - -#~ msgid "Install not possible" -#~ msgstr "Installation nicht möglich" - -#~ msgid "Invalid PIN code" -#~ msgstr "Ungültiger PIN Code" - -#~ msgid "Most likely it has dimensions that are not evenly divisible by 4." -#~ msgstr "Höchstwahrscheinlich sind Breite und Höhe keine Vielfachen von 4." - -#~ msgid "Network init error" -#~ msgstr "Netzwerkinitialisierungsfehler" - -#~ msgid "No .dol or .elf files found." -#~ msgstr "Keine .dol oder .elf Dateien gefunden." - -#~ msgid "No Favorites" -#~ msgstr "Keine Favoriten" - -#~ msgid "No SD-Card inserted!" -#~ msgstr "Keine SD Card eingelegt!" - -#~ msgid "No USB Device" -#~ msgstr "Kein USB Gerät" - -#~ msgid "No USB Device found." -#~ msgstr "Kein USB Gerät gefunden." - -#~ msgid "No WBFS or FAT/NTFS partition found" -#~ msgstr "Keine WBFS oder FAT/NTFS Partition gefunden" - -#~ msgid "Normal Covers" -#~ msgstr "2D Cover" - -#~ msgid "Not Found" -#~ msgstr "Nicht gefunden" - -#~ msgid "Not a DOL/ELF file." -#~ msgstr "Das ist keine DOL/ELF Datei." - -#~ msgid "Parental Control disabled" -#~ msgstr "Altersbeschränkung ausgeschaltet" - -#~ msgid "Reset to standard BGM?" -#~ msgstr "Auf Standard zurücksetzen?" - -#~ msgid "Save Failed" -#~ msgstr "Speichern fehlgeschlagen" - -#~ msgid "Selected DOL" -#~ msgstr "Ausgewählte DOL" - -#~ msgid "TXT Cheatcodes Path changed" -#~ msgstr "Pfad geändert" - -#~ msgid "The wad file was installed. But It could not be deleted from the SD card." -#~ msgstr "Die WAD Datei wurde installiert. Sie konnte aber nicht von der SD Karte gelöscht werden." - -#~ msgid "The wad installation failed with error %ld" -#~ msgstr "Die WAD Installation schlug fehl mit Fehler %ld" - -#~ msgid "Theme Download Path" -#~ msgstr "Theme Downloader" - -#~ msgid "Theme Download Path changed" -#~ msgstr "Pfad geändert" - -#~ msgid "Theme Path Changed" -#~ msgstr "Pfad geändert" - -#~ msgid "Transfer failed." -#~ msgstr "Übertragung fehlgeschlagen" - -#~ msgid "USB Loader GX will only run with Hermes CIOS rev 4! Please make sure you have revision 4 installed!" -#~ msgstr "Hermes' cIOS funktioniert beim USB Loader GX nur mit rev4! Bitte versichere dich, dass du rev4 installiert hast!" - -#~ msgid "Unable to open the wad that was just downloaded (%s)." -#~ msgstr "Die WAD Datei, die gerade heruntergeladen wurde (%s), konnte nicht geöffnet werden." - -#~ msgid "Unlock Parental Control" -#~ msgstr "Altersbeschränkung deaktivieren" - -#~ msgid "Unsupported format, try to extract manually." -#~ msgstr "Nicht unterstütztes Format. Versuch es manuell zu Entpacken." - -#~ msgid "Update Path changed." -#~ msgstr "Pfad geändert" - -#~ msgid "Update to" -#~ msgstr "Aktualisiere auf" - -#~ msgid "Updating" -#~ msgstr "Aktualisiere" - -#~ msgid "Updating Language Files..." -#~ msgstr "Aktualisiere Sprachdateien..." - -#~ msgid "Updating WiiTDB.zip" -#~ msgstr "Aktualisiere WiiTDB" - -#~ msgid "WIP Patches Path changed" -#~ msgstr "Pfad geändert" - -#~ msgid "Waiting for USB Device" -#~ msgstr "Warte auf USB Gerät" - -#~ msgid "WiiTDB Path changed." -#~ msgstr "Pfad geändert" - -#~ msgid "You are about to delete " -#~ msgstr "Du bist dabei zu löschen " - -#~ msgid "You are choosing to display favorites and you do not have any selected." -#~ msgstr "Du möchtest Favoriten anzeigen lassen, 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 "Du benutzt das NTFS Dateisystem. Wegen möglicher Schreibfehler auf einer NTFS Partition, ist das Installieren eines Spiels nicht möglich." - -#~ 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 Wii-Altersbeschränkung nicht aktiviert. Wenn du sie nutzen möchtest, aktiviere sie in den Wii-Systemeinstellungen." - -#~ msgid "You have attempted to load a bad image" -#~ msgstr "Du hast versucht ein 'schlechtes Bild' zu laden." - -#~ msgid "and translaters for language files updates" -#~ msgstr "und den Übersetzern der Sprachdateien" - -#~ msgid "does not exist! You Messed something up, Idiot." -#~ msgstr "existiert nicht! Du hast was falsch gemacht, Idiot." - -#~ msgid "file left" -#~ msgstr "Datei fehlt" diff --git a/Languages/hungarian.lang b/Languages/hungarian.lang deleted file mode 100644 index 9c4c3c82..00000000 --- a/Languages/hungarian.lang +++ /dev/null @@ -1,1812 +0,0 @@ -# USB Loader GX language source file. -# hungarian.lang - r878 -# don't delete/change this line (é). -msgid "" -msgstr "" -"Project-Id-Version: USB Loader GX\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-06 19:36+0100\n" -"PO-Revision-Date: 2009-12-29 11:05+0100\n" -"Last-Translator: Springdale\n" -"Language-Team: Tusk, Springdale\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -msgid " Wad Saved as:" -msgstr "Wad elmentve mint:" - -msgid " could not be downloaded." -msgstr "nem letölthetõ." - -msgid " has been Saved. The text has not been verified. Some of the code may not work right with each other. If you experience trouble, open the text in a real text editor for more information." -msgstr "elmentve. A fájl nincs ellenõrizve, és egyes kódok nem feltétlenül működnek együtt. Probléma esetén további információért nyisd meg a fájlt szövegszerkesztõvel." - -msgid " is not on the server." -msgstr "nincs a szerveren." - -#, c-format -msgid "%i files not found on the server!" -msgstr "" - -#, c-format -msgid "%i missing files" -msgstr "" - -msgid "0 (Everyone)" -msgstr "0 (Mindenkinek)" - -msgid "1 (Child 7+)" -msgstr "1 (Gyermekeknek 12+)" - -msgid "1 hour" -msgstr "1 óra" - -msgid "10 min" -msgstr "10 perc" - -msgid "2 (Teen 12+)" -msgstr "2 (Tinédzserek 14+)" - -msgid "20 min" -msgstr "20 perc" - -msgid "2D Cover Path" -msgstr "2D Boritó Útvonala" - -msgid "3 (Mature 16+)" -msgstr "3 (Kamaszok 16+)" - -msgid "3 min" -msgstr "3 perc" - -msgid "30 min" -msgstr "30 perc" - -msgid "3D Cover Path" -msgstr "3D Boritó Útvonala" - -msgid "3D Covers" -msgstr "3D Borítók" - -msgid "4 (Adults Only 18+)" -msgstr "4 (Felnõtteknek 18+)" - -msgid "5 min" -msgstr "5 perc" - -msgid ">> Deleting tickets..." -msgstr ">> Ticket-ek törlése..." - -msgid ">> Deleting tickets...ERROR! " -msgstr ">> Ticket-ek törlése...HIBA!" - -msgid ">> Deleting tickets...Ok! " -msgstr ">> Ticket-ek törlése...Ok!" - -msgid ">> Deleting title ...ERROR! " -msgstr ">> Title törlése...HIBA!" - -msgid ">> Deleting title ...Ok!" -msgstr ">> Title törlése...Ok!" - -msgid ">> Deleting title contents..." -msgstr ">> Title tartalom törlése..." - -msgid ">> Deleting title contents...ERROR! " -msgstr ">> Title tartalom törlése...HIBA!" - -msgid ">> Deleting title contents...Ok!" -msgstr ">> Title tartalom törlése...Ok!" - -msgid ">> Deleting title..." -msgstr ">> Title törlése..." - -msgid ">> Finishing installation..." -msgstr ">> Telepítés befejezése..." - -msgid ">> Installing content #" -msgstr ">> Telepítés: tartalom #" - -msgid ">> Installing ticket..." -msgstr ">> Ticket telepítése" - -msgid ">> Installing title..." -msgstr ">> Title telepítése..." - -msgid ">> Reading WAD data..." -msgstr ">> WAD adatok olvasása..." - -msgid ">> Reading WAD data...ERROR! " -msgstr ">> WAD adatok olvasása...HIBA!" - -msgid ">> Reading WAD data...Ok!" -msgstr ">> WAD adatok olvasása...Ok!" - -msgid "AUTO" -msgstr "" - -msgid "All Partitions" -msgstr "" - -msgid "All images downloaded successfully." -msgstr "" - -msgid "All the features of USB Loader GX are unlocked." -msgstr "Az USB Loader GX minden funkciója elérhetõ." - -msgid "Alternate DOL" -msgstr "Alternatív DOL" - -msgid "Anti" -msgstr "" - -msgid "App Language" -msgstr "Nyelv" - -msgid "Apply" -msgstr "" - -msgid "Apr" -msgstr "Ápr" - -msgid "Are you sure you want to lock USB Loader GX?" -msgstr "" - -msgid "Are you sure you want to reset?" -msgstr "" - -msgid "Are you sure?" -msgstr "Biztos vagy benne?" - -msgid "Aug" -msgstr "" - -msgid "Author(s):" -msgstr "" - -msgid "AutoInit Network" -msgstr "Hálózat AutoInit" - -msgid "Automatic port switching is done on the fly. You need to change all custom paths to SD-Card first for this option or else it could damage a filesystem." -msgstr "" - -msgid "BCA Codes Path" -msgstr "BCA kód útvonal" - -msgid "Back" -msgstr "Vissza" - -msgid "Back to HBC or Wii Menu" -msgstr "Visszatérés a HBC-be vagy Wii Menübe" - -msgid "Backgroundmusic" -msgstr "Háttérzene" - -msgid "Big thanks to:" -msgstr "Köszönet:" - -msgid "Block Cover Downloads" -msgstr "" - -msgid "Block Custom Paths" -msgstr "" - -msgid "Block Game Install" -msgstr "" - -msgid "Block Game Settings" -msgstr "" - -msgid "Block GameID Change" -msgstr "" - -msgid "Block Global Settings" -msgstr "" - -msgid "Block Gui Settings" -msgstr "" - -msgid "Block HBC Menu" -msgstr "" - -msgid "Block IOS Reload" -msgstr "IOS újratöltés blokkolása" - -msgid "Block Loader Settings" -msgstr "" - -msgid "Block Parental Settings" -msgstr "" - -msgid "Block Reset Settings" -msgstr "" - -msgid "Block Sound Settings" -msgstr "" - -msgid "Block Theme Downloader" -msgstr "" - -msgid "Block Theme Menu" -msgstr "" - -msgid "Block Title Launcher" -msgstr "" - -msgid "Block Updates" -msgstr "" - -msgid "Boot/Standard" -msgstr "Boot/Alapértelmezett" - -msgid "Boot?" -msgstr "" - -msgid "Both" -msgstr "Mindkettõ" - -msgid "Both Ports" -msgstr "" - -msgid "Can't be formatted" -msgstr "Nem Formázható" - -msgid "Can't create directory" -msgstr "Mappa nem hozható létre" - -#, c-format -msgid "Can't create path: %s" -msgstr "" - -msgid "Can't delete:" -msgstr "Nem törölhetõ" - -msgid "Cancel" -msgstr "Mégse" - -msgid "Cannot write to destination." -msgstr "" - -msgid "Change Play Path" -msgstr "" - -msgid "Cheatfile is blank" -msgstr "A cheat-fájl üres" - -msgid "Clear" -msgstr "" - -msgid "Click to Download Covers" -msgstr "Kattints a borítók letöltéséhez" - -msgid "Click to change game ID" -msgstr "Kattints a játékID megváltoztatásához" - -msgid "Clock" -msgstr "Óra" - -msgid "Close" -msgstr "Bezárás" - -msgid "Code Download" -msgstr "Kód letöltés" - -#, c-format -msgid "Coded by: %s" -msgstr "Kódolás: %s" - -msgid "Coding:" -msgstr "Kódolás:" - -msgid "Connection to server timed out." -msgstr "" - -msgid "Console" -msgstr "Konzol" - -msgid "Console Default" -msgstr "Konzol Alapértelmezett" - -msgid "Console Locked" -msgstr "Konzol Zárolva" - -msgid "Console must be unlocked for this option." -msgstr "" - -msgid "Console should be unlocked to modify it." -msgstr "A konzol zárolva, ezért nem változtatható meg." - -msgid "Continue to install game?" -msgstr "Játék telepítésének folytatása?" - -msgid "Controllevel" -msgstr "Kontrollszint" - -msgid "Correct Password" -msgstr "Helyes Jelszó" - -msgid "Could not connect to the server." -msgstr "" - -msgid "Could not create GCT file" -msgstr "Nem hozható létre GCT fájl" - -#, c-format -msgid "Could not create path: %s" -msgstr "" - -msgid "Could not find info for this game in the wiitdb.xml." -msgstr "" - -msgid "Could not initialize DIP module!" -msgstr "DIP modul nem tölthetõ be!" - -msgid "Could not initialize network!" -msgstr "Kapcsolat nem hozható létre!" - -msgid "Could not open Disc" -msgstr "Lemez nem betölthetõ" - -msgid "Could not open wiitdb.xml." -msgstr "" - -msgid "Could not save." -msgstr "A mentés nem sikerült." - -msgid "Cover Download" -msgstr "Boritó Letöltés" - -msgid "Create" -msgstr "Létrehozás" - -msgid "Credits" -msgstr "Készítõk" - -msgid "Custom Discarts" -msgstr "" - -msgid "Custom Paths" -msgstr "Egyéni útvonalak" - -msgid "Customs/Original" -msgstr "Egyéni/Eredeti" - -msgid "DOL Path" -msgstr "DOL Útvonal" - -msgid "Dec" -msgstr "" - -msgid "Default" -msgstr "Alapértelmezett" - -msgid "Default Gamesettings" -msgstr "Alapértelmezett beállítások" - -msgid "Default Settings" -msgstr "Alapértelmezett beállítások" - -msgid "Delete" -msgstr "Törlés" - -msgid "Delete ?" -msgstr "Törlés?" - -msgid "Delete Cheat GCT" -msgstr "Cheat GCT törlés" - -msgid "Delete Cheat TXT" -msgstr "Cheat TXT törlés" - -msgid "Delete Cover Artwork" -msgstr "Borító törlése" - -msgid "Delete Disc Artwork" -msgstr "Lemezfotó törlése" - -msgid "Design:" -msgstr "Felület:" - -msgid "Developed by" -msgstr "Készítette" - -msgid "Directory does not exist!" -msgstr "A könyvtár nem létezik!" - -msgid "Disc Artwork Download" -msgstr "Lemezfotó letöltése" - -msgid "Disc Artwork Path" -msgstr "Lemezképek Útvonala" - -msgid "Disc Default" -msgstr "Lemez Alapértelmezettje" - -msgid "DiskFlip" -msgstr "Lemezforgatás" - -msgid "Display" -msgstr "Játékinfo megj." - -msgid "Display as a carousel" -msgstr "Körhinta megjelenítés" - -msgid "Display as a grid" -msgstr "Rács megjelenítés" - -msgid "Display as a list" -msgstr "Lista megjelenítés" - -msgid "Display favorites only" -msgstr "" - -msgid "Do you want to apply it now?" -msgstr "Alkalmazás most?" - -msgid "Do you want to apply this theme?" -msgstr "" - -msgid "Do you want to change language?" -msgstr "Nyelv megváltoztatása?" - -msgid "Do you want to download this theme?" -msgstr "Téma letöltése?" - -msgid "Do you want to format:" -msgstr "Formázás?" - -msgid "Do you want to load the default theme?" -msgstr "" - -msgid "Do you want to sync free space info sector on all FAT32 partitions?" -msgstr "" - -msgid "Do you wish to update/download all language files?" -msgstr "Minden nyelvi fájl letöltése/frissítése?" - -msgid "Done!" -msgstr "Kész!" - -msgid "Download" -msgstr "Letöltés" - -msgid "Download Now" -msgstr "Letöltés most" - -msgid "Download finished" -msgstr "Letöltés kész" - -msgid "Downloading 3D Covers" -msgstr "" - -msgid "Downloading Flat Covers" -msgstr "" - -msgid "Downloading Full HQ Covers" -msgstr "" - -msgid "Downloading Full LQ Covers" -msgstr "" - -msgid "Downloading custom Discarts" -msgstr "" - -msgid "Downloading file..." -msgstr "" - -msgid "Downloading image:" -msgstr "Kép letöltése:" - -msgid "Downloading original Discarts" -msgstr "" - -msgid "Downloading pagelist:" -msgstr "" - -msgid "Dutch" -msgstr "Holland" - -msgid "ERROR" -msgstr "HIBA" - -msgid "ERROR:" -msgstr "HIBA:" - -msgid "ERROR: Can't set up theme." -msgstr "HIBA: Téma nem állítható be" - -msgid "English" -msgstr "Angol" - -msgid "Error" -msgstr "Hiba" - -msgid "Error !" -msgstr "Hiba !" - -msgid "Error 002 fix" -msgstr "Error 02 javítás" - -#, c-format -msgid "Error creating path: %s" -msgstr "" - -msgid "Error opening downloaded file" -msgstr "" - -msgid "Error reading Disc" -msgstr "Lemezolvasási hiba" - -#, c-format -msgid "Error when downloading file: %i" -msgstr "" - -msgid "Error while downloding file" -msgstr "" - -msgid "Error while opening the zip." -msgstr "" - -msgid "Error while transfering data." -msgstr "Adatátviteli hiba." - -msgid "Error while updating USB Loader GX." -msgstr "" - -msgid "Error writing the data." -msgstr "" - -msgid "Error..." -msgstr "Hiba..." - -msgid "Error:" -msgstr "Hiba:" - -msgid "Exit" -msgstr "" - -msgid "Exit to where?" -msgstr "" - -msgid "Extracting files..." -msgstr "Fájlok kicsomagolása..." - -msgid "Failed formating" -msgstr "Formázás sikertelen" - -msgid "Failed to extract." -msgstr "A kicsomagolás nem sikerült." - -msgid "Failed to open partition" -msgstr "Hiba a partíció megnyitásakor" - -msgid "Failed updating" -msgstr "" - -msgid "Feb" -msgstr "" - -msgid "File not found." -msgstr "Fájl nem található" - -#, c-format -msgid "Filesize is %i Byte." -msgstr "" - -msgid "Filesize is 0 Byte." -msgstr "" - -msgid "Finishing installation... Ok!" -msgstr "Telepítés befejezése...Ok!" - -msgid "Flat Covers" -msgstr "" - -msgid "Flip-X" -msgstr "" - -msgid "Force NTSC" -msgstr "" - -msgid "Force PAL50" -msgstr "" - -msgid "Force PAL60" -msgstr "" - -msgid "Format" -msgstr "Formázás" - -msgid "Formatting, please wait..." -msgstr "Formatálás folyamatban, kérlek várj..." - -msgid "Found missing images." -msgstr "" - -msgid "Free Space" -msgstr "Szabad Hely" - -msgid "French" -msgstr "Francia" - -msgid "Full Cover Path" -msgstr "" - -msgid "Full HQ Covers" -msgstr "" - -msgid "Full LQ Covers" -msgstr "" - -msgid "Full Menu" -msgstr "" - -msgid "Full shutdown" -msgstr "" - -msgid "GAMEID_Gamename" -msgstr "" - -msgid "GCT Cheatcodes Path" -msgstr "Kódok Útvonala" - -msgid "GCT File created" -msgstr "GCT Fájl létrehozva" - -msgid "GUI Settings" -msgstr "Kezelõfelület" - -msgid "Game ID" -msgstr "Játék ID" - -msgid "Game IOS" -msgstr "" - -msgid "Game Language" -msgstr "Játéknyelv" - -msgid "Game Load" -msgstr "Játék Betöltés" - -msgid "Game Lock" -msgstr "" - -msgid "Game Only" -msgstr "" - -msgid "Game Region" -msgstr "Játék Régió" - -msgid "Game Size" -msgstr "Játék Méret" - -msgid "Game Sound Mode" -msgstr "Játék Banner hang" - -msgid "Game Sound Volume" -msgstr "Játék Banner hangerő" - -msgid "Game Split Size" -msgstr "" - -msgid "Game is already installed:" -msgstr "A játék már fel van telepítve:" - -msgid "Game/Install Partition" -msgstr "" - -msgid "Gamename [GAMEID]" -msgstr "" - -msgid "Games" -msgstr "Játékok" - -msgid "Genre:" -msgstr "" - -msgid "German" -msgstr "Német" - -msgid "Global Settings" -msgstr "" - -msgid "HOME Menu" -msgstr "HOME Menü" - -msgid "Homebrew Apps Path" -msgstr "Homebrew Útvonal" - -msgid "Homebrew Channel" -msgstr "" - -msgid "Homebrew Launcher" -msgstr "Homebrew indító" - -msgid "Hour" -msgstr "Óra" - -msgid "How do you want to update?" -msgstr "Hogyan szeretnél frissíteni?" - -msgid "How to Shutdown?" -msgstr "Hogyan kapcsoljon ki?" - -#, c-format -msgid "Incoming file %0.2fKB" -msgstr "Bejövõ fájl %0.2fKB" - -#, c-format -msgid "Incoming file %0.2fMB" -msgstr "Bejövõ fájl %0.2fMB" - -msgid "Initializing Network" -msgstr "Hálózat inicializálása..." - -msgid "Insert Disk" -msgstr "Helyezz be egy lemezt" - -msgid "Insert a Wii Disc!" -msgstr "Helyezz be Wii lemezt!" - -msgid "Install" -msgstr "Telepítés" - -msgid "Install Error!" -msgstr "Telepítési Hiba!" - -msgid "Install a game" -msgstr "Játék telepítése" - -msgid "Install directories" -msgstr "" - -msgid "Install partitions" -msgstr "Partíciók telepítése" - -msgid "Installing content... Ok!" -msgstr "Tartalom telepítése... Ok!" - -msgid "Installing game:" -msgstr "Játék telepítése" - -msgid "Installing ticket... Ok!" -msgstr "Ticket telepítése... Ok!" - -msgid "Installing title... Ok!" -msgstr "Title telepítése... Ok!" - -msgid "Installing wad" -msgstr "Wad telepítése" - -msgid "Issue manager /" -msgstr "" - -msgid "It seems that you have some information that will be helpful to us. Please pass this information along to the DEV team." -msgstr "Számunkra segítõ információid lehetnek - kérlek továbbítsd ezeket a fejlesztõi csapat felé." - -msgid "Italian" -msgstr "Olasz" - -msgid "Jan" -msgstr "" - -msgid "Japanese" -msgstr "Japán" - -msgid "July" -msgstr "Júl" - -msgid "June" -msgstr "Jún" - -msgid "Keep" -msgstr "Megtartás" - -msgid "Keyboard" -msgstr "Billenyûzet" - -msgid "Korean" -msgstr "Koreai" - -msgid "Language File" -msgstr "Nyelvi fájl" - -msgid "Language change:" -msgstr "Nyelv választás:" - -msgid "Languagefiles Path" -msgstr "" - -msgid "Languagepath changed." -msgstr "Nyelvek útvonala megváltozott." - -msgid "Left" -msgstr "Balra" - -msgid "Like SysMenu" -msgstr "Mint a Rendszermenü" - -msgid "List on Gamelaunch" -msgstr "" - -msgid "Load" -msgstr "Betöltés" - -msgid "Load From SD/USB" -msgstr "Betöltés SD/USB-rõl" - -#, c-format -msgid "Load file from: %s ?" -msgstr "Fájl betöltése innen: %s ?" - -msgid "Load this DOL as alternate DOL?" -msgstr "DOL betöltése alternatív DOL-ként?" - -msgid "Loader Settings" -msgstr "" - -msgid "Loading standard language." -msgstr "Alapnyelv betõltése" - -msgid "Loading standard music." -msgstr "Alapzene betõltése" - -msgid "Lock Console" -msgstr "Konzol Lezárása" - -msgid "Lock USB Loader GX" -msgstr "" - -msgid "Locked" -msgstr "Lezárva" - -msgid "Loop Directory" -msgstr "" - -msgid "Loop Music" -msgstr "" - -msgid "Loop Sound" -msgstr "Folyamatos hang" - -msgid "Main tester:" -msgstr "" - -msgid "Mar" -msgstr "Már" - -msgid "Mark new games" -msgstr "Új játékok megjelölése" - -msgid "May" -msgstr "Máj" - -msgid "Messageboard Update" -msgstr "" - -msgid "Motion+ Video" -msgstr "" - -msgid "Mount DVD drive" -msgstr "DVD meghajtó felcsatolása" - -msgid "Multiple Partitions" -msgstr "" - -msgid "Music Loop Mode" -msgstr "" - -msgid "Music Volume" -msgstr "Zene Hangerõ" - -msgid "Neither" -msgstr "Egyik sem" - -msgid "Network is not initiated." -msgstr "" - -msgid "New Disc Detected" -msgstr "Új lemez észlelve" - -msgid "Next" -msgstr "Következõ" - -msgid "No" -msgstr "Nem" - -msgid "No Cheatfile found" -msgstr "Kód nem található" - -msgid "No DOL file found on disc." -msgstr "Nem található DOL fájl a lemezen." - -msgid "No Splitting" -msgstr "" - -msgid "No URL or Path specified." -msgstr "" - -msgid "No WBFS or FAT/NTFS/EXT partition found" -msgstr "" - -msgid "No cheats were selected" -msgstr "Nincsenek kiválasztott cheat-ek" - -msgid "No data could be read." -msgstr "Adat nem olvasható." - -msgid "No favorites selected." -msgstr "" - -msgid "No file missing!" -msgstr "Egy fájl sem hiányzik!" - -msgid "No new updates." -msgstr "Nincs elérhetõ frissítés." - -msgid "No themes found on the site." -msgstr "Nem találhatóak témák az oldalon." - -msgid "No themes found." -msgstr "" - -msgid "None" -msgstr "" - -msgid "Normal" -msgstr "Normális" - -msgid "Not a WAD file." -msgstr "" - -msgid "Not a Wii Disc" -msgstr "Nem Wii lemez" - -msgid "Not a valid URL" -msgstr "" - -msgid "Not a valid URL path" -msgstr "" - -msgid "Not a valid domain" -msgstr "" - -msgid "Not enough free memory." -msgstr "Nincs elég memória." - -msgid "Not enough free space!" -msgstr "Nincs elég szabad hely" - -msgid "Not enough memory." -msgstr "" - -msgid "Not required" -msgstr "" - -msgid "Not supported format!" -msgstr "Nem támogatott formátum" - -msgid "Nov" -msgstr "" - -msgid "OFF" -msgstr "KI" - -msgid "OK" -msgstr "" - -msgid "ON" -msgstr "BE" - -msgid "Ocarina" -msgstr "" - -msgid "Oct" -msgstr "Okt" - -msgid "Official Site:" -msgstr "Hivatalos oldal:" - -msgid "Offset" -msgstr "" - -msgid "Only Game Partition" -msgstr "" - -msgid "Only for Install" -msgstr "Csak telepítéshez" - -msgid "Original Discarts" -msgstr "" - -msgid "Original/Customs" -msgstr "Eredeti/Egyéni" - -msgid "Parental Control" -msgstr "Szülõi Felügyelet" - -msgid "Partition" -msgstr "Partició" - -msgid "Password" -msgstr "Jelszó" - -msgid "Password Changed" -msgstr "Jelszó Megváltozott" - -msgid "Password has been changed" -msgstr "A Jelszó megváltozott" - -msgid "Patch Country Strings" -msgstr "Country String Patch" - -msgid "Path Changed" -msgstr "" - -msgid "Permission denied." -msgstr "" - -msgid "Pick from a list" -msgstr "Válassz a listából" - -msgid "Play Count" -msgstr "Indítások" - -msgid "Play Next" -msgstr "" - -msgid "Play Once" -msgstr "" - -msgid "Play Previous" -msgstr "" - -msgid "Playing Music:" -msgstr "" - -msgid "Please wait..." -msgstr "Kérlek várj..." - -msgid "Power off the Wii" -msgstr "Wii kikapcsolása" - -msgid "Prev" -msgstr "Elõzõ" - -msgid "Prompts Buttons" -msgstr "Gyors Gombok" - -msgid "Published by" -msgstr "Kiadta" - -msgid "Quick Boot" -msgstr "Gyors Boot" - -msgid "Random Directory Music" -msgstr "" - -msgid "Reading WAD data... Ok!" -msgstr "WAD adat olvasás... Ok!" - -msgid "Receiving file from:" -msgstr "Fájl fogadása innen:" - -msgid "Region Patch" -msgstr "" - -msgid "Released" -msgstr "Kiadva" - -msgid "Reload SD" -msgstr "SD Újratöltése" - -msgid "Remove update" -msgstr "" - -msgid "Rename Game on WBFS" -msgstr "WBFS játék átnevezése" - -msgid "Reset" -msgstr "" - -msgid "Reset BG Music" -msgstr "" - -msgid "Reset Playcounter" -msgstr "Elindítások nullázása" - -msgid "Reset to default BGM?" -msgstr "" - -msgid "Restarting..." -msgstr "Újraindítás..." - -msgid "Return" -msgstr "Vissza" - -msgid "Return To" -msgstr "" - -msgid "Return to Wii Menu" -msgstr "Vissza a Wii Menübe" - -msgid "Right" -msgstr "Jobb" - -msgid "Rumble" -msgstr "Rezgés" - -msgid "SChinese" -msgstr "SKínai" - -msgid "SFX Volume" -msgstr "Effekt Hangerõ" - -msgid "Save" -msgstr "Mentés" - -msgid "Save Failed. No device inserted?" -msgstr "" - -msgid "Save Game List to" -msgstr "Játéklista mentése ide:" - -msgid "Save List" -msgstr "" - -msgid "Saved" -msgstr "Elmentve" - -msgid "Screensaver" -msgstr "Képernyõkimélõ" - -msgid "Select" -msgstr "Válassz" - -msgid "Select DOL Offset" -msgstr "" - -msgid "Select a DOL" -msgstr "DOL kiválasztása" - -msgid "Select a DOL from Game" -msgstr "" - -msgid "Sept" -msgstr "Szep" - -msgid "Set Search-Filter" -msgstr "Keresés" - -msgid "Settings" -msgstr "Beállítások" - -msgid "Show Free Space" -msgstr "" - -msgid "Shutdown System" -msgstr "Leállítás" - -msgid "Shutdown Wii" -msgstr "" - -msgid "Sort alphabetically" -msgstr "Rendezés ABC-sorrendben" - -msgid "Sort by number of players" -msgstr "" - -msgid "Sort by rank" -msgstr "Rendezés rang szerint" - -msgid "Sort order by most played" -msgstr "Rendezés indítások száma szerint" - -msgid "Sound" -msgstr "Hang" - -msgid "Sound Settings" -msgstr "" - -msgid "Sound+BGM" -msgstr "Hang+háttérzene" - -msgid "Sound+Quiet" -msgstr "Csak hang" - -msgid "Spanish" -msgstr "Spanyol" - -msgid "Special thanks to:" -msgstr "Külön Köszönet:" - -msgid "Split each 2GB" -msgstr "" - -msgid "Split each 4GB" -msgstr "" - -msgid "Standby" -msgstr "" - -msgid "Success" -msgstr "Sikeres" - -msgid "Success:" -msgstr "Sikeres:" - -msgid "Successfully Saved" -msgstr "Sikeresen Mentve" - -msgid "Successfully Updated" -msgstr "Sikeres frissítés" - -msgid "Successfully Updated thanks to www.techjawa.com" -msgstr "" - -msgid "Successfully deleted:" -msgstr "Sikeresen törölve:" - -msgid "Successfully extracted theme." -msgstr "Téma kicsomagolva." - -msgid "Successfully installed:" -msgstr "Sikeresen telepítve:" - -msgid "Sync FAT32 FS Info" -msgstr "" - -msgid "Synchronizing..." -msgstr "" - -msgid "System Default" -msgstr "Rendszer Alapértelmezett" - -msgid "TChinese" -msgstr "Tradicionális Kínai" - -msgid "TXT Cheatcodes Path" -msgstr "TXT Cheatkódok Útvonala" - -msgid "The .them file was not found in the zip." -msgstr "" - -msgid "The entered directory does not exist. Would you like to create it?" -msgstr "A megadott könyvtár nem létezik. Létrehozzuk?" - -msgid "The game installation is disabled under this IOS because of instability in usb write." -msgstr "" - -msgid "The wad file was installed" -msgstr "" - -#, c-format -msgid "The wad installation failed with error %i" -msgstr "" - -msgid "Theme Downloader" -msgstr "Témák Letöltése" - -msgid "Theme Menu" -msgstr "" - -msgid "Theme Path" -msgstr "Témák Útvonala" - -msgid "Theme Title:" -msgstr "Téma címe:" - -msgid "Themes by www.spiffy360.com" -msgstr "" - -msgid "This IOS is the BootMii ios. If you are sure it is not BootMii and you have something else installed there than ignore this warning." -msgstr "" - -msgid "This IOS was not found on the titles list. If you are sure you have it installed than ignore this warning." -msgstr "" - -msgid "Time left:" -msgstr "Hátralevõ idõ" - -msgid "Title Launcher" -msgstr "Programindító" - -msgid "Titles from WiiTDB" -msgstr "Címek WiiTDB fájlból" - -msgid "Tooltips" -msgstr "Súgók" - -msgid "Transfer failed" -msgstr "" - -msgid "USB Device not found" -msgstr "USB Meghajtó nem található" - -msgid "USB Loader GX is protected" -msgstr "USB Loader GX levédve" - -msgid "USB Port" -msgstr "" - -msgid "USB Port changing is only supported on Hermes cIOS." -msgstr "" - -msgid "Uninstall" -msgstr "Törlés" - -msgid "Uninstall Game" -msgstr "Játék törlése" - -msgid "Uninstall Menu" -msgstr "Adatkezelés" - -msgid "Uninstall all" -msgstr "" - -msgid "Uninstalling wad" -msgstr "Wad törlése" - -msgid "Unknown" -msgstr "" - -msgid "Unlock USB Loader GX" -msgstr "" - -msgid "Unlocked" -msgstr "Feloldva" - -msgid "Unsupported format, try to extract manually TempTheme.zip." -msgstr "" - -msgid "Update" -msgstr "Frissítés" - -msgid "Update All" -msgstr "Minden Frissítése" - -msgid "Update DOL" -msgstr "DOL Frissítése" - -msgid "Update Files" -msgstr "Fájlok frissítése" - -msgid "Update Path" -msgstr "Frissítés Útvonala" - -msgid "Update all Language Files" -msgstr "Minden nyelvi fájl frissítése" - -msgid "Update failed" -msgstr "Frissítési hiba" - -msgid "Update successfull" -msgstr "" - -msgid "Updating Language Files:" -msgstr "Nyelvi fájlok frissítése:" - -msgid "Uploaded ZIP file installed to homebrew directory." -msgstr "Feltöltött ZIP fájl telepítve a Homebrew mappába." - -msgid "VIDTV Patch" -msgstr "" - -msgid "Version:" -msgstr "" - -#, c-format -msgid "Version: %s" -msgstr "Verzió: %s" - -msgid "Video Mode" -msgstr "Videó Mód" - -msgid "WDM Files Path" -msgstr "" - -msgid "WIP Patches Path" -msgstr "WIP Patch útvonal" - -msgid "Waiting..." -msgstr "Várakozás..." - -msgid "Warning:" -msgstr "" - -msgid "What do you want to update?" -msgstr "Mit szeretnél frissíteni?" - -msgid "What should be deleted for this game title:" -msgstr "" - -msgid "WiFi Features" -msgstr "WiFi Sajátosságok" - -msgid "Widescreen Fix" -msgstr "Szélesvászon Fix" - -msgid "Wii Menu" -msgstr "Wii Menü" - -msgid "Wii Settings" -msgstr "Wii Beállítások" - -msgid "WiiTDB Files" -msgstr "WiiTDB fájlok" - -msgid "WiiTDB Path" -msgstr "WiiTDB Útvonala" - -msgid "WiiTDB is up to date." -msgstr "" - -msgid "Wiilight" -msgstr "WiiFény" - -msgid "Wrong Password" -msgstr "Hibás Jelszó" - -msgid "Yes" -msgstr "Igen" - -msgid "You are currently using IOS" -msgstr "" - -msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." -msgstr "" - -msgid "You need to select or format a partition" -msgstr "Választanod vagy formáznod kell egy partíciót" - -msgid "and translators for language files updates" -msgstr "" - -msgid "available" -msgstr "elérhetõ" - -msgid "does not exist!" -msgstr "nem létezik!" - -msgid "does not exist! Loading game without cheats." -msgstr "nem létezik! Játék betöltése kódok nélkül." - -msgid "files left" -msgstr "hátralévõ fájl" - -msgid "for FAT/NTFS support" -msgstr "FAT/NTFS támogatás" - -msgid "for Ocarina" -msgstr ": Ocarina" - -msgid "for WiiTDB and hosting covers / disc images" -msgstr ": WiiTDB és borítók/lemezfotók" - -msgid "for diverse patches" -msgstr ": többféle patch" - -msgid "for his awesome tool LibWiiGui" -msgstr "-nak kiváló eszközéért: LibWiiGui" - -msgid "for hosting the themes" -msgstr ": témák tárhelye" - -msgid "for hosting the update files" -msgstr ": frissítési fájlok tárhelye" - -msgid "for the USB Loader source" -msgstr ": USB Loader forráskód" - -msgid "formatted!" -msgstr "Formázva!" - -msgid "free" -msgstr "szabad" - -msgid "not set" -msgstr "nem beállított" - -msgid "of" -msgstr "./" - -msgid "seconds left" -msgstr "hátralévõ másodperc" - -#~ msgid "Author:" -#~ msgstr "Készítõ:" - -#~ msgid "Download Boxart image?" -#~ msgstr "Borító letöltése?" - -#~ msgid "Download Discart image?" -#~ msgstr "Lemezfotó letöltése?" - -#~ msgid "Downloading file" -#~ msgstr "Fájl letöltése" - -#~ msgid "Missing files" -#~ msgstr "Hiányzó fájl" - -#~ msgid "files not found on the server!" -#~ msgstr "fájl nem található a szerveren" - -#~ msgid "Disc Images" -#~ msgstr "Lemezfotók" - -#~ msgid "Only Customs" -#~ msgstr "Csak egyéni" - -#~ msgid "Only Original" -#~ msgstr "Csak eredeti" - -#~ msgid "Do you really want to delete:" -#~ msgstr "Biztosan törlöd?" - -#~ msgid "Do you want to use the alternate DOL that is known to be correct?" -#~ msgstr "Köztudottan működõ alternatív DOL használata?" - -#~ msgid "BETA revisions" -#~ msgstr "Béta változatok" - -#~ msgid "Unlock console to use this option." -#~ msgstr "Zárolva a program, ezt nem használhatod." - -#~ msgid "Full Shutdown" -#~ msgstr "Teljes Kikapcsolás" - -#~ msgid "GXtheme.cfg not found in any subfolder." -#~ msgstr "GXtheme.cfg nem található." - -#~ msgid "If you don't have WiFi, press 1 to get an URL to get your WiiTDB.zip" -#~ msgstr "WiFi hiánya esetén nyomj 1-es gombot a WiiTDB.zip URL-ért." - -#~ msgid "Paste it into your browser to get your WiiTDB.zip." -#~ msgstr "Másold be a böngészõbe a WiiTDB.zip letöltéséhez." - -#~ msgid "Shutdown to Idle" -#~ msgstr "Készenlét" - -#~ msgid "Your URL has been saved in %sWiiTDB_URL.txt." -#~ msgstr "URL elmentve itt: %sWiiTDB_URL.txt" - -#~ msgid "Can't create file" -#~ msgstr "A fájl nem hozható létre." - -#~ msgid "Connection lost..." -#~ msgstr "A kapcsolat megszakadt..." - -#~ msgid "Download failed." -#~ msgstr "Sikertelen letöltés." - -#~ msgid "Download request failed." -#~ msgstr "Sikertelen letöltési kérelem." - -#~ msgid "Downloading Page List:" -#~ msgstr "Lista letöltése:" - -#~ msgid "Theme Download Path" -#~ msgstr "Téma Letöltés Útvonal" - -#~ msgid "Transfer failed." -#~ msgstr "Átviteli hiba." - -#~ msgid "Unsupported format, try to extract manually." -#~ msgstr "Nem támogatott formátum, próbáld manuálisan kicsomagolni." - -#~ msgid "and translaters for language files updates" -#~ msgstr "valamint minden fordító" - -#~ msgid "Insert an SD-Card to save." -#~ msgstr "Helyezz be egy SD Kártyát, hogy ments," - -#~ msgid "Insert an SD-Card to use this option." -#~ msgstr "Helyezz be egy SD Kártyát, hogy használhasd ezt a lehetõséget." - -#~ msgid "No SD-Card inserted!" -#~ msgstr "Nincs SD kártya behelyezve!" - -#~ msgid "Waiting for USB Device" -#~ msgstr "Várakozás az USB Meghajtóra" - -#~ msgid "Back to Loader" -#~ msgstr "HBC" - -#~ msgid "FAT: Use directories" -#~ msgstr "FAT: könyvtárak használata" - -#~ msgid "All partitions" -#~ msgstr "Minden partíció" - -#~ msgid "Game partition" -#~ msgstr "Játék partíció" - -#~ msgid "Install 1:1 Copy" -#~ msgstr "1:1 másolat telepítése" - -#~ msgid "An Error occured" -#~ msgstr "Hiba történt" - -#~ msgid "Are you sure you want to enable Parent Control?" -#~ msgstr "Szülõi felügyelet bekapcsolása?" - -#~ msgid "Checking for Updates" -#~ msgstr "Frissitések keresése..." - -#~ msgid "Downloading" -#~ msgstr "Letöltés" - -#~ msgid "Invalid PIN code" -#~ msgstr "Hibás PIN kód" - -#~ msgid "Parental Control disabled" -#~ msgstr "Szülõi felügyelet kikapcsolva" - -#~ msgid "The wad file was installed. But It could not be deleted from the SD card." -#~ msgstr "A wad fájl telepítése megtörtént, de nem volt törölhetõ az SD kártyáról." - -#~ msgid "The wad installation failed with error %ld" -#~ msgstr "A wad telepítés nem sikerült - hiba %ld" - -#~ msgid "Unable to open the wad that was just downloaded (%s)." -#~ msgstr "Az épp letöltött wad megnyitása nem sikerült (%s)." - -#~ msgid "Unlock Parental Control" -#~ msgstr "Szülõi felügyelet feloldása" - -#~ msgid "Update to" -#~ msgstr "Frissítés ide: " - -#~ msgid "Updating" -#~ msgstr "Frissítés" - -#~ msgid "Updating Language Files..." -#~ msgstr "Nyelvi fájlok frissítése..." - -#~ msgid "Updating WiiTDB.zip" -#~ msgstr "WiiTDB.zip frissítése" - -#~ msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." -#~ msgstr "A szülõi felügyelet nincs bekapcsolva - bekapcsolható a Wii Beállításokban." - -#~ msgid "%s : %s May not boot correctly if your System Menu is not up to date." -#~ msgstr "%s : %s Lehet, hogy nem fut megfelelõen, ha a System Menu nem a legfrissebb." - -#~ msgid "BCA Codes Path changed" -#~ msgstr "BCA kód útvonal megváltozott" - -#~ msgid "Back to Wii Menu" -#~ msgstr "Visszatérés a Wii Menübe" - -#~ msgid "Channels" -#~ msgstr "Csatornák" - -#~ msgid "Checking existing artwork" -#~ msgstr "Meglévõ képek ellenõrzése" - -#~ msgid "Confirm" -#~ msgstr "Megerõsítés" - -#~ msgid "Could not find a WBFS partition." -#~ msgstr "WBFS partíció nem található." - -#~ msgid "Could not open WBFS partition" -#~ msgstr "WBFS partíció nem nyitható meg." - -#~ msgid "Could not read the disc." -#~ msgstr "A lemez nem olvasható." - -#~ msgid "Could not set USB." -#~ msgstr "USB beállítási hiba." - -#~ msgid "Cover Path Changed" -#~ msgstr "Boritó útvonala megváltozott" - -#~ msgid "DOL path changed" -#~ msgstr "DOL útvonal megváltozott" - -#~ msgid "Disc Path Changed" -#~ msgstr "Borítók útvonala megváltoztatva" - -#~ msgid "Display favorites" -#~ msgstr "Kedvencek megjelenítése" - -#~ msgid "Do you want to retry for 30 secs?" -#~ msgstr "30 másodpercig szeretnéd még tovább próbálni?" - -#~ msgid "Enable Parental Control" -#~ msgstr "Szülői felügyelet bekapcsolása" - -#~ msgid "Force" -#~ msgstr "Kényszerítés" - -#~ msgid "GCT Cheatcodes Path changed" -#~ msgstr "Kódok útvonala megváltozott" - -#~ msgid "Homebrew Appspath changed" -#~ msgstr "Homebrew útvonal megváltoztatva" - -#~ msgid "Insert an SD-Card to download images." -#~ msgstr "Helyezz be egy SD Kártyát, hogy letöltsd a képeket." - -#~ msgid "Install not possible" -#~ msgstr "A telepítés nem lehetséges" - -#~ msgid "Most likely it has dimensions that are not evenly divisible by 4." -#~ msgstr "Vélhetõen méretei nem oszhatók 4-gyel." - -#~ msgid "Network init error" -#~ msgstr "Hálozat létrehozásában hiba történt" - -#~ msgid "No .dol or .elf files found." -#~ msgstr "Nem taláhatóak .dol vagy .elf fájlok." - -#~ msgid "No Favorites" -#~ msgstr "Nincsenek kedvencek" - -#~ msgid "No USB Device" -#~ msgstr "Nincs USB meghajtó" - -#~ msgid "No USB Device found." -#~ msgstr "Nincs USB meghajtó csatlakoztatva." - -#~ msgid "No WBFS or FAT/NTFS partition found" -#~ msgstr "Nem található WBFS vagy FAT/NTFS partíció" - -#~ msgid "Normal Covers" -#~ msgstr "Sima Borítók" - -#~ msgid "Not Found" -#~ msgstr "Nem található" - -#~ msgid "Not a DOL/ELF file." -#~ msgstr "Nem DOL/ELF fájl." - -#~ msgid "Save Failed" -#~ msgstr "Mentési hiba" - -#~ msgid "Selected DOL" -#~ msgstr "Kiválasztott DOL" - -#~ msgid "Standard" -#~ msgstr "Alap" - -#~ msgid "TXT Cheatcodes Path changed" -#~ msgstr "TXT CheatKódok Útvonala megváltozott" - -#~ msgid "Theme Download Path changed" -#~ msgstr "Téma letöltés útvonal megváltozott" - -#~ msgid "Theme Path Changed" -#~ msgstr "Témák útvonala megváltozott" - -#~ msgid "USB Loader GX will only run with Hermes CIOS rev 4! Please make sure you have revision 4 installed!" -#~ msgstr "Az USB Loader GX csak Hermes CIOS rev 4 mellett működik! Gyõződj meg róla, hogy telepítetted!" - -#~ msgid "Update Path changed." -#~ msgstr "Frissítés útvonala megváltozott." - -#~ msgid "WIP Patches Path changed" -#~ msgstr "WIP Patch útvonal megváltozott" - -#~ msgid "WiiTDB Path changed." -#~ msgstr "WiiTDB útvonal megváltozott." - -#~ msgid "You are about to delete " -#~ msgstr "Törölni készülsz: " - -#~ 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." - -#~ msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible." -#~ msgstr "NTFS fájlrendszert használata esetén a lehetséges írási hibák miatt játékok telepítése nem lehetséges." - -#~ msgid "You have attempted to load a bad image" -#~ msgstr "Rossz képfájl próbáltál betõlteni" - -#~ msgid "does not exist! You Messed something up, Idiot." -#~ msgstr "nem létezik! Valamit elcsesztéll :-)" - -#~ msgid "file left" -#~ msgstr "hátralévõ fájl" diff --git a/Languages/italian.lang b/Languages/italian.lang deleted file mode 100644 index c6c5b60c..00000000 --- a/Languages/italian.lang +++ /dev/null @@ -1,1860 +0,0 @@ -# USB Loader GX language source file. -# italian.lang - v69 - r1053 -# don't delete/change this line (é). -msgid "" -msgstr "" -"Project-Id-Version: USB Loader GX\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-06 19:36+0100\n" -"PO-Revision-Date: 2011-01-22 20:00+0200\n" -"Last-Translator: Cambo \n" -"Language-Team: Cambo\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -msgid " Wad Saved as:" -msgstr " Wad salvato con il nome:" - -msgid " could not be downloaded." -msgstr " non può essere scaricato." - -msgid " has been Saved. The text has not been verified. Some of the code may not work right with each other. If you experience trouble, open the text in a real text editor for more information." -msgstr " è stato salvato. Parte del codice potrebbe non funzionare correttamente. In caso di problemi, aprire il file di testo con un editor per ottenere ulteriori informazioni." - -msgid " is not on the server." -msgstr " non è disponibile sul server." - -#, c-format -msgid "%i files not found on the server!" -msgstr "" - -#, c-format -msgid "%i missing files" -msgstr "" - -msgid "0 (Everyone)" -msgstr "0 (Tutti)" - -msgid "1 (Child 7+)" -msgstr "1 (Bambini 7+)" - -msgid "1 hour" -msgstr "1 ora" - -msgid "10 min" -msgstr "10 minuti" - -msgid "2 (Teen 12+)" -msgstr "2 (Ragazzini 12+)" - -msgid "20 min" -msgstr "20 minuti" - -msgid "2D Cover Path" -msgstr "Cart. Copertine 2D" - -msgid "3 (Mature 16+)" -msgstr "3 (Ragazzi 16+)" - -msgid "3 min" -msgstr "3 minuti" - -msgid "30 min" -msgstr "30 minuti" - -msgid "3D Cover Path" -msgstr "Cart. Copertine 3D" - -msgid "3D Covers" -msgstr "Copertine 3D" - -msgid "4 (Adults Only 18+)" -msgstr "4 (Maggiorenni 18+)" - -msgid "5 min" -msgstr "5 minuti" - -msgid ">> Deleting tickets..." -msgstr ">> Eliminazione ticket..." - -msgid ">> Deleting tickets...ERROR! " -msgstr ">> Eliminazione ticket...ERRORE! " - -msgid ">> Deleting tickets...Ok! " -msgstr ">> Eliminazione ticket...OK! " - -msgid ">> Deleting title ...ERROR! " -msgstr ">> Eliminazione titolo...ERRORE! " - -msgid ">> Deleting title ...Ok!" -msgstr ">> Eliminazione titolo...OK! " - -msgid ">> Deleting title contents..." -msgstr ">> Eliminazione contenuti..." - -msgid ">> Deleting title contents...ERROR! " -msgstr ">> Eliminazione contenuti...ERRORE! " - -msgid ">> Deleting title contents...Ok!" -msgstr ">> Eliminazione contenuti...OK! " - -msgid ">> Deleting title..." -msgstr ">> Eliminazione titolo..." - -msgid ">> Finishing installation..." -msgstr ">> Sto terminando l'installazione..." - -msgid ">> Installing content #" -msgstr ">> Sto installando il contenuto #" - -msgid ">> Installing ticket..." -msgstr ">> Sto installando il ticket..." - -msgid ">> Installing title..." -msgstr ">> Sto installando il titolo..." - -msgid ">> Reading WAD data..." -msgstr ">> Lettura dati WAD..." - -msgid ">> Reading WAD data...ERROR! " -msgstr ">> Lettura dati WAD...ERRORE! " - -msgid ">> Reading WAD data...Ok!" -msgstr ">> Lettura dati WAD...OK!" - -msgid "AUTO" -msgstr "Automatico" - -msgid "All Partitions" -msgstr "Tutte" - -msgid "All images downloaded successfully." -msgstr "Immagini scaricate tutte correttamente." - -msgid "All the features of USB Loader GX are unlocked." -msgstr "Tutte le funzioni di USB Loader GX sono sbloccate." - -msgid "Alternate DOL" -msgstr "DOL Alternativo" - -msgid "Anti" -msgstr "" - -msgid "App Language" -msgstr "Lingua Utilizzata" - -msgid "Apply" -msgstr "" - -msgid "Apr" -msgstr "aprile" - -msgid "Are you sure you want to lock USB Loader GX?" -msgstr "Sei sicuro di voler bloccare USB Loader GX?" - -msgid "Are you sure you want to reset?" -msgstr "Sei sicuro di voler resettare?" - -msgid "Are you sure?" -msgstr "Sei sicuro?" - -msgid "Aug" -msgstr "agosto" - -msgid "Author(s):" -msgstr "" - -msgid "AutoInit Network" -msgstr "Inizializz. Rete Automatica" - -msgid "Automatic port switching is done on the fly. You need to change all custom paths to SD-Card first for this option or else it could damage a filesystem." -msgstr "" - -msgid "BCA Codes Path" -msgstr "Cart. Codici BCA" - -msgid "Back" -msgstr "Indietro" - -msgid "Back to HBC or Wii Menu" -msgstr "Torna a HBC/Menu Wii" - -msgid "Backgroundmusic" -msgstr "Musica Sottofondo" - -msgid "Big thanks to:" -msgstr "Grazie mille a:" - -msgid "Block Cover Downloads" -msgstr "Blocca Scaricam. Copertine" - -msgid "Block Custom Paths" -msgstr "Blocca Modifica Cartelle" - -msgid "Block Game Install" -msgstr "Blocca Install. Giochi" - -msgid "Block Game Settings" -msgstr "Blocca Impost. Gioco" - -msgid "Block GameID Change" -msgstr "Blocca Modif. ID Gioco" - -msgid "Block Global Settings" -msgstr "Blocca Impost. Globali" - -msgid "Block Gui Settings" -msgstr "Blocca Interf. Grafica" - -msgid "Block HBC Menu" -msgstr "Blocca Menu HBC" - -msgid "Block IOS Reload" -msgstr "Blocca Ricarica cIOS" - -msgid "Block Loader Settings" -msgstr "Blocca Impost. Loader" - -msgid "Block Parental Settings" -msgstr "Blocca Contr. Genitori" - -msgid "Block Reset Settings" -msgstr "Blocca Impost. Predef." - -msgid "Block Sound Settings" -msgstr "Blocca Impost. Audio" - -msgid "Block Theme Downloader" -msgstr "Blocca Scaricam. Temi" - -msgid "Block Theme Menu" -msgstr "Blocca Menu Temi" - -msgid "Block Title Launcher" -msgstr "Blocca Avvio Gioco" - -msgid "Block Updates" -msgstr "Blocca Aggiornamenti" - -msgid "Boot/Standard" -msgstr "cIOS Predefinito" - -msgid "Boot?" -msgstr "Vuoi riavviare?" - -msgid "Both" -msgstr "Entrambi" - -msgid "Both Ports" -msgstr "" - -msgid "Can't be formatted" -msgstr "Non si può formattare" - -msgid "Can't create directory" -msgstr "Impossibile creare la cartella" - -#, c-format -msgid "Can't create path: %s" -msgstr "Impossibile creare cartella: %s" - -msgid "Can't delete:" -msgstr "Impossibile eliminare:" - -msgid "Cancel" -msgstr "Annulla" - -msgid "Cannot write to destination." -msgstr "Impossibile scrivere nella destinazione." - -msgid "Change Play Path" -msgstr "Modifica Cartella Suoni" - -msgid "Cheatfile is blank" -msgstr "il file dei trucchi è vuoto" - -msgid "Clear" -msgstr "Cancella" - -msgid "Click to Download Covers" -msgstr "Premi per scaricare le Copertine" - -msgid "Click to change game ID" -msgstr "Premi per cambiare ID al gioco" - -msgid "Clock" -msgstr "Orologio" - -msgid "Close" -msgstr "Chiudi" - -msgid "Code Download" -msgstr "Scarico Codice" - -#, c-format -msgid "Coded by: %s" -msgstr "Sviluppato da: %s" - -msgid "Coding:" -msgstr "Sviluppo:" - -msgid "Connection to server timed out." -msgstr "" - -msgid "Console" -msgstr "Terminale" - -msgid "Console Default" -msgstr "Predefinita Console" - -msgid "Console Locked" -msgstr "Console Bloccata" - -msgid "Console must be unlocked for this option." -msgstr "La Wii deve essere sbloccata per questa opzione." - -msgid "Console should be unlocked to modify it." -msgstr "Sbloccare la Console per Modificarla." - -msgid "Continue to install game?" -msgstr "Continua ad Installare il gioco?" - -msgid "Controllevel" -msgstr "Livello Protezione" - -msgid "Correct Password" -msgstr "Password Corretta" - -msgid "Could not connect to the server." -msgstr "Impossibile connettersi al server." - -msgid "Could not create GCT file" -msgstr "Impossibile creare il file GCT" - -#, c-format -msgid "Could not create path: %s" -msgstr "Impossibile creare la cartella: %s" - -msgid "Could not find info for this game in the wiitdb.xml." -msgstr "Non sono disponibili informazioni su questo gioco nel file wiitdb.xml." - -msgid "Could not initialize DIP module!" -msgstr "Impossibile inizializzare il modulo DIP!" - -msgid "Could not initialize network!" -msgstr "Impossibile inizializzare la rete!" - -msgid "Could not open Disc" -msgstr "Impossibile accedere al Disco" - -msgid "Could not open wiitdb.xml." -msgstr "Impossibile aprire il file wiitdb.xml." - -msgid "Could not save." -msgstr "Impossibile salvare." - -msgid "Cover Download" -msgstr "Scaricamento Copertine" - -msgid "Create" -msgstr "Crea" - -msgid "Credits" -msgstr "Ringraziamenti" - -msgid "Custom Discarts" -msgstr "" - -msgid "Custom Paths" -msgstr "Impostazioni Cartelle" - -msgid "Customs/Original" -msgstr "Modific./Origin." - -msgid "DOL Path" -msgstr "Cart. ALT-DOL" - -msgid "Dec" -msgstr "dicembre" - -msgid "Default" -msgstr "Predefinita" - -msgid "Default Gamesettings" -msgstr "Torna a Impost. Predefinite" - -msgid "Default Settings" -msgstr "Impostazioni Predefinite" - -msgid "Delete" -msgstr "Elimina" - -msgid "Delete ?" -msgstr "Vuoi eliminare ?" - -msgid "Delete Cheat GCT" -msgstr "Elimina Trucchi GCT" - -msgid "Delete Cheat TXT" -msgstr "Elimina Trucchi TXT" - -msgid "Delete Cover Artwork" -msgstr "Elimina la copertina" - -msgid "Delete Disc Artwork" -msgstr "Elimina l'immagine disco" - -msgid "Design:" -msgstr "Grafica:" - -msgid "Developed by" -msgstr "Sviluppato da" - -msgid "Directory does not exist!" -msgstr "La cartella non esiste!" - -msgid "Disc Artwork Download" -msgstr "Scaricamento Imm. Disco" - -msgid "Disc Artwork Path" -msgstr "Cart. Imm. Disco" - -msgid "Disc Default" -msgstr "Predefinita Disco" - -msgid "DiskFlip" -msgstr "Gira i dischi" - -msgid "Display" -msgstr "Visualizza Info Gioco" - -msgid "Display as a carousel" -msgstr "Visualizzazione a Carosello" - -msgid "Display as a grid" -msgstr "Visualizzazione a Griglia" - -msgid "Display as a list" -msgstr "Visualizzazione a Elenco" - -msgid "Display favorites only" -msgstr "Mostra solo i preferiti" - -msgid "Do you want to apply it now?" -msgstr "Applicare immediatamente?" - -msgid "Do you want to apply this theme?" -msgstr "" - -msgid "Do you want to change language?" -msgstr "Vuoi cambiare lingua?" - -msgid "Do you want to download this theme?" -msgstr "Vuoi scaricare questo tema?" - -msgid "Do you want to format:" -msgstr "Vuoi formattare:" - -msgid "Do you want to load the default theme?" -msgstr "Vuoi caricare il tema predefinito?" - -msgid "Do you want to sync free space info sector on all FAT32 partitions?" -msgstr "Vuoi sincronizzare le informazioni sullo spazio libero in tutte le partizioni FAT32?" - -msgid "Do you wish to update/download all language files?" -msgstr "Vuoi scaricare/aggiornare tutti i file delle lingue?" - -msgid "Done!" -msgstr "Fatto!" - -msgid "Download" -msgstr "Scarica" - -msgid "Download Now" -msgstr "Scarica Adesso" - -msgid "Download finished" -msgstr "Ho finito di scaricare" - -msgid "Downloading 3D Covers" -msgstr "" - -msgid "Downloading Flat Covers" -msgstr "" - -msgid "Downloading Full HQ Covers" -msgstr "" - -msgid "Downloading Full LQ Covers" -msgstr "" - -msgid "Downloading custom Discarts" -msgstr "Sto scaricando le imm. disco personalizzate" - -msgid "Downloading file..." -msgstr "Sto scaricando il file..." - -msgid "Downloading image:" -msgstr "Sto scaricando l'immagine:" - -msgid "Downloading original Discarts" -msgstr "Sto scaricando le imm. disco originali" - -msgid "Downloading pagelist:" -msgstr "Sto scaricando la lista:" - -msgid "Dutch" -msgstr "Olandese" - -msgid "ERROR" -msgstr "ERRORE" - -msgid "ERROR:" -msgstr "ERRORE:" - -msgid "ERROR: Can't set up theme." -msgstr "ERRORE: Impossibile configurare il tema." - -msgid "English" -msgstr "Inglese" - -msgid "Error" -msgstr "Errore" - -msgid "Error !" -msgstr "Errore !" - -msgid "Error 002 fix" -msgstr "Correzione Error002" - -#, c-format -msgid "Error creating path: %s" -msgstr "Errore nella creazione della cartella: %s" - -msgid "Error opening downloaded file" -msgstr "Errore nell'apertura del file scaricato" - -msgid "Error reading Disc" -msgstr "Errore Lettura Disco" - -#, c-format -msgid "Error when downloading file: %i" -msgstr "Errore scaricando il file: %i" - -msgid "Error while downloding file" -msgstr "Errore durante lo scaricamento del file" - -msgid "Error while opening the zip." -msgstr "Errore durante l'apertura del file zip." - -msgid "Error while transfering data." -msgstr "Errore durante il trasferimento dei dati." - -msgid "Error while updating USB Loader GX." -msgstr "Errore durante l'aggiornamento di USB Loader GX." - -msgid "Error writing the data." -msgstr "Errore nella scrittura dei dati." - -msgid "Error..." -msgstr "Errore..." - -msgid "Error:" -msgstr "Errore:" - -msgid "Exit" -msgstr "Esci" - -msgid "Exit to where?" -msgstr "Uscita verso?" - -msgid "Extracting files..." -msgstr "Sto scompattando i file..." - -msgid "Failed formating" -msgstr "Errore Formattazione" - -msgid "Failed to extract." -msgstr "Scompattamento fallito." - -msgid "Failed to open partition" -msgstr "Non si accede alla partizione" - -msgid "Failed updating" -msgstr "Aggiornamento fallito" - -msgid "Feb" -msgstr "febbraio" - -msgid "File not found." -msgstr "File non trovato." - -#, c-format -msgid "Filesize is %i Byte." -msgstr "La dimensione del file è %i Byte." - -msgid "Filesize is 0 Byte." -msgstr "La dimensione del file è 0 Byte." - -msgid "Finishing installation... Ok!" -msgstr "Sto terminando l'installazione... Ok!" - -msgid "Flat Covers" -msgstr "Copertine 2D" - -msgid "Flip-X" -msgstr "Scorrimento Dischi" - -msgid "Force NTSC" -msgstr "Forza NTSC" - -msgid "Force PAL50" -msgstr "Forza PAL50" - -msgid "Force PAL60" -msgstr "Forza PAL60" - -msgid "Format" -msgstr "Formatta" - -msgid "Formatting, please wait..." -msgstr "Sto Formattando, prego attendere..." - -msgid "Found missing images." -msgstr "" - -msgid "Free Space" -msgstr "Spazio libero" - -msgid "French" -msgstr "Francese" - -msgid "Full Cover Path" -msgstr "" - -msgid "Full HQ Covers" -msgstr "" - -msgid "Full LQ Covers" -msgstr "" - -msgid "Full Menu" -msgstr "Menu Completo" - -msgid "Full shutdown" -msgstr "Completo" - -msgid "GAMEID_Gamename" -msgstr "IDGIOCO_Nomegioco" - -msgid "GCT Cheatcodes Path" -msgstr "Cart. Trucchi in GCT" - -msgid "GCT File created" -msgstr "File GCT creato" - -msgid "GUI Settings" -msgstr "Interfaccia Grafica" - -msgid "Game ID" -msgstr "ID Gioco" - -msgid "Game IOS" -msgstr "cIOS Gioco" - -msgid "Game Language" -msgstr "Lingua Gioco" - -msgid "Game Load" -msgstr "Impostazioni Gioco" - -msgid "Game Lock" -msgstr "Bloccaggio Gioco" - -msgid "Game Only" -msgstr "Solo Gioco" - -msgid "Game Region" -msgstr "Regione Gioco" - -msgid "Game Size" -msgstr "Dimensione Gioco" - -msgid "Game Sound Mode" -msgstr "Modalità Suono Giochi" - -msgid "Game Sound Volume" -msgstr "Volume Suono Giochi" - -msgid "Game Split Size" -msgstr "Dim. File Gioco" - -msgid "Game is already installed:" -msgstr "Gioco già installato:" - -msgid "Game/Install Partition" -msgstr "" - -msgid "Gamename [GAMEID]" -msgstr "Nomegioco [IDGIOCO]" - -msgid "Games" -msgstr "Giochi" - -msgid "Genre:" -msgstr "Genere:" - -msgid "German" -msgstr "Tedesco" - -msgid "Global Settings" -msgstr "Impostazioni Generali" - -msgid "HOME Menu" -msgstr "Menu HOME" - -msgid "Homebrew Apps Path" -msgstr "Cart. Applic. Homebrew" - -msgid "Homebrew Channel" -msgstr "Canale Homebrew" - -msgid "Homebrew Launcher" -msgstr "Applicazioni Homebrew" - -msgid "Hour" -msgstr "ore" - -msgid "How do you want to update?" -msgstr "Come Vuoi Aggiornare ?" - -msgid "How to Shutdown?" -msgstr "Spegnimento Wii?" - -#, c-format -msgid "Incoming file %0.2fKB" -msgstr "Dimensione file %0.2fKB" - -#, c-format -msgid "Incoming file %0.2fMB" -msgstr "Dimensione file %0.2fMB" - -msgid "Initializing Network" -msgstr "Inizializzazione Rete" - -msgid "Insert Disk" -msgstr "Inserisci Disco" - -msgid "Insert a Wii Disc!" -msgstr "Inserisci un Disco nella Wii!" - -msgid "Install" -msgstr "Installa" - -msgid "Install Error!" -msgstr "Errore Installazione!" - -msgid "Install a game" -msgstr "Installa un gioco" - -msgid "Install directories" -msgstr "Installa Cartelle" - -msgid "Install partitions" -msgstr "Installa Partizioni" - -msgid "Installing content... Ok!" -msgstr "Sto installando il contenuto... Ok!" - -msgid "Installing game:" -msgstr "Sto Installando il gioco:" - -msgid "Installing ticket... Ok!" -msgstr "Sto installando il ticket... Ok!" - -msgid "Installing title... Ok!" -msgstr "Sto installando il titolo... Ok!" - -msgid "Installing wad" -msgstr "Sto installando il WAD" - -msgid "Issue manager /" -msgstr "Gestore problemi /" - -msgid "It seems that you have some information that will be helpful to us. Please pass this information along to the DEV team." -msgstr "Hai informazioni che potrebbero esserci utili. Per favore, comunicale al team di sviluppo." - -msgid "Italian" -msgstr "Italiano" - -msgid "Jan" -msgstr "gennaio" - -msgid "Japanese" -msgstr "Giapponese" - -msgid "July" -msgstr "luglio" - -msgid "June" -msgstr "giugno" - -msgid "Keep" -msgstr "Mantieni" - -msgid "Keyboard" -msgstr "Tastiera" - -msgid "Korean" -msgstr "Coreano" - -msgid "Language File" -msgstr "File Traduzioni" - -msgid "Language change:" -msgstr "Modifica Lingua:" - -msgid "Languagefiles Path" -msgstr "Cart. File Traduzioni" - -msgid "Languagepath changed." -msgstr "Cartella Traduzioni Modificata" - -msgid "Left" -msgstr "Sinistra" - -msgid "Like SysMenu" -msgstr "Come SysMenu" - -msgid "List on Gamelaunch" -msgstr "Lista all'Avvio" - -msgid "Load" -msgstr "Carica" - -msgid "Load From SD/USB" -msgstr "Caricamento da SD/USB" - -#, c-format -msgid "Load file from: %s ?" -msgstr "Vuoi caricare il file da: %s ?" - -msgid "Load this DOL as alternate DOL?" -msgstr "Vuoi caricare questo DOL come DOL alternativo?" - -msgid "Loader Settings" -msgstr "Impostazioni Loader" - -msgid "Loading standard language." -msgstr "Caricamento Lingua Standard." - -msgid "Loading standard music." -msgstr "Caricamento Musica std." - -msgid "Lock Console" -msgstr "Blocco Console" - -msgid "Lock USB Loader GX" -msgstr "Blocca USB Loader GX" - -msgid "Locked" -msgstr "Bloccato" - -msgid "Loop Directory" -msgstr "Sequenza Brani" - -msgid "Loop Music" -msgstr "Ripeti Brano" - -msgid "Loop Sound" -msgstr "Suono Ripetuto" - -msgid "Main tester:" -msgstr "Tester principale:" - -msgid "Mar" -msgstr "marzo" - -msgid "Mark new games" -msgstr "Evidenzia Nuovi Giochi" - -msgid "May" -msgstr "maggio" - -msgid "Messageboard Update" -msgstr "Aggiorna Messaggi" - -msgid "Motion+ Video" -msgstr "Video Motion+" - -msgid "Mount DVD drive" -msgstr "Avvia DVD" - -msgid "Multiple Partitions" -msgstr "" - -msgid "Music Loop Mode" -msgstr "Ripetizione Musica Sottof." - -msgid "Music Volume" -msgstr "Volume" - -msgid "Neither" -msgstr "Nessuno" - -msgid "Network is not initiated." -msgstr "Rete non inizializzata." - -msgid "New Disc Detected" -msgstr "Trovato Nuovo Disco" - -msgid "Next" -msgstr "Avanti" - -msgid "No" -msgstr "" - -msgid "No Cheatfile found" -msgstr "Nessun file trucchi trovato" - -msgid "No DOL file found on disc." -msgstr "Nessun file DOL trovato sul disco." - -msgid "No Splitting" -msgstr "Non Suddividere" - -msgid "No URL or Path specified." -msgstr "Nessuna cartella o URL specificata." - -msgid "No WBFS or FAT/NTFS/EXT partition found" -msgstr "Nessuna partizione WBFS o FAT/NTFS/EXT trovata" - -msgid "No cheats were selected" -msgstr "Non è stato selezionato alcun trucco" - -msgid "No data could be read." -msgstr "Non è stato possibile leggere alcun dato." - -msgid "No favorites selected." -msgstr "Nessun preferito selezionato." - -msgid "No file missing!" -msgstr "Nessun file mancante!" - -msgid "No new updates." -msgstr "Nessun Aggiornamento." - -msgid "No themes found on the site." -msgstr "Nessun tema trovato sul sito." - -msgid "No themes found." -msgstr "" - -msgid "None" -msgstr "Nessuno" - -msgid "Normal" -msgstr "Normale" - -msgid "Not a WAD file." -msgstr "Non è un file WAD." - -msgid "Not a Wii Disc" -msgstr "Non è un Disco Wii" - -msgid "Not a valid URL" -msgstr "Non è un URL valido" - -msgid "Not a valid URL path" -msgstr "Non è un indirizzo URL valido" - -msgid "Not a valid domain" -msgstr "Non è un dominio valido" - -msgid "Not enough free memory." -msgstr "Memoria insufficiente." - -msgid "Not enough free space!" -msgstr "Spazio Insufficiente!" - -msgid "Not enough memory." -msgstr "Memoria insufficiente." - -msgid "Not required" -msgstr "Non richiesto" - -msgid "Not supported format!" -msgstr "Formato non supportato." - -msgid "Nov" -msgstr "novembre" - -msgid "OFF" -msgstr "Disattivato" - -msgid "OK" -msgstr "" - -msgid "ON" -msgstr "Attivato" - -msgid "Ocarina" -msgstr "" - -msgid "Oct" -msgstr "ottobre" - -msgid "Official Site:" -msgstr "Sito Ufficiale:" - -msgid "Offset" -msgstr "" - -msgid "Only Game Partition" -msgstr "Solo Giochi" - -msgid "Only for Install" -msgstr "Installa Solamente" - -msgid "Original Discarts" -msgstr "" - -msgid "Original/Customs" -msgstr "Origin./Modific." - -msgid "Parental Control" -msgstr "Controllo Genitori" - -msgid "Partition" -msgstr "Partizione" - -msgid "Password" -msgstr "" - -msgid "Password Changed" -msgstr "Password modificata" - -msgid "Password has been changed" -msgstr "Password è stata modificata" - -msgid "Patch Country Strings" -msgstr "Cod. Patch Regione" - -msgid "Path Changed" -msgstr "Cartella Modificata" - -msgid "Permission denied." -msgstr "Permesso vietato." - -msgid "Pick from a list" -msgstr "Seleziona da un elenco" - -msgid "Play Count" -msgstr "Giocati" - -msgid "Play Next" -msgstr "Suona Successiva" - -msgid "Play Once" -msgstr "Suona una volta" - -msgid "Play Previous" -msgstr "Suona Precedente" - -msgid "Playing Music:" -msgstr "Sto suonando:" - -msgid "Please wait..." -msgstr "Attendere prego..." - -msgid "Power off the Wii" -msgstr "Spegnimento Wii" - -msgid "Prev" -msgstr "Indietro" - -msgid "Prompts Buttons" -msgstr "Pulsanti" - -msgid "Published by" -msgstr "Pubblicato da" - -msgid "Quick Boot" -msgstr "Avvio Veloce" - -msgid "Random Directory Music" -msgstr "Brano Casuale" - -msgid "Reading WAD data... Ok!" -msgstr "Sto leggendo i dati del WAD... Ok!" - -msgid "Receiving file from:" -msgstr "Sto ricevendo il file da:" - -msgid "Region Patch" -msgstr "Patch Regione" - -msgid "Released" -msgstr "Rilasciato" - -msgid "Reload SD" -msgstr "Ricarica SD" - -msgid "Remove update" -msgstr "Rimuovi Agg." - -msgid "Rename Game on WBFS" -msgstr "Rinomina Gioco su WBFS" - -msgid "Reset" -msgstr "Resetta" - -msgid "Reset BG Music" -msgstr "Resetta Musica Sottof." - -msgid "Reset Playcounter" -msgstr "Azzera contatore" - -msgid "Reset to default BGM?" -msgstr "Torna a Musica Sottofondo Predefinita?" - -msgid "Restarting..." -msgstr "Premere OK per riavviare..." - -msgid "Return" -msgstr "Ritorna" - -msgid "Return To" -msgstr "Ritorna a" - -msgid "Return to Wii Menu" -msgstr "Torna al Menu Wii" - -msgid "Right" -msgstr "Destra" - -msgid "Rumble" -msgstr "Vibrazione" - -msgid "SChinese" -msgstr "Cinese Moderno" - -msgid "SFX Volume" -msgstr "Volume SFX" - -msgid "Save" -msgstr "Salva" - -msgid "Save Failed. No device inserted?" -msgstr "Salvataggio Fallito. La periferica è connessa?" - -msgid "Save Game List to" -msgstr "Salvataggio Elenco Giochi in" - -msgid "Save List" -msgstr "" - -msgid "Saved" -msgstr "Salvataggio Eseguito" - -msgid "Screensaver" -msgstr "Salvaschermo" - -msgid "Select" -msgstr "Seleziona" - -msgid "Select DOL Offset" -msgstr "Seleziona Offset DOL" - -msgid "Select a DOL" -msgstr "Seleziona un file DOL" - -msgid "Select a DOL from Game" -msgstr "Seleziona un file DOL dal Gioco" - -msgid "Sept" -msgstr "settembre" - -msgid "Set Search-Filter" -msgstr "Cerca Gioco" - -msgid "Settings" -msgstr "Impostazioni" - -msgid "Show Free Space" -msgstr "Mostra Spazio Libero" - -msgid "Shutdown System" -msgstr "Spegnimento" - -msgid "Shutdown Wii" -msgstr "Spegni Wii" - -msgid "Sort alphabetically" -msgstr "Ordine Alfabetico" - -msgid "Sort by number of players" -msgstr "" - -msgid "Sort by rank" -msgstr "Ordine Preferenza" - -msgid "Sort order by most played" -msgstr "Mostra i più giocati" - -msgid "Sound" -msgstr "Impostazioni Audio" - -msgid "Sound Settings" -msgstr "Impostazioni Audio" - -msgid "Sound+BGM" -msgstr "Suono+Sottof." - -msgid "Sound+Quiet" -msgstr "Suono+Silenzio" - -msgid "Spanish" -msgstr "Spagnolo" - -msgid "Special thanks to:" -msgstr "Un ringraziamento speciale a:" - -msgid "Split each 2GB" -msgstr "Suddividi in 2GB" - -msgid "Split each 4GB" -msgstr "Suddividi in 4GB" - -msgid "Standby" -msgstr "Preaccensione" - -msgid "Success" -msgstr "Successo" - -msgid "Success:" -msgstr "Successo:" - -msgid "Successfully Saved" -msgstr "Salvataggio Eseguito" - -msgid "Successfully Updated" -msgstr "Aggiornamento Eseguito" - -msgid "Successfully Updated thanks to www.techjawa.com" -msgstr "Aggiornamento Eseguito grazie a www.techjawa.com" - -msgid "Successfully deleted:" -msgstr "Eliminato correttamente:" - -msgid "Successfully extracted theme." -msgstr "Tema scompattato correttamente." - -msgid "Successfully installed:" -msgstr "Installato correttamente:" - -msgid "Sync FAT32 FS Info" -msgstr "Sincr. Info Spazio Lib." - -msgid "Synchronizing..." -msgstr "Sto sincronizzando..." - -msgid "System Default" -msgstr "Predefinita Sistema" - -msgid "TChinese" -msgstr "Cinese Tradizionale" - -msgid "TXT Cheatcodes Path" -msgstr "Cart. Trucchi in TXT" - -msgid "The .them file was not found in the zip." -msgstr "Il file .them non è stato trovato nel file zip." - -msgid "The entered directory does not exist. Would you like to create it?" -msgstr "La cartella indicata non esiste. Vuoi crearla?" - -msgid "The game installation is disabled under this IOS because of instability in usb write." -msgstr "L'installazione dei giochi è disabilitata poiché la scrittura sul disco USB è instabile usando questo IOS" - -msgid "The wad file was installed" -msgstr "File wad installato" - -#, c-format -msgid "The wad installation failed with error %i" -msgstr "Installazione wad fallita con errore %i" - -msgid "Theme Downloader" -msgstr "Scaricamento Temi" - -msgid "Theme Menu" -msgstr "" - -msgid "Theme Path" -msgstr "Cart. Temi" - -msgid "Theme Title:" -msgstr "Titolo del tema:" - -msgid "Themes by www.spiffy360.com" -msgstr "Temi da www.spiffy360.com" - -msgid "This IOS is the BootMii ios. If you are sure it is not BootMii and you have something else installed there than ignore this warning." -msgstr "Questo IOS è quello del BootMii. Se hai installato qualcos'altro al suo posto e sei sicuro di quel che fai ignora questo avvertimento." - -msgid "This IOS was not found on the titles list. If you are sure you have it installed than ignore this warning." -msgstr "Questo IOS non è stato trovato. Se sei sicuro di averlo installato ignora questo avvertimento." - -msgid "Time left:" -msgstr "Restante:" - -msgid "Title Launcher" -msgstr "Schermata Titoli" - -msgid "Titles from WiiTDB" -msgstr "Titoli dal file WiiTDB" - -msgid "Tooltips" -msgstr "Suggerimenti" - -msgid "Transfer failed" -msgstr "Trasferimento fallito" - -msgid "USB Device not found" -msgstr "Dispositivo USB non Trovato" - -msgid "USB Loader GX is protected" -msgstr "USB Loader GX è Protetto" - -msgid "USB Port" -msgstr "" - -msgid "USB Port changing is only supported on Hermes cIOS." -msgstr "" - -msgid "Uninstall" -msgstr "Disinstalla" - -msgid "Uninstall Game" -msgstr "Disinstalla il gioco" - -msgid "Uninstall Menu" -msgstr "Menu Disinstallazioni" - -msgid "Uninstall all" -msgstr "Disinstalla tutto" - -msgid "Uninstalling wad" -msgstr "Disinstalla WAD" - -msgid "Unknown" -msgstr "Sconosciuto" - -msgid "Unlock USB Loader GX" -msgstr "Sblocca USB Loader GX" - -msgid "Unlocked" -msgstr "Sbloccato" - -msgid "Unsupported format, try to extract manually TempTheme.zip." -msgstr "Formato non supportato, provare a scompattare manualmente il file TempTheme.zip." - -msgid "Update" -msgstr "Aggiornamento" - -msgid "Update All" -msgstr "Tutti i files" - -msgid "Update DOL" -msgstr "Solo DOL" - -msgid "Update Files" -msgstr "Aggiorna File" - -msgid "Update Path" -msgstr "Cart. Aggiornamento" - -msgid "Update all Language Files" -msgstr "Aggiorna tutti i file delle lingue" - -msgid "Update failed" -msgstr "Aggiornamento Fallito" - -msgid "Update successfull" -msgstr "Aggiornamento eseguito" - -msgid "Updating Language Files:" -msgstr "Aggiornamento file delle lingue:" - -msgid "Uploaded ZIP file installed to homebrew directory." -msgstr "File ZIP installato nella cartella Homebrew" - -msgid "VIDTV Patch" -msgstr "Video Forzato" - -msgid "Version:" -msgstr "" - -#, c-format -msgid "Version: %s" -msgstr "Versione: %s" - -msgid "Video Mode" -msgstr "Modalità Video" - -msgid "WDM Files Path" -msgstr "Cart. File WDM" - -msgid "WIP Patches Path" -msgstr "Cart. Patch WIP" - -msgid "Waiting..." -msgstr "Caricamento..." - -msgid "Warning:" -msgstr "Attenzione:" - -msgid "What do you want to update?" -msgstr "Che cosa vuoi aggiornare?" - -msgid "What should be deleted for this game title:" -msgstr "Cosa vuoi eliminare per questo gioco?" - -msgid "WiFi Features" -msgstr "Caratteristiche WiFi" - -msgid "Widescreen Fix" -msgstr "Widescreen" - -msgid "Wii Menu" -msgstr "Menu Wii" - -msgid "Wii Settings" -msgstr "Impostazioni Wii" - -msgid "WiiTDB Files" -msgstr "File WiiTDB" - -msgid "WiiTDB Path" -msgstr "Cart. Archivio WiiTDB" - -msgid "WiiTDB is up to date." -msgstr "WiiTDB è aggiornato." - -msgid "Wiilight" -msgstr "Illuminazione Wii" - -msgid "Wrong Password" -msgstr "Password Errata" - -msgid "Yes" -msgstr "Sì" - -msgid "You are currently using IOS" -msgstr "Al momento stai utilizzando l'IOS" - -msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." -msgstr "Stai cercando di accedere ad una partizione FAT32/NTFS/EXT con un cIOS 249 di versione inferiore alla rev18. Ciò è non supportato. Continua a tuo rischio." - -msgid "You need to select or format a partition" -msgstr "Occorre selezionare o formattare una partizione" - -msgid "and translators for language files updates" -msgstr "ed ai traduttori per l'aggiornamento dei file per la localizzazione" - -msgid "available" -msgstr "disponibile" - -msgid "does not exist!" -msgstr "non esiste!" - -msgid "does not exist! Loading game without cheats." -msgstr "non esiste! Carico il gioco senza i trucchi." - -msgid "files left" -msgstr "file mancanti" - -msgid "for FAT/NTFS support" -msgstr "per il supporto FAT/NTFS" - -msgid "for Ocarina" -msgstr "per Ocarina" - -msgid "for WiiTDB and hosting covers / disc images" -msgstr "per l'archivio WiiTDB e le copertine online" - -msgid "for diverse patches" -msgstr "per le numerose correzioni" - -msgid "for his awesome tool LibWiiGui" -msgstr "per la fantastica libreria LibWiiGui" - -msgid "for hosting the themes" -msgstr "per i temi online" - -msgid "for hosting the update files" -msgstr "per gli aggiornamenti online" - -msgid "for the USB Loader source" -msgstr "per il rilascio del codice sorgente" - -msgid "formatted!" -msgstr "formattato!" - -msgid "free" -msgstr "liberi" - -msgid "not set" -msgstr "Non Inserita" - -msgid "of" -msgstr "di" - -msgid "seconds left" -msgstr "secondi mancanti" - -#~ msgid "Author:" -#~ msgstr "Autore:" - -#~ msgid "Do you want to load this theme?" -#~ msgstr "Vuoi caricare questo tema?" - -#~ msgid "Loading default theme." -#~ msgstr "Sto caricando il tema predefinito." - -#~ msgid "Theme path is changed." -#~ msgstr "Cartella Temi Modificata." - -#~ msgid "Use IOS58" -#~ msgstr "Usa IOS58" - -#~ msgid "Download Boxart image?" -#~ msgstr "Scarico la copertina?" - -#~ msgid "Download Discart image?" -#~ msgstr "Scarico l'immagine del disco?" - -#~ msgid "Downloading file" -#~ msgstr "Sto scaricando il file" - -#~ msgid "Missing files" -#~ msgstr "File Mancante/i" - -#~ msgid "files not found on the server!" -#~ msgstr "file non trovato/i sul server!" - -#~ msgid "Disc Images" -#~ msgstr "Immagini Disco" - -#~ msgid "Downloading covers" -#~ msgstr "Sto scaricando le copertine" - -#~ msgid "Only Customs" -#~ msgstr "Modificate" - -#~ msgid "Only Original" -#~ msgstr "Originali" - -#~ msgid "Trying custom Discarts" -#~ msgstr "Provo con le Imm. Disco personalizzate" - -#~ msgid "Trying original Discarts" -#~ msgstr "Provo con le Imm. Disco originali" - -#~ msgid "Do you really want to delete:" -#~ msgstr "Vuoi veramente eliminare:" - -#~ msgid "Do you want to use the alternate DOL that is known to be correct?" -#~ msgstr "Vuoi utilizzare il DOL alternativo funzionante?" - -#~ msgid "0 (Locked and Unlocked Games)" -#~ msgstr "0 (Tutti i Giochi)" - -#~ msgid "1 (Unlocked Games Only)" -#~ msgstr "1 (Giochi Non Bloccati)" - -#~ msgid "BETA revisions" -#~ msgstr "Versioni BETA" - -#~ msgid "Enabling this option on a FAT partition might slow the startup of the loader." -#~ msgstr "Abilitando questa opzione su una partizione FAT potresti rallentare l'avvio del loader." - -#~ msgid "GamesLevel" -#~ msgstr "Livelli" - -#~ msgid "Unlock console to use this option." -#~ msgstr "Sblocca la Console per usare questa opzione." - -#~ msgid "Full Shutdown" -#~ msgstr "Spegni Tutto" - -#~ msgid "GXtheme.cfg not found in any subfolder." -#~ msgstr "Nessuna sottocartella contiene il file GXtheme.cfg." - -#~ msgid "Gerne:" -#~ msgstr "Genere:" - -#~ msgid "If you don't have WiFi, press 1 to get an URL to get your WiiTDB.zip" -#~ msgstr "Se non hai una connessione WiFi, premi 1 per ottenere un URL dal quale ottenere il file WiiTDB.zip" - -#~ msgid "Paste it into your browser to get your WiiTDB.zip." -#~ msgstr "Copialo nel tuo browser per scaricare il file WiiTDB.zip." - -#~ msgid "Shutdown to Idle" -#~ msgstr "Preaccensione" - -#~ msgid "Shutdown?" -#~ msgstr "Vuoi Spegnere?" - -#~ msgid "Your URL has been saved in %sWiiTDB_URL.txt." -#~ msgstr "L'indirizzo (URL) è stato salvato in %sWiiTDB_URL.txt." - -#~ msgid "Can't create file" -#~ msgstr "Impossibile creare il file" - -#~ msgid "Connection lost..." -#~ msgstr "Connessione persa..." - -#~ msgid "Download failed." -#~ msgstr "Download fallito." - -#~ msgid "Download request failed." -#~ msgstr "Richiesta di download fallita." - -#~ msgid "Downloading Page List:" -#~ msgstr "Sto scaricando l'elenco:" - -#~ msgid "Insert an SD-Card to save." -#~ msgstr "Inserisci una scheda SD per Salvare." - -#~ msgid "Insert an SD-Card to use this option." -#~ msgstr "Inserire scheda SD per questa opzione" - -#~ msgid "No SD-Card inserted!" -#~ msgstr "Nessuna scheda SD inserita!" - -#~ msgid "Theme Download Path" -#~ msgstr "Percorso Download Temi" - -#~ msgid "Transfer failed." -#~ msgstr "Trasferimento fallito." - -#~ msgid "Unsupported format, try to extract manually." -#~ msgstr "Formato non supportato, provare a scompattare manualmente." - -#~ msgid "Waiting for USB Device" -#~ msgstr "Caricamento Dispositivo USB" - -#~ msgid "and translaters for language files updates" -#~ msgstr "ed i traduttori per la localizzazione del loader" - -#~ msgid "Back to Loader" -#~ msgstr "Canale HomeBrew" - -#~ msgid "FAT: Use directories" -#~ msgstr "FAT: Utilizzare le cartelle" - -#~ msgid "All partitions" -#~ msgstr "Tutte le partizioni" - -#~ msgid "Game partition" -#~ msgstr "Partizione gioco" - -#~ msgid "Install 1:1 Copy" -#~ msgstr "Installa copia 1:1" - -#~ msgid "An Error occured" -#~ msgstr "C'è stato un errore" - -#~ msgid "Are you sure you want to enable Parent Control?" -#~ msgstr "Sei sicuro di voler attivare il Controllo Genitori?" - -#~ msgid "AutoPatch" -#~ msgstr "Correzione automatica" - -#~ msgid "Checking for Updates" -#~ msgstr "Verifica Aggiornamenti" - -#~ msgid "Downloading" -#~ msgstr "Sto scaricando" - -#~ msgid "Invalid PIN code" -#~ msgstr "Codice PIN non valido" - -#~ msgid "Parental Control disabled" -#~ msgstr "Controllo Genitori disabilitato" - -#~ msgid "The wad file was installed. But It could not be deleted from the SD card." -#~ msgstr "File Wad installato. Non si può però eliminare dalla scheda SD." - -#~ msgid "The wad installation failed with error %ld" -#~ msgstr "L'installazione del WAD è fallita con errore %ld" - -#~ msgid "Unable to open the wad that was just downloaded (%s)." -#~ msgstr "Non riesco ad aprire il wad da poco scaricato (%s)." - -#~ msgid "Unlock Parental Control" -#~ msgstr "Sblocca Controllo Genitori" - -#~ msgid "Update to" -#~ msgstr "Aggiornamento alla" - -#~ msgid "Updating" -#~ msgstr "Aggiornamento" - -#~ msgid "Updating Language Files..." -#~ msgstr "Aggiornamento file delle lingue..." - -#~ msgid "Updating WiiTDB.zip" -#~ msgstr "Aggiornamento file WiiTDB.zip" - -#~ 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." - -#~ msgid "%s : %s May not boot correctly if your System Menu is not up to date." -#~ msgstr "%s : %s Potrebbe non essere caricato correttamente se il tuo System Menu non è aggiornato." - -#~ msgid "BCA Codes Path changed" -#~ msgstr "Percorso Codici BCA modificato" - -#~ msgid "Back to Wii Menu" -#~ msgstr "Torna al Menu Wii" - -#~ msgid "Channels" -#~ msgstr "Canali" - -#~ msgid "Checking existing artwork" -#~ msgstr "Verifico le copertine presenti" - -#~ msgid "Confirm" -#~ msgstr "Confermare" - -#~ msgid "Could not find a WBFS partition." -#~ msgstr "Non è stata trovata alcuna partizione WBFS." - -#~ msgid "Could not open WBFS partition" -#~ msgstr "Non è stato possibile accedere alla partizione WBFS" - -#~ msgid "Could not read the disc." -#~ msgstr "Non è stato possibile leggere il disco." - -#~ msgid "Could not set USB." -#~ msgstr "Non è stato possibile impostare la porta USB." - -#~ msgid "Cover Path Changed" -#~ msgstr "Percorso Copertine Modificato" - -#~ msgid "DOL path changed" -#~ msgstr "Percorso File DOL Modificato" - -#~ msgid "Disc Path Changed" -#~ msgstr "Percorso Immagini Disco Modificato" - -#~ msgid "Display favorites" -#~ msgstr "Mostra i preferiti" - -#~ msgid "Do you want to retry for 30 secs?" -#~ msgstr "Vuoi riprovare per 30 sec?" - -#~ msgid "Enable Parental Control" -#~ msgstr "Attiva Controllo Genitori" - -#~ msgid "Force" -#~ msgstr "Forza" - -#~ msgid "GCT Cheatcodes Path changed" -#~ msgstr "Percorso Trucchi in GCT modificato" - -#~ msgid "Hermes CIOS" -#~ msgstr "cIOS di Hermes" - -#~ msgid "Homebrew Appspath changed" -#~ msgstr "Percorso app. Homebrew modificato" - -#~ msgid "Insert an SD-Card to download images." -#~ msgstr "Inserisci una scheda SD per scaricare le immagini." - -#~ msgid "Install not possible" -#~ msgstr "Impossibile installare" - -#~ msgid "Most likely it has dimensions that are not evenly divisible by 4." -#~ msgstr "Molto probabilmente le dimensioni non sono divisibili per 4." - -#~ msgid "Network init error" -#~ msgstr "Errore inizializzazione rete" - -#~ msgid "No .dol or .elf files found." -#~ msgstr "Non sono stati trovati file .dol o .elf" - -#~ msgid "No Favorites" -#~ msgstr "Nessun Preferito" - -#~ msgid "No USB Device" -#~ msgstr "Nessun Dispositivo USB" - -#~ msgid "No USB Device found." -#~ msgstr "Nessun Dispositivo USB trovato." - -#~ msgid "No WBFS or FAT/NTFS partition found" -#~ msgstr "Non è stata trovata alcuna partizione WBFS o FAT/NTFS" - -#~ msgid "Normal Covers" -#~ msgstr "Copert. Normali" - -#~ msgid "Not Found" -#~ msgstr "Non Trovato" - -#~ msgid "Not a DOL/ELF file." -#~ msgstr "Non è un file DOL/ELF." - -#~ msgid "Reset to standard BGM?" -#~ msgstr "Azzerare Musica BG?" - -#~ msgid "Save Failed" -#~ msgstr "Salvataggio Fallito" - -#~ msgid "Selected DOL" -#~ msgstr "File DOL selezionato" - -#~ msgid "Standard" -#~ msgstr "Standard" - -#~ msgid "TXT Cheatcodes Path changed" -#~ msgstr "Percorso Trucchi in TXT modificato" - -#~ msgid "Theme Download Path changed" -#~ msgstr "Percorso Download Temi modificato" - -#~ msgid "Theme Path Changed" -#~ msgstr "Percorso Tema modificato" - -#~ msgid "USB Loader GX will only run with Hermes CIOS rev 4! Please make sure you have revision 4 installed!" -#~ msgstr "USB Loader GX funziona solo con la rev 4 del cIOS di Hermes! Accertarsi di aver installato la rev 4!" - -#~ msgid "Update Path changed." -#~ msgstr "Perc. Aggiornamento Modificato" - -#~ msgid "WIP Patches Path changed" -#~ msgstr "Percorso Patch WIP modificato" - -#~ msgid "WiiTDB Path changed." -#~ msgstr "Percorso archivio WiiTDB modificato." - -#~ msgid "You are about to delete " -#~ msgstr "Stai per eliminare " - -#~ 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" - -#~ msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible." -#~ msgstr "E' in uso una partizione NTFS. Poiché sono possibili errori in scrittura nelle partizioni NTFS, non è possibile installare alcun gioco." - -#~ msgid "You have attempted to load a bad image" -#~ msgstr "Hai tentato di caricare un'immagine non valida" - -#~ msgid "does not exist! You Messed something up, Idiot." -#~ msgstr "non esiste! Hai fatto qualche casino." - -#~ msgid "file left" -#~ msgstr "file mancante" diff --git a/Languages/japanese.lang b/Languages/japanese.lang deleted file mode 100644 index c29505e7..00000000 --- a/Languages/japanese.lang +++ /dev/null @@ -1,1629 +0,0 @@ -# USB Loader GX language source file. -# japanese.lang - r1065J -# don't delete/change this line (e). -msgid "" -msgstr "" -"Project-Id-Version: USB Loader GX\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-05 17:39+0100\n" -"PO-Revision-Date: 2009-10-01 01:00+0200\n" -"Last-Translator: ichiroling\n" -"Language-Team: hosigumayuugi, papa, ichiroling\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -msgid " Wad Saved as:" -msgstr "WADを保存しました:" - -msgid " could not be downloaded." -msgstr "ダウンロードできませんでした" - -msgid " has been Saved. The text has not been verified. Some of the code may not work right with each other. If you experience trouble, open the text in a real text editor for more information." -msgstr "に保存されました。使用は 自己責任でお願いします。" - -msgid " is not on the server." -msgstr "はサーバーにありません" - -#, c-format -msgid "%i files not found on the server!" -msgstr "%i 個のファイルがサーバーにありません。" - -#, c-format -msgid "%i missing files" -msgstr "%i 個のファイルが足りません。" - -msgid "0 (Everyone)" -msgstr "セットしない" - -msgid "1 (Child 7+)" -msgstr "7歳以上を制限" - -msgid "1 hour" -msgstr "1時間" - -msgid "10 min" -msgstr "10分" - -msgid "2 (Teen 12+)" -msgstr "12歳以上を制限" - -msgid "20 min" -msgstr "20分" - -msgid "2D Cover Path" -msgstr "2Dカバー" - -msgid "3 (Mature 16+)" -msgstr "16歳以上を制限" - -msgid "3 min" -msgstr "3分" - -msgid "30 min" -msgstr "30分" - -msgid "3D Cover Path" -msgstr "3Dカバー" - -msgid "3D Covers" -msgstr "3Dカバー" - -msgid "4 (Adults Only 18+)" -msgstr "CERO Zを制限" - -msgid "5 min" -msgstr "5分" - -msgid ">> Deleting tickets..." -msgstr ">> チケットを削除します" - -msgid ">> Deleting tickets...ERROR! " -msgstr ">> チケットを削除 … 失敗!" - -msgid ">> Deleting tickets...Ok! " -msgstr ">> チケットを削除 … 成功!" - -msgid ">> Deleting title ...ERROR! " -msgstr ">> タイトルを削除 … 失敗!" - -msgid ">> Deleting title ...Ok!" -msgstr ">> タイトルを削除 … 成功!" - -msgid ">> Deleting title contents..." -msgstr ">> タイトルコンテンツを削除します" - -msgid ">> Deleting title contents...ERROR! " -msgstr ">> タイトルコンテンツを削除 … 失敗!" - -msgid ">> Deleting title contents...Ok!" -msgstr ">> タイトルコンテンツを削除 … 成功!" - -msgid ">> Deleting title..." -msgstr ">> タイトルを削除します" - -msgid ">> Finishing installation..." -msgstr ">> インストールを終了します" - -msgid ">> Installing content #" -msgstr "インストール コンテンツ #" - -msgid ">> Installing ticket..." -msgstr "チケットをインストール中 …" - -msgid ">> Installing title..." -msgstr "タイトルをインストール中 …" - -msgid ">> Reading WAD data..." -msgstr ">> WADデータを読込み中 …" - -msgid ">> Reading WAD data...ERROR! " -msgstr ">> WADデータの読込 … 失敗!" - -msgid ">> Reading WAD data...Ok!" -msgstr ">> WADデータの読込 … 成功!" - -msgid "AUTO" -msgstr "自動" - -msgid "All Partitions" -msgstr "全ての領域" - -msgid "All images downloaded successfully." -msgstr "全ての画像をダウンロードしました" - -msgid "All the features of USB Loader GX are unlocked." -msgstr "GXの使用制限が解除されました" - -msgid "Alternate DOL" -msgstr "代理DOL起動" - -msgid "Anti" -msgstr "アンチ" - -msgid "App Language" -msgstr "使用言語" - -msgid "Apply" -msgstr "適用" - -msgid "Apr" -msgstr "4月" - -msgid "Are you sure you want to lock USB Loader GX?" -msgstr "USB Loader GXをロックしますか?" - -msgid "Are you sure you want to reset?" -msgstr "リセットしますか?" - -msgid "Are you sure?" -msgstr "よろしいですか?" - -msgid "Aug" -msgstr "8月" - -msgid "Author(s):" -msgstr "制作者:" - -msgid "AutoInit Network" -msgstr "自動ネット接続" - -msgid "BCA Codes Path" -msgstr "BCAコード" - -msgid "Back" -msgstr "もどる" - -msgid "Back to HBC or Wii Menu" -msgstr "HBC/Wiiメニューへ" - -msgid "Backgroundmusic" -msgstr "BGM" - -msgid "Big thanks to:" -msgstr "協力:" - -msgid "Block Cover Downloads" -msgstr "カバーのダウンロードを制限" - -msgid "Block Custom Paths" -msgstr "パスの変更を制限" - -msgid "Block Game Install" -msgstr "ゲームの追加を制限" - -msgid "Block Game Settings" -msgstr "ゲーム設定を制限" - -msgid "Block GameID Change" -msgstr "ゲームIDの変更を制限" - -msgid "Block Global Settings" -msgstr "基本設定を制限" - -msgid "Block Gui Settings" -msgstr "GUI設定を制限" - -msgid "Block HBC Menu" -msgstr "HBCメニューを制限" - -msgid "Block IOS Reload" -msgstr "IOSの再読み込みを制限" - -msgid "Block Loader Settings" -msgstr "読み込み設定を制限" - -msgid "Block Parental Settings" -msgstr "使用制限設定を制限" - -msgid "Block Reset Settings" -msgstr "設定の初期化を制限" - -msgid "Block Sound Settings" -msgstr "サウンド設定を制限" - -msgid "Block Theme Downloader" -msgstr "テーマのダウンロードを制限" - -msgid "Block Theme Menu" -msgstr "テーマメニューを制限" - -msgid "Block Title Launcher" -msgstr "タイトル起動を制限" - -msgid "Block Updates" -msgstr "更新を制限" - -msgid "Boot/Standard" -msgstr "使用するcIOS" - -msgid "Boot?" -msgstr "起動しますか?" - -msgid "Both" -msgstr "IDとリージョンを表示" - -msgid "Can't be formatted" -msgstr "初期化できません" - -msgid "Can't create directory" -msgstr "フォルダを作れません" - -#, c-format -msgid "Can't create path: %s" -msgstr "パスを作成できません: %s" - -msgid "Can't delete:" -msgstr "削除できません:" - -msgid "Cancel" -msgstr "やめる" - -msgid "Cannot write to destination." -msgstr "出力先に書き込めません" - -msgid "Change Play Path" -msgstr "パスの変更" - -msgid "Cheatfile is blank" -msgstr "チートファイルがありません" - -msgid "Clear" -msgstr "クリア" - -msgid "Click to Download Covers" -msgstr "クリックでカバーをダウンロード" - -msgid "Click to change game ID" -msgstr "クリックでゲームIDを変更" - -msgid "Clock" -msgstr "時計の表示" - -msgid "Close" -msgstr "とじる" - -msgid "Code Download" -msgstr "コードをダウンロード" - -#, c-format -msgid "Coded by: %s" -msgstr "開発: %s" - -msgid "Coding:" -msgstr "開発者:" - -msgid "Connection to server timed out." -msgstr "接続がタイムアウトしました" - -msgid "Console" -msgstr "状態" - -msgid "Console Default" -msgstr "初期値" - -msgid "Console Locked" -msgstr "GXはロックされています" - -msgid "Console must be unlocked for this option." -msgstr "変更にはロックの解除が必要です" - -msgid "Console should be unlocked to modify it." -msgstr "変更にはロックの解除が必要です" - -msgid "Continue to install game?" -msgstr "このゲームをインストールしますか?" - -msgid "Controllevel" -msgstr "制限レベル" - -msgid "Correct Password" -msgstr "正しい暗証番号です" - -msgid "Could not connect to the server." -msgstr "サーバーに再接続できません" - -msgid "Could not create GCT file" -msgstr "GCTファイルを作成できませんでした" - -#, c-format -msgid "Could not create path: %s" -msgstr "パスを作成できません: %s" - -msgid "Could not find info for this game in the wiitdb.xml." -msgstr "wiitdb.xmlにこのゲームの情報が見つかりませんでした" - -msgid "Could not initialize DIP module!" -msgstr "DIPモジュールを初期化できません!" - -msgid "Could not initialize network!" -msgstr "ネットに接続できませんでした!" - -msgid "Could not open Disc" -msgstr "ディスクを開けませんでした" - -msgid "Could not open wiitdb.xml." -msgstr "wiitdb.xmlを開けませんでした" - -msgid "Could not save." -msgstr "保存できませんでした" - -msgid "Cover Download" -msgstr "何をダウンロードしますか" - -msgid "Create" -msgstr "作成" - -msgid "Credits" -msgstr "提供・協力" - -msgid "Custom Discarts" -msgstr "カスタムレーベル" - -msgid "Custom Paths" -msgstr "パスを変更" - -msgid "Customs/Original" -msgstr "カスタムを優先" - -msgid "DOL Path" -msgstr "代替DOL" - -msgid "Dec" -msgstr "12月" - -msgid "Default" -msgstr "初期値" - -msgid "Default Gamesettings" -msgstr "設定を初期化" - -msgid "Default Settings" -msgstr "設定を初期化" - -msgid "Delete" -msgstr "削除しますか" - -msgid "Delete ?" -msgstr "削除しますか?" - -msgid "Delete Cheat GCT" -msgstr "GCTファイルを削除" - -msgid "Delete Cheat TXT" -msgstr "TXTコードを削除" - -msgid "Delete Cover Artwork" -msgstr "カバー画像を削除" - -msgid "Delete Disc Artwork" -msgstr "ディスク画像を削除" - -msgid "Design:" -msgstr "デザイン:" - -msgid "Developed by" -msgstr "開発者:" - -msgid "Directory does not exist!" -msgstr "フォルダがありません" - -msgid "Disc Artwork Download" -msgstr "使用するディスク画像" - -msgid "Disc Artwork Path" -msgstr "ディスク画像" - -msgid "Disc Default" -msgstr "ディスクの初期値" - -msgid "DiskFlip" -msgstr "ディスクの回転風" - -msgid "Display" -msgstr "ゲーム情報" - -msgid "Display as a carousel" -msgstr "回転トレイ風に表示" - -msgid "Display as a grid" -msgstr "格子風に表示" - -msgid "Display as a list" -msgstr "リスト表示" - -msgid "Display favorites only" -msgstr "お気に入りのみ表示" - -msgid "Do you want to apply it now?" -msgstr "適用しますか?" - -msgid "Do you want to apply this theme?" -msgstr "このテーマを使いますか?" - -msgid "Do you want to change language?" -msgstr "言語を変更しますか?" - -msgid "Do you want to download this theme?" -msgstr "ダウンロードしますか?" - -msgid "Do you want to format:" -msgstr "初期化しますか?" - -msgid "Do you want to load the default theme?" -msgstr "標準のテーマを読み込みますか?" - -msgid "Do you want to sync free space info sector on all FAT32 partitions?" -msgstr "全てのFAT32領域のセクタで空き容量情報を同期しますか?" - -msgid "Do you wish to update/download all language files?" -msgstr "すべての言語をダウンロードしますか?" - -msgid "Done!" -msgstr "完了!" - -msgid "Download" -msgstr "ダウンロード" - -msgid "Download Now" -msgstr "ダウンロード" - -msgid "Download finished" -msgstr "ダウンロードが終了しました" - -msgid "Downloading 3D Covers" -msgstr "両面カバーをダウンロード中" - -msgid "Downloading Flat Covers" -msgstr "片面カバーをダウンロード中" - -msgid "Downloading Full HQ Covers" -msgstr "フルカバー(精細)をダウンロード中" - -msgid "Downloading Full LQ Covers" -msgstr "フルカバー(普通)をダウンロード中" - -msgid "Downloading custom Discarts" -msgstr "カスタムレーベルをダウンロード中" - -msgid "Downloading file..." -msgstr "ダウンロード中です..." - -msgid "Downloading image:" -msgstr "画像をダウンロード中" - -msgid "Downloading original Discarts" -msgstr "純正レーベルをダウンロード中" - -msgid "Downloading pagelist:" -msgstr "リストをダウンロード中:" - -msgid "Dutch" -msgstr "オランダ語" - -msgid "ERROR" -msgstr "エラー" - -msgid "ERROR:" -msgstr "エラー:" - -msgid "ERROR: Can't set up theme." -msgstr "テーマを適用できませんでした" - -msgid "English" -msgstr "英語" - -msgid "Error" -msgstr "エラー" - -msgid "Error !" -msgstr "エラー!" - -msgid "Error 002 fix" -msgstr "Error002対策" - -#, c-format -msgid "Error creating path: %s" -msgstr "パスの作成エラー: %s" - -msgid "Error opening downloaded file" -msgstr "ダウンロードしたファイルを開けません" - -msgid "Error reading Disc" -msgstr "読み込みに失敗しました" - -#, c-format -msgid "Error when downloading file: %i" -msgstr "ダウンロードに失敗: %i" - -msgid "Error while downloding file" -msgstr "ダウンロードに失敗しました" - -msgid "Error while opening the zip." -msgstr "zipファイルを開けません" - -msgid "Error while transfering data." -msgstr "転送中にエラーが発生しました" - -msgid "Error while updating USB Loader GX." -msgstr "更新中にエラーが発生しました" - -msgid "Error writing the data." -msgstr "データの書き込み中にエラーが発生しました" - -msgid "Error..." -msgstr "エラー…" - -msgid "Error:" -msgstr "エラー:" - -msgid "Exit" -msgstr "終了" - -msgid "Exit to where?" -msgstr "どこに移動しますか?" - -msgid "Extracting files..." -msgstr "解凍中です…" - -msgid "Failed formating" -msgstr "初期化に失敗しました" - -msgid "Failed to extract." -msgstr "解凍に失敗しました" - -msgid "Failed to open partition" -msgstr "領域を開けませんでした" - -msgid "Failed updating" -msgstr "更新に失敗しました" - -msgid "Feb" -msgstr "2月" - -msgid "File not found." -msgstr "ファイルが見つかりません" - -#, c-format -msgid "Filesize is %i Byte." -msgstr "ファイルサイズが%iバイトです" - -msgid "Filesize is 0 Byte." -msgstr "ファイルサイズが0バイトです" - -msgid "Finishing installation... Ok!" -msgstr "インストールの完了...完了しました" - -msgid "Flat Covers" -msgstr "正面カバー" - -msgid "Flip-X" -msgstr "ゲームリストの回転" - -msgid "Force NTSC" -msgstr "NTSCに強制" - -msgid "Force PAL50" -msgstr "PAL50に強制" - -msgid "Force PAL60" -msgstr "PAL60に強制" - -msgid "Format" -msgstr "初期化" - -msgid "Formatting, please wait..." -msgstr "初期化中です、お待ち下さい..." - -msgid "Found missing images." -msgstr "不足画像が見つかりました" - -msgid "Free Space" -msgstr "空き" - -msgid "French" -msgstr "フランス語" - -msgid "Full Cover Path" -msgstr "フルカバー" - -msgid "Full HQ Covers" -msgstr "フルカバー(精細)" - -msgid "Full LQ Covers" -msgstr "フルカバー(普通)" - -msgid "Full Menu" -msgstr "フルメニュー" - -msgid "Full shutdown" -msgstr "シャットダウン" - -msgid "GAMEID_Gamename" -msgstr "ゲームID_ゲーム名" - -msgid "GCT Cheatcodes Path" -msgstr "GCTチート" - -msgid "GCT File created" -msgstr "GCTファイルを作成しました" - -msgid "GUI Settings" -msgstr "基本設定" - -msgid "Game ID" -msgstr "IDのみ" - -msgid "Game IOS" -msgstr "使用するIOS" - -msgid "Game Language" -msgstr "ゲームの言語" - -msgid "Game Load" -msgstr "ゲームの起動方法" - -msgid "Game Lock" -msgstr "ロック" - -msgid "Game Only" -msgstr "ゲームのみ" - -msgid "Game Region" -msgstr "リージョンのみ" - -msgid "Game Size" -msgstr "容量" - -msgid "Game Sound Mode" -msgstr "サウンドモード" - -msgid "Game Sound Volume" -msgstr "音量" - -msgid "Game Split Size" -msgstr "ゲームの分割サイズ" - -msgid "Game is already installed:" -msgstr "このゲームは既にインストールされています:" - -msgid "Game/Install Partition" -msgstr "ゲーム/インストール 領域" - -msgid "Gamename [GAMEID]" -msgstr "ゲーム名 [ゲームID]" - -msgid "Games" -msgstr "ゲーム総数" - -msgid "Genre:" -msgstr "ジャンル:" - -msgid "German" -msgstr "ドイツ語" - -msgid "Global Settings" -msgstr "基本設定" - -msgid "HOME Menu" -msgstr "HOMEボタンメニュー" - -msgid "Homebrew Apps Path" -msgstr "Homebrew" - -msgid "Homebrew Channel" -msgstr "HBCへ" - -msgid "Homebrew Launcher" -msgstr "Homebrewランチャー" - -msgid "Hour" -msgstr "時間" - -msgid "How do you want to update?" -msgstr "更新方法の選択" - -msgid "How to Shutdown?" -msgstr "終了方法の選択" - -#, c-format -msgid "Incoming file %0.2fKB" -msgstr "ファイルを受信中 %0.2fKB" - -#, c-format -msgid "Incoming file %0.2fMB" -msgstr "ファイルを受信中 %0.2fMB" - -msgid "Initializing Network" -msgstr "接続中・・・" - -msgid "Insert Disk" -msgstr "ディスクを入れてください" - -msgid "Insert a Wii Disc!" -msgstr "Wiiディスクを入れて下さい!" - -msgid "Install" -msgstr "インストール" - -msgid "Install Error!" -msgstr "インストールエラー!" - -msgid "Install a game" -msgstr "ゲームをインストール" - -msgid "Install directories" -msgstr "インストールフォルダ" - -msgid "Install partitions" -msgstr "保存する領域" - -msgid "Installing content... Ok!" -msgstr "コンテンツをインストール...成功!" - -msgid "Installing game:" -msgstr "ゲームをインストール中:" - -msgid "Installing ticket... Ok!" -msgstr "チケットをインストール...成功!" - -msgid "Installing title... Ok!" -msgstr "タイトルをインストール...成功!" - -msgid "Installing wad" -msgstr "WADをインストールします" - -msgid "Issue manager /" -msgstr "課題管理者:" - -msgid "It seems that you have some information that will be helpful to us. Please pass this information along to the DEV team." -msgstr "この情報は開発者までお知らせください" - -msgid "Italian" -msgstr "イタリア語" - -msgid "Jan" -msgstr "1月" - -msgid "Japanese" -msgstr "日本語" - -msgid "July" -msgstr "7月" - -msgid "June" -msgstr "6月" - -msgid "Keep" -msgstr "保存" - -msgid "Keyboard" -msgstr "キーボードのタイプ" - -msgid "Korean" -msgstr "韓国語" - -msgid "Language File" -msgstr "言語ファイル" - -msgid "Language change:" -msgstr "言語の変更" - -msgid "Languagefiles Path" -msgstr "言語ファイル" - -msgid "Languagepath changed." -msgstr "言語のパスを変更しました" - -msgid "Left" -msgstr "左ボタンで" - -msgid "Like SysMenu" -msgstr "Wiiメニュー風" - -msgid "List on Gamelaunch" -msgstr "ゲーム起動時にリスト" - -msgid "Load" -msgstr "はじめる" - -msgid "Load From SD/USB" -msgstr "SD/USBからロード" - -#, c-format -msgid "Load file from: %s ?" -msgstr "%sからファイルをロードしますか?" - -msgid "Load this DOL as alternate DOL?" -msgstr "このDOLを代替DOLとしてロードしますか?" - -msgid "Loader Settings" -msgstr "ローダーの設定" - -msgid "Loading standard language." -msgstr "標準の言語に変更しますか" - -msgid "Loading standard music." -msgstr "初期設定に戻しますか" - -msgid "Lock Console" -msgstr "GXをロック" - -msgid "Lock USB Loader GX" -msgstr "ロックする" - -msgid "Locked" -msgstr "ロック中" - -msgid "Loop Directory" -msgstr "フォルダ内でループ" - -msgid "Loop Music" -msgstr "ループさせる" - -msgid "Loop Sound" -msgstr "ループさせる" - -msgid "Main tester:" -msgstr "メインテスター:" - -msgid "Mar" -msgstr "3月" - -msgid "Mark new games" -msgstr "Newマークの表示機能" - -msgid "May" -msgstr "5月" - -msgid "Messageboard Update" -msgstr "Wii伝言板の更新" - -msgid "Motion+ Video" -msgstr "モーション+説明ムービー" - -msgid "Mount DVD drive" -msgstr "DVDを起動" - -msgid "Multiple Partitions" -msgstr "マルチ領域" - -msgid "Music Loop Mode" -msgstr "ループ機能" - -msgid "Music Volume" -msgstr "BGMの音量" - -msgid "Neither" -msgstr "非表示" - -msgid "Network is not initiated." -msgstr "ネットワークに接続されていません" - -msgid "New Disc Detected" -msgstr "新しいディスクが検出されました" - -msgid "Next" -msgstr "右" - -msgid "No" -msgstr "いいえ" - -msgid "No Cheatfile found" -msgstr "チートファイルが見つかりません" - -msgid "No DOL file found on disc." -msgstr "ディスク内に.DOLがありません" - -msgid "No Splitting" -msgstr "分割しない" - -msgid "No URL or Path specified." -msgstr "URLかパスが指定されていません" - -msgid "No WBFS or FAT/NTFS/EXT partition found" -msgstr "使用できる領域が見つかりません" - -msgid "No cheats were selected" -msgstr "何も選ばれていません" - -msgid "No data could be read." -msgstr "読み込みに失敗しました" - -msgid "No favorites selected." -msgstr "お気に入りはありません" - -msgid "No file missing!" -msgstr "必要ありません" - -msgid "No new updates." -msgstr "更新はありません" - -msgid "No themes found on the site." -msgstr "テーマが見つかりません" - -msgid "No themes found." -msgstr "テーマが見つかりません" - -msgid "None" -msgstr "なし" - -msgid "Normal" -msgstr "ワイド" - -msgid "Not a WAD file." -msgstr "WADファイルではありません" - -msgid "Not a Wii Disc" -msgstr "Wiiディスクではありません" - -msgid "Not a valid URL" -msgstr "無効なURLです" - -msgid "Not a valid URL path" -msgstr "無効なパスです" - -msgid "Not a valid domain" -msgstr "無効なドメインです" - -msgid "Not enough free memory." -msgstr "空メモリが不足しています" - -msgid "Not enough free space!" -msgstr "空容量が不足しています!" - -msgid "Not enough memory." -msgstr "メモリが足りません" - -msgid "Not required" -msgstr "必要なし" - -msgid "Not supported format!" -msgstr "対応していない形式です!" - -msgid "Nov" -msgstr "11月" - -msgid "OFF" -msgstr "使わない" - -msgid "OK" -msgstr "確定する" - -msgid "ON" -msgstr "使う" - -msgid "Ocarina" -msgstr "改造コード" - -msgid "Oct" -msgstr "10月" - -msgid "Official Site:" -msgstr "公式サイト:" - -msgid "Offset" -msgstr "代替" - -msgid "Only Game Partition" -msgstr "ゲーム領域のみ" - -msgid "Only for Install" -msgstr "インストール中のみ" - -msgid "Original Discarts" -msgstr "純正レーベル" - -msgid "Original/Customs" -msgstr "公式を優先" - -msgid "Parental Control" -msgstr "使用制限の設定" - -msgid "Partition" -msgstr "使用する領域" - -msgid "Password" -msgstr "暗証番号" - -msgid "Password Changed" -msgstr "暗証番号の変更" - -msgid "Password has been changed" -msgstr "暗証番号を変更しました" - -msgid "Patch Country Strings" -msgstr "国コードパッチ" - -msgid "Path Changed" -msgstr "パスが変更されました" - -msgid "Permission denied." -msgstr "権限がありません" - -msgid "Pick from a list" -msgstr "リストから選択" - -msgid "Play Count" -msgstr "プレイ回数" - -msgid "Play Next" -msgstr "次へ" - -msgid "Play Once" -msgstr "一度だけ再生" - -msgid "Play Previous" -msgstr "前へ" - -msgid "Playing Music:" -msgstr "再生中" - -msgid "Please wait..." -msgstr "しばらくお待ちください" - -msgid "Power off the Wii" -msgstr "Wiiの電源を切る" - -msgid "Prev" -msgstr "左" - -msgid "Prompts Buttons" -msgstr "ウインドウサイズ" - -msgid "Published by" -msgstr "発売元:" - -msgid "Quick Boot" -msgstr "クイック起動" - -msgid "Random Directory Music" -msgstr "フォルダ内でランダム再生" - -msgid "Reading WAD data... Ok!" -msgstr "WADデータの読み込み...成功!" - -msgid "Receiving file from:" -msgstr "ファイルを受信中:" - -msgid "Region Patch" -msgstr "リージョンパッチ" - -msgid "Released" -msgstr "発売日" - -msgid "Reload SD" -msgstr "SDを再読み込み" - -msgid "Remove update" -msgstr "更新を取り除く" - -msgid "Rename Game on WBFS" -msgstr "WBFS内のゲーム名を変更" - -msgid "Reset" -msgstr "リセット" - -msgid "Reset BG Music" -msgstr "BGMをリセット" - -msgid "Reset Playcounter" -msgstr "プレイ回数をリセット" - -msgid "Reset to default BGM?" -msgstr "BGMを初期状態に戻しますか?" - -msgid "Restarting..." -msgstr "再起動します" - -msgid "Return" -msgstr "もどる" - -msgid "Return To" -msgstr "戻り先" - -msgid "Return to Wii Menu" -msgstr "Wiiメニューへもどる" - -msgid "Right" -msgstr "右ボタンで" - -msgid "Rumble" -msgstr "振動機能" - -msgid "SChinese" -msgstr "簡体中国語" - -msgid "SFX Volume" -msgstr "効果音の音量" - -msgid "Save" -msgstr "保存" - -msgid "Save Failed. No device inserted?" -msgstr "保存に失敗しました" - -msgid "Save Game List to" -msgstr "リストを保存しますか" - -msgid "Save List" -msgstr "リスト" - -msgid "Saved" -msgstr "保存しました" - -msgid "Screensaver" -msgstr "スクリーンセーバー" - -msgid "Select" -msgstr "選択" - -msgid "Select DOL Offset" -msgstr "代理DOLの選択" - -msgid "Select a DOL" -msgstr "DOLを選択" - -msgid "Select a DOL from Game" -msgstr "ゲームからDOLを選択" - -msgid "Sept" -msgstr "9月" - -msgid "Set Search-Filter" -msgstr "検索" - -msgid "Settings" -msgstr "設定" - -msgid "Show Free Space" -msgstr "空き容量の表示" - -msgid "Shutdown System" -msgstr "シャットダウン" - -msgid "Shutdown Wii" -msgstr "シャットダウン" - -msgid "Sort alphabetically" -msgstr "名前順に並び替え" - -msgid "Sort by number of players" -msgstr "プレイヤー数順に並び替え" - -msgid "Sort by rank" -msgstr "ランク順に並び替え" - -msgid "Sort order by most played" -msgstr "プレイ回数が多い順に並び替え" - -msgid "Sound" -msgstr "サウンド" - -msgid "Sound Settings" -msgstr "サウンド設定" - -msgid "Sound+BGM" -msgstr "サウンドとBGM" - -msgid "Sound+Quiet" -msgstr "サウンドのみ" - -msgid "Spanish" -msgstr "スペイン語" - -msgid "Special thanks to:" -msgstr "スペシャルサンクス:" - -msgid "Split each 2GB" -msgstr "2GBごとに分割" - -msgid "Split each 4GB" -msgstr "4GBごとに分割" - -msgid "Standby" -msgstr "スタンバイ" - -msgid "Success" -msgstr "成功" - -msgid "Success:" -msgstr "成功:" - -msgid "Successfully Saved" -msgstr "保存に成功しました" - -msgid "Successfully Updated" -msgstr "更新しました" - -msgid "Successfully Updated thanks to www.techjawa.com" -msgstr "更新しました www.techjawa.comに感謝!" - -msgid "Successfully deleted:" -msgstr "削除に成功しました" - -msgid "Successfully extracted theme." -msgstr "テーマの解凍を完了しました." - -msgid "Successfully installed:" -msgstr "このゲームをインストールしました" - -msgid "Sync FAT32 FS Info" -msgstr "FAT32FS情報を同期" - -msgid "Synchronizing..." -msgstr "同期中です..." - -msgid "System Default" -msgstr "Wiiの初期値" - -msgid "TChinese" -msgstr "繁体中国語" - -msgid "TXT Cheatcodes Path" -msgstr "TXTチート" - -msgid "The .them file was not found in the zip." -msgstr ".themファイルがzip内にありません" - -msgid "The entered directory does not exist. Would you like to create it?" -msgstr "フォルダがありません。作成しますか?" - -msgid "The game installation is disabled under this IOS because of instability in usb write." -msgstr "このIOSでのゲームの追加は不安定なため無効になっています" - -msgid "The wad file was installed" -msgstr "wadがインストールされました" - -#, c-format -msgid "The wad installation failed with error %i" -msgstr "WADのインストールはエラー%iで失敗しました" - -msgid "Theme Downloader" -msgstr "テーマをダウンロード" - -msgid "Theme Menu" -msgstr "テーマ" - -msgid "Theme Path" -msgstr "テーマ" - -msgid "Theme Title:" -msgstr "テーマ名:" - -msgid "Themes by www.spiffy360.com" -msgstr "テーマ…www.spiffy360.com" - -msgid "This IOS is the BootMii ios. If you are sure it is not BootMii and you have something else installed there than ignore this warning." -msgstr "このIOSはBootMiiのIOSです" - -msgid "This IOS was not found on the titles list. If you are sure you have it installed than ignore this warning." -msgstr "このIOSはタイトルリストにありませんでした" - -msgid "Time left:" -msgstr "残り時間:" - -msgid "Title Launcher" -msgstr "ランチャー" - -msgid "Titles from WiiTDB" -msgstr "ゲーム名の日本語化" - -msgid "Tooltips" -msgstr "ヒントバルーン" - -msgid "Transfer failed" -msgstr "転送に失敗しました" - -msgid "USB Device not found" -msgstr "USB機器が見つかりません" - -msgid "USB Loader GX is protected" -msgstr "GXは保護されています" - -msgid "Uninstall" -msgstr "アンインストール" - -msgid "Uninstall Game" -msgstr "ゲームをアンインストール" - -msgid "Uninstall Menu" -msgstr "アンインストール" - -msgid "Uninstall all" -msgstr "全てアンインストール" - -msgid "Uninstalling wad" -msgstr "WADをアンインストール" - -msgid "Unknown" -msgstr "不明" - -msgid "Unlock USB Loader GX" -msgstr "ロックを解除" - -msgid "Unlocked" -msgstr "ロック無し" - -msgid "Unsupported format, try to extract manually TempTheme.zip." -msgstr "非対応の形式なのでTempTheme.zipを自己解凍してください" - -msgid "Update" -msgstr "更新" - -msgid "Update All" -msgstr "全て" - -msgid "Update DOL" -msgstr "DOLのみ" - -msgid "Update Files" -msgstr "すべて更新" - -msgid "Update Path" -msgstr "GXのdol" - -msgid "Update all Language Files" -msgstr "全言語ファイルを更新" - -msgid "Update failed" -msgstr "更新に失敗しました" - -msgid "Update successfull" -msgstr "更新しました" - -msgid "Updating Language Files:" -msgstr "言語ファイルを更新中:" - -msgid "Uploaded ZIP file installed to homebrew directory." -msgstr "インストール済みディレクトリにZIPを送信しました" - -msgid "VIDTV Patch" -msgstr "映像パッチ" - -msgid "Version:" -msgstr "バージョン:" - -#, c-format -msgid "Version: %s" -msgstr "バージョン: %s" - -msgid "Video Mode" -msgstr "映像の出力方法" - -msgid "WDM Files Path" -msgstr "WDMファイル" - -msgid "WIP Patches Path" -msgstr "WIPパッチ" - -msgid "Waiting..." -msgstr "待機中…" - -msgid "Warning:" -msgstr "警告:" - -msgid "What do you want to update?" -msgstr "更新の選択" - -msgid "What should be deleted for this game title:" -msgstr "このゲームの何を削除しますか:" - -msgid "WiFi Features" -msgstr "ネットワーク対応" - -msgid "Widescreen Fix" -msgstr "普通" - -msgid "Wii Menu" -msgstr "Wiiメニューへ" - -msgid "Wii Settings" -msgstr "データ管理" - -msgid "WiiTDB Files" -msgstr "ゲーム名リスト" - -msgid "WiiTDB Path" -msgstr "ゲーム名リスト" - -msgid "WiiTDB is up to date." -msgstr "WiiTDBが更新されました" - -msgid "Wiilight" -msgstr "スロット点灯機能" - -msgid "Wrong Password" -msgstr "暗証番号が違います" - -msgid "Yes" -msgstr "はい" - -msgid "You are currently using IOS" -msgstr "使用中のIOS:IOS" - -msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." -msgstr "rev17以前のcIOS249ではFAT32/NTFS/EXTに対応していません" - -msgid "You need to select or format a partition" -msgstr "領域を選択するか初期化してください" - -msgid "and translators for language files updates" -msgstr "/ K-M / ichiroling …多言語化" - -msgid "available" -msgstr "があります" - -msgid "does not exist!" -msgstr "存在しません!" - -msgid "does not exist! Loading game without cheats." -msgstr "存在しないので チートなしで起動します" - -msgid "files left" -msgstr "個で完了" - -msgid "for FAT/NTFS support" -msgstr "…FATとNTFSへの対応" - -msgid "for Ocarina" -msgstr "…Ocarinaを制作" - -msgid "for WiiTDB and hosting covers / disc images" -msgstr "WiiTDB…様々な画像を配布" - -msgid "for diverse patches" -msgstr "…様々なパッチを制作" - -msgid "for his awesome tool LibWiiGui" -msgstr "…LibWiiGuiを制作" - -msgid "for hosting the themes" -msgstr "…テーマを配布" - -msgid "for hosting the update files" -msgstr "…更新ファイルを配布" - -msgid "for the USB Loader source" -msgstr "…ソースを制作" - -msgid "formatted!" -msgstr "初期化を完了しました!" - -msgid "free" -msgstr "空き" - -msgid "not set" -msgstr "セットされていません" - -msgid "of" -msgstr "中" - -msgid "seconds left" -msgstr "秒で完了" - -#~ msgid "Author:" -#~ msgstr "制作者:" - -#~ msgid "Do you want to load this theme?" -#~ msgstr "このテーマに変更しますか?" - -#~ msgid "Loading default theme." -#~ msgstr "標準のテーマにしますか?" - -#~ msgid "Theme path is changed." -#~ msgstr "テーマのパスが変更されました" - -#~ msgid "Use IOS58" -#~ msgstr "IOS58を使う" - -#~ msgid "Custom Disc Images" -#~ msgstr "カスタムレーベル" - -#~ msgid "Download Boxart image?" -#~ msgstr "画像をダウンロードしますか?" - -#~ msgid "Download Discart image?" -#~ msgstr "画像をダウンロードしますか?" - -#~ msgid "Downloading file" -#~ msgstr "ファイルをダウンロード中" - -#~ msgid "Missing files" -#~ msgstr "個の画像" - -#~ msgid "Original Disc Images" -#~ msgstr "純正レーベル" - -#~ msgid "files not found on the server!" -#~ msgstr "個サーバーにありませんでした…" - -#~ msgid "Disc Images" -#~ msgstr "ディスク画像" - -#~ msgid "Downloading covers" -#~ msgstr "カバーをダウンロード中" - -#~ msgid "Only Customs" -#~ msgstr "カスタムのみ" - -#~ msgid "Only Original" -#~ msgstr "公式のみ" - -#~ msgid "Trying custom Discarts" -#~ msgstr "カスタムを試行中" - -#~ msgid "Trying original Discarts" -#~ msgstr "公式を試行中" - -#~ msgid "Do you really want to delete:" -#~ msgstr "本当に削除しますか?" - -#~ msgid "Do you want to use the alternate DOL that is known to be correct?" -#~ msgstr "既知の代替DOLを利用しますか?" - -#~ msgid "0 (Locked and Unlocked Games)" -#~ msgstr "全ゲーム" - -#~ msgid "1 (Unlocked Games Only)" -#~ msgstr "制限のないゲームのみ" - -#~ msgid "All partitions" -#~ msgstr "全ての領域" - -#~ msgid "BETA revisions" -#~ msgstr "ベータ版(評価版)" - -#~ msgid "Can't create file" -#~ msgstr "ファイルを作れません" - -#~ msgid "Downloading Page List:" -#~ msgstr "リストをダウンロード中:" - -#~ msgid "Full Shutdown" -#~ msgstr "シャットダウン" - -#~ msgid "GXtheme.cfg not found in any subfolder." -#~ msgstr "設定ファイル(GXtheme.cfg)が見つかりません" - -#~ msgid "GamesLevel" -#~ msgstr "レベル" - -#~ msgid "Gerne:" -#~ msgstr "ジャンル:" - -#~ msgid "If you don't have WiFi, press 1 to get an URL to get your WiiTDB.zip" -#~ msgstr "1ボタンを押すと WiiTDB.zip のURLを表示します" - -#~ msgid "Installing content...Ok!" -#~ msgstr "コンテンツをインストール … 成功!" - -#~ msgid "No WBFS or FAT/NTFS partition found" -#~ msgstr "使用できる領域が見つかりません" - -#~ msgid "Paste it into your browser to get your WiiTDB.zip." -#~ msgstr "ブラウザに貼付けるとWiiTDB.zipをダウンロードできます。" - -#~ msgid "Shutdown to Idle" -#~ msgstr "スタンバイ" - -#~ msgid "Shutdown?" -#~ msgstr "終了方法の選択" - -#~ msgid "Successfully extracted theme" -#~ msgstr "テーマの解凍に成功しました" - -#~ msgid "The wad installation failed with error %ld" -#~ msgstr "WADのインストールはエラー:%ldで失敗しました" - -#~ msgid "Theme Download Path" -#~ msgstr "テーマのダウンロード先" - -#~ msgid "Transfer failed." -#~ msgstr "転送できませんでした" - -#~ msgid "Unlock console to use this option." -#~ msgstr "このオプションを使用する場合はロックを解除してください" - -#~ msgid "Your URL has been saved in %sWiiTDB_URL.txt." -#~ msgstr "%sWiiTDB_URL.txtにURLを保存しました" diff --git a/Languages/korean.lang b/Languages/korean.lang deleted file mode 100644 index 10b91767..00000000 --- a/Languages/korean.lang +++ /dev/null @@ -1,1716 +0,0 @@ -# USB Loader GX language source file. -# korean.lang - r719 -# don't delete/change this line (é). -msgid "" -msgstr "" -"Project-Id-Version: USB Loader GX\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-06 19:36+0100\n" -"PO-Revision-Date: 2009-10-01 01:00+0200\n" -"Last-Translator: nextos@korea.com\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -msgid " Wad Saved as:" -msgstr " Wad 저장은:" - -msgid " could not be downloaded." -msgstr " 다운로드할수 없음." - -msgid " has been Saved. The text has not been verified. Some of the code may not work right with each other. If you experience trouble, open the text in a real text editor for more information." -msgstr " 저장됨. 문자는 검증되지 않았음. 몇몇의 코드는 정상동작을 안할수있음. 만약 문제가 있다면, 문서편집기로 문서를 확인하기 바람." - -msgid " is not on the server." -msgstr " 은 서버에 없어요." - -#, c-format -msgid "%i files not found on the server!" -msgstr "" - -#, c-format -msgid "%i missing files" -msgstr "" - -msgid "0 (Everyone)" -msgstr "0 (모두다)" - -msgid "1 (Child 7+)" -msgstr "1 (7세 이상)" - -msgid "1 hour" -msgstr "1 시간" - -msgid "10 min" -msgstr "10 분" - -msgid "2 (Teen 12+)" -msgstr "2 (12세 이상)" - -msgid "20 min" -msgstr "20 분" - -msgid "2D Cover Path" -msgstr "2D 표지 경로" - -msgid "3 (Mature 16+)" -msgstr "3 (16세 이상)" - -msgid "3 min" -msgstr "3 분" - -msgid "30 min" -msgstr "30 분" - -msgid "3D Cover Path" -msgstr "3D 표지 경로" - -msgid "3D Covers" -msgstr "3D 커버" - -msgid "4 (Adults Only 18+)" -msgstr "4 (성인 18세 이상)" - -msgid "5 min" -msgstr "5 분" - -msgid ">> Deleting tickets..." -msgstr ">> 티켓 삭제중..." - -msgid ">> Deleting tickets...ERROR! " -msgstr ">> 티켓 삭제 ...에러! " - -msgid ">> Deleting tickets...Ok! " -msgstr ">> 티켓 삭제 ...성공! " - -msgid ">> Deleting title ...ERROR! " -msgstr ">> 타이틀 삭제 ...에러! " - -msgid ">> Deleting title ...Ok!" -msgstr ">> 타이틀 삭제 ...성공!" - -msgid ">> Deleting title contents..." -msgstr ">> 타이틀 내용 삭제중 ..." - -msgid ">> Deleting title contents...ERROR! " -msgstr ">> 타이틀 내용 삭제 ...에러! " - -msgid ">> Deleting title contents...Ok!" -msgstr ">> 타이틀 내용 삭제 ...성공!" - -msgid ">> Deleting title..." -msgstr ">> 타이틀 삭제..." - -msgid ">> Finishing installation..." -msgstr ">> 인스톨 종료중..." - -msgid ">> Installing content #" -msgstr ">> 컨텐츠 인스톨중 #" - -msgid ">> Installing ticket..." -msgstr ">> 티켓 인스톨중..." - -msgid ">> Installing title..." -msgstr ">> 타이틀 인스톨중..." - -msgid ">> Reading WAD data..." -msgstr ">> WAD 데이터 읽는중..." - -msgid ">> Reading WAD data...ERROR! " -msgstr ">> WAD 데이타 읽기...에러! " - -msgid ">> Reading WAD data...Ok!" -msgstr ">> WAD 데이터 읽기...성공!" - -msgid "AUTO" -msgstr "자동" - -msgid "All Partitions" -msgstr "" - -msgid "All images downloaded successfully." -msgstr "" - -msgid "All the features of USB Loader GX are unlocked." -msgstr "모든 USB로더 GX 기능 잠금 해제." - -msgid "Alternate DOL" -msgstr "Alternate DOL" - -msgid "Anti" -msgstr "" - -msgid "App Language" -msgstr "USB 로더 언어" - -msgid "Apply" -msgstr "" - -msgid "Apr" -msgstr "4월" - -msgid "Are you sure you want to lock USB Loader GX?" -msgstr "" - -msgid "Are you sure you want to reset?" -msgstr "" - -msgid "Are you sure?" -msgstr "확실합니까?" - -msgid "Aug" -msgstr "8월" - -msgid "Author(s):" -msgstr "" - -msgid "AutoInit Network" -msgstr "자동네트웍설정" - -msgid "Automatic port switching is done on the fly. You need to change all custom paths to SD-Card first for this option or else it could damage a filesystem." -msgstr "" - -msgid "BCA Codes Path" -msgstr "" - -msgid "Back" -msgstr "뒤로" - -msgid "Back to HBC or Wii Menu" -msgstr "홈브류 메뉴 또는 Wii 메뉴로" - -msgid "Backgroundmusic" -msgstr "배경음악" - -msgid "Big thanks to:" -msgstr "감사 :" - -msgid "Block Cover Downloads" -msgstr "" - -msgid "Block Custom Paths" -msgstr "" - -msgid "Block Game Install" -msgstr "" - -msgid "Block Game Settings" -msgstr "" - -msgid "Block GameID Change" -msgstr "" - -msgid "Block Global Settings" -msgstr "" - -msgid "Block Gui Settings" -msgstr "" - -msgid "Block HBC Menu" -msgstr "" - -msgid "Block IOS Reload" -msgstr "IOS 재로딩 막음" - -msgid "Block Loader Settings" -msgstr "" - -msgid "Block Parental Settings" -msgstr "" - -msgid "Block Reset Settings" -msgstr "" - -msgid "Block Sound Settings" -msgstr "" - -msgid "Block Theme Downloader" -msgstr "" - -msgid "Block Theme Menu" -msgstr "" - -msgid "Block Title Launcher" -msgstr "" - -msgid "Block Updates" -msgstr "" - -msgid "Boot/Standard" -msgstr "기본 부팅설정" - -msgid "Boot?" -msgstr "부팅?" - -msgid "Both" -msgstr "둘다" - -msgid "Both Ports" -msgstr "" - -msgid "Can't be formatted" -msgstr "포맷할 수 없습니다." - -msgid "Can't create directory" -msgstr "디렉토리를 만들 수 없습니다" - -#, c-format -msgid "Can't create path: %s" -msgstr "" - -msgid "Can't delete:" -msgstr "삭제할 수 없습니다:" - -msgid "Cancel" -msgstr "취소" - -msgid "Cannot write to destination." -msgstr "" - -msgid "Change Play Path" -msgstr "" - -msgid "Cheatfile is blank" -msgstr "치트화일 내용없음" - -msgid "Clear" -msgstr "" - -msgid "Click to Download Covers" -msgstr "표지를 다운하려면 클릭하세요" - -msgid "Click to change game ID" -msgstr "게임 ID를 변경하려련 클릭하세요" - -msgid "Clock" -msgstr "시계" - -msgid "Close" -msgstr "닫기" - -msgid "Code Download" -msgstr "코드 다운로드" - -#, c-format -msgid "Coded by: %s" -msgstr "Coded by: %s" - -msgid "Coding:" -msgstr "코디:" - -msgid "Connection to server timed out." -msgstr "" - -msgid "Console" -msgstr "콘솔" - -msgid "Console Default" -msgstr "콘솔 기본값" - -msgid "Console Locked" -msgstr "콘솔 잠김" - -msgid "Console must be unlocked for this option." -msgstr "" - -msgid "Console should be unlocked to modify it." -msgstr "변경하려면 콘솔 잠김을 해제하세요." - -msgid "Continue to install game?" -msgstr "계속 설치하겠습니까?" - -msgid "Controllevel" -msgstr "조정 레벨" - -msgid "Correct Password" -msgstr "올바른 비밀번호" - -msgid "Could not connect to the server." -msgstr "" - -msgid "Could not create GCT file" -msgstr "GCT 파일을 생성할수 없음" - -#, c-format -msgid "Could not create path: %s" -msgstr "" - -msgid "Could not find info for this game in the wiitdb.xml." -msgstr "" - -msgid "Could not initialize DIP module!" -msgstr "DIP 모듈 초기화 실패!" - -msgid "Could not initialize network!" -msgstr "네트워크 초기화 실패!" - -msgid "Could not open Disc" -msgstr "디스크를 열 수 없습니다." - -msgid "Could not open wiitdb.xml." -msgstr "" - -msgid "Could not save." -msgstr "" - -msgid "Cover Download" -msgstr "표지 다운로드" - -msgid "Create" -msgstr "생성" - -msgid "Credits" -msgstr "Credits" - -msgid "Custom Discarts" -msgstr "" - -msgid "Custom Paths" -msgstr "Custom Paths" - -msgid "Customs/Original" -msgstr "커스텀/오리지널" - -msgid "DOL Path" -msgstr "DOL 패치" - -msgid "Dec" -msgstr "12월" - -msgid "Default" -msgstr "기본값" - -msgid "Default Gamesettings" -msgstr "기본 게임설정" - -msgid "Default Settings" -msgstr "기본 설정" - -msgid "Delete" -msgstr "삭제" - -msgid "Delete ?" -msgstr "삭제 ?" - -msgid "Delete Cheat GCT" -msgstr "" - -msgid "Delete Cheat TXT" -msgstr "치트문서 삭제" - -msgid "Delete Cover Artwork" -msgstr "박스아트 삭제" - -msgid "Delete Disc Artwork" -msgstr "삭제 Discart" - -msgid "Design:" -msgstr "디자인:" - -msgid "Developed by" -msgstr "디자인 by" - -msgid "Directory does not exist!" -msgstr "" - -msgid "Disc Artwork Download" -msgstr "디스크 이미지 다운로드" - -msgid "Disc Artwork Path" -msgstr "디스크 이미지 경로" - -msgid "Disc Default" -msgstr "디스크 기본값" - -msgid "DiskFlip" -msgstr "디스크 플립" - -msgid "Display" -msgstr "화면 표시" - -msgid "Display as a carousel" -msgstr "그림으로 표시" - -msgid "Display as a grid" -msgstr "격자 무니 표시" - -msgid "Display as a list" -msgstr "리스트로 표시" - -msgid "Display favorites only" -msgstr "" - -msgid "Do you want to apply it now?" -msgstr "" - -msgid "Do you want to apply this theme?" -msgstr "" - -msgid "Do you want to change language?" -msgstr "정말로 언어를 변경할까요?" - -msgid "Do you want to download this theme?" -msgstr "" - -msgid "Do you want to format:" -msgstr "포맷하겠습니까:" - -msgid "Do you want to load the default theme?" -msgstr "" - -msgid "Do you want to sync free space info sector on all FAT32 partitions?" -msgstr "" - -msgid "Do you wish to update/download all language files?" -msgstr "정말로 모든 언어화일을 업데이트하고 다운로드 할까요?" - -msgid "Done!" -msgstr "완료!" - -msgid "Download" -msgstr "" - -msgid "Download Now" -msgstr "다운로드 시작" - -msgid "Download finished" -msgstr "다운로드 완료" - -msgid "Downloading 3D Covers" -msgstr "" - -msgid "Downloading Flat Covers" -msgstr "" - -msgid "Downloading Full HQ Covers" -msgstr "" - -msgid "Downloading Full LQ Covers" -msgstr "" - -msgid "Downloading custom Discarts" -msgstr "" - -msgid "Downloading file..." -msgstr "" - -msgid "Downloading image:" -msgstr "" - -msgid "Downloading original Discarts" -msgstr "" - -msgid "Downloading pagelist:" -msgstr "" - -msgid "Dutch" -msgstr "네덜란드어" - -msgid "ERROR" -msgstr "에러" - -msgid "ERROR:" -msgstr "에러:" - -msgid "ERROR: Can't set up theme." -msgstr "" - -msgid "English" -msgstr "영어" - -msgid "Error" -msgstr "에러" - -msgid "Error !" -msgstr "에러 !" - -msgid "Error 002 fix" -msgstr "Error 002 fix" - -#, c-format -msgid "Error creating path: %s" -msgstr "" - -msgid "Error opening downloaded file" -msgstr "" - -msgid "Error reading Disc" -msgstr "디스크 읽기 오류" - -#, c-format -msgid "Error when downloading file: %i" -msgstr "" - -msgid "Error while downloding file" -msgstr "" - -msgid "Error while opening the zip." -msgstr "" - -msgid "Error while transfering data." -msgstr "데이터 전송중 에러." - -msgid "Error while updating USB Loader GX." -msgstr "" - -msgid "Error writing the data." -msgstr "" - -msgid "Error..." -msgstr "에러..." - -msgid "Error:" -msgstr "에러:" - -msgid "Exit" -msgstr "" - -msgid "Exit to where?" -msgstr "" - -msgid "Extracting files..." -msgstr "" - -msgid "Failed formating" -msgstr "포맷 실패" - -msgid "Failed to extract." -msgstr "" - -msgid "Failed to open partition" -msgstr "파티션 열기 실패" - -msgid "Failed updating" -msgstr "" - -msgid "Feb" -msgstr "2월" - -msgid "File not found." -msgstr "파일을 찾을수가 없네요." - -#, c-format -msgid "Filesize is %i Byte." -msgstr "" - -msgid "Filesize is 0 Byte." -msgstr "" - -msgid "Finishing installation... Ok!" -msgstr "설치 종료중... 성공!" - -msgid "Flat Covers" -msgstr "" - -msgid "Flip-X" -msgstr "좌/우 설정" - -msgid "Force NTSC" -msgstr "" - -msgid "Force PAL50" -msgstr "" - -msgid "Force PAL60" -msgstr "" - -msgid "Format" -msgstr "포맷" - -msgid "Formatting, please wait..." -msgstr "포맷 중. 기다려 주세요..." - -msgid "Found missing images." -msgstr "" - -msgid "Free Space" -msgstr "여유 공간" - -msgid "French" -msgstr "불어" - -msgid "Full Cover Path" -msgstr "" - -msgid "Full HQ Covers" -msgstr "" - -msgid "Full LQ Covers" -msgstr "" - -msgid "Full Menu" -msgstr "" - -msgid "Full shutdown" -msgstr "" - -msgid "GAMEID_Gamename" -msgstr "" - -msgid "GCT Cheatcodes Path" -msgstr "치트코드 경로" - -msgid "GCT File created" -msgstr "GCT 파일 생성됨" - -msgid "GUI Settings" -msgstr "GUI 설정" - -msgid "Game ID" -msgstr "게임 ID" - -msgid "Game IOS" -msgstr "" - -msgid "Game Language" -msgstr "언어" - -msgid "Game Load" -msgstr "게임 로드" - -msgid "Game Lock" -msgstr "" - -msgid "Game Only" -msgstr "" - -msgid "Game Region" -msgstr "지역" - -msgid "Game Size" -msgstr "게임 용량" - -msgid "Game Sound Mode" -msgstr "" - -msgid "Game Sound Volume" -msgstr "" - -msgid "Game Split Size" -msgstr "" - -msgid "Game is already installed:" -msgstr "게임이 이미 설치되어 있습니다." - -msgid "Game/Install Partition" -msgstr "" - -msgid "Gamename [GAMEID]" -msgstr "" - -msgid "Games" -msgstr "게임" - -msgid "Genre:" -msgstr "" - -msgid "German" -msgstr "독일어" - -msgid "Global Settings" -msgstr "" - -msgid "HOME Menu" -msgstr "HOME 메뉴" - -msgid "Homebrew Apps Path" -msgstr "홈브류 경로" - -msgid "Homebrew Channel" -msgstr "" - -msgid "Homebrew Launcher" -msgstr "홈브류 런처" - -msgid "Hour" -msgstr "시간" - -msgid "How do you want to update?" -msgstr "업데이트 할까요?" - -msgid "How to Shutdown?" -msgstr "어떻게 종료할까요?" - -#, c-format -msgid "Incoming file %0.2fKB" -msgstr "화일 수신중 %0.2fKB" - -#, c-format -msgid "Incoming file %0.2fMB" -msgstr "화일 수신중 %0.2fMB" - -msgid "Initializing Network" -msgstr "네트워크 초기화" - -msgid "Insert Disk" -msgstr "디스크를 넣어주세요" - -msgid "Insert a Wii Disc!" -msgstr "Wii 디스크를 넣으세요!" - -msgid "Install" -msgstr "설치" - -msgid "Install Error!" -msgstr "설치 에러!" - -msgid "Install a game" -msgstr "게임을 설치할까요" - -msgid "Install directories" -msgstr "" - -msgid "Install partitions" -msgstr "" - -msgid "Installing content... Ok!" -msgstr "컨텐츠 인스톨중...성공!" - -msgid "Installing game:" -msgstr "게임 설치 중:" - -msgid "Installing ticket... Ok!" -msgstr "티켓 설치중... Ok!" - -msgid "Installing title... Ok!" -msgstr "타이틀 설치중... Ok!" - -msgid "Installing wad" -msgstr "Wad 설치중" - -msgid "Issue manager /" -msgstr "" - -msgid "It seems that you have some information that will be helpful to us. Please pass this information along to the DEV team." -msgstr "우리를 도울수 있는 정보를 가지고 있군요. 이정보를 DEV 팀에 전달해주세요." - -msgid "Italian" -msgstr "이태리어" - -msgid "Jan" -msgstr "1월" - -msgid "Japanese" -msgstr "일본어" - -msgid "July" -msgstr "7월" - -msgid "June" -msgstr "6월" - -msgid "Keep" -msgstr "보관" - -msgid "Keyboard" -msgstr "키보드" - -msgid "Korean" -msgstr "한국어" - -msgid "Language File" -msgstr "언어화일" - -msgid "Language change:" -msgstr "언어 변경:" - -msgid "Languagefiles Path" -msgstr "" - -msgid "Languagepath changed." -msgstr "언어경로 변경됨." - -msgid "Left" -msgstr "왼쪽" - -msgid "Like SysMenu" -msgstr "시스템 메뉴처럼" - -msgid "List on Gamelaunch" -msgstr "" - -msgid "Load" -msgstr "로드" - -msgid "Load From SD/USB" -msgstr "" - -#, c-format -msgid "Load file from: %s ?" -msgstr "화일 로드는 %s 에서?" - -msgid "Load this DOL as alternate DOL?" -msgstr "이 DOL화일을 alternate DOL로 로딩할까요?" - -msgid "Loader Settings" -msgstr "" - -msgid "Loading standard language." -msgstr "표준 언어로 로딩." - -msgid "Loading standard music." -msgstr "표중 음악으로 로딩." - -msgid "Lock Console" -msgstr "콘솔 잠금" - -msgid "Lock USB Loader GX" -msgstr "" - -msgid "Locked" -msgstr "잠김" - -msgid "Loop Directory" -msgstr "" - -msgid "Loop Music" -msgstr "" - -msgid "Loop Sound" -msgstr "" - -msgid "Main tester:" -msgstr "" - -msgid "Mar" -msgstr "4월" - -msgid "Mark new games" -msgstr "" - -msgid "May" -msgstr "5월" - -msgid "Messageboard Update" -msgstr "" - -msgid "Motion+ Video" -msgstr "" - -msgid "Mount DVD drive" -msgstr "" - -msgid "Multiple Partitions" -msgstr "" - -msgid "Music Loop Mode" -msgstr "" - -msgid "Music Volume" -msgstr "음량" - -msgid "Neither" -msgstr "표시 없음" - -msgid "Network is not initiated." -msgstr "" - -msgid "New Disc Detected" -msgstr "" - -msgid "Next" -msgstr "다음" - -msgid "No" -msgstr "아니오" - -msgid "No Cheatfile found" -msgstr "치트화일 없음" - -msgid "No DOL file found on disc." -msgstr "디스크에 DOL화일이 없음." - -msgid "No Splitting" -msgstr "" - -msgid "No URL or Path specified." -msgstr "" - -msgid "No WBFS or FAT/NTFS/EXT partition found" -msgstr "" - -msgid "No cheats were selected" -msgstr "" - -msgid "No data could be read." -msgstr "데이터를 읽을수가 없음." - -msgid "No favorites selected." -msgstr "" - -msgid "No file missing!" -msgstr "누락 파일 없음!" - -msgid "No new updates." -msgstr "새로운 업데이트 없음." - -msgid "No themes found on the site." -msgstr "" - -msgid "No themes found." -msgstr "" - -msgid "None" -msgstr "" - -msgid "Normal" -msgstr "일반" - -msgid "Not a WAD file." -msgstr "" - -msgid "Not a Wii Disc" -msgstr "Wii 디스크가 아닙니다" - -msgid "Not a valid URL" -msgstr "" - -msgid "Not a valid URL path" -msgstr "" - -msgid "Not a valid domain" -msgstr "" - -msgid "Not enough free memory." -msgstr "메모리가 부족해요." - -msgid "Not enough free space!" -msgstr "여유 공간이 부족합니다!" - -msgid "Not enough memory." -msgstr "" - -msgid "Not required" -msgstr "" - -msgid "Not supported format!" -msgstr "지원되는 포맷이 아니에요!" - -msgid "Nov" -msgstr "11월" - -msgid "OFF" -msgstr "꺼짐" - -msgid "OK" -msgstr "확인" - -msgid "ON" -msgstr "켜짐" - -msgid "Ocarina" -msgstr "" - -msgid "Oct" -msgstr "10월" - -msgid "Official Site:" -msgstr "공식 사이트:" - -msgid "Offset" -msgstr "" - -msgid "Only Game Partition" -msgstr "" - -msgid "Only for Install" -msgstr "인스톨만" - -msgid "Original Discarts" -msgstr "" - -msgid "Original/Customs" -msgstr "원본/사용자설정" - -msgid "Parental Control" -msgstr "자녀보호기능" - -msgid "Partition" -msgstr "파티션" - -msgid "Password" -msgstr "비밀번호" - -msgid "Password Changed" -msgstr "비밀번호 변경됨" - -msgid "Password has been changed" -msgstr "비밀번호가 변경되었습니다" - -msgid "Patch Country Strings" -msgstr "패치 컨트리 스트링" - -msgid "Path Changed" -msgstr "" - -msgid "Permission denied." -msgstr "" - -msgid "Pick from a list" -msgstr "리스트로 부터 고르기" - -msgid "Play Count" -msgstr "실행 횟수" - -msgid "Play Next" -msgstr "" - -msgid "Play Once" -msgstr "" - -msgid "Play Previous" -msgstr "" - -msgid "Playing Music:" -msgstr "" - -msgid "Please wait..." -msgstr "" - -msgid "Power off the Wii" -msgstr "Wii 전원 끄기" - -msgid "Prev" -msgstr "이전" - -msgid "Prompts Buttons" -msgstr "프롬프트/버튼" - -msgid "Published by" -msgstr "출판자" - -msgid "Quick Boot" -msgstr "게임 바로실행" - -msgid "Random Directory Music" -msgstr "" - -msgid "Reading WAD data... Ok!" -msgstr "WAD 데이터 읽기... 성공!" - -msgid "Receiving file from:" -msgstr "파일 추출 :" - -msgid "Region Patch" -msgstr "" - -msgid "Released" -msgstr "릴리즈됨" - -msgid "Reload SD" -msgstr "SD카드 읽기" - -msgid "Remove update" -msgstr "" - -msgid "Rename Game on WBFS" -msgstr "WBFS에서 게임 이름 변경" - -msgid "Reset" -msgstr "" - -msgid "Reset BG Music" -msgstr "" - -msgid "Reset Playcounter" -msgstr "실행횟수 리셋" - -msgid "Reset to default BGM?" -msgstr "" - -msgid "Restarting..." -msgstr "재시작..." - -msgid "Return" -msgstr "돌아가기" - -msgid "Return To" -msgstr "" - -msgid "Return to Wii Menu" -msgstr "위 메뉴로 돌아가기" - -msgid "Right" -msgstr "오른쪽" - -msgid "Rumble" -msgstr "진동" - -msgid "SChinese" -msgstr "중국어(간체)" - -msgid "SFX Volume" -msgstr "SFX 볼륨" - -msgid "Save" -msgstr "저장" - -msgid "Save Failed. No device inserted?" -msgstr "" - -msgid "Save Game List to" -msgstr "" - -msgid "Save List" -msgstr "" - -msgid "Saved" -msgstr "" - -msgid "Screensaver" -msgstr "화면보호기" - -msgid "Select" -msgstr "" - -msgid "Select DOL Offset" -msgstr "" - -msgid "Select a DOL" -msgstr "" - -msgid "Select a DOL from Game" -msgstr "" - -msgid "Sept" -msgstr "9월" - -msgid "Set Search-Filter" -msgstr "" - -msgid "Settings" -msgstr "설정" - -msgid "Show Free Space" -msgstr "" - -msgid "Shutdown System" -msgstr "시스템 종료" - -msgid "Shutdown Wii" -msgstr "" - -msgid "Sort alphabetically" -msgstr "알파벳순으로 정렬" - -msgid "Sort by number of players" -msgstr "" - -msgid "Sort by rank" -msgstr "" - -msgid "Sort order by most played" -msgstr "많이 실행한 횟수로 정렬" - -msgid "Sound" -msgstr "소리" - -msgid "Sound Settings" -msgstr "" - -msgid "Sound+BGM" -msgstr "" - -msgid "Sound+Quiet" -msgstr "" - -msgid "Spanish" -msgstr "스페인어" - -msgid "Special thanks to:" -msgstr "Special thanks to:" - -msgid "Split each 2GB" -msgstr "" - -msgid "Split each 4GB" -msgstr "" - -msgid "Standby" -msgstr "" - -msgid "Success" -msgstr "성공" - -msgid "Success:" -msgstr "성공:" - -msgid "Successfully Saved" -msgstr "저장 성공" - -msgid "Successfully Updated" -msgstr "업데이트 성공" - -msgid "Successfully Updated thanks to www.techjawa.com" -msgstr "" - -msgid "Successfully deleted:" -msgstr "삭제 성공:" - -msgid "Successfully extracted theme." -msgstr "" - -msgid "Successfully installed:" -msgstr "설치 성공:" - -msgid "Sync FAT32 FS Info" -msgstr "" - -msgid "Synchronizing..." -msgstr "" - -msgid "System Default" -msgstr "시스템 기본값" - -msgid "TChinese" -msgstr "중국어(번체)" - -msgid "TXT Cheatcodes Path" -msgstr "TXT 치트코드 경로" - -msgid "The .them file was not found in the zip." -msgstr "" - -msgid "The entered directory does not exist. Would you like to create it?" -msgstr "" - -msgid "The game installation is disabled under this IOS because of instability in usb write." -msgstr "" - -msgid "The wad file was installed" -msgstr "" - -#, c-format -msgid "The wad installation failed with error %i" -msgstr "" - -msgid "Theme Downloader" -msgstr "" - -msgid "Theme Menu" -msgstr "" - -msgid "Theme Path" -msgstr "테마 경로" - -msgid "Theme Title:" -msgstr "" - -msgid "Themes by www.spiffy360.com" -msgstr "" - -msgid "This IOS is the BootMii ios. If you are sure it is not BootMii and you have something else installed there than ignore this warning." -msgstr "" - -msgid "This IOS was not found on the titles list. If you are sure you have it installed than ignore this warning." -msgstr "" - -msgid "Time left:" -msgstr "남은 시간:" - -msgid "Title Launcher" -msgstr "타이틀 런처" - -msgid "Titles from WiiTDB" -msgstr "WiiTDB에서 타이틀을" - -msgid "Tooltips" -msgstr "Tooltips" - -msgid "Transfer failed" -msgstr "" - -msgid "USB Device not found" -msgstr "USB 장치가 없습니다." - -msgid "USB Loader GX is protected" -msgstr "USB 로더 GX 잠김 상태" - -msgid "USB Port" -msgstr "" - -msgid "USB Port changing is only supported on Hermes cIOS." -msgstr "" - -msgid "Uninstall" -msgstr "제거" - -msgid "Uninstall Game" -msgstr "게임 언인스톨" - -msgid "Uninstall Menu" -msgstr "메뉴 언인스톨" - -msgid "Uninstall all" -msgstr "" - -msgid "Uninstalling wad" -msgstr "WAD 언인스톨" - -msgid "Unknown" -msgstr "" - -msgid "Unlock USB Loader GX" -msgstr "" - -msgid "Unlocked" -msgstr "잠금해제" - -msgid "Unsupported format, try to extract manually TempTheme.zip." -msgstr "" - -msgid "Update" -msgstr "업데이트" - -msgid "Update All" -msgstr "모두 업데이트" - -msgid "Update DOL" -msgstr "DOL 업데이트" - -msgid "Update Files" -msgstr "화일 업데이트" - -msgid "Update Path" -msgstr "업데이트 경로" - -msgid "Update all Language Files" -msgstr "모든 언어화일 업데이트" - -msgid "Update failed" -msgstr "업데이트 실패" - -msgid "Update successfull" -msgstr "" - -msgid "Updating Language Files:" -msgstr "언어화일 업데이트중:" - -msgid "Uploaded ZIP file installed to homebrew directory." -msgstr "" - -msgid "VIDTV Patch" -msgstr "VIDTV 패치" - -msgid "Version:" -msgstr "" - -#, c-format -msgid "Version: %s" -msgstr "버전: %s" - -msgid "Video Mode" -msgstr "비디오 모드" - -msgid "WDM Files Path" -msgstr "" - -msgid "WIP Patches Path" -msgstr "" - -msgid "Waiting..." -msgstr "기다리는 중..." - -msgid "Warning:" -msgstr "" - -msgid "What do you want to update?" -msgstr "무엇을 업데이트 할까요?" - -msgid "What should be deleted for this game title:" -msgstr "" - -msgid "WiFi Features" -msgstr "WiFi 형태" - -msgid "Widescreen Fix" -msgstr "와이드 스크린에 맞춤" - -msgid "Wii Menu" -msgstr "Wii 메뉴로" - -msgid "Wii Settings" -msgstr "위 설정" - -msgid "WiiTDB Files" -msgstr "WiiTDB 화일" - -msgid "WiiTDB Path" -msgstr "WiiTDB경로" - -msgid "WiiTDB is up to date." -msgstr "" - -msgid "Wiilight" -msgstr "Wiilight" - -msgid "Wrong Password" -msgstr "잘못된 비밀번호" - -msgid "Yes" -msgstr "예" - -msgid "You are currently using IOS" -msgstr "" - -msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." -msgstr "" - -msgid "You need to select or format a partition" -msgstr "" - -msgid "and translators for language files updates" -msgstr "" - -msgid "available" -msgstr "가능함" - -msgid "does not exist!" -msgstr "없어요!" - -msgid "does not exist! Loading game without cheats." -msgstr "없어요! 치트없이 게임임을 로딩" - -msgid "files left" -msgstr "화일들이 남음" - -msgid "for FAT/NTFS support" -msgstr "" - -msgid "for Ocarina" -msgstr "Ocarina 위하여" - -msgid "for WiiTDB and hosting covers / disc images" -msgstr "WiiTDB, 커버, 디스크이미지를 위하여" - -msgid "for diverse patches" -msgstr "디버스 패치를 위하여" - -msgid "for his awesome tool LibWiiGui" -msgstr "LibWiiGui 훌륭한 툴를 위하여" - -msgid "for hosting the themes" -msgstr "" - -msgid "for hosting the update files" -msgstr "업데이트 화일 호스팅을 위하여" - -msgid "for the USB Loader source" -msgstr "USB 로더 소스를 위하여" - -msgid "formatted!" -msgstr "포맷 완료!" - -msgid "free" -msgstr "남음" - -msgid "not set" -msgstr "설정되지 않음" - -msgid "of" -msgstr "중" - -msgid "seconds left" -msgstr "초 남았습니다" - -#~ msgid "Download Boxart image?" -#~ msgstr "박스 이미지를 다운로드 할까요?" - -#~ msgid "Download Discart image?" -#~ msgstr "디스크이미지를 다운로드 할까요?" - -#~ msgid "Downloading file" -#~ msgstr "파일 다운로드 중:" - -#~ msgid "Missing files" -#~ msgstr "파일 누락" - -#~ msgid "files not found on the server!" -#~ msgstr "파일이 서버에 없습니다!" - -#~ msgid "Disc Images" -#~ msgstr "디스크 이미지" - -#~ msgid "Only Customs" -#~ msgstr "사용자 설정만" - -#~ msgid "Only Original" -#~ msgstr "원본만" - -#~ msgid "Do you really want to delete:" -#~ msgstr "정말로 삭제하겠습니까:" - -#~ msgid "Do you want to use the alternate DOL that is known to be correct?" -#~ msgstr "정말로 Alt. DOL을 사용할까요?" - -#~ msgid "Unlock console to use this option." -#~ msgstr "이 옵션을 사용하기 위해 콘솔을 잠금해제" - -#~ msgid "Full Shutdown" -#~ msgstr "완전히 끄기" - -#~ msgid "If you don't have WiFi, press 1 to get an URL to get your WiiTDB.zip" -#~ msgstr "WiFi가 없다면 WiiTDB.zip을 없기위한 URL을 위하여 1을 누르세요" - -#~ msgid "Paste it into your browser to get your WiiTDB.zip." -#~ msgstr "WiiTDB.zip파일을 얻으려면 이것을 브라우져로 붙이세요." - -#~ msgid "Shutdown to Idle" -#~ msgstr "대기 상태로" - -#~ msgid "Your URL has been saved in %sWiiTDB_URL.txt." -#~ msgstr "당신의 URL은 %sWiiTDB_URL.txt 에 저장되었어요." - -#~ msgid "Insert an SD-Card to save." -#~ msgstr "저장할 SD카드를 넣으세요." - -#~ msgid "Insert an SD-Card to use this option." -#~ msgstr "이 옵션을 사용할 SD카드를 넣으세요." - -#~ msgid "No SD-Card inserted!" -#~ msgstr "SD카드가 없습니다!" - -#~ msgid "Waiting for USB Device" -#~ msgstr "USB 장치를 기다리는 중" - -#~ msgid "Back to Loader" -#~ msgstr "로더로 돌아감" - -#~ msgid "An Error occured" -#~ msgstr "에러 발생" - -#~ msgid "AutoPatch" -#~ msgstr "자동 패치" - -#~ msgid "Checking for Updates" -#~ msgstr "업데이트 확인" - -#~ msgid "Downloading" -#~ msgstr "다운로딩중" - -#~ msgid "The wad file was installed. But It could not be deleted from the SD card." -#~ msgstr "WAD화일이 인스톨됨. 하지만 SD 카드에서 삭제할수 없음." - -#~ msgid "The wad installation failed with error %ld" -#~ msgstr "WAD 인스톨 실패 에러 %ld" - -#~ msgid "Unable to open the wad that was just downloaded (%s)." -#~ msgstr "방금 다운로드한 wad화일(%s)을 열수가 없음." - -#~ msgid "Update to" -#~ msgstr "감사" - -#~ msgid "Updating" -#~ msgstr "업데이트중" - -#~ msgid "Updating Language Files..." -#~ msgstr "언어화일 업데이트중..." - -#~ msgid "Updating WiiTDB.zip" -#~ msgstr "WiiTDB.zip 업데이트중" - -#~ msgid "Back to Wii Menu" -#~ msgstr "Wii 메뉴로 놀아가기" - -#~ msgid "Confirm" -#~ msgstr "확인" - -#~ msgid "Could not find a WBFS partition." -#~ msgstr "WBFS 파티션이 없어요." - -#~ msgid "Could not open WBFS partition" -#~ msgstr "WBFS 파티션을 열수가 없어요" - -#~ msgid "Could not read the disc." -#~ msgstr "디스크를 읽을수가 없어요." - -#~ msgid "Could not set USB." -#~ msgstr "USB 를 설정할수 없음." - -#~ msgid "Cover Path Changed" -#~ msgstr "표지 경로 변경됨" - -#~ msgid "DOL path changed" -#~ msgstr "DOL 경로 변경됨" - -#~ msgid "Disc Path Changed" -#~ msgstr "디스크 경로 변경됨" - -#~ msgid "Display favorites" -#~ msgstr "즐겨찾기 표시" - -#~ msgid "Do you want to retry for 30 secs?" -#~ msgstr "30초간 재시도 할까요?" - -#~ msgid "Force" -#~ msgstr "강제" - -#~ msgid "GCT Cheatcodes Path changed" -#~ msgstr "처트코드 경로 변경됨" - -#~ msgid "Homebrew Appspath changed" -#~ msgstr "홈브류 경로 변경됨" - -#~ msgid "Insert an SD-Card to download images." -#~ msgstr "다운받은 이미지를 저장할 SD카드를 넣으세요." - -#~ msgid "Most likely it has dimensions that are not evenly divisible by 4." -#~ msgstr "대부분 이미지는 4로 나누어져야 되요." - -#~ msgid "Network init error" -#~ msgstr "네트워크 초기화 에러" - -#~ msgid "No .dol or .elf files found." -#~ msgstr ".dol 혹은 .elf 파일이 없음." - -#~ msgid "No Favorites" -#~ msgstr "즐겨찾기 없음" - -#~ msgid "No USB Device" -#~ msgstr "USB 장치가 없습니다." - -#~ msgid "No USB Device found." -#~ msgstr "USB 장치가 없습니다." - -#~ msgid "Normal Covers" -#~ msgstr "일반 표지" - -#~ msgid "Not Found" -#~ msgstr "없음" - -#~ msgid "Not a DOL/ELF file." -#~ msgstr "DOL/ELF 파일이 아님." - -#~ msgid "Save Failed" -#~ msgstr "저장 실패" - -#~ msgid "Standard" -#~ msgstr "표중" - -#~ msgid "TXT Cheatcodes Path changed" -#~ msgstr "TXT 치트코드 경로 변경됨" - -#~ msgid "Theme Path Changed" -#~ msgstr "테마 경로 변경됨" - -#~ msgid "Update Path changed." -#~ msgstr "업데이트 경로 변경됨" - -#~ msgid "WiiTDB Path changed." -#~ msgstr "WiiTDB경로 변경됨." - -#~ msgid "You are about to delete " -#~ msgstr "삭제 하려고 합니다." - -#~ msgid "You are choosing to display favorites and you do not have any selected." -#~ msgstr "즐겨찾기를 선택했으나 선택된 즐겨찾기가 없네요." - -#~ msgid "You have attempted to load a bad image" -#~ msgstr "잘못된 이미지를 로딩하여 하군요." - -#~ msgid "does not exist! You Messed something up, Idiot." -#~ msgstr "없어요! 무언가 잘못했군요." - -#~ msgid "file left" -#~ msgstr "화일 남음" diff --git a/Languages/norwegian.lang b/Languages/norwegian.lang deleted file mode 100644 index 3948b36d..00000000 --- a/Languages/norwegian.lang +++ /dev/null @@ -1,1788 +0,0 @@ -# USB Loader GX language source file. -# norwegian.lang - r1036 -# don't delete/change this line (é). -msgid "" -msgstr "" -"Project-Id-Version: USB Loader GX\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-06 19:36+0100\n" -"PO-Revision-Date: 2009-10-01 01:00+0200\n" -"Last-Translator: raschi\n" -"Language-Team: raschi\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -msgid " Wad Saved as:" -msgstr " WAD lagret som:" - -msgid " could not be downloaded." -msgstr " kan ikke lastes ned." - -msgid " has been Saved. The text has not been verified. Some of the code may not work right with each other. If you experience trouble, open the text in a real text editor for more information." -msgstr " har blitt lagret. Teksten har ikke blitt verifisert. Noe av koden vil kanskje ikke fungere riktig. Hvis du får problemer, åpne teksten i et ekte redigeringsprogram for mer informasjon." - -msgid " is not on the server." -msgstr " finnes ikke på serveren." - -#, c-format -msgid "%i files not found on the server!" -msgstr "" - -#, c-format -msgid "%i missing files" -msgstr "" - -msgid "0 (Everyone)" -msgstr "0 (Alle)" - -msgid "1 (Child 7+)" -msgstr "1 (Barn 7+)" - -msgid "1 hour" -msgstr "1 time" - -msgid "10 min" -msgstr "" - -msgid "2 (Teen 12+)" -msgstr "2 (Ungdom 12+)" - -msgid "20 min" -msgstr "" - -msgid "2D Cover Path" -msgstr "2D Cover sti" - -msgid "3 (Mature 16+)" -msgstr "3 (Ungdom 16+)" - -msgid "3 min" -msgstr "" - -msgid "30 min" -msgstr "" - -msgid "3D Cover Path" -msgstr "3D Cover sti" - -msgid "3D Covers" -msgstr "3D cover" - -msgid "4 (Adults Only 18+)" -msgstr "4 (Voksen 18+)" - -msgid "5 min" -msgstr "" - -msgid ">> Deleting tickets..." -msgstr ">> Sletter tickets..." - -msgid ">> Deleting tickets...ERROR! " -msgstr ">> Sletter tickets...FEIL! " - -msgid ">> Deleting tickets...Ok! " -msgstr ">> Sletter tickets...OK! " - -msgid ">> Deleting title ...ERROR! " -msgstr ">> Sletter tittel ...FEIL! " - -msgid ">> Deleting title ...Ok!" -msgstr ">> Sletter tittel ...OK!" - -msgid ">> Deleting title contents..." -msgstr ">> Sletter tittel innhold..." - -msgid ">> Deleting title contents...ERROR! " -msgstr ">> Sletter tittel innhold...FEIL! " - -msgid ">> Deleting title contents...Ok!" -msgstr ">> Sletter tittel innhold...OK!" - -msgid ">> Deleting title..." -msgstr ">> Sletter tittel..." - -msgid ">> Finishing installation..." -msgstr ">> Sluttfører installasjon..." - -msgid ">> Installing content #" -msgstr ">> Installerer innhold #" - -msgid ">> Installing ticket..." -msgstr ">> Installerer ticket..." - -msgid ">> Installing title..." -msgstr ">> Installerer tittel..." - -msgid ">> Reading WAD data..." -msgstr ">> Leser WAD data..." - -msgid ">> Reading WAD data...ERROR! " -msgstr ">> Leser WAD data...FEIL! " - -msgid ">> Reading WAD data...Ok!" -msgstr ">> Leser WAD data...OK!" - -msgid "AUTO" -msgstr "" - -msgid "All Partitions" -msgstr "Alle partisjoner" - -msgid "All images downloaded successfully." -msgstr "Alle bilder lastet ned ok." - -msgid "All the features of USB Loader GX are unlocked." -msgstr "Alle funksjonene til USB Loader GX er opplåst." - -msgid "Alternate DOL" -msgstr "Alternativ DOL" - -msgid "Anti" -msgstr "" - -msgid "App Language" -msgstr "Program språk" - -msgid "Apply" -msgstr "" - -msgid "Apr" -msgstr "" - -msgid "Are you sure you want to lock USB Loader GX?" -msgstr "Er du sikker på at du vil låse USB Loader GX?" - -msgid "Are you sure you want to reset?" -msgstr "Er du sikker på at du vil restarte?" - -msgid "Are you sure?" -msgstr "Er du sikker?" - -msgid "Aug" -msgstr "" - -msgid "Author(s):" -msgstr "" - -msgid "AutoInit Network" -msgstr "Autostart nettverk" - -msgid "Automatic port switching is done on the fly. You need to change all custom paths to SD-Card first for this option or else it could damage a filesystem." -msgstr "" - -msgid "BCA Codes Path" -msgstr "BCA kode sti" - -msgid "Back" -msgstr "Tilbake" - -msgid "Back to HBC or Wii Menu" -msgstr "Tilbake til HBC eller Wii meny" - -msgid "Backgroundmusic" -msgstr "Bakgrunnsmusikk" - -msgid "Big thanks to:" -msgstr "Stor takk til:" - -msgid "Block Cover Downloads" -msgstr "" - -msgid "Block Custom Paths" -msgstr "" - -msgid "Block Game Install" -msgstr "" - -msgid "Block Game Settings" -msgstr "" - -msgid "Block GameID Change" -msgstr "" - -msgid "Block Global Settings" -msgstr "" - -msgid "Block Gui Settings" -msgstr "" - -msgid "Block HBC Menu" -msgstr "" - -msgid "Block IOS Reload" -msgstr "Blokkér IOS Reload" - -msgid "Block Loader Settings" -msgstr "" - -msgid "Block Parental Settings" -msgstr "" - -msgid "Block Reset Settings" -msgstr "" - -msgid "Block Sound Settings" -msgstr "" - -msgid "Block Theme Downloader" -msgstr "" - -msgid "Block Theme Menu" -msgstr "" - -msgid "Block Title Launcher" -msgstr "" - -msgid "Block Updates" -msgstr "" - -msgid "Boot/Standard" -msgstr "Boot/Standard" - -msgid "Boot?" -msgstr "Start?" - -msgid "Both" -msgstr "Begge" - -msgid "Both Ports" -msgstr "" - -msgid "Can't be formatted" -msgstr "Kan ikke formateres" - -msgid "Can't create directory" -msgstr "Kan ikke opprette mappe" - -#, c-format -msgid "Can't create path: %s" -msgstr "Kan ikke opprette sti: %s" - -msgid "Can't delete:" -msgstr "Kan ikke slette:" - -msgid "Cancel" -msgstr "Avbryt" - -msgid "Cannot write to destination." -msgstr "Kan ikke skrive til mål." - -msgid "Change Play Path" -msgstr "Endre spill sti" - -msgid "Cheatfile is blank" -msgstr "Juksefil er blank" - -msgid "Clear" -msgstr "Fjern" - -msgid "Click to Download Covers" -msgstr "Klikk for å laste ned cover" - -msgid "Click to change game ID" -msgstr "Klikk for å endre spill ID" - -msgid "Clock" -msgstr "Klokke" - -msgid "Close" -msgstr "Lukk" - -msgid "Code Download" -msgstr "Kode nedlasting" - -#, c-format -msgid "Coded by: %s" -msgstr "Kodet av: %s" - -msgid "Coding:" -msgstr "Koding:" - -msgid "Connection to server timed out." -msgstr "" - -msgid "Console" -msgstr "Konsoll" - -msgid "Console Default" -msgstr "Konsoll Standard" - -msgid "Console Locked" -msgstr "Konsoll låst" - -msgid "Console must be unlocked for this option." -msgstr "" - -msgid "Console should be unlocked to modify it." -msgstr "Konsoll må være opplåst for å modifisere." - -msgid "Continue to install game?" -msgstr "Fortsett å installere spill?" - -msgid "Controllevel" -msgstr "Kontrollnivå" - -msgid "Correct Password" -msgstr "Riktig passord" - -msgid "Could not connect to the server." -msgstr "Kan ikke koble til server." - -msgid "Could not create GCT file" -msgstr "Kan ikke opprette GCT fil" - -#, c-format -msgid "Could not create path: %s" -msgstr "Kan ikke opprette sti: %s" - -msgid "Could not find info for this game in the wiitdb.xml." -msgstr "Kan ikke finne info for dette spillet i wiitdb.xml." - -msgid "Could not initialize DIP module!" -msgstr "Kan ikke initialisere DIP modul!" - -msgid "Could not initialize network!" -msgstr "Kan ikke initialisere nettverk!" - -msgid "Could not open Disc" -msgstr "Kan ikke åpne plate" - -msgid "Could not open wiitdb.xml." -msgstr "Kan ikke åpne wiitdb.xml." - -msgid "Could not save." -msgstr "Kan ikke lagre." - -msgid "Cover Download" -msgstr "Cover nedlasting" - -msgid "Create" -msgstr "Opprett" - -msgid "Credits" -msgstr "Medvirkende" - -msgid "Custom Discarts" -msgstr "" - -msgid "Custom Paths" -msgstr "Endre stier" - -msgid "Customs/Original" -msgstr "Custom/Original" - -msgid "DOL Path" -msgstr "DOL sti" - -msgid "Dec" -msgstr "Des" - -msgid "Default" -msgstr "Standard" - -msgid "Default Gamesettings" -msgstr "Standard innstillinger" - -msgid "Default Settings" -msgstr "Standard innstillinger" - -msgid "Delete" -msgstr "Slett" - -msgid "Delete ?" -msgstr "Slett ?" - -msgid "Delete Cheat GCT" -msgstr "Slett juksefil GCT" - -msgid "Delete Cheat TXT" -msgstr "Slett juksefil TXT" - -msgid "Delete Cover Artwork" -msgstr "Slett cover" - -msgid "Delete Disc Artwork" -msgstr "Slett platebilde" - -msgid "Design:" -msgstr "" - -msgid "Developed by" -msgstr "Utviklet av" - -msgid "Directory does not exist!" -msgstr "Mappe finnes ikke!" - -msgid "Disc Artwork Download" -msgstr "Platebilde nedlasting" - -msgid "Disc Artwork Path" -msgstr "Platebilde sti" - -msgid "Disc Default" -msgstr "Spill Standard" - -msgid "DiskFlip" -msgstr "Snu plate" - -msgid "Display" -msgstr "Vis" - -msgid "Display as a carousel" -msgstr "Vis som karusell" - -msgid "Display as a grid" -msgstr "Vis som rutemønster" - -msgid "Display as a list" -msgstr "Vis som liste" - -msgid "Display favorites only" -msgstr "Vis kun favoritter" - -msgid "Do you want to apply it now?" -msgstr "Vil du legge til nå?" - -msgid "Do you want to apply this theme?" -msgstr "" - -msgid "Do you want to change language?" -msgstr "Vil du endre språk?" - -msgid "Do you want to download this theme?" -msgstr "Vil du laste ned dette temaet?" - -msgid "Do you want to format:" -msgstr "Vil du formatere:" - -msgid "Do you want to load the default theme?" -msgstr "Vil du laste standard tema?" - -msgid "Do you want to sync free space info sector on all FAT32 partitions?" -msgstr "" - -msgid "Do you wish to update/download all language files?" -msgstr "Vil du oppdatere/laste ned alle språkfiler?" - -msgid "Done!" -msgstr "Ferdig!" - -msgid "Download" -msgstr "Last ned" - -msgid "Download Now" -msgstr "Last ned nå" - -msgid "Download finished" -msgstr "Nedlasting ferdig" - -msgid "Downloading 3D Covers" -msgstr "" - -msgid "Downloading Flat Covers" -msgstr "" - -msgid "Downloading Full HQ Covers" -msgstr "" - -msgid "Downloading Full LQ Covers" -msgstr "" - -msgid "Downloading custom Discarts" -msgstr "Laster ned custom platebilde" - -msgid "Downloading file..." -msgstr "Laster ned fil..." - -msgid "Downloading image:" -msgstr "Laster ned bilde:" - -msgid "Downloading original Discarts" -msgstr "Laster ned originale platebilde" - -msgid "Downloading pagelist:" -msgstr "Laster ned sideliste:" - -msgid "Dutch" -msgstr "Nederlandsk" - -msgid "ERROR" -msgstr "FEIL" - -msgid "ERROR:" -msgstr "FEIL:" - -msgid "ERROR: Can't set up theme." -msgstr "FEIL: Kan ikke laste tema." - -msgid "English" -msgstr "Engelsk" - -msgid "Error" -msgstr "Feil" - -msgid "Error !" -msgstr "Feil !" - -msgid "Error 002 fix" -msgstr "Error 002 fiks" - -#, c-format -msgid "Error creating path: %s" -msgstr "Feil ved oppretting av sti: %s" - -msgid "Error opening downloaded file" -msgstr "Feil ved åpning av nedlastet fil" - -msgid "Error reading Disc" -msgstr "Feil ved lesing av plate" - -#, c-format -msgid "Error when downloading file: %i" -msgstr "Feil ved nedlasting av fil: %i" - -msgid "Error while downloding file" -msgstr "Feil ved nedlasting av fil" - -msgid "Error while opening the zip." -msgstr "Feil ved åpning av zip." - -msgid "Error while transfering data." -msgstr "Feil ved overføring av data." - -msgid "Error while updating USB Loader GX." -msgstr "Feil ved oppdatering av USB Loader GX." - -msgid "Error writing the data." -msgstr "Feil ved skriving av data." - -msgid "Error..." -msgstr "Feil..." - -msgid "Error:" -msgstr "Feil:" - -msgid "Exit" -msgstr "Avslutt" - -msgid "Exit to where?" -msgstr "Avslutt til?" - -msgid "Extracting files..." -msgstr "Pakker ut filer..." - -msgid "Failed formating" -msgstr "Feil ved formatering" - -msgid "Failed to extract." -msgstr "Utpakking feilet." - -msgid "Failed to open partition" -msgstr "Feil ved åpning av partisjon" - -msgid "Failed updating" -msgstr "Feil ved oppdatering" - -msgid "Feb" -msgstr "" - -msgid "File not found." -msgstr "Fil ikke funnet." - -#, c-format -msgid "Filesize is %i Byte." -msgstr "Filstørrelse er %i Byte." - -msgid "Filesize is 0 Byte." -msgstr "Filstørrelse er 0 Byte." - -msgid "Finishing installation... Ok!" -msgstr "Sluttfører installasjon... OK!" - -msgid "Flat Covers" -msgstr "2D cover" - -msgid "Flip-X" -msgstr "" - -msgid "Force NTSC" -msgstr "Tving NTSC" - -msgid "Force PAL50" -msgstr "Tving PAL50" - -msgid "Force PAL60" -msgstr "Tving PAL60" - -msgid "Format" -msgstr "Formatér" - -msgid "Formatting, please wait..." -msgstr "Formaterer, vennligst vent..." - -msgid "Found missing images." -msgstr "" - -msgid "Free Space" -msgstr "Ledig plass" - -msgid "French" -msgstr "Fransk" - -msgid "Full Cover Path" -msgstr "" - -msgid "Full HQ Covers" -msgstr "" - -msgid "Full LQ Covers" -msgstr "" - -msgid "Full Menu" -msgstr "" - -msgid "Full shutdown" -msgstr "Skru helt av" - -msgid "GAMEID_Gamename" -msgstr "SPILLID_Spillnavn" - -msgid "GCT Cheatcodes Path" -msgstr "GCT Juksekode sti" - -msgid "GCT File created" -msgstr "GCT fil opprettet" - -msgid "GUI Settings" -msgstr "GUI innstillinger" - -msgid "Game ID" -msgstr "Spill ID" - -msgid "Game IOS" -msgstr "Spill IOS" - -msgid "Game Language" -msgstr "Språk" - -msgid "Game Load" -msgstr "Lasting av spill" - -msgid "Game Lock" -msgstr "Lås spill" - -msgid "Game Only" -msgstr "" - -msgid "Game Region" -msgstr "Region" - -msgid "Game Size" -msgstr "Spill størrelse" - -msgid "Game Sound Mode" -msgstr "Spillyd modus" - -msgid "Game Sound Volume" -msgstr "Spillyd volum" - -msgid "Game Split Size" -msgstr "Spill splittestørrelse" - -msgid "Game is already installed:" -msgstr "Spillet er allerede installert:" - -msgid "Game/Install Partition" -msgstr "" - -msgid "Gamename [GAMEID]" -msgstr "Spillnavn [SPILLID]" - -msgid "Games" -msgstr "Spill" - -msgid "Genre:" -msgstr "Sjanger:" - -msgid "German" -msgstr "Tysk" - -msgid "Global Settings" -msgstr "Globale innstillinger" - -msgid "HOME Menu" -msgstr "HOME Meny" - -msgid "Homebrew Apps Path" -msgstr "Homebrew Apps sti" - -msgid "Homebrew Channel" -msgstr "HBC" - -msgid "Homebrew Launcher" -msgstr "Homebrew Laster" - -msgid "Hour" -msgstr "Timer" - -msgid "How do you want to update?" -msgstr "Hvordan vil du oppdatere?" - -msgid "How to Shutdown?" -msgstr "Hvordan skru av?" - -#, c-format -msgid "Incoming file %0.2fKB" -msgstr "Laster ned fil %0.2fKB" - -#, c-format -msgid "Incoming file %0.2fMB" -msgstr "Laster ned fil %0.2fMB" - -msgid "Initializing Network" -msgstr "Initialiserer nettverk" - -msgid "Insert Disk" -msgstr "Sett inn plate" - -msgid "Insert a Wii Disc!" -msgstr "Sett inn en Wii plate!" - -msgid "Install" -msgstr "Installér" - -msgid "Install Error!" -msgstr "Installasjonsfeil!" - -msgid "Install a game" -msgstr "Installér et spill" - -msgid "Install directories" -msgstr "Installasjonsmapper" - -msgid "Install partitions" -msgstr "Installasjonspartisjoner" - -msgid "Installing content... Ok!" -msgstr "Installerer innhold... OK!" - -msgid "Installing game:" -msgstr "Installerer spill:" - -msgid "Installing ticket... Ok!" -msgstr "Installerer ticket... OK!" - -msgid "Installing title... Ok!" -msgstr "Installerer tittel... OK!" - -msgid "Installing wad" -msgstr "Installerer WAD" - -msgid "Issue manager /" -msgstr "Problem manager /" - -msgid "It seems that you have some information that will be helpful to us. Please pass this information along to the DEV team." -msgstr "Det ser ut til at du har informasjon som kan være nyttig for oss. Vennligst videresend denne informasjonen til utviklerteamet." - -msgid "Italian" -msgstr "Italiensk" - -msgid "Jan" -msgstr "" - -msgid "Japanese" -msgstr "Japansk" - -msgid "July" -msgstr "Jul" - -msgid "June" -msgstr "Jun" - -msgid "Keep" -msgstr "Behold" - -msgid "Keyboard" -msgstr "Tastatur" - -msgid "Korean" -msgstr "Koreansk" - -msgid "Language File" -msgstr "Språk Fil" - -msgid "Language change:" -msgstr "Endre språk:" - -msgid "Languagefiles Path" -msgstr "Språkfil sti" - -msgid "Languagepath changed." -msgstr "Språksti endret." - -msgid "Left" -msgstr "Venstre" - -msgid "Like SysMenu" -msgstr "Lik Systemmeny" - -msgid "List on Gamelaunch" -msgstr "" - -msgid "Load" -msgstr "Start" - -msgid "Load From SD/USB" -msgstr "Start fra SD/USB" - -#, c-format -msgid "Load file from: %s ?" -msgstr "Start fil fra: %s ?" - -msgid "Load this DOL as alternate DOL?" -msgstr "Last denne DOL som alternativ DOL?" - -msgid "Loader Settings" -msgstr "Loader innstillinger" - -msgid "Loading standard language." -msgstr "Laster standard språk." - -msgid "Loading standard music." -msgstr "Laster standard musikk." - -msgid "Lock Console" -msgstr "Lås konsoll" - -msgid "Lock USB Loader GX" -msgstr "Lås USB Loader GX" - -msgid "Locked" -msgstr "Låst" - -msgid "Loop Directory" -msgstr "Loop mappe" - -msgid "Loop Music" -msgstr "Loop musikk" - -msgid "Loop Sound" -msgstr "Loop lyd" - -msgid "Main tester:" -msgstr "Hovedtester:" - -msgid "Mar" -msgstr "" - -msgid "Mark new games" -msgstr "Merk nye spill" - -msgid "May" -msgstr "Mai" - -msgid "Messageboard Update" -msgstr "Messageboard oppdatering" - -msgid "Motion+ Video" -msgstr "" - -msgid "Mount DVD drive" -msgstr "Last DVD stasjon" - -msgid "Multiple Partitions" -msgstr "" - -msgid "Music Loop Mode" -msgstr "Musikk loop modus" - -msgid "Music Volume" -msgstr "Musikk volum" - -msgid "Neither" -msgstr "Ingen" - -msgid "Network is not initiated." -msgstr "Nettverk er ikke initialisert." - -msgid "New Disc Detected" -msgstr "Ny plate oppdaget" - -msgid "Next" -msgstr "Neste" - -msgid "No" -msgstr "Nei" - -msgid "No Cheatfile found" -msgstr "Ingen juksefil funnet" - -msgid "No DOL file found on disc." -msgstr "Ingen DOL fil funnet på plate." - -msgid "No Splitting" -msgstr "Ingen splitt" - -msgid "No URL or Path specified." -msgstr "Ingen URL eller sti spesifisert." - -msgid "No WBFS or FAT/NTFS/EXT partition found" -msgstr "Ingen WBFS eller FAT/NTFS/EXT partisjon funnet" - -msgid "No cheats were selected" -msgstr "Ingen juksefiler valgt" - -msgid "No data could be read." -msgstr "Ingen data kan leses." - -msgid "No favorites selected." -msgstr "Ingen favoritter valgt." - -msgid "No file missing!" -msgstr "Ingen filer mangler!" - -msgid "No new updates." -msgstr "Ingen nye oppdateringer." - -msgid "No themes found on the site." -msgstr "Ingen temaer funnet på websiden." - -msgid "No themes found." -msgstr "" - -msgid "None" -msgstr "Ingen" - -msgid "Normal" -msgstr "" - -msgid "Not a WAD file." -msgstr "Ikke en WAD fil." - -msgid "Not a Wii Disc" -msgstr "Ikke en Wii plate" - -msgid "Not a valid URL" -msgstr "Ikke en gyldig URL" - -msgid "Not a valid URL path" -msgstr "Ikke en gyldig URL sti" - -msgid "Not a valid domain" -msgstr "Ikke et gyldig domene" - -msgid "Not enough free memory." -msgstr "Ikke nok ledig minne." - -msgid "Not enough free space!" -msgstr "Ikke nok ledig plass!" - -msgid "Not enough memory." -msgstr "Ikke nok minne." - -msgid "Not required" -msgstr "Ikke nødvendig" - -msgid "Not supported format!" -msgstr "Ikke et støttet format!" - -msgid "Nov" -msgstr "" - -msgid "OFF" -msgstr "AV" - -msgid "OK" -msgstr "" - -msgid "ON" -msgstr "PÅ" - -msgid "Ocarina" -msgstr "" - -msgid "Oct" -msgstr "Okt" - -msgid "Official Site:" -msgstr "Offisiell nettside:" - -msgid "Offset" -msgstr "" - -msgid "Only Game Partition" -msgstr "Kun spill partisjon" - -msgid "Only for Install" -msgstr "Kun for installering" - -msgid "Original Discarts" -msgstr "" - -msgid "Original/Customs" -msgstr "Original/Custom" - -msgid "Parental Control" -msgstr "Foreldrekontroll" - -msgid "Partition" -msgstr "Partisjon" - -msgid "Password" -msgstr "Passord" - -msgid "Password Changed" -msgstr "Passord endret" - -msgid "Password has been changed" -msgstr "Passord har blitt endret" - -msgid "Patch Country Strings" -msgstr "Patch land strenger" - -msgid "Path Changed" -msgstr "Sti endret" - -msgid "Permission denied." -msgstr "" - -msgid "Pick from a list" -msgstr "Velg fra liste" - -msgid "Play Count" -msgstr "Ganger spilt" - -msgid "Play Next" -msgstr "Spill neste" - -msgid "Play Once" -msgstr "Spill en gang" - -msgid "Play Previous" -msgstr "Spill forrige" - -msgid "Playing Music:" -msgstr "Spiller musikk:" - -msgid "Please wait..." -msgstr "Vennligst vent..." - -msgid "Power off the Wii" -msgstr "Skru av Wii" - -msgid "Prev" -msgstr "Forrige" - -msgid "Prompts Buttons" -msgstr "Dialog knapper" - -msgid "Published by" -msgstr "Publisert av" - -msgid "Quick Boot" -msgstr "Hurtig start" - -msgid "Random Directory Music" -msgstr "Tilfeldig musikk fra mappe" - -msgid "Reading WAD data... Ok!" -msgstr "Leser WAD data... OK!" - -msgid "Receiving file from:" -msgstr "Mottar fil fra:" - -msgid "Region Patch" -msgstr "" - -msgid "Released" -msgstr "Utgitt" - -msgid "Reload SD" -msgstr "Les SD på nytt" - -msgid "Remove update" -msgstr "Fjern oppdatering" - -msgid "Rename Game on WBFS" -msgstr "Gi nytt navn til spill på WBFS" - -msgid "Reset" -msgstr "" - -msgid "Reset BG Music" -msgstr "Tilbakestill BG musikk" - -msgid "Reset Playcounter" -msgstr "Nullstill teller" - -msgid "Reset to default BGM?" -msgstr "Tilbakestill til standard BGM?" - -msgid "Restarting..." -msgstr "Starter på nytt..." - -msgid "Return" -msgstr "Gå tilbake" - -msgid "Return To" -msgstr "Gå tilbake til" - -msgid "Return to Wii Menu" -msgstr "Tilbake til Wii meny" - -msgid "Right" -msgstr "Høyre" - -msgid "Rumble" -msgstr "Vibrasjon" - -msgid "SChinese" -msgstr "S.Kinesisk" - -msgid "SFX Volume" -msgstr "Effekt volum" - -msgid "Save" -msgstr "Lagre" - -msgid "Save Failed. No device inserted?" -msgstr "Feil ved lagring. Ingen enhet koblet til?" - -msgid "Save Game List to" -msgstr "Lagre spilliste som" - -msgid "Save List" -msgstr "" - -msgid "Saved" -msgstr "Lagret" - -msgid "Screensaver" -msgstr "Skjermbeskytter" - -msgid "Select" -msgstr "Velg" - -msgid "Select DOL Offset" -msgstr "Velg DOL offset" - -msgid "Select a DOL" -msgstr "Velg en DOL fil" - -msgid "Select a DOL from Game" -msgstr "Velg en DOL fra spill" - -msgid "Sept" -msgstr "Sep" - -msgid "Set Search-Filter" -msgstr "Angi søkefilter" - -msgid "Settings" -msgstr "Innstillinger" - -msgid "Show Free Space" -msgstr "Vis ledig plass" - -msgid "Shutdown System" -msgstr "Skru helt av" - -msgid "Shutdown Wii" -msgstr "Skru av Wii" - -msgid "Sort alphabetically" -msgstr "Sortér alfabetisk" - -msgid "Sort by number of players" -msgstr "" - -msgid "Sort by rank" -msgstr "Sortér etter rangering" - -msgid "Sort order by most played" -msgstr "Sortér etter ganger spilt" - -msgid "Sound" -msgstr "Lyd" - -msgid "Sound Settings" -msgstr "Lyd innstillinger" - -msgid "Sound+BGM" -msgstr "Lyd+BGM" - -msgid "Sound+Quiet" -msgstr "Lyd+Stille" - -msgid "Spanish" -msgstr "Spansk" - -msgid "Special thanks to:" -msgstr "Spesielt takk til:" - -msgid "Split each 2GB" -msgstr "Splitt ved 2GB" - -msgid "Split each 4GB" -msgstr "Splitt ved 4GB" - -msgid "Standby" -msgstr "" - -msgid "Success" -msgstr "Suksess" - -msgid "Success:" -msgstr "Suksess:" - -msgid "Successfully Saved" -msgstr "Vellykket lagring" - -msgid "Successfully Updated" -msgstr "Vellykket oppdatering" - -msgid "Successfully Updated thanks to www.techjawa.com" -msgstr "Vellykket oppdatering takket være www.techjawa.com" - -msgid "Successfully deleted:" -msgstr "Vellykket sletting:" - -msgid "Successfully extracted theme." -msgstr "Vellykket utpakking av tema." - -msgid "Successfully installed:" -msgstr "Vellykket installering:" - -msgid "Sync FAT32 FS Info" -msgstr "" - -msgid "Synchronizing..." -msgstr "" - -msgid "System Default" -msgstr "System Standard" - -msgid "TChinese" -msgstr "T.Kinesisk" - -msgid "TXT Cheatcodes Path" -msgstr "TXTjuksekode sti" - -msgid "The .them file was not found in the zip." -msgstr "Filen .them ble ikke funnet i zip." - -msgid "The entered directory does not exist. Would you like to create it?" -msgstr "Valgt mappe finnes ikke. Vil du opprette den?" - -msgid "The game installation is disabled under this IOS because of instability in usb write." -msgstr "" - -msgid "The wad file was installed" -msgstr "WAD filen ble installert" - -#, c-format -msgid "The wad installation failed with error %i" -msgstr "WAD innstallering feilet med feilmelding %i" - -msgid "Theme Downloader" -msgstr "Tema Nedlaster" - -msgid "Theme Menu" -msgstr "" - -msgid "Theme Path" -msgstr "Tema sti" - -msgid "Theme Title:" -msgstr "Tema tittel:" - -msgid "Themes by www.spiffy360.com" -msgstr "Tema fra www.spiffy360.com" - -msgid "This IOS is the BootMii ios. If you are sure it is not BootMii and you have something else installed there than ignore this warning." -msgstr "Dette IOS er vanligvis BootMii IOS. Hvis du er sikker på at dette ikke er BootMii, kan du ignorere denne advarselen." - -msgid "This IOS was not found on the titles list. If you are sure you have it installed than ignore this warning." -msgstr "Dette IOS ble ikke funnet i tittel listen. Hvis du er sikker på at du har det installert, kan du ignorere denne advarselen." - -msgid "Time left:" -msgstr "Tid igjen:" - -msgid "Title Launcher" -msgstr "Tittel Laster" - -msgid "Titles from WiiTDB" -msgstr "Titler fra WiiTDB" - -msgid "Tooltips" -msgstr "Verktøystips" - -msgid "Transfer failed" -msgstr "Overføring feilet" - -msgid "USB Device not found" -msgstr "USB enhet ikke funnet" - -msgid "USB Loader GX is protected" -msgstr "USB Loader GX er beskyttet" - -msgid "USB Port" -msgstr "" - -msgid "USB Port changing is only supported on Hermes cIOS." -msgstr "" - -msgid "Uninstall" -msgstr "Avinstallér" - -msgid "Uninstall Game" -msgstr "Avinstallér spill" - -msgid "Uninstall Menu" -msgstr "Avinstallér Meny" - -msgid "Uninstall all" -msgstr "" - -msgid "Uninstalling wad" -msgstr "Avinstallerer WAD" - -msgid "Unknown" -msgstr "Ukjent" - -msgid "Unlock USB Loader GX" -msgstr "Lås opp USB Loader GX" - -msgid "Unlocked" -msgstr "Opplåst" - -msgid "Unsupported format, try to extract manually TempTheme.zip." -msgstr "Ikke støttet format. Prøv å pakk ut TempTheme.zip manuelt." - -msgid "Update" -msgstr "Oppdater" - -msgid "Update All" -msgstr "Oppdater alt" - -msgid "Update DOL" -msgstr "Oppdater DOL" - -msgid "Update Files" -msgstr "Oppdater filer" - -msgid "Update Path" -msgstr "Oppdatering sti" - -msgid "Update all Language Files" -msgstr "Oppdater alle språkfiler" - -msgid "Update failed" -msgstr "Mislykket oppdatering" - -msgid "Update successfull" -msgstr "Vellykket oppdatering" - -msgid "Updating Language Files:" -msgstr "Oppdaterer språkfiler:" - -msgid "Uploaded ZIP file installed to homebrew directory." -msgstr "Opplastet ZIP fil installert i homebrew mappen." - -msgid "VIDTV Patch" -msgstr "" - -msgid "Version:" -msgstr "" - -#, c-format -msgid "Version: %s" -msgstr "Versjon: %s" - -msgid "Video Mode" -msgstr "Video modus" - -msgid "WDM Files Path" -msgstr "" - -msgid "WIP Patches Path" -msgstr "WIP patches sti" - -msgid "Waiting..." -msgstr "Venter..." - -msgid "Warning:" -msgstr "Advarsel:" - -msgid "What do you want to update?" -msgstr "Hva vil du oppdatere?" - -msgid "What should be deleted for this game title:" -msgstr "" - -msgid "WiFi Features" -msgstr "WiFi egenskaper" - -msgid "Widescreen Fix" -msgstr "Widescreen fiks" - -msgid "Wii Menu" -msgstr "Wii Meny" - -msgid "Wii Settings" -msgstr "Wii Innstillinger" - -msgid "WiiTDB Files" -msgstr "WiiTDB filer" - -msgid "WiiTDB Path" -msgstr "WiiTDB sti" - -msgid "WiiTDB is up to date." -msgstr "WiiTDB er oppdatert." - -msgid "Wiilight" -msgstr "Wii DVD lys" - -msgid "Wrong Password" -msgstr "Feil passord" - -msgid "Yes" -msgstr "Ja" - -msgid "You are currently using IOS" -msgstr "" - -msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." -msgstr "Du prøver å velge en FAT32/NTFS/EXT partisjon med cIOS 249 rev < 18. Dette er ikke støttet. Fortsett på eget ansvar." - -msgid "You need to select or format a partition" -msgstr "Du må velge en partisjon" - -msgid "and translators for language files updates" -msgstr "og oversettere for språkfiler" - -msgid "available" -msgstr "tilgjengelig" - -msgid "does not exist!" -msgstr "finnes ikke!" - -msgid "does not exist! Loading game without cheats." -msgstr "finnes ikke! Laster spill uten juksekode." - -msgid "files left" -msgstr "filer gjenstår" - -msgid "for FAT/NTFS support" -msgstr "for FAT/NTFS støtte" - -msgid "for Ocarina" -msgstr "" - -msgid "for WiiTDB and hosting covers / disc images" -msgstr "for WiiTDB og hosting av bilder" - -msgid "for diverse patches" -msgstr "for diverse patcher" - -msgid "for his awesome tool LibWiiGui" -msgstr "for hans råe verktøy LibWiiGui" - -msgid "for hosting the themes" -msgstr "for hosting av tema" - -msgid "for hosting the update files" -msgstr "for hosting av oppdateringer" - -msgid "for the USB Loader source" -msgstr "for kilden til USB Loader" - -msgid "formatted!" -msgstr "formatert!" - -msgid "free" -msgstr "ledig" - -msgid "not set" -msgstr "ikke satt" - -msgid "of" -msgstr "av" - -msgid "seconds left" -msgstr "sekunder gjenstår" - -#~ msgid "Author:" -#~ msgstr "Forfatter:" - -#~ msgid "Do you want to load this theme?" -#~ msgstr "Vil du laste dette tema?" - -#~ msgid "Loading default theme." -#~ msgstr "Laster standard tema." - -#~ msgid "Theme path is changed." -#~ msgstr "Tema sti er endret." - -#~ msgid "0 (Locked and Unlocked Games)" -#~ msgstr "0 (Låste og ulåste spill)" - -#~ msgid "1 (Unlocked Games Only)" -#~ msgstr "1 (Kun ulåste spill)" - -#~ msgid "BETA revisions" -#~ msgstr "BETA revisjoner" - -#~ msgid "Disc Images" -#~ msgstr "Plate bilder" - -#~ msgid "Do you really want to delete:" -#~ msgstr "Er du sikker på at du vil slette:" - -#~ msgid "Do you want to use the alternate DOL that is known to be correct?" -#~ msgstr "Vil du bruke alt DOL filen som er kjent for å være riktig?" - -#~ msgid "Download Boxart image?" -#~ msgstr "Last ned cover bilde?" - -#~ msgid "Download Discart image?" -#~ msgstr "Last ned plate bilde?" - -#~ msgid "Downloading covers" -#~ msgstr "Laster ned cover" - -#~ msgid "Downloading file" -#~ msgstr "Laster ned fil" - -#~ msgid "Enabling this option on a FAT partition might slow the startup of the loader." -#~ msgstr "Aktivering av dette valget på en FAT partisjon kan føre til treg oppstart." - -#~ msgid "GamesLevel" -#~ msgstr "SpillNivå" - -#~ msgid "Missing files" -#~ msgstr "Manglende filer" - -#~ msgid "Only Customs" -#~ msgstr "Kun custom" - -#~ msgid "Only Original" -#~ msgstr "Kun original" - -#~ msgid "Trying custom Discarts" -#~ msgstr "Prøver custom platebilder" - -#~ msgid "Trying original Discarts" -#~ msgstr "Prøver originale platebilder" - -#~ msgid "Unlock console to use this option." -#~ msgstr "Lås opp konsollen for å bruke denne innstillingen." - -#~ msgid "files not found on the server!" -#~ msgstr "filer ikke funnet på serveren!" - -#~ msgid "Full Shutdown" -#~ msgstr "Skru helt av" - -#~ msgid "If you don't have WiFi, press 1 to get an URL to get your WiiTDB.zip" -#~ msgstr "Hvis du ikke har WiFi, klikk 1 for å få en URL til din WiiTDB.zip" - -#~ msgid "Paste it into your browser to get your WiiTDB.zip." -#~ msgstr "Lim den inn i nettleseren din for å få WiiTDB.zip." - -#~ msgid "Shutdown to Idle" -#~ msgstr "Skru av" - -#~ msgid "Your URL has been saved in %sWiiTDB_URL.txt." -#~ msgstr "Din URL ble lagret i %sWiiTDB_URL.txt." - -#~ msgid "Can't create file" -#~ msgstr "Kan ikke opprette fil" - -#~ msgid "Download failed." -#~ msgstr "Nedlasting feilet." - -#~ msgid "Download request failed." -#~ msgstr "Nedlast spørring feilet." - -#~ msgid "Downloading Page List:" -#~ msgstr "Laster ned side liste:" - -#~ msgid "Theme Download Path" -#~ msgstr "Tema nedlasting sti" - -#~ msgid "Transfer failed." -#~ msgstr "Overføring feilet." - -#~ msgid "Unsupported format, try to extract manually." -#~ msgstr "Format ikke støttet, prøv å pakk ut manuelt." - -#~ msgid "and translaters for language files updates" -#~ msgstr "og oversettere for språkfiler" - -#~ msgid "Insert an SD-Card to save." -#~ msgstr "Sett inn et SD-kort for å lagre." - -#~ msgid "Insert an SD-Card to use this option." -#~ msgstr "Sett inn et SD-kort for å bruke innstillingen." - -#~ msgid "No SD-Card inserted!" -#~ msgstr "Intet SD-kort satt i!" - -#~ msgid "Waiting for USB Device" -#~ msgstr "Venter på USB enhet" - -#~ msgid "Back to Loader" -#~ msgstr "HBC/Loader" - -#~ msgid "An Error occured" -#~ msgstr "En feil oppstod" - -#~ msgid "Checking for Updates" -#~ msgstr "Søker etter oppdateringer" - -#~ msgid "Downloading" -#~ msgstr "Laster ned" - -#~ msgid "The wad file was installed. But It could not be deleted from the SD card." -#~ msgstr "WAD filen ble installert. Men ble ikke slettet fra SD kort." - -#~ msgid "The wad installation failed with error %ld" -#~ msgstr "WAD installasjonen feilet med feilkode %ld" - -#~ msgid "Unable to open the wad that was just downloaded (%s)." -#~ msgstr "Kan ikke åpne nedlastet WAD fil (%s)." - -#~ msgid "Update to" -#~ msgstr "Oppdater til" - -#~ msgid "Updating" -#~ msgstr "Oppdaterer" - -#~ msgid "Updating Language Files..." -#~ msgstr "Oppdaterer språkfiler..." - -#~ msgid "Updating WiiTDB.zip" -#~ msgstr "Oppdaterer WiiTDB.zip" - -#~ msgid "%s : %s May not boot correctly if your System Menu is not up to date." -#~ msgstr "%s : %s vil kanskje ikke starte riktig hvis System Menyen ikke er oppdatert." - -#~ msgid "Back to Wii Menu" -#~ msgstr "Wii meny" - -#~ msgid "Channels" -#~ msgstr "Kanaler" - -#~ msgid "Checking existing artwork" -#~ msgstr "Sjekker eksisterende bilder" - -#~ msgid "Confirm" -#~ msgstr "Bekreft" - -#~ msgid "Could not find a WBFS partition." -#~ msgstr "Kan ikke finne en WBFS partisjon." - -#~ msgid "Could not open WBFS partition" -#~ msgstr "Kan ikke åpne WBFS partisjon" - -#~ msgid "Could not read the disc." -#~ msgstr "Kan ikke lese plate." - -#~ msgid "Could not set USB." -#~ msgstr "Kan ikke velge USB." - -#~ msgid "Cover Path Changed" -#~ msgstr "Cover sti endret" - -#~ msgid "DOL path changed" -#~ msgstr "DOL sti endret" - -#~ msgid "Disc Path Changed" -#~ msgstr "Plate sti endret" - -#~ msgid "Display favorites" -#~ msgstr "Vis favoritter" - -#~ msgid "Do you want to retry for 30 secs?" -#~ msgstr "Vil du fortsette å prøve i 30 sekunder?" - -#~ msgid "Force" -#~ msgstr "Tving" - -#~ msgid "GCT Cheatcodes Path changed" -#~ msgstr "GCT Juksekode sti endret" - -#~ msgid "Homebrew Appspath changed" -#~ msgstr "Homebrew Apps sti endret" - -#~ msgid "Insert an SD-Card to download images." -#~ msgstr "Sett inn et SD-kort for å laste ned bilder." - -#~ msgid "Most likely it has dimensions that are not evenly divisible by 4." -#~ msgstr "Sannsynligvis har bildet dimensjoner som ikke kan deles med 4." - -#~ msgid "Network init error" -#~ msgstr "Nettverk init feil" - -#~ msgid "No .dol or .elf files found." -#~ msgstr "Ingen .dol eller .elf filer funnet." - -#~ msgid "No Favorites" -#~ msgstr "Ingen favoritter" - -#~ msgid "No USB Device" -#~ msgstr "Ingen USB enhet" - -#~ msgid "No USB Device found." -#~ msgstr "Ingen USB enhet funnet." - -#~ msgid "Normal Covers" -#~ msgstr "Normale cover" - -#~ msgid "Not Found" -#~ msgstr "Ikke funnet" - -#~ msgid "Not a DOL/ELF file." -#~ msgstr "Ikke en DOL/ELF fil." - -#~ msgid "Save Failed" -#~ msgstr "Lagring feilet" - -#~ msgid "Selected DOL" -#~ msgstr "Valgt DOL fil" - -#~ msgid "Standard" -#~ msgstr "Standard" - -#~ msgid "TXT Cheatcodes Path changed" -#~ msgstr "TXTjuksekode sti endret" - -#~ msgid "Theme Download Path changed" -#~ msgstr "Tema nedlasting sti endret" - -#~ msgid "Theme Path Changed" -#~ msgstr "Tema sti endret" - -#~ msgid "Update Path changed." -#~ msgstr "Oppdatering sti endret." - -#~ msgid "WiiTDB Path changed." -#~ msgstr "WiiTDB sti endret." - -#~ msgid "You are about to delete " -#~ msgstr "Du er i ferd med å slette " - -#~ 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." - -#~ msgid "You have attempted to load a bad image" -#~ msgstr "Du har forsøkt å vise et korrupt bilde" - -#~ msgid "does not exist! You Messed something up, Idiot." -#~ msgstr "finnes ikke! Du har gjort noe galt." - -#~ msgid "file left" -#~ msgstr "fil gjenstår" diff --git a/Languages/polish.lang b/Languages/polish.lang deleted file mode 100644 index 300bf307..00000000 --- a/Languages/polish.lang +++ /dev/null @@ -1,1815 +0,0 @@ -# USB Loader GX language source file. -# polish.lang - r899 -# don't delete/change this line (é). -msgid "" -msgstr "" -"Project-Id-Version: USB Loader GX\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-06 19:36+0100\n" -"PO-Revision-Date: 2009-10-01 01:00+0200\n" -"Last-Translator: ziom666 (zadania_prog@vp.pl)\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -msgid " Wad Saved as:" -msgstr " Wad zapisano jako:" - -msgid " could not be downloaded." -msgstr " nie udalo sie pobrac" - -msgid " has been Saved. The text has not been verified. Some of the code may not work right with each other. If you experience trouble, open the text in a real text editor for more information." -msgstr " zapisano. Plik tekstowy nie zostal zweryfikowany. Niektore z kodow, moga nie dzialac wlaeciwie z innymi. W razie problemow otworz plik tekstowy w edytorze na komputerze" - -msgid " is not on the server." -msgstr " nie istnieje na serwerze" - -#, c-format -msgid "%i files not found on the server!" -msgstr "" - -#, c-format -msgid "%i missing files" -msgstr "" - -msgid "0 (Everyone)" -msgstr "0 (dla kazdego)" - -msgid "1 (Child 7+)" -msgstr "1 (dziecko 7+)" - -msgid "1 hour" -msgstr "1 godzina" - -msgid "10 min" -msgstr "" - -msgid "2 (Teen 12+)" -msgstr "2 (mlodziez 12+)" - -msgid "20 min" -msgstr "" - -msgid "2D Cover Path" -msgstr "Sciezka okladek 2D" - -msgid "3 (Mature 16+)" -msgstr "3 (dojrzaly 16+)" - -msgid "3 min" -msgstr "" - -msgid "30 min" -msgstr "" - -msgid "3D Cover Path" -msgstr "Sciezka okladek 3D" - -msgid "3D Covers" -msgstr "Okladki 3D" - -msgid "4 (Adults Only 18+)" -msgstr "4 (tylko dla doroslych 18+)" - -msgid "5 min" -msgstr "" - -msgid ">> Deleting tickets..." -msgstr ">> Usuwanie ticketu..." - -msgid ">> Deleting tickets...ERROR! " -msgstr ">> Usuwanie ticketu...ERROR! " - -msgid ">> Deleting tickets...Ok! " -msgstr ">> Usuwanie ticketu...Ok! " - -msgid ">> Deleting title ...ERROR! " -msgstr ">> Usuwanie tytulu ...ERROR! " - -msgid ">> Deleting title ...Ok!" -msgstr ">> Usuwanie tytulu ...Ok!" - -msgid ">> Deleting title contents..." -msgstr ">> Usuwanie title contents..." - -msgid ">> Deleting title contents...ERROR! " -msgstr ">> Usuwanie title contents...ERROR! " - -msgid ">> Deleting title contents...Ok!" -msgstr ">> Usuwanie title contents...Ok!" - -msgid ">> Deleting title..." -msgstr ">> Usuwanie tytulu..." - -msgid ">> Finishing installation..." -msgstr ">> Konczenie instalacji" - -msgid ">> Installing content #" -msgstr ">> Instalowanie zawartoSci #" - -msgid ">> Installing ticket..." -msgstr ">> Instalowanie ticketu..." - -msgid ">> Installing title..." -msgstr ">> Instalowanie tytulu..." - -msgid ">> Reading WAD data..." -msgstr ">> Odczyt danych WAD..." - -msgid ">> Reading WAD data...ERROR! " -msgstr ">> Odczyt danych WAD...ERROR! " - -msgid ">> Reading WAD data...Ok!" -msgstr ">> Odczyt danych WAD...Ok!" - -msgid "AUTO" -msgstr "automatycznie" - -msgid "All Partitions" -msgstr "" - -msgid "All images downloaded successfully." -msgstr "" - -msgid "All the features of USB Loader GX are unlocked." -msgstr "USB Loader GX odblokowany" - -msgid "Alternate DOL" -msgstr "Alternatywny DOL" - -msgid "Anti" -msgstr "Anty" - -msgid "App Language" -msgstr "Jezyk" - -msgid "Apply" -msgstr "" - -msgid "Apr" -msgstr "Kwiecien" - -msgid "Are you sure you want to lock USB Loader GX?" -msgstr "" - -msgid "Are you sure you want to reset?" -msgstr "" - -msgid "Are you sure?" -msgstr "Na pewno?" - -msgid "Aug" -msgstr "Sierpien" - -msgid "Author(s):" -msgstr "" - -msgid "AutoInit Network" -msgstr "Autoinicjalizacja sieci" - -msgid "Automatic port switching is done on the fly. You need to change all custom paths to SD-Card first for this option or else it could damage a filesystem." -msgstr "" - -msgid "BCA Codes Path" -msgstr "Sciezka kodow BCA" - -msgid "Back" -msgstr "Cofnij" - -msgid "Back to HBC or Wii Menu" -msgstr "Powrot do HBC/Wii Menu" - -msgid "Backgroundmusic" -msgstr "Muzyka w tle" - -msgid "Big thanks to:" -msgstr "Podziekowania dla" - -msgid "Block Cover Downloads" -msgstr "" - -msgid "Block Custom Paths" -msgstr "" - -msgid "Block Game Install" -msgstr "" - -msgid "Block Game Settings" -msgstr "" - -msgid "Block GameID Change" -msgstr "" - -msgid "Block Global Settings" -msgstr "" - -msgid "Block Gui Settings" -msgstr "" - -msgid "Block HBC Menu" -msgstr "" - -msgid "Block IOS Reload" -msgstr "Blokoj przeladowanie IOS" - -msgid "Block Loader Settings" -msgstr "" - -msgid "Block Parental Settings" -msgstr "" - -msgid "Block Reset Settings" -msgstr "" - -msgid "Block Sound Settings" -msgstr "" - -msgid "Block Theme Downloader" -msgstr "" - -msgid "Block Theme Menu" -msgstr "" - -msgid "Block Title Launcher" -msgstr "" - -msgid "Block Updates" -msgstr "" - -msgid "Boot/Standard" -msgstr "" - -msgid "Boot?" -msgstr "" - -msgid "Both" -msgstr "Oba" - -msgid "Both Ports" -msgstr "" - -msgid "Can't be formatted" -msgstr "Nie mozna sformatowac" - -msgid "Can't create directory" -msgstr "Nie mozna utworzyc folderu" - -#, c-format -msgid "Can't create path: %s" -msgstr "" - -msgid "Can't delete:" -msgstr "Nie mozna usunac" - -msgid "Cancel" -msgstr "Anuluj" - -msgid "Cannot write to destination." -msgstr "" - -msgid "Change Play Path" -msgstr "" - -msgid "Cheatfile is blank" -msgstr "Plik z kodami pusty" - -msgid "Clear" -msgstr "" - -msgid "Click to Download Covers" -msgstr "Kliknij aby pobrac okladki" - -msgid "Click to change game ID" -msgstr "Kliknij zeby zmienic ID gry" - -msgid "Clock" -msgstr "Zegar" - -msgid "Close" -msgstr "Zamknij" - -msgid "Code Download" -msgstr "Pobierz kody" - -#, c-format -msgid "Coded by: %s" -msgstr "" - -msgid "Coding:" -msgstr "" - -msgid "Connection to server timed out." -msgstr "" - -msgid "Console" -msgstr "Konsola" - -msgid "Console Default" -msgstr "Domyslne ustawienia konsoli" - -msgid "Console Locked" -msgstr "Konsola zablokowana" - -msgid "Console must be unlocked for this option." -msgstr "" - -msgid "Console should be unlocked to modify it." -msgstr "Aby zmodyfikowac, odblokuj konsole" - -msgid "Continue to install game?" -msgstr "Kontynuowac instalacje?" - -msgid "Controllevel" -msgstr "Poziom kontroli" - -msgid "Correct Password" -msgstr "Haslo poprawne" - -msgid "Could not connect to the server." -msgstr "" - -msgid "Could not create GCT file" -msgstr "Nie udalo sie stworzyc pliku GCT" - -#, c-format -msgid "Could not create path: %s" -msgstr "" - -msgid "Could not find info for this game in the wiitdb.xml." -msgstr "" - -msgid "Could not initialize DIP module!" -msgstr "Nie zainicjalizowano modulu DIP!" - -msgid "Could not initialize network!" -msgstr "Nie zainicjalizowano sieci!" - -msgid "Could not open Disc" -msgstr "Nie udalo sie otworzyc dysku" - -msgid "Could not open wiitdb.xml." -msgstr "" - -msgid "Could not save." -msgstr "Nie mozna zapisac" - -msgid "Cover Download" -msgstr "Pobierz okladki" - -msgid "Create" -msgstr "Utworz" - -msgid "Credits" -msgstr "" - -msgid "Custom Discarts" -msgstr "" - -msgid "Custom Paths" -msgstr "Sciezki" - -msgid "Customs/Original" -msgstr "" - -msgid "DOL Path" -msgstr "Sciezka plikow .DOL" - -msgid "Dec" -msgstr "Grudzien" - -msgid "Default" -msgstr "Ustawienia domyslne" - -msgid "Default Gamesettings" -msgstr "Domyslne ustawienia gier" - -msgid "Default Settings" -msgstr "Domyslne ustawienia" - -msgid "Delete" -msgstr "Usun" - -msgid "Delete ?" -msgstr "Usunac ?" - -msgid "Delete Cheat GCT" -msgstr "Usun plik z kodami GCT" - -msgid "Delete Cheat TXT" -msgstr "Usun plik z kodami TXT" - -msgid "Delete Cover Artwork" -msgstr "Usun obrazki box" - -msgid "Delete Disc Artwork" -msgstr "Usun obrazki plyt" - -msgid "Design:" -msgstr "Projekt:" - -msgid "Developed by" -msgstr "" - -msgid "Directory does not exist!" -msgstr "Katalog nie istnieje!" - -msgid "Disc Artwork Download" -msgstr "Pobierz obrazki" - -msgid "Disc Artwork Path" -msgstr "Sciezka do obrazkow plyt" - -msgid "Disc Default" -msgstr "Domyslny dysk" - -msgid "DiskFlip" -msgstr "Obrot plytami" - -msgid "Display" -msgstr "Wyswietl" - -msgid "Display as a carousel" -msgstr "Wyswietl jako karuzele" - -msgid "Display as a grid" -msgstr "Wyswietl jako siatke" - -msgid "Display as a list" -msgstr "Wyswietl jako liste" - -msgid "Display favorites only" -msgstr "" - -msgid "Do you want to apply it now?" -msgstr "Czy chcesz to teraz zastosowac?" - -msgid "Do you want to apply this theme?" -msgstr "" - -msgid "Do you want to change language?" -msgstr "Zmienic jezyk?" - -msgid "Do you want to download this theme?" -msgstr "Pobrac temat?" - -msgid "Do you want to format:" -msgstr "Sformatowac:" - -msgid "Do you want to load the default theme?" -msgstr "" - -msgid "Do you want to sync free space info sector on all FAT32 partitions?" -msgstr "" - -msgid "Do you wish to update/download all language files?" -msgstr "Zaktualizowac wszystkie pliki jezykowe?" - -msgid "Done!" -msgstr "Zakonczono!" - -msgid "Download" -msgstr "Pobierz" - -msgid "Download Now" -msgstr "Pobierz teraz" - -msgid "Download finished" -msgstr "Zakonczono pobieranie" - -msgid "Downloading 3D Covers" -msgstr "" - -msgid "Downloading Flat Covers" -msgstr "" - -msgid "Downloading Full HQ Covers" -msgstr "" - -msgid "Downloading Full LQ Covers" -msgstr "" - -msgid "Downloading custom Discarts" -msgstr "" - -msgid "Downloading file..." -msgstr "" - -msgid "Downloading image:" -msgstr "Pobieranie obrazka:" - -msgid "Downloading original Discarts" -msgstr "" - -msgid "Downloading pagelist:" -msgstr "" - -msgid "Dutch" -msgstr "holenderski" - -msgid "ERROR" -msgstr "Blad" - -msgid "ERROR:" -msgstr "Blad:" - -msgid "ERROR: Can't set up theme." -msgstr "Blad: nie mozna ustawic tematu" - -msgid "English" -msgstr "angielski" - -msgid "Error" -msgstr "Blad" - -msgid "Error !" -msgstr "Blad !" - -msgid "Error 002 fix" -msgstr "Poprawka bledu 002" - -#, c-format -msgid "Error creating path: %s" -msgstr "" - -msgid "Error opening downloaded file" -msgstr "" - -msgid "Error reading Disc" -msgstr "Blad odczytu plyty" - -#, c-format -msgid "Error when downloading file: %i" -msgstr "" - -msgid "Error while downloding file" -msgstr "" - -msgid "Error while opening the zip." -msgstr "" - -msgid "Error while transfering data." -msgstr "Blad podczas transferu danych" - -msgid "Error while updating USB Loader GX." -msgstr "" - -msgid "Error writing the data." -msgstr "" - -msgid "Error..." -msgstr "Blad..." - -msgid "Error:" -msgstr "Blad:" - -msgid "Exit" -msgstr "" - -msgid "Exit to where?" -msgstr "" - -msgid "Extracting files..." -msgstr "Rozpakowywanie plikow..." - -msgid "Failed formating" -msgstr "Nie udalo sie sformatowac" - -msgid "Failed to extract." -msgstr "Nie udalo sie rozpakowac" - -msgid "Failed to open partition" -msgstr "Nie udalo sie otworzyc partycji" - -msgid "Failed updating" -msgstr "" - -msgid "Feb" -msgstr "Luty" - -msgid "File not found." -msgstr "Nie znaleziono pliku." - -#, c-format -msgid "Filesize is %i Byte." -msgstr "" - -msgid "Filesize is 0 Byte." -msgstr "" - -msgid "Finishing installation... Ok!" -msgstr "Konczenie instalacji...Ok!" - -msgid "Flat Covers" -msgstr "" - -msgid "Flip-X" -msgstr "Obrot na osi X" - -msgid "Force NTSC" -msgstr "" - -msgid "Force PAL50" -msgstr "" - -msgid "Force PAL60" -msgstr "" - -msgid "Format" -msgstr "Sformatuj" - -msgid "Formatting, please wait..." -msgstr "Formatowanie, prosze czekac..." - -msgid "Found missing images." -msgstr "" - -msgid "Free Space" -msgstr "Wolnego miejsca" - -msgid "French" -msgstr "francuski" - -msgid "Full Cover Path" -msgstr "" - -msgid "Full HQ Covers" -msgstr "" - -msgid "Full LQ Covers" -msgstr "" - -msgid "Full Menu" -msgstr "" - -msgid "Full shutdown" -msgstr "" - -msgid "GAMEID_Gamename" -msgstr "" - -msgid "GCT Cheatcodes Path" -msgstr "Sciezka kodow GCT" - -msgid "GCT File created" -msgstr "Utworzono plik GCT" - -msgid "GUI Settings" -msgstr "Ustawienia interfejsu graficznego" - -msgid "Game ID" -msgstr "ID gry" - -msgid "Game IOS" -msgstr "" - -msgid "Game Language" -msgstr "Jezyk gry" - -msgid "Game Load" -msgstr "Zaladuj gre" - -msgid "Game Lock" -msgstr "" - -msgid "Game Only" -msgstr "" - -msgid "Game Region" -msgstr "Region" - -msgid "Game Size" -msgstr "Rozmiar gry" - -msgid "Game Sound Mode" -msgstr "Tryb dzwieku gry" - -msgid "Game Sound Volume" -msgstr "Gloscnosc dzwieku gry" - -msgid "Game Split Size" -msgstr "" - -msgid "Game is already installed:" -msgstr "Gra jest juz zainstalowana:" - -msgid "Game/Install Partition" -msgstr "" - -msgid "Gamename [GAMEID]" -msgstr "" - -msgid "Games" -msgstr "Liczba gier" - -msgid "Genre:" -msgstr "" - -msgid "German" -msgstr "niemiecki" - -msgid "Global Settings" -msgstr "" - -msgid "HOME Menu" -msgstr "Menu" - -msgid "Homebrew Apps Path" -msgstr "Sciezka plikacji homebrew" - -msgid "Homebrew Channel" -msgstr "" - -msgid "Homebrew Launcher" -msgstr "" - -msgid "Hour" -msgstr "Godzina" - -msgid "How do you want to update?" -msgstr "Wybierz rodzaj aktualizacji" - -msgid "How to Shutdown?" -msgstr "Wybierz rodzaj zamkniecia" - -#, c-format -msgid "Incoming file %0.2fKB" -msgstr "Przychodzacy plik %0.2fKB" - -#, c-format -msgid "Incoming file %0.2fMB" -msgstr "Przychodzacy plik %0.2fMB" - -msgid "Initializing Network" -msgstr "Inicjalizacja sieci" - -msgid "Insert Disk" -msgstr "Wloz plyte" - -msgid "Insert a Wii Disc!" -msgstr "Wloz plyte Wii!" - -msgid "Install" -msgstr "Zainstaluj" - -msgid "Install Error!" -msgstr "Blad instalacji" - -msgid "Install a game" -msgstr "Zainstaluj gre" - -msgid "Install directories" -msgstr "" - -msgid "Install partitions" -msgstr "Zainstaluj partycje" - -msgid "Installing content... Ok!" -msgstr "Instalowanie zawartosci...Ok!" - -msgid "Installing game:" -msgstr "Instalowanie gry:" - -msgid "Installing ticket... Ok!" -msgstr "Instalowanie ticketu... Ok!" - -msgid "Installing title... Ok!" -msgstr "Instalowanie tytulu... Ok!" - -msgid "Installing wad" -msgstr "Instalowanie wad" - -msgid "Issue manager /" -msgstr "" - -msgid "It seems that you have some information that will be helpful to us. Please pass this information along to the DEV team." -msgstr "" - -msgid "Italian" -msgstr "wloski" - -msgid "Jan" -msgstr "Styczen" - -msgid "Japanese" -msgstr "japonski" - -msgid "July" -msgstr "lipiec" - -msgid "June" -msgstr "czerwiec" - -msgid "Keep" -msgstr "Trzymaj" - -msgid "Keyboard" -msgstr "Klawiatura" - -msgid "Korean" -msgstr "koreanski" - -msgid "Language File" -msgstr "Plik jezykowy" - -msgid "Language change:" -msgstr "Zmien jezyk" - -msgid "Languagefiles Path" -msgstr "" - -msgid "Languagepath changed." -msgstr "Sciezka do plikow jezykowych zmieniona" - -msgid "Left" -msgstr "Lewo" - -msgid "Like SysMenu" -msgstr "Podobnie do menu systemowego" - -msgid "List on Gamelaunch" -msgstr "" - -msgid "Load" -msgstr "Zaladuj" - -msgid "Load From SD/USB" -msgstr "Zaladuj z SD/USB" - -#, c-format -msgid "Load file from: %s ?" -msgstr "Zaladowac plik z: %s ?" - -msgid "Load this DOL as alternate DOL?" -msgstr "Zaladowac ten DOL jako alternatywnt?" - -msgid "Loader Settings" -msgstr "" - -msgid "Loading standard language." -msgstr "ladowanie standardowego jezyka." - -msgid "Loading standard music." -msgstr "ladowanie standardowej muzyki" - -msgid "Lock Console" -msgstr "Zablokuj konsole" - -msgid "Lock USB Loader GX" -msgstr "" - -msgid "Locked" -msgstr "Zablokowano" - -msgid "Loop Directory" -msgstr "" - -msgid "Loop Music" -msgstr "" - -msgid "Loop Sound" -msgstr "Zapetl dzwieki" - -msgid "Main tester:" -msgstr "" - -msgid "Mar" -msgstr "Marzec" - -msgid "Mark new games" -msgstr "Oznacz nowe gry" - -msgid "May" -msgstr "Maj" - -msgid "Messageboard Update" -msgstr "" - -msgid "Motion+ Video" -msgstr "" - -msgid "Mount DVD drive" -msgstr "Uruchom naped DVD" - -msgid "Multiple Partitions" -msgstr "" - -msgid "Music Loop Mode" -msgstr "" - -msgid "Music Volume" -msgstr "Poziom glosnosci" - -msgid "Neither" -msgstr "zadne" - -msgid "Network is not initiated." -msgstr "" - -msgid "New Disc Detected" -msgstr "Wykryto nowy dysk" - -msgid "Next" -msgstr "nastepny" - -msgid "No" -msgstr "Nie" - -msgid "No Cheatfile found" -msgstr "Nie znaleziono plikow z kodami" - -msgid "No DOL file found on disc." -msgstr "Brak plikow DOL na dysku" - -msgid "No Splitting" -msgstr "" - -msgid "No URL or Path specified." -msgstr "" - -msgid "No WBFS or FAT/NTFS/EXT partition found" -msgstr "" - -msgid "No cheats were selected" -msgstr "Nie wybrano zadnych kodow" - -msgid "No data could be read." -msgstr "Blad odczytu" - -msgid "No favorites selected." -msgstr "" - -msgid "No file missing!" -msgstr "Brak plikow do pobrania" - -msgid "No new updates." -msgstr "Posiadasz aktualna wersje" - -msgid "No themes found on the site." -msgstr "Nie znaleziono tematow na tej stronie" - -msgid "No themes found." -msgstr "" - -msgid "None" -msgstr "" - -msgid "Normal" -msgstr "Standardowe" - -msgid "Not a WAD file." -msgstr "" - -msgid "Not a Wii Disc" -msgstr "To nie jest plyta Wii" - -msgid "Not a valid URL" -msgstr "" - -msgid "Not a valid URL path" -msgstr "" - -msgid "Not a valid domain" -msgstr "" - -msgid "Not enough free memory." -msgstr "Brak wystarczajacej wolnej pamieci" - -msgid "Not enough free space!" -msgstr "Brak wystarczajacej wolnej pamieci" - -msgid "Not enough memory." -msgstr "" - -msgid "Not required" -msgstr "" - -msgid "Not supported format!" -msgstr "Nieobslugiwany format" - -msgid "Nov" -msgstr "Listopad" - -msgid "OFF" -msgstr "Wylacz" - -msgid "OK" -msgstr "" - -msgid "ON" -msgstr "Wlacz" - -msgid "Ocarina" -msgstr "" - -msgid "Oct" -msgstr "Pazdziernik" - -msgid "Official Site:" -msgstr "Strona oficjalna:" - -msgid "Offset" -msgstr "" - -msgid "Only Game Partition" -msgstr "" - -msgid "Only for Install" -msgstr "Tylko dla instalacji" - -msgid "Original Discarts" -msgstr "" - -msgid "Original/Customs" -msgstr "Mieszane" - -msgid "Parental Control" -msgstr "Kontrola rodzicielska" - -msgid "Partition" -msgstr "Partycja" - -msgid "Password" -msgstr "Haslo" - -msgid "Password Changed" -msgstr "Haslo zmieniono" - -msgid "Password has been changed" -msgstr "Haslo zostalo zmienione" - -msgid "Patch Country Strings" -msgstr "" - -msgid "Path Changed" -msgstr "" - -msgid "Permission denied." -msgstr "" - -msgid "Pick from a list" -msgstr "Wybierz z listy" - -msgid "Play Count" -msgstr "Licznik" - -msgid "Play Next" -msgstr "" - -msgid "Play Once" -msgstr "" - -msgid "Play Previous" -msgstr "" - -msgid "Playing Music:" -msgstr "" - -msgid "Please wait..." -msgstr "Prosze czekac..." - -msgid "Power off the Wii" -msgstr "Wylacz Wii" - -msgid "Prev" -msgstr "Poprzedni" - -msgid "Prompts Buttons" -msgstr "" - -msgid "Published by" -msgstr "" - -msgid "Quick Boot" -msgstr "Szybkie ladowanie" - -msgid "Random Directory Music" -msgstr "" - -msgid "Reading WAD data... Ok!" -msgstr "Odczyt danych WAD...Ok!" - -msgid "Receiving file from:" -msgstr "Otrzymywanie pliku z:" - -msgid "Region Patch" -msgstr "" - -msgid "Released" -msgstr "" - -msgid "Reload SD" -msgstr "Przeladuj SD" - -msgid "Remove update" -msgstr "" - -msgid "Rename Game on WBFS" -msgstr "Zmien tytul gry na WBFS" - -msgid "Reset" -msgstr "" - -msgid "Reset BG Music" -msgstr "" - -msgid "Reset Playcounter" -msgstr "Zrestartuj licznik" - -msgid "Reset to default BGM?" -msgstr "" - -msgid "Restarting..." -msgstr "Restartowanie..." - -msgid "Return" -msgstr "Powrot" - -msgid "Return To" -msgstr "" - -msgid "Return to Wii Menu" -msgstr "Powrot do Wii Menu" - -msgid "Right" -msgstr "Prawo" - -msgid "Rumble" -msgstr "Wibracje" - -msgid "SChinese" -msgstr "uproszczony chinski" - -msgid "SFX Volume" -msgstr "Poziom glosnosci SFX" - -msgid "Save" -msgstr "Zapisz" - -msgid "Save Failed. No device inserted?" -msgstr "" - -msgid "Save Game List to" -msgstr "Zapisz liste gier do" - -msgid "Save List" -msgstr "" - -msgid "Saved" -msgstr "Zapisano" - -msgid "Screensaver" -msgstr "Wygaszacz ekranu" - -msgid "Select" -msgstr "Wybierz" - -msgid "Select DOL Offset" -msgstr "" - -msgid "Select a DOL" -msgstr "Wybierz plik DOL" - -msgid "Select a DOL from Game" -msgstr "" - -msgid "Sept" -msgstr "Wrzesien" - -msgid "Set Search-Filter" -msgstr "Ustaw filtr wyszukiwania" - -msgid "Settings" -msgstr "Ustawienia" - -msgid "Show Free Space" -msgstr "" - -msgid "Shutdown System" -msgstr "Wylacz" - -msgid "Shutdown Wii" -msgstr "" - -msgid "Sort alphabetically" -msgstr "Sortuj alfabetycznie" - -msgid "Sort by number of players" -msgstr "" - -msgid "Sort by rank" -msgstr "Sortuj wzgledem rankingu" - -msgid "Sort order by most played" -msgstr "Sortuj wg. liczby uruchomien" - -msgid "Sound" -msgstr "Dzwiek" - -msgid "Sound Settings" -msgstr "" - -msgid "Sound+BGM" -msgstr "Dzwieki i muzyka w tle" - -msgid "Sound+Quiet" -msgstr "Dzwieki i cisza" - -msgid "Spanish" -msgstr "hiszpanski" - -msgid "Special thanks to:" -msgstr "Specjalne podziekowania" - -msgid "Split each 2GB" -msgstr "" - -msgid "Split each 4GB" -msgstr "" - -msgid "Standby" -msgstr "" - -msgid "Success" -msgstr "Sukces" - -msgid "Success:" -msgstr "Sukces:" - -msgid "Successfully Saved" -msgstr "Pomyslnie zapisano" - -msgid "Successfully Updated" -msgstr "Pomyslnie zaktualizowano" - -msgid "Successfully Updated thanks to www.techjawa.com" -msgstr "" - -msgid "Successfully deleted:" -msgstr "Pomyslnie usunieto" - -msgid "Successfully extracted theme." -msgstr "Pomyslnie rozpakowano temat." - -msgid "Successfully installed:" -msgstr "Pomyslnie zainstalowano:" - -msgid "Sync FAT32 FS Info" -msgstr "" - -msgid "Synchronizing..." -msgstr "" - -msgid "System Default" -msgstr "Domyslne ustawienia systemowe" - -msgid "TChinese" -msgstr "chinski" - -msgid "TXT Cheatcodes Path" -msgstr "Sciezka kodow TXT" - -msgid "The .them file was not found in the zip." -msgstr "" - -msgid "The entered directory does not exist. Would you like to create it?" -msgstr "Katalog nie istnieje. Utworzyc?" - -msgid "The game installation is disabled under this IOS because of instability in usb write." -msgstr "" - -msgid "The wad file was installed" -msgstr "" - -#, c-format -msgid "The wad installation failed with error %i" -msgstr "" - -msgid "Theme Downloader" -msgstr "Pobieranie tematow" - -msgid "Theme Menu" -msgstr "" - -msgid "Theme Path" -msgstr "Sciezka skorek" - -msgid "Theme Title:" -msgstr "Tytul:" - -msgid "Themes by www.spiffy360.com" -msgstr "" - -msgid "This IOS is the BootMii ios. If you are sure it is not BootMii and you have something else installed there than ignore this warning." -msgstr "" - -msgid "This IOS was not found on the titles list. If you are sure you have it installed than ignore this warning." -msgstr "" - -msgid "Time left:" -msgstr "Czas pozostaly" - -msgid "Title Launcher" -msgstr "Uruchom tytul" - -msgid "Titles from WiiTDB" -msgstr "Tytuly z pliku WiiTDB" - -msgid "Tooltips" -msgstr "Chmurki z podpowiedziami" - -msgid "Transfer failed" -msgstr "" - -msgid "USB Device not found" -msgstr "Nie znaleziono urzadzenia USB" - -msgid "USB Loader GX is protected" -msgstr "USB Loader GX zabezpieczony" - -msgid "USB Port" -msgstr "" - -msgid "USB Port changing is only supported on Hermes cIOS." -msgstr "" - -msgid "Uninstall" -msgstr "Odinstaluj" - -msgid "Uninstall Game" -msgstr "Odinstaluj gre" - -msgid "Uninstall Menu" -msgstr "Odinstaluj Menu" - -msgid "Uninstall all" -msgstr "" - -msgid "Uninstalling wad" -msgstr "Odinstalowywanie wad" - -msgid "Unknown" -msgstr "" - -msgid "Unlock USB Loader GX" -msgstr "" - -msgid "Unlocked" -msgstr "Odblokowano" - -msgid "Unsupported format, try to extract manually TempTheme.zip." -msgstr "" - -msgid "Update" -msgstr "Aktualizacja" - -msgid "Update All" -msgstr "Zaktualizuj wszystko" - -msgid "Update DOL" -msgstr "Zaktualizuj Dol" - -msgid "Update Files" -msgstr "Zaktualizuj pliki" - -msgid "Update Path" -msgstr "Sciezka aktualizacji" - -msgid "Update all Language Files" -msgstr "Zaktualizuj wszystkie pliki jezykowe" - -msgid "Update failed" -msgstr "Nie udalo sie zaktualizowac" - -msgid "Update successfull" -msgstr "" - -msgid "Updating Language Files:" -msgstr "Aktualizacja plikow jezykowych:" - -msgid "Uploaded ZIP file installed to homebrew directory." -msgstr "Wyslany plik ZIP zainstalowano w katalogu homebrew" - -msgid "VIDTV Patch" -msgstr "" - -msgid "Version:" -msgstr "" - -#, c-format -msgid "Version: %s" -msgstr "Wersja: %s" - -msgid "Video Mode" -msgstr "Tryb video" - -msgid "WDM Files Path" -msgstr "" - -msgid "WIP Patches Path" -msgstr "Sciezka patchy WIP" - -msgid "Waiting..." -msgstr "Oczekiwanie..." - -msgid "Warning:" -msgstr "" - -msgid "What do you want to update?" -msgstr "Rodzaj aktualizacji" - -msgid "What should be deleted for this game title:" -msgstr "" - -msgid "WiFi Features" -msgstr "Opcje WiFi" - -msgid "Widescreen Fix" -msgstr "Popraw ekran panoramiczny" - -msgid "Wii Menu" -msgstr "" - -msgid "Wii Settings" -msgstr "Opcje Wii" - -msgid "WiiTDB Files" -msgstr "WiiTDB" - -msgid "WiiTDB Path" -msgstr "Sciezka WiiTDBPath" - -msgid "WiiTDB is up to date." -msgstr "" - -msgid "Wiilight" -msgstr "Dioda Wii" - -msgid "Wrong Password" -msgstr "Bledne haslo" - -msgid "Yes" -msgstr "Tak" - -msgid "You are currently using IOS" -msgstr "" - -msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." -msgstr "" - -msgid "You need to select or format a partition" -msgstr "Musisz wybrac, lub sformatowac partycje" - -msgid "and translators for language files updates" -msgstr "" - -msgid "available" -msgstr "dostepne" - -msgid "does not exist!" -msgstr "nie istnieje!" - -msgid "does not exist! Loading game without cheats." -msgstr "nie istnieje! ladowanie gry bez kodow." - -msgid "files left" -msgstr "pozostalo" - -msgid "for FAT/NTFS support" -msgstr "za pomoc przy FAT/NTFS" - -msgid "for Ocarina" -msgstr "dla Ocarina" - -msgid "for WiiTDB and hosting covers / disc images" -msgstr "za WiiTDB i hostowanie okladek/obrazkow plyt" - -msgid "for diverse patches" -msgstr "za rozne poprawki" - -msgid "for his awesome tool LibWiiGui" -msgstr "za jego niesamowite narzedzie LibWiiGui" - -msgid "for hosting the themes" -msgstr "za hosting tematow" - -msgid "for hosting the update files" -msgstr "za hostowanie plikow aktualizacji" - -msgid "for the USB Loader source" -msgstr "za zrodla USB Loader" - -msgid "formatted!" -msgstr "sformatowano" - -msgid "free" -msgstr "wolnego" - -msgid "not set" -msgstr "nie ustawiono" - -msgid "of" -msgstr "z" - -msgid "seconds left" -msgstr "sekund pozostalo" - -#~ msgid "Author:" -#~ msgstr "Autor: " - -#~ msgid "Download Boxart image?" -#~ msgstr "Pobrac obrazki box?" - -#~ msgid "Download Discart image?" -#~ msgstr "Pobrac obrazki plyt?" - -#~ msgid "Downloading file" -#~ msgstr "Pobieranie pliku" - -#~ msgid "Missing files" -#~ msgstr "Brakuje plikow" - -#~ msgid "files not found on the server!" -#~ msgstr "nie znaleziono na serwerze" - -#~ msgid "Disc Images" -#~ msgstr "Obrazki plyt" - -#~ msgid "Only Customs" -#~ msgstr "Tylko nieoryginalne" - -#~ msgid "Only Original" -#~ msgstr "Tylko oryginalne" - -#~ msgid "Do you really want to delete:" -#~ msgstr "Na pewno usunac: " - -#~ msgid "Do you want to use the alternate DOL that is known to be correct?" -#~ msgstr "Uzyc alternatywnego pliku DOL?" - -#~ msgid "BETA revisions" -#~ msgstr "Wersje beta" - -#~ msgid "Unlock console to use this option." -#~ msgstr "Odblokuj konsole, aby uzyc tej opcji" - -#~ msgid "Full Shutdown" -#~ msgstr "Pelne zamkniecie" - -#~ msgid "GXtheme.cfg not found in any subfolder." -#~ msgstr "Nie znaleziono pliku GXtheme.cfg" - -#~ msgid "If you don't have WiFi, press 1 to get an URL to get your WiiTDB.zip" -#~ msgstr "JeSli nie masz WiFi, wcisnij 1 aby otrzymac adres skad pobrac WiiTDB.zip" - -#~ msgid "Paste it into your browser to get your WiiTDB.zip." -#~ msgstr "Wklej adres do przegladarki, aby pobrac WiiTDB.zip" - -#~ msgid "Shutdown to Idle" -#~ msgstr "Przelacz w stan oczekiwania" - -#~ msgid "Your URL has been saved in %sWiiTDB_URL.txt." -#~ msgstr "Adres zostal zapisany w pliku %sWiiTDB_URL.txt." - -#~ msgid "Can't create file" -#~ msgstr "Nie mozna utworzyc pliku" - -#~ msgid "Connection lost..." -#~ msgstr "Utracono polaczenie..." - -#~ msgid "Download failed." -#~ msgstr "Nie udalo sie pobrac" - -#~ msgid "Download request failed." -#~ msgstr "Prosba pobierania nieudana" - -#~ msgid "Downloading Page List:" -#~ msgstr "Pobieranie listy stron:" - -#~ msgid "Theme Download Path" -#~ msgstr "Sciezka tematow" - -#~ msgid "Transfer failed." -#~ msgstr "Niepowodzenie." - -#~ msgid "Unsupported format, try to extract manually." -#~ msgstr "Niewspierany format, sprobuj rozpakowac recznie" - -#~ msgid "and translaters for language files updates" -#~ msgstr "i tlumaczon za aktualizacjie plikow jezykowych" - -#~ msgid "Insert an SD-Card to save." -#~ msgstr "Wloz karte SD, aby zapisac" - -#~ msgid "Insert an SD-Card to use this option." -#~ msgstr "Wloz karte SD, aby uzyc tej opcji" - -#~ msgid "No SD-Card inserted!" -#~ msgstr "Nie wlozono karty SD!" - -#~ msgid "Waiting for USB Device" -#~ msgstr "Oczekiwanie na urzadzenie USB" - -#~ msgid "Back to Loader" -#~ msgstr "Powrot do HBC" - -#~ msgid "FAT: Use directories" -#~ msgstr "FAT: uzyj katalogow" - -#~ msgid "All partitions" -#~ msgstr "Wszystkie partycje" - -#~ msgid "Game partition" -#~ msgstr "Partycje z grami" - -#~ msgid "Install 1:1 Copy" -#~ msgstr "Zainstaluj kopie 1:1" - -#~ msgid "An Error occured" -#~ msgstr "Wystapil blad" - -#~ msgid "Are you sure you want to enable Parent Control?" -#~ msgstr "Czy na pewno wlaczyc kontrole rodzicielska?" - -#~ msgid "AutoPatch" -#~ msgstr "Automatyczny patch" - -#~ msgid "Checking for Updates" -#~ msgstr "Sprawdzanie aktualizacji" - -#~ msgid "Downloading" -#~ msgstr "Trwa pobieranie" - -#~ msgid "Invalid PIN code" -#~ msgstr "Bledny kod PIN" - -#~ msgid "Parental Control disabled" -#~ msgstr "Kontrola rodzicielska wylaczona" - -#~ msgid "The wad file was installed. But It could not be deleted from the SD card." -#~ msgstr "Zainstalowano plik wad, ale nie mozna go usunac z karty SD" - -#~ msgid "The wad installation failed with error %ld" -#~ msgstr "Instalacja wad zakonczona bledek %ld" - -#~ msgid "Unable to open the wad that was just downloaded (%s)." -#~ msgstr "Nie udalo sie zainstalowac dopiero co pobranego pliku (%s)" - -#~ msgid "Unlock Parental Control" -#~ msgstr "Odblokuj kontrole rodzicielska" - -#~ msgid "Update to" -#~ msgstr "Aktualizuj do" - -#~ msgid "Updating" -#~ msgstr "Aktualizowanie" - -#~ msgid "Updating Language Files..." -#~ msgstr "Aktualizacja plikow jezykowych..." - -#~ msgid "Updating WiiTDB.zip" -#~ msgstr "Aktualizacja WiiTDB.zip" - -#~ msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." -#~ msgstr "Nie masz wlaczonej kontroli rodzicielskiej. Jesli chcesz jej uzywac, uruchom ja w ustawieniach Wii." - -#~ msgid "%s : %s May not boot correctly if your System Menu is not up to date." -#~ msgstr "%s : %s Moze nie ladowac sie poprawnie, jesli nie masz aktualnego menu systemowego" - -#~ msgid "BCA Codes Path changed" -#~ msgstr "Zmieniono sciezke kodow BCA" - -#~ msgid "Back to Wii Menu" -#~ msgstr "Powrit do Wii Menu" - -#~ msgid "Channels" -#~ msgstr "Kanaly" - -#~ msgid "Checking existing artwork" -#~ msgstr "Sprawdzam istniejace prace graficzne" - -#~ msgid "Confirm" -#~ msgstr "Potwierdz" - -#~ msgid "Could not find a WBFS partition." -#~ msgstr "Nie znaleziono partycji WBFS" - -#~ msgid "Could not open WBFS partition" -#~ msgstr "Nie udalo sie otworzyc partycji WBFS" - -#~ msgid "Could not read the disc." -#~ msgstr "Nie mozna odczytac dysku" - -#~ msgid "Could not set USB." -#~ msgstr "Nie mozna ustawic USB" - -#~ msgid "Cover Path Changed" -#~ msgstr "Sciezka do okladek zostala zmieniona" - -#~ msgid "DOL path changed" -#~ msgstr "Zmieniono sciezke plikow .DOL" - -#~ msgid "Disc Path Changed" -#~ msgstr "Sciezka do dysku zmieniona" - -#~ msgid "Display favorites" -#~ msgstr "Pokaz ulubione" - -#~ msgid "Do you want to retry for 30 secs?" -#~ msgstr "Powtorzyc za 30 sec?" - -#~ msgid "Enable Parental Control" -#~ msgstr "Wlacz kontrole rodzicielska" - -#~ msgid "Force" -#~ msgstr "Wymuc" - -#~ msgid "GCT Cheatcodes Path changed" -#~ msgstr "Sciezka kodow GCT zmienona" - -#~ msgid "Homebrew Appspath changed" -#~ msgstr "Sciezka aplikacji homebrew zmieniona" - -#~ msgid "Insert an SD-Card to download images." -#~ msgstr "Wloz karte SD, aby pobrac obrazki" - -#~ msgid "Install not possible" -#~ msgstr "Nie mozna zainstalowac" - -#~ msgid "Most likely it has dimensions that are not evenly divisible by 4." -#~ msgstr "Prawdopodobnie rozdzielczosc nie jest podzielna przez 4" - -#~ msgid "Network init error" -#~ msgstr "Problem inicjalizacji sieci" - -#~ msgid "No .dol or .elf files found." -#~ msgstr "Nie znaleziono plikow .dol ani .elf" - -#~ msgid "No Favorites" -#~ msgstr "Brak ulubionych" - -#~ msgid "No USB Device" -#~ msgstr "Nie wykryto urzadzenia USB" - -#~ msgid "No USB Device found." -#~ msgstr "Nie wykryto urzadzenia USB" - -#~ msgid "No WBFS or FAT/NTFS partition found" -#~ msgstr "Nie znaleziono partycji WBFS, ani FAT/NTFS" - -#~ msgid "Normal Covers" -#~ msgstr "Standardowe okladki" - -#~ msgid "Not Found" -#~ msgstr "Nie znaleziono" - -#~ msgid "Not a DOL/ELF file." -#~ msgstr "To nie jest plik DOL/ELF" - -#~ msgid "Save Failed" -#~ msgstr "Nie udalo sie zapisac" - -#~ msgid "Selected DOL" -#~ msgstr "Wybrano plik DOL" - -#~ msgid "Standard" -#~ msgstr "Standardowe" - -#~ msgid "TXT Cheatcodes Path changed" -#~ msgstr "Sciezka kodow TXT zmienona" - -#~ msgid "Theme Download Path changed" -#~ msgstr "Zmieniono sciezke tematow" - -#~ msgid "Theme Path Changed" -#~ msgstr "Zmieniono sciezke skorek" - -#~ msgid "USB Loader GX will only run with Hermes CIOS rev 4! Please make sure you have revision 4 installed!" -#~ msgstr "USB Loader GX dziala tylko z Hermes CIOS rev 4! Upewnij sie czy masz zainstalowana wersje 4!" - -#~ msgid "Update Path changed." -#~ msgstr "Zmieniono Sciezke aktualizacji" - -#~ msgid "WIP Patches Path changed" -#~ msgstr "Zmieniono sciezke patchy WIP" - -#~ msgid "WiiTDB Path changed." -#~ msgstr "Sciezka WiiTDBPath zmieniona" - -#~ msgid "You are about to delete " -#~ msgstr "Zamierzasz usunac" - -#~ msgid "You are choosing to display favorites and you do not have any selected." -#~ 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 "Uzywasz partycji NTFS. Instalacja gier na tej partycji nie jest mozliwa." - -#~ msgid "You have attempted to load a bad image" -#~ msgstr "Probujesz zaladowac zly obraz" - -#~ msgid "does not exist! You Messed something up, Idiot." -#~ msgstr "Nie istnieje! Cos zepsules" - -#~ msgid "file left" -#~ msgstr "pozostalo" diff --git a/Languages/portuguese_br.lang b/Languages/portuguese_br.lang deleted file mode 100644 index 56c35eb3..00000000 --- a/Languages/portuguese_br.lang +++ /dev/null @@ -1,1809 +0,0 @@ -# USB Loader GX language source file. -# portuguese_br.lang - r921 -# don't delete/change this line (é). -msgid "" -msgstr "" -"Project-Id-Version: USB Loader GX\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-06 19:36+0100\n" -"PO-Revision-Date: 2009-10-23 18:52+0200\n" -"Last-Translator: aniemotion\n" -"Language-Team: boto12, aniemotion\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -msgid " Wad Saved as:" -msgstr " Wad salvo como:" - -msgid " could not be downloaded." -msgstr " não foi baixado." - -msgid " has been Saved. The text has not been verified. Some of the code may not work right with each other. If you experience trouble, open the text in a real text editor for more information." -msgstr " foi salvo. O texto não foi verificado. Parte do código pode não funcionar corretamente. Se detectar algum problema, abra o texto com um editor de texto para mais informações." - -msgid " is not on the server." -msgstr " não está no servidor." - -#, c-format -msgid "%i files not found on the server!" -msgstr "" - -#, c-format -msgid "%i missing files" -msgstr "" - -msgid "0 (Everyone)" -msgstr "0 (Todos)" - -msgid "1 (Child 7+)" -msgstr "1 (Crianças 7+)" - -msgid "1 hour" -msgstr "1 hora" - -msgid "10 min" -msgstr "10 minutos" - -msgid "2 (Teen 12+)" -msgstr "2 (Adolescente 12+)" - -msgid "20 min" -msgstr "20 minutos" - -msgid "2D Cover Path" -msgstr "Pasta Capas 2D" - -msgid "3 (Mature 16+)" -msgstr "3 (Adulto 16+)" - -msgid "3 min" -msgstr "3 minutos" - -msgid "30 min" -msgstr "30 minutos" - -msgid "3D Cover Path" -msgstr "Pasta Capas 3D" - -msgid "3D Covers" -msgstr "Capas 3D" - -msgid "4 (Adults Only 18+)" -msgstr "4 (Adultos 18+)" - -msgid "5 min" -msgstr "5 minutos" - -msgid ">> Deleting tickets..." -msgstr ">> Eliminando tickets..." - -msgid ">> Deleting tickets...ERROR! " -msgstr ">> Eliminando tickets... ERRO! " - -msgid ">> Deleting tickets...Ok! " -msgstr ">> Eliminando tickets... Ok! " - -msgid ">> Deleting title ...ERROR! " -msgstr ">> Eliminando título... ERRO! " - -msgid ">> Deleting title ...Ok!" -msgstr ">> Eliminando título... Ok!" - -msgid ">> Deleting title contents..." -msgstr ">> Eliminando conteúdos do título..." - -msgid ">> Deleting title contents...ERROR! " -msgstr ">> Eliminando conteúdos do título... ERRO! " - -msgid ">> Deleting title contents...Ok!" -msgstr ">> Eliminando conteúdos do título... Ok!" - -msgid ">> Deleting title..." -msgstr ">> Eliminando título..." - -msgid ">> Finishing installation..." -msgstr ">> Terminando instalação..." - -msgid ">> Installing content #" -msgstr ">> Instalando conteúdo #" - -msgid ">> Installing ticket..." -msgstr ">> Instalando ticket..." - -msgid ">> Installing title..." -msgstr ">> Instalando título..." - -msgid ">> Reading WAD data..." -msgstr ">> Lendo arquivo WAD..." - -msgid ">> Reading WAD data...ERROR! " -msgstr ">> Lendo arquivo WAD... ERRO!" - -msgid ">> Reading WAD data...Ok!" -msgstr ">> Lendo arquivo WAD... Ok!" - -msgid "AUTO" -msgstr "" - -msgid "All Partitions" -msgstr "" - -msgid "All images downloaded successfully." -msgstr "" - -msgid "All the features of USB Loader GX are unlocked." -msgstr "As configurações estão desbloqueadas." - -msgid "Alternate DOL" -msgstr "DOL alternativo" - -msgid "Anti" -msgstr "" - -msgid "App Language" -msgstr "Idioma" - -msgid "Apply" -msgstr "" - -msgid "Apr" -msgstr "Abr" - -msgid "Are you sure you want to lock USB Loader GX?" -msgstr "" - -msgid "Are you sure you want to reset?" -msgstr "" - -msgid "Are you sure?" -msgstr "Tem certeza?" - -msgid "Aug" -msgstr "Ago" - -msgid "Author(s):" -msgstr "" - -msgid "AutoInit Network" -msgstr "Auto-iniciar Rede" - -msgid "Automatic port switching is done on the fly. You need to change all custom paths to SD-Card first for this option or else it could damage a filesystem." -msgstr "" - -msgid "BCA Codes Path" -msgstr "Caminho do BCA Codes" - -msgid "Back" -msgstr "Voltar" - -msgid "Back to HBC or Wii Menu" -msgstr "Voltar ao Loader/Menu do Wii" - -msgid "Backgroundmusic" -msgstr "Música de fundo" - -msgid "Big thanks to:" -msgstr "Agradecimentos:" - -msgid "Block Cover Downloads" -msgstr "" - -msgid "Block Custom Paths" -msgstr "" - -msgid "Block Game Install" -msgstr "" - -msgid "Block Game Settings" -msgstr "" - -msgid "Block GameID Change" -msgstr "" - -msgid "Block Global Settings" -msgstr "" - -msgid "Block Gui Settings" -msgstr "" - -msgid "Block HBC Menu" -msgstr "" - -msgid "Block IOS Reload" -msgstr "Bloquear reload do IOS" - -msgid "Block Loader Settings" -msgstr "" - -msgid "Block Parental Settings" -msgstr "" - -msgid "Block Reset Settings" -msgstr "" - -msgid "Block Sound Settings" -msgstr "" - -msgid "Block Theme Downloader" -msgstr "" - -msgid "Block Theme Menu" -msgstr "" - -msgid "Block Title Launcher" -msgstr "" - -msgid "Block Updates" -msgstr "" - -msgid "Boot/Standard" -msgstr "Carregar/Standard" - -msgid "Boot?" -msgstr "Carregar?" - -msgid "Both" -msgstr "Ambos" - -msgid "Both Ports" -msgstr "" - -msgid "Can't be formatted" -msgstr "Não pode pode ser formatado" - -msgid "Can't create directory" -msgstr "Não foi possível criar a pasta" - -#, c-format -msgid "Can't create path: %s" -msgstr "" - -msgid "Can't delete:" -msgstr "Não foi possível apagar:" - -msgid "Cancel" -msgstr "Cancelar" - -msgid "Cannot write to destination." -msgstr "" - -msgid "Change Play Path" -msgstr "Alterar Caminho para Play" - -msgid "Cheatfile is blank" -msgstr "arquivo de truques vazio" - -msgid "Clear" -msgstr "" - -msgid "Click to Download Covers" -msgstr "Aperte para baixar capas" - -msgid "Click to change game ID" -msgstr "Alterar o ID do jogo" - -msgid "Clock" -msgstr "Relógio" - -msgid "Close" -msgstr "Fechar" - -msgid "Code Download" -msgstr "Download de Código" - -#, c-format -msgid "Coded by: %s" -msgstr "Programado por: %s" - -msgid "Coding:" -msgstr "Desenvolvimento:" - -msgid "Connection to server timed out." -msgstr "" - -msgid "Console" -msgstr "Configuração" - -msgid "Console Default" -msgstr "Configurações padrões" - -msgid "Console Locked" -msgstr "Configuração Bloqueada" - -msgid "Console must be unlocked for this option." -msgstr "" - -msgid "Console should be unlocked to modify it." -msgstr "É necessário desbloquear a configuração para poder modificar o parâmetro." - -msgid "Continue to install game?" -msgstr "Continuar instalação do jogo?" - -msgid "Controllevel" -msgstr "Nível de Controle" - -msgid "Correct Password" -msgstr "Password Correto" - -msgid "Could not connect to the server." -msgstr "" - -msgid "Could not create GCT file" -msgstr "Não foi possível criar o arquivo GCT" - -#, c-format -msgid "Could not create path: %s" -msgstr "" - -msgid "Could not find info for this game in the wiitdb.xml." -msgstr "" - -msgid "Could not initialize DIP module!" -msgstr "Não foi possível inicializar o módulo DIP!" - -msgid "Could not initialize network!" -msgstr "Não foi possível incializar a Ligação de Rede!" - -msgid "Could not open Disc" -msgstr "Não foi possível abrir o Disco" - -msgid "Could not open wiitdb.xml." -msgstr "" - -msgid "Could not save." -msgstr "Não foi possível gravar." - -msgid "Cover Download" -msgstr "Download de Capas" - -msgid "Create" -msgstr "Criar" - -msgid "Credits" -msgstr "Créditos" - -msgid "Custom Discarts" -msgstr "" - -msgid "Custom Paths" -msgstr "Personalização de Pastas" - -msgid "Customs/Original" -msgstr "Alternativas/Originais" - -msgid "DOL Path" -msgstr "Pasta DOL" - -msgid "Dec" -msgstr "Dez" - -msgid "Default" -msgstr "Padrão" - -msgid "Default Gamesettings" -msgstr "Configuração do Jogo padrão" - -msgid "Default Settings" -msgstr "Configurações padrões" - -msgid "Delete" -msgstr "Eliminar" - -msgid "Delete ?" -msgstr "Eliminar ?" - -msgid "Delete Cheat GCT" -msgstr "Eliminar GCT Truques" - -msgid "Delete Cheat TXT" -msgstr "Eliminar TXT Truques" - -msgid "Delete Cover Artwork" -msgstr "Eliminar Capas" - -msgid "Delete Disc Artwork" -msgstr "Eliminar Img. Disco" - -msgid "Design:" -msgstr "Desenho:" - -msgid "Developed by" -msgstr "Desenvolvido por" - -msgid "Directory does not exist!" -msgstr "Diretorio não existe!" - -msgid "Disc Artwork Download" -msgstr "Baixar Imagens Disco" - -msgid "Disc Artwork Path" -msgstr "Pasta Imagens Disco" - -msgid "Disc Default" -msgstr "Disco Padrão" - -msgid "DiskFlip" -msgstr "Voltar Disco" - -msgid "Display" -msgstr "Mostrar" - -msgid "Display as a carousel" -msgstr "Mostrar como carrossel" - -msgid "Display as a grid" -msgstr "Mostrar como grelha" - -msgid "Display as a list" -msgstr "Mostrar como lista" - -msgid "Display favorites only" -msgstr "" - -msgid "Do you want to apply it now?" -msgstr "Deseja aplicar agora?" - -msgid "Do you want to apply this theme?" -msgstr "" - -msgid "Do you want to change language?" -msgstr "Deseja alterar o idioma?" - -msgid "Do you want to download this theme?" -msgstr "Deseja baixar este tema?" - -msgid "Do you want to format:" -msgstr "Deseja FORMATAR:" - -msgid "Do you want to load the default theme?" -msgstr "" - -msgid "Do you want to sync free space info sector on all FAT32 partitions?" -msgstr "" - -msgid "Do you wish to update/download all language files?" -msgstr "Deseja atualizar todos os arquivos de idioma?" - -msgid "Done!" -msgstr "Concluído!" - -msgid "Download" -msgstr "Baixar" - -msgid "Download Now" -msgstr "Baixar agora" - -msgid "Download finished" -msgstr "Download Terminado" - -msgid "Downloading 3D Covers" -msgstr "" - -msgid "Downloading Flat Covers" -msgstr "" - -msgid "Downloading Full HQ Covers" -msgstr "" - -msgid "Downloading Full LQ Covers" -msgstr "" - -msgid "Downloading custom Discarts" -msgstr "" - -msgid "Downloading file..." -msgstr "" - -msgid "Downloading image:" -msgstr "Baixando imagem:" - -msgid "Downloading original Discarts" -msgstr "" - -msgid "Downloading pagelist:" -msgstr "" - -msgid "Dutch" -msgstr "Holandês" - -msgid "ERROR" -msgstr "ERRO" - -msgid "ERROR:" -msgstr "ERRO:" - -msgid "ERROR: Can't set up theme." -msgstr "ERRO: Impossível aplicar tema" - -msgid "English" -msgstr "Inglês" - -msgid "Error" -msgstr "Erro" - -msgid "Error !" -msgstr "Erro !" - -msgid "Error 002 fix" -msgstr "Correção Erro 002" - -#, c-format -msgid "Error creating path: %s" -msgstr "" - -msgid "Error opening downloaded file" -msgstr "" - -msgid "Error reading Disc" -msgstr "Erro ao ler o Disco" - -#, c-format -msgid "Error when downloading file: %i" -msgstr "" - -msgid "Error while downloding file" -msgstr "" - -msgid "Error while opening the zip." -msgstr "" - -msgid "Error while transfering data." -msgstr "Erro na transferência de dados." - -msgid "Error while updating USB Loader GX." -msgstr "" - -msgid "Error writing the data." -msgstr "" - -msgid "Error..." -msgstr "Erro..." - -msgid "Error:" -msgstr "Erro:" - -msgid "Exit" -msgstr "" - -msgid "Exit to where?" -msgstr "" - -msgid "Extracting files..." -msgstr "Extraindo arquivos..." - -msgid "Failed formating" -msgstr "Falha ao formatar" - -msgid "Failed to extract." -msgstr "Falha ao extrair" - -msgid "Failed to open partition" -msgstr "Falha ao abrir partição" - -msgid "Failed updating" -msgstr "" - -msgid "Feb" -msgstr "Fev" - -msgid "File not found." -msgstr "Arquivo não encontrado." - -#, c-format -msgid "Filesize is %i Byte." -msgstr "" - -msgid "Filesize is 0 Byte." -msgstr "" - -msgid "Finishing installation... Ok!" -msgstr "Terminando instalação... Ok!" - -msgid "Flat Covers" -msgstr "" - -msgid "Flip-X" -msgstr "Paginação Horizontal" - -msgid "Force NTSC" -msgstr "" - -msgid "Force PAL50" -msgstr "" - -msgid "Force PAL60" -msgstr "" - -msgid "Format" -msgstr "Formatar" - -msgid "Formatting, please wait..." -msgstr "Formatando, por favor aguarde..." - -msgid "Found missing images." -msgstr "" - -msgid "Free Space" -msgstr "Espaço Livre" - -msgid "French" -msgstr "Francês" - -msgid "Full Cover Path" -msgstr "" - -msgid "Full HQ Covers" -msgstr "" - -msgid "Full LQ Covers" -msgstr "" - -msgid "Full Menu" -msgstr "" - -msgid "Full shutdown" -msgstr "" - -msgid "GAMEID_Gamename" -msgstr "" - -msgid "GCT Cheatcodes Path" -msgstr "Pasta Truques" - -msgid "GCT File created" -msgstr "Arquivo GCT criado" - -msgid "GUI Settings" -msgstr "Definições de Interface" - -msgid "Game ID" -msgstr "ID do Jogo" - -msgid "Game IOS" -msgstr "" - -msgid "Game Language" -msgstr "Idioma" - -msgid "Game Load" -msgstr "Carregando Jogos" - -msgid "Game Lock" -msgstr "" - -msgid "Game Only" -msgstr "" - -msgid "Game Region" -msgstr "Região" - -msgid "Game Size" -msgstr "Tamanho do Jogo" - -msgid "Game Sound Mode" -msgstr "Modo de Som do Jogo" - -msgid "Game Sound Volume" -msgstr "Volume dos Sons dos Jogos" - -msgid "Game Split Size" -msgstr "" - -msgid "Game is already installed:" -msgstr "Este jogo já está instalado:" - -msgid "Game/Install Partition" -msgstr "" - -msgid "Gamename [GAMEID]" -msgstr "Nome do Jogo [GAMEID]" - -msgid "Games" -msgstr "Jogos" - -msgid "Genre:" -msgstr "" - -msgid "German" -msgstr "Alemão" - -msgid "Global Settings" -msgstr "" - -msgid "HOME Menu" -msgstr "Menu Inicial" - -msgid "Homebrew Apps Path" -msgstr "Pasta Apps Homebrew" - -msgid "Homebrew Channel" -msgstr "" - -msgid "Homebrew Launcher" -msgstr "Launcher Homebrew" - -msgid "Hour" -msgstr "Horas" - -msgid "How do you want to update?" -msgstr "Como pretende atualizar o programa?" - -msgid "How to Shutdown?" -msgstr "Como desligar?" - -#, c-format -msgid "Incoming file %0.2fKB" -msgstr "Recebendo arquivo %0.2fKB" - -#, c-format -msgid "Incoming file %0.2fMB" -msgstr "Recebendo arquivo %0.2fMB" - -msgid "Initializing Network" -msgstr "Inicializando a Rede" - -msgid "Insert Disk" -msgstr "Insira o Disco" - -msgid "Insert a Wii Disc!" -msgstr "Insira um Disco do Wii!" - -msgid "Install" -msgstr "Instalar" - -msgid "Install Error!" -msgstr "Erro de Instalação!" - -msgid "Install a game" -msgstr "Instalar um jogo" - -msgid "Install directories" -msgstr "" - -msgid "Install partitions" -msgstr "Instalare partições" - -msgid "Installing content... Ok!" -msgstr "Instalando conteúdo... Ok!" - -msgid "Installing game:" -msgstr "Instalando jogo:" - -msgid "Installing ticket... Ok!" -msgstr "Instalando ticket... Ok!" - -msgid "Installing title... Ok!" -msgstr "Instalando título... Ok!" - -msgid "Installing wad" -msgstr "Instalando wad" - -msgid "Issue manager /" -msgstr "" - -msgid "It seems that you have some information that will be helpful to us. Please pass this information along to the DEV team." -msgstr "Parece que tem uma informação que pode ser útil. Por favor envie esta informação a nossa equipe de desenvolvimento." - -msgid "Italian" -msgstr "Italiano" - -msgid "Jan" -msgstr "" - -msgid "Japanese" -msgstr "Japonês" - -msgid "July" -msgstr "Jul" - -msgid "June" -msgstr "Jun" - -msgid "Keep" -msgstr "Manter" - -msgid "Keyboard" -msgstr "Teclado" - -msgid "Korean" -msgstr "Coreano" - -msgid "Language File" -msgstr "Idiomas" - -msgid "Language change:" -msgstr "Alteração de idioma:" - -msgid "Languagefiles Path" -msgstr "" - -msgid "Languagepath changed." -msgstr "Caminho para o arquivo de Idioma alterado." - -msgid "Left" -msgstr "Esquerda" - -msgid "Like SysMenu" -msgstr "Igual ao Menu do Wii" - -msgid "List on Gamelaunch" -msgstr "" - -msgid "Load" -msgstr "Carregar" - -msgid "Load From SD/USB" -msgstr "Carregar do SD/USB" - -#, c-format -msgid "Load file from: %s ?" -msgstr "Carregar arquivo de: %s ?" - -msgid "Load this DOL as alternate DOL?" -msgstr "Carregar este DOL como DOL alternativo?" - -msgid "Loader Settings" -msgstr "" - -msgid "Loading standard language." -msgstr "Carregado idioma padrão." - -msgid "Loading standard music." -msgstr "Carregando música padrão." - -msgid "Lock Console" -msgstr "Bloquear Configurações" - -msgid "Lock USB Loader GX" -msgstr "" - -msgid "Locked" -msgstr "Bloqueado" - -msgid "Loop Directory" -msgstr "Repitir Diretório" - -msgid "Loop Music" -msgstr "Repitir Música" - -msgid "Loop Sound" -msgstr "Repitir Som" - -msgid "Main tester:" -msgstr "" - -msgid "Mar" -msgstr "" - -msgid "Mark new games" -msgstr "Marcar games novos" - -msgid "May" -msgstr "Mai" - -msgid "Messageboard Update" -msgstr "" - -msgid "Motion+ Video" -msgstr "" - -msgid "Mount DVD drive" -msgstr "Carregar leitor DVD" - -msgid "Multiple Partitions" -msgstr "" - -msgid "Music Loop Mode" -msgstr "Modo Repetição de Música" - -msgid "Music Volume" -msgstr "Volume da Música" - -msgid "Neither" -msgstr "Nenhum" - -msgid "Network is not initiated." -msgstr "" - -msgid "New Disc Detected" -msgstr "Detectado Novo Disco" - -msgid "Next" -msgstr "Próximo" - -msgid "No" -msgstr "Não" - -msgid "No Cheatfile found" -msgstr "Arquivo de truques não encontrado" - -msgid "No DOL file found on disc." -msgstr "Não foi encontrado nenhum arquivo dol no disco" - -msgid "No Splitting" -msgstr "" - -msgid "No URL or Path specified." -msgstr "" - -msgid "No WBFS or FAT/NTFS/EXT partition found" -msgstr "" - -msgid "No cheats were selected" -msgstr "Nenhuma seleção de truques" - -msgid "No data could be read." -msgstr "Não foi possível ler dados." - -msgid "No favorites selected." -msgstr "" - -msgid "No file missing!" -msgstr "Faltando nenhum arquivo" - -msgid "No new updates." -msgstr "Não existem novas atualizações." - -msgid "No themes found on the site." -msgstr "Nenhum tema encontrado no site" - -msgid "No themes found." -msgstr "" - -msgid "None" -msgstr "Nenhum" - -msgid "Normal" -msgstr "" - -msgid "Not a WAD file." -msgstr "Não é um arquivo Wad" - -msgid "Not a Wii Disc" -msgstr "Não é um Disco do Wii" - -msgid "Not a valid URL" -msgstr "" - -msgid "Not a valid URL path" -msgstr "" - -msgid "Not a valid domain" -msgstr "" - -msgid "Not enough free memory." -msgstr "Não há memória livre suficiente." - -msgid "Not enough free space!" -msgstr "Não há espaço livre suficiente!" - -msgid "Not enough memory." -msgstr "" - -msgid "Not required" -msgstr "" - -msgid "Not supported format!" -msgstr "Formato não suportado!" - -msgid "Nov" -msgstr "" - -msgid "OFF" -msgstr "Desligado" - -msgid "OK" -msgstr "" - -msgid "ON" -msgstr "Ligado" - -msgid "Ocarina" -msgstr "" - -msgid "Oct" -msgstr "Out" - -msgid "Official Site:" -msgstr "Site Oficial:" - -msgid "Offset" -msgstr "" - -msgid "Only Game Partition" -msgstr "" - -msgid "Only for Install" -msgstr "Apenas na instalação" - -msgid "Original Discarts" -msgstr "" - -msgid "Original/Customs" -msgstr "Originais/Alternativas" - -msgid "Parental Control" -msgstr "Controle de Pais" - -msgid "Partition" -msgstr "Partição" - -msgid "Password" -msgstr "Senha" - -msgid "Password Changed" -msgstr "Senha Alterada" - -msgid "Password has been changed" -msgstr "A Senha foi alterada" - -msgid "Patch Country Strings" -msgstr "Patch Jogos Importados" - -msgid "Path Changed" -msgstr "" - -msgid "Permission denied." -msgstr "" - -msgid "Pick from a list" -msgstr "Escolher da lista" - -msgid "Play Count" -msgstr "Vezes jogadas" - -msgid "Play Next" -msgstr "Tocar Próximo" - -msgid "Play Once" -msgstr "Tocar uma só vez" - -msgid "Play Previous" -msgstr "Tocar Anteior" - -msgid "Playing Music:" -msgstr "Tocando a Música:" - -msgid "Please wait..." -msgstr "Por favor aguarde..." - -msgid "Power off the Wii" -msgstr "Desligar o Wii" - -msgid "Prev" -msgstr "Anterior" - -msgid "Prompts Buttons" -msgstr "Mensagens/Botões" - -msgid "Published by" -msgstr "Publicado por" - -msgid "Quick Boot" -msgstr "Inicialização Rápida" - -msgid "Random Directory Music" -msgstr "Diretótio Aleatório de Músicas" - -msgid "Reading WAD data... Ok!" -msgstr "Lendo dados do WAD... Ok!" - -msgid "Receiving file from:" -msgstr "Recebendo arquivo de:" - -msgid "Region Patch" -msgstr "" - -msgid "Released" -msgstr "Lançamento" - -msgid "Reload SD" -msgstr "Atualizar do cartão SD" - -msgid "Remove update" -msgstr "Remover atualização" - -msgid "Rename Game on WBFS" -msgstr "Alterar nome do jogo na partição WBFS" - -msgid "Reset" -msgstr "" - -msgid "Reset BG Music" -msgstr "Resetar Música de Fundo" - -msgid "Reset Playcounter" -msgstr "Limpar Contagem" - -msgid "Reset to default BGM?" -msgstr "" - -msgid "Restarting..." -msgstr "O Wii irá reiniciar" - -msgid "Return" -msgstr "Voltar" - -msgid "Return To" -msgstr "" - -msgid "Return to Wii Menu" -msgstr "Voltar ao Menu do Wii" - -msgid "Right" -msgstr "Direita" - -msgid "Rumble" -msgstr "Vibração" - -msgid "SChinese" -msgstr "Chinês Simplificado" - -msgid "SFX Volume" -msgstr "Volume dos Efeitos" - -msgid "Save" -msgstr "Gravar" - -msgid "Save Failed. No device inserted?" -msgstr "" - -msgid "Save Game List to" -msgstr "Gravar a lista dos jogos sobre" - -msgid "Save List" -msgstr "" - -msgid "Saved" -msgstr "Gravado" - -msgid "Screensaver" -msgstr "Proteção de tela" - -msgid "Select" -msgstr "selecionar" - -msgid "Select DOL Offset" -msgstr "" - -msgid "Select a DOL" -msgstr "Selecionar um DOL" - -msgid "Select a DOL from Game" -msgstr "" - -msgid "Sept" -msgstr "Set" - -msgid "Set Search-Filter" -msgstr "Usar filtro de busca" - -msgid "Settings" -msgstr "Configurações" - -msgid "Show Free Space" -msgstr "" - -msgid "Shutdown System" -msgstr "Desligar" - -msgid "Shutdown Wii" -msgstr "" - -msgid "Sort alphabetically" -msgstr "Ordenar por ordem alfabética" - -msgid "Sort by number of players" -msgstr "" - -msgid "Sort by rank" -msgstr "Ordenar por ranking" - -msgid "Sort order by most played" -msgstr "Ordenar por número de vezes jogadas" - -msgid "Sound" -msgstr "Audio" - -msgid "Sound Settings" -msgstr "" - -msgid "Sound+BGM" -msgstr "Som+Music de Fundo" - -msgid "Sound+Quiet" -msgstr "Som+Quieto" - -msgid "Spanish" -msgstr "Espanhol" - -msgid "Special thanks to:" -msgstr "Agradecimentos especiais para:" - -msgid "Split each 2GB" -msgstr "" - -msgid "Split each 4GB" -msgstr "" - -msgid "Standby" -msgstr "" - -msgid "Success" -msgstr "Sucesso" - -msgid "Success:" -msgstr "Sucesso:" - -msgid "Successfully Saved" -msgstr "Gravado com Sucesso" - -msgid "Successfully Updated" -msgstr "Programa atualizado com Sucesso" - -msgid "Successfully Updated thanks to www.techjawa.com" -msgstr "Atualizado com sucesso graças a www.techjawa.com" - -msgid "Successfully deleted:" -msgstr "Eliminado com Sucesso:" - -msgid "Successfully extracted theme." -msgstr "Tema extraido com sucesso." - -msgid "Successfully installed:" -msgstr "Instalado com Sucesso:" - -msgid "Sync FAT32 FS Info" -msgstr "" - -msgid "Synchronizing..." -msgstr "" - -msgid "System Default" -msgstr "Padrão do Sistema" - -msgid "TChinese" -msgstr "Chinês Tradicional" - -msgid "TXT Cheatcodes Path" -msgstr "Pasta Dicas" - -msgid "The .them file was not found in the zip." -msgstr "" - -msgid "The entered directory does not exist. Would you like to create it?" -msgstr "O diretorio não existe. Gostaria de cria-lo?" - -msgid "The game installation is disabled under this IOS because of instability in usb write." -msgstr "" - -msgid "The wad file was installed" -msgstr "" - -#, c-format -msgid "The wad installation failed with error %i" -msgstr "" - -msgid "Theme Downloader" -msgstr "Baixador de Temas" - -msgid "Theme Menu" -msgstr "" - -msgid "Theme Path" -msgstr "Pasta Temas" - -msgid "Theme Title:" -msgstr "Titulo do Tema:" - -msgid "Themes by www.spiffy360.com" -msgstr "" - -msgid "This IOS is the BootMii ios. If you are sure it is not BootMii and you have something else installed there than ignore this warning." -msgstr "" - -msgid "This IOS was not found on the titles list. If you are sure you have it installed than ignore this warning." -msgstr "" - -msgid "Time left:" -msgstr "Tempo restante:" - -msgid "Title Launcher" -msgstr "Laucher de Títulos" - -msgid "Titles from WiiTDB" -msgstr "Títulos do WiiTDB" - -msgid "Tooltips" -msgstr "Dicas" - -msgid "Transfer failed" -msgstr "" - -msgid "USB Device not found" -msgstr "Dispositivo USB não encontrado" - -msgid "USB Loader GX is protected" -msgstr "O USB Loader GX está bloqueado" - -msgid "USB Port" -msgstr "" - -msgid "USB Port changing is only supported on Hermes cIOS." -msgstr "" - -msgid "Uninstall" -msgstr "Desinstalar" - -msgid "Uninstall Game" -msgstr "Desinstalar jogo" - -msgid "Uninstall Menu" -msgstr "Menu de Desinstalação" - -msgid "Uninstall all" -msgstr "" - -msgid "Uninstalling wad" -msgstr "Desinstalando wad" - -msgid "Unknown" -msgstr "" - -msgid "Unlock USB Loader GX" -msgstr "" - -msgid "Unlocked" -msgstr "Desbloqueado" - -msgid "Unsupported format, try to extract manually TempTheme.zip." -msgstr "" - -msgid "Update" -msgstr "Verificar Atualizações" - -msgid "Update All" -msgstr "Atualizar Tudo" - -msgid "Update DOL" -msgstr "Atualizar DOL" - -msgid "Update Files" -msgstr "Atualizar arquivos" - -msgid "Update Path" -msgstr "Pasta Atualizações" - -msgid "Update all Language Files" -msgstr "Atualizar todos os arquivos de Idioma" - -msgid "Update failed" -msgstr "Erro ao atualizar" - -msgid "Update successfull" -msgstr "" - -msgid "Updating Language Files:" -msgstr "Atualizando arquivos de Idioma:" - -msgid "Uploaded ZIP file installed to homebrew directory." -msgstr "Arquivo ZIP enviado y instalado no diretório homebrew." - -msgid "VIDTV Patch" -msgstr "Patch VIDTV" - -msgid "Version:" -msgstr "" - -#, c-format -msgid "Version: %s" -msgstr "Versão: %s" - -msgid "Video Mode" -msgstr "Modo de Vídeo" - -msgid "WDM Files Path" -msgstr "" - -msgid "WIP Patches Path" -msgstr "Caminho WIP Patches" - -msgid "Waiting..." -msgstr "Aguardando..." - -msgid "Warning:" -msgstr "" - -msgid "What do you want to update?" -msgstr "O que deseja atualizar?" - -msgid "What should be deleted for this game title:" -msgstr "" - -msgid "WiFi Features" -msgstr "Rede sem fios" - -msgid "Widescreen Fix" -msgstr "Correção 16:9" - -msgid "Wii Menu" -msgstr "Menu do Wii" - -msgid "Wii Settings" -msgstr "Configuração do Wii" - -msgid "WiiTDB Files" -msgstr "WiiTDB" - -msgid "WiiTDB Path" -msgstr "Pasta WiiTDB" - -msgid "WiiTDB is up to date." -msgstr "" - -msgid "Wiilight" -msgstr "Iluminação Leitor" - -msgid "Wrong Password" -msgstr "Password Incorreto" - -msgid "Yes" -msgstr "Sim" - -msgid "You are currently using IOS" -msgstr "" - -msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." -msgstr "" - -msgid "You need to select or format a partition" -msgstr "Você precisa selecionar ou formatar uma partição" - -msgid "and translators for language files updates" -msgstr "" - -msgid "available" -msgstr "disponível" - -msgid "does not exist!" -msgstr "não existe!" - -msgid "does not exist! Loading game without cheats." -msgstr "não existe! Carregando jogo sem truques." - -msgid "files left" -msgstr "arquivos restantes" - -msgid "for FAT/NTFS support" -msgstr "para suporte a FAT/NTFS" - -msgid "for Ocarina" -msgstr "pelo Ocarina" - -msgid "for WiiTDB and hosting covers / disc images" -msgstr "por WiiTDB e hospedando img. capas / discos" - -msgid "for diverse patches" -msgstr "por diversos patches" - -msgid "for his awesome tool LibWiiGui" -msgstr "pela sua espetacular ferramenta LibWiiGui" - -msgid "for hosting the themes" -msgstr "por hospedar os temas" - -msgid "for hosting the update files" -msgstr "por hospedar atualizações" - -msgid "for the USB Loader source" -msgstr "pelo código do USB Loader" - -msgid "formatted!" -msgstr "formatado!" - -msgid "free" -msgstr "livres" - -msgid "not set" -msgstr "não definido" - -msgid "of" -msgstr "de" - -msgid "seconds left" -msgstr "segundos restantes" - -#~ msgid "Author:" -#~ msgstr "Autor:" - -#~ msgid "Download Boxart image?" -#~ msgstr "Baixar imagem da Caixa?" - -#~ msgid "Download Discart image?" -#~ msgstr "Baixar imagem do Disco?" - -#~ msgid "Downloading file" -#~ msgstr "Baixando arquivo" - -#~ msgid "Missing files" -#~ msgstr "Faltando arquivos" - -#~ msgid "files not found on the server!" -#~ msgstr "arquivos não encontrados no servidor!" - -#~ msgid "Disc Images" -#~ msgstr "Imagens de Disco" - -#~ msgid "Only Customs" -#~ msgstr "Apenas Alternativas" - -#~ msgid "Only Original" -#~ msgstr "Apenas Originais" - -#~ msgid "Do you really want to delete:" -#~ msgstr "Tem a certeza que quer eliminar o jogo:" - -#~ msgid "Do you want to use the alternate DOL that is known to be correct?" -#~ msgstr "Deseja usar o DOL alternativo que pensa ser o correcto?" - -#~ msgid "BETA revisions" -#~ msgstr "Revisões BETA" - -#~ msgid "Unlock console to use this option." -#~ msgstr "Desbloquear configuração antes de usar esta opção." - -#~ msgid "Full Shutdown" -#~ msgstr "Desligar" - -#~ msgid "GXtheme.cfg not found in any subfolder." -#~ msgstr "GXtheme.cfg não encontrado em nenhuma subpasta" - -#~ msgid "If you don't have WiFi, press 1 to get an URL to get your WiiTDB.zip" -#~ msgstr "Se não tem conexão sem fios, pressione 1 para ver a URL onde se pode baixar o arquivo WiiTDB.zip" - -#~ msgid "Paste it into your browser to get your WiiTDB.zip." -#~ msgstr "Copie para o seu browser de Internet para baixar o WiiTDB.zip" - -#~ msgid "Shutdown to Idle" -#~ msgstr "Standby" - -#~ msgid "Your URL has been saved in %sWiiTDB_URL.txt." -#~ msgstr "Sua URL foi salva em %sWiiTDB_URL.txt." - -#~ msgid "Can't create file" -#~ msgstr "Não foi possivel criar o arquivo" - -#~ msgid "Download failed." -#~ msgstr "Download falhou" - -#~ msgid "Download request failed." -#~ msgstr "Download requerido falhou" - -#~ msgid "Downloading Page List:" -#~ msgstr "Baixando lista de paginas:" - -#~ msgid "Theme Download Path" -#~ msgstr "Pasta de Temas Baixados" - -#~ msgid "Transfer failed." -#~ msgstr "Falhou a transferencia" - -#~ msgid "Unsupported format, try to extract manually." -#~ msgstr "Formato não suportado, tente extrair manualmente." - -#~ msgid "and translaters for language files updates" -#~ msgstr "e tradutores para atualizações de linguas" - -#~ msgid "Insert an SD-Card to save." -#~ msgstr "Insira um cartão SD para salvar." - -#~ msgid "Insert an SD-Card to use this option." -#~ msgstr "Insira um cartão SD para usar esta funcionalidade." - -#~ msgid "No SD-Card inserted!" -#~ msgstr "Cartão SD não inserido!" - -#~ msgid "Waiting for USB Device" -#~ msgstr "Aguardando pelo Dispositivo USB" - -#~ msgid "Back to Loader" -#~ msgstr "Loader" - -#~ msgid "FAT: Use directories" -#~ msgstr "FAT: Usar Diretórios" - -#~ msgid "All partitions" -#~ msgstr "Todas as Partições" - -#~ msgid "Game partition" -#~ msgstr "Partição de Game" - -#~ msgid "Install 1:1 Copy" -#~ msgstr "Instalar 1:1 Copy" - -#~ msgid "An Error occured" -#~ msgstr "Ocorreu um Erro" - -#~ msgid "Are you sure you want to enable Parent Control?" -#~ msgstr "Tem certeza que você deseja ligar o Controle de Pais?" - -#~ msgid "AutoPatch" -#~ msgstr "Patch automático" - -#~ msgid "Checking for Updates" -#~ msgstr "Procurando Atualizações" - -#~ msgid "Downloading" -#~ msgstr "Baixando" - -#~ msgid "Invalid PIN code" -#~ msgstr "Código PIN inválido" - -#~ msgid "Parental Control disabled" -#~ msgstr "Controle dos Pais desligado" - -#~ msgid "The wad file was installed. But It could not be deleted from the SD card." -#~ msgstr "O arquivo wad foi instalado mas não foi possível eliminá-lo do cartão SD." - -#~ msgid "The wad installation failed with error %ld" -#~ msgstr "A instalação do wad falhou com o seguinte erro: %ld" - -#~ msgid "Unable to open the wad that was just downloaded (%s)." -#~ msgstr "Não é possível abrir o arquivo wad baixado (%s)." - -#~ msgid "Unlock Parental Control" -#~ msgstr "Desbloquear Controle de Pais" - -#~ msgid "Update to" -#~ msgstr "Atualizando para" - -#~ msgid "Updating" -#~ msgstr "Atualizando" - -#~ msgid "Updating Language Files..." -#~ msgstr "Atualizando arquivos de Idioma..." - -#~ msgid "Updating WiiTDB.zip" -#~ msgstr "Atualizando WiiTDB.zip" - -#~ msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." -#~ msgstr "Você não tem o Controle de Pais ligado. Se você deseja usar o Controle de Pais, ligue-o nas Configurações do Wii." - -#~ msgid "%s : %s May not boot correctly if your System Menu is not up to date." -#~ msgstr "%s : %s Pode não carregar corretamente se seu sistema não estiver atualizado." - -#~ msgid "BCA Codes Path changed" -#~ msgstr "Caminho do BCA Codes alterado" - -#~ msgid "Back to Wii Menu" -#~ msgstr "Menu do Wii" - -#~ msgid "Channels" -#~ msgstr "Canais" - -#~ msgid "Checking existing artwork" -#~ msgstr "Procurando artes existentes" - -#~ msgid "Confirm" -#~ msgstr "Confirmar" - -#~ msgid "Could not find a WBFS partition." -#~ msgstr "Não foi encontrada nenhuma partição WBFS." - -#~ msgid "Could not open WBFS partition" -#~ msgstr "Não foi possível abrir a partição WBFS" - -#~ msgid "Could not read the disc." -#~ msgstr "Não foi possível ler o disco." - -#~ msgid "Could not set USB." -#~ msgstr "Não foi possível configurar a porta USB." - -#~ msgid "Cover Path Changed" -#~ msgstr "Pasta das Capas alterada" - -#~ msgid "DOL path changed" -#~ msgstr "Pasta do DOL alterada" - -#~ msgid "Disc Path Changed" -#~ msgstr "Pasta das Imagens Disco alterada" - -#~ msgid "Display favorites" -#~ msgstr "Mostrar favoritos" - -#~ msgid "Do you want to retry for 30 secs?" -#~ msgstr "Deseja tentar novamente dentro de 30 segs?" - -#~ msgid "Enable Parental Control" -#~ msgstr "Ligar Controle de Pais" - -#~ msgid "Force" -#~ msgstr "Forçar" - -#~ msgid "GCT Cheatcodes Path changed" -#~ msgstr "Pasta de Truques alterada" - -#~ msgid "Homebrew Appspath changed" -#~ msgstr "Pasta Apps Homebrew alterada" - -#~ msgid "Insert an SD-Card to download images." -#~ msgstr "Insira um cartão SD para descarregar as imagens." - -#~ msgid "Most likely it has dimensions that are not evenly divisible by 4." -#~ msgstr "Provável que o tamanho não seja divisível por 4." - -#~ msgid "Network init error" -#~ msgstr "Erro ao inicializar ligação de rede" - -#~ msgid "No .dol or .elf files found." -#~ msgstr "Não foram encontrados nenhuns arquivos .dol ou .elf" - -#~ msgid "No Favorites" -#~ msgstr "Lista de favoritos vazia" - -#~ msgid "No USB Device" -#~ msgstr "Nenhum dispositivo USB" - -#~ msgid "No USB Device found." -#~ msgstr "Nenhum dispositivo USB encontrado." - -#~ msgid "No WBFS or FAT/NTFS partition found" -#~ msgstr "Nenhuma partição WBFS o FAT/NTFS encontrada" - -#~ msgid "Normal Covers" -#~ msgstr "Capas Normais" - -#~ msgid "Not Found" -#~ msgstr "Não encontrado" - -#~ msgid "Not a DOL/ELF file." -#~ msgstr "Não é um arquivo DOL/ELF válido." - -#~ msgid "Reset to standard BGM?" -#~ msgstr "Resetar para Música de Fundo padrão?" - -#~ msgid "Save Failed" -#~ msgstr "Falha ao Gravar" - -#~ msgid "Selected DOL" -#~ msgstr "DOL selecionado" - -#~ msgid "Standard" -#~ msgstr "Standard" - -#~ msgid "TXT Cheatcodes Path changed" -#~ msgstr "Pasta de Dicas alterada" - -#~ msgid "Theme Download Path changed" -#~ msgstr "Pasta de Temas Baixados Alterado" - -#~ msgid "Theme Path Changed" -#~ msgstr "Pasta dos Temas alterada" - -#~ msgid "USB Loader GX will only run with Hermes CIOS rev 4! Please make sure you have revision 4 installed!" -#~ msgstr "O USB Loader GX será executado apenas com a Hermes CIOS rev 4! Por favor tenha certeza de que tem a revisão 4 instalada!" - -#~ msgid "Update Path changed." -#~ msgstr "A pasta das atualizações foi alterada." - -#~ msgid "WIP Patches Path changed" -#~ msgstr "Caminho WIP Patches alterado" - -#~ msgid "WiiTDB Path changed." -#~ msgstr "Pasta WiiTDB alterada." - -#~ msgid "You are about to delete " -#~ msgstr "Irá eliminar " - -#~ 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." - -#~ msgid "You have attempted to load a bad image" -#~ msgstr "Você tentou carregar uma imagem corrompida" - -#~ msgid "does not exist! You Messed something up, Idiot." -#~ msgstr "não existe! Estragou algo, idiota." - -#~ msgid "file left" -#~ msgstr "arquivo restante" diff --git a/Languages/portuguese_pt.lang b/Languages/portuguese_pt.lang deleted file mode 100644 index 9e242834..00000000 --- a/Languages/portuguese_pt.lang +++ /dev/null @@ -1,1821 +0,0 @@ -# USB Loader GX language source file. -# portuguese_pt.lang - r931 -# don't delete/change this line (é). -msgid "" -msgstr "" -"Project-Id-Version: USB Loader GX\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-06 19:36+0100\n" -"PO-Revision-Date: 2010-03-22 10:55-0000\n" -"Last-Translator: Sky8000\n" -"Language-Team: Sky8000 \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -msgid " Wad Saved as:" -msgstr " Wad guardado como:" - -msgid " could not be downloaded." -msgstr " não foi descarregado." - -msgid " has been Saved. The text has not been verified. Some of the code may not work right with each other. If you experience trouble, open the text in a real text editor for more information." -msgstr " foi guardado. O texto não foi verificado. Parte do código pode não funcionar correctamente. Se detectares problemas abre o texto com um editor de texto para obteres mais informação." - -msgid " is not on the server." -msgstr " não está no servidor." - -#, c-format -msgid "%i files not found on the server!" -msgstr "" - -#, c-format -msgid "%i missing files" -msgstr "" - -msgid "0 (Everyone)" -msgstr "0 (Todos)" - -msgid "1 (Child 7+)" -msgstr "1 (Crianças 7+)" - -msgid "1 hour" -msgstr "1 hora" - -msgid "10 min" -msgstr "10 minutos" - -msgid "2 (Teen 12+)" -msgstr "2 (Adolescente 12+)" - -msgid "20 min" -msgstr "20 minutos" - -msgid "2D Cover Path" -msgstr "Pasta Capas 2D" - -msgid "3 (Mature 16+)" -msgstr "3 (Adulto 16+)" - -msgid "3 min" -msgstr "3 minutos" - -msgid "30 min" -msgstr "30 minutos" - -msgid "3D Cover Path" -msgstr "Pasta Capas 3D" - -msgid "3D Covers" -msgstr "Capas 3D" - -msgid "4 (Adults Only 18+)" -msgstr "4 (Adultos 18+)" - -msgid "5 min" -msgstr "5 minutos" - -msgid ">> Deleting tickets..." -msgstr ">> Eliminando tickets..." - -msgid ">> Deleting tickets...ERROR! " -msgstr ">> Eliminando tickets... ERRO! " - -msgid ">> Deleting tickets...Ok! " -msgstr ">> Eliminando tickets... Ok! " - -msgid ">> Deleting title ...ERROR! " -msgstr ">> Eliminando título... ERRO! " - -msgid ">> Deleting title ...Ok!" -msgstr ">> Eliminando título... Ok!" - -msgid ">> Deleting title contents..." -msgstr ">> Eliminando conteúdos do título..." - -msgid ">> Deleting title contents...ERROR! " -msgstr ">> Eliminando conteúdos do título... ERRO! " - -msgid ">> Deleting title contents...Ok!" -msgstr ">> Eliminando conteúdos do título... Ok!" - -msgid ">> Deleting title..." -msgstr ">> Eliminando título..." - -msgid ">> Finishing installation..." -msgstr ">> Terminando instalação..." - -msgid ">> Installing content #" -msgstr ">> Instalando conteúdo #" - -msgid ">> Installing ticket..." -msgstr ">> Instalando ticket..." - -msgid ">> Installing title..." -msgstr ">> Instalando título..." - -msgid ">> Reading WAD data..." -msgstr ">> Lendo ficheiro WAD..." - -msgid ">> Reading WAD data...ERROR! " -msgstr ">> Lendo ficheiro WAD... ERRO!" - -msgid ">> Reading WAD data...Ok!" -msgstr ">> Lendo ficheiro WAD... Ok!" - -msgid "AUTO" -msgstr "" - -msgid "All Partitions" -msgstr "" - -msgid "All images downloaded successfully." -msgstr "" - -msgid "All the features of USB Loader GX are unlocked." -msgstr "As configurações estão desbloqueadas." - -msgid "Alternate DOL" -msgstr "DOL alternativo" - -msgid "Anti" -msgstr "Anti" - -msgid "App Language" -msgstr "Idioma" - -msgid "Apply" -msgstr "" - -msgid "Apr" -msgstr "Abr" - -msgid "Are you sure you want to lock USB Loader GX?" -msgstr "" - -msgid "Are you sure you want to reset?" -msgstr "" - -msgid "Are you sure?" -msgstr "Tem a certeza?" - -msgid "Aug" -msgstr "Ago" - -msgid "Author(s):" -msgstr "" - -msgid "AutoInit Network" -msgstr "Auto-iniciar Rede" - -msgid "Automatic port switching is done on the fly. You need to change all custom paths to SD-Card first for this option or else it could damage a filesystem." -msgstr "" - -msgid "BCA Codes Path" -msgstr "Pasta Códigos BCA" - -msgid "Back" -msgstr "Voltar" - -msgid "Back to HBC or Wii Menu" -msgstr "Voltar ao Loader/Menu da Wii" - -msgid "Backgroundmusic" -msgstr "Música de fundo" - -msgid "Big thanks to:" -msgstr "Agradecimentos:" - -msgid "Block Cover Downloads" -msgstr "" - -msgid "Block Custom Paths" -msgstr "" - -msgid "Block Game Install" -msgstr "" - -msgid "Block Game Settings" -msgstr "" - -msgid "Block GameID Change" -msgstr "" - -msgid "Block Global Settings" -msgstr "" - -msgid "Block Gui Settings" -msgstr "" - -msgid "Block HBC Menu" -msgstr "" - -msgid "Block IOS Reload" -msgstr "Bloquear Reload do IOS" - -msgid "Block Loader Settings" -msgstr "" - -msgid "Block Parental Settings" -msgstr "" - -msgid "Block Reset Settings" -msgstr "" - -msgid "Block Sound Settings" -msgstr "" - -msgid "Block Theme Downloader" -msgstr "" - -msgid "Block Theme Menu" -msgstr "" - -msgid "Block Title Launcher" -msgstr "" - -msgid "Block Updates" -msgstr "" - -msgid "Boot/Standard" -msgstr "Arranque/Standard" - -msgid "Boot?" -msgstr "Carregar?" - -msgid "Both" -msgstr "Ambos" - -msgid "Both Ports" -msgstr "" - -msgid "Can't be formatted" -msgstr "Não pode ser formatado" - -msgid "Can't create directory" -msgstr "Não foi possível criar a pasta" - -#, c-format -msgid "Can't create path: %s" -msgstr "" - -msgid "Can't delete:" -msgstr "Não foi possível apagar:" - -msgid "Cancel" -msgstr "Cancelar" - -msgid "Cannot write to destination." -msgstr "" - -msgid "Change Play Path" -msgstr "Alterar Pasta de Músicas" - -msgid "Cheatfile is blank" -msgstr "Ficheiro de truques vazio" - -msgid "Clear" -msgstr "" - -msgid "Click to Download Covers" -msgstr "Carregue para descarregar capas" - -msgid "Click to change game ID" -msgstr "Carregue para alterar o ID do jogo" - -msgid "Clock" -msgstr "Relógio" - -msgid "Close" -msgstr "Fechar" - -msgid "Code Download" -msgstr "Download de Código" - -#, c-format -msgid "Coded by: %s" -msgstr "Programado por: %s" - -msgid "Coding:" -msgstr "Desenvolvimento:" - -msgid "Connection to server timed out." -msgstr "" - -msgid "Console" -msgstr "Configuração" - -msgid "Console Default" -msgstr "Predefinição Consola" - -msgid "Console Locked" -msgstr "Configuração Bloqueada" - -msgid "Console must be unlocked for this option." -msgstr "" - -msgid "Console should be unlocked to modify it." -msgstr "É necessário desbloquear a configuração para poder modificar o parâmetro." - -msgid "Continue to install game?" -msgstr "Continuar instalação do jogo?" - -msgid "Controllevel" -msgstr "Nível de Controle" - -msgid "Correct Password" -msgstr "Password Correcta" - -msgid "Could not connect to the server." -msgstr "" - -msgid "Could not create GCT file" -msgstr "Não foi possível criar o ficheiro GCT" - -#, c-format -msgid "Could not create path: %s" -msgstr "" - -msgid "Could not find info for this game in the wiitdb.xml." -msgstr "" - -msgid "Could not initialize DIP module!" -msgstr "Não foi possível inicializar o módulo DIP!" - -msgid "Could not initialize network!" -msgstr "Não foi possível incializar a Ligação de Rede!" - -msgid "Could not open Disc" -msgstr "Não foi possível abrir o Disco" - -msgid "Could not open wiitdb.xml." -msgstr "" - -msgid "Could not save." -msgstr "Não foi possível gravar." - -msgid "Cover Download" -msgstr "Download de Capas" - -msgid "Create" -msgstr "Criar" - -msgid "Credits" -msgstr "Créditos" - -msgid "Custom Discarts" -msgstr "" - -msgid "Custom Paths" -msgstr "Personalização de Pastas" - -msgid "Customs/Original" -msgstr "Alternativas/Originais" - -msgid "DOL Path" -msgstr "Pasta DOL" - -msgid "Dec" -msgstr "Dez" - -msgid "Default" -msgstr "Predefinição" - -msgid "Default Gamesettings" -msgstr "Repor Configuração do Jogo" - -msgid "Default Settings" -msgstr "Repor Configurações" - -msgid "Delete" -msgstr "Eliminar" - -msgid "Delete ?" -msgstr "Eliminar ?" - -msgid "Delete Cheat GCT" -msgstr "Eliminar Truques (GCT)" - -msgid "Delete Cheat TXT" -msgstr "Eliminar Truques (TXT)" - -msgid "Delete Cover Artwork" -msgstr "Eliminar Capas" - -msgid "Delete Disc Artwork" -msgstr "Eliminar Img. Disco" - -msgid "Design:" -msgstr "" - -msgid "Developed by" -msgstr "Desenvolvido por" - -msgid "Directory does not exist!" -msgstr "A Pasta não existe!" - -msgid "Disc Artwork Download" -msgstr "Descaregar Imagens Disco" - -msgid "Disc Artwork Path" -msgstr "Pasta Imagens Disco" - -msgid "Disc Default" -msgstr "Predefinição Disco" - -msgid "DiskFlip" -msgstr "Voltar Disco" - -msgid "Display" -msgstr "Mostrar" - -msgid "Display as a carousel" -msgstr "Mostrar como carrossel" - -msgid "Display as a grid" -msgstr "Mostrar como grelha" - -msgid "Display as a list" -msgstr "Mostrar como lista" - -msgid "Display favorites only" -msgstr "" - -msgid "Do you want to apply it now?" -msgstr "Deseja aplicar agora?" - -msgid "Do you want to apply this theme?" -msgstr "" - -msgid "Do you want to change language?" -msgstr "Deseja alterar o idioma?" - -msgid "Do you want to download this theme?" -msgstr "Deseja descarregar este tema?" - -msgid "Do you want to format:" -msgstr "Deseja FORMATAR:" - -msgid "Do you want to load the default theme?" -msgstr "" - -msgid "Do you want to sync free space info sector on all FAT32 partitions?" -msgstr "" - -msgid "Do you wish to update/download all language files?" -msgstr "Queres actualizar todos os ficheiros de idioma?" - -msgid "Done!" -msgstr "Concluído!" - -msgid "Download" -msgstr "Descarregar" - -msgid "Download Now" -msgstr "Descarregar Agora" - -msgid "Download finished" -msgstr "Download Terminado" - -msgid "Downloading 3D Covers" -msgstr "" - -msgid "Downloading Flat Covers" -msgstr "" - -msgid "Downloading Full HQ Covers" -msgstr "" - -msgid "Downloading Full LQ Covers" -msgstr "" - -msgid "Downloading custom Discarts" -msgstr "" - -msgid "Downloading file..." -msgstr "" - -msgid "Downloading image:" -msgstr "Descarregando imagem:" - -msgid "Downloading original Discarts" -msgstr "" - -msgid "Downloading pagelist:" -msgstr "" - -msgid "Dutch" -msgstr "Holandês" - -msgid "ERROR" -msgstr "ERRO" - -msgid "ERROR:" -msgstr "ERRO:" - -msgid "ERROR: Can't set up theme." -msgstr "ERRO: Impossível configurar tema." - -msgid "English" -msgstr "Inglês" - -msgid "Error" -msgstr "Erro" - -msgid "Error !" -msgstr "Erro !" - -msgid "Error 002 fix" -msgstr "Correcção Erro 002" - -#, c-format -msgid "Error creating path: %s" -msgstr "" - -msgid "Error opening downloaded file" -msgstr "" - -msgid "Error reading Disc" -msgstr "Erro ao ler o Disco" - -#, c-format -msgid "Error when downloading file: %i" -msgstr "" - -msgid "Error while downloding file" -msgstr "" - -msgid "Error while opening the zip." -msgstr "" - -msgid "Error while transfering data." -msgstr "Erro na transferência de dados." - -msgid "Error while updating USB Loader GX." -msgstr "" - -msgid "Error writing the data." -msgstr "" - -msgid "Error..." -msgstr "Erro..." - -msgid "Error:" -msgstr "Erro:" - -msgid "Exit" -msgstr "" - -msgid "Exit to where?" -msgstr "" - -msgid "Extracting files..." -msgstr "Extraindo ficheiros..." - -msgid "Failed formating" -msgstr "Falha ao formatar" - -msgid "Failed to extract." -msgstr "Falha ao extrair ficheiros." - -msgid "Failed to open partition" -msgstr "Falha ao abrir partição" - -msgid "Failed updating" -msgstr "" - -msgid "Feb" -msgstr "Fev" - -msgid "File not found." -msgstr "Ficheiro não encontrado." - -#, c-format -msgid "Filesize is %i Byte." -msgstr "" - -msgid "Filesize is 0 Byte." -msgstr "" - -msgid "Finishing installation... Ok!" -msgstr "Terminando instalação... Ok!" - -msgid "Flat Covers" -msgstr "" - -msgid "Flip-X" -msgstr "Paginação Horizontal" - -msgid "Force NTSC" -msgstr "" - -msgid "Force PAL50" -msgstr "" - -msgid "Force PAL60" -msgstr "" - -msgid "Format" -msgstr "Formatar" - -msgid "Formatting, please wait..." -msgstr "Formatando, por favor aguarde..." - -msgid "Found missing images." -msgstr "" - -msgid "Free Space" -msgstr "Espaço Livre" - -msgid "French" -msgstr "Francês" - -msgid "Full Cover Path" -msgstr "" - -msgid "Full HQ Covers" -msgstr "" - -msgid "Full LQ Covers" -msgstr "" - -msgid "Full Menu" -msgstr "" - -msgid "Full shutdown" -msgstr "" - -msgid "GAMEID_Gamename" -msgstr "IDJOGO_NomeJogo" - -msgid "GCT Cheatcodes Path" -msgstr "Pasta ficheiros GCT" - -msgid "GCT File created" -msgstr "Ficheiro GCT criado" - -msgid "GUI Settings" -msgstr "Definições do Interface" - -msgid "Game ID" -msgstr "ID do Jogo" - -msgid "Game IOS" -msgstr "" - -msgid "Game Language" -msgstr "Idioma" - -msgid "Game Load" -msgstr "Carregamento de Jogos" - -msgid "Game Lock" -msgstr "" - -msgid "Game Only" -msgstr "" - -msgid "Game Region" -msgstr "Região" - -msgid "Game Size" -msgstr "Tamanho do Jogo" - -msgid "Game Sound Mode" -msgstr "Definições de Audio Jogo" - -msgid "Game Sound Volume" -msgstr "Volume de Som do Jogo" - -msgid "Game Split Size" -msgstr "" - -msgid "Game is already installed:" -msgstr "O jogo já está instalado:" - -msgid "Game/Install Partition" -msgstr "" - -msgid "Gamename [GAMEID]" -msgstr "NomeJogo [IDJOGO]" - -msgid "Games" -msgstr "Jogos" - -msgid "Genre:" -msgstr "" - -msgid "German" -msgstr "Alemão" - -msgid "Global Settings" -msgstr "" - -msgid "HOME Menu" -msgstr "Menú Inicial" - -msgid "Homebrew Apps Path" -msgstr "Pasta Apps Homebrew" - -msgid "Homebrew Channel" -msgstr "" - -msgid "Homebrew Launcher" -msgstr "Launcher Homebrew" - -msgid "Hour" -msgstr "Horas" - -msgid "How do you want to update?" -msgstr "O que deseja actualizar?" - -msgid "How to Shutdown?" -msgstr "Como desligar a consola?" - -#, c-format -msgid "Incoming file %0.2fKB" -msgstr "A receber ficheiro %0.2fKB" - -#, c-format -msgid "Incoming file %0.2fMB" -msgstr "A receber ficheiro %0.2fMB" - -msgid "Initializing Network" -msgstr "Inicializando Ligação de Rede" - -msgid "Insert Disk" -msgstr "Insira o Disco" - -msgid "Insert a Wii Disc!" -msgstr "Insira um Disco da Wii!" - -msgid "Install" -msgstr "Instalar" - -msgid "Install Error!" -msgstr "Erro de Instalação!" - -msgid "Install a game" -msgstr "Instalar um jogo" - -msgid "Install directories" -msgstr "" - -msgid "Install partitions" -msgstr "Instalar partições" - -msgid "Installing content... Ok!" -msgstr "Instalando conteúdo... Ok!" - -msgid "Installing game:" -msgstr "Instalando jogo:" - -msgid "Installing ticket... Ok!" -msgstr "Instalando ticket... Ok!" - -msgid "Installing title... Ok!" -msgstr "Instalando título... Ok!" - -msgid "Installing wad" -msgstr "Instalando wad" - -msgid "Issue manager /" -msgstr "" - -msgid "It seems that you have some information that will be helpful to us. Please pass this information along to the DEV team." -msgstr "Parece que tem informação que pode ser útil. Por favor envie esta informação à equipa de desenvolvimento." - -msgid "Italian" -msgstr "Italiano" - -msgid "Jan" -msgstr "" - -msgid "Japanese" -msgstr "Japonês" - -msgid "July" -msgstr "Jul" - -msgid "June" -msgstr "Jun" - -msgid "Keep" -msgstr "Manter" - -msgid "Keyboard" -msgstr "Teclado" - -msgid "Korean" -msgstr "Coreano" - -msgid "Language File" -msgstr "Idiomas" - -msgid "Language change:" -msgstr "Alteração de idioma:" - -msgid "Languagefiles Path" -msgstr "" - -msgid "Languagepath changed." -msgstr "Pasta para o ficheiro de Idioma alterada." - -msgid "Left" -msgstr "Esquerda" - -msgid "Like SysMenu" -msgstr "Igual ao Menu da Wii" - -msgid "List on Gamelaunch" -msgstr "" - -msgid "Load" -msgstr "Carregar" - -msgid "Load From SD/USB" -msgstr "Carregar do SD/USB" - -#, c-format -msgid "Load file from: %s ?" -msgstr "Carregar ficheiro de: %s ?" - -msgid "Load this DOL as alternate DOL?" -msgstr "Carregar este DOL como DOL alternativo?" - -msgid "Loader Settings" -msgstr "" - -msgid "Loading standard language." -msgstr "Carregado idioma padrão." - -msgid "Loading standard music." -msgstr "Carregando música padrão." - -msgid "Lock Console" -msgstr "Bloquear Configurações" - -msgid "Lock USB Loader GX" -msgstr "" - -msgid "Locked" -msgstr "Bloqueado" - -msgid "Loop Directory" -msgstr "Repetir Pasta" - -msgid "Loop Music" -msgstr "Repetir Música" - -msgid "Loop Sound" -msgstr "Repetir Sons" - -msgid "Main tester:" -msgstr "" - -msgid "Mar" -msgstr "" - -msgid "Mark new games" -msgstr "Marcar jogos novos" - -msgid "May" -msgstr "Mai" - -msgid "Messageboard Update" -msgstr "" - -msgid "Motion+ Video" -msgstr "" - -msgid "Mount DVD drive" -msgstr "Montar Unidade de DVD" - -msgid "Multiple Partitions" -msgstr "" - -msgid "Music Loop Mode" -msgstr "Modo de Repetição" - -msgid "Music Volume" -msgstr "Volume Música" - -msgid "Neither" -msgstr "Nenhum" - -msgid "Network is not initiated." -msgstr "" - -msgid "New Disc Detected" -msgstr "Novo Disco Detectado" - -msgid "Next" -msgstr "Próximo" - -msgid "No" -msgstr "Não" - -msgid "No Cheatfile found" -msgstr "Ficheiro de truques não encontrado" - -msgid "No DOL file found on disc." -msgstr "Não foi encontrado nenhum ficheiro DOL no disco" - -msgid "No Splitting" -msgstr "" - -msgid "No URL or Path specified." -msgstr "" - -msgid "No WBFS or FAT/NTFS/EXT partition found" -msgstr "" - -msgid "No cheats were selected" -msgstr "Não foram seleccionados truques" - -msgid "No data could be read." -msgstr "Não foi possível ler dados." - -msgid "No favorites selected." -msgstr "" - -msgid "No file missing!" -msgstr "Nenhum ficheiro em falta!" - -msgid "No new updates." -msgstr "Não existem novas actualizações." - -msgid "No themes found on the site." -msgstr "Nenhum tema encontrado no site." - -msgid "No themes found." -msgstr "" - -msgid "None" -msgstr "Nenhum" - -msgid "Normal" -msgstr "Normal" - -msgid "Not a WAD file." -msgstr "Não é um ficheiro WAD." - -msgid "Not a Wii Disc" -msgstr "Não é um Disco da Wii" - -msgid "Not a valid URL" -msgstr "" - -msgid "Not a valid URL path" -msgstr "" - -msgid "Not a valid domain" -msgstr "" - -msgid "Not enough free memory." -msgstr "Não há memória livre suficiente." - -msgid "Not enough free space!" -msgstr "Não há espaço livre suficiente!" - -msgid "Not enough memory." -msgstr "" - -msgid "Not required" -msgstr "" - -msgid "Not supported format!" -msgstr "Formato não suportado!" - -msgid "Nov" -msgstr "" - -msgid "OFF" -msgstr "Desligado" - -msgid "OK" -msgstr "" - -msgid "ON" -msgstr "Ligado" - -msgid "Ocarina" -msgstr "" - -msgid "Oct" -msgstr "Out" - -msgid "Official Site:" -msgstr "Site Oficial:" - -msgid "Offset" -msgstr "" - -msgid "Only Game Partition" -msgstr "" - -msgid "Only for Install" -msgstr "Apenas na instalação" - -msgid "Original Discarts" -msgstr "" - -msgid "Original/Customs" -msgstr "Originais/Alternativas" - -msgid "Parental Control" -msgstr "Controlo Parental" - -msgid "Partition" -msgstr "Partição" - -msgid "Password" -msgstr "" - -msgid "Password Changed" -msgstr "Password Alterada" - -msgid "Password has been changed" -msgstr "A Password foi alterada" - -msgid "Patch Country Strings" -msgstr "Patch Jogos Importados" - -msgid "Path Changed" -msgstr "" - -msgid "Permission denied." -msgstr "" - -msgid "Pick from a list" -msgstr "Escolher da lista" - -msgid "Play Count" -msgstr "Vezes jogadas" - -msgid "Play Next" -msgstr "Próxima" - -msgid "Play Once" -msgstr "Tocar uma vez" - -msgid "Play Previous" -msgstr "Anterior" - -msgid "Playing Music:" -msgstr "Reproduzindo:" - -msgid "Please wait..." -msgstr "Por favor aguarde..." - -msgid "Power off the Wii" -msgstr "Desligar a Wii" - -msgid "Prev" -msgstr "Anterior" - -msgid "Prompts Buttons" -msgstr "Mensagens/Botões" - -msgid "Published by" -msgstr "Publicado por" - -msgid "Quick Boot" -msgstr "Arranque Rápido" - -msgid "Random Directory Music" -msgstr "Pasta de Música Aleatória" - -msgid "Reading WAD data... Ok!" -msgstr "Lendo dados do WAD... Ok!" - -msgid "Receiving file from:" -msgstr "Recebendo ficheiro de:" - -msgid "Region Patch" -msgstr "" - -msgid "Released" -msgstr "Lançamento" - -msgid "Reload SD" -msgstr "Actualizar do cartão SD" - -msgid "Remove update" -msgstr "Remover actualização" - -msgid "Rename Game on WBFS" -msgstr "Alterar nome do jogo (WBFS)" - -msgid "Reset" -msgstr "" - -msgid "Reset BG Music" -msgstr "Repor Música de Fundo" - -msgid "Reset Playcounter" -msgstr "Limpar Contagem" - -msgid "Reset to default BGM?" -msgstr "" - -msgid "Restarting..." -msgstr "A Wii irá reiniciar" - -msgid "Return" -msgstr "Voltar" - -msgid "Return To" -msgstr "" - -msgid "Return to Wii Menu" -msgstr "Voltar ao Menu da Wii" - -msgid "Right" -msgstr "Direita" - -msgid "Rumble" -msgstr "Vibração" - -msgid "SChinese" -msgstr "Chinês Simplificado" - -msgid "SFX Volume" -msgstr "Volume Efeitos" - -msgid "Save" -msgstr "Gravar" - -msgid "Save Failed. No device inserted?" -msgstr "" - -msgid "Save Game List to" -msgstr "Gravar lista de Jogos para" - -msgid "Save List" -msgstr "" - -msgid "Saved" -msgstr "Gravado" - -msgid "Screensaver" -msgstr "Protecção de ecrã" - -msgid "Select" -msgstr "Seleccionar" - -msgid "Select DOL Offset" -msgstr "" - -msgid "Select a DOL" -msgstr "Seleccionar o DOL" - -msgid "Select a DOL from Game" -msgstr "" - -msgid "Sept" -msgstr "Set" - -msgid "Set Search-Filter" -msgstr "Filtro de pesquisa" - -msgid "Settings" -msgstr "Configurações" - -msgid "Show Free Space" -msgstr "" - -msgid "Shutdown System" -msgstr "Desligar" - -msgid "Shutdown Wii" -msgstr "" - -msgid "Sort alphabetically" -msgstr "Ordenar por ordem alfabética" - -msgid "Sort by number of players" -msgstr "" - -msgid "Sort by rank" -msgstr "Ordenar por classificação" - -msgid "Sort order by most played" -msgstr "Ordenar por número de vezes jogadas" - -msgid "Sound" -msgstr "Audio" - -msgid "Sound Settings" -msgstr "" - -msgid "Sound+BGM" -msgstr "Efeitos+Musica" - -msgid "Sound+Quiet" -msgstr "Efeitos+Silêncio" - -msgid "Spanish" -msgstr "Espanhol" - -msgid "Special thanks to:" -msgstr "Agradecimentos especiais para:" - -msgid "Split each 2GB" -msgstr "" - -msgid "Split each 4GB" -msgstr "" - -msgid "Standby" -msgstr "" - -msgid "Success" -msgstr "Exito" - -msgid "Success:" -msgstr "Sucesso:" - -msgid "Successfully Saved" -msgstr "Gravado com Sucesso" - -msgid "Successfully Updated" -msgstr "Actualização Concluída" - -msgid "Successfully Updated thanks to www.techjawa.com" -msgstr "Actualizado com sucesso graças a www.techjawa.com" - -msgid "Successfully deleted:" -msgstr "Eliminado com Sucesso:" - -msgid "Successfully extracted theme." -msgstr "Tema extraído com sucesso." - -msgid "Successfully installed:" -msgstr "Instalado com Sucesso:" - -msgid "Sync FAT32 FS Info" -msgstr "" - -msgid "Synchronizing..." -msgstr "" - -msgid "System Default" -msgstr "Predefinição Sistema" - -msgid "TChinese" -msgstr "Chinês Tradicional" - -msgid "TXT Cheatcodes Path" -msgstr "Pasta Dicas" - -msgid "The .them file was not found in the zip." -msgstr "" - -msgid "The entered directory does not exist. Would you like to create it?" -msgstr "A pasta não existe, pretende criá-la?" - -msgid "The game installation is disabled under this IOS because of instability in usb write." -msgstr "" - -msgid "The wad file was installed" -msgstr "" - -#, c-format -msgid "The wad installation failed with error %i" -msgstr "" - -msgid "Theme Downloader" -msgstr "Descarregar de Temas" - -msgid "Theme Menu" -msgstr "" - -msgid "Theme Path" -msgstr "Pasta Temas" - -msgid "Theme Title:" -msgstr "Título do Tema:" - -msgid "Themes by www.spiffy360.com" -msgstr "" - -msgid "This IOS is the BootMii ios. If you are sure it is not BootMii and you have something else installed there than ignore this warning." -msgstr "" - -msgid "This IOS was not found on the titles list. If you are sure you have it installed than ignore this warning." -msgstr "" - -msgid "Time left:" -msgstr "Tempo restante:" - -msgid "Title Launcher" -msgstr "Laucher de Títulos" - -msgid "Titles from WiiTDB" -msgstr "Títulos do WiiTDB" - -msgid "Tooltips" -msgstr "Dicas" - -msgid "Transfer failed" -msgstr "" - -msgid "USB Device not found" -msgstr "Dispositivo USB não encontrado" - -msgid "USB Loader GX is protected" -msgstr "O USB Loader GX está bloqueado" - -msgid "USB Port" -msgstr "" - -msgid "USB Port changing is only supported on Hermes cIOS." -msgstr "" - -msgid "Uninstall" -msgstr "Desinstalar" - -msgid "Uninstall Game" -msgstr "Desinstalar jogo" - -msgid "Uninstall Menu" -msgstr "Menu de Desinstalação" - -msgid "Uninstall all" -msgstr "" - -msgid "Uninstalling wad" -msgstr "Desinstalando wad" - -msgid "Unknown" -msgstr "" - -msgid "Unlock USB Loader GX" -msgstr "" - -msgid "Unlocked" -msgstr "Desbloqueado" - -msgid "Unsupported format, try to extract manually TempTheme.zip." -msgstr "" - -msgid "Update" -msgstr "Verificar Actualizações" - -msgid "Update All" -msgstr "Actualizar Tudo" - -msgid "Update DOL" -msgstr "Actualizar DOL" - -msgid "Update Files" -msgstr "Actualizar ficheiros" - -msgid "Update Path" -msgstr "Pasta Actualizações" - -msgid "Update all Language Files" -msgstr "Actualizar todos os ficheiros de Idioma" - -msgid "Update failed" -msgstr "Erro ao actualizar" - -msgid "Update successfull" -msgstr "" - -msgid "Updating Language Files:" -msgstr "Actualizando ficheiros de Idioma:" - -msgid "Uploaded ZIP file installed to homebrew directory." -msgstr "Ficheiro ZIP instalado na pasta do Homebrew." - -msgid "VIDTV Patch" -msgstr "Patch VIDTV" - -msgid "Version:" -msgstr "" - -#, c-format -msgid "Version: %s" -msgstr "Versão: %s" - -msgid "Video Mode" -msgstr "Modo de Vídeo" - -msgid "WDM Files Path" -msgstr "" - -msgid "WIP Patches Path" -msgstr "Pasta Patches WIP" - -msgid "Waiting..." -msgstr "Aguardando..." - -msgid "Warning:" -msgstr "" - -msgid "What do you want to update?" -msgstr "Que componente deseja actualizar?" - -msgid "What should be deleted for this game title:" -msgstr "" - -msgid "WiFi Features" -msgstr "Rede sem fios" - -msgid "Widescreen Fix" -msgstr "Correcção 16:9" - -msgid "Wii Menu" -msgstr "Menu da Wii" - -msgid "Wii Settings" -msgstr "Configuração da Wii" - -msgid "WiiTDB Files" -msgstr "WiiTDB" - -msgid "WiiTDB Path" -msgstr "Pasta WiiTDB" - -msgid "WiiTDB is up to date." -msgstr "" - -msgid "Wiilight" -msgstr "Iluminação Leitor" - -msgid "Wrong Password" -msgstr "Password Incorrecta" - -msgid "Yes" -msgstr "Sim" - -msgid "You are currently using IOS" -msgstr "" - -msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." -msgstr "" - -msgid "You need to select or format a partition" -msgstr "Necessita seleccionar ou formatar uma partição" - -msgid "and translators for language files updates" -msgstr "" - -msgid "available" -msgstr "disponível" - -msgid "does not exist!" -msgstr "não existe!" - -msgid "does not exist! Loading game without cheats." -msgstr "não existe! Carregando jogo sem truques." - -msgid "files left" -msgstr "ficheiros restantes" - -msgid "for FAT/NTFS support" -msgstr "pelo suporte FAT/NTFS" - -msgid "for Ocarina" -msgstr "pelo Ocarina" - -msgid "for WiiTDB and hosting covers / disc images" -msgstr "por WiiTDB e alojar img. capas / discos" - -msgid "for diverse patches" -msgstr "por diversos patches" - -msgid "for his awesome tool LibWiiGui" -msgstr "pela sua espectacular ferramenta LibWiiGui" - -msgid "for hosting the themes" -msgstr "por alojar os temas" - -msgid "for hosting the update files" -msgstr "por alojar actualizações" - -msgid "for the USB Loader source" -msgstr "pelo código do USB Loader" - -msgid "formatted!" -msgstr "formatado!" - -msgid "free" -msgstr "livres" - -msgid "not set" -msgstr "não definido" - -msgid "of" -msgstr "de" - -msgid "seconds left" -msgstr "segundos restantes" - -#~ msgid "Author:" -#~ msgstr "Autor:" - -#~ msgid "Download Boxart image?" -#~ msgstr "Descarregar imagem da Caixa?" - -#~ msgid "Download Discart image?" -#~ msgstr "Descarregar imagem do Disco?" - -#~ msgid "Downloading file" -#~ msgstr "Descarregando ficheiro:" - -#~ msgid "Missing files" -#~ msgstr "Ficheiros em falta" - -#~ msgid "files not found on the server!" -#~ msgstr "ficheiros não encontrados no servidor!" - -#~ msgid "Disc Images" -#~ msgstr "Imagens de Disco" - -#~ msgid "Only Customs" -#~ msgstr "Apenas Alternativas" - -#~ msgid "Only Original" -#~ msgstr "Apenas Originais" - -#~ msgid "Do you really want to delete:" -#~ msgstr "Tem a certeza que quer eliminar o jogo:" - -#~ msgid "Do you want to use the alternate DOL that is known to be correct?" -#~ msgstr "Pretende usar o DOL alternativo que se pensa ser o correcto?" - -#~ msgid "BETA revisions" -#~ msgstr "Revisões BETA" - -#~ msgid "Unlock console to use this option." -#~ msgstr "Desbloquear configuração antes de usar esta opção." - -#~ msgid "Full Shutdown" -#~ msgstr "Desligar" - -#~ msgid "GXtheme.cfg not found in any subfolder." -#~ msgstr "GXtheme.cfg não encontrado em nenhuma sub-pasta." - -#~ msgid "If you don't have WiFi, press 1 to get an URL to get your WiiTDB.zip" -#~ msgstr "Pressione 1 para ver o URL de onde pode descarregar o ficheiro WiiTDB.zip" - -#~ msgid "Paste it into your browser to get your WiiTDB.zip." -#~ msgstr "Copie para o seu browser de Internet para descarregar o WiiTDB.zip" - -#~ msgid "Shutdown to Idle" -#~ msgstr "Standby" - -#~ msgid "Your URL has been saved in %sWiiTDB_URL.txt." -#~ msgstr "O URL foi guardado em %sWiiTDB_URL.txt." - -#~ msgid "Can't create file" -#~ msgstr "Não é possível criar o ficheiro" - -#~ msgid "Connection lost..." -#~ msgstr "Ligação perdida..." - -#~ msgid "Download failed." -#~ msgstr "O download falhou." - -#~ msgid "Download request failed." -#~ msgstr "O pedido de download falhou." - -#~ msgid "Downloading Page List:" -#~ msgstr "Descarregando Lista de Páginas:" - -#~ msgid "Theme Download Path" -#~ msgstr "Pasta Download Temas" - -#~ msgid "Transfer failed." -#~ msgstr "A transferência falhou." - -#~ msgid "Unsupported format, try to extract manually." -#~ msgstr "Formato não suportado, tente extrair manualmente." - -#~ msgid "and translaters for language files updates" -#~ msgstr "e aos tradutores pela actualização dos idiomas" - -#~ msgid "Insert an SD-Card to save." -#~ msgstr "Insira um cartão SD para guardar." - -#~ msgid "Insert an SD-Card to use this option." -#~ msgstr "Insira um cartão SD para usar esta funcionalidade." - -#~ msgid "No SD-Card inserted!" -#~ msgstr "Cartão SD não inserido!" - -#~ msgid "Waiting for USB Device" -#~ msgstr "Aguardando pelo Dispositivo USB" - -#~ msgid "Back to Loader" -#~ msgstr "Loader" - -#~ msgid "FAT: Use directories" -#~ msgstr "FAT: Utilizar pastas" - -#~ msgid "All partitions" -#~ msgstr "Todas as partições" - -#~ msgid "Game partition" -#~ msgstr "Partição de Jogos" - -#~ msgid "Install 1:1 Copy" -#~ msgstr "Instalar Cópia 1:1" - -#~ msgid "An Error occured" -#~ msgstr "Ocurreu um Erro" - -#~ msgid "Are you sure you want to enable Parent Control?" -#~ msgstr "Tem a certeza que pretende activar o Controlo Parental?" - -#~ msgid "AutoPatch" -#~ msgstr "Patch automático" - -#~ msgid "Checking for Updates" -#~ msgstr "Procurando Actualizações" - -#~ msgid "Downloading" -#~ msgstr "Descarregando" - -#~ msgid "Invalid PIN code" -#~ msgstr "PIN inválido" - -#~ msgid "Parental Control disabled" -#~ msgstr "Controlo Parental inactivo" - -#~ msgid "The wad file was installed. But It could not be deleted from the SD card." -#~ msgstr "O ficheiro wad foi instalado mas não foi possível eliminá-lo do cartão SD." - -#~ msgid "The wad installation failed with error %ld" -#~ msgstr "A instalação do wad falhou com o seguinte erro: %ld" - -#~ msgid "Unable to open the wad that was just downloaded (%s)." -#~ msgstr "Não é possível abrir o ficheiro wad descarregado (%s)." - -#~ msgid "Unlock Parental Control" -#~ msgstr "Desbloquear Controlo Parental" - -#~ msgid "Update to" -#~ msgstr "Actualizando para" - -#~ msgid "Updating" -#~ msgstr "Actualizando" - -#~ msgid "Updating Language Files..." -#~ msgstr "Actualizando ficheiros de Idioma..." - -#~ msgid "Updating WiiTDB.zip" -#~ msgstr "Actualizando WiiTDB.zip" - -#~ 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)." - -#~ msgid "%s : %s May not boot correctly if your System Menu is not up to date." -#~ msgstr "%s : %s Pode não carregar correctamente se o System Menu estiver desactualizado." - -#~ msgid "BCA Codes Path changed" -#~ msgstr "Pasta de Códigos BCA alterada" - -#~ msgid "Back to Wii Menu" -#~ msgstr "Menu da Wii" - -#~ msgid "Channels" -#~ msgstr "Canais" - -#~ msgid "Checking existing artwork" -#~ msgstr "Verificando imagens existentes" - -#~ msgid "Confirm" -#~ msgstr "Confirmar" - -#~ msgid "Could not find a WBFS partition." -#~ msgstr "Não foi encontrada nenhuma partição WBFS." - -#~ msgid "Could not open WBFS partition" -#~ msgstr "Não foi possível abrir a partição WBFS" - -#~ msgid "Could not read the disc." -#~ msgstr "Não foi possível ler o disco." - -#~ msgid "Could not set USB." -#~ msgstr "Não foi possível configurar a porta USB." - -#~ msgid "Cover Path Changed" -#~ msgstr "Pasta das Capas alterada" - -#~ msgid "DOL path changed" -#~ msgstr "Pasta DOL alterada" - -#~ msgid "Disc Path Changed" -#~ msgstr "Pasta das Imagens Disco Alterada" - -#~ msgid "Display favorites" -#~ msgstr "Mostrar favoritos" - -#~ msgid "Do you want to retry for 30 secs?" -#~ msgstr "Deseja tentar novamente dentro de 30 segs?" - -#~ msgid "Enable Parental Control" -#~ msgstr "Activar Controlo Parental" - -#~ msgid "Force" -#~ msgstr "Forçar" - -#~ msgid "GCT Cheatcodes Path changed" -#~ msgstr "Pasta ficheiros GCT alterada" - -#~ msgid "Hermes CIOS" -#~ msgstr "CIOS Hermes" - -#~ msgid "Homebrew Appspath changed" -#~ msgstr "Pasta Apps Homebrew alterada" - -#~ msgid "Insert an SD-Card to download images." -#~ msgstr "Insira um cartão SD para descarregar as imagens." - -#~ msgid "Install not possible" -#~ msgstr "Não é possível instalar" - -#~ msgid "Most likely it has dimensions that are not evenly divisible by 4." -#~ msgstr "O mais provável é que o tamanho não seja divisível por 4." - -#~ msgid "Network init error" -#~ msgstr "Erro ao inicializar ligação de rede" - -#~ msgid "No .dol or .elf files found." -#~ msgstr "No não foram encontrados nenhuns ficheiros .dol ou .elf" - -#~ msgid "No Favorites" -#~ msgstr "Lista de favoritos vazia" - -#~ msgid "No USB Device" -#~ msgstr "Nenhum dispositivo USB encontrado" - -#~ msgid "No USB Device found." -#~ msgstr "Nenhum dispositivo USB encontrado." - -#~ msgid "No WBFS or FAT/NTFS partition found" -#~ msgstr "Nenhuma partição WBFS ou FAT/NTFS encontrada" - -#~ msgid "Normal Covers" -#~ msgstr "Capas Normais" - -#~ msgid "Not Found" -#~ msgstr "Não encontrado" - -#~ msgid "Not a DOL/ELF file." -#~ msgstr "Não é um ficheiro DOL/ELF válido." - -#~ msgid "Reset to standard BGM?" -#~ msgstr "Repor Musica de Fundo predefinida?" - -#~ msgid "Save Failed" -#~ msgstr "Falha ao Gravar" - -#~ msgid "Selected DOL" -#~ msgstr "DOL Seleccionado" - -#~ msgid "Standard" -#~ msgstr "Standard" - -#~ msgid "TXT Cheatcodes Path changed" -#~ msgstr "Pasta de Dicas alterada" - -#~ msgid "Theme Download Path changed" -#~ msgstr "Pasta para Download de Temas Alterada" - -#~ msgid "Theme Path Changed" -#~ msgstr "Pasta dos Temas alterada" - -#~ msgid "USB Loader GX will only run with Hermes CIOS rev 4! Please make sure you have revision 4 installed!" -#~ msgstr "O USB Loader GX só suporta o CIOS Hermes revisão 4! Verifique se esta é a revisão que tem instalada!" - -#~ msgid "Update Path changed." -#~ msgstr "A pasta das actualizações foi alterada." - -#~ msgid "WIP Patches Path changed" -#~ msgstr "Pasta dos Patches WIP alterada" - -#~ msgid "WiiTDB Path changed." -#~ msgstr "Pasta WiiTDB alterada." - -#~ msgid "You are about to delete " -#~ msgstr "Vais eliminar " - -#~ 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." - -#~ msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible." -#~ msgstr "Está a utilizar um sistema de ficheiros NTFS. Devido à possibilidade de ocorrerem erros na gravação não será possível instalar jogos." - -#~ msgid "You have attempted to load a bad image" -#~ msgstr "Tentou carregar uma imagem corrompida" - -#~ msgid "does not exist! You Messed something up, Idiot." -#~ msgstr "não existe! Estragaste algo, idiota." - -#~ msgid "file left" -#~ msgstr "ficheiro restante" diff --git a/Languages/russian.lang b/Languages/russian.lang deleted file mode 100644 index c46bcb8a..00000000 --- a/Languages/russian.lang +++ /dev/null @@ -1,1815 +0,0 @@ -# USB Loader GX language source file. -# russian.lang - r885 -# don't delete/change this line (é). -msgid "" -msgstr "" -"Project-Id-Version: USB Loader GX\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-06 19:36+0100\n" -"PO-Revision-Date: 2009-10-01 01:00+0200\n" -"Last-Translator: nikolai_ca\n" -"Language-Team: Kir, alendit, nikolai_ca\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -msgid " Wad Saved as:" -msgstr " Wad сохранен как:" - -msgid " could not be downloaded." -msgstr " не мог быть загружен" - -msgid " has been Saved. The text has not been verified. Some of the code may not work right with each other. If you experience trouble, open the text in a real text editor for more information." -msgstr " был сохранен. Текст не был проверен. Некоторые части кода могут не работать успешно друг с другом. При обнаружении проблемы, загрузить текст в текстовый редактор чтобы получить дополнительную информацию." - -msgid " is not on the server." -msgstr " не найден на сервере" - -#, c-format -msgid "%i files not found on the server!" -msgstr "" - -#, c-format -msgid "%i missing files" -msgstr "" - -msgid "0 (Everyone)" -msgstr "0 (Для всех)" - -msgid "1 (Child 7+)" -msgstr "1 (Дети 7+)" - -msgid "1 hour" -msgstr "1 час" - -msgid "10 min" -msgstr "10 мин." - -msgid "2 (Teen 12+)" -msgstr "2 (Подростки 12+)" - -msgid "20 min" -msgstr "20 мин." - -msgid "2D Cover Path" -msgstr "Путь к 2D обложкам" - -msgid "3 (Mature 16+)" -msgstr "3 (Подростки 16+)" - -msgid "3 min" -msgstr "3 мин." - -msgid "30 min" -msgstr "30 мин." - -msgid "3D Cover Path" -msgstr "Путь к 3D обложкам" - -msgid "3D Covers" -msgstr "3D Обложки" - -msgid "4 (Adults Only 18+)" -msgstr "4 (Взрослые 18+)" - -msgid "5 min" -msgstr "5 мин." - -msgid ">> Deleting tickets..." -msgstr ">> Удаление тикетов...." - -msgid ">> Deleting tickets...ERROR! " -msgstr ">> Удаление тикетов...ОШИБКА! " - -msgid ">> Deleting tickets...Ok! " -msgstr ">> Удаление тикетов...Успешно! " - -msgid ">> Deleting title ...ERROR! " -msgstr ">> Удаление тайтла ...ОШИБКА! " - -msgid ">> Deleting title ...Ok!" -msgstr ">> Удаление тайтла ...Успешно!" - -msgid ">> Deleting title contents..." -msgstr ">> Удаление содержимого тайтла..." - -msgid ">> Deleting title contents...ERROR! " -msgstr ">> Удаление содержимого тайтла...ОШИБКА!" - -msgid ">> Deleting title contents...Ok!" -msgstr ">> Удаление содержимого тайтла...Успешно!" - -msgid ">> Deleting title..." -msgstr ">> Удаление тайтла..." - -msgid ">> Finishing installation..." -msgstr ">> Заканчиваю установку..." - -msgid ">> Installing content #" -msgstr ">>Установка контента №" - -msgid ">> Installing ticket..." -msgstr ">>Установка тикета..." - -msgid ">> Installing title..." -msgstr ">>Установка тайтла" - -msgid ">> Reading WAD data..." -msgstr ">> Чтение данных WAD..." - -msgid ">> Reading WAD data...ERROR! " -msgstr ">> Чтение данных WAD...ОШИБКА!" - -msgid ">> Reading WAD data...Ok!" -msgstr ">> Чтение данных WAD...Успешно!" - -msgid "AUTO" -msgstr "АВТО" - -msgid "All Partitions" -msgstr "" - -msgid "All images downloaded successfully." -msgstr "" - -msgid "All the features of USB Loader GX are unlocked." -msgstr "Все функции USB Loader GX разблокированы." - -msgid "Alternate DOL" -msgstr "Альтернативный DOL" - -msgid "Anti" -msgstr "Анти" - -msgid "App Language" -msgstr "Язык приложения" - -msgid "Apply" -msgstr "" - -msgid "Apr" -msgstr "Апр" - -msgid "Are you sure you want to lock USB Loader GX?" -msgstr "" - -msgid "Are you sure you want to reset?" -msgstr "" - -msgid "Are you sure?" -msgstr "Вы уверены ?" - -msgid "Aug" -msgstr "Авг" - -msgid "Author(s):" -msgstr "" - -msgid "AutoInit Network" -msgstr "АвтоИнициализация Сети" - -msgid "Automatic port switching is done on the fly. You need to change all custom paths to SD-Card first for this option or else it could damage a filesystem." -msgstr "" - -msgid "BCA Codes Path" -msgstr "Путь к кодам BCA" - -msgid "Back" -msgstr "Назад" - -msgid "Back to HBC or Wii Menu" -msgstr "Вернуться в HBC или меню Wii" - -msgid "Backgroundmusic" -msgstr "Фоновая музыка" - -msgid "Big thanks to:" -msgstr "Большое спасибо:" - -msgid "Block Cover Downloads" -msgstr "" - -msgid "Block Custom Paths" -msgstr "" - -msgid "Block Game Install" -msgstr "" - -msgid "Block Game Settings" -msgstr "" - -msgid "Block GameID Change" -msgstr "" - -msgid "Block Global Settings" -msgstr "" - -msgid "Block Gui Settings" -msgstr "" - -msgid "Block HBC Menu" -msgstr "" - -msgid "Block IOS Reload" -msgstr "Блокировать перезагрузку IOS" - -msgid "Block Loader Settings" -msgstr "" - -msgid "Block Parental Settings" -msgstr "" - -msgid "Block Reset Settings" -msgstr "" - -msgid "Block Sound Settings" -msgstr "" - -msgid "Block Theme Downloader" -msgstr "" - -msgid "Block Theme Menu" -msgstr "" - -msgid "Block Title Launcher" -msgstr "" - -msgid "Block Updates" -msgstr "" - -msgid "Boot/Standard" -msgstr "Загрузка/Стандарт" - -msgid "Boot?" -msgstr "Загрузить?" - -msgid "Both" -msgstr "Оба" - -msgid "Both Ports" -msgstr "" - -msgid "Can't be formatted" -msgstr "Невозможно отформатировать" - -msgid "Can't create directory" -msgstr "Не могу создать папку" - -#, c-format -msgid "Can't create path: %s" -msgstr "" - -msgid "Can't delete:" -msgstr "Невозможно удалить:" - -msgid "Cancel" -msgstr "Отмена" - -msgid "Cannot write to destination." -msgstr "" - -msgid "Change Play Path" -msgstr "" - -msgid "Cheatfile is blank" -msgstr "Файл с читами пустой" - -msgid "Clear" -msgstr "" - -msgid "Click to Download Covers" -msgstr "Нажми, чтобы скачать обложки" - -msgid "Click to change game ID" -msgstr "Нажмите чтобы изменить ID игры" - -msgid "Clock" -msgstr "Часы" - -msgid "Close" -msgstr "Закрыть" - -msgid "Code Download" -msgstr "Скачивание кода" - -#, c-format -msgid "Coded by: %s" -msgstr "Создано: %s" - -msgid "Coding:" -msgstr "Создание:" - -msgid "Connection to server timed out." -msgstr "" - -msgid "Console" -msgstr "Консоль" - -msgid "Console Default" -msgstr "По умолчанию (консоль)" - -msgid "Console Locked" -msgstr "Консоль заблокирована" - -msgid "Console must be unlocked for this option." -msgstr "" - -msgid "Console should be unlocked to modify it." -msgstr "Для изменения консоль должна быть разблокирована." - -msgid "Continue to install game?" -msgstr "Продолжить установку игры ?" - -msgid "Controllevel" -msgstr "Уровень контроля" - -msgid "Correct Password" -msgstr "Правильный пароль" - -msgid "Could not connect to the server." -msgstr "" - -msgid "Could not create GCT file" -msgstr "Не могу создать GCT файл" - -#, c-format -msgid "Could not create path: %s" -msgstr "" - -msgid "Could not find info for this game in the wiitdb.xml." -msgstr "" - -msgid "Could not initialize DIP module!" -msgstr "Не могу запустить модуль DIP!" - -msgid "Could not initialize network!" -msgstr "Не могу инициализировать сеть!" - -msgid "Could not open Disc" -msgstr "Не могу прочесть диск" - -msgid "Could not open wiitdb.xml." -msgstr "" - -msgid "Could not save." -msgstr "Не могу сохранить." - -msgid "Cover Download" -msgstr "Скачать обложку" - -msgid "Create" -msgstr "Создать" - -msgid "Credits" -msgstr "Об авторах" - -msgid "Custom Discarts" -msgstr "" - -msgid "Custom Paths" -msgstr "Изменение путей" - -msgid "Customs/Original" -msgstr "Измененный/Оригинальные" - -msgid "DOL Path" -msgstr "Путь к DOL" - -msgid "Dec" -msgstr "Дек" - -msgid "Default" -msgstr "По умолчанию" - -msgid "Default Gamesettings" -msgstr "Установки игры по умолчанию" - -msgid "Default Settings" -msgstr "Установки по умолчанию" - -msgid "Delete" -msgstr "Удалить" - -msgid "Delete ?" -msgstr "Удалить ?" - -msgid "Delete Cheat GCT" -msgstr "Удалить чит-код GCT" - -msgid "Delete Cheat TXT" -msgstr "Удалить чит-код TXT" - -msgid "Delete Cover Artwork" -msgstr "Удалить обложку" - -msgid "Delete Disc Artwork" -msgstr "Удалить картинку диска" - -msgid "Design:" -msgstr "Дизайн:" - -msgid "Developed by" -msgstr "Создано " - -msgid "Directory does not exist!" -msgstr "Каталог не существует!" - -msgid "Disc Artwork Download" -msgstr "Загрузка изображений диска" - -msgid "Disc Artwork Path" -msgstr "Путь к изображениям дисков" - -msgid "Disc Default" -msgstr "По умолчанию (диск)" - -msgid "DiskFlip" -msgstr "ДискФлип" - -msgid "Display" -msgstr "Отображать" - -msgid "Display as a carousel" -msgstr "Покаказть в виде карусели" - -msgid "Display as a grid" -msgstr "Показать в виде сетки" - -msgid "Display as a list" -msgstr "Показать в виде списка" - -msgid "Display favorites only" -msgstr "" - -msgid "Do you want to apply it now?" -msgstr "Вы действительно хотите использовать это?" - -msgid "Do you want to apply this theme?" -msgstr "" - -msgid "Do you want to change language?" -msgstr "Вы хотите сменить язык ?" - -msgid "Do you want to download this theme?" -msgstr "Вы действительно хотите загрузить эту тему?" - -msgid "Do you want to format:" -msgstr "Вы хотите отформатировать:" - -msgid "Do you want to load the default theme?" -msgstr "" - -msgid "Do you want to sync free space info sector on all FAT32 partitions?" -msgstr "" - -msgid "Do you wish to update/download all language files?" -msgstr "Вы действительно хотите обновить/загрузить все языковые файлы?" - -msgid "Done!" -msgstr "Готово!" - -msgid "Download" -msgstr "Загрузка" - -msgid "Download Now" -msgstr "Скачать сейчас" - -msgid "Download finished" -msgstr "Скачивание завершено" - -msgid "Downloading 3D Covers" -msgstr "" - -msgid "Downloading Flat Covers" -msgstr "" - -msgid "Downloading Full HQ Covers" -msgstr "" - -msgid "Downloading Full LQ Covers" -msgstr "" - -msgid "Downloading custom Discarts" -msgstr "" - -msgid "Downloading file..." -msgstr "" - -msgid "Downloading image:" -msgstr "Загружается картинка:" - -msgid "Downloading original Discarts" -msgstr "" - -msgid "Downloading pagelist:" -msgstr "" - -msgid "Dutch" -msgstr "Голландский" - -msgid "ERROR" -msgstr "ОШИБКА" - -msgid "ERROR:" -msgstr "ОШИБКА:" - -msgid "ERROR: Can't set up theme." -msgstr "ОШИБКА: Не удалось установить тему." - -msgid "English" -msgstr "Английский" - -msgid "Error" -msgstr "Ошибка" - -msgid "Error !" -msgstr "Ошибка !" - -msgid "Error 002 fix" -msgstr "Фикс ошибки 002" - -#, c-format -msgid "Error creating path: %s" -msgstr "" - -msgid "Error opening downloaded file" -msgstr "" - -msgid "Error reading Disc" -msgstr "Ошибка чтения диска" - -#, c-format -msgid "Error when downloading file: %i" -msgstr "" - -msgid "Error while downloding file" -msgstr "" - -msgid "Error while opening the zip." -msgstr "" - -msgid "Error while transfering data." -msgstr "Ошибка при передаче данных." - -msgid "Error while updating USB Loader GX." -msgstr "" - -msgid "Error writing the data." -msgstr "" - -msgid "Error..." -msgstr "Ошибка..." - -msgid "Error:" -msgstr "Ошибка:" - -msgid "Exit" -msgstr "" - -msgid "Exit to where?" -msgstr "" - -msgid "Extracting files..." -msgstr "Распаковка файлов..." - -msgid "Failed formating" -msgstr "Форматирование не удалось" - -msgid "Failed to extract." -msgstr "Не удалось распаковать." - -msgid "Failed to open partition" -msgstr "Не удалось открыть раздел" - -msgid "Failed updating" -msgstr "" - -msgid "Feb" -msgstr "Фев" - -msgid "File not found." -msgstr "Файл не найден" - -#, c-format -msgid "Filesize is %i Byte." -msgstr "" - -msgid "Filesize is 0 Byte." -msgstr "" - -msgid "Finishing installation... Ok!" -msgstr "Завершение установки... ОК!" - -msgid "Flat Covers" -msgstr "" - -msgid "Flip-X" -msgstr "Flip-X" - -msgid "Force NTSC" -msgstr "" - -msgid "Force PAL50" -msgstr "" - -msgid "Force PAL60" -msgstr "" - -msgid "Format" -msgstr "Форматировать" - -msgid "Formatting, please wait..." -msgstr "Форматирую, пожалуйста подождите..." - -msgid "Found missing images." -msgstr "" - -msgid "Free Space" -msgstr "Свободное пространство" - -msgid "French" -msgstr "Французский" - -msgid "Full Cover Path" -msgstr "" - -msgid "Full HQ Covers" -msgstr "" - -msgid "Full LQ Covers" -msgstr "" - -msgid "Full Menu" -msgstr "" - -msgid "Full shutdown" -msgstr "" - -msgid "GAMEID_Gamename" -msgstr "" - -msgid "GCT Cheatcodes Path" -msgstr "Путь к читам" - -msgid "GCT File created" -msgstr "Файл GCT создан" - -msgid "GUI Settings" -msgstr "Настройки интерфейса" - -msgid "Game ID" -msgstr "ID игры" - -msgid "Game IOS" -msgstr "" - -msgid "Game Language" -msgstr "Язык" - -msgid "Game Load" -msgstr "загрузка игры" - -msgid "Game Lock" -msgstr "" - -msgid "Game Only" -msgstr "" - -msgid "Game Region" -msgstr "Регион игры" - -msgid "Game Size" -msgstr "Размер игры" - -msgid "Game Sound Mode" -msgstr "Режим звука в игре" - -msgid "Game Sound Volume" -msgstr "Громкость звука в игре" - -msgid "Game Split Size" -msgstr "" - -msgid "Game is already installed:" -msgstr "Игра уже установлена:" - -msgid "Game/Install Partition" -msgstr "" - -msgid "Gamename [GAMEID]" -msgstr "" - -msgid "Games" -msgstr "Игры" - -msgid "Genre:" -msgstr "" - -msgid "German" -msgstr "Немецкий" - -msgid "Global Settings" -msgstr "" - -msgid "HOME Menu" -msgstr "Домашнее Меню" - -msgid "Homebrew Apps Path" -msgstr "Путь к хоумбрю-программам" - -msgid "Homebrew Channel" -msgstr "" - -msgid "Homebrew Launcher" -msgstr "Загрузчик хоумбрю" - -msgid "Hour" -msgstr "Час" - -msgid "How do you want to update?" -msgstr "Что вы хотите обновить ?" - -msgid "How to Shutdown?" -msgstr "Способ отключения?" - -#, c-format -msgid "Incoming file %0.2fKB" -msgstr "Входящий файл размером в %0.2fKB" - -#, c-format -msgid "Incoming file %0.2fMB" -msgstr "Входящий файл размером в %0.2fMB" - -msgid "Initializing Network" -msgstr "Инициализирую сеть" - -msgid "Insert Disk" -msgstr "Вставьте диск" - -msgid "Insert a Wii Disc!" -msgstr "Вставьте диск Wii!" - -msgid "Install" -msgstr "Установка" - -msgid "Install Error!" -msgstr "Ошибка установки!" - -msgid "Install a game" -msgstr "Установить игру" - -msgid "Install directories" -msgstr "" - -msgid "Install partitions" -msgstr "Установить разделы" - -msgid "Installing content... Ok!" -msgstr "Установка контента... ОК!" - -msgid "Installing game:" -msgstr "Устанавливаю игру:" - -msgid "Installing ticket... Ok!" -msgstr "Установка тикета... ОК!" - -msgid "Installing title... Ok!" -msgstr "Установка тайтла... ОК!" - -msgid "Installing wad" -msgstr "Установка WAD" - -msgid "Issue manager /" -msgstr "" - -msgid "It seems that you have some information that will be helpful to us. Please pass this information along to the DEV team." -msgstr "Возможно что у Вас есть информация полезная нам. Пожалуйста передайте эту информацию команде разработчиков." - -msgid "Italian" -msgstr "Итальянский" - -msgid "Jan" -msgstr "Янв" - -msgid "Japanese" -msgstr "Японский" - -msgid "July" -msgstr "Июл" - -msgid "June" -msgstr "Июн" - -msgid "Keep" -msgstr "Сохранить" - -msgid "Keyboard" -msgstr "Клавиатура" - -msgid "Korean" -msgstr "Корейский" - -msgid "Language File" -msgstr "Языковой файл" - -msgid "Language change:" -msgstr "Смена языка:" - -msgid "Languagefiles Path" -msgstr "" - -msgid "Languagepath changed." -msgstr "Путь к языкам изменен" - -msgid "Left" -msgstr "Налево" - -msgid "Like SysMenu" -msgstr "как SysMenu" - -msgid "List on Gamelaunch" -msgstr "" - -msgid "Load" -msgstr "Загрузить" - -msgid "Load From SD/USB" -msgstr "Загрузка с SD/USB" - -#, c-format -msgid "Load file from: %s ?" -msgstr "Загрузить файл из %s ?" - -msgid "Load this DOL as alternate DOL?" -msgstr "Загрузить этот DOL в качестве альтернативного ?" - -msgid "Loader Settings" -msgstr "" - -msgid "Loading standard language." -msgstr "Загрузка языка по умолчанию" - -msgid "Loading standard music." -msgstr "Загрузка стандартной музыки" - -msgid "Lock Console" -msgstr "Заблокировать консоль" - -msgid "Lock USB Loader GX" -msgstr "" - -msgid "Locked" -msgstr "Заблокировано" - -msgid "Loop Directory" -msgstr "" - -msgid "Loop Music" -msgstr "" - -msgid "Loop Sound" -msgstr "Зациклить звут" - -msgid "Main tester:" -msgstr "" - -msgid "Mar" -msgstr "Мар" - -msgid "Mark new games" -msgstr "Отметить новые игры" - -msgid "May" -msgstr "Май" - -msgid "Messageboard Update" -msgstr "" - -msgid "Motion+ Video" -msgstr "" - -msgid "Mount DVD drive" -msgstr "Монтировать DVD" - -msgid "Multiple Partitions" -msgstr "" - -msgid "Music Loop Mode" -msgstr "" - -msgid "Music Volume" -msgstr "Громкость" - -msgid "Neither" -msgstr "Ни то, ни другое" - -msgid "Network is not initiated." -msgstr "" - -msgid "New Disc Detected" -msgstr "Обнаружен новый диск" - -msgid "Next" -msgstr "Следующий" - -msgid "No" -msgstr "Нет" - -msgid "No Cheatfile found" -msgstr "Не найден файл с читами" - -msgid "No DOL file found on disc." -msgstr "DOL-файл не найден на диске." - -msgid "No Splitting" -msgstr "" - -msgid "No URL or Path specified." -msgstr "" - -msgid "No WBFS or FAT/NTFS/EXT partition found" -msgstr "" - -msgid "No cheats were selected" -msgstr "Не было выбрано ни одного чит-кода" - -msgid "No data could be read." -msgstr "Невозможно считать данные." - -msgid "No favorites selected." -msgstr "" - -msgid "No file missing!" -msgstr "Файл не найден!" - -msgid "No new updates." -msgstr "Нет обновлений" - -msgid "No themes found on the site." -msgstr "На сайте не найдено ни одной темы" - -msgid "No themes found." -msgstr "" - -msgid "None" -msgstr "" - -msgid "Normal" -msgstr "Обычный" - -msgid "Not a WAD file." -msgstr "" - -msgid "Not a Wii Disc" -msgstr "Это не диск Wii" - -msgid "Not a valid URL" -msgstr "" - -msgid "Not a valid URL path" -msgstr "" - -msgid "Not a valid domain" -msgstr "" - -msgid "Not enough free memory." -msgstr "Недостаточно памяти" - -msgid "Not enough free space!" -msgstr "Не хватает свободного места!" - -msgid "Not enough memory." -msgstr "" - -msgid "Not required" -msgstr "" - -msgid "Not supported format!" -msgstr "Формат не поддерживается" - -msgid "Nov" -msgstr "Ноя" - -msgid "OFF" -msgstr "ВЫКЛ" - -msgid "OK" -msgstr "OK" - -msgid "ON" -msgstr "ВКЛ" - -msgid "Ocarina" -msgstr "" - -msgid "Oct" -msgstr "Окт" - -msgid "Official Site:" -msgstr "Оф. сайт:" - -msgid "Offset" -msgstr "" - -msgid "Only Game Partition" -msgstr "" - -msgid "Only for Install" -msgstr "Только при установке" - -msgid "Original Discarts" -msgstr "" - -msgid "Original/Customs" -msgstr "Измененные/Модифицированные" - -msgid "Parental Control" -msgstr "Родительский Контроль" - -msgid "Partition" -msgstr "Раздел" - -msgid "Password" -msgstr "Пароль" - -msgid "Password Changed" -msgstr "Пароль изменен" - -msgid "Password has been changed" -msgstr "Пароль был изменен" - -msgid "Patch Country Strings" -msgstr "Патчить строки страны" - -msgid "Path Changed" -msgstr "" - -msgid "Permission denied." -msgstr "" - -msgid "Pick from a list" -msgstr "Выберите из списка" - -msgid "Play Count" -msgstr "Запущено раз" - -msgid "Play Next" -msgstr "" - -msgid "Play Once" -msgstr "" - -msgid "Play Previous" -msgstr "" - -msgid "Playing Music:" -msgstr "" - -msgid "Please wait..." -msgstr "Пожалуйста подождите..." - -msgid "Power off the Wii" -msgstr "Выключить Wii" - -msgid "Prev" -msgstr "Предыдущий" - -msgid "Prompts Buttons" -msgstr "Кнопки приглашения" - -msgid "Published by" -msgstr "Опубликовано: " - -msgid "Quick Boot" -msgstr "Быстрая загрузка" - -msgid "Random Directory Music" -msgstr "" - -msgid "Reading WAD data... Ok!" -msgstr "Чтение данных WAD... ОК!" - -msgid "Receiving file from:" -msgstr "Получение файлы из:" - -msgid "Region Patch" -msgstr "" - -msgid "Released" -msgstr "Выпущено:" - -msgid "Reload SD" -msgstr "Перечитать SD карту" - -msgid "Remove update" -msgstr "" - -msgid "Rename Game on WBFS" -msgstr "Переименовать игры в WBFS" - -msgid "Reset" -msgstr "" - -msgid "Reset BG Music" -msgstr "" - -msgid "Reset Playcounter" -msgstr "Сбросить счетчик запусков" - -msgid "Reset to default BGM?" -msgstr "" - -msgid "Restarting..." -msgstr "Перезапускаю..." - -msgid "Return" -msgstr "Вернуться" - -msgid "Return To" -msgstr "" - -msgid "Return to Wii Menu" -msgstr "Вернуться в меню Wii" - -msgid "Right" -msgstr "Направо" - -msgid "Rumble" -msgstr "Вибрация" - -msgid "SChinese" -msgstr "Упрощенный китайский" - -msgid "SFX Volume" -msgstr "Громкость эффектов" - -msgid "Save" -msgstr "Сохранить" - -msgid "Save Failed. No device inserted?" -msgstr "" - -msgid "Save Game List to" -msgstr "Сохранить список игр в" - -msgid "Save List" -msgstr "" - -msgid "Saved" -msgstr "Сохранено" - -msgid "Screensaver" -msgstr "Скринсейвер" - -msgid "Select" -msgstr "" - -msgid "Select DOL Offset" -msgstr "" - -msgid "Select a DOL" -msgstr "Выберите DOL" - -msgid "Select a DOL from Game" -msgstr "" - -msgid "Sept" -msgstr "Сен" - -msgid "Set Search-Filter" -msgstr "Установить фильтр для поиска" - -msgid "Settings" -msgstr "Установки" - -msgid "Show Free Space" -msgstr "" - -msgid "Shutdown System" -msgstr "Выключить систему" - -msgid "Shutdown Wii" -msgstr "" - -msgid "Sort alphabetically" -msgstr "Сортировать по алфавиту" - -msgid "Sort by number of players" -msgstr "" - -msgid "Sort by rank" -msgstr "Сортировать по популярности" - -msgid "Sort order by most played" -msgstr "Сортировать по частоте проигрывания" - -msgid "Sound" -msgstr "Звук" - -msgid "Sound Settings" -msgstr "" - -msgid "Sound+BGM" -msgstr "Звук и фоновая музыка" - -msgid "Sound+Quiet" -msgstr "Звук и тишина" - -msgid "Spanish" -msgstr "Испанский" - -msgid "Special thanks to:" -msgstr "Отдельные благодарности" - -msgid "Split each 2GB" -msgstr "" - -msgid "Split each 4GB" -msgstr "" - -msgid "Standby" -msgstr "" - -msgid "Success" -msgstr "Успех" - -msgid "Success:" -msgstr "Успех:" - -msgid "Successfully Saved" -msgstr "Успешно сохранено" - -msgid "Successfully Updated" -msgstr "Успешно обновлено" - -msgid "Successfully Updated thanks to www.techjawa.com" -msgstr "" - -msgid "Successfully deleted:" -msgstr "Успешно удалено:" - -msgid "Successfully extracted theme." -msgstr "Успешно извлечена тема." - -msgid "Successfully installed:" -msgstr "Успешно установлено:" - -msgid "Sync FAT32 FS Info" -msgstr "" - -msgid "Synchronizing..." -msgstr "" - -msgid "System Default" -msgstr "По умолчанию" - -msgid "TChinese" -msgstr "Традиционный китайский" - -msgid "TXT Cheatcodes Path" -msgstr "Путь к TXT читкодам" - -msgid "The .them file was not found in the zip." -msgstr "" - -msgid "The entered directory does not exist. Would you like to create it?" -msgstr "Заданный каталог не существует. Хотите создать его?" - -msgid "The game installation is disabled under this IOS because of instability in usb write." -msgstr "" - -msgid "The wad file was installed" -msgstr "" - -#, c-format -msgid "The wad installation failed with error %i" -msgstr "" - -msgid "Theme Downloader" -msgstr "Загрузчик тем" - -msgid "Theme Menu" -msgstr "" - -msgid "Theme Path" -msgstr "Путь к темам" - -msgid "Theme Title:" -msgstr "Заголовок темы:" - -msgid "Themes by www.spiffy360.com" -msgstr "" - -msgid "This IOS is the BootMii ios. If you are sure it is not BootMii and you have something else installed there than ignore this warning." -msgstr "" - -msgid "This IOS was not found on the titles list. If you are sure you have it installed than ignore this warning." -msgstr "" - -msgid "Time left:" -msgstr "Осталось времени:" - -msgid "Title Launcher" -msgstr "Загрузчик тайтла" - -msgid "Titles from WiiTDB" -msgstr "Названия из WiiTDB" - -msgid "Tooltips" -msgstr "Подсказки" - -msgid "Transfer failed" -msgstr "" - -msgid "USB Device not found" -msgstr "USB устройство не найдено" - -msgid "USB Loader GX is protected" -msgstr "USB Loader GX заблокирован" - -msgid "USB Port" -msgstr "" - -msgid "USB Port changing is only supported on Hermes cIOS." -msgstr "" - -msgid "Uninstall" -msgstr "Деинсталлировать" - -msgid "Uninstall Game" -msgstr "Деинсталлировать игру" - -msgid "Uninstall Menu" -msgstr "Деинсталлировать меню" - -msgid "Uninstall all" -msgstr "" - -msgid "Uninstalling wad" -msgstr "Деинсталлируется wad" - -msgid "Unknown" -msgstr "" - -msgid "Unlock USB Loader GX" -msgstr "" - -msgid "Unlocked" -msgstr "Разблокировано" - -msgid "Unsupported format, try to extract manually TempTheme.zip." -msgstr "" - -msgid "Update" -msgstr "Обновление" - -msgid "Update All" -msgstr "Обновить всё" - -msgid "Update DOL" -msgstr "Обновить DOL" - -msgid "Update Files" -msgstr "Обновить файлы" - -msgid "Update Path" -msgstr "Путь к обновлениям" - -msgid "Update all Language Files" -msgstr "Обновить все языковые файлы" - -msgid "Update failed" -msgstr "Обновление не удалось" - -msgid "Update successfull" -msgstr "" - -msgid "Updating Language Files:" -msgstr "Обновление языковых файлов:" - -msgid "Uploaded ZIP file installed to homebrew directory." -msgstr "Загруженный ZIP-файл установлен в каталог homebrew" - -msgid "VIDTV Patch" -msgstr "Патч VIDTV" - -msgid "Version:" -msgstr "" - -#, c-format -msgid "Version: %s" -msgstr "Версия: %s" - -msgid "Video Mode" -msgstr "Видео режим" - -msgid "WDM Files Path" -msgstr "" - -msgid "WIP Patches Path" -msgstr "Путь к патчам QIP" - -msgid "Waiting..." -msgstr "Ожидание..." - -msgid "Warning:" -msgstr "" - -msgid "What do you want to update?" -msgstr "Что Вы хотите обновить?" - -msgid "What should be deleted for this game title:" -msgstr "" - -msgid "WiFi Features" -msgstr "свойства WiFi" - -msgid "Widescreen Fix" -msgstr "Широкоформатный фикс" - -msgid "Wii Menu" -msgstr "Меню Wii" - -msgid "Wii Settings" -msgstr "Установки Wii" - -msgid "WiiTDB Files" -msgstr "Файлы WiiTDB" - -msgid "WiiTDB Path" -msgstr "Путь к WiiTDB" - -msgid "WiiTDB is up to date." -msgstr "" - -msgid "Wiilight" -msgstr "Подсветка Wii" - -msgid "Wrong Password" -msgstr "Неверный пароль" - -msgid "Yes" -msgstr "Да" - -msgid "You are currently using IOS" -msgstr "" - -msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." -msgstr "" - -msgid "You need to select or format a partition" -msgstr "" - -msgid "and translators for language files updates" -msgstr "" - -msgid "available" -msgstr "доступно" - -msgid "does not exist!" -msgstr "не существует!" - -msgid "does not exist! Loading game without cheats." -msgstr "не существует! Загружаю игру без читов" - -msgid "files left" -msgstr "файлов осталось" - -msgid "for FAT/NTFS support" -msgstr "для поддержки FAT/NTFS" - -msgid "for Ocarina" -msgstr "за Ocarina" - -msgid "for WiiTDB and hosting covers / disc images" -msgstr "за WIITDB и хостинг изображений обложек/дисков" - -msgid "for diverse patches" -msgstr "за различные патчи" - -msgid "for his awesome tool LibWiiGui" -msgstr "за отличную утилиту LibWiiGui" - -msgid "for hosting the themes" -msgstr "за хостинг тем" - -msgid "for hosting the update files" -msgstr "за хостинг обновлений" - -msgid "for the USB Loader source" -msgstr "за выпуск и публикацию исходного кода" - -msgid "formatted!" -msgstr "форматирование завершено!" - -msgid "free" -msgstr "свободно" - -msgid "not set" -msgstr "не установлено" - -msgid "of" -msgstr "из" - -msgid "seconds left" -msgstr "секунд осталось" - -#~ msgid "Author:" -#~ msgstr "Автор:" - -#~ msgid "Download Boxart image?" -#~ msgstr "Скачать обложку диска?" - -#~ msgid "Download Discart image?" -#~ msgstr "Скачать изображение диска ?" - -#~ msgid "Downloading file" -#~ msgstr "Скачиваю файл:" - -#~ msgid "Missing files" -#~ msgstr "Отсутствующие файлы" - -#~ msgid "files not found on the server!" -#~ msgstr "файлы не найдены на сервере!" - -#~ msgid "Disc Images" -#~ msgstr "Изображения дисков" - -#~ msgid "Only Customs" -#~ msgstr "Только измененные" - -#~ msgid "Only Original" -#~ msgstr "Только оригинальные" - -#~ msgid "Do you really want to delete:" -#~ msgstr "Вы хотите удалить:" - -#~ msgid "Do you want to use the alternate DOL that is known to be correct?" -#~ msgstr "Вы хотите использовать DOL, который считается правильным?" - -#~ msgid "BETA revisions" -#~ msgstr "BETA-версии" - -#~ msgid "Unlock console to use this option." -#~ msgstr "Для изменения параметра разблокируйте консоль." - -#~ msgid "Full Shutdown" -#~ msgstr "Полное отключение" - -#~ msgid "GXtheme.cfg not found in any subfolder." -#~ msgstr "GXtheme.cfg не найден ни в одном каталоге." - -#~ msgid "If you don't have WiFi, press 1 to get an URL to get your WiiTDB.zip" -#~ msgstr "Если у вас нет сети WiFi, нажмите 1 чтобы получить URL для доступа к вашему WiiTDB.ZIP" - -#~ msgid "Paste it into your browser to get your WiiTDB.zip." -#~ msgstr "Скопируйте это в Ваш браузер чтобы получить Ваш WiiTDB.zip" - -#~ msgid "Shutdown to Idle" -#~ msgstr "Перевести в режим сна" - -#~ msgid "Your URL has been saved in %sWiiTDB_URL.txt." -#~ msgstr "Ваш URL был сохранен в %sWiiTDB_URL.txt." - -#~ msgid "Can't create file" -#~ msgstr "Не могу создать файл" - -#~ msgid "Connection lost..." -#~ msgstr "Связь потеряна..." - -#~ msgid "Download failed." -#~ msgstr "Загрузка завершилась с ошибкой." - -#~ msgid "Download request failed." -#~ msgstr "Запрос на загрузку завершился с ошибкоа." - -#~ msgid "Downloading Page List:" -#~ msgstr "Загружается список страниц:" - -#~ msgid "Theme Download Path" -#~ msgstr "Путь для загрузки темы" - -#~ msgid "Transfer failed." -#~ msgstr "Передача не удалась." - -#~ msgid "Unsupported format, try to extract manually." -#~ msgstr "Формат не поддерживается, попробуйте распаковать самостоятельно." - -#~ msgid "and translaters for language files updates" -#~ msgstr "и переводчики для обновлений языковых файлов" - -#~ msgid "Insert an SD-Card to save." -#~ msgstr "Для сохранения вставьте SD карту." - -#~ msgid "Insert an SD-Card to use this option." -#~ msgstr "Для использования этой функции нужна SD карта" - -#~ msgid "No SD-Card inserted!" -#~ msgstr "SD карта не вставлена!" - -#~ msgid "Waiting for USB Device" -#~ msgstr "Ожидание USB устройства" - -#~ msgid "Back to Loader" -#~ msgstr "Вернуться в загрузчик" - -#~ msgid "FAT: Use directories" -#~ msgstr "FAT: Использовать каталоги" - -#~ msgid "All partitions" -#~ msgstr "Все разделы" - -#~ msgid "Game partition" -#~ msgstr "Раздел игры" - -#~ msgid "Install 1:1 Copy" -#~ msgstr "Установка копии 1:1" - -#~ msgid "An Error occured" -#~ msgstr "Произошла ошибка" - -#~ msgid "Are you sure you want to enable Parent Control?" -#~ msgstr "Вы действительно хотите включить Родительский Контроль?" - -#~ msgid "AutoPatch" -#~ msgstr "Авто Патч" - -#~ msgid "Checking for Updates" -#~ msgstr "Проверяю обновления" - -#~ msgid "Downloading" -#~ msgstr "Скачиваю" - -#~ msgid "Invalid PIN code" -#~ msgstr "Неправильный PIN-код" - -#~ msgid "Parental Control disabled" -#~ msgstr "Родительский Контроль выключен" - -#~ msgid "The wad file was installed. But It could not be deleted from the SD card." -#~ msgstr "WAD файл установлен, но он не может быть удален с карты SD." - -#~ msgid "The wad installation failed with error %ld" -#~ msgstr "Установка WAD не удалась, код ошибки %ld" - -#~ msgid "Unable to open the wad that was just downloaded (%s)." -#~ msgstr "Не могу открыть скачанный WAD (%s)" - -#~ msgid "Unlock Parental Control" -#~ msgstr "Разблокировать Родительский Контроль" - -#~ msgid "Update to" -#~ msgstr "Обновить до" - -#~ msgid "Updating" -#~ msgstr "обновляю" - -#~ msgid "Updating Language Files..." -#~ msgstr "Обновление языковых файлов..." - -#~ msgid "Updating WiiTDB.zip" -#~ msgstr "Обновление WiiTDB.zip" - -#~ msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." -#~ msgstr "У Вас не включен Родительский Контроль. Если вы хотите использовать Родительский Контроль, включите его в установках Wii." - -#~ msgid "%s : %s May not boot correctly if your System Menu is not up to date." -#~ msgstr "%s : %s может не загрузиться правильно если ваше Системное Меню не последней версии" - -#~ msgid "BCA Codes Path changed" -#~ msgstr "Путь к кодам BCA изменен" - -#~ msgid "Back to Wii Menu" -#~ msgstr "Вернуться в меню Wii" - -#~ msgid "Channels" -#~ msgstr "Каналы" - -#~ msgid "Checking existing artwork" -#~ msgstr "Проверка существующей графики" - -#~ msgid "Confirm" -#~ msgstr "Подтвердить" - -#~ msgid "Could not find a WBFS partition." -#~ msgstr "Не удалось найти раздел WBFS" - -#~ msgid "Could not open WBFS partition" -#~ msgstr "Не могу открыть раздел WBFS" - -#~ msgid "Could not read the disc." -#~ msgstr "Не могу прочесть диск" - -#~ msgid "Could not set USB." -#~ msgstr "Не могу настроить USB" - -#~ msgid "Cover Path Changed" -#~ msgstr "Путь к обложкам был изменен." - -#~ msgid "DOL path changed" -#~ msgstr "Путь к DOL изменен" - -#~ msgid "Disc Path Changed" -#~ msgstr "Путь к изображениям дисков изменен" - -#~ msgid "Display favorites" -#~ msgstr "Показать закладки" - -#~ msgid "Do you want to retry for 30 secs?" -#~ msgstr "Хотите попробовать еще раз на 30 секунд?" - -#~ msgid "Enable Parental Control" -#~ msgstr "Включить Родительский Контроль" - -#~ msgid "Force" -#~ msgstr "Принудительно" - -#~ msgid "GCT Cheatcodes Path changed" -#~ msgstr "Путь к читам изменен" - -#~ msgid "Hermes CIOS" -#~ msgstr "Hermes CIOS" - -#~ msgid "Homebrew Appspath changed" -#~ msgstr "Путь к хоумбрю-программам изменен" - -#~ msgid "Insert an SD-Card to download images." -#~ msgstr "Для скачивания изображений вставьте SD карту." - -#~ msgid "Install not possible" -#~ msgstr "Установка невозможна" - -#~ msgid "Most likely it has dimensions that are not evenly divisible by 4." -#~ msgstr "Размеры картинки не делятся на 4. Поздравляю, блин." - -#~ msgid "Network init error" -#~ msgstr "Ошибка инициализации сети" - -#~ msgid "No .dol or .elf files found." -#~ msgstr "Не найдены файлы .dol или .elf" - -#~ msgid "No Favorites" -#~ msgstr "Нет избранных" - -#~ msgid "No USB Device" -#~ msgstr "Нет USB устройств" - -#~ msgid "No USB Device found." -#~ msgstr "USB устройств не обнаружено" - -#~ msgid "Normal Covers" -#~ msgstr "Обычные обложки" - -#~ msgid "Not Found" -#~ msgstr "Не найден" - -#~ msgid "Not a DOL/ELF file." -#~ msgstr "Не является файлом DOL/ELF" - -#~ msgid "Save Failed" -#~ msgstr "Сохранение не удалось" - -#~ msgid "Selected DOL" -#~ msgstr "Выбранный DOL" - -#~ msgid "Standard" -#~ msgstr "Стандартный" - -#~ msgid "TXT Cheatcodes Path changed" -#~ msgstr "Путь к TXT читкодам изменен" - -#~ msgid "Theme Download Path changed" -#~ msgstr "Путь для загрузки темы изменен" - -#~ msgid "Theme Path Changed" -#~ msgstr "путь к темам изменён" - -#~ msgid "USB Loader GX will only run with Hermes CIOS rev 4! Please make sure you have revision 4 installed!" -#~ msgstr "USB Loader GX будет работать только с Hermes CIOS rev 4! Пожалуйста убедитесь что у вас установлена версия 4!" - -#~ msgid "Update Path changed." -#~ msgstr "Путь к обновлениям изменен" - -#~ msgid "WIP Patches Path changed" -#~ msgstr "Путь к патчам QIP изменен" - -#~ msgid "WiiTDB Path changed." -#~ msgstr "Путь к WiiTDB изменен" - -#~ msgid "You are about to delete " -#~ msgstr "Вы хотите удалить " - -#~ msgid "You are choosing to display favorites and you do not have any selected." -#~ msgstr "Нельзя отобразить избранные, если вы их до этого не выбрали." - -#~ msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible." -#~ msgstr "Вы используете файловую систему NTFS. Из-за возможных ошибок записи на раздел NTFS установка игры невозможна." - -#~ msgid "You have attempted to load a bad image" -#~ msgstr "Вы попытались загрузить плохой образ" - -#~ msgid "does not exist! You Messed something up, Idiot." -#~ msgstr "не существует! Ты облажался, идиот." - -#~ msgid "file left" -#~ msgstr "файл остался" diff --git a/Languages/schinese.lang b/Languages/schinese.lang deleted file mode 100644 index 3746dd58..00000000 --- a/Languages/schinese.lang +++ /dev/null @@ -1,1821 +0,0 @@ -# USB Loader GX language source file. -# schinese.lang - rxxx -# don't delete/change this line (é). -msgid "" -msgstr "" -"Project-Id-Version: USB Loader GX\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-11 18:41+0100\n" -"PO-Revision-Date: 2009-10-01 01:00+0200\n" -"Last-Translator: knife.hu kavid emul8ion\n" -"Language-Team: kavid\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -msgid " Wad Saved as:" -msgstr "WAD 保存为:" - -msgid " could not be downloaded." -msgstr "不能下载." - -msgid " has been Saved. The text has not been verified. Some of the code may not work right with each other. If you experience trouble, open the text in a real text editor for more information." -msgstr "已经被保存.内容尚未验证.部分代码可能无法作用.如果你遇到问题,请用文字编辑器打开文本文件以获得更多的信息." - -msgid " is not on the server." -msgstr "不在服务器上" - -#, c-format -msgid "%i files not found on the server!" -msgstr "服务器上未找到%i个文件!" - -#, c-format -msgid "%i missing files" -msgstr "缺少%i个文件" - -msgid "0 (Everyone)" -msgstr "0 (全年龄)" - -msgid "1 (Child 7+)" -msgstr "1 (7岁以上)" - -msgid "1 hour" -msgstr "1 小时" - -msgid "10 min" -msgstr "10 分钟" - -msgid "2 (Teen 12+)" -msgstr "2 (12岁以上)" - -msgid "20 min" -msgstr "20 分钟" - -msgid "2D Cover Path" -msgstr "2D封面路径" - -msgid "3 (Mature 16+)" -msgstr "3 (16岁以上)" - -msgid "3 min" -msgstr "3 分钟" - -msgid "30 min" -msgstr "30 分钟" - -msgid "3D Cover Path" -msgstr "3D封面路径" - -msgid "3D Covers" -msgstr "3D 封面" - -msgid "4 (Adults Only 18+)" -msgstr "4 (18岁以上成人)" - -msgid "5 min" -msgstr "5 分钟" - -msgid ">> Deleting tickets..." -msgstr ">> 删除 tickets..." - -msgid ">> Deleting tickets...ERROR! " -msgstr ">> 删除 tickets... 错误!" - -msgid ">> Deleting tickets...Ok! " -msgstr ">> 删除 tickets... 成功!" - -msgid ">> Deleting title ...ERROR! " -msgstr ">> 删除 title... 错误!" - -msgid ">> Deleting title ...Ok!" -msgstr ">> 删除 title... 成功!" - -msgid ">> Deleting title contents..." -msgstr ">> 删除 title 内容..." - -msgid ">> Deleting title contents...ERROR! " -msgstr ">> 删除 title 内容... 错误!" - -msgid ">> Deleting title contents...Ok!" -msgstr ">> 删除 title 内容... 成功!" - -msgid ">> Deleting title..." -msgstr ">> 删除 title..." - -msgid ">> Finishing installation..." -msgstr ">> 完成安装..." - -msgid ">> Installing content #" -msgstr ">> 安装程序主体#" - -msgid ">> Installing ticket..." -msgstr ">> 安装 ticket..." - -msgid ">> Installing title..." -msgstr ">> 安装 title..." - -msgid ">> Reading WAD data..." -msgstr ">> 读取 WAD 数据..." - -msgid ">> Reading WAD data...ERROR! " -msgstr ">> 读取 WAD 数据... 错误!" - -msgid ">> Reading WAD data...Ok!" -msgstr ">> 读取 WAD 数据... 成功!" - -msgid "AUTO" -msgstr "自动" - -msgid "All Partitions" -msgstr "所有分区" - -msgid "All images downloaded successfully." -msgstr "所有图片已成功下载" - -msgid "All the features of USB Loader GX are unlocked." -msgstr "USB Loader GX 功能已解锁." - -msgid "Alternate DOL" -msgstr "可选择DOL文件" - -msgid "Anti" -msgstr "防止" - -msgid "App Language" -msgstr "语言设定" - -msgid "Apply" -msgstr "应用" - -msgid "Apr" -msgstr "四月" - -msgid "Are you sure you want to lock USB Loader GX?" -msgstr "确定要锁定USB Loader GX吗?" - -msgid "Are you sure you want to reset?" -msgstr "确定重置吗?" - -msgid "Are you sure?" -msgstr "确定?" - -msgid "Aug" -msgstr "八月" - -msgid "Author(s):" -msgstr "作者:" - -msgid "AutoInit Network" -msgstr "自动检测网络" - -msgid "Automatic port switching is done on the fly. You need to change all custom paths to SD-Card first for this option or else it could damage a filesystem." -msgstr "" - -msgid "BCA Codes Path" -msgstr "BCA代码路径" - -msgid "Back" -msgstr "返回" - -msgid "Back to HBC or Wii Menu" -msgstr "返回 HBC 或 Wii 系统菜单" - -msgid "Backgroundmusic" -msgstr "背景音乐" - -msgid "Big thanks to:" -msgstr "非常感谢:" - -msgid "Block Cover Downloads" -msgstr "禁止下载封面" - -msgid "Block Custom Paths" -msgstr "禁止自制路径" - -msgid "Block Game Install" -msgstr "禁止安装游戏" - -msgid "Block Game Settings" -msgstr "禁止设置游戏" - -msgid "Block GameID Change" -msgstr "禁止更改游戏ID" - -msgid "Block Global Settings" -msgstr "禁止全局设置" - -msgid "Block Gui Settings" -msgstr "禁止图形界面设置" - -msgid "Block HBC Menu" -msgstr "禁止HBC菜单" - -msgid "Block IOS Reload" -msgstr "阻止IOS重新载入" - -msgid "Block Loader Settings" -msgstr "禁止Loader设置" - -msgid "Block Parental Settings" -msgstr "禁止家长控制设置" - -msgid "Block Reset Settings" -msgstr "禁止重置设置" - -msgid "Block Sound Settings" -msgstr "禁止声音设置" - -msgid "Block Theme Downloader" -msgstr "禁止主题下载" - -msgid "Block Theme Menu" -msgstr "禁止主题菜单" - -msgid "Block Title Launcher" -msgstr "禁止Title启动" - -msgid "Block Updates" -msgstr "禁止更新" - -msgid "Boot/Standard" -msgstr "启动/标准" - -msgid "Boot?" -msgstr "启动?" - -msgid "Both" -msgstr "全部" - -msgid "Both Ports" -msgstr "两个接口" - -msgid "Can't be formatted" -msgstr "无法格式化" - -msgid "Can't create directory" -msgstr "无法建立目录" - -#, c-format -msgid "Can't create path: %s" -msgstr "无法创建路径: %s" - -msgid "Can't delete:" -msgstr "无法删除:" - -msgid "Cancel" -msgstr "取消" - -msgid "Cannot write to destination." -msgstr "无法写入目标." - -msgid "Change Play Path" -msgstr "更改游戏路径" - -msgid "Cheatfile is blank" -msgstr "作弊码文件是空的" - -msgid "Clear" -msgstr "清除" - -msgid "Click to Download Covers" -msgstr "点击下载封面" - -msgid "Click to change game ID" -msgstr "点击变更游戏 ID" - -msgid "Clock" -msgstr "时钟" - -msgid "Close" -msgstr "关闭" - -msgid "Code Download" -msgstr "作弊码下载" - -#, c-format -msgid "Coded by: %s" -msgstr "编程: %s" - -msgid "Coding:" -msgstr "编程:" - -msgid "Connection to server timed out." -msgstr "连接服务器超时." - -msgid "Console" -msgstr "控制台" - -msgid "Console Default" -msgstr "主机默认" - -msgid "Console Locked" -msgstr "主机已锁定" - -msgid "Console must be unlocked for this option." -msgstr "需解锁以开启设定功能." - -msgid "Console should be unlocked to modify it." -msgstr "需解锁以开启设定功能." - -msgid "Continue to install game?" -msgstr "继续安装游戏?" - -msgid "Controllevel" -msgstr "访问控制级别" - -msgid "Correct Password" -msgstr "密码正确" - -msgid "Could not connect to the server." -msgstr "无法连接到服务器." - -msgid "Could not create GCT file" -msgstr "无法建立 GCT 文件" - -#, c-format -msgid "Could not create path: %s" -msgstr "无法创建路径: %s" - -msgid "Could not find info for this game in the wiitdb.xml." -msgstr "wiitdb.xml中未找到此游戏" - -msgid "Could not initialize DIP module!" -msgstr "无法启动 DIP 模块!" - -msgid "Could not initialize network!" -msgstr "无法启动网络!" - -msgid "Could not open Disc" -msgstr "无法开启光盘" - -msgid "Could not open wiitdb.xml." -msgstr "无法打开wiitdb.xml." - -msgid "Could not save." -msgstr "无法保存" - -msgid "Cover Download" -msgstr "下载封面" - -msgid "Create" -msgstr "创建" - -msgid "Credits" -msgstr "作者信息" - -msgid "Custom Discarts" -msgstr "自定义光盘图片" - -msgid "Custom Paths" -msgstr "自定义路径" - -msgid "Customs/Original" -msgstr "自制/官方" - -msgid "DOL Path" -msgstr "DOL路径" - -msgid "Dec" -msgstr "十二月" - -msgid "Default" -msgstr "缺省" - -msgid "Default Gamesettings" -msgstr "缺省游戏设定" - -msgid "Default Settings" -msgstr "缺省设置" - -msgid "Delete" -msgstr "删除" - -msgid "Delete ?" -msgstr "删除?" - -msgid "Delete Cheat GCT" -msgstr "删除GCT金手指文件" - -msgid "Delete Cheat TXT" -msgstr "删除TXT金手指文件" - -msgid "Delete Cover Artwork" -msgstr "删除封面" - -msgid "Delete Disc Artwork" -msgstr "删除光盘图片" - -msgid "Design:" -msgstr "设计:" - -msgid "Developed by" -msgstr "开发" - -msgid "Directory does not exist!" -msgstr "目录不存在" - -msgid "Disc Artwork Download" -msgstr "光盘图片下载" - -msgid "Disc Artwork Path" -msgstr "光盘图片路径" - -msgid "Disc Default" -msgstr "游戏默认" - -msgid "DiskFlip" -msgstr "光盘滑动" - -msgid "Display" -msgstr "显示" - -msgid "Display as a carousel" -msgstr "走马灯模式" - -msgid "Display as a grid" -msgstr "封面墙模式" - -msgid "Display as a list" -msgstr "列表模式" - -msgid "Display favorites only" -msgstr "收藏夹模式" - -msgid "Do you want to apply it now?" -msgstr "要现在应用吗?" - -msgid "Do you want to apply this theme?" -msgstr "你想应用这个主题吗?" - -msgid "Do you want to change language?" -msgstr "要变更语言吗?" - -msgid "Do you want to download this theme?" -msgstr "要下载这个主题吗?" - -msgid "Do you want to format:" -msgstr "是否格式化:" - -msgid "Do you want to load the default theme?" -msgstr "要加载默认主题吗?" - -msgid "Do you want to sync free space info sector on all FAT32 partitions?" -msgstr "是否同步剩余空间信息扇区到所有FAT32分区?" - -msgid "Do you wish to update/download all language files?" -msgstr "升级/下载语言文件?" - -msgid "Done!" -msgstr "完成" - -msgid "Download" -msgstr "下载" - -msgid "Download Now" -msgstr "现在下载" - -msgid "Download finished" -msgstr "下载完成" - -msgid "Downloading 3D Covers" -msgstr "正在下载3D封面" - -msgid "Downloading Flat Covers" -msgstr "正在下载2D封面" - -msgid "Downloading Full HQ Covers" -msgstr "正在下载高清晰完整封面" - -msgid "Downloading Full LQ Covers" -msgstr "正在下载低清晰完整封面" - -msgid "Downloading custom Discarts" -msgstr "正在下载自制光盘封面" - -msgid "Downloading file..." -msgstr "正在下载文件..." - -msgid "Downloading image:" -msgstr "正在下载图片:" - -msgid "Downloading original Discarts" -msgstr "正在下载原始光盘封面" - -msgid "Downloading pagelist:" -msgstr "正在下载分页列表:" - -msgid "Dutch" -msgstr "荷文" - -msgid "ERROR" -msgstr "错误" - -msgid "ERROR:" -msgstr "错误:" - -msgid "ERROR: Can't set up theme." -msgstr "错误: 无法设置主题." - -msgid "English" -msgstr "英文" - -msgid "Error" -msgstr "错误" - -msgid "Error !" -msgstr "错误 !" - -msgid "Error 002 fix" -msgstr "002错误修正" - -#, c-format -msgid "Error creating path: %s" -msgstr "创建路径 %s 错误" - -msgid "Error opening downloaded file" -msgstr "打开下载文件错误" - -msgid "Error reading Disc" -msgstr "读取光盘错误" - -#, c-format -msgid "Error when downloading file: %i" -msgstr "下载文件%i失败 " - -msgid "Error while downloding file" -msgstr "下载文件错误" - -msgid "Error while opening the zip." -msgstr "打开zip文件错误" - -msgid "Error while transfering data." -msgstr "传送数据错误." - -msgid "Error while updating USB Loader GX." -msgstr "升级USB Loader GX错误" - -msgid "Error writing the data." -msgstr "写入数据错误" - -msgid "Error..." -msgstr "错误..." - -msgid "Error:" -msgstr "错误:" - -msgid "Exit" -msgstr "退出" - -msgid "Exit to where?" -msgstr "退出到哪里?" - -msgid "Extracting files..." -msgstr "正在解压缩文件" - -msgid "Failed formating" -msgstr "格式化失败" - -msgid "Failed to extract." -msgstr "解压缩失败." - -msgid "Failed to open partition" -msgstr "打开分区失败" - -msgid "Failed updating" -msgstr "升级失败" - -msgid "Feb" -msgstr "二月" - -msgid "File not found." -msgstr "找不到文件." - -#, c-format -msgid "Filesize is %i Byte." -msgstr "文件大小是%i字节." - -msgid "Filesize is 0 Byte." -msgstr "文件大小是0字节." - -msgid "Finishing installation... Ok!" -msgstr "正在完成安装...完成!" - -msgid "Flat Covers" -msgstr "普通封面" - -msgid "Flip-X" -msgstr "按键规则" - -msgid "Force NTSC" -msgstr "强制 NTSC" - -msgid "Force PAL50" -msgstr "强制 PAL50" - -msgid "Force PAL60" -msgstr "强制 PAL60" - -msgid "Format" -msgstr "格式化" - -msgid "Formatting, please wait..." -msgstr "格式化中, 请稍候..." - -msgid "Found missing images." -msgstr "找到缺少的图片." - -msgid "Free Space" -msgstr "剩余空间" - -msgid "French" -msgstr "法文" - -msgid "Full Cover Path" -msgstr "完整封面路径" - -msgid "Full HQ Covers" -msgstr "完整高清晰封面路径" - -msgid "Full LQ Covers" -msgstr "完整低清晰封面路径" - -msgid "Full Menu" -msgstr "完整菜单" - -msgid "Full shutdown" -msgstr "完全关机" - -msgid "GAMEID_Gamename" -msgstr "游戏ID_游戏名" - -msgid "GCT Cheatcodes Path" -msgstr "作弊码路径" - -msgid "GCT File created" -msgstr "GCT 文件已建立" - -msgid "GUI Settings" -msgstr "界面设置" - -msgid "Game ID" -msgstr "游戏 ID" - -msgid "Game IOS" -msgstr "游戏IOS" - -msgid "Game Language" -msgstr "游戏语言" - -msgid "Game Load" -msgstr "游戏载入" - -msgid "Game Lock" -msgstr "锁定游戏" - -msgid "Game Only" -msgstr "仅游戏" - -msgid "Game Region" -msgstr "游戏区域" - -msgid "Game Size" -msgstr "游戏容量" - -msgid "Game Sound Mode" -msgstr "游戏声音模式" - -msgid "Game Sound Volume" -msgstr "游戏音量" - -msgid "Game Split Size" -msgstr "游戏分割大小" - -msgid "Game is already installed:" -msgstr "已安装的游戏:" - -msgid "Game/Install Partition" -msgstr "游戏/安装分区" - -msgid "Gamename [GAMEID]" -msgstr "游戏名[游戏ID]" - -msgid "Games" -msgstr "游戏" - -msgid "Genre:" -msgstr "类型:" - -msgid "German" -msgstr "德文" - -msgid "Global Settings" -msgstr "全局设置" - -msgid "HOME Menu" -msgstr "主菜单" - -msgid "Homebrew Apps Path" -msgstr "自制程序路径" - -msgid "Homebrew Channel" -msgstr "Homebrew频道" - -msgid "Homebrew Launcher" -msgstr "Homebrew管理器" - -msgid "Hour" -msgstr "小时" - -msgid "How do you want to update?" -msgstr "你要升级哪些文件?" - -msgid "How to Shutdown?" -msgstr "如何关机?" - -#, c-format -msgid "Incoming file %0.2fKB" -msgstr "正在接收文件 %0.2fKB" - -#, c-format -msgid "Incoming file %0.2fMB" -msgstr "正在接收文件 %0.2fMB" - -msgid "Initializing Network" -msgstr "正在启动网络" - -msgid "Insert Disk" -msgstr "插入光盘" - -msgid "Insert a Wii Disc!" -msgstr "插入 Wii 光盘!" - -msgid "Install" -msgstr "安装" - -msgid "Install Error!" -msgstr "安装错误!" - -msgid "Install a game" -msgstr "安装游戏" - -msgid "Install directories" -msgstr "安装目录" - -msgid "Install partitions" -msgstr "安装分区" - -msgid "Installing content... Ok!" -msgstr "正在安装程序主体... 完成!" - -msgid "Installing game:" -msgstr "正在安装游戏:" - -msgid "Installing ticket... Ok!" -msgstr "安装 ticket... 完成!" - -msgid "Installing title... Ok!" -msgstr "安装 title... 完成!" - -msgid "Installing wad" -msgstr "安裝 WAD" - -msgid "Issue manager /" -msgstr "问题管理 /" - -msgid "It seems that you have some information that will be helpful to us. Please pass this information along to the DEV team." -msgstr "看来你有一些能帮到我们的信息.请将这些信息发送给开发团队." - -msgid "Italian" -msgstr "意大利文" - -msgid "Jan" -msgstr "一月" - -msgid "Japanese" -msgstr "日文" - -msgid "July" -msgstr "七月" - -msgid "June" -msgstr "六月" - -msgid "Keep" -msgstr "保持" - -msgid "Keyboard" -msgstr "键盘" - -msgid "Korean" -msgstr "韩文" - -msgid "Language File" -msgstr "语言文件" - -msgid "Language change:" -msgstr "变更语言:" - -msgid "Languagefiles Path" -msgstr "语言文件路径" - -msgid "Languagepath changed." -msgstr "语言文件路径已变更" - -msgid "Left" -msgstr "左" - -msgid "Like SysMenu" -msgstr "同系统菜单" - -msgid "List on Gamelaunch" -msgstr "游戏启动时选择" - -msgid "Load" -msgstr "载入" - -msgid "Load From SD/USB" -msgstr "从SD/USB载入" - -#, c-format -msgid "Load file from: %s ?" -msgstr "从%s 加载文件?" - -msgid "Load this DOL as alternate DOL?" -msgstr "加载这个 DOL 作为 ALT DOL?" - -msgid "Loader Settings" -msgstr "Loader设置" - -msgid "Loading standard language." -msgstr "加载标准语言" - -msgid "Loading standard music." -msgstr "加载标准音乐." - -msgid "Lock Console" -msgstr "锁定控制台" - -msgid "Lock USB Loader GX" -msgstr "锁定USB Loader GX" - -msgid "Locked" -msgstr "已锁定" - -msgid "Loop Directory" -msgstr "循环目录" - -msgid "Loop Music" -msgstr "循环音乐" - -msgid "Loop Sound" -msgstr "循环声音" - -msgid "Main tester:" -msgstr "主要测试员" - -msgid "Mar" -msgstr "三月" - -msgid "Mark new games" -msgstr "标记新游戏" - -msgid "May" -msgstr "五月" - -msgid "Messageboard Update" -msgstr "留言板更新" - -msgid "Motion+ Video" -msgstr "移动+视频" - -msgid "Mount DVD drive" -msgstr "挂载DVD光驱" - -msgid "Multiple Partitions" -msgstr "多分区" - -msgid "Music Loop Mode" -msgstr "音乐循环模式" - -msgid "Music Volume" -msgstr "音量" - -msgid "Neither" -msgstr "全不" - -msgid "Network is not initiated." -msgstr "网络还未初始化" - -msgid "New Disc Detected" -msgstr "新光盘已检测" - -msgid "Next" -msgstr "往后" - -msgid "No" -msgstr "否" - -msgid "No Cheatfile found" -msgstr "作弊码文件没找到" - -msgid "No DOL file found on disc." -msgstr "光盘中未找到 DOL 文件." - -msgid "No Splitting" -msgstr "不分割" - -msgid "No URL or Path specified." -msgstr "未指定URL或路径." - -msgid "No WBFS or FAT/NTFS/EXT partition found" -msgstr "找不到 WBFS 或 FAT/NTFS/EXT 分区" - -msgid "No cheats were selected" -msgstr "没有选择作弊码" - -msgid "No data could be read." -msgstr "无法读取数据." - -msgid "No favorites selected." -msgstr "未选择收藏." - -msgid "No file missing!" -msgstr "没有文件缺少!" - -msgid "No new updates." -msgstr "没有可用更新." - -msgid "No themes found on the site." -msgstr "网站上没找到主题." - -msgid "No themes found." -msgstr "没有找到主题." - -msgid "None" -msgstr "无" - -msgid "Normal" -msgstr "一般" - -msgid "Not a WAD file." -msgstr "不是 WAD 文件" - -msgid "Not a Wii Disc" -msgstr "不是 Wii 的光盘" - -msgid "Not a valid URL" -msgstr "不是有效的URL" - -msgid "Not a valid URL path" -msgstr "不是有效的URL路径" - -msgid "Not a valid domain" -msgstr "不是有效的域名" - -msgid "Not enough free memory." -msgstr "剩余内存不足." - -msgid "Not enough free space!" -msgstr "剩余空间不足!" - -msgid "Not enough memory." -msgstr "内存不足." - -msgid "Not required" -msgstr "不需要" - -msgid "Not supported format!" -msgstr "不支持的格式!" - -msgid "Nov" -msgstr "十一月" - -msgid "OFF" -msgstr "关闭" - -msgid "OK" -msgstr "确定" - -msgid "ON" -msgstr "开启" - -msgid "Ocarina" -msgstr "Ocarina金手指" - -msgid "Oct" -msgstr "十月" - -msgid "Official Site:" -msgstr "官方网址:" - -msgid "Offset" -msgstr "偏移位" - -msgid "Only Game Partition" -msgstr "仅游戏分区" - -msgid "Only for Install" -msgstr "仅安装" - -msgid "Original Discarts" -msgstr "官方光盘图片" - -msgid "Original/Customs" -msgstr "官方/自制" - -msgid "Parental Control" -msgstr "家长控制" - -msgid "Partition" -msgstr "分区" - -msgid "Password" -msgstr "密码" - -msgid "Password Changed" -msgstr "密码已变更" - -msgid "Password has been changed" -msgstr "密码已被变更" - -msgid "Patch Country Strings" -msgstr "设定区码" - -msgid "Path Changed" -msgstr "路径已变更" - -msgid "Permission denied." -msgstr "没有权限." - -msgid "Pick from a list" -msgstr "从列表中选取" - -msgid "Play Count" -msgstr "游戏计数" - -msgid "Play Next" -msgstr "播放下一曲" - -msgid "Play Once" -msgstr "播放一次" - -msgid "Play Previous" -msgstr "播放上一曲" - -msgid "Playing Music:" -msgstr "正在播放音乐:" - -msgid "Please wait..." -msgstr "请等待..." - -msgid "Power off the Wii" -msgstr "关闭 Wii 主机" - -msgid "Prev" -msgstr "往前" - -msgid "Prompts Buttons" -msgstr "显示校正" - -msgid "Published by" -msgstr "发行" - -msgid "Quick Boot" -msgstr "快速启动" - -msgid "Random Directory Music" -msgstr "随机目录音乐" - -msgid "Reading WAD data... Ok!" -msgstr "读取 WAD 数据... 完成!" - -msgid "Receiving file from:" -msgstr "接收文件:" - -msgid "Region Patch" -msgstr "区域补丁" - -msgid "Released" -msgstr "放出" - -msgid "Reload SD" -msgstr "重新载入 SD 卡" - -msgid "Remove update" -msgstr "删除更新" - -msgid "Rename Game on WBFS" -msgstr "改变 WBFS (硬盘)上的游戏名称" - -msgid "Reset" -msgstr "重启" - -msgid "Reset BG Music" -msgstr "重置背景音乐" - -msgid "Reset Playcounter" -msgstr "重置游戏计数" - -msgid "Reset to default BGM?" -msgstr "重置为默认背景音乐?" - -msgid "Restarting..." -msgstr "重启中..." - -msgid "Return" -msgstr "返回" - -msgid "Return To" -msgstr "返回至" - -msgid "Return to Wii Menu" -msgstr "返回 Wii 主菜单" - -msgid "Right" -msgstr "右" - -msgid "Rumble" -msgstr "震动" - -msgid "SChinese" -msgstr "简体中文" - -msgid "SFX Volume" -msgstr "SFX 音量" - -msgid "Save" -msgstr "保存" - -msgid "Save Failed. No device inserted?" -msgstr "保存失败. 可能是没有设备插入?" - -msgid "Save Game List to" -msgstr "保存游戏列表到" - -msgid "Save List" -msgstr "保存列表" - -msgid "Saved" -msgstr "已保存" - -msgid "Screensaver" -msgstr "屏幕保护" - -msgid "Select" -msgstr "选择" - -msgid "Select DOL Offset" -msgstr "选择DOL偏移位" - -msgid "Select a DOL" -msgstr "选择一个 DOL" - -msgid "Select a DOL from Game" -msgstr "从游戏选择DOL" - -msgid "Sept" -msgstr "九月" - -msgid "Set Search-Filter" -msgstr "设置搜索过滤器" - -msgid "Settings" -msgstr "设置" - -msgid "Show Free Space" -msgstr "显示剩余空间" - -msgid "Shutdown System" -msgstr "关闭系统" - -msgid "Shutdown Wii" -msgstr "关闭 Wii" - -msgid "Sort alphabetically" -msgstr "按字母排序" - -msgid "Sort by number of players" -msgstr "以玩家数量排序" - -msgid "Sort by rank" -msgstr "以排名排序" - -msgid "Sort order by most played" -msgstr "按玩过次数排序" - -msgid "Sound" -msgstr "声音" - -msgid "Sound Settings" -msgstr "声音设置" - -msgid "Sound+BGM" -msgstr "声音+背景音乐" - -msgid "Sound+Quiet" -msgstr "声音+静音" - -msgid "Spanish" -msgstr "西班牙文" - -msgid "Special thanks to:" -msgstr "特别感谢:" - -msgid "Split each 2GB" -msgstr "每个分割为2GB" - -msgid "Split each 4GB" -msgstr "每个分割为4GB" - -msgid "Standby" -msgstr "待机" - -msgid "Success" -msgstr "成功" - -msgid "Success:" -msgstr "成功:" - -msgid "Successfully Saved" -msgstr "保存成功" - -msgid "Successfully Updated" -msgstr "升级成功!" - -msgid "Successfully Updated thanks to www.techjawa.com" -msgstr "更新成功.感谢www.techjawa.com" - -msgid "Successfully deleted:" -msgstr "成功删除:" - -msgid "Successfully extracted theme." -msgstr "解压主题成功" - -msgid "Successfully installed:" -msgstr "成功安装:" - -msgid "Sync FAT32 FS Info" -msgstr "同步FAT32信息" - -msgid "Synchronizing..." -msgstr "正在同步..." - -msgid "System Default" -msgstr "系统默认" - -msgid "TChinese" -msgstr "繁体中文" - -msgid "TXT Cheatcodes Path" -msgstr "TXT作弊码路径" - -msgid "The .them file was not found in the zip." -msgstr "zip文件中没有找到.them文件" - -msgid "The entered directory does not exist. Would you like to create it?" -msgstr "已进入的目录不存在.你想要创建一个目录吗?" - -msgid "The game installation is disabled under this IOS because of instability in usb write." -msgstr "由于USB写入不稳定,在这个IOS下游戏安装被禁用" - -msgid "The wad file was installed" -msgstr "WAD 安装" - -#, c-format -msgid "The wad installation failed with error %i" -msgstr "WAD 安装失败,错误号 %i" - -msgid "Theme Downloader" -msgstr "主题下载器" - -msgid "Theme Menu" -msgstr "主题菜单" - -msgid "Theme Path" -msgstr "主题路径" - -msgid "Theme Title:" -msgstr "主题名称:" - -msgid "Themes by www.spiffy360.com" -msgstr "www.spiffy360.com的主题" - -msgid "This IOS is the BootMii ios. If you are sure it is not BootMii and you have something else installed there than ignore this warning." -msgstr "该IOS是BootMii IOS.如果你确认它不是BootMii并且安装了其他IOS则忽略该警告" - -msgid "This IOS was not found on the titles list. If you are sure you have it installed than ignore this warning." -msgstr "在titles列表中未找到该IOS. 如果你确认已安装则忽略该警告." - -msgid "Time left:" -msgstr "剩余时间:" - -msgid "Title Launcher" -msgstr "系统频道" - -msgid "Titles from WiiTDB" -msgstr "用WiiTDB游戏名" - -msgid "Tooltips" -msgstr "提示信息" - -msgid "Transfer failed" -msgstr "传输失败" - -msgid "USB Device not found" -msgstr "找不到 USB 设备" - -msgid "USB Loader GX is protected" -msgstr "USB Loader GX 被锁定" - -msgid "USB Port" -msgstr "USB接口" - -msgid "USB Port changing is only supported on Hermes cIOS." -msgstr "仅Hermes CIOS支持USB接口的改变" - -msgid "Uninstall" -msgstr "删除" - -msgid "Uninstall Game" -msgstr "删除游戏" - -msgid "Uninstall Menu" -msgstr "删除菜单" - -msgid "Uninstall all" -msgstr "卸载所有" - -msgid "Uninstalling wad" -msgstr "卸载 WAD" - -msgid "Unknown" -msgstr "未知" - -msgid "Unlock USB Loader GX" -msgstr "解锁USB Loader GX" - -msgid "Unlocked" -msgstr "已解锁" - -msgid "Unsupported format, try to extract manually TempTheme.zip." -msgstr "不支持的格式,请手动解压缩TempTheme.zip." - -msgid "Update" -msgstr "升级" - -msgid "Update All" -msgstr "全部升级" - -msgid "Update DOL" -msgstr "仅升级主程序" - -msgid "Update Files" -msgstr "升级文件" - -msgid "Update Path" -msgstr "升级文件存放路径" - -msgid "Update all Language Files" -msgstr "升级全部语言文件" - -msgid "Update failed" -msgstr "升级失败" - -msgid "Update successfull" -msgstr "升级成功" - -msgid "Updating Language Files:" -msgstr "正在升级语言文件:" - -msgid "Uploaded ZIP file installed to homebrew directory." -msgstr "上传已安装Zip文件到自制程序目录" - -msgid "VIDTV Patch" -msgstr "VIDTV修改" - -msgid "Version:" -msgstr "版本:" - -#, c-format -msgid "Version: %s" -msgstr "版本: %s" - -msgid "Video Mode" -msgstr "视频制式" - -msgid "WDM Files Path" -msgstr "WDM文件路径" - -msgid "WIP Patches Path" -msgstr "WIP补丁路径" - -msgid "Waiting..." -msgstr "等待中..." - -msgid "Warning:" -msgstr "警告:" - -msgid "What do you want to update?" -msgstr "要升级什么?" - -msgid "What should be deleted for this game title:" -msgstr "要删除这个游戏的什么:" - -msgid "WiFi Features" -msgstr "WiFi 功能" - -msgid "Widescreen Fix" -msgstr "宽屏校正" - -msgid "Wii Menu" -msgstr "Wii 系统菜单" - -msgid "Wii Settings" -msgstr "Wii 设置" - -msgid "WiiTDB Files" -msgstr "WiiTDB文件" - -msgid "WiiTDB Path" -msgstr "WiiTDB路径" - -msgid "WiiTDB is up to date." -msgstr "WiiTDB已更新." - -msgid "Wiilight" -msgstr "光驱灯" - -msgid "Wrong Password" -msgstr "密码错误" - -msgid "Yes" -msgstr "是" - -msgid "You are currently using IOS" -msgstr "正在使用IOS" - -msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." -msgstr "cIOS 249低于r18版本不支持FAT32/NTFS/EXT分区.如要继续风险自负" - -msgid "You need to select or format a partition" -msgstr "你需要选择或者格式化一个分区" - -msgid "and translators for language files updates" -msgstr "以及翻译人员的语言文件更新" - -msgid "available" -msgstr "允许" - -msgid "does not exist!" -msgstr "不存在!" - -msgid "does not exist! Loading game without cheats." -msgstr "不存在!游戏以无作弊码方式载入." - -msgid "files left" -msgstr "剩余文件" - -msgid "for FAT/NTFS support" -msgstr "的 FAT/NTFS 支持" - -msgid "for Ocarina" -msgstr "的 Ocarina" - -msgid "for WiiTDB and hosting covers / disc images" -msgstr "的 WiiTDB 和封面下载" - -msgid "for diverse patches" -msgstr "的多种修正" - -msgid "for his awesome tool LibWiiGui" -msgstr "的优秀工具 LibWiiGui" - -msgid "for hosting the themes" -msgstr "的主题服务器" - -msgid "for hosting the update files" -msgstr "的升级服务器" - -msgid "for the USB Loader source" -msgstr "放出源代码" - -msgid "formatted!" -msgstr "完成格式化!" - -msgid "free" -msgstr "剩余" - -msgid "not set" -msgstr "未设定" - -msgid "of" -msgstr "的" - -msgid "seconds left" -msgstr "剩余秒数" - -#~ msgid "Author:" -#~ msgstr "作者:" - -#~ msgid "Do you want to load this theme?" -#~ msgstr "是否载入这个主题?" - -#~ msgid "Loading default theme." -#~ msgstr "正在加载默认主题." - -#~ msgid "Theme path is changed." -#~ msgstr "主题路径已变更。" - -#~ msgid "Use IOS58" -#~ msgstr "使用IOS58" - -#~ msgid "Custom Disc Images" -#~ msgstr "自定义光盘图片" - -#~ msgid "Download Boxart image?" -#~ msgstr "下载封面图片?" - -#~ msgid "Download Discart image?" -#~ msgstr "下载光盘图片?" - -#~ msgid "Downloading file" -#~ msgstr "下载文件:" - -#~ msgid "Missing files" -#~ msgstr "缺少的文件" - -#~ msgid "Original Disc Images" -#~ msgstr "官方光盘图片" - -#~ msgid "files not found on the server!" -#~ msgstr "服务器中无此文件!" - -#~ msgid "Disc Images" -#~ msgstr "光盘图片" - -#~ msgid "Downloading covers" -#~ msgstr "正在下载封面" - -#~ msgid "Only Customs" -#~ msgstr "仅自制" - -#~ msgid "Only Original" -#~ msgstr "仅官方" - -#~ msgid "Trying custom Discarts" -#~ msgstr "尝试下载自制光盘封面" - -#~ msgid "Trying original Discarts" -#~ msgstr "尝试下载官方光盘封面" - -#~ msgid "Do you really want to delete:" -#~ msgstr "确定删除:" - -#~ msgid "Do you want to use the alternate DOL that is known to be correct?" -#~ msgstr "使用这个已知是正确的 Alt DOL 文件?" - -#~ msgid "0 (Locked and Unlocked Games)" -#~ msgstr "0 (锁定和未锁定游戏)" - -#~ msgid "1 (Unlocked Games Only)" -#~ msgstr "1 (仅未锁定游戏)" - -#~ msgid "BETA revisions" -#~ msgstr "测试版本" - -#~ msgid "GamesLevel" -#~ msgstr "游戏等级" - -#~ msgid "Unlock console to use this option." -#~ msgstr "请解锁后使用此功能" - -#~ msgid "Enabling this option on a FAT partition might slow the startup of the loader." -#~ msgstr "在FAT分区启用这个选项会使Loader启动变慢." - -#~ msgid "Unsupported format, try to extract manually." -#~ msgstr "不支持的格式,请手动解压缩" - -#~ msgid "and translaters for language files updates" -#~ msgstr "和所有语言包更新的翻译者" - -#~ msgid "All partitions" -#~ msgstr "所有分区" - -#~ msgid "An Error occured" -#~ msgstr "发生一个错误" - -#~ msgid "AutoPatch" -#~ msgstr "自动修改" - -#~ msgid "Back to Loader" -#~ msgstr "返回 Loader" - -#~ msgid "Checking for Updates" -#~ msgstr "检测软件最新版本" - -#~ msgid "Downloading" -#~ msgstr "下载" - -#~ msgid "Downloading files" -#~ msgstr "正在下载文件" - -#~ msgid "FAT: Use directories" -#~ msgstr "FAT:使用目录" - -#~ msgid "Game partition" -#~ msgstr "游戏分区" - -#~ msgid "Install 1:1 Copy" -#~ msgstr "安装1:1复制" - -#~ msgid "No SD-Card inserted!" -#~ msgstr "未插入 SD 卡!" - -#~ msgid "Parental Control disabled" -#~ msgstr "已禁用家长控制" - -#~ msgid "The wad file was installed. But It could not be deleted from the SD card." -#~ msgstr "WAD 已安装,但文件无法从 SD 卡中删除." - -#~ msgid "The wad installation failed with error %ld" -#~ msgstr "WAD 安装失败,错误号 %ld" - -#~ msgid "Unable to open the wad that was just downloaded (%s)." -#~ msgstr "不能打开刚下载的 WAD 文件 (%s)." - -#~ msgid "Update to" -#~ msgstr "升级到" - -#~ msgid "Updating" -#~ msgstr "升级中" - -#~ msgid "Updating Language Files..." -#~ msgstr "升级语言文件..." - -#~ msgid "Updating WiiTDB.zip" -#~ msgstr "正在升级 WiiTDB.zip" - -#~ msgid "Back to Wii Menu" -#~ msgstr "返回 Wii 系统菜单" - -#~ msgid "Channels" -#~ msgstr "频道" - -#~ msgid "Checking existing artwork" -#~ msgstr "检测已存在的插图" - -#~ msgid "Confirm" -#~ msgstr "确定" - -#~ msgid "Connection lost..." -#~ msgstr "连接已丢失..." - -#~ msgid "Could not find a WBFS partition." -#~ msgstr "找不到 WBFS 分区." - -#~ msgid "Could not open WBFS partition" -#~ msgstr "无法打开 WBFS 分区" - -#~ msgid "Could not read the disc." -#~ msgstr "无法读取光盘." - -#~ msgid "Could not set USB." -#~ msgstr "无法设置 USB." - -#~ msgid "Cover Path Changed" -#~ msgstr "封面路径已变更" - -#~ msgid "Download failed." -#~ msgstr "下载失败" - -#~ msgid "Downloading Page List:" -#~ msgstr "正在下载分页列表" - -#~ msgid "Download request failed." -#~ msgstr "下载请求失败" - -#~ msgid "DOL path changed" -#~ msgstr "DOL 路径已变更" - -#~ msgid "Disc Path Changed" -#~ msgstr "光盘图片路径已变更" - -#~ msgid "Display favorites" -#~ msgstr "收藏夹模式" - -#~ msgid "Do you want to retry for 30 secs?" -#~ msgstr "是否等待 30 秒后重试?" - -#~ msgid "Force" -#~ msgstr "强制" - -#~ msgid "Full Shutdown" -#~ msgstr "完全关机" - -#~ msgid "GCT Cheatcodes Path changed" -#~ msgstr "作弊码路径已变更" - -#~ msgid "GXtheme.cfg not found in any subfolder." -#~ msgstr "子目录中没有找到GXtheme.cfg" - -#~ msgid "Homebrew Appspath changed" -#~ msgstr "自制程序路径已变更" - -#~ msgid "If you don't have WiFi, press 1 to get an URL to get your WiiTDB.zip" -#~ msgstr "如果你没有联网,请按 1 键以获取一个WiiTDB.zip的下载链接." - -#~ msgid "Insert an SD-Card to save." -#~ msgstr "插入 SD 卡以保存." - -#~ msgid "Insert an SD-Card to use this option." -#~ msgstr "插入 SD 卡使用此功能." - -#~ msgid "Invalid PIN code" -#~ msgstr "错误的PIN码" - -#~ msgid "Insert an SD-Card to download images." -#~ msgstr "插入 SD 卡以下载封面." - -#~ msgid "Most likely it has dimensions that are not evenly divisible by 4." -#~ msgstr "图片格式错误,可能它的尺寸不是 4 的倍数." - -#~ msgid "Network init error" -#~ msgstr "网络启动错误" - -#~ msgid "No .dol or .elf files found." -#~ msgstr "找不到 .dol 或 .elf 文件" - -#~ msgid "No Favorites" -#~ msgstr "没有收藏记录" - -#~ msgid "No USB Device" -#~ msgstr "没有 USB 设备" - -#~ msgid "No USB Device found." -#~ msgstr "找不到 USB 设备." - -#~ msgid "Normal Covers" -#~ msgstr "普通封面" - -#~ msgid "Not Found" -#~ msgstr "没找到" - -#~ msgid "Not a DOL/ELF file." -#~ msgstr "不是 DOL/ELF 文件." - -#~ msgid "Paste it into your browser to get your WiiTDB.zip." -#~ msgstr "粘贴这个链接到浏览器来下载 WiiTDB.zip 文件." - -#~ msgid "Save Failed" -#~ msgstr "保存失败" - -#~ msgid "Selected DOL" -#~ msgstr "已选择 DOL" - -#~ msgid "Shutdown to Idle" -#~ msgstr "进入待机状态" - -#~ msgid "Shutdown?" -#~ msgstr "要关机吗?" - -#~ msgid "Standard" -#~ msgstr "标准" - -#~ msgid "TXT Cheatcodes Path changed" -#~ msgstr "TXT 作弊码文件路径已变更" - -#~ msgid "Theme Download Path" -#~ msgstr "主题下载路径" - -#~ msgid "Theme Path Changed" -#~ msgstr "主题路径已变更" - -#~ msgid "Transfer failed." -#~ msgstr "传输失败." - -#~ msgid "Update Path changed." -#~ msgstr "升级文件存放路径已变更" - -#~ msgid "Waiting for USB Device" -#~ msgstr "等待 USB 设备" - -#~ msgid "WiiTDB Path changed." -#~ msgstr "WiiTDB 路径已变更" - -#~ msgid "You are about to delete " -#~ msgstr "要删除" - -#~ msgid "You are choosing to display favorites and you do not have any selected." -#~ msgstr "你选择显示收藏夹但里面还没有任何收藏" - -#~ msgid "You have attempted to load a bad image" -#~ msgstr "你在加载损坏的图像" - -#~ msgid "Your URL has been saved in %sWiiTDB_URL.txt." -#~ msgstr "链接已写入 %sWiiTDB_URL.txt 文件." - -#~ msgid "does not exist! You Messed something up, Idiot." -#~ msgstr "不存在!" - -#~ msgid "file left" -#~ msgstr "剩余文件" diff --git a/Languages/spanish.lang b/Languages/spanish.lang deleted file mode 100644 index 8dd12c38..00000000 --- a/Languages/spanish.lang +++ /dev/null @@ -1,1821 +0,0 @@ -# USB Loader GX language source file. -# spanish.lang - r921 -# don't delete/change this line (é). -msgid "" -msgstr "" -"Project-Id-Version: USB Loader GX\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-06 19:36+0100\n" -"PO-Revision-Date: 2009-10-01 01:00+0200\n" -"Last-Translator: SirPalax\n" -"Language-Team: Penn, SirPalax\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -msgid " Wad Saved as:" -msgstr " WAD guardado como:" - -msgid " could not be downloaded." -msgstr " no se han podido descargar." - -msgid " has been Saved. The text has not been verified. Some of the code may not work right with each other. If you experience trouble, open the text in a real text editor for more information." -msgstr " ha sido Guardado. Algún código puede no funcionar correctamente. Si experimentas problemas, revisa el texto en un editor de texto para obtener más información." - -msgid " is not on the server." -msgstr " no existe en el servidor." - -#, c-format -msgid "%i files not found on the server!" -msgstr "" - -#, c-format -msgid "%i missing files" -msgstr "" - -msgid "0 (Everyone)" -msgstr "0 (Todos)" - -msgid "1 (Child 7+)" -msgstr "1 (Niños 7+)" - -msgid "1 hour" -msgstr "1 hora" - -msgid "10 min" -msgstr "10 min." - -msgid "2 (Teen 12+)" -msgstr "2 (Adolescentes 12+)" - -msgid "20 min" -msgstr "20 min." - -msgid "2D Cover Path" -msgstr "Ruta Carátulas 2D" - -msgid "3 (Mature 16+)" -msgstr "3 (Jóvenes 16+)" - -msgid "3 min" -msgstr "3 min." - -msgid "30 min" -msgstr "30 min." - -msgid "3D Cover Path" -msgstr "Ruta Carátulas 3D" - -msgid "3D Covers" -msgstr "3D" - -msgid "4 (Adults Only 18+)" -msgstr "4 (Sólo Adultos 18+)" - -msgid "5 min" -msgstr "5 min." - -msgid ">> Deleting tickets..." -msgstr ">> Borrando tickets..." - -msgid ">> Deleting tickets...ERROR! " -msgstr ">> Borrando tickets... ¡ERROR! " - -msgid ">> Deleting tickets...Ok! " -msgstr ">> Borrando tickets... ¡Correcto! " - -msgid ">> Deleting title ...ERROR! " -msgstr ">> Borrando título... ¡ERROR! " - -msgid ">> Deleting title ...Ok!" -msgstr ">> Borrando título... ¡Correcto!" - -msgid ">> Deleting title contents..." -msgstr ">> Borrando contenidos del título..." - -msgid ">> Deleting title contents...ERROR! " -msgstr ">> Borrando contenidos del título... ¡ERROR! " - -msgid ">> Deleting title contents...Ok!" -msgstr ">> Borrando contenidos del título... ¡Correcto!" - -msgid ">> Deleting title..." -msgstr ">> Borrando título..." - -msgid ">> Finishing installation..." -msgstr ">> Finalizando instalación..." - -msgid ">> Installing content #" -msgstr ">> Instalando contenido #" - -msgid ">> Installing ticket..." -msgstr ">> Instalando ticket..." - -msgid ">> Installing title..." -msgstr ">> Instalando título..." - -msgid ">> Reading WAD data..." -msgstr ">> Leyendo datos del WAD..." - -msgid ">> Reading WAD data...ERROR! " -msgstr ">> Leyendo datos del WAD... ¡ERROR!" - -msgid ">> Reading WAD data...Ok!" -msgstr ">> Leyendo datos del WAD... ¡Correcto!" - -msgid "AUTO" -msgstr "" - -msgid "All Partitions" -msgstr "" - -msgid "All images downloaded successfully." -msgstr "" - -msgid "All the features of USB Loader GX are unlocked." -msgstr "Todas las características del USB Loader GX desbloqueadas." - -msgid "Alternate DOL" -msgstr "DOL Alternativo" - -msgid "Anti" -msgstr "" - -msgid "App Language" -msgstr "Idioma Aplicación" - -msgid "Apply" -msgstr "" - -msgid "Apr" -msgstr "Abr" - -msgid "Are you sure you want to lock USB Loader GX?" -msgstr "" - -msgid "Are you sure you want to reset?" -msgstr "" - -msgid "Are you sure?" -msgstr "¿Estás seguro?" - -msgid "Aug" -msgstr "Ago" - -msgid "Author(s):" -msgstr "" - -msgid "AutoInit Network" -msgstr "AutoIniciar la Red" - -msgid "Automatic port switching is done on the fly. You need to change all custom paths to SD-Card first for this option or else it could damage a filesystem." -msgstr "" - -msgid "BCA Codes Path" -msgstr "Ruta Códigos BCA" - -msgid "Back" -msgstr "Atrás" - -msgid "Back to HBC or Wii Menu" -msgstr "Volver a HBC o Menú Wii" - -msgid "Backgroundmusic" -msgstr "Música de fondo" - -msgid "Big thanks to:" -msgstr "Gracias a:" - -msgid "Block Cover Downloads" -msgstr "" - -msgid "Block Custom Paths" -msgstr "" - -msgid "Block Game Install" -msgstr "" - -msgid "Block Game Settings" -msgstr "" - -msgid "Block GameID Change" -msgstr "" - -msgid "Block Global Settings" -msgstr "" - -msgid "Block Gui Settings" -msgstr "" - -msgid "Block HBC Menu" -msgstr "" - -msgid "Block IOS Reload" -msgstr "Impedir recarga IOS" - -msgid "Block Loader Settings" -msgstr "" - -msgid "Block Parental Settings" -msgstr "" - -msgid "Block Reset Settings" -msgstr "" - -msgid "Block Sound Settings" -msgstr "" - -msgid "Block Theme Downloader" -msgstr "" - -msgid "Block Theme Menu" -msgstr "" - -msgid "Block Title Launcher" -msgstr "" - -msgid "Block Updates" -msgstr "" - -msgid "Boot/Standard" -msgstr "Inicio/Estándar" - -msgid "Boot?" -msgstr "¿Ejecutar?" - -msgid "Both" -msgstr "Ambos" - -msgid "Both Ports" -msgstr "" - -msgid "Can't be formatted" -msgstr "No se puede formatear" - -msgid "Can't create directory" -msgstr "No se creó la carpeta" - -#, c-format -msgid "Can't create path: %s" -msgstr "" - -msgid "Can't delete:" -msgstr "No se eliminó:" - -msgid "Cancel" -msgstr "Cancelar" - -msgid "Cannot write to destination." -msgstr "" - -msgid "Change Play Path" -msgstr "Cambiar Ruta" - -msgid "Cheatfile is blank" -msgstr "El archivo de Trucos está vacio" - -msgid "Clear" -msgstr "" - -msgid "Click to Download Covers" -msgstr "Clic para descargar Carátulas" - -msgid "Click to change game ID" -msgstr "Clic para cambiar la ID del juego" - -msgid "Clock" -msgstr "Reloj" - -msgid "Close" -msgstr "Salir" - -msgid "Code Download" -msgstr "Descargar Códigos" - -#, c-format -msgid "Coded by: %s" -msgstr "Programado por: %s" - -msgid "Coding:" -msgstr "Programación:" - -msgid "Connection to server timed out." -msgstr "" - -msgid "Console" -msgstr "Consola" - -msgid "Console Default" -msgstr "Pred. Consola" - -msgid "Console Locked" -msgstr "Consola Bloqueada" - -msgid "Console must be unlocked for this option." -msgstr "" - -msgid "Console should be unlocked to modify it." -msgstr "Debes desbloquear la consola para modificar." - -msgid "Continue to install game?" -msgstr "¿Continuar instalando juego?" - -msgid "Controllevel" -msgstr "Control de Nivel" - -msgid "Correct Password" -msgstr "Contraseña Correcta" - -msgid "Could not connect to the server." -msgstr "" - -msgid "Could not create GCT file" -msgstr "¡No se pudo crear el archivo GCT!" - -#, c-format -msgid "Could not create path: %s" -msgstr "" - -msgid "Could not find info for this game in the wiitdb.xml." -msgstr "" - -msgid "Could not initialize DIP module!" -msgstr "¡No se pudo iniciar módulo DIP!" - -msgid "Could not initialize network!" -msgstr "¡No se pudo iniciar la Red!" - -msgid "Could not open Disc" -msgstr "¡No se pudo abrir el Disco!" - -msgid "Could not open wiitdb.xml." -msgstr "" - -msgid "Could not save." -msgstr "¡No se pudo guardar!" - -msgid "Cover Download" -msgstr "Descarga de Carátulas" - -msgid "Create" -msgstr "Crear" - -msgid "Credits" -msgstr "Créditos" - -msgid "Custom Discarts" -msgstr "" - -msgid "Custom Paths" -msgstr "Personalizar Rutas" - -msgid "Customs/Original" -msgstr "Artísticas/Originales" - -msgid "DOL Path" -msgstr "Ruta del DOL" - -msgid "Dec" -msgstr "Dic" - -msgid "Default" -msgstr "Predeterminado" - -msgid "Default Gamesettings" -msgstr "Conf. Pred. de Juegos" - -msgid "Default Settings" -msgstr "Configuración Predeterminada" - -msgid "Delete" -msgstr "Borrar" - -msgid "Delete ?" -msgstr "¿Borrar?" - -msgid "Delete Cheat GCT" -msgstr "Borrar Trucos GCT" - -msgid "Delete Cheat TXT" -msgstr "Borrar Trucos TXT" - -msgid "Delete Cover Artwork" -msgstr "Borrar Carátula" - -msgid "Delete Disc Artwork" -msgstr "Borrar Imagen Disco" - -msgid "Design:" -msgstr "Diseño:" - -msgid "Developed by" -msgstr "Desarrollado por" - -msgid "Directory does not exist!" -msgstr "¡La carpeta no existe!" - -msgid "Disc Artwork Download" -msgstr "Descarga Imagen Discos" - -msgid "Disc Artwork Path" -msgstr "Ruta Imagen Discos" - -msgid "Disc Default" -msgstr "Pred. Disco" - -msgid "DiskFlip" -msgstr "GiraDiscos" - -msgid "Display" -msgstr "Mostrar" - -msgid "Display as a carousel" -msgstr "Mostrar como carrusel" - -msgid "Display as a grid" -msgstr "Mostrar como rejilla" - -msgid "Display as a list" -msgstr "Mostrar como lista" - -msgid "Display favorites only" -msgstr "" - -msgid "Do you want to apply it now?" -msgstr "¿Quieres aplicarlo ahora?" - -msgid "Do you want to apply this theme?" -msgstr "" - -msgid "Do you want to change language?" -msgstr "¿Quieres cambiar el idioma?" - -msgid "Do you want to download this theme?" -msgstr "¿Quieres descargar este Tema?" - -msgid "Do you want to format:" -msgstr "Quieres formatear:" - -msgid "Do you want to load the default theme?" -msgstr "" - -msgid "Do you want to sync free space info sector on all FAT32 partitions?" -msgstr "" - -msgid "Do you wish to update/download all language files?" -msgstr "¿Quieres actualizar/descargar todos los archivos de idiomas?" - -msgid "Done!" -msgstr "¡Listo!" - -msgid "Download" -msgstr "Descargar" - -msgid "Download Now" -msgstr "Descargar ahora" - -msgid "Download finished" -msgstr "Descarga completada" - -msgid "Downloading 3D Covers" -msgstr "" - -msgid "Downloading Flat Covers" -msgstr "" - -msgid "Downloading Full HQ Covers" -msgstr "" - -msgid "Downloading Full LQ Covers" -msgstr "" - -msgid "Downloading custom Discarts" -msgstr "" - -msgid "Downloading file..." -msgstr "" - -msgid "Downloading image:" -msgstr "Descargando imagen:" - -msgid "Downloading original Discarts" -msgstr "" - -msgid "Downloading pagelist:" -msgstr "" - -msgid "Dutch" -msgstr "Holandés" - -msgid "ERROR" -msgstr "" - -msgid "ERROR:" -msgstr "" - -msgid "ERROR: Can't set up theme." -msgstr "ERROR: No se puede configurar el tema." - -msgid "English" -msgstr "Inglés" - -msgid "Error" -msgstr "" - -msgid "Error !" -msgstr "¡Error!" - -msgid "Error 002 fix" -msgstr "Parchear Error 002" - -#, c-format -msgid "Error creating path: %s" -msgstr "" - -msgid "Error opening downloaded file" -msgstr "" - -msgid "Error reading Disc" -msgstr "Error leyendo Disco" - -#, c-format -msgid "Error when downloading file: %i" -msgstr "" - -msgid "Error while downloding file" -msgstr "" - -msgid "Error while opening the zip." -msgstr "" - -msgid "Error while transfering data." -msgstr "Error durante la transferencia de datos." - -msgid "Error while updating USB Loader GX." -msgstr "" - -msgid "Error writing the data." -msgstr "" - -msgid "Error..." -msgstr "" - -msgid "Error:" -msgstr "" - -msgid "Exit" -msgstr "" - -msgid "Exit to where?" -msgstr "" - -msgid "Extracting files..." -msgstr "Extrayendo archivos..." - -msgid "Failed formating" -msgstr "No se ha podido formatear" - -msgid "Failed to extract." -msgstr "No se ha podido extraer" - -msgid "Failed to open partition" -msgstr "No se ha podido abrir la partición" - -msgid "Failed updating" -msgstr "" - -msgid "Feb" -msgstr "" - -msgid "File not found." -msgstr "Archivo no encontrado." - -#, c-format -msgid "Filesize is %i Byte." -msgstr "" - -msgid "Filesize is 0 Byte." -msgstr "" - -msgid "Finishing installation... Ok!" -msgstr "Finalizando instalación... ¡Correcto!" - -msgid "Flat Covers" -msgstr "" - -msgid "Flip-X" -msgstr "Desplazamiento X" - -msgid "Force NTSC" -msgstr "" - -msgid "Force PAL50" -msgstr "" - -msgid "Force PAL60" -msgstr "" - -msgid "Format" -msgstr "Formateo" - -msgid "Formatting, please wait..." -msgstr "Formateando, por favor espera..." - -msgid "Found missing images." -msgstr "" - -msgid "Free Space" -msgstr "Espacio Libre" - -msgid "French" -msgstr "Francés" - -msgid "Full Cover Path" -msgstr "" - -msgid "Full HQ Covers" -msgstr "" - -msgid "Full LQ Covers" -msgstr "" - -msgid "Full Menu" -msgstr "" - -msgid "Full shutdown" -msgstr "" - -msgid "GAMEID_Gamename" -msgstr "IDdelJuego_NombreDelJuego" - -msgid "GCT Cheatcodes Path" -msgstr "Ruta de Trucos GCT" - -msgid "GCT File created" -msgstr "Archivo GCT creado" - -msgid "GUI Settings" -msgstr "Configuración de la GUI" - -msgid "Game ID" -msgstr "ID del Juego" - -msgid "Game IOS" -msgstr "" - -msgid "Game Language" -msgstr "Idioma" - -msgid "Game Load" -msgstr "Configuración de los Juegos" - -msgid "Game Lock" -msgstr "" - -msgid "Game Only" -msgstr "" - -msgid "Game Region" -msgstr "Región" - -msgid "Game Size" -msgstr "Tamaño del Juego" - -msgid "Game Sound Mode" -msgstr "Modo sonido del Juego" - -msgid "Game Sound Volume" -msgstr "Volumen sonido del Juego" - -msgid "Game Split Size" -msgstr "" - -msgid "Game is already installed:" -msgstr "El juego ya estaba instalado:" - -msgid "Game/Install Partition" -msgstr "" - -msgid "Gamename [GAMEID]" -msgstr "NombreDelJuego [IDdelJuego]" - -msgid "Games" -msgstr "Juegos" - -msgid "Genre:" -msgstr "" - -msgid "German" -msgstr "Alemán" - -msgid "Global Settings" -msgstr "" - -msgid "HOME Menu" -msgstr "Menú HOME" - -msgid "Homebrew Apps Path" -msgstr "Ruta Apps Homebrew" - -msgid "Homebrew Channel" -msgstr "" - -msgid "Homebrew Launcher" -msgstr "Ejecutar Homebrew" - -msgid "Hour" -msgstr "Horas" - -msgid "How do you want to update?" -msgstr "¿Cómo quieres actualizar?" - -msgid "How to Shutdown?" -msgstr "¿Cómo quieres apagar?" - -#, c-format -msgid "Incoming file %0.2fKB" -msgstr "Archivo recibido %0.2fKB" - -#, c-format -msgid "Incoming file %0.2fMB" -msgstr "Archivo recibido %0.2fMB" - -msgid "Initializing Network" -msgstr "Iniciando la Red" - -msgid "Insert Disk" -msgstr "Inserta el Disco" - -msgid "Insert a Wii Disc!" -msgstr "¡Inserta un Disco Wii!" - -msgid "Install" -msgstr "Instalar" - -msgid "Install Error!" -msgstr "¡Error de Instalación!" - -msgid "Install a game" -msgstr "Instalar un juego" - -msgid "Install directories" -msgstr "" - -msgid "Install partitions" -msgstr "Instalar particiones" - -msgid "Installing content... Ok!" -msgstr "Instalando contenido... ¡Correcto!" - -msgid "Installing game:" -msgstr "Instalando juego:" - -msgid "Installing ticket... Ok!" -msgstr "Instalando ticket... ¡Correcto!" - -msgid "Installing title... Ok!" -msgstr "Instalando título... ¡Correcto!" - -msgid "Installing wad" -msgstr "Instalando el WAD" - -msgid "Issue manager /" -msgstr "" - -msgid "It seems that you have some information that will be helpful to us. Please pass this information along to the DEV team." -msgstr "Parece que tienes alguna información que puede ser útil para nosotros. Por favor envía esta información al equipo desarrollador." - -msgid "Italian" -msgstr "Italiano" - -msgid "Jan" -msgstr "Ene" - -msgid "Japanese" -msgstr "Japonés" - -msgid "July" -msgstr "Jul" - -msgid "June" -msgstr "Jun" - -msgid "Keep" -msgstr "Mantener" - -msgid "Keyboard" -msgstr "Teclado" - -msgid "Korean" -msgstr "Coreano" - -msgid "Language File" -msgstr "Idiomas" - -msgid "Language change:" -msgstr "Cambio de Idioma:" - -msgid "Languagefiles Path" -msgstr "" - -msgid "Languagepath changed." -msgstr "Ruta de idioma cambiada." - -msgid "Left" -msgstr "Izquierda" - -msgid "Like SysMenu" -msgstr "Como Menú Sist." - -msgid "List on Gamelaunch" -msgstr "" - -msgid "Load" -msgstr "Cargar" - -msgid "Load From SD/USB" -msgstr "Cargar desde SD/USB" - -#, c-format -msgid "Load file from: %s ?" -msgstr "¿Cargar el archivo desde: %s ?" - -msgid "Load this DOL as alternate DOL?" -msgstr "¿Cargar este DOL como DOL Alternativo?" - -msgid "Loader Settings" -msgstr "" - -msgid "Loading standard language." -msgstr "Cargando idioma estándar." - -msgid "Loading standard music." -msgstr "Cargando música estándar." - -msgid "Lock Console" -msgstr "Bloquear consola" - -msgid "Lock USB Loader GX" -msgstr "" - -msgid "Locked" -msgstr "Bloqueada" - -msgid "Loop Directory" -msgstr "Carpeta de bucle" - -msgid "Loop Music" -msgstr "Bucle musical" - -msgid "Loop Sound" -msgstr "Bucle de sonido" - -msgid "Main tester:" -msgstr "" - -msgid "Mar" -msgstr "" - -msgid "Mark new games" -msgstr "Marcar juegos nuevos" - -msgid "May" -msgstr "" - -msgid "Messageboard Update" -msgstr "" - -msgid "Motion+ Video" -msgstr "" - -msgid "Mount DVD drive" -msgstr "Montar unidad DVD" - -msgid "Multiple Partitions" -msgstr "" - -msgid "Music Loop Mode" -msgstr "Modo Bucle Musical" - -msgid "Music Volume" -msgstr "Volumen de la Música" - -msgid "Neither" -msgstr "Ninguno" - -msgid "Network is not initiated." -msgstr "" - -msgid "New Disc Detected" -msgstr "Nuevo Disco Detectado" - -msgid "Next" -msgstr "Siguiente" - -msgid "No" -msgstr "" - -msgid "No Cheatfile found" -msgstr "No se encontró el archivo de Trucos" - -msgid "No DOL file found on disc." -msgstr "No se encontró el archivo DOL en el Disco" - -msgid "No Splitting" -msgstr "" - -msgid "No URL or Path specified." -msgstr "" - -msgid "No WBFS or FAT/NTFS/EXT partition found" -msgstr "" - -msgid "No cheats were selected" -msgstr "No se seleccionaron trucos" - -msgid "No data could be read." -msgstr "No se dispone de datos para leer." - -msgid "No favorites selected." -msgstr "" - -msgid "No file missing!" -msgstr "¡No faltan archivos!" - -msgid "No new updates." -msgstr "No hay nuevas actualizaciones." - -msgid "No themes found on the site." -msgstr "No hay Temas en este sitio." - -msgid "No themes found." -msgstr "" - -msgid "None" -msgstr "Ninguno" - -msgid "Normal" -msgstr "" - -msgid "Not a WAD file." -msgstr "No es un archivo WAD." - -msgid "Not a Wii Disc" -msgstr "No es un Disco Wii" - -msgid "Not a valid URL" -msgstr "" - -msgid "Not a valid URL path" -msgstr "" - -msgid "Not a valid domain" -msgstr "" - -msgid "Not enough free memory." -msgstr "¡No hay suficiente memoria libre!" - -msgid "Not enough free space!" -msgstr "¡No hay suficiente espacio libre!" - -msgid "Not enough memory." -msgstr "" - -msgid "Not required" -msgstr "" - -msgid "Not supported format!" -msgstr "Formato no soportado." - -msgid "Nov" -msgstr "" - -msgid "OFF" -msgstr "Apagado" - -msgid "OK" -msgstr "Aceptar" - -msgid "ON" -msgstr "Encendido" - -msgid "Ocarina" -msgstr "" - -msgid "Oct" -msgstr "" - -msgid "Official Site:" -msgstr "Página Oficial:" - -msgid "Offset" -msgstr "" - -msgid "Only Game Partition" -msgstr "" - -msgid "Only for Install" -msgstr "Sólo al instalar" - -msgid "Original Discarts" -msgstr "" - -msgid "Original/Customs" -msgstr "Originales/Artísticas" - -msgid "Parental Control" -msgstr "Control Parental" - -msgid "Partition" -msgstr "Partición" - -msgid "Password" -msgstr "Contraseña" - -msgid "Password Changed" -msgstr "Contraseña cambiada" - -msgid "Password has been changed" -msgstr "La contraseña ha sido cambiada" - -msgid "Patch Country Strings" -msgstr "Parchear País" - -msgid "Path Changed" -msgstr "" - -msgid "Permission denied." -msgstr "" - -msgid "Pick from a list" -msgstr "Elegir de una lista" - -msgid "Play Count" -msgstr "Partidas" - -msgid "Play Next" -msgstr "Oír Siguiente" - -msgid "Play Once" -msgstr "Oir una vez" - -msgid "Play Previous" -msgstr "Oír Anterior" - -msgid "Playing Music:" -msgstr "Reproducción Musical:" - -msgid "Please wait..." -msgstr "Por favor, espera..." - -msgid "Power off the Wii" -msgstr "Apagar la Wii" - -msgid "Prev" -msgstr "Ant." - -msgid "Prompts Buttons" -msgstr "Botones" - -msgid "Published by" -msgstr "Publicado por" - -msgid "Quick Boot" -msgstr "Inicio Rápido" - -msgid "Random Directory Music" -msgstr "Aleatorio de la carpeta musical" - -msgid "Reading WAD data... Ok!" -msgstr "Leyendo datos del WAD... ¡Correcto!" - -msgid "Receiving file from:" -msgstr "Recibir archivo desde:" - -msgid "Region Patch" -msgstr "" - -msgid "Released" -msgstr "Comercializado el" - -msgid "Reload SD" -msgstr "Recargar SD" - -msgid "Remove update" -msgstr "Quitar actualización" - -msgid "Rename Game on WBFS" -msgstr "Renombrar juego en WBFS" - -msgid "Reset" -msgstr "" - -msgid "Reset BG Music" -msgstr "Reiniciar Música de Fondo" - -msgid "Reset Playcounter" -msgstr "Reiniciar Partidas" - -msgid "Reset to default BGM?" -msgstr "" - -msgid "Restarting..." -msgstr "Reiniciando..." - -msgid "Return" -msgstr "Volver" - -msgid "Return To" -msgstr "" - -msgid "Return to Wii Menu" -msgstr "Volver a Menú Wii" - -msgid "Right" -msgstr "Derecha" - -msgid "Rumble" -msgstr "Vibración" - -msgid "SChinese" -msgstr "Chino S." - -msgid "SFX Volume" -msgstr "Volumen de los Efectos" - -msgid "Save" -msgstr "Guardar" - -msgid "Save Failed. No device inserted?" -msgstr "" - -msgid "Save Game List to" -msgstr "¿Guardar Lista de Juegos en" - -msgid "Save List" -msgstr "" - -msgid "Saved" -msgstr "Guardado" - -msgid "Screensaver" -msgstr "Salvapantallas" - -msgid "Select" -msgstr "Seleccionar" - -msgid "Select DOL Offset" -msgstr "" - -msgid "Select a DOL" -msgstr "Seleccionar DOL" - -msgid "Select a DOL from Game" -msgstr "" - -msgid "Sept" -msgstr "" - -msgid "Set Search-Filter" -msgstr "Usar filtro de búsqueda" - -msgid "Settings" -msgstr "Configuración" - -msgid "Show Free Space" -msgstr "" - -msgid "Shutdown System" -msgstr "Apagar Sistema" - -msgid "Shutdown Wii" -msgstr "" - -msgid "Sort alphabetically" -msgstr "Ordenar alfabéticamente" - -msgid "Sort by number of players" -msgstr "" - -msgid "Sort by rank" -msgstr "Ordenar por clasificación" - -msgid "Sort order by most played" -msgstr "Ordenar por los más jugados" - -msgid "Sound" -msgstr "Sonido" - -msgid "Sound Settings" -msgstr "" - -msgid "Sound+BGM" -msgstr "Sonido+Música Fondo" - -msgid "Sound+Quiet" -msgstr "Sonido+Silencio" - -msgid "Spanish" -msgstr "Español" - -msgid "Special thanks to:" -msgstr "Agradecimientos especiales a:" - -msgid "Split each 2GB" -msgstr "" - -msgid "Split each 4GB" -msgstr "" - -msgid "Standby" -msgstr "" - -msgid "Success" -msgstr "Conseguido" - -msgid "Success:" -msgstr "Conseguido:" - -msgid "Successfully Saved" -msgstr "Guardado correctamente" - -msgid "Successfully Updated" -msgstr "Actualización correcta" - -msgid "Successfully Updated thanks to www.techjawa.com" -msgstr "Actualización correcta gracias a www.techjawa.com" - -msgid "Successfully deleted:" -msgstr "Borrado correctamente:" - -msgid "Successfully extracted theme." -msgstr "Tema extraido correctamente." - -msgid "Successfully installed:" -msgstr "Instalado correctamente:" - -msgid "Sync FAT32 FS Info" -msgstr "" - -msgid "Synchronizing..." -msgstr "" - -msgid "System Default" -msgstr "Pred. Sistema" - -msgid "TChinese" -msgstr "Chino T." - -msgid "TXT Cheatcodes Path" -msgstr "Ruta de Trucos TXT" - -msgid "The .them file was not found in the zip." -msgstr "" - -msgid "The entered directory does not exist. Would you like to create it?" -msgstr "La carpeta especificada no existe. ¿Quieres crearla?" - -msgid "The game installation is disabled under this IOS because of instability in usb write." -msgstr "" - -msgid "The wad file was installed" -msgstr "" - -#, c-format -msgid "The wad installation failed with error %i" -msgstr "" - -msgid "Theme Downloader" -msgstr "Descarga de Temas" - -msgid "Theme Menu" -msgstr "" - -msgid "Theme Path" -msgstr "Ruta del Tema" - -msgid "Theme Title:" -msgstr "Título del Tema:" - -msgid "Themes by www.spiffy360.com" -msgstr "" - -msgid "This IOS is the BootMii ios. If you are sure it is not BootMii and you have something else installed there than ignore this warning." -msgstr "" - -msgid "This IOS was not found on the titles list. If you are sure you have it installed than ignore this warning." -msgstr "" - -msgid "Time left:" -msgstr "Quedan:" - -msgid "Title Launcher" -msgstr "Lanzador de Canales" - -msgid "Titles from WiiTDB" -msgstr "Títulos WiiTDB" - -msgid "Tooltips" -msgstr "InfoBurbujas" - -msgid "Transfer failed" -msgstr "" - -msgid "USB Device not found" -msgstr "USB no encontrado" - -msgid "USB Loader GX is protected" -msgstr "USB Loader GX está protegido" - -msgid "USB Port" -msgstr "" - -msgid "USB Port changing is only supported on Hermes cIOS." -msgstr "" - -msgid "Uninstall" -msgstr "Desinstalar" - -msgid "Uninstall Game" -msgstr "Borrar Juego" - -msgid "Uninstall Menu" -msgstr "Menú de Desinstalación" - -msgid "Uninstall all" -msgstr "" - -msgid "Uninstalling wad" -msgstr "Desinstalando el WAD" - -msgid "Unknown" -msgstr "" - -msgid "Unlock USB Loader GX" -msgstr "" - -msgid "Unlocked" -msgstr "Desbloqueada" - -msgid "Unsupported format, try to extract manually TempTheme.zip." -msgstr "" - -msgid "Update" -msgstr "Actualizar" - -msgid "Update All" -msgstr "Actualizar Todo" - -msgid "Update DOL" -msgstr "Actualizar DOL" - -msgid "Update Files" -msgstr "Actualizar archivos" - -msgid "Update Path" -msgstr "Ruta Actualización" - -msgid "Update all Language Files" -msgstr "Actualizar todos los archivos de Idiomas" - -msgid "Update failed" -msgstr "Error en la Actualización" - -msgid "Update successfull" -msgstr "" - -msgid "Updating Language Files:" -msgstr "Actualizando archivos de Idiomas:" - -msgid "Uploaded ZIP file installed to homebrew directory." -msgstr "Enviado archivo ZIP instalado en la carpeta homebrew." - -msgid "VIDTV Patch" -msgstr "Parche VIDTV" - -msgid "Version:" -msgstr "" - -#, c-format -msgid "Version: %s" -msgstr "Versión: %s" - -msgid "Video Mode" -msgstr "Modo Vídeo" - -msgid "WDM Files Path" -msgstr "" - -msgid "WIP Patches Path" -msgstr "Ruta Parches WIP" - -msgid "Waiting..." -msgstr "Esperando..." - -msgid "Warning:" -msgstr "" - -msgid "What do you want to update?" -msgstr "¿Qué quieres actualizar?" - -msgid "What should be deleted for this game title:" -msgstr "" - -msgid "WiFi Features" -msgstr "Características WiFi" - -msgid "Widescreen Fix" -msgstr "Ajuste panorámico" - -msgid "Wii Menu" -msgstr "Menú de Wii" - -msgid "Wii Settings" -msgstr "Opciones de Wii" - -msgid "WiiTDB Files" -msgstr "WiiTDB" - -msgid "WiiTDB Path" -msgstr "Ruta WiiTDB" - -msgid "WiiTDB is up to date." -msgstr "" - -msgid "Wiilight" -msgstr "Iluminar lector" - -msgid "Wrong Password" -msgstr "Contraseña incorrecta" - -msgid "Yes" -msgstr "Sí" - -msgid "You are currently using IOS" -msgstr "" - -msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." -msgstr "" - -msgid "You need to select or format a partition" -msgstr "Necesitas seleccionar o formatear una partición" - -msgid "and translators for language files updates" -msgstr "" - -msgid "available" -msgstr "disponible" - -msgid "does not exist!" -msgstr "no existe" - -msgid "does not exist! Loading game without cheats." -msgstr "no existe. Ejecutando el juego sin trucos." - -msgid "files left" -msgstr "archivos pendientes" - -msgid "for FAT/NTFS support" -msgstr "por el soporte FAT/NTFS" - -msgid "for Ocarina" -msgstr "por Ocarina" - -msgid "for WiiTDB and hosting covers / disc images" -msgstr "por WiiTB y alojar caráturas e imágenes" - -msgid "for diverse patches" -msgstr "por diversos parches" - -msgid "for his awesome tool LibWiiGui" -msgstr "por su increible herramienta LibWiiGui" - -msgid "for hosting the themes" -msgstr "por alojar los Temas" - -msgid "for hosting the update files" -msgstr "por alojar las actualizaciones" - -msgid "for the USB Loader source" -msgstr "por el código de USB Loader" - -msgid "formatted!" -msgstr "¡formateado!" - -msgid "free" -msgstr "libres" - -msgid "not set" -msgstr "sin contraseña" - -msgid "of" -msgstr "de" - -msgid "seconds left" -msgstr "segundos restantes" - -#~ msgid "Author:" -#~ msgstr "Autor:" - -#~ msgid "Download Boxart image?" -#~ msgstr "¿Descargar Imágenes?" - -#~ msgid "Download Discart image?" -#~ msgstr "¿Descargar la imagen del disco?" - -#~ msgid "Downloading file" -#~ msgstr "Descargando archivo" - -#~ msgid "Missing files" -#~ msgstr "Archivo(s) pendiente(s)" - -#~ msgid "files not found on the server!" -#~ msgstr "archivo(s) no encontrado(s) en el servidor." - -#~ msgid "Disc Images" -#~ msgstr "Imagen Discos" - -#~ msgid "Only Customs" -#~ msgstr "Sólo Artísticas" - -#~ msgid "Only Original" -#~ msgstr "Sólo Originales" - -#~ msgid "Do you really want to delete:" -#~ msgstr "¿Realmente quieres borrar?:" - -#~ msgid "Do you want to use the alternate DOL that is known to be correct?" -#~ msgstr "¿Quieres usar el DOL Alternativo que se sabe es correcto?" - -#~ msgid "BETA revisions" -#~ msgstr "Revisiones BETA" - -#~ msgid "Unlock console to use this option." -#~ msgstr "Desbloquea la consola para usar esta opción." - -#~ msgid "Full Shutdown" -#~ msgstr "Apagado Total" - -#~ msgid "GXtheme.cfg not found in any subfolder." -#~ msgstr "No se encuentra GXtheme.cfg en ninguna subcarpeta." - -#~ msgid "If you don't have WiFi, press 1 to get an URL to get your WiiTDB.zip" -#~ msgstr "Si no tienes WiFi, pulsa 1 para ver la URL donde coger tu WiiTDB.zip" - -#~ msgid "Paste it into your browser to get your WiiTDB.zip." -#~ msgstr "Pégalo en tu navegador para obtener tu WiiTDB.zip." - -#~ msgid "Shutdown to Idle" -#~ msgstr "WiiConnect24" - -#~ msgid "Your URL has been saved in %sWiiTDB_URL.txt." -#~ msgstr "Tu URL se ha guardado en %sWiiTDB_URL.txt." - -#~ msgid "Can't create file" -#~ msgstr "No se creó el archivo" - -#~ msgid "Connection lost..." -#~ msgstr "Conexión perdida..." - -#~ msgid "Download failed." -#~ msgstr "Error en la descarga." - -#~ msgid "Download request failed." -#~ msgstr "Error al solicitar la descarga." - -#~ msgid "Downloading Page List:" -#~ msgstr "Descargando Lista de Páginas:" - -#~ msgid "Theme Download Path" -#~ msgstr "Ruta Descarga Temas" - -#~ msgid "Transfer failed." -#~ msgstr "Error en la transferencia." - -#~ msgid "Unsupported format, try to extract manually." -#~ msgstr "Formato no soportado, prueba a extraer manualmente." - -#~ msgid "and translaters for language files updates" -#~ msgstr "y traductores por actualizar los idiomas" - -#~ msgid "Insert an SD-Card to save." -#~ msgstr "Insertar SD para guardar." - -#~ msgid "Insert an SD-Card to use this option." -#~ msgstr "Insertar SD para usar esta opción" - -#~ msgid "No SD-Card inserted!" -#~ msgstr "¡SD no insertada!" - -#~ msgid "Waiting for USB Device" -#~ msgstr "Esperando al Dispositivo USB" - -#~ msgid "Back to Loader" -#~ msgstr "Volver al HBC" - -#~ msgid "FAT: Use directories" -#~ msgstr "Usar carpetas FAT" - -#~ msgid "All partitions" -#~ msgstr "Todas las particiones" - -#~ msgid "Game partition" -#~ msgstr "Partición de Juegos" - -#~ msgid "Install 1:1 Copy" -#~ msgstr "Instalar Copias 1:1" - -#~ msgid "An Error occured" -#~ msgstr "Ocurrió un Error" - -#~ msgid "Are you sure you want to enable Parent Control?" -#~ msgstr "¿Estás seguro de querer activar el Control Parental?" - -#~ msgid "AutoPatch" -#~ msgstr "AutoParchear" - -#~ msgid "Checking for Updates" -#~ msgstr "Comprobando actualizaciones" - -#~ msgid "Downloading" -#~ msgstr "Descargando" - -#~ msgid "Invalid PIN code" -#~ msgstr "Código PIN erróneo" - -#~ msgid "Parental Control disabled" -#~ msgstr "Control Parental desactivado" - -#~ msgid "The wad file was installed. But It could not be deleted from the SD card." -#~ msgstr "El archivo WAD se ha instalado. Pero no puede ser borrado de la tarjeta SD." - -#~ msgid "The wad installation failed with error %ld" -#~ msgstr "La instalación del WAD falló con el error %ld" - -#~ msgid "Unable to open the wad that was just downloaded (%s)." -#~ msgstr "No se puede abrir el WAD que acabas de descargar (%s)." - -#~ msgid "Unlock Parental Control" -#~ msgstr "Desbloquear Control Parental" - -#~ msgid "Update to" -#~ msgstr "Descargando la" - -#~ msgid "Updating" -#~ msgstr "Actualizando" - -#~ msgid "Updating Language Files..." -#~ msgstr "Actualizando archivos de Idiomas..." - -#~ msgid "Updating WiiTDB.zip" -#~ msgstr "Actualizando WiiTDB.zip" - -#~ msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." -#~ msgstr "No tienes el Control Parental activado. Si quieres usar el Control Parental, actívalo en la Configuración de la Wii." - -#~ msgid "%s : %s May not boot correctly if your System Menu is not up to date." -#~ msgstr "%s : %s No puede arrancar correctamente si el Menú de Sistema no está actualizado." - -#~ msgid "BCA Codes Path changed" -#~ msgstr "Ruta de Códigos BCA cambiada" - -#~ msgid "Back to Wii Menu" -#~ msgstr "Volver a Menú Wii" - -#~ msgid "Channels" -#~ msgstr "Canales" - -#~ msgid "Checking existing artwork" -#~ msgstr "Comprobando los archivos existentes" - -#~ msgid "Confirm" -#~ msgstr "Confirmar" - -#~ msgid "Could not find a WBFS partition." -#~ msgstr "¡No se encontró la partición WBFS!" - -#~ msgid "Could not open WBFS partition" -#~ msgstr "¡No se pudo abrir la partición WBFS!" - -#~ msgid "Could not read the disc." -#~ msgstr "¡No se pudo leer el Disco!" - -#~ msgid "Could not set USB." -#~ msgstr "¡No se pudo configurar el USB!" - -#~ msgid "Cover Path Changed" -#~ msgstr "Ruta de Carátulas cambiada" - -#~ msgid "DOL path changed" -#~ msgstr "Ruta del DOL cambiada" - -#~ msgid "Disc Path Changed" -#~ msgstr "Ruta Imagen Discos cambiada" - -#~ msgid "Display favorites" -#~ msgstr "Mostrar favoritos" - -#~ msgid "Do you want to retry for 30 secs?" -#~ msgstr "¿Quieres reintentar por 30 segs.?" - -#~ msgid "Enable Parental Control" -#~ msgstr "Activar Control Parental" - -#~ msgid "Force" -#~ msgstr "Forzar" - -#~ msgid "GCT Cheatcodes Path changed" -#~ msgstr "Ruta de Trucos GCT cambiada" - -#~ msgid "Hermes CIOS" -#~ msgstr "cIOS Hermes" - -#~ msgid "Homebrew Appspath changed" -#~ msgstr "Ruta de Apps Homebrew cambiada" - -#~ msgid "Insert an SD-Card to download images." -#~ msgstr "Insertar SD para bajar imágenes." - -#~ msgid "Install not possible" -#~ msgstr "Imposible instalar" - -#~ msgid "Most likely it has dimensions that are not evenly divisible by 4." -#~ msgstr "Probablemente, las dimensiones no sean múltiplo de 4." - -#~ msgid "Network init error" -#~ msgstr "Error al iniciar la Red" - -#~ msgid "No .dol or .elf files found." -#~ msgstr "No se encontró archivos .dol o .elf." - -#~ msgid "No Favorites" -#~ msgstr "No hay Favoritos" - -#~ msgid "No USB Device" -#~ msgstr "USB no encontrado" - -#~ msgid "No USB Device found." -#~ msgstr "USB no encontrado." - -#~ msgid "No WBFS or FAT/NTFS partition found" -#~ msgstr "Partición WBFS o FAT/NTFS no encontrada" - -#~ msgid "Normal Covers" -#~ msgstr "Normales" - -#~ msgid "Not Found" -#~ msgstr "No encontrado" - -#~ msgid "Not a DOL/ELF file." -#~ msgstr "No es un archivo DOL/ELF." - -#~ msgid "Reset to standard BGM?" -#~ msgstr "¿Poner la Música por defecto?" - -#~ msgid "Save Failed" -#~ msgstr "Error al guardar" - -#~ msgid "Selected DOL" -#~ msgstr "DOL Seleccionado" - -#~ msgid "Standard" -#~ msgstr "Estándar" - -#~ msgid "TXT Cheatcodes Path changed" -#~ msgstr "Ruta del archivo de Trucos cambiada" - -#~ msgid "Theme Download Path changed" -#~ msgstr "Ruta de Descarga del Tema cambiada" - -#~ msgid "Theme Path Changed" -#~ msgstr "Ruta de Tema cambiada" - -#~ msgid "USB Loader GX will only run with Hermes CIOS rev 4! Please make sure you have revision 4 installed!" -#~ msgstr "¡USB Loader GX sólo funciona con cIOS Hermes rev 4!. ¡Por favor, asegúrate de que tienes instalada la versión 4!" - -#~ msgid "Update Path changed." -#~ msgstr "Ruta Actualización cambiada." - -#~ msgid "WIP Patches Path changed" -#~ msgstr "Ruta Parches WIP cambiada" - -#~ msgid "WiiTDB Path changed." -#~ msgstr "Ruta WiiTDB cambiada." - -#~ msgid "You are about to delete " -#~ msgstr "Estás a punto de borrar " - -#~ msgid "You are choosing to display favorites and you do not have any selected." -#~ msgstr "Has seleccionado la vista de 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 "Estás utilizando un sistema de archivos NTFS. Debido a posibles errores de escritura en la partición NTFS, la instalación del juego es imposible." - -#~ msgid "You have attempted to load a bad image" -#~ msgstr "Has intentado cargar una imagen corrupta" - -#~ msgid "does not exist! You Messed something up, Idiot." -#~ msgstr "no existe. Cometiste algún error al poner el DOL." - -#~ msgid "file left" -#~ msgstr "archivo pendiente" diff --git a/Languages/swedish.lang b/Languages/swedish.lang deleted file mode 100644 index 698ddf03..00000000 --- a/Languages/swedish.lang +++ /dev/null @@ -1,1818 +0,0 @@ -# USB Loader GX language source file. -# swedish.lang - r898 -# don't delete/change this line (é). -msgid "" -msgstr "" -"Project-Id-Version: USB Loader GX\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-06 19:36+0100\n" -"PO-Revision-Date: 2010-01-19 17:39+0200\n" -"Last-Translator: Katsurou\n" -"Language-Team: Katsurou, pirateX\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -msgid " Wad Saved as:" -msgstr "Wad sparad som:" - -msgid " could not be downloaded." -msgstr "Kunde inte laddas ner." - -msgid " has been Saved. The text has not been verified. Some of the code may not work right with each other. If you experience trouble, open the text in a real text editor for more information." -msgstr "har sparats. Texten har inte blivit varifierad. Några av koderna kanske inte fungerar riktigt med varandra. Om du upplever problem, öppna texten i en textredigerare för mer information." - -msgid " is not on the server." -msgstr "finns inte på servern." - -#, c-format -msgid "%i files not found on the server!" -msgstr "" - -#, c-format -msgid "%i missing files" -msgstr "" - -msgid "0 (Everyone)" -msgstr "0 (Alla)" - -msgid "1 (Child 7+)" -msgstr "1 (Barn 7+)" - -msgid "1 hour" -msgstr "1 timme" - -msgid "10 min" -msgstr "" - -msgid "2 (Teen 12+)" -msgstr "2 (Tonåringar 12+)" - -msgid "20 min" -msgstr "" - -msgid "2D Cover Path" -msgstr "2D Omslagsmapp" - -msgid "3 (Mature 16+)" -msgstr "3 (Ungdomar 16+)" - -msgid "3 min" -msgstr "" - -msgid "30 min" -msgstr "" - -msgid "3D Cover Path" -msgstr "3D Omslagsmapp" - -msgid "3D Covers" -msgstr "3D-Omslag" - -msgid "4 (Adults Only 18+)" -msgstr "4 (Endast Vuxna 18+)" - -msgid "5 min" -msgstr "" - -msgid ">> Deleting tickets..." -msgstr ">> Raderar biljetter..." - -msgid ">> Deleting tickets...ERROR! " -msgstr ">> Raderar biljetter...FEL! " - -msgid ">> Deleting tickets...Ok! " -msgstr ">> Raderar biljetter...Ok! " - -msgid ">> Deleting title ...ERROR! " -msgstr ">> Raderar titel ...FEL! " - -msgid ">> Deleting title ...Ok!" -msgstr ">> Raderar titel ...Ok!" - -msgid ">> Deleting title contents..." -msgstr ">> Raderar titel innehåll..." - -msgid ">> Deleting title contents...ERROR! " -msgstr ">> Raderar titel innehåll...FEL! " - -msgid ">> Deleting title contents...Ok!" -msgstr ">> Raderar titel innehåll...Ok!" - -msgid ">> Deleting title..." -msgstr ">> Raderar titel..." - -msgid ">> Finishing installation..." -msgstr ">> Gör klart installation..." - -msgid ">> Installing content #" -msgstr ">> Installerar innehåll #" - -msgid ">> Installing ticket..." -msgstr ">> Installerar biljett..." - -msgid ">> Installing title..." -msgstr ">> Installerar titel..." - -msgid ">> Reading WAD data..." -msgstr ">> Läser WAD data..." - -msgid ">> Reading WAD data...ERROR! " -msgstr ">> Läser WAD data...FEL! " - -msgid ">> Reading WAD data...Ok!" -msgstr ">> Läser WAD data...Ok!" - -msgid "AUTO" -msgstr "" - -msgid "All Partitions" -msgstr "" - -msgid "All images downloaded successfully." -msgstr "" - -msgid "All the features of USB Loader GX are unlocked." -msgstr "Alla funktioner i USB Loader GX är upplåsta." - -msgid "Alternate DOL" -msgstr "Alternativ DOL" - -msgid "Anti" -msgstr "" - -msgid "App Language" -msgstr "Programspråk" - -msgid "Apply" -msgstr "" - -msgid "Apr" -msgstr "Apr" - -msgid "Are you sure you want to lock USB Loader GX?" -msgstr "" - -msgid "Are you sure you want to reset?" -msgstr "" - -msgid "Are you sure?" -msgstr "Är du säker?" - -msgid "Aug" -msgstr "" - -msgid "Author(s):" -msgstr "" - -msgid "AutoInit Network" -msgstr "Autoinitiera Nätverk" - -msgid "Automatic port switching is done on the fly. You need to change all custom paths to SD-Card first for this option or else it could damage a filesystem." -msgstr "" - -msgid "BCA Codes Path" -msgstr "BCA kodssökväg" - -msgid "Back" -msgstr "Tillbaka" - -msgid "Back to HBC or Wii Menu" -msgstr "Tillbaka till HBC eller Wii-Menyn" - -msgid "Backgroundmusic" -msgstr "Bakgrundsmusik" - -msgid "Big thanks to:" -msgstr "Stort tack till:" - -msgid "Block Cover Downloads" -msgstr "" - -msgid "Block Custom Paths" -msgstr "" - -msgid "Block Game Install" -msgstr "" - -msgid "Block Game Settings" -msgstr "" - -msgid "Block GameID Change" -msgstr "" - -msgid "Block Global Settings" -msgstr "" - -msgid "Block Gui Settings" -msgstr "" - -msgid "Block HBC Menu" -msgstr "" - -msgid "Block IOS Reload" -msgstr "Blockera IOS omladdning" - -msgid "Block Loader Settings" -msgstr "" - -msgid "Block Parental Settings" -msgstr "" - -msgid "Block Reset Settings" -msgstr "" - -msgid "Block Sound Settings" -msgstr "" - -msgid "Block Theme Downloader" -msgstr "" - -msgid "Block Theme Menu" -msgstr "" - -msgid "Block Title Launcher" -msgstr "" - -msgid "Block Updates" -msgstr "" - -msgid "Boot/Standard" -msgstr "Boot/Standard" - -msgid "Boot?" -msgstr "Starta?" - -msgid "Both" -msgstr "Båda" - -msgid "Both Ports" -msgstr "" - -msgid "Can't be formatted" -msgstr "Kan inte formateras" - -msgid "Can't create directory" -msgstr "Kan inte skapa mapp" - -#, c-format -msgid "Can't create path: %s" -msgstr "" - -msgid "Can't delete:" -msgstr "Kunde inte radera:" - -msgid "Cancel" -msgstr "Avbryt" - -msgid "Cannot write to destination." -msgstr "" - -msgid "Change Play Path" -msgstr "Ändra spel sökväg" - -msgid "Cheatfile is blank" -msgstr "Fuskfilen är blank" - -msgid "Clear" -msgstr "" - -msgid "Click to Download Covers" -msgstr "Klicka för att ladda ner omslag" - -msgid "Click to change game ID" -msgstr "Klicka för att byta spel ID" - -msgid "Clock" -msgstr "Klocka" - -msgid "Close" -msgstr "Stäng" - -msgid "Code Download" -msgstr "Fusknedladdning" - -#, c-format -msgid "Coded by: %s" -msgstr "Kodad av: %s" - -msgid "Coding:" -msgstr "Kodning:" - -msgid "Connection to server timed out." -msgstr "" - -msgid "Console" -msgstr "Konsol" - -msgid "Console Default" -msgstr "Konsolestandard" - -msgid "Console Locked" -msgstr "Konsol låst" - -msgid "Console must be unlocked for this option." -msgstr "" - -msgid "Console should be unlocked to modify it." -msgstr "Konsolen måste vara upplåst för att kunna ändra det." - -msgid "Continue to install game?" -msgstr "Fortsätt installera spel?" - -msgid "Controllevel" -msgstr "Kontrollnivå" - -msgid "Correct Password" -msgstr "Rätt lösenord" - -msgid "Could not connect to the server." -msgstr "" - -msgid "Could not create GCT file" -msgstr "Kunde inte skapa GCT fil" - -#, c-format -msgid "Could not create path: %s" -msgstr "" - -msgid "Could not find info for this game in the wiitdb.xml." -msgstr "" - -msgid "Could not initialize DIP module!" -msgstr "Kunde inte starta DIP-modul!" - -msgid "Could not initialize network!" -msgstr "Kunde inte starta nätverket!" - -msgid "Could not open Disc" -msgstr "Kunde inte öppna skivan" - -msgid "Could not open wiitdb.xml." -msgstr "" - -msgid "Could not save." -msgstr "Kunde inte spara." - -msgid "Cover Download" -msgstr "Omslagsnedladdning" - -msgid "Create" -msgstr "Skapa" - -msgid "Credits" -msgstr "Medverkande" - -msgid "Custom Discarts" -msgstr "" - -msgid "Custom Paths" -msgstr "Anpassade sökvägar" - -msgid "Customs/Original" -msgstr "Anpassade/Original" - -msgid "DOL Path" -msgstr "DOL-sökväg" - -msgid "Dec" -msgstr "" - -msgid "Default" -msgstr "Standard" - -msgid "Default Gamesettings" -msgstr "Ställ till spelstandard" - -msgid "Default Settings" -msgstr "Standardinställningar" - -msgid "Delete" -msgstr "Radera" - -msgid "Delete ?" -msgstr "Radera?" - -msgid "Delete Cheat GCT" -msgstr "Radera fusk GCT" - -msgid "Delete Cheat TXT" -msgstr "Radera fusk TXT" - -msgid "Delete Cover Artwork" -msgstr "Radera omslag" - -msgid "Delete Disc Artwork" -msgstr "Radera skivbilder" - -msgid "Design:" -msgstr "" - -msgid "Developed by" -msgstr "Utvecklat av" - -msgid "Directory does not exist!" -msgstr "Katalog existerar inte!" - -msgid "Disc Artwork Download" -msgstr "Skivbildsnedladdning" - -msgid "Disc Artwork Path" -msgstr "Skivbildsmapp" - -msgid "Disc Default" -msgstr "Skivans standard" - -msgid "DiskFlip" -msgstr "Vänd Skiva" - -msgid "Display" -msgstr "Visning" - -msgid "Display as a carousel" -msgstr "Visa som en karusell" - -msgid "Display as a grid" -msgstr "Visa som ett rutnät" - -msgid "Display as a list" -msgstr "Visa som en lista" - -msgid "Display favorites only" -msgstr "" - -msgid "Do you want to apply it now?" -msgstr "Vill du tillämpa det nu?" - -msgid "Do you want to apply this theme?" -msgstr "" - -msgid "Do you want to change language?" -msgstr "Vill du byta språk?" - -msgid "Do you want to download this theme?" -msgstr "Vill du ladda ner detta tema?" - -msgid "Do you want to format:" -msgstr "Vill du formatera:" - -msgid "Do you want to load the default theme?" -msgstr "" - -msgid "Do you want to sync free space info sector on all FAT32 partitions?" -msgstr "" - -msgid "Do you wish to update/download all language files?" -msgstr "Vill du uppdatera/ladda ner alla språkfiler?" - -msgid "Done!" -msgstr "Klar!" - -msgid "Download" -msgstr "Ladda ner" - -msgid "Download Now" -msgstr "Ladda ner nu" - -msgid "Download finished" -msgstr "Nedladdning klar" - -msgid "Downloading 3D Covers" -msgstr "" - -msgid "Downloading Flat Covers" -msgstr "" - -msgid "Downloading Full HQ Covers" -msgstr "" - -msgid "Downloading Full LQ Covers" -msgstr "" - -msgid "Downloading custom Discarts" -msgstr "" - -msgid "Downloading file..." -msgstr "" - -msgid "Downloading image:" -msgstr "Laddar ner bild:" - -msgid "Downloading original Discarts" -msgstr "" - -msgid "Downloading pagelist:" -msgstr "" - -msgid "Dutch" -msgstr "Nederländska" - -msgid "ERROR" -msgstr "FEL" - -msgid "ERROR:" -msgstr "FEL:" - -msgid "ERROR: Can't set up theme." -msgstr "FEL: Kan inte ställa in tema" - -msgid "English" -msgstr "Engelska" - -msgid "Error" -msgstr "Fel" - -msgid "Error !" -msgstr "Fel!" - -msgid "Error 002 fix" -msgstr "002 fel fix" - -#, c-format -msgid "Error creating path: %s" -msgstr "" - -msgid "Error opening downloaded file" -msgstr "" - -msgid "Error reading Disc" -msgstr "Fel vid läsning av skiva" - -#, c-format -msgid "Error when downloading file: %i" -msgstr "" - -msgid "Error while downloding file" -msgstr "" - -msgid "Error while opening the zip." -msgstr "" - -msgid "Error while transfering data." -msgstr "Fel vid överförning av data." - -msgid "Error while updating USB Loader GX." -msgstr "" - -msgid "Error writing the data." -msgstr "" - -msgid "Error..." -msgstr "Fel..." - -msgid "Error:" -msgstr "Fel:" - -msgid "Exit" -msgstr "" - -msgid "Exit to where?" -msgstr "" - -msgid "Extracting files..." -msgstr "Packar upp filer..." - -msgid "Failed formating" -msgstr "Formatering misslyckad" - -msgid "Failed to extract." -msgstr "Uppackning misslyckades." - -msgid "Failed to open partition" -msgstr "Misslyckades att öppna partition" - -msgid "Failed updating" -msgstr "" - -msgid "Feb" -msgstr "" - -msgid "File not found." -msgstr "Kunde inte hitta fil" - -#, c-format -msgid "Filesize is %i Byte." -msgstr "" - -msgid "Filesize is 0 Byte." -msgstr "" - -msgid "Finishing installation... Ok!" -msgstr "Gör klart installation... Ok!" - -msgid "Flat Covers" -msgstr "" - -msgid "Flip-X" -msgstr "Vänd-X" - -msgid "Force NTSC" -msgstr "" - -msgid "Force PAL50" -msgstr "" - -msgid "Force PAL60" -msgstr "" - -msgid "Format" -msgstr "Formatera" - -msgid "Formatting, please wait..." -msgstr "Formaterar, Vänta..." - -msgid "Found missing images." -msgstr "" - -msgid "Free Space" -msgstr "Ledigt utrymme" - -msgid "French" -msgstr "Franska" - -msgid "Full Cover Path" -msgstr "" - -msgid "Full HQ Covers" -msgstr "" - -msgid "Full LQ Covers" -msgstr "" - -msgid "Full Menu" -msgstr "" - -msgid "Full shutdown" -msgstr "" - -msgid "GAMEID_Gamename" -msgstr "" - -msgid "GCT Cheatcodes Path" -msgstr "Fusksökväg" - -msgid "GCT File created" -msgstr "GCT fil skapad" - -msgid "GUI Settings" -msgstr "GUI inställningar" - -msgid "Game ID" -msgstr "Spel-ID" - -msgid "Game IOS" -msgstr "" - -msgid "Game Language" -msgstr "Språk" - -msgid "Game Load" -msgstr "Spelinställningar" - -msgid "Game Lock" -msgstr "" - -msgid "Game Only" -msgstr "" - -msgid "Game Region" -msgstr "Spelregion" - -msgid "Game Size" -msgstr "Spelstorlek" - -msgid "Game Sound Mode" -msgstr "Spel ljuds läge" - -msgid "Game Sound Volume" -msgstr "Spel ljuds volym" - -msgid "Game Split Size" -msgstr "" - -msgid "Game is already installed:" -msgstr "Spelet är redan installerat:" - -msgid "Game/Install Partition" -msgstr "" - -msgid "Gamename [GAMEID]" -msgstr "" - -msgid "Games" -msgstr "Spel" - -msgid "Genre:" -msgstr "" - -msgid "German" -msgstr "Tyska" - -msgid "Global Settings" -msgstr "" - -msgid "HOME Menu" -msgstr "Hemmeny" - -msgid "Homebrew Apps Path" -msgstr "Homebrew Apps" - -msgid "Homebrew Channel" -msgstr "" - -msgid "Homebrew Launcher" -msgstr "Homebrew Startare" - -msgid "Hour" -msgstr "Timmars" - -msgid "How do you want to update?" -msgstr "Hur vill du uppdatera?" - -msgid "How to Shutdown?" -msgstr "Hur vill du stänga av?" - -#, c-format -msgid "Incoming file %0.2fKB" -msgstr "Inkommande fil %0.2fKB" - -#, c-format -msgid "Incoming file %0.2fMB" -msgstr "Inkommande fil %0.2fMB" - -msgid "Initializing Network" -msgstr "Startar nätverk" - -msgid "Insert Disk" -msgstr "Sätt i en skiva" - -msgid "Insert a Wii Disc!" -msgstr "Sätt i en Wii-skiva!" - -msgid "Install" -msgstr "Installera" - -msgid "Install Error!" -msgstr "Fel vid installering!" - -msgid "Install a game" -msgstr "Installera ett spel" - -msgid "Install directories" -msgstr "" - -msgid "Install partitions" -msgstr "Installera partitioner" - -msgid "Installing content... Ok!" -msgstr "Installerar innehåll... Ok!" - -msgid "Installing game:" -msgstr "Installerar spel:" - -msgid "Installing ticket... Ok!" -msgstr "Installerar biljett... Ok!" - -msgid "Installing title... Ok!" -msgstr "Installerar titel... Ok!" - -msgid "Installing wad" -msgstr "Installerar wad" - -msgid "Issue manager /" -msgstr "" - -msgid "It seems that you have some information that will be helpful to us. Please pass this information along to the DEV team." -msgstr "Det verkar som om du har information som kan vara till nytta för oss. Vänligen skicka informationen vidare till DEV team." - -msgid "Italian" -msgstr "Italienska" - -msgid "Jan" -msgstr "" - -msgid "Japanese" -msgstr "Japanska" - -msgid "July" -msgstr "Juli" - -msgid "June" -msgstr "Juni" - -msgid "Keep" -msgstr "Behåll" - -msgid "Keyboard" -msgstr "Tangentbord" - -msgid "Korean" -msgstr "Koreanska" - -msgid "Language File" -msgstr "Språk fil" - -msgid "Language change:" -msgstr "Språkbyte:" - -msgid "Languagefiles Path" -msgstr "" - -msgid "Languagepath changed." -msgstr "Sökväg till språk ändrad" - -msgid "Left" -msgstr "Vänster" - -msgid "Like SysMenu" -msgstr "Som System-menyn" - -msgid "List on Gamelaunch" -msgstr "" - -msgid "Load" -msgstr "Ladda" - -msgid "Load From SD/USB" -msgstr "Ladda från SD/USB" - -#, c-format -msgid "Load file from: %s ?" -msgstr "Ladda fil från: %s?" - -msgid "Load this DOL as alternate DOL?" -msgstr "Ladda denna DOL som alternativ DOL?" - -msgid "Loader Settings" -msgstr "" - -msgid "Loading standard language." -msgstr "Laddar standard språk." - -msgid "Loading standard music." -msgstr "Laddar standard musik." - -msgid "Lock Console" -msgstr "Lås konsol" - -msgid "Lock USB Loader GX" -msgstr "" - -msgid "Locked" -msgstr "Låst" - -msgid "Loop Directory" -msgstr "" - -msgid "Loop Music" -msgstr "" - -msgid "Loop Sound" -msgstr "Loopa ljudet" - -msgid "Main tester:" -msgstr "" - -msgid "Mar" -msgstr "" - -msgid "Mark new games" -msgstr "Markera nya spel" - -msgid "May" -msgstr "Maj" - -msgid "Messageboard Update" -msgstr "" - -msgid "Motion+ Video" -msgstr "" - -msgid "Mount DVD drive" -msgstr "Montera DVD läsare" - -msgid "Multiple Partitions" -msgstr "" - -msgid "Music Loop Mode" -msgstr "Musik Återuppspelningsläge" - -msgid "Music Volume" -msgstr "Volym" - -msgid "Neither" -msgstr "Inget" - -msgid "Network is not initiated." -msgstr "" - -msgid "New Disc Detected" -msgstr "Ny skiva upptäckt" - -msgid "Next" -msgstr "Nästa" - -msgid "No" -msgstr "Nej" - -msgid "No Cheatfile found" -msgstr "Ingen fuskfil hittades" - -msgid "No DOL file found on disc." -msgstr "Ingen DOL-fil hittades på skivan." - -msgid "No Splitting" -msgstr "" - -msgid "No URL or Path specified." -msgstr "" - -msgid "No WBFS or FAT/NTFS/EXT partition found" -msgstr "" - -msgid "No cheats were selected" -msgstr "Inga fusk har valda" - -msgid "No data could be read." -msgstr "Ingen data kunde läsas." - -msgid "No favorites selected." -msgstr "" - -msgid "No file missing!" -msgstr "Inga filer saknas!" - -msgid "No new updates." -msgstr "Inga nya uppdateringar" - -msgid "No themes found on the site." -msgstr "Inga teman hittades på sidan." - -msgid "No themes found." -msgstr "" - -msgid "None" -msgstr "" - -msgid "Normal" -msgstr "Vanlig" - -msgid "Not a WAD file." -msgstr "" - -msgid "Not a Wii Disc" -msgstr "Inte en Wii-skiva" - -msgid "Not a valid URL" -msgstr "" - -msgid "Not a valid URL path" -msgstr "" - -msgid "Not a valid domain" -msgstr "" - -msgid "Not enough free memory." -msgstr "Inte tillräckligt med ledigt minne." - -msgid "Not enough free space!" -msgstr "Inte tillräckligt med ledigt utrymme!" - -msgid "Not enough memory." -msgstr "" - -msgid "Not required" -msgstr "" - -msgid "Not supported format!" -msgstr "Formatet stöds inte!" - -msgid "Nov" -msgstr "" - -msgid "OFF" -msgstr "AV" - -msgid "OK" -msgstr "" - -msgid "ON" -msgstr "PÅ" - -msgid "Ocarina" -msgstr "" - -msgid "Oct" -msgstr "Okt" - -msgid "Official Site:" -msgstr "Officiell sida:" - -msgid "Offset" -msgstr "" - -msgid "Only Game Partition" -msgstr "" - -msgid "Only for Install" -msgstr "Endast för installering" - -msgid "Original Discarts" -msgstr "" - -msgid "Original/Customs" -msgstr "Original/Anpassade" - -msgid "Parental Control" -msgstr "Föräldrakontroll" - -msgid "Partition" -msgstr "" - -msgid "Password" -msgstr "Lösenord" - -msgid "Password Changed" -msgstr "Lösenordet ändrat" - -msgid "Password has been changed" -msgstr "Lösenordet har ändrats" - -msgid "Patch Country Strings" -msgstr "Ställ in landssträngar" - -msgid "Path Changed" -msgstr "" - -msgid "Permission denied." -msgstr "" - -msgid "Pick from a list" -msgstr "Välj från en lista" - -msgid "Play Count" -msgstr "Spelat" - -msgid "Play Next" -msgstr "Spela nästa" - -msgid "Play Once" -msgstr "" - -msgid "Play Previous" -msgstr "Spela förgående" - -msgid "Playing Music:" -msgstr "Spela musik:" - -msgid "Please wait..." -msgstr "Vänligen vänta..." - -msgid "Power off the Wii" -msgstr "Stäng av Wii" - -msgid "Prev" -msgstr "Förra" - -msgid "Prompts Buttons" -msgstr "Dialogknappar" - -msgid "Published by" -msgstr "Publicerat av" - -msgid "Quick Boot" -msgstr "Snabbstart" - -msgid "Random Directory Music" -msgstr "" - -msgid "Reading WAD data... Ok!" -msgstr "Läser WAD data... Ok!" - -msgid "Receiving file from:" -msgstr "Tar emot filer från:" - -msgid "Region Patch" -msgstr "" - -msgid "Released" -msgstr "Släppt" - -msgid "Reload SD" -msgstr "Ladda om SD" - -msgid "Remove update" -msgstr "" - -msgid "Rename Game on WBFS" -msgstr "Döp om spel på WBFS" - -msgid "Reset" -msgstr "" - -msgid "Reset BG Music" -msgstr "återställ BG musik" - -msgid "Reset Playcounter" -msgstr "Återställ spelat-räknaren" - -msgid "Reset to default BGM?" -msgstr "" - -msgid "Restarting..." -msgstr "Startar om..." - -msgid "Return" -msgstr "Återvänd" - -msgid "Return To" -msgstr "" - -msgid "Return to Wii Menu" -msgstr "Återvänd till Wii-menyn" - -msgid "Right" -msgstr "Höger" - -msgid "Rumble" -msgstr "Vibration" - -msgid "SChinese" -msgstr "SKinesiska" - -msgid "SFX Volume" -msgstr "SFX Volym" - -msgid "Save" -msgstr "Spara" - -msgid "Save Failed. No device inserted?" -msgstr "" - -msgid "Save Game List to" -msgstr "Spara spel lista till" - -msgid "Save List" -msgstr "" - -msgid "Saved" -msgstr "Sparat" - -msgid "Screensaver" -msgstr "Skärmsläckare" - -msgid "Select" -msgstr "Välj" - -msgid "Select DOL Offset" -msgstr "" - -msgid "Select a DOL" -msgstr "Välj en DOL" - -msgid "Select a DOL from Game" -msgstr "" - -msgid "Sept" -msgstr "" - -msgid "Set Search-Filter" -msgstr "Ställ in sök-filter" - -msgid "Settings" -msgstr "Inställningar" - -msgid "Show Free Space" -msgstr "" - -msgid "Shutdown System" -msgstr "Stäng av helt" - -msgid "Shutdown Wii" -msgstr "" - -msgid "Sort alphabetically" -msgstr "Sortera alfabetiskt" - -msgid "Sort by number of players" -msgstr "" - -msgid "Sort by rank" -msgstr "Sortera efter rank" - -msgid "Sort order by most played" -msgstr "Sortera efter mest spelade" - -msgid "Sound" -msgstr "Ljud" - -msgid "Sound Settings" -msgstr "" - -msgid "Sound+BGM" -msgstr "Ljud+BGM" - -msgid "Sound+Quiet" -msgstr "Ljud+Tyst" - -msgid "Spanish" -msgstr "Spanska" - -msgid "Special thanks to:" -msgstr "Speciellt tack till:" - -msgid "Split each 2GB" -msgstr "" - -msgid "Split each 4GB" -msgstr "" - -msgid "Standby" -msgstr "" - -msgid "Success" -msgstr "Lyckat" - -msgid "Success:" -msgstr "Lyckat:" - -msgid "Successfully Saved" -msgstr "Lyckad sparning" - -msgid "Successfully Updated" -msgstr "Uppdateringen lyckades" - -msgid "Successfully Updated thanks to www.techjawa.com" -msgstr "" - -msgid "Successfully deleted:" -msgstr "Lyckad radering av:" - -msgid "Successfully extracted theme." -msgstr "Extrahering av tema lyckades." - -msgid "Successfully installed:" -msgstr "Lyckad installation av:" - -msgid "Sync FAT32 FS Info" -msgstr "" - -msgid "Synchronizing..." -msgstr "" - -msgid "System Default" -msgstr "Systemets standard" - -msgid "TChinese" -msgstr "TKinesiska" - -msgid "TXT Cheatcodes Path" -msgstr "Sökväg till txt koder" - -msgid "The .them file was not found in the zip." -msgstr "" - -msgid "The entered directory does not exist. Would you like to create it?" -msgstr "Den angivna katalogen existerar inte. Vill du skapa den?" - -msgid "The game installation is disabled under this IOS because of instability in usb write." -msgstr "" - -msgid "The wad file was installed" -msgstr "" - -#, c-format -msgid "The wad installation failed with error %i" -msgstr "" - -msgid "Theme Downloader" -msgstr "Tema Nedladdare" - -msgid "Theme Menu" -msgstr "" - -msgid "Theme Path" -msgstr "Tema-mapp" - -msgid "Theme Title:" -msgstr "Tema titel:" - -msgid "Themes by www.spiffy360.com" -msgstr "" - -msgid "This IOS is the BootMii ios. If you are sure it is not BootMii and you have something else installed there than ignore this warning." -msgstr "" - -msgid "This IOS was not found on the titles list. If you are sure you have it installed than ignore this warning." -msgstr "" - -msgid "Time left:" -msgstr "Tid kvar:" - -msgid "Title Launcher" -msgstr "Titel startare" - -msgid "Titles from WiiTDB" -msgstr "Titlar från WiiTDB" - -msgid "Tooltips" -msgstr "Verktygstips" - -msgid "Transfer failed" -msgstr "" - -msgid "USB Device not found" -msgstr "USB-enhet ej hittad" - -msgid "USB Loader GX is protected" -msgstr "USB Loader GX är skyddad" - -msgid "USB Port" -msgstr "" - -msgid "USB Port changing is only supported on Hermes cIOS." -msgstr "" - -msgid "Uninstall" -msgstr "Avinstallera" - -msgid "Uninstall Game" -msgstr "Avinstallera spel" - -msgid "Uninstall Menu" -msgstr "Avinstallerings meny" - -msgid "Uninstall all" -msgstr "" - -msgid "Uninstalling wad" -msgstr "Avinstallerar wad" - -msgid "Unknown" -msgstr "" - -msgid "Unlock USB Loader GX" -msgstr "" - -msgid "Unlocked" -msgstr "Upplåst" - -msgid "Unsupported format, try to extract manually TempTheme.zip." -msgstr "" - -msgid "Update" -msgstr "Uppdatera" - -msgid "Update All" -msgstr "Uppdatera alla" - -msgid "Update DOL" -msgstr "Updatera DOL" - -msgid "Update Files" -msgstr "Uppdatera Filer" - -msgid "Update Path" -msgstr "Sökväg till uppdatering" - -msgid "Update all Language Files" -msgstr "Uppdatera alla språk-filer" - -msgid "Update failed" -msgstr "Uppdatering misslyckades" - -msgid "Update successfull" -msgstr "" - -msgid "Updating Language Files:" -msgstr "Uppdatera språk-filer:" - -msgid "Uploaded ZIP file installed to homebrew directory." -msgstr "Uppladdad ZIP fil installerad till homebrew-mappen" - -msgid "VIDTV Patch" -msgstr "VIDTV-Patch" - -msgid "Version:" -msgstr "" - -#, c-format -msgid "Version: %s" -msgstr "" - -msgid "Video Mode" -msgstr "Video-läge" - -msgid "WDM Files Path" -msgstr "" - -msgid "WIP Patches Path" -msgstr "WIP patchssökväg" - -msgid "Waiting..." -msgstr "Väntar..." - -msgid "Warning:" -msgstr "" - -msgid "What do you want to update?" -msgstr "Vad vill du uppdatera?" - -msgid "What should be deleted for this game title:" -msgstr "" - -msgid "WiFi Features" -msgstr "WiFi funktioner" - -msgid "Widescreen Fix" -msgstr "Bredbild 16/9 Fix" - -msgid "Wii Menu" -msgstr "Wii-meny" - -msgid "Wii Settings" -msgstr "Wii inställningar" - -msgid "WiiTDB Files" -msgstr "WiiTDB" - -msgid "WiiTDB Path" -msgstr "WiiTDB-sökväg" - -msgid "WiiTDB is up to date." -msgstr "" - -msgid "Wiilight" -msgstr "Wii-ljus" - -msgid "Wrong Password" -msgstr "Fel Lösenord" - -msgid "Yes" -msgstr "Ja" - -msgid "You are currently using IOS" -msgstr "" - -msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." -msgstr "" - -msgid "You need to select or format a partition" -msgstr "Du måste välja eller formatera en partition" - -msgid "and translators for language files updates" -msgstr "" - -msgid "available" -msgstr "tillgänglig" - -msgid "does not exist!" -msgstr "existerar inte!" - -msgid "does not exist! Loading game without cheats." -msgstr "existerar inte! Laddar spel utan fusk." - -msgid "files left" -msgstr "filer kvar" - -msgid "for FAT/NTFS support" -msgstr "för FAT/NTFS stöd" - -msgid "for Ocarina" -msgstr "för Ocarina" - -msgid "for WiiTDB and hosting covers / disc images" -msgstr "för WiiTDB och lagring av omslag / skivbilder" - -msgid "for diverse patches" -msgstr "för diverse patcher" - -msgid "for his awesome tool LibWiiGui" -msgstr "för hans underbara verktyg LibWiiGui" - -msgid "for hosting the themes" -msgstr "för hostning av teman" - -msgid "for hosting the update files" -msgstr "för lagring av uppdateringar" - -msgid "for the USB Loader source" -msgstr "och släppet av källkoden" - -msgid "formatted!" -msgstr "formaterad!" - -msgid "free" -msgstr "ledigt" - -msgid "not set" -msgstr "Inget satt" - -msgid "of" -msgstr "av" - -msgid "seconds left" -msgstr "sekunder kvar" - -#~ msgid "Author:" -#~ msgstr "Utgivare:" - -#~ msgid "Download Boxart image?" -#~ msgstr "Ladda ner omslagsbild?" - -#~ msgid "Download Discart image?" -#~ msgstr "Ladda ner skivbild?" - -#~ msgid "Downloading file" -#~ msgstr "Laddar ner fil:" - -#~ msgid "Missing files" -#~ msgstr "Filer som saknas" - -#~ msgid "files not found on the server!" -#~ msgstr "filerna hittades inte på servern!" - -#~ msgid "Disc Images" -#~ msgstr "Skivbilder" - -#~ msgid "Only Customs" -#~ msgstr "Endast anpassade" - -#~ msgid "Only Original" -#~ msgstr "Endast original" - -#~ msgid "Do you really want to delete:" -#~ msgstr "Vill du verkligen radera:" - -#~ msgid "Do you want to use the alternate DOL that is known to be correct?" -#~ msgstr "Vill du använda en alternativ DOL som är känd att fungera?" - -#~ msgid "BETA revisions" -#~ msgstr "BETA version" - -#~ msgid "Unlock console to use this option." -#~ msgstr "Lås upp konsolen för denna inställning." - -#~ msgid "Full Shutdown" -#~ msgstr "Stäng av helt" - -#~ msgid "GXtheme.cfg not found in any subfolder." -#~ msgstr "GXtheme.cfg kunde inte hittas i några undermappar." - -#~ msgid "If you don't have WiFi, press 1 to get an URL to get your WiiTDB.zip" -#~ msgstr "Om du inte har WiFi, tryck 1 för att få en URL till din WiiTDB.zip" - -#~ msgid "Paste it into your browser to get your WiiTDB.zip." -#~ msgstr "Klistra in det i din webbläsare för att hämta din WiiTDB.zip." - -#~ msgid "Shutdown to Idle" -#~ msgstr "Försätt i viloläge" - -#~ msgid "Your URL has been saved in %sWiiTDB_URL.txt." -#~ msgstr "Din URL har sparats som %sWiiTDB_URL.txt." - -#~ msgid "Can't create file" -#~ msgstr "Kunde inte skapa fil" - -#~ msgid "Connection lost..." -#~ msgstr "Uppkoppling förlorad..." - -#~ msgid "Download failed." -#~ msgstr "Nedladdning misslyckades." - -#~ msgid "Download request failed." -#~ msgstr "Nedladdnings begäran misslyckades." - -#~ msgid "Downloading Page List:" -#~ msgstr "Laddar ner lista:" - -#~ msgid "Theme Download Path" -#~ msgstr "Tema-mapp nedladdade" - -#~ msgid "Transfer failed." -#~ msgstr "Flytt misslyckades." - -#~ msgid "Unsupported format, try to extract manually." -#~ msgstr "Format stöds inte, försök extrahera manuelt." - -#~ msgid "and translaters for language files updates" -#~ msgstr "och översättarna." - -#~ msgid "Insert an SD-Card to save." -#~ msgstr "Sätt i ett SD-kort för att spara." - -#~ msgid "Insert an SD-Card to use this option." -#~ msgstr "Sätt i ett SD-kort för att använda denna inställning" - -#~ msgid "No SD-Card inserted!" -#~ msgstr "Inget SD-kort isatt!" - -#~ msgid "Waiting for USB Device" -#~ msgstr "Väntar på USB-enhet" - -#~ msgid "Back to Loader" -#~ msgstr "Tillbaka till loader" - -#~ msgid "FAT: Use directories" -#~ msgstr "FAT: Använd mappar" - -#~ msgid "All partitions" -#~ msgstr "Alla partitioner" - -#~ msgid "Game partition" -#~ msgstr "Spel partition" - -#~ msgid "Install 1:1 Copy" -#~ msgstr "Installera 1:1 Kopia" - -#~ msgid "An Error occured" -#~ msgstr "Ett fel har uppstått" - -#~ msgid "Are you sure you want to enable Parent Control?" -#~ msgstr "Är du säker på att du vill aktivera Föräldrakontroll?" - -#~ msgid "AutoPatch" -#~ msgstr "Autopatch" - -#~ msgid "Checking for Updates" -#~ msgstr "Letar efter uppdateringar" - -#~ msgid "Downloading" -#~ msgstr "Laddar ner" - -#~ msgid "Invalid PIN code" -#~ msgstr "Ogiltig PIN-kod" - -#~ msgid "Parental Control disabled" -#~ msgstr "Föräldrakontroll avaktiverad" - -#~ msgid "The wad file was installed. But It could not be deleted from the SD card." -#~ msgstr "Wad filen har blivit installerad. Men kunde inte raderas från SD-kortet." - -#~ msgid "The wad installation failed with error %ld" -#~ msgstr "Wad installation misslyckades med fel %ld" - -#~ msgid "Unable to open the wad that was just downloaded (%s)." -#~ msgstr "Kunde inte öppna den nedladdade wad filen (%s)." - -#~ msgid "Unlock Parental Control" -#~ msgstr "Lås upp föräldrakontroll" - -#~ msgid "Update to" -#~ msgstr "Uppdatera till" - -#~ msgid "Updating" -#~ msgstr "Uppdaterar" - -#~ msgid "Updating Language Files..." -#~ msgstr "Uppdatera språk-filer..." - -#~ msgid "Updating WiiTDB.zip" -#~ msgstr "Uppdaterar WiiTDB.zip" - -#~ msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." -#~ msgstr "Du har inte föräldrakontroll aktiverad. Om du vill använda föräldrakontroll, aktivera det i Wii inställningar." - -#~ msgid "%s : %s May not boot correctly if your System Menu is not up to date." -#~ msgstr "%s : %s Kanske inte kan starta korrekt om din system meny inte är den nyaste versionen." - -#~ msgid "BCA Codes Path changed" -#~ msgstr "BCA kodssökväg ändrad" - -#~ msgid "Back to Wii Menu" -#~ msgstr "Tillbaka till Wii-menyn" - -#~ msgid "Channels" -#~ msgstr "Kannaler" - -#~ msgid "Checking existing artwork" -#~ msgstr "Kontrollera befintliga konstverk" - -#~ msgid "Confirm" -#~ msgstr "Bekräfta" - -#~ msgid "Could not find a WBFS partition." -#~ msgstr "Kunde inte hitta WBFS partition." - -#~ msgid "Could not open WBFS partition" -#~ msgstr "Kunde inte öppna WBFS partition" - -#~ msgid "Could not read the disc." -#~ msgstr "Kunde inte läsa skiva." - -#~ msgid "Could not set USB." -#~ msgstr "Kunde inte ställa in USB." - -#~ msgid "Cover Path Changed" -#~ msgstr "Omslagsmapp ändrad" - -#~ msgid "DOL path changed" -#~ msgstr "DOL-sökväg ändrad" - -#~ msgid "Disc Path Changed" -#~ msgstr "Skivbildsmapp ändrad" - -#~ msgid "Display favorites" -#~ msgstr "Visa favoriter" - -#~ msgid "Do you want to retry for 30 secs?" -#~ msgstr "Vill du försöka igen i 30 sekunder?" - -#~ msgid "Enable Parental Control" -#~ msgstr "Aktivera Föräldrakontroll" - -#~ msgid "Force" -#~ msgstr "Tvinga" - -#~ msgid "GCT Cheatcodes Path changed" -#~ msgstr "Sökväg till fusk ändrad" - -#~ msgid "Homebrew Appspath changed" -#~ msgstr "Homebrew Apps ändrad" - -#~ msgid "Insert an SD-Card to download images." -#~ msgstr "Sätt i ett SD-kort för att ladda ner bilder." - -#~ msgid "Install not possible" -#~ msgstr "Installation inte möjlig" - -#~ msgid "Most likely it has dimensions that are not evenly divisible by 4." -#~ msgstr "Troligtvis har den mått som inte är jämnt dividerade med 4." - -#~ msgid "Network init error" -#~ msgstr "Fel vid nätverksstart" - -#~ msgid "No .dol or .elf files found." -#~ msgstr "Ingen .dol eller .elf fil hittades." - -#~ msgid "No Favorites" -#~ msgstr "Inga favoriter" - -#~ msgid "No USB Device" -#~ msgstr "Ingen USB-enhet" - -#~ msgid "No USB Device found." -#~ msgstr "Ingen USB-enhet hittad." - -#~ msgid "No WBFS or FAT/NTFS partition found" -#~ msgstr "Ingen WBFS eller FAT/NTFS partition hittad" - -#~ msgid "Normal Covers" -#~ msgstr "Vanliga omslag" - -#~ msgid "Not Found" -#~ msgstr "Hittades inte" - -#~ msgid "Not a DOL/ELF file." -#~ msgstr "Inte en DOL/ELF fil." - -#~ msgid "Reset to standard BGM?" -#~ msgstr "Återställ till standard BGM?" - -#~ msgid "Save Failed" -#~ msgstr "Sparande misslyckat" - -#~ msgid "Selected DOL" -#~ msgstr "Vald DOL" - -#~ msgid "Standard" -#~ msgstr "Standard" - -#~ msgid "TXT Cheatcodes Path changed" -#~ msgstr "TXTCheatcodes sökväg ändrad" - -#~ msgid "Theme Download Path changed" -#~ msgstr "Tema-mapp nedladdade ändrad" - -#~ msgid "Theme Path Changed" -#~ msgstr "Tema-mapp ändrad" - -#~ msgid "USB Loader GX will only run with Hermes CIOS rev 4! Please make sure you have revision 4 installed!" -#~ msgstr "USB Loader GX kommer endast köra med Hermes CIOS ver 4! Vänligen kontrollera att du har ver 4 installerad!" - -#~ msgid "Update Path changed." -#~ msgstr "Sökväg till uppdatering ändrad." - -#~ msgid "WIP Patches Path changed" -#~ msgstr "WIP patchssökväg ändrad" - -#~ msgid "WiiTDB Path changed." -#~ msgstr "WiiTDB-sökväg ändrad." - -#~ msgid "You are about to delete " -#~ msgstr "Då håller på att radera " - -#~ 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." - -#~ msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible." -#~ msgstr "Du använder NTFS filsystem. Pågrund av möjliga skriv fel till en NTFS partition, så är det inte möjligt att installera spel." - -#~ msgid "You have attempted to load a bad image" -#~ msgstr "Du har försökt ladda en dålig bild" - -#~ msgid "does not exist! You Messed something up, Idiot." -#~ msgstr "existerar inte! Du har gjort något fel." - -#~ msgid "file left" -#~ msgstr "fil kvar" diff --git a/Languages/tchinese.lang b/Languages/tchinese.lang deleted file mode 100644 index 738deb3e..00000000 --- a/Languages/tchinese.lang +++ /dev/null @@ -1,1860 +0,0 @@ -# USB Loader GX language source file. -# tchinese.lang - r929 -# don't delete/change this line (é). -msgid "" -msgstr "" -"Project-Id-Version: USB Loader GX\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-06 19:36+0100\n" -"PO-Revision-Date: 2010-02-15 21:00+0800\n" -"Last-Translator: Jane.H\n" -"Language-Team: kyogc, Miller, Mika Li, Jane.H\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -msgid " Wad Saved as:" -msgstr "WAD 儲存為:" - -msgid " could not be downloaded." -msgstr "不能下載。" - -msgid " has been Saved. The text has not been verified. Some of the code may not work right with each other. If you experience trouble, open the text in a real text editor for more information." -msgstr "已經被儲存。內容尚未驗證。部分代碼可能無法作用。如果你遇到問題,請用文字編輯器打開文本文件以獲得更多的信息。" - -msgid " is not on the server." -msgstr "不在伺服器上" - -#, c-format -msgid "%i files not found on the server!" -msgstr "伺服器上找不到%i個檔!" - -#, c-format -msgid "%i missing files" -msgstr "缺少%i個檔案" - -msgid "0 (Everyone)" -msgstr "0 (全年齡)" - -msgid "1 (Child 7+)" -msgstr "1 (7歲以上)" - -msgid "1 hour" -msgstr "1 小時" - -msgid "10 min" -msgstr "10 分鐘" - -msgid "2 (Teen 12+)" -msgstr "2 (12歲以上)" - -msgid "20 min" -msgstr "20 分鐘" - -msgid "2D Cover Path" -msgstr "2D封面路徑" - -msgid "3 (Mature 16+)" -msgstr "3 (16歲以上)" - -msgid "3 min" -msgstr "3 分鐘" - -msgid "30 min" -msgstr "30 分鐘" - -msgid "3D Cover Path" -msgstr "3D封面路徑" - -msgid "3D Covers" -msgstr "3D 封面" - -msgid "4 (Adults Only 18+)" -msgstr "4 (18歲以上成人)" - -msgid "5 min" -msgstr "5 分鐘" - -msgid ">> Deleting tickets..." -msgstr ">> 刪除 tickets..." - -msgid ">> Deleting tickets...ERROR! " -msgstr ">> 刪除 tickets... 錯誤!" - -msgid ">> Deleting tickets...Ok! " -msgstr ">> 刪除 tickets... 成功!" - -msgid ">> Deleting title ...ERROR! " -msgstr ">> 刪除 title... 錯誤!" - -msgid ">> Deleting title ...Ok!" -msgstr ">> 刪除 title... 成功!" - -msgid ">> Deleting title contents..." -msgstr ">> 刪除 title 內容..." - -msgid ">> Deleting title contents...ERROR! " -msgstr ">> 刪除 title 內容... 錯誤!" - -msgid ">> Deleting title contents...Ok!" -msgstr ">> 刪除 title 內容... 成功!" - -msgid ">> Deleting title..." -msgstr ">> 刪除 title..." - -msgid ">> Finishing installation..." -msgstr ">> 完成安裝..." - -msgid ">> Installing content #" -msgstr ">> 安裝程式主體#" - -msgid ">> Installing ticket..." -msgstr ">> 安裝 ticket..." - -msgid ">> Installing title..." -msgstr ">> 安裝 title..." - -msgid ">> Reading WAD data..." -msgstr ">> 讀取 WAD 數據..." - -msgid ">> Reading WAD data...ERROR! " -msgstr ">> 讀取 WAD 數據... 錯誤!" - -msgid ">> Reading WAD data...Ok!" -msgstr ">> 讀取 WAD 數據... 成功!" - -msgid "AUTO" -msgstr "自動" - -msgid "All Partitions" -msgstr "所有磁區" - -msgid "All images downloaded successfully." -msgstr "所有圖片已下載成功。" - -msgid "All the features of USB Loader GX are unlocked." -msgstr "USB Loader GX 所有功能已解鎖." - -msgid "Alternate DOL" -msgstr "可選擇Alt DOL檔" - -msgid "Anti" -msgstr "防止" - -msgid "App Language" -msgstr "語言設定" - -msgid "Apply" -msgstr "套用" - -msgid "Apr" -msgstr "四月" - -msgid "Are you sure you want to lock USB Loader GX?" -msgstr "確定要鎖上 USB Loader GX嗎?" - -msgid "Are you sure you want to reset?" -msgstr "確定要重新啟動嗎?" - -msgid "Are you sure?" -msgstr "確定?" - -msgid "Aug" -msgstr "八月" - -msgid "Author(s):" -msgstr "作者(群)" - -msgid "AutoInit Network" -msgstr "自動檢查網路" - -msgid "Automatic port switching is done on the fly. You need to change all custom paths to SD-Card first for this option or else it could damage a filesystem." -msgstr "快速執行自動槽位切換。首先你需要在SD卡改變所有自訂路徑這個選項,否則可能會損壞檔案系統。" - -msgid "BCA Codes Path" -msgstr "BAC代碼路徑" - -msgid "Back" -msgstr "返回" - -msgid "Back to HBC or Wii Menu" -msgstr "返回 HBC 或 Wii 系統選單" - -msgid "Backgroundmusic" -msgstr "背景音樂" - -msgid "Big thanks to:" -msgstr "非常感謝:" - -msgid "Block Cover Downloads" -msgstr "阻止封面下載" - -msgid "Block Custom Paths" -msgstr "阻止自訂路徑" - -msgid "Block Game Install" -msgstr "阻止遊戲安裝" - -msgid "Block Game Settings" -msgstr "阻止遊戲設定" - -msgid "Block GameID Change" -msgstr "阻止遊戲ID更改" - -msgid "Block Global Settings" -msgstr "阻止整體設定" - -msgid "Block Gui Settings" -msgstr "阻止介面設定" - -msgid "Block HBC Menu" -msgstr "阻止 HBC 選單" - -msgid "Block IOS Reload" -msgstr "阻止 IOS 重新載入" - -msgid "Block Loader Settings" -msgstr "阻止 Loader 設定" - -msgid "Block Parental Settings" -msgstr "阻止親子設定" - -msgid "Block Reset Settings" -msgstr "阻止重置設定" - -msgid "Block Sound Settings" -msgstr "阻止音效設定" - -msgid "Block Theme Downloader" -msgstr "阻止主題下載" - -msgid "Block Theme Menu" -msgstr "阻止主題選單" - -msgid "Block Title Launcher" -msgstr "阻止 Title 啟動" - -msgid "Block Updates" -msgstr "阻止更新" - -msgid "Boot/Standard" -msgstr "啟動/標準" - -msgid "Boot?" -msgstr "啟動?" - -msgid "Both" -msgstr "全部" - -msgid "Both Ports" -msgstr "兩個插槽" - -msgid "Can't be formatted" -msgstr "無法格式化" - -msgid "Can't create directory" -msgstr "無法建立目錄" - -#, c-format -msgid "Can't create path: %s" -msgstr "無法建立路徑: %s" - -msgid "Can't delete:" -msgstr "無法刪除:" - -msgid "Cancel" -msgstr "取消" - -msgid "Cannot write to destination." -msgstr "無法寫入目的地。" - -msgid "Change Play Path" -msgstr "變更執行路徑" - -msgid "Cheatfile is blank" -msgstr "金手指檔是空的" - -msgid "Clear" -msgstr "清除" - -msgid "Click to Download Covers" -msgstr "點選下載封面" - -msgid "Click to change game ID" -msgstr "點選變更遊戲 ID" - -msgid "Clock" -msgstr "時鐘" - -msgid "Close" -msgstr "關閉" - -msgid "Code Download" -msgstr "金手指下載" - -#, c-format -msgid "Coded by: %s" -msgstr "程式設計者: %s" - -msgid "Coding:" -msgstr "編譯:" - -msgid "Connection to server timed out." -msgstr "連接伺服器超時。" - -msgid "Console" -msgstr "控制台" - -msgid "Console Default" -msgstr "主機預設值" - -msgid "Console Locked" -msgstr "控制台已上鎖" - -msgid "Console must be unlocked for this option." -msgstr "控制台必須解鎖才可使用此選項。" - -msgid "Console should be unlocked to modify it." -msgstr "控制台須解鎖才可變更設定。" - -msgid "Continue to install game?" -msgstr "繼續安裝遊戲?" - -msgid "Controllevel" -msgstr "遊戲分級" - -msgid "Correct Password" -msgstr "密碼正確" - -msgid "Could not connect to the server." -msgstr "無法連接伺服器。" - -msgid "Could not create GCT file" -msgstr "無法建立 GCT 檔案" - -#, c-format -msgid "Could not create path: %s" -msgstr "無法建立路徑: %s" - -msgid "Could not find info for this game in the wiitdb.xml." -msgstr "無法從wiitdb.xml找到遊戲資訊。" - -msgid "Could not initialize DIP module!" -msgstr "無法啟動 DIP 模組!" - -msgid "Could not initialize network!" -msgstr "無法啟動網路!" - -msgid "Could not open Disc" -msgstr "無法開啟光碟" - -msgid "Could not open wiitdb.xml." -msgstr "無法開啟wiitdb.xml。" - -msgid "Could not save." -msgstr "無法儲存" - -msgid "Cover Download" -msgstr "下載封面" - -msgid "Create" -msgstr "產生" - -msgid "Credits" -msgstr "作者信息" - -msgid "Custom Discarts" -msgstr "自製光碟圖片" - -msgid "Custom Paths" -msgstr "自訂路徑" - -msgid "Customs/Original" -msgstr "自製/原始" - -msgid "DOL Path" -msgstr "DOL 路徑" - -msgid "Dec" -msgstr "十二月" - -msgid "Default" -msgstr "預設值" - -msgid "Default Gamesettings" -msgstr "初始化遊戲設定" - -msgid "Default Settings" -msgstr "初始化設定" - -msgid "Delete" -msgstr "刪除" - -msgid "Delete ?" -msgstr "刪除?" - -msgid "Delete Cheat GCT" -msgstr "刪除GCT金手指檔" - -msgid "Delete Cheat TXT" -msgstr "刪除TXT金手指檔" - -msgid "Delete Cover Artwork" -msgstr "刪除封面" - -msgid "Delete Disc Artwork" -msgstr "刪除光碟圖片" - -msgid "Design:" -msgstr "設計者:" - -msgid "Developed by" -msgstr "開發商" - -msgid "Directory does not exist!" -msgstr "目錄不存在" - -msgid "Disc Artwork Download" -msgstr "下載光碟圖片" - -msgid "Disc Artwork Path" -msgstr "光碟圖片路徑" - -msgid "Disc Default" -msgstr "光碟預設" - -msgid "DiskFlip" -msgstr "光碟滑動" - -msgid "Display" -msgstr "顯示" - -msgid "Display as a carousel" -msgstr "轉盤模式" - -msgid "Display as a grid" -msgstr "封面牆模式" - -msgid "Display as a list" -msgstr "表單模式" - -msgid "Display favorites only" -msgstr "只顯示最愛模式" - -msgid "Do you want to apply it now?" -msgstr "要套用設定嗎?" - -msgid "Do you want to apply this theme?" -msgstr "要套用這個佈景主題嗎?" - -msgid "Do you want to change language?" -msgstr "要變更語言嗎?" - -msgid "Do you want to download this theme?" -msgstr "是否要下載這個佈景主題嗎?" - -msgid "Do you want to format:" -msgstr "是否格式化:" - -msgid "Do you want to load the default theme?" -msgstr "是否要載入預設佈景主題嗎?" - -msgid "Do you want to sync free space info sector on all FAT32 partitions?" -msgstr "是否要同步所有FAT32磁區可用空間資訊?" - -msgid "Do you wish to update/download all language files?" -msgstr "是否要更新/下載所有語言檔案嗎?" - -msgid "Done!" -msgstr "完成!" - -msgid "Download" -msgstr "下載" - -msgid "Download Now" -msgstr "現在下載" - -msgid "Download finished" -msgstr "下載完成" - -msgid "Downloading 3D Covers" -msgstr "下載 3D封面" - -msgid "Downloading Flat Covers" -msgstr "下載一般封面" - -msgid "Downloading Full HQ Covers" -msgstr "下載完整高畫質封面" - -msgid "Downloading Full LQ Covers" -msgstr "下載完整低畫質封面" - -msgid "Downloading custom Discarts" -msgstr "下載自製光碟圖片" - -msgid "Downloading file..." -msgstr "下載檔案中..." - -msgid "Downloading image:" -msgstr "下載圖片:" - -msgid "Downloading original Discarts" -msgstr "下載原始光碟圖片" - -msgid "Downloading pagelist:" -msgstr "下載頁面清單:" - -msgid "Dutch" -msgstr "荷蘭文" - -msgid "ERROR" -msgstr "錯誤" - -msgid "ERROR:" -msgstr "錯誤:" - -msgid "ERROR: Can't set up theme." -msgstr "錯誤:無法設定佈景主題。" - -msgid "English" -msgstr "英文" - -msgid "Error" -msgstr "錯誤" - -msgid "Error !" -msgstr "錯誤 !" - -msgid "Error 002 fix" -msgstr "修正002錯誤" - -#, c-format -msgid "Error creating path: %s" -msgstr "建立路徑錯誤: %s" - -msgid "Error opening downloaded file" -msgstr "開啟下載檔案錯誤" - -msgid "Error reading Disc" -msgstr "讀取光碟錯誤" - -#, c-format -msgid "Error when downloading file: %i" -msgstr "下載檔案時產生錯誤: %i" - -msgid "Error while downloding file" -msgstr "下載檔案過程錯誤" - -msgid "Error while opening the zip." -msgstr "開啟zip檔過程錯誤。" - -msgid "Error while transfering data." -msgstr "檔案傳輸過程錯誤。" - -msgid "Error while updating USB Loader GX." -msgstr "更新USB Loader GX過程錯誤。" - -msgid "Error writing the data." -msgstr "寫入資料錯誤。" - -msgid "Error..." -msgstr "錯誤..." - -msgid "Error:" -msgstr "錯誤:" - -msgid "Exit" -msgstr "退出" - -msgid "Exit to where?" -msgstr "退出到?" - -msgid "Extracting files..." -msgstr "提取檔案中..." - -msgid "Failed formating" -msgstr "格式化失敗" - -msgid "Failed to extract." -msgstr "提取失敗。" - -msgid "Failed to open partition" -msgstr "開啟磁區失敗" - -msgid "Failed updating" -msgstr "更新失敗" - -msgid "Feb" -msgstr "二月" - -msgid "File not found." -msgstr "找不到該檔案。" - -#, c-format -msgid "Filesize is %i Byte." -msgstr "檔案大小是 %i Byte。" - -msgid "Filesize is 0 Byte." -msgstr "檔案大小是0 Byte。" - -msgid "Finishing installation... Ok!" -msgstr "正在完成安裝...完成!" - -msgid "Flat Covers" -msgstr "普通封面" - -msgid "Flip-X" -msgstr "按鍵規則" - -msgid "Force NTSC" -msgstr "強制 NTSC" - -msgid "Force PAL50" -msgstr "強制 PAL50" - -msgid "Force PAL60" -msgstr "強制 PAL60" - -msgid "Format" -msgstr "格式化" - -msgid "Formatting, please wait..." -msgstr "格式化中, 請稍候..." - -msgid "Found missing images." -msgstr "找到缺少圖片。" - -msgid "Free Space" -msgstr "剩餘空間" - -msgid "French" -msgstr "法文" - -msgid "Full Cover Path" -msgstr "完整封面路徑" - -msgid "Full HQ Covers" -msgstr "完整高畫質封面" - -msgid "Full LQ Covers" -msgstr "完整低畫質封面" - -msgid "Full Menu" -msgstr "完整選單" - -msgid "Full shutdown" -msgstr "關機" - -msgid "GAMEID_Gamename" -msgstr "GAMEID_遊戲名稱" - -msgid "GCT Cheatcodes Path" -msgstr "金手指檔案路徑" - -msgid "GCT File created" -msgstr "GCT 檔案已產生" - -msgid "GUI Settings" -msgstr "介面設定" - -msgid "Game ID" -msgstr "遊戲 ID" - -msgid "Game IOS" -msgstr "遊戲 IOS" - -msgid "Game Language" -msgstr "遊戲語言" - -msgid "Game Load" -msgstr "遊戲載入設定" - -msgid "Game Lock" -msgstr "遊戲上鎖" - -msgid "Game Only" -msgstr "僅遊戲" - -msgid "Game Region" -msgstr "遊戲區碼" - -msgid "Game Size" -msgstr "遊戲容量" - -msgid "Game Sound Mode" -msgstr "遊戲聲音模式" - -msgid "Game Sound Volume" -msgstr "遊戲聲音音量" - -msgid "Game Split Size" -msgstr "遊戲分割大小" - -msgid "Game is already installed:" -msgstr "已安裝過遊戲:" - -msgid "Game/Install Partition" -msgstr "遊戲/安裝磁區" - -msgid "Gamename [GAMEID]" -msgstr "遊戲名稱 [GAMEID]" - -msgid "Games" -msgstr "遊戲數量" - -msgid "Genre:" -msgstr "類型:" - -msgid "German" -msgstr "德文" - -msgid "Global Settings" -msgstr "整體設定" - -msgid "HOME Menu" -msgstr "主選單" - -msgid "Homebrew Apps Path" -msgstr "HBC 應用程式路徑" - -msgid "Homebrew Channel" -msgstr "HBC" - -msgid "Homebrew Launcher" -msgstr "HBC 應用程式" - -msgid "Hour" -msgstr "小時制" - -msgid "How do you want to update?" -msgstr "是否執行更新?" - -msgid "How to Shutdown?" -msgstr "關機選項?" - -#, c-format -msgid "Incoming file %0.2fKB" -msgstr "正在接收檔案 %0.2fKB" - -#, c-format -msgid "Incoming file %0.2fMB" -msgstr "正在接收檔案 %0.2fMB" - -msgid "Initializing Network" -msgstr "正在啟動網路" - -msgid "Insert Disk" -msgstr "插入光碟" - -msgid "Insert a Wii Disc!" -msgstr "插入 Wii 光碟!" - -msgid "Install" -msgstr "安裝" - -msgid "Install Error!" -msgstr "安裝錯誤!" - -msgid "Install a game" -msgstr "安裝遊戲" - -msgid "Install directories" -msgstr "安裝目錄" - -msgid "Install partitions" -msgstr "安裝磁區" - -msgid "Installing content... Ok!" -msgstr "正在安裝內容...完成!" - -msgid "Installing game:" -msgstr "正在安裝遊戲:" - -msgid "Installing ticket... Ok!" -msgstr "安裝 ticket... 完成!" - -msgid "Installing title... Ok!" -msgstr "安裝 title... 完成!" - -msgid "Installing wad" -msgstr "安裝 WAD" - -msgid "Issue manager /" -msgstr "問題管理者 /" - -msgid "It seems that you have some information that will be helpful to us. Please pass this information along to the DEV team." -msgstr "請將這些訊息傳送至開發小組以幫助本軟體開發" - -msgid "Italian" -msgstr "意大利文" - -msgid "Jan" -msgstr "一月" - -msgid "Japanese" -msgstr "日文" - -msgid "July" -msgstr "七月" - -msgid "June" -msgstr "六月" - -msgid "Keep" -msgstr "保留" - -msgid "Keyboard" -msgstr "鍵盤" - -msgid "Korean" -msgstr "韓文" - -msgid "Language File" -msgstr "語言檔案" - -msgid "Language change:" -msgstr "變更語言為:" - -msgid "Languagefiles Path" -msgstr "語言檔路徑" - -msgid "Languagepath changed." -msgstr "語言路徑已變更" - -msgid "Left" -msgstr "左" - -msgid "Like SysMenu" -msgstr "同系統選單" - -msgid "List on Gamelaunch" -msgstr "遊戲啟動時列出清單" - -msgid "Load" -msgstr "載入" - -msgid "Load From SD/USB" -msgstr "從 SD/USB 載入" - -#, c-format -msgid "Load file from: %s ?" -msgstr "檔案載入位置: %s" - -msgid "Load this DOL as alternate DOL?" -msgstr "載入這個 DOL 作為替代 DOL?" - -msgid "Loader Settings" -msgstr "Loader設定" - -msgid "Loading standard language." -msgstr "正在載入預設語言" - -msgid "Loading standard music." -msgstr "正在載入預設音樂" - -msgid "Lock Console" -msgstr "鎖上控制台" - -msgid "Lock USB Loader GX" -msgstr "鎖上USB Loader GX" - -msgid "Locked" -msgstr "已鎖定" - -msgid "Loop Directory" -msgstr "重複路徑" - -msgid "Loop Music" -msgstr "重複音樂" - -msgid "Loop Sound" -msgstr "重複音樂" - -msgid "Main tester:" -msgstr "主要測試者:" - -msgid "Mar" -msgstr "三月" - -msgid "Mark new games" -msgstr "標示新遊戲" - -msgid "May" -msgstr "五月" - -msgid "Messageboard Update" -msgstr "留言板更新" - -msgid "Motion+ Video" -msgstr "移動+視訊" - -msgid "Mount DVD drive" -msgstr "掛載DVD光碟" - -msgid "Multiple Partitions" -msgstr "多重磁區" - -msgid "Music Loop Mode" -msgstr "音樂循環模式" - -msgid "Music Volume" -msgstr "音樂音量" - -msgid "Neither" -msgstr "皆不顯示" - -msgid "Network is not initiated." -msgstr "網路無法啟動。" - -msgid "New Disc Detected" -msgstr "新光碟已檢查" - -msgid "Next" -msgstr "往後" - -msgid "No" -msgstr "否" - -msgid "No Cheatfile found" -msgstr "金手指檔案未找到" - -msgid "No DOL file found on disc." -msgstr "光碟中未找到 DOL 檔案。" - -msgid "No Splitting" -msgstr "沒有分割" - -msgid "No URL or Path specified." -msgstr "沒有指定URL或路徑。" - -msgid "No WBFS or FAT/NTFS/EXT partition found" -msgstr "沒找到WBFS 或 FAT/NTFS/EXT磁區" - -msgid "No cheats were selected" -msgstr "沒有選擇金手指" - -msgid "No data could be read." -msgstr "無法讀取數據" - -msgid "No favorites selected." -msgstr "沒有選取最愛。" - -msgid "No file missing!" -msgstr "沒有檔案缺少!" - -msgid "No new updates." -msgstr "沒有可用更新。" - -msgid "No themes found on the site." -msgstr "在網站上找不到主題。" - -msgid "No themes found." -msgstr "找不到佈景主題。" - -msgid "None" -msgstr "沒有" - -msgid "Normal" -msgstr "一般" - -msgid "Not a WAD file." -msgstr "不是 WAD 檔案。" - -msgid "Not a Wii Disc" -msgstr "不是 Wii 的光碟" - -msgid "Not a valid URL" -msgstr "不是有效的網址" - -msgid "Not a valid URL path" -msgstr "不是有效的網址路徑" - -msgid "Not a valid domain" -msgstr "不是有效的網域" - -msgid "Not enough free memory." -msgstr "剩餘記憶體不足。" - -msgid "Not enough free space!" -msgstr "剩餘空間不足!" - -msgid "Not enough memory." -msgstr "記憶體不足。" - -msgid "Not required" -msgstr "不需要" - -msgid "Not supported format!" -msgstr "未支援的格式!" - -msgid "Nov" -msgstr "十一月" - -msgid "OFF" -msgstr "關閉" - -msgid "OK" -msgstr "確定" - -msgid "ON" -msgstr "開啟" - -msgid "Ocarina" -msgstr "金手指" - -msgid "Oct" -msgstr "十月" - -msgid "Official Site:" -msgstr "官方網址:" - -msgid "Offset" -msgstr "偏移" - -msgid "Only Game Partition" -msgstr "僅遊戲磁區" - -msgid "Only for Install" -msgstr "安裝遊戲時" - -msgid "Original Discarts" -msgstr "原始光碟圖片" - -msgid "Original/Customs" -msgstr "原始/自製" - -msgid "Parental Control" -msgstr "親子控制" - -msgid "Partition" -msgstr "磁區" - -msgid "Password" -msgstr "密碼" - -msgid "Password Changed" -msgstr "密碼已變更" - -msgid "Password has been changed" -msgstr "密碼已被變更" - -msgid "Patch Country Strings" -msgstr "修改國別設定" - -msgid "Path Changed" -msgstr "路徑已變更" - -msgid "Permission denied." -msgstr "沒有權限。" - -msgid "Pick from a list" -msgstr "從清單中選取" - -msgid "Play Count" -msgstr "執行次數" - -msgid "Play Next" -msgstr "執行下一個" - -msgid "Play Once" -msgstr "播放一次" - -msgid "Play Previous" -msgstr "執行上一個" - -msgid "Playing Music:" -msgstr "播放音樂:" - -msgid "Please wait..." -msgstr "請稍候..." - -msgid "Power off the Wii" -msgstr "關閉 Wii 主機" - -msgid "Prev" -msgstr "往前" - -msgid "Prompts Buttons" -msgstr "顯示校正" - -msgid "Published by" -msgstr "出版商" - -msgid "Quick Boot" -msgstr "快速啟動" - -msgid "Random Directory Music" -msgstr "隨機選取音樂" - -msgid "Reading WAD data... Ok!" -msgstr "讀取 WAD 數據... 完成!" - -msgid "Receiving file from:" -msgstr "正在接收檔案來源:" - -msgid "Region Patch" -msgstr "區碼修正" - -msgid "Released" -msgstr "發行" - -msgid "Reload SD" -msgstr "重新載入 SD 卡" - -msgid "Remove update" -msgstr "移除更新" - -msgid "Rename Game on WBFS" -msgstr "變更WBFS上的遊戲名稱" - -msgid "Reset" -msgstr "重新啟動" - -msgid "Reset BG Music" -msgstr "重設 BG 音樂" - -msgid "Reset Playcounter" -msgstr "重設執行次數" - -msgid "Reset to default BGM?" -msgstr "重設為預設BGM嗎?" - -msgid "Restarting..." -msgstr "正在重新啟動..." - -msgid "Return" -msgstr "返回" - -msgid "Return To" -msgstr "返回到" - -msgid "Return to Wii Menu" -msgstr "返回 Wii 系統選單" - -msgid "Right" -msgstr "右" - -msgid "Rumble" -msgstr "震動" - -msgid "SChinese" -msgstr "簡體中文" - -msgid "SFX Volume" -msgstr "音效音量" - -msgid "Save" -msgstr "儲存" - -msgid "Save Failed. No device inserted?" -msgstr "儲存失敗。沒有插入裝置?" - -msgid "Save Game List to" -msgstr "儲存遊戲清單至" - -msgid "Save List" -msgstr "儲存清單" - -msgid "Saved" -msgstr "已儲存" - -msgid "Screensaver" -msgstr "螢幕保護" - -msgid "Select" -msgstr "選取" - -msgid "Select DOL Offset" -msgstr "選取DOL補償" - -msgid "Select a DOL" -msgstr "選擇一個 DOL" - -msgid "Select a DOL from Game" -msgstr "從遊戲中選擇DOL" - -msgid "Sept" -msgstr "九月" - -msgid "Set Search-Filter" -msgstr "關鍵字篩選" - -msgid "Settings" -msgstr "設定" - -msgid "Show Free Space" -msgstr "顯示可用空間" - -msgid "Shutdown System" -msgstr "關閉系統" - -msgid "Shutdown Wii" -msgstr "關閉Wii主機" - -msgid "Sort alphabetically" -msgstr "以字母順序排序" - -msgid "Sort by number of players" -msgstr "以玩家人數排序" - -msgid "Sort by rank" -msgstr "以等級排序" - -msgid "Sort order by most played" -msgstr "以執行次數排序" - -msgid "Sound" -msgstr "音效" - -msgid "Sound Settings" -msgstr "音效設定" - -msgid "Sound+BGM" -msgstr "音樂+音效" - -msgid "Sound+Quiet" -msgstr "音樂+靜音" - -msgid "Spanish" -msgstr "西班牙文" - -msgid "Special thanks to:" -msgstr "特別感謝:" - -msgid "Split each 2GB" -msgstr "每個分割為2GB" - -msgid "Split each 4GB" -msgstr "每個分割為4GB" - -msgid "Standby" -msgstr "待機" - -msgid "Success" -msgstr "成功" - -msgid "Success:" -msgstr "成功:" - -msgid "Successfully Saved" -msgstr "已儲存成功" - -msgid "Successfully Updated" -msgstr "更新已完成" - -msgid "Successfully Updated thanks to www.techjawa.com" -msgstr "已更新成功,感謝 www.techjawa.com" - -msgid "Successfully deleted:" -msgstr "成功的刪除:" - -msgid "Successfully extracted theme." -msgstr "成功獲取主題。" - -msgid "Successfully installed:" -msgstr "成功安裝:" - -msgid "Sync FAT32 FS Info" -msgstr "同步FAT32檔案系統資訊" - -msgid "Synchronizing..." -msgstr "正在同步..." - -msgid "System Default" -msgstr "系統預設值" - -msgid "TChinese" -msgstr "繁體中文" - -msgid "TXT Cheatcodes Path" -msgstr "TXT 金手指檔案路徑" - -msgid "The .them file was not found in the zip." -msgstr "在zip中找不到 .them檔。" - -msgid "The entered directory does not exist. Would you like to create it?" -msgstr "所輸入的目錄不存在。是否要建立一個目錄嗎?" - -msgid "The game installation is disabled under this IOS because of instability in usb write." -msgstr "用此IOS遊戲安裝選項會被關閉,因為USB寫入資料不穩定。" - -msgid "The wad file was installed" -msgstr "wad檔已安裝" - -#, c-format -msgid "The wad installation failed with error %i" -msgstr "wad安裝失敗錯誤 %i" - -msgid "Theme Downloader" -msgstr "佈景主題下載" - -msgid "Theme Menu" -msgstr "佈景主題選單" - -msgid "Theme Path" -msgstr "佈景主題路徑" - -msgid "Theme Title:" -msgstr "佈景主題標題" - -msgid "Themes by www.spiffy360.com" -msgstr "佈景主題由www.spiffy360.com提供" - -msgid "This IOS is the BootMii ios. If you are sure it is not BootMii and you have something else installed there than ignore this warning." -msgstr "這IOS是BootMii的ios。若你確定不是BootMii的IOS而你在這安裝其他的程式,請忽略這警告。" - -msgid "This IOS was not found on the titles list. If you are sure you have it installed than ignore this warning." -msgstr "標題清單找不到這IOS。若你確定已安裝它,請忽略這警告。" - -msgid "Time left:" -msgstr "剩餘時間:" - -msgid "Title Launcher" -msgstr "系統頻道" - -msgid "Titles from WiiTDB" -msgstr "從WiiTDB顯示遊戲名稱" - -msgid "Tooltips" -msgstr "提示信息" - -msgid "Transfer failed" -msgstr "傳輸失敗" - -msgid "USB Device not found" -msgstr "找不到 USB 設備" - -msgid "USB Loader GX is protected" -msgstr "USB Loader GX 被上鎖保護" - -msgid "USB Port" -msgstr "USB 插槽" - -msgid "USB Port changing is only supported on Hermes cIOS." -msgstr "USB插槽變更僅Hermes cIOS支援。" - -msgid "Uninstall" -msgstr "移除" - -msgid "Uninstall Game" -msgstr "移除遊戲" - -msgid "Uninstall Menu" -msgstr "移除選單" - -msgid "Uninstall all" -msgstr "移除全部" - -msgid "Uninstalling wad" -msgstr "移除 WAD" - -msgid "Unknown" -msgstr "未知的" - -msgid "Unlock USB Loader GX" -msgstr "USB Loader GX解鎖" - -msgid "Unlocked" -msgstr "已解鎖" - -msgid "Unsupported format, try to extract manually TempTheme.zip." -msgstr "不支援格式,請嘗試手動提取TempTheme.zip。" - -msgid "Update" -msgstr "更新" - -msgid "Update All" -msgstr "更新所有檔案" - -msgid "Update DOL" -msgstr "僅更新主程式" - -msgid "Update Files" -msgstr "更新檔案" - -msgid "Update Path" -msgstr "更新路徑" - -msgid "Update all Language Files" -msgstr "更新所有語言檔案" - -msgid "Update failed" -msgstr "更新失敗" - -msgid "Update successfull" -msgstr "更新成功" - -msgid "Updating Language Files:" -msgstr "正在更新語言檔案:" - -msgid "Uploaded ZIP file installed to homebrew directory." -msgstr "已更新安裝在Homebrew目錄的ZIP檔案" - -msgid "VIDTV Patch" -msgstr "VIDTV 修改" - -msgid "Version:" -msgstr "版本:" - -#, c-format -msgid "Version: %s" -msgstr "版本: %s" - -msgid "Video Mode" -msgstr "視訊格式" - -msgid "WDM Files Path" -msgstr "WDM檔案路徑" - -msgid "WIP Patches Path" -msgstr "WIP 修正檔路徑" - -msgid "Waiting..." -msgstr "等待中..." - -msgid "Warning:" -msgstr "警告:" - -msgid "What do you want to update?" -msgstr "更新何者?" - -msgid "What should be deleted for this game title:" -msgstr "這遊戲title應刪除什麼:" - -msgid "WiFi Features" -msgstr "WiFi功能設定" - -msgid "Widescreen Fix" -msgstr "寬螢幕校正" - -msgid "Wii Menu" -msgstr "Wii系統選單" - -msgid "Wii Settings" -msgstr "Wii主機設定" - -msgid "WiiTDB Files" -msgstr "WiiTDB檔案" - -msgid "WiiTDB Path" -msgstr "WiiTDB路徑" - -msgid "WiiTDB is up to date." -msgstr "WiiTDB保持最新。" - -msgid "Wiilight" -msgstr "光碟機藍光" - -msgid "Wrong Password" -msgstr "密碼錯誤" - -msgid "Yes" -msgstr "是" - -msgid "You are currently using IOS" -msgstr "目前你使用中的IOS" - -msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." -msgstr "你嘗試用高於 cIOS 249 版本18去選取 FAT32/NTFS/EXT 磁區。這格式不支援。繼續請自行承擔風險。" - -msgid "You need to select or format a partition" -msgstr "選擇你要格式化的磁區" - -msgid "and translators for language files updates" -msgstr "及對所有語言檔更新的翻譯者" - -msgid "available" -msgstr "可取得" - -msgid "does not exist!" -msgstr "不存在!" - -msgid "does not exist! Loading game without cheats." -msgstr "不存在!載入遊戲但不啟用金手指" - -msgid "files left" -msgstr "剩下的檔案" - -msgid "for FAT/NTFS support" -msgstr "FAT/NTFS 格式支援" - -msgid "for Ocarina" -msgstr "的 金手指" - -msgid "for WiiTDB and hosting covers / disc images" -msgstr "設置 WiiTDB 與封面 / 光碟圖片檔案存放空間" - -msgid "for diverse patches" -msgstr "的多種修正" - -msgid "for his awesome tool LibWiiGui" -msgstr "的優秀工具 LibWiiGui" - -msgid "for hosting the themes" -msgstr "主要的主題" - -msgid "for hosting the update files" -msgstr "設置更新檔案存放空間" - -msgid "for the USB Loader source" -msgstr "與釋出USB Loader原始碼" - -msgid "formatted!" -msgstr "完成格式化!" - -msgid "free" -msgstr "剩餘" - -msgid "not set" -msgstr "未設定" - -msgid "of" -msgstr "的" - -msgid "seconds left" -msgstr "剩餘秒數" - -#~ msgid "Author:" -#~ msgstr "作者" - -#~ msgid "Do you want to load this theme?" -#~ msgstr "是否要載入這佈景主題嗎?" - -#~ msgid "Loading default theme." -#~ msgstr "正在載入預設主題。" - -#~ msgid "Theme path is changed." -#~ msgstr "佈景主題路徑已變更。" - -#~ msgid "Custom Disc Images" -#~ msgstr "自製光碟圖片" - -#~ msgid "Download Boxart image?" -#~ msgstr "下載封面圖片?" - -#~ msgid "Download Discart image?" -#~ msgstr "下載光碟圖片?" - -#~ msgid "Downloading file" -#~ msgstr "下載檔案" - -#~ msgid "Missing files" -#~ msgstr "缺少的檔案" - -#~ msgid "Original Disc Images" -#~ msgstr "原始光碟圖片" - -#~ msgid "Use IOS58" -#~ msgstr "使用 IOS58" - -#~ msgid "files not found on the server!" -#~ msgstr "伺服器中無此檔案!" - -#~ msgid "Disc Images" -#~ msgstr "光碟圖片" - -#~ msgid "Downloading covers" -#~ msgstr "下載封面" - -#~ msgid "Only Customs" -#~ msgstr "只顯示自製" - -#~ msgid "Only Original" -#~ msgstr "只顯示原始" - -#~ msgid "Trying custom Discarts" -#~ msgstr "嘗試自製光碟圖片" - -#~ msgid "Trying original Discarts" -#~ msgstr "嘗試原始光碟圖片" - -#~ msgid "Do you really want to delete:" -#~ msgstr "確定刪除:" - -#~ msgid "Do you want to use the alternate DOL that is known to be correct?" -#~ msgstr "是否要使用這個已知是正確的 Alt DOL 檔案嗎?" - -#~ msgid "0 (Locked and Unlocked Games)" -#~ msgstr "0 (鎖上及解鎖遊戲)" - -#~ msgid "1 (Unlocked Games Only)" -#~ msgstr "1 (只鎖上遊戲)" - -#~ msgid "BETA revisions" -#~ msgstr "測試版本" - -#~ msgid "GamesLevel" -#~ msgstr "遊戲級別" - -#~ msgid "Unlock console to use this option." -#~ msgstr "控制台解鎖以進行設定" - -#~ msgid "Enabling this option on a FAT partition might slow the startup of the loader." -#~ msgstr "在FAT磁區開啟這選項可能造成loader啟動緩慢。" - -#~ msgid "Full Shutdown" -#~ msgstr "關機" - -#~ msgid "GXtheme.cfg not found in any subfolder." -#~ msgstr "無法在任何子目錄找到 GXtheme.cfg 檔案" - -#~ msgid "Gerne:" -#~ msgstr "類型:" - -#~ msgid "If you don't have WiFi, press 1 to get an URL to get your WiiTDB.zip" -#~ msgstr "若無WiFi連線,請按1以取得WiiTDB.zip檔案之網址" - -#~ msgid "Paste it into your browser to get your WiiTDB.zip." -#~ msgstr "複製這網址到瀏覽器來下載 WiiTDB.zip 檔。" - -#~ msgid "Shutdown to Idle" -#~ msgstr "進入待機狀態" - -#~ msgid "Shutdown?" -#~ msgstr "關機嗎?" - -#~ msgid "Your URL has been saved in %sWiiTDB_URL.txt." -#~ msgstr "網址已儲存於 %sWiiTDB_URL.txt 檔。" - -#~ msgid "All partitions" -#~ msgstr "所有磁區" - -#~ msgid "Can't create file" -#~ msgstr "不能建立檔案" - -#~ msgid "Connection lost..." -#~ msgstr "遺失連接..." - -#~ msgid "Download failed." -#~ msgstr "下載失敗。" - -#~ msgid "Download request failed." -#~ msgstr "下載請求失敗。" - -#~ msgid "Downloading Page List:" -#~ msgstr "下載主題預覽圖片:" - -#~ msgid "Game partition" -#~ msgstr "遊戲磁區" - -#~ msgid "Insert an SD-Card to save." -#~ msgstr "插入 SD 卡以儲存。" - -#~ msgid "Insert an SD-Card to use this option." -#~ msgstr "插入 SD 卡使用此功能。" - -#~ msgid "No SD-Card inserted!" -#~ msgstr "未插入 SD 卡!" - -#~ msgid "Theme Download Path" -#~ msgstr "佈景主題下載路徑" - -#~ msgid "Transfer failed." -#~ msgstr "傳輸失敗。" - -#~ msgid "Unsupported format, try to extract manually." -#~ msgstr "不支援的格式,嘗試手動提取。" - -#~ msgid "Waiting for USB Device" -#~ msgstr "等待 USB 設備" - -#~ msgid "and translaters for language files updates" -#~ msgstr "和所有語言檔更新的翻譯者" - -#~ msgid "Back to Loader" -#~ msgstr "返回 HBC" - -#~ msgid "FAT: Use directories" -#~ msgstr "使用目錄" - -#~ msgid "An Error occured" -#~ msgstr "發生一個錯誤" - -#~ msgid "Are you sure you want to enable Parent Control?" -#~ msgstr "您確定要啟用家長控制?" - -#~ msgid "AutoPatch" -#~ msgstr "自動修改" - -#~ msgid "Checking for Updates" -#~ msgstr "檢查軟件最新版本" - -#~ msgid "Downloading" -#~ msgstr "正在下載" - -#~ msgid "Invalid PIN code" -#~ msgstr "無效的 PIN 碼" - -#~ msgid "Parental Control disabled" -#~ msgstr "關閉親子控制" - -#~ msgid "The wad file was installed. But It could not be deleted from the SD card." -#~ msgstr "WAD 已安裝,但文件無法從 SD 卡中刪除。" - -#~ msgid "The wad installation failed with error %ld" -#~ msgstr "WAD 安裝失敗,錯誤號 %ld" - -#~ msgid "Unable to open the wad that was just downloaded (%s)." -#~ msgstr "不能打開剛下載的 WAD 文件 (%s)." - -#~ msgid "Unlock Parental Control" -#~ msgstr "解鎖家長控制" - -#~ msgid "Update to" -#~ msgstr "升級至" - -#~ msgid "Updating" -#~ msgstr "正在更新" - -#~ msgid "Updating Language Files..." -#~ msgstr "正在更新語言檔案..." - -#~ msgid "Updating WiiTDB.zip" -#~ msgstr "正更新 WiiTDB.zip" - -#~ msgid "You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings." -#~ msgstr "家長控制已鎖定。如果要解除 Wii 被鎖住的功能,您必須要先至控制台解除家長控制。" - -#~ msgid "%s : %s May not boot correctly if your System Menu is not up to date." -#~ msgstr "%s : %s 可能無法正確啟動,也許您的系統目錄不是最新的。" - -#~ msgid "BCA Codes Path changed" -#~ msgstr "BAC 路徑已變更" - -#~ msgid "Back to Wii Menu" -#~ msgstr "返回 Wii 系統選單" - -#~ msgid "Channels" -#~ msgstr "頻道" - -#~ msgid "Checking existing artwork" -#~ msgstr "檢查已存在的插圖" - -#~ msgid "Confirm" -#~ msgstr "確認" - -#~ msgid "Could not find a WBFS partition." -#~ msgstr "找不到 WBFS 磁區." - -#~ msgid "Could not open WBFS partition" -#~ msgstr "無法打開 WBFS 磁區" - -#~ msgid "Could not read the disc." -#~ msgstr "無法讀取光碟." - -#~ msgid "Could not set USB." -#~ msgstr "無法設置 USB." - -#~ msgid "Cover Path Changed" -#~ msgstr "封面路徑已變更" - -#~ msgid "DOL path changed" -#~ msgstr "DOL 路徑已變更" - -#~ msgid "Disc Path Changed" -#~ msgstr "光碟圖像路徑已變更" - -#~ msgid "Display favorites" -#~ msgstr "我的最愛模式" - -#~ msgid "Do you want to retry for 30 secs?" -#~ msgstr "是否等待 30 秒後重試?" - -#~ msgid "Enable Parental Control" -#~ msgstr "啟用親子控制" - -#~ msgid "Force" -#~ msgstr "強制" - -#~ msgid "GCT Cheatcodes Path changed" -#~ msgstr "金手指檔案路徑已變更" - -#~ msgid "Homebrew Appspath changed" -#~ msgstr "HBC 應用程式路徑已變更" - -#~ msgid "Insert an SD-Card to download images." -#~ msgstr "插入 SD 卡以下載封面." - -#~ msgid "Install not possible" -#~ msgstr "無法安裝" - -#~ msgid "Most likely it has dimensions that are not evenly divisible by 4." -#~ msgstr "圖片格式錯誤,可能它的尺寸不是 4 的倍數." - -#~ msgid "Network init error" -#~ msgstr "網路啟動錯誤" - -#~ msgid "No .dol or .elf files found." -#~ msgstr "找不到 .dol 或 .elf 文件" - -#~ msgid "No Favorites" -#~ msgstr "沒有收藏記錄" - -#~ msgid "No USB Device" -#~ msgstr "沒有 USB 設備" - -#~ msgid "No USB Device found." -#~ msgstr "找不到 USB 設備." - -#~ msgid "No WBFS or FAT/NTFS partition found" -#~ msgstr "找不到 WBFS 和 FAT/NTFS 磁區中的遊戲" - -#~ msgid "Normal Covers" -#~ msgstr "普通封面" - -#~ msgid "Not Found" -#~ msgstr "沒找到" - -#~ msgid "Not a DOL/ELF file." -#~ msgstr "不是 DOL/ELF 文件." - -#~ msgid "Reset to standard BGM?" -#~ msgstr "重置回標準 BG 音樂" - -#~ msgid "Save Failed" -#~ msgstr "儲存失敗" - -#~ msgid "Selected DOL" -#~ msgstr "已選擇 DOL" - -#~ msgid "Standard" -#~ msgstr "預設" - -#~ msgid "TXT Cheatcodes Path changed" -#~ msgstr "TXT 金手指文件路徑已變更" - -#~ msgid "Theme Download Path changed" -#~ msgstr "佈景主題下載路徑已變更" - -#~ msgid "Theme Path Changed" -#~ msgstr "佈景主題路徑已變更" - -#~ msgid "USB Loader GX will only run with Hermes CIOS rev 4! Please make sure you have revision 4 installed!" -#~ msgstr "USB Loader GX 只能執行 Hermes CIO rev4!請確認您安裝的版本是 rev4!" - -#~ msgid "Update Path changed." -#~ msgstr "更新路徑已變更" - -#~ msgid "WIP Patches Path changed" -#~ msgstr "WIP 補丁路徑已更新" - -#~ msgid "WiiTDB Path changed." -#~ msgstr "WiiTDB路徑已變更" - -#~ msgid "You are about to delete " -#~ msgstr "您即將刪除" - -#~ msgid "You are choosing to display favorites and you do not have any selected." -#~ msgstr "你選擇顯示收藏夾但裡面還沒有任何收藏" - -#~ msgid "You are using NTFS filesystem. Due to possible write errors to a NTFS partition, installing a game is not possible." -#~ msgstr "您正在使用 NTFS 文件系統。由於可能一個錯誤寫入到一個 NTFS 分區,這時候是無法安裝遊戲的。" - -#~ msgid "You have attempted to load a bad image" -#~ msgstr "載入的影像有問題" - -#~ msgid "does not exist! You Messed something up, Idiot." -#~ msgstr "不存在!檔案錯誤" - -#~ msgid "file left" -#~ msgstr "剩餘文件" \ No newline at end of file diff --git a/Languages/thai.lang b/Languages/thai.lang deleted file mode 100644 index 4b84d460..00000000 --- a/Languages/thai.lang +++ /dev/null @@ -1,1758 +0,0 @@ -# USB Loader GX language source file. -# thai.lang - r826 -# don't delete/change this line (é). -msgid "" -msgstr "" -"Project-Id-Version: USB Loader GX\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-06 19:36+0100\n" -"PO-Revision-Date: 2009-10-01 01:00+0200\n" -"Last-Translator: Nitro_subzero \n" -"Language-Team: Nitro_subzero\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -msgid " Wad Saved as:" -msgstr " บันทึก Wad เป็น:" - -msgid " could not be downloaded." -msgstr " ไม่สามารถดาวน์โหลดได้" - -msgid " has been Saved. The text has not been verified. Some of the code may not work right with each other. If you experience trouble, open the text in a real text editor for more information." -msgstr " ถูกบันทึกแล้ว ข้อความยังไม่ถูกตรวจสอบ บางส่วนของโค๊ดอาจไม่สามารถทำงานได้ ถ้าคุณพบปัญหา เปิดโปรแกรมแก้ไขข้อความ เพื่อข้อมูลเพิ่มเติม." - -msgid " is not on the server." -msgstr " ไม่อยู่บนแม่ข่าย" - -#, c-format -msgid "%i files not found on the server!" -msgstr "" - -#, c-format -msgid "%i missing files" -msgstr "" - -msgid "0 (Everyone)" -msgstr "0 (ทุกคน)" - -msgid "1 (Child 7+)" -msgstr "1 (เด็ก 7+)" - -msgid "1 hour" -msgstr "1 ชม." - -msgid "10 min" -msgstr "10 นาที" - -msgid "2 (Teen 12+)" -msgstr "2 (วัยรุ่น 12+)" - -msgid "20 min" -msgstr "20 นาที" - -msgid "2D Cover Path" -msgstr "ที่เก็บ ปก 2D" - -msgid "3 (Mature 16+)" -msgstr "3 (เต็มวัย 16+)" - -msgid "3 min" -msgstr "3 นาที" - -msgid "30 min" -msgstr "30 นาที" - -msgid "3D Cover Path" -msgstr "ที่เก็บ ปก 3D" - -msgid "3D Covers" -msgstr "หน้าปก 3D" - -msgid "4 (Adults Only 18+)" -msgstr "4 (เฉพาะผู้ใหญ่ 18+)" - -msgid "5 min" -msgstr "5 นาที" - -msgid ">> Deleting tickets..." -msgstr ">> ลบ Tickets..." - -msgid ">> Deleting tickets...ERROR! " -msgstr ">> ลบ tickets...ผิดพลาด ! " - -msgid ">> Deleting tickets...Ok! " -msgstr ">> ลบ tickets...สำเร็จ ! " - -msgid ">> Deleting title ...ERROR! " -msgstr ">> ลบ Title...ผิดพลาด ! " - -msgid ">> Deleting title ...Ok!" -msgstr ">> ลบ Title...สำเร็จ ! " - -msgid ">> Deleting title contents..." -msgstr ">> ลบเนื้อหา Title..." - -msgid ">> Deleting title contents...ERROR! " -msgstr ">> ลบเนื้อหา Title...ผิดพลาด ! " - -msgid ">> Deleting title contents...Ok!" -msgstr ">> ลบเนื้อหา Title...สำเร็จ ! " - -msgid ">> Deleting title..." -msgstr ">> ลบ Title..." - -msgid ">> Finishing installation..." -msgstr ">> ติดตั้งเสร็จแล้ว..." - -msgid ">> Installing content #" -msgstr ">> กำลังติดตั้ง เนื้อหา #" - -msgid ">> Installing ticket..." -msgstr ">> กำลังติดตั้ง ticket..." - -msgid ">> Installing title..." -msgstr ">> กำลังติดตั้ง title..." - -msgid ">> Reading WAD data..." -msgstr ">> กำลังอ่านข้อมูล WAD..." - -msgid ">> Reading WAD data...ERROR! " -msgstr ">> กำลังอ่านข้อมูล WAD...ผิดพลาด ! " - -msgid ">> Reading WAD data...Ok!" -msgstr ">> กำลังอ่านข้อมูล WAD...สำเร็จ !" - -msgid "AUTO" -msgstr "อัตโนมัติ" - -msgid "All Partitions" -msgstr "" - -msgid "All images downloaded successfully." -msgstr "" - -msgid "All the features of USB Loader GX are unlocked." -msgstr "ความสามารถทั้งหมดของ USB Loader GX ถูกเปิดให้ใช้." - -msgid "Alternate DOL" -msgstr "เปลี่ยน DOL " - -msgid "Anti" -msgstr "ต้าน" - -msgid "App Language" -msgstr "ภาษาของโปรแกรม" - -msgid "Apply" -msgstr "" - -msgid "Apr" -msgstr "เมษ." - -msgid "Are you sure you want to lock USB Loader GX?" -msgstr "" - -msgid "Are you sure you want to reset?" -msgstr "" - -msgid "Are you sure?" -msgstr "แน่ใจหรือไม่ ?" - -msgid "Aug" -msgstr "สค." - -msgid "Author(s):" -msgstr "" - -msgid "AutoInit Network" -msgstr "ทำการเชื่อมต่อเครือข่าย" - -msgid "Automatic port switching is done on the fly. You need to change all custom paths to SD-Card first for this option or else it could damage a filesystem." -msgstr "" - -msgid "BCA Codes Path" -msgstr "" - -msgid "Back" -msgstr "ย้อนกลับ" - -msgid "Back to HBC or Wii Menu" -msgstr "กลับไป HBC หรือ เมนู Wii" - -msgid "Backgroundmusic" -msgstr "ดนตรีเบื้องหลัง" - -msgid "Big thanks to:" -msgstr "ขอขอบคุณ:" - -msgid "Block Cover Downloads" -msgstr "" - -msgid "Block Custom Paths" -msgstr "" - -msgid "Block Game Install" -msgstr "" - -msgid "Block Game Settings" -msgstr "" - -msgid "Block GameID Change" -msgstr "" - -msgid "Block Global Settings" -msgstr "" - -msgid "Block Gui Settings" -msgstr "" - -msgid "Block HBC Menu" -msgstr "" - -msgid "Block IOS Reload" -msgstr "โหลดบล๊อค IOS อีกครั้ง" - -msgid "Block Loader Settings" -msgstr "" - -msgid "Block Parental Settings" -msgstr "" - -msgid "Block Reset Settings" -msgstr "" - -msgid "Block Sound Settings" -msgstr "" - -msgid "Block Theme Downloader" -msgstr "" - -msgid "Block Theme Menu" -msgstr "" - -msgid "Block Title Launcher" -msgstr "" - -msgid "Block Updates" -msgstr "" - -msgid "Boot/Standard" -msgstr "บูต/มาตราฐาน" - -msgid "Boot?" -msgstr "บูต?" - -msgid "Both" -msgstr "ทั้งคู่" - -msgid "Both Ports" -msgstr "" - -msgid "Can't be formatted" -msgstr "ไม่สามารถฟอร์แมตได้" - -msgid "Can't create directory" -msgstr "ไม่สามารถสร้างไดเรคทอรี่ได้" - -#, c-format -msgid "Can't create path: %s" -msgstr "" - -msgid "Can't delete:" -msgstr "ไม่สามารถลบได้:" - -msgid "Cancel" -msgstr "ยกเลิก" - -msgid "Cannot write to destination." -msgstr "" - -msgid "Change Play Path" -msgstr "" - -msgid "Cheatfile is blank" -msgstr "ไฟล์สูตรโกง ว่างเปล่า" - -msgid "Clear" -msgstr "" - -msgid "Click to Download Covers" -msgstr "กดเพื่อดาวน์โหลดหน้าปก" - -msgid "Click to change game ID" -msgstr "กดเพื่อเปลี่ยน ID เกมส์" - -msgid "Clock" -msgstr "นาฬิกา" - -msgid "Close" -msgstr "ปิด" - -msgid "Code Download" -msgstr "ดาวน์โหลดโค๊ด" - -#, c-format -msgid "Coded by: %s" -msgstr "โค๊ดโดย: %s" - -msgid "Coding:" -msgstr "โค๊ด:" - -msgid "Connection to server timed out." -msgstr "" - -msgid "Console" -msgstr "คอนโซล" - -msgid "Console Default" -msgstr "ค่าตั้งต้นของคอนโซล" - -msgid "Console Locked" -msgstr "คอนโซลถูกล๊อค" - -msgid "Console must be unlocked for this option." -msgstr "" - -msgid "Console should be unlocked to modify it." -msgstr "ปลดล๊อคคอนโซลก่อน ถึงจะทำการเปลี่ยนแปลงได้" - -msgid "Continue to install game?" -msgstr "ทำต่อ เพื่อติดตั้งเกมส์?" - -msgid "Controllevel" -msgstr "ระดับการควบคุม" - -msgid "Correct Password" -msgstr "รหัสผ่านถูกต้อง" - -msgid "Could not connect to the server." -msgstr "" - -msgid "Could not create GCT file" -msgstr "ไม่สามารถสร้างไฟล์ GCT" - -#, c-format -msgid "Could not create path: %s" -msgstr "" - -msgid "Could not find info for this game in the wiitdb.xml." -msgstr "" - -msgid "Could not initialize DIP module!" -msgstr "ไม่สามารถเปิดใช้โมดูล DIP ได้ !" - -msgid "Could not initialize network!" -msgstr "ไม่สามารถเชื่อมต่อกับเครือข่ายได้ !" - -msgid "Could not open Disc" -msgstr "เปิดจากแผ่นไม่ได้ !" - -msgid "Could not open wiitdb.xml." -msgstr "" - -msgid "Could not save." -msgstr "บันทึกไม่ได้" - -msgid "Cover Download" -msgstr "ดาวน์โหลดปก" - -msgid "Create" -msgstr "สร้าง" - -msgid "Credits" -msgstr "เครดิต" - -msgid "Custom Discarts" -msgstr "" - -msgid "Custom Paths" -msgstr "กำหนด ที่เก็บ" - -msgid "Customs/Original" -msgstr "กำหนดเอง/ดั้งเดิม" - -msgid "DOL Path" -msgstr "ที่เก็บ DOL" - -msgid "Dec" -msgstr "ธค." - -msgid "Default" -msgstr "ค่าแรกกำหนด" - -msgid "Default Gamesettings" -msgstr "ค่าแรกกำหนด" - -msgid "Default Settings" -msgstr "ค่าแรกกำหนด" - -msgid "Delete" -msgstr "ลบ" - -msgid "Delete ?" -msgstr "ลบ ?" - -msgid "Delete Cheat GCT" -msgstr "ลบไฟล์โกงเกมส์" - -msgid "Delete Cheat TXT" -msgstr "ลบ Cheat TXT" - -msgid "Delete Cover Artwork" -msgstr "ลบ ภาพกล่อง" - -msgid "Delete Disc Artwork" -msgstr "ลบ ภาพแผ่น" - -msgid "Design:" -msgstr "ออกแบบ:" - -msgid "Developed by" -msgstr "พัฒนาโดย " - -msgid "Directory does not exist!" -msgstr "ไม่พบไดเรคทอรี่นี้ !" - -msgid "Disc Artwork Download" -msgstr "ดาวน์โหลดภาพแผ่น" - -msgid "Disc Artwork Path" -msgstr "ที่เก็บ ภาพแผ่น" - -msgid "Disc Default" -msgstr "ค่าตั้งต้นแผ่น" - -msgid "DiskFlip" -msgstr "สลับด้านแผ่น" - -msgid "Display" -msgstr "การแสดงผล" - -msgid "Display as a carousel" -msgstr "แสดงผลแบบ ม้าหมุน" - -msgid "Display as a grid" -msgstr "แสดงผลแบบ ตาราง" - -msgid "Display as a list" -msgstr "แสดงผลแบบ รายการ" - -msgid "Display favorites only" -msgstr "" - -msgid "Do you want to apply it now?" -msgstr "" - -msgid "Do you want to apply this theme?" -msgstr "" - -msgid "Do you want to change language?" -msgstr "ต้องการจะเปลี่ยนภาษา ?" - -msgid "Do you want to download this theme?" -msgstr "ต้องการดาวน์โหลดธีมนี้ ?" - -msgid "Do you want to format:" -msgstr "ต้องการฟอร์แมต:" - -msgid "Do you want to load the default theme?" -msgstr "" - -msgid "Do you want to sync free space info sector on all FAT32 partitions?" -msgstr "" - -msgid "Do you wish to update/download all language files?" -msgstr "ต้องการอัพเดทหรือดาวน์โหลด ไฟล์ภาษา ทั้งหมด?" - -msgid "Done!" -msgstr "เสร็จ!" - -msgid "Download" -msgstr "ดาวน์โหลด" - -msgid "Download Now" -msgstr "เริ่มการดาวน์โหลด" - -msgid "Download finished" -msgstr "ดาวน์โหลดเสร็จแล้ว" - -msgid "Downloading 3D Covers" -msgstr "" - -msgid "Downloading Flat Covers" -msgstr "" - -msgid "Downloading Full HQ Covers" -msgstr "" - -msgid "Downloading Full LQ Covers" -msgstr "" - -msgid "Downloading custom Discarts" -msgstr "" - -msgid "Downloading file..." -msgstr "" - -msgid "Downloading image:" -msgstr "ภาพที่กำลังดาวน์โหลด:" - -msgid "Downloading original Discarts" -msgstr "" - -msgid "Downloading pagelist:" -msgstr "" - -msgid "Dutch" -msgstr "เนเธอร์แลนด์" - -msgid "ERROR" -msgstr "ผิดพลาด" - -msgid "ERROR:" -msgstr "ผิดพลาด:" - -msgid "ERROR: Can't set up theme." -msgstr "" - -msgid "English" -msgstr "อังกฤษ" - -msgid "Error" -msgstr "ผิดพลาด" - -msgid "Error !" -msgstr "ผิดพลาด !" - -msgid "Error 002 fix" -msgstr "แก้ไข Error002" - -#, c-format -msgid "Error creating path: %s" -msgstr "" - -msgid "Error opening downloaded file" -msgstr "" - -msgid "Error reading Disc" -msgstr "อ่านแผ่นไม่ได้" - -#, c-format -msgid "Error when downloading file: %i" -msgstr "" - -msgid "Error while downloding file" -msgstr "" - -msgid "Error while opening the zip." -msgstr "" - -msgid "Error while transfering data." -msgstr "ผิดพลาดขณะรับส่งข้อมูล" - -msgid "Error while updating USB Loader GX." -msgstr "" - -msgid "Error writing the data." -msgstr "" - -msgid "Error..." -msgstr "ผิดพลาด..." - -msgid "Error:" -msgstr "ผิดพลาด:" - -msgid "Exit" -msgstr "" - -msgid "Exit to where?" -msgstr "" - -msgid "Extracting files..." -msgstr "กำลังขยายไฟล์..." - -msgid "Failed formating" -msgstr "ฟอร์แมตไม่ได้" - -msgid "Failed to extract." -msgstr "ขยายไฟล์ไม่ได้" - -msgid "Failed to open partition" -msgstr "ไม่สามารถเข้าถึงพาร์ทิชั่นได้" - -msgid "Failed updating" -msgstr "" - -msgid "Feb" -msgstr "กพ." - -msgid "File not found." -msgstr "ไม่พบไฟล์" - -#, c-format -msgid "Filesize is %i Byte." -msgstr "" - -msgid "Filesize is 0 Byte." -msgstr "" - -msgid "Finishing installation... Ok!" -msgstr "การติดตั้งเสร็จแล้ว !" - -msgid "Flat Covers" -msgstr "" - -msgid "Flip-X" -msgstr "กลับ-X" - -msgid "Force NTSC" -msgstr "" - -msgid "Force PAL50" -msgstr "" - -msgid "Force PAL60" -msgstr "" - -msgid "Format" -msgstr "ฟอร์แมต" - -msgid "Formatting, please wait..." -msgstr "กำลังฟอร์แมต,รอสักครู่..." - -msgid "Found missing images." -msgstr "" - -msgid "Free Space" -msgstr "พื้นที่ว่าง" - -msgid "French" -msgstr "ฝรั่งเศส" - -msgid "Full Cover Path" -msgstr "" - -msgid "Full HQ Covers" -msgstr "" - -msgid "Full LQ Covers" -msgstr "" - -msgid "Full Menu" -msgstr "" - -msgid "Full shutdown" -msgstr "" - -msgid "GAMEID_Gamename" -msgstr "" - -msgid "GCT Cheatcodes Path" -msgstr "ที่เก็บ สูตรโกง" - -msgid "GCT File created" -msgstr "ไฟล์ GCT ถูกสร้าง" - -msgid "GUI Settings" -msgstr "ปรับแต่งหน้าจอ" - -msgid "Game ID" -msgstr "เกมส์ ID" - -msgid "Game IOS" -msgstr "" - -msgid "Game Language" -msgstr "ภาษาเกมส์" - -msgid "Game Load" -msgstr "โหลดเกมส์" - -msgid "Game Lock" -msgstr "" - -msgid "Game Only" -msgstr "" - -msgid "Game Region" -msgstr "โซนของเกมส์" - -msgid "Game Size" -msgstr "ขนาดของเกมส์" - -msgid "Game Sound Mode" -msgstr "โหมดเสียงในเกมส์" - -msgid "Game Sound Volume" -msgstr "ระดับเสียงในเกมส์" - -msgid "Game Split Size" -msgstr "" - -msgid "Game is already installed:" -msgstr "เกมส์นี้ถูกติดตั้งอยู่แล้ว:" - -msgid "Game/Install Partition" -msgstr "" - -msgid "Gamename [GAMEID]" -msgstr "" - -msgid "Games" -msgstr "เกมส์" - -msgid "Genre:" -msgstr "" - -msgid "German" -msgstr "เยอรมัน" - -msgid "Global Settings" -msgstr "" - -msgid "HOME Menu" -msgstr "เมนู HOME" - -msgid "Homebrew Apps Path" -msgstr "ที่เก็บโปรแกรม Homebrew" - -msgid "Homebrew Channel" -msgstr "" - -msgid "Homebrew Launcher" -msgstr "Homebrew Launcher" - -msgid "Hour" -msgstr "ชั่วโมง" - -msgid "How do you want to update?" -msgstr "ต้องการอัพเดทแบบไหน ?" - -msgid "How to Shutdown?" -msgstr "ต้องการปิดแบบไหน ?" - -#, c-format -msgid "Incoming file %0.2fKB" -msgstr "ดาวน์โหลดไฟล์ %0.2fKB" - -#, c-format -msgid "Incoming file %0.2fMB" -msgstr "ดาวน์โหลดไฟล์ %0.2fMB" - -msgid "Initializing Network" -msgstr "เชื่อมต่อเครือข่าย" - -msgid "Insert Disk" -msgstr "ใส่แผ่น" - -msgid "Insert a Wii Disc!" -msgstr "ใส่แผ่น Wii !" - -msgid "Install" -msgstr "ติดตั้ง" - -msgid "Install Error!" -msgstr "ผิดพลาดขณะติดตั้ง!" - -msgid "Install a game" -msgstr "ติดตั้งเกมส์" - -msgid "Install directories" -msgstr "" - -msgid "Install partitions" -msgstr "" - -msgid "Installing content... Ok!" -msgstr "ติดตั้งเนื้อหา... สำเร็จ!" - -msgid "Installing game:" -msgstr "กำลังติดตั้งเกมส์:" - -msgid "Installing ticket... Ok!" -msgstr "ติดตั้ง ticket... สำเร็จ!" - -msgid "Installing title... Ok!" -msgstr "ติดตั้ง Title... สำเร็จ!" - -msgid "Installing wad" -msgstr "ติดตั้ง WAD" - -msgid "Issue manager /" -msgstr "" - -msgid "It seems that you have some information that will be helpful to us. Please pass this information along to the DEV team." -msgstr "ดูเหมือนว่าคุณมีข้อมูลที่จำเป็นต่อการพัฒนาโปรแกรม กรุณาส่งข้อมูลนั้นให้ทีมพัฒนาด้วย." - -msgid "Italian" -msgstr "อิตาลี" - -msgid "Jan" -msgstr "มค." - -msgid "Japanese" -msgstr "ญี่ปุ่น" - -msgid "July" -msgstr "กค." - -msgid "June" -msgstr "มิย." - -msgid "Keep" -msgstr "เก็บ" - -msgid "Keyboard" -msgstr "แป้นพิมพ์" - -msgid "Korean" -msgstr "เกาหลี" - -msgid "Language File" -msgstr "ไฟล์ภาษา" - -msgid "Language change:" -msgstr "เปลี่ยนภาษา:" - -msgid "Languagefiles Path" -msgstr "" - -msgid "Languagepath changed." -msgstr "ที่เก็บไฟล์ภาษาถูกเปลี่ยนแปลง" - -msgid "Left" -msgstr "ซ้าย" - -msgid "Like SysMenu" -msgstr "คล้าย SysMenu" - -msgid "List on Gamelaunch" -msgstr "" - -msgid "Load" -msgstr "โหลด" - -msgid "Load From SD/USB" -msgstr "โหลดจาก SD/USB" - -#, c-format -msgid "Load file from: %s ?" -msgstr "โหลดไฟล์จาก: %s ?" - -msgid "Load this DOL as alternate DOL?" -msgstr "โหลด DOL นี้เป็น alternate DOL?" - -msgid "Loader Settings" -msgstr "" - -msgid "Loading standard language." -msgstr "โหลดภาษามาตราฐาน." - -msgid "Loading standard music." -msgstr "โหลดเพลงมาตราฐาน" - -msgid "Lock Console" -msgstr "ล๊อค Console" - -msgid "Lock USB Loader GX" -msgstr "" - -msgid "Locked" -msgstr "ล๊อค" - -msgid "Loop Directory" -msgstr "" - -msgid "Loop Music" -msgstr "" - -msgid "Loop Sound" -msgstr "เล่นเสียงซ้ำ" - -msgid "Main tester:" -msgstr "" - -msgid "Mar" -msgstr "มีค." - -msgid "Mark new games" -msgstr "" - -msgid "May" -msgstr "พค." - -msgid "Messageboard Update" -msgstr "" - -msgid "Motion+ Video" -msgstr "" - -msgid "Mount DVD drive" -msgstr "เชื่อม DVD ไดร์ฟ" - -msgid "Multiple Partitions" -msgstr "" - -msgid "Music Loop Mode" -msgstr "" - -msgid "Music Volume" -msgstr "ความดังเสียงเพลง" - -msgid "Neither" -msgstr "ไม่ทั้งสอง" - -msgid "Network is not initiated." -msgstr "" - -msgid "New Disc Detected" -msgstr "พบแผ่นเกมส์ใหม่" - -msgid "Next" -msgstr "ต่อไป" - -msgid "No" -msgstr "ไม่" - -msgid "No Cheatfile found" -msgstr "ไม่พบไฟล์โกงเกมส์" - -msgid "No DOL file found on disc." -msgstr "ไม่มีไฟล์ DOL ในแผ่น" - -msgid "No Splitting" -msgstr "" - -msgid "No URL or Path specified." -msgstr "" - -msgid "No WBFS or FAT/NTFS/EXT partition found" -msgstr "" - -msgid "No cheats were selected" -msgstr "ไม่ได้เลือกการโกงเกมส์ไว้" - -msgid "No data could be read." -msgstr "ไม่มีข้อมูลที่อ่านไม่ได้" - -msgid "No favorites selected." -msgstr "" - -msgid "No file missing!" -msgstr "ไม่มีไฟล์ที่หายไป" - -msgid "No new updates." -msgstr "ไม่มีไฟล์ Update ตัวใหม่" - -msgid "No themes found on the site." -msgstr "ไม่พบธีมบนเวบไซต์" - -msgid "No themes found." -msgstr "" - -msgid "None" -msgstr "" - -msgid "Normal" -msgstr "ปกติ" - -msgid "Not a WAD file." -msgstr "" - -msgid "Not a Wii Disc" -msgstr "ไม่ใช่แผ่นเกมส์ Wii" - -msgid "Not a valid URL" -msgstr "" - -msgid "Not a valid URL path" -msgstr "" - -msgid "Not a valid domain" -msgstr "" - -msgid "Not enough free memory." -msgstr "มีหน่วยความจำเหลือไม่พอ" - -msgid "Not enough free space!" -msgstr "มีที่ว่างเหลือไม่พอ !" - -msgid "Not enough memory." -msgstr "" - -msgid "Not required" -msgstr "" - -msgid "Not supported format!" -msgstr "ไม่รองรับรูปแบบไฟล์นี้" - -msgid "Nov" -msgstr "พย." - -msgid "OFF" -msgstr "ปิด" - -msgid "OK" -msgstr "ตกลง" - -msgid "ON" -msgstr "เปิด" - -msgid "Ocarina" -msgstr "" - -msgid "Oct" -msgstr "ตค." - -msgid "Official Site:" -msgstr "เวบไซต์อย่างเป็นทางการ:" - -msgid "Offset" -msgstr "" - -msgid "Only Game Partition" -msgstr "" - -msgid "Only for Install" -msgstr "เฉพาะติดตั้งเท่านั้น" - -msgid "Original Discarts" -msgstr "" - -msgid "Original/Customs" -msgstr "ของแท้/ดัดแปลง" - -msgid "Parental Control" -msgstr "กำหนดอายุ" - -msgid "Partition" -msgstr "พาร์ติชั่น" - -msgid "Password" -msgstr "รหัสผ่าน" - -msgid "Password Changed" -msgstr "รหัสผ่านถูกเปลี่ยนแปลง" - -msgid "Password has been changed" -msgstr "รหัสผ่านถูกเปลี่ยนแปลง" - -msgid "Patch Country Strings" -msgstr "แก้อักขระประเทศ" - -msgid "Path Changed" -msgstr "" - -msgid "Permission denied." -msgstr "" - -msgid "Pick from a list" -msgstr "เลือกจากรายการ" - -msgid "Play Count" -msgstr "จำนวนที่เล่น" - -msgid "Play Next" -msgstr "" - -msgid "Play Once" -msgstr "" - -msgid "Play Previous" -msgstr "" - -msgid "Playing Music:" -msgstr "" - -msgid "Please wait..." -msgstr "รอสักครู่" - -msgid "Power off the Wii" -msgstr "ปิดเครื่อง Wii" - -msgid "Prev" -msgstr "ที่ผ่านมา" - -msgid "Prompts Buttons" -msgstr "ปุ่มเตรียมตัว" - -msgid "Published by" -msgstr "เผยแพร่โดย" - -msgid "Quick Boot" -msgstr "บูตแบบเร็ว" - -msgid "Random Directory Music" -msgstr "" - -msgid "Reading WAD data... Ok!" -msgstr "อ่านข้อมูล WAD... สำเร็จ!" - -msgid "Receiving file from:" -msgstr "ได้รับไฟล์จาก:" - -msgid "Region Patch" -msgstr "" - -msgid "Released" -msgstr "ปล่อย" - -msgid "Reload SD" -msgstr "โหลด SD ใหม่" - -msgid "Remove update" -msgstr "" - -msgid "Rename Game on WBFS" -msgstr "เปลี่ยนชื่อเกมส์บน WBFS" - -msgid "Reset" -msgstr "" - -msgid "Reset BG Music" -msgstr "" - -msgid "Reset Playcounter" -msgstr "เคลียร์การนับจำนวนที่เล่น" - -msgid "Reset to default BGM?" -msgstr "" - -msgid "Restarting..." -msgstr "รีสตารท์..." - -msgid "Return" -msgstr "กลับ" - -msgid "Return To" -msgstr "" - -msgid "Return to Wii Menu" -msgstr "กลับไปที่เมนู Wii" - -msgid "Right" -msgstr "ขวา" - -msgid "Rumble" -msgstr "สั่น" - -msgid "SChinese" -msgstr "จีน" - -msgid "SFX Volume" -msgstr "ความดังของ SFX" - -msgid "Save" -msgstr "บันทึก" - -msgid "Save Failed. No device inserted?" -msgstr "" - -msgid "Save Game List to" -msgstr "บันทึกรายชื่อเกมส์ไปที่" - -msgid "Save List" -msgstr "" - -msgid "Saved" -msgstr "บันทึกแล้ว" - -msgid "Screensaver" -msgstr "รักษาหน้าจอ" - -msgid "Select" -msgstr "" - -msgid "Select DOL Offset" -msgstr "" - -msgid "Select a DOL" -msgstr "เลือก DOL" - -msgid "Select a DOL from Game" -msgstr "" - -msgid "Sept" -msgstr "กย." - -msgid "Set Search-Filter" -msgstr "กำหนดเงื่อนไขการค้นหา" - -msgid "Settings" -msgstr "กำหนดค่า" - -msgid "Show Free Space" -msgstr "" - -msgid "Shutdown System" -msgstr "ปิดระบบ" - -msgid "Shutdown Wii" -msgstr "" - -msgid "Sort alphabetically" -msgstr "เรียงตามตัวอักษร" - -msgid "Sort by number of players" -msgstr "" - -msgid "Sort by rank" -msgstr "เรียงตามอันดับ" - -msgid "Sort order by most played" -msgstr "เรียงตามความถี่ในการเล่น" - -msgid "Sound" -msgstr "เสียง" - -msgid "Sound Settings" -msgstr "" - -msgid "Sound+BGM" -msgstr "เสียง+BGM" - -msgid "Sound+Quiet" -msgstr "เสียง+เงียบ" - -msgid "Spanish" -msgstr "สเปน" - -msgid "Special thanks to:" -msgstr "ขอขอบคุณอย่างสูง:" - -msgid "Split each 2GB" -msgstr "" - -msgid "Split each 4GB" -msgstr "" - -msgid "Standby" -msgstr "" - -msgid "Success" -msgstr "สำเร็จ" - -msgid "Success:" -msgstr "สำเร็จ:" - -msgid "Successfully Saved" -msgstr "บันทึกสำเร็จ" - -msgid "Successfully Updated" -msgstr "อัพเดทสำเร็จ" - -msgid "Successfully Updated thanks to www.techjawa.com" -msgstr "" - -msgid "Successfully deleted:" -msgstr "ลบสำเร็จ:" - -msgid "Successfully extracted theme." -msgstr "ขยายไฟล์ธีมสำเร็จ." - -msgid "Successfully installed:" -msgstr "ติดตั้งสำเร็จ:" - -msgid "Sync FAT32 FS Info" -msgstr "" - -msgid "Synchronizing..." -msgstr "" - -msgid "System Default" -msgstr "ค่าเริ่มต้นของระบบ" - -msgid "TChinese" -msgstr "จีนโบราณ" - -msgid "TXT Cheatcodes Path" -msgstr "ที่เก็บ TXTCheatcodes" - -msgid "The .them file was not found in the zip." -msgstr "" - -msgid "The entered directory does not exist. Would you like to create it?" -msgstr "ไม่พบไดเรคทอรี่นี้ ต้องการสร้างใหม่รึไม่ ?" - -msgid "The game installation is disabled under this IOS because of instability in usb write." -msgstr "" - -msgid "The wad file was installed" -msgstr "" - -#, c-format -msgid "The wad installation failed with error %i" -msgstr "" - -msgid "Theme Downloader" -msgstr "ตัวช่วยดาวน์โหลดธีม" - -msgid "Theme Menu" -msgstr "" - -msgid "Theme Path" -msgstr "ที่อยู่ Theme" - -msgid "Theme Title:" -msgstr "ชื่อธีม:" - -msgid "Themes by www.spiffy360.com" -msgstr "" - -msgid "This IOS is the BootMii ios. If you are sure it is not BootMii and you have something else installed there than ignore this warning." -msgstr "" - -msgid "This IOS was not found on the titles list. If you are sure you have it installed than ignore this warning." -msgstr "" - -msgid "Time left:" -msgstr "เหลือเวลาอีก:" - -msgid "Title Launcher" -msgstr "Title Launcher" - -msgid "Titles from WiiTDB" -msgstr "Title จาก WiiTDB" - -msgid "Tooltips" -msgstr "คำแนะนำ" - -msgid "Transfer failed" -msgstr "" - -msgid "USB Device not found" -msgstr "ไม่พบอุปกรณ์ USB" - -msgid "USB Loader GX is protected" -msgstr "USB Loader GX 5 ถูกป้องกัน" - -msgid "USB Port" -msgstr "" - -msgid "USB Port changing is only supported on Hermes cIOS." -msgstr "" - -msgid "Uninstall" -msgstr "ถอนการติดตั้ง" - -msgid "Uninstall Game" -msgstr "ถอนการติดตั้ง" - -msgid "Uninstall Menu" -msgstr "ถอนการติดตั้ง" - -msgid "Uninstall all" -msgstr "" - -msgid "Uninstalling wad" -msgstr "ถอนการติดตั้ง wad" - -msgid "Unknown" -msgstr "" - -msgid "Unlock USB Loader GX" -msgstr "" - -msgid "Unlocked" -msgstr "ปลดล๊อค" - -msgid "Unsupported format, try to extract manually TempTheme.zip." -msgstr "" - -msgid "Update" -msgstr "อัพเดท" - -msgid "Update All" -msgstr "อัทเดททั้งหมด" - -msgid "Update DOL" -msgstr "อัพเดท DOL" - -msgid "Update Files" -msgstr "อัพเดทไฟล์" - -msgid "Update Path" -msgstr "ที่อยู่ Update" - -msgid "Update all Language Files" -msgstr "อัพเดทภาษาทั้งหมด" - -msgid "Update failed" -msgstr "อัพเดทล้มเหลว" - -msgid "Update successfull" -msgstr "" - -msgid "Updating Language Files:" -msgstr "กำลังอัพเดทไฟล์ภาษา:" - -msgid "Uploaded ZIP file installed to homebrew directory." -msgstr "อัพโหลดไฟล์ zip ไปที่ไดเรคทอรี่ homebrew" - -msgid "VIDTV Patch" -msgstr "ปรับแก้ VIDTV" - -msgid "Version:" -msgstr "" - -#, c-format -msgid "Version: %s" -msgstr "เวอร์ชั่น: %s" - -msgid "Video Mode" -msgstr "โหมดการแสดงผลภาพ" - -msgid "WDM Files Path" -msgstr "" - -msgid "WIP Patches Path" -msgstr "" - -msgid "Waiting..." -msgstr "กำลังรอ..." - -msgid "Warning:" -msgstr "" - -msgid "What do you want to update?" -msgstr "คุณต้องการอัพเดทอะไร ?" - -msgid "What should be deleted for this game title:" -msgstr "" - -msgid "WiFi Features" -msgstr "ความสามารถของ Wi Fi" - -msgid "Widescreen Fix" -msgstr "จอกว้าง" - -msgid "Wii Menu" -msgstr "เมนู Wii" - -msgid "Wii Settings" -msgstr "การปรับแต่ง Wii" - -msgid "WiiTDB Files" -msgstr "ไฟล์ WiiTDB" - -msgid "WiiTDB Path" -msgstr "ที่อยู่ WiiTDB" - -msgid "WiiTDB is up to date." -msgstr "" - -msgid "Wiilight" -msgstr "ความสว่างของ Wii" - -msgid "Wrong Password" -msgstr "รหัสผ่านผิดพลาด" - -msgid "Yes" -msgstr "ใช่" - -msgid "You are currently using IOS" -msgstr "" - -msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." -msgstr "" - -msgid "You need to select or format a partition" -msgstr "" - -msgid "and translators for language files updates" -msgstr "" - -msgid "available" -msgstr "ว่างอยู่" - -msgid "does not exist!" -msgstr "ไม่มี!" - -msgid "does not exist! Loading game without cheats." -msgstr "ไม่มี! โหลดเกมส์โดยไม่ใช้การโกงเกมส์." - -msgid "files left" -msgstr "ไฟล์ที่ยังเหลือ" - -msgid "for FAT/NTFS support" -msgstr "" - -msgid "for Ocarina" -msgstr "สำหรับ Ocarina" - -msgid "for WiiTDB and hosting covers / disc images" -msgstr "สำหรับ WiiTDB และ ปก/รูปแผ่นดิสก์" - -msgid "for diverse patches" -msgstr "แก้ diverse" - -msgid "for his awesome tool LibWiiGui" -msgstr "สำหรับสุดยอด tool ของเค้า LibWiiGui" - -msgid "for hosting the themes" -msgstr "สำหรับให้ฝากธีม" - -msgid "for hosting the update files" -msgstr "สำหรับที่เก็บไฟล์อัพเดท" - -msgid "for the USB Loader source" -msgstr "สำหรับรหัสโปรแกรม USB Loader" - -msgid "formatted!" -msgstr "ฟอร์แมต!" - -msgid "free" -msgstr "ว่างอยู่" - -msgid "not set" -msgstr "ไม่ได้กำหนด" - -msgid "of" -msgstr "จาก" - -msgid "seconds left" -msgstr "วินาทีที่เหลือ" - -#~ msgid "Author:" -#~ msgstr "ผู้แต่ง:" - -#~ msgid "Download Boxart image?" -#~ msgstr "ดาวน์โหลดภาพกล่อง ?" - -#~ msgid "Download Discart image?" -#~ msgstr "ดาวน์โหลดภาพแผ่น ?" - -#~ msgid "Downloading file" -#~ msgstr "กำลังดาวน์โหลดไฟล์:" - -#~ msgid "Missing files" -#~ msgstr "ไฟล์ที่หาไม่พบ" - -#~ msgid "files not found on the server!" -#~ msgstr "ไม่พบไฟล์/i บนเซิฟเวอร์!" - -#~ msgid "Disc Images" -#~ msgstr "ภาพแผ่น" - -#~ msgid "Only Customs" -#~ msgstr "เฉพาะที่ดัดแปลง" - -#~ msgid "Only Original" -#~ msgstr "เฉพาะของแท้" - -#~ msgid "Do you really want to delete:" -#~ msgstr "ต้องการที่จะลบใช่ไหม:" - -#~ msgid "Do you want to use the alternate DOL that is known to be correct?" -#~ msgstr "ต้องการจะใช้ alt DOL เฉพาะที่รู้ว่าถูกต้อง?" - -#~ msgid "Unlock console to use this option." -#~ msgstr "ปลดล๊อค Console ก่อน เพื่อใช้ตัวเลือกนี้" - -#~ msgid "Full Shutdown" -#~ msgstr "ปิดอย่างสมบรูณ์" - -#~ msgid "If you don't have WiFi, press 1 to get an URL to get your WiiTDB.zip" -#~ msgstr "ถ้าไม่มี Wifi กด 1 เพื่อแสดง URL สำหรับดาวน์โหลด WiiTDB.zip" - -#~ msgid "Paste it into your browser to get your WiiTDB.zip." -#~ msgstr "วางในเวบบราวเซอร์เพื่อดึงข้อมูล WiiTDB.zip" - -#~ msgid "Shutdown to Idle" -#~ msgstr "เข้าโหมด Idle" - -#~ msgid "Your URL has been saved in %sWiiTDB_URL.txt." -#~ msgstr "URL ของคุณถูกบันทึกใน %sWiiTDB_URL.txt." - -#~ msgid "Can't create file" -#~ msgstr "สร้างไฟล์ไม่ได้" - -#~ msgid "Download failed." -#~ msgstr "ดาวน์โหลดไม่ได้" - -#~ msgid "Download request failed." -#~ msgstr "ดาวน์โหลดไม่ได้" - -#~ msgid "Downloading Page List:" -#~ msgstr "รายการที่กำลังดาวน์โหลด:" - -#~ msgid "Theme Download Path" -#~ msgstr "ตำแหน่งที่ดาวน์โหลดธีม" - -#~ msgid "Transfer failed." -#~ msgstr "ถ่ายโอนไม่ได้" - -#~ msgid "Unsupported format, try to extract manually." -#~ msgstr "ไม่สนับสนุนไฟล์นี้ ลองขยายไฟล์เอง" - -#~ msgid "and translaters for language files updates" -#~ msgstr "และผู้แปลภาษาสำหรับการอัพเดท" - -#~ msgid "Insert an SD-Card to save." -#~ msgstr "ใส่ SD card เพื่อบันทึก" - -#~ msgid "Insert an SD-Card to use this option." -#~ msgstr "ใส่ SD card เพื่อใช้ตัวเลือกนี้ " - -#~ msgid "No SD-Card inserted!" -#~ msgstr "ไม่ได้เสียบ SD card!" - -#~ msgid "Waiting for USB Device" -#~ msgstr "กำลังรออุปกรณ์ USB" - -#~ msgid "Back to Loader" -#~ msgstr "กลับไปที่ Loader" - -#~ msgid "An Error occured" -#~ msgstr "พบความผิดพลาด" - -#~ msgid "AutoPatch" -#~ msgstr "แก้ไขอัตโนมัติ" - -#~ msgid "Checking for Updates" -#~ msgstr "ตรวจสอบหาอัพเดท" - -#~ msgid "Downloading" -#~ msgstr "กำลังดาวน์โหลด" - -#~ msgid "The wad file was installed. But It could not be deleted from the SD card." -#~ msgstr "ไฟล์ Wad ถูกติดตั้งแล้ว แต่ไม่สามารถลบจาก SD card ได้" - -#~ msgid "The wad installation failed with error %ld" -#~ msgstr "การติดตั้งไฟล์ Wad ล้มเหลวด้วยข้อผิดพลาด %ld" - -#~ msgid "Unable to open the wad that was just downloaded (%s)." -#~ msgstr "ไม่สามารถเปิดไฟล์ Wad ที่เพิ่งดาวน์โหลดมาได้ (%s)." - -#~ msgid "Update to" -#~ msgstr "อัพเดทเป็น" - -#~ msgid "Updating" -#~ msgstr "กำลังอัพเดท" - -#~ msgid "Updating Language Files..." -#~ msgstr "กำลังอัพเดทไฟล์ภาษา..." - -#~ msgid "Updating WiiTDB.zip" -#~ msgstr "กำลังอัพเดทไฟล์ WiiTDB.zip" - -#~ msgid "%s : %s May not boot correctly if your System Menu is not up to date." -#~ msgstr "%s : %s อาจทำงานผิดปกติ ถ้าระบบของคุณไม่ทันสมัย" - -#~ msgid "Back to Wii Menu" -#~ msgstr "กลับไป เมนู Wii" - -#~ msgid "Channels" -#~ msgstr "แชนแนล" - -#~ msgid "Checking existing artwork" -#~ msgstr "ตรวจหาอาร์ตเวิรค์" - -#~ msgid "Confirm" -#~ msgstr "ยืนยัน" - -#~ msgid "Could not find a WBFS partition." -#~ msgstr "ไม่พบ WBFS พาร์ติชั่น" - -#~ msgid "Could not open WBFS partition" -#~ msgstr "ไม่สามารถเปิด WBFS พาร์ติชั่นได้" - -#~ msgid "Could not read the disc." -#~ msgstr "อ่านแผ่นไม่ได้ !" - -#~ msgid "Could not set USB." -#~ msgstr "ไม่สามารถตั้งค่า USB ได้" - -#~ msgid "Cover Path Changed" -#~ msgstr "ที่เก็บ ปก ถูกเปลี่ยนแปลง" - -#~ msgid "DOL path changed" -#~ msgstr "ที่เก็บ DOL ถูกเปลี่ยนแปลง" - -#~ msgid "Disc Path Changed" -#~ msgstr "ที่เก็บ ภาพแผ่น ถูกเปลี่ยนแปลง" - -#~ msgid "Display favorites" -#~ msgstr "แสดง แบบเกมส์ที่ชอบ" - -#~ msgid "Do you want to retry for 30 secs?" -#~ msgstr "ต้องการลองใหม่ทุก 30 วินาที?" - -#~ msgid "Force" -#~ msgstr "บังคับ" - -#~ msgid "GCT Cheatcodes Path changed" -#~ msgstr "ที่เก็บ สูตรโกง ถูกเปลี่ยนแปลง" - -#~ msgid "Homebrew Appspath changed" -#~ msgstr "ที่เก็บโปรแกรม Homebrew ถูกเปลี่ยนแปลง" - -#~ msgid "Insert an SD-Card to download images." -#~ msgstr "ใส่ SD card เพื่อดาวน์โหลดภาพ" - -#~ msgid "Most likely it has dimensions that are not evenly divisible by 4." -#~ msgstr "ดูเหมือนว่าขนาดจะหารด้วย 4 ไม่ลงตัว" - -#~ msgid "Network init error" -#~ msgstr "การเชื่อมต่อเครือข่ายผิดพลาด" - -#~ msgid "No .dol or .elf files found." -#~ msgstr "ไม่พบไฟล์ .dol หรือ .elf" - -#~ msgid "No Favorites" -#~ msgstr "ไม่พบเกมส์ที่ชื่นชอบ" - -#~ msgid "No USB Device" -#~ msgstr "ไม่ได้เสียบอุปกรณ์ USB" - -#~ msgid "No USB Device found." -#~ msgstr "ไม่พบอุปกรณ์ USB" - -#~ msgid "Normal Covers" -#~ msgstr "หน้าปกแบบปกติ" - -#~ msgid "Not Found" -#~ msgstr "ไม่พบ" - -#~ msgid "Not a DOL/ELF file." -#~ msgstr "ไม่ใช่ไฟล์ DOL หรือ ELF" - -#~ msgid "Save Failed" -#~ msgstr "การบันทึกไม่สำเร็จ" - -#~ msgid "Selected DOL" -#~ msgstr "DOL ที่เลือก" - -#~ msgid "Standard" -#~ msgstr "มาตราฐาน" - -#~ msgid "TXT Cheatcodes Path changed" -#~ msgstr "ที่เก็บ TXTCheatcodes ถูกเปลี่ยนแปลง" - -#~ msgid "Theme Download Path changed" -#~ msgstr "ตำแหน่งที่ดาวน์โหลดธีมเปลี่ยนแปลง" - -#~ msgid "Theme Path Changed" -#~ msgstr "ที่อยู่ Theme ถูกเปลี่ยนแปลง" - -#~ msgid "Update Path changed." -#~ msgstr "ที่อยู่ Update ถูกเปลี่ยน" - -#~ msgid "WiiTDB Path changed." -#~ msgstr "ที่อยู่ WiiTDB ถูกเปลี่ยนแปลง" - -#~ msgid "You are about to delete " -#~ msgstr "คุณกำลังจะลบ " - -#~ msgid "You are choosing to display favorites and you do not have any selected." -#~ msgstr "คุณเลือกจะแสดงเกมส์ที่ชอบ แต่คุณไม่ได้กำหนดเกมส์ที่ชื่นชอบไว้" - -#~ msgid "You have attempted to load a bad image" -#~ msgstr "คุณพยายามที่จะโหลดรูปภาพที่เสียหาย" - -#~ msgid "does not exist! You Messed something up, Idiot." -#~ msgstr "ไม่มี! คุณทำให้มันเละไปแล้ว ไอ้โง่ อิอิ." - -#~ msgid "file left" -#~ msgstr "ไฟล์ที่ยังเหลือ" diff --git a/Languages/turkish.lang b/Languages/turkish.lang deleted file mode 100644 index 04fd08bc..00000000 --- a/Languages/turkish.lang +++ /dev/null @@ -1,1767 +0,0 @@ -# USB Loader GX language source file. -# turkish.lang - r848 -# don't delete/change this line (é). -msgid "" -msgstr "" -"Project-Id-Version: USB Loader GX\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-02-06 19:36+0100\n" -"PO-Revision-Date: 2009-10-01 01:00+0200\n" -"Last-Translator: omercigingelini\n" -"Language-Team: omercigingelini\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -msgid " Wad Saved as:" -msgstr " Kaydedilen Wad:" - -msgid " could not be downloaded." -msgstr " indirilemedi." - -msgid " has been Saved. The text has not been verified. Some of the code may not work right with each other. If you experience trouble, open the text in a real text editor for more information." -msgstr " kaydedildi. Metin doğrulanmadı. Bazı kodlar birlikteyken doğru çalışmayabilir. Herhangi bir problem yaşarsanız, daha fazla bilgi için metin dosyasını gerçek bir metin editörüyle açın" - -msgid " is not on the server." -msgstr " sunucuda mevcut değil" - -#, c-format -msgid "%i files not found on the server!" -msgstr "" - -#, c-format -msgid "%i missing files" -msgstr "" - -msgid "0 (Everyone)" -msgstr "0 (Herkes)" - -msgid "1 (Child 7+)" -msgstr "1 (Çocuk 7+)" - -msgid "1 hour" -msgstr "1 saat" - -msgid "10 min" -msgstr "10 dakika" - -msgid "2 (Teen 12+)" -msgstr "2 (Genç 12+)" - -msgid "20 min" -msgstr "20 dakika" - -msgid "2D Cover Path" -msgstr "2D Kapak Yolu" - -msgid "3 (Mature 16+)" -msgstr "3 (Yetişkin 16+)" - -msgid "3 min" -msgstr "3 dakika" - -msgid "30 min" -msgstr "30 dakika" - -msgid "3D Cover Path" -msgstr "3D Kapak Yolu" - -msgid "3D Covers" -msgstr "3B Kapaklar" - -msgid "4 (Adults Only 18+)" -msgstr "4 (Sadece Yetişkin 18+)" - -msgid "5 min" -msgstr "5 dakika" - -msgid ">> Deleting tickets..." -msgstr ">> Biletler siliniyor" - -msgid ">> Deleting tickets...ERROR! " -msgstr ">> Biletler siliniyor..HATA!" - -msgid ">> Deleting tickets...Ok! " -msgstr ">> Biletler siliniyor..OK!" - -msgid ">> Deleting title ...ERROR! " -msgstr ">> Başlık siliniyor ..HATA!" - -msgid ">> Deleting title ...Ok!" -msgstr ">> Başlık siliniyor ..Ok!" - -msgid ">> Deleting title contents..." -msgstr ">> Başlık içeriği siliniyor.." - -msgid ">> Deleting title contents...ERROR! " -msgstr ">> Başlık içeriği siliniyor..HATA!" - -msgid ">> Deleting title contents...Ok!" -msgstr ">> Başlık içeriği siliniyor..Ok!" - -msgid ">> Deleting title..." -msgstr ">> Başlık siliniyor.." - -msgid ">> Finishing installation..." -msgstr ">> Kurulum bitiriliyor.." - -msgid ">> Installing content #" -msgstr ">> Kurulan başlık # " - -msgid ">> Installing ticket..." -msgstr ">> Bilet kuruluyor.." - -msgid ">> Installing title..." -msgstr ">> Başlık kuruluyor.." - -msgid ">> Reading WAD data..." -msgstr ">> WAD Bilgisi okunuyor.." - -msgid ">> Reading WAD data...ERROR! " -msgstr ">> WAD Bilgisi okunuyor..HATA!" - -msgid ">> Reading WAD data...Ok!" -msgstr ">> WAD Bilgisi okunuyor..OK!" - -msgid "AUTO" -msgstr "OTOMATIK" - -msgid "All Partitions" -msgstr "" - -msgid "All images downloaded successfully." -msgstr "" - -msgid "All the features of USB Loader GX are unlocked." -msgstr "USB Loader GX'in tüm özellikleri kilitli." - -msgid "Alternate DOL" -msgstr "Alternatif DOL" - -msgid "Anti" -msgstr "" - -msgid "App Language" -msgstr "Program Lisani" - -msgid "Apply" -msgstr "" - -msgid "Apr" -msgstr "Nis" - -msgid "Are you sure you want to lock USB Loader GX?" -msgstr "" - -msgid "Are you sure you want to reset?" -msgstr "" - -msgid "Are you sure?" -msgstr "Emin misiniz?" - -msgid "Aug" -msgstr "Ağu" - -msgid "Author(s):" -msgstr "" - -msgid "AutoInit Network" -msgstr "Ağı ototanımla" - -msgid "Automatic port switching is done on the fly. You need to change all custom paths to SD-Card first for this option or else it could damage a filesystem." -msgstr "" - -msgid "BCA Codes Path" -msgstr "BCA Kod Yolu" - -msgid "Back" -msgstr "Geri" - -msgid "Back to HBC or Wii Menu" -msgstr "HBC veya Wii Menüye dönüş" - -msgid "Backgroundmusic" -msgstr "Arkaplan müziği" - -msgid "Big thanks to:" -msgstr "Teşekkürler:" - -msgid "Block Cover Downloads" -msgstr "" - -msgid "Block Custom Paths" -msgstr "" - -msgid "Block Game Install" -msgstr "" - -msgid "Block Game Settings" -msgstr "" - -msgid "Block GameID Change" -msgstr "" - -msgid "Block Global Settings" -msgstr "" - -msgid "Block Gui Settings" -msgstr "" - -msgid "Block HBC Menu" -msgstr "" - -msgid "Block IOS Reload" -msgstr "IOS Yüklemesini Engelle" - -msgid "Block Loader Settings" -msgstr "" - -msgid "Block Parental Settings" -msgstr "" - -msgid "Block Reset Settings" -msgstr "" - -msgid "Block Sound Settings" -msgstr "" - -msgid "Block Theme Downloader" -msgstr "" - -msgid "Block Theme Menu" -msgstr "" - -msgid "Block Title Launcher" -msgstr "" - -msgid "Block Updates" -msgstr "" - -msgid "Boot/Standard" -msgstr "Boot/Standart" - -msgid "Boot?" -msgstr "Başlat?" - -msgid "Both" -msgstr "İkisi de" - -msgid "Both Ports" -msgstr "" - -msgid "Can't be formatted" -msgstr "Biçimlendirilemiyor" - -msgid "Can't create directory" -msgstr "Klasör olusturulamiyor" - -#, c-format -msgid "Can't create path: %s" -msgstr "" - -msgid "Can't delete:" -msgstr "Silinemiyor" - -msgid "Cancel" -msgstr "Iptal" - -msgid "Cannot write to destination." -msgstr "" - -msgid "Change Play Path" -msgstr "" - -msgid "Cheatfile is blank" -msgstr "Hile dosyası boş" - -msgid "Clear" -msgstr "" - -msgid "Click to Download Covers" -msgstr "Kapak Indirmek için Tıklayın" - -msgid "Click to change game ID" -msgstr "Oyun ID sini değiştirmek için tıklayın" - -msgid "Clock" -msgstr "Saat" - -msgid "Close" -msgstr "Kapat" - -msgid "Code Download" -msgstr "Kod İndirme" - -#, c-format -msgid "Coded by: %s" -msgstr "%s tarafından kodlandı" - -msgid "Coding:" -msgstr "Kodlama:" - -msgid "Connection to server timed out." -msgstr "" - -msgid "Console" -msgstr "Konsol" - -msgid "Console Default" -msgstr "Konsol Ayari" - -msgid "Console Locked" -msgstr "Konsol Kilitli" - -msgid "Console must be unlocked for this option." -msgstr "" - -msgid "Console should be unlocked to modify it." -msgstr "Degiştirmek için konsolun kilidini açmalısın." - -msgid "Continue to install game?" -msgstr "Oyunu kurmaya devam et?" - -msgid "Controllevel" -msgstr "Kontrol seviyesi" - -msgid "Correct Password" -msgstr "Doğru Şifre" - -msgid "Could not connect to the server." -msgstr "" - -msgid "Could not create GCT file" -msgstr "GCT dosyası oluşturulamadı" - -#, c-format -msgid "Could not create path: %s" -msgstr "" - -msgid "Could not find info for this game in the wiitdb.xml." -msgstr "" - -msgid "Could not initialize DIP module!" -msgstr "DIP modülü başlatılamadı!" - -msgid "Could not initialize network!" -msgstr "Ağa bağlanılamadı!" - -msgid "Could not open Disc" -msgstr "Disk açılamadı" - -msgid "Could not open wiitdb.xml." -msgstr "" - -msgid "Could not save." -msgstr "Kaydedilemedi" - -msgid "Cover Download" -msgstr "Kapak Indirme" - -msgid "Create" -msgstr "Oluştur" - -msgid "Credits" -msgstr "Emekçiler" - -msgid "Custom Discarts" -msgstr "" - -msgid "Custom Paths" -msgstr "Kişisel Yollar" - -msgid "Customs/Original" -msgstr "Kişisel/Orjinal" - -msgid "DOL Path" -msgstr "DOL Yolu" - -msgid "Dec" -msgstr "Ara" - -msgid "Default" -msgstr "Varsayılan" - -msgid "Default Gamesettings" -msgstr "Varsayılan Oyun ayarları" - -msgid "Default Settings" -msgstr "Varsayılan Ayarlar" - -msgid "Delete" -msgstr "Sil" - -msgid "Delete ?" -msgstr "Silinsin mi?" - -msgid "Delete Cheat GCT" -msgstr "GCT Hile sil" - -msgid "Delete Cheat TXT" -msgstr "TXT Hile sil" - -msgid "Delete Cover Artwork" -msgstr "Kapak Görselini Sil" - -msgid "Delete Disc Artwork" -msgstr "Disk Görselini Sil" - -msgid "Design:" -msgstr "Tasarım:" - -msgid "Developed by" -msgstr "Geliştirme" - -msgid "Directory does not exist!" -msgstr "Klasör bulunamadı!" - -msgid "Disc Artwork Download" -msgstr "Disk Görseli Indirme" - -msgid "Disc Artwork Path" -msgstr "Disk Görsel Yolu" - -msgid "Disc Default" -msgstr "Disk Varsayılanı" - -msgid "DiskFlip" -msgstr "DiskÇevir" - -msgid "Display" -msgstr "Görüntü" - -msgid "Display as a carousel" -msgstr "Dönel görünüm" - -msgid "Display as a grid" -msgstr "Izgara görünümü" - -msgid "Display as a list" -msgstr "Liste görünümü" - -msgid "Display favorites only" -msgstr "" - -msgid "Do you want to apply it now?" -msgstr "" - -msgid "Do you want to apply this theme?" -msgstr "" - -msgid "Do you want to change language?" -msgstr "Dili değiştirmek istiyor musunuz?" - -msgid "Do you want to download this theme?" -msgstr "Bu temayı indirmek istiyor musunuz?" - -msgid "Do you want to format:" -msgstr "Formatlamak istiyor musunuz:" - -msgid "Do you want to load the default theme?" -msgstr "" - -msgid "Do you want to sync free space info sector on all FAT32 partitions?" -msgstr "" - -msgid "Do you wish to update/download all language files?" -msgstr "Tüm dil dosyalarını indirmek/güncellemek istiyor musunuz?" - -msgid "Done!" -msgstr "Tamam!" - -msgid "Download" -msgstr "İndir" - -msgid "Download Now" -msgstr "Şimdi indir" - -msgid "Download finished" -msgstr "Indirme tamamlandı" - -msgid "Downloading 3D Covers" -msgstr "" - -msgid "Downloading Flat Covers" -msgstr "" - -msgid "Downloading Full HQ Covers" -msgstr "" - -msgid "Downloading Full LQ Covers" -msgstr "" - -msgid "Downloading custom Discarts" -msgstr "" - -msgid "Downloading file..." -msgstr "" - -msgid "Downloading image:" -msgstr "İndirilen resim:" - -msgid "Downloading original Discarts" -msgstr "" - -msgid "Downloading pagelist:" -msgstr "" - -msgid "Dutch" -msgstr "Flaman" - -msgid "ERROR" -msgstr "HATA" - -msgid "ERROR:" -msgstr "HATA:" - -msgid "ERROR: Can't set up theme." -msgstr "" - -msgid "English" -msgstr "Ingilizce" - -msgid "Error" -msgstr "Hata" - -msgid "Error !" -msgstr "Hata !" - -msgid "Error 002 fix" -msgstr "Error 002 düzeltmesi" - -#, c-format -msgid "Error creating path: %s" -msgstr "" - -msgid "Error opening downloaded file" -msgstr "" - -msgid "Error reading Disc" -msgstr "Disk Okuma Hatası" - -#, c-format -msgid "Error when downloading file: %i" -msgstr "" - -msgid "Error while downloding file" -msgstr "" - -msgid "Error while opening the zip." -msgstr "" - -msgid "Error while transfering data." -msgstr "Veri iletiminde hata." - -msgid "Error while updating USB Loader GX." -msgstr "" - -msgid "Error writing the data." -msgstr "" - -msgid "Error..." -msgstr "Hata..." - -msgid "Error:" -msgstr "Hata:" - -msgid "Exit" -msgstr "" - -msgid "Exit to where?" -msgstr "" - -msgid "Extracting files..." -msgstr "Dosyalar çıkarılıyor..." - -msgid "Failed formating" -msgstr "Biçimlendirme başarısız" - -msgid "Failed to extract." -msgstr "Çıkartma başarısız" - -msgid "Failed to open partition" -msgstr "Bölüm açılamadı" - -msgid "Failed updating" -msgstr "" - -msgid "Feb" -msgstr "Şub" - -msgid "File not found." -msgstr "Dosya bulunamadı" - -#, c-format -msgid "Filesize is %i Byte." -msgstr "" - -msgid "Filesize is 0 Byte." -msgstr "" - -msgid "Finishing installation... Ok!" -msgstr "Kurulum bitiriliyor.. OK!" - -msgid "Flat Covers" -msgstr "" - -msgid "Flip-X" -msgstr "Çevir-X" - -msgid "Force NTSC" -msgstr "" - -msgid "Force PAL50" -msgstr "" - -msgid "Force PAL60" -msgstr "" - -msgid "Format" -msgstr "Biçimlendir" - -msgid "Formatting, please wait..." -msgstr "Biçimlendiriliyor, bekleyiniz..." - -msgid "Found missing images." -msgstr "" - -msgid "Free Space" -msgstr "Boş Yer" - -msgid "French" -msgstr "Fransızca" - -msgid "Full Cover Path" -msgstr "" - -msgid "Full HQ Covers" -msgstr "" - -msgid "Full LQ Covers" -msgstr "" - -msgid "Full Menu" -msgstr "" - -msgid "Full shutdown" -msgstr "" - -msgid "GAMEID_Gamename" -msgstr "" - -msgid "GCT Cheatcodes Path" -msgstr "GCT Hile Yolu" - -msgid "GCT File created" -msgstr "GCT Dosyası oluşturuldu" - -msgid "GUI Settings" -msgstr "GUI Ayarları" - -msgid "Game ID" -msgstr "Oyun ID" - -msgid "Game IOS" -msgstr "" - -msgid "Game Language" -msgstr "Oyun Dili" - -msgid "Game Load" -msgstr "Oyun Yükle" - -msgid "Game Lock" -msgstr "" - -msgid "Game Only" -msgstr "" - -msgid "Game Region" -msgstr "Oyun Bölgesi" - -msgid "Game Size" -msgstr "Oyun Boyutu" - -msgid "Game Sound Mode" -msgstr "Oyun Ses Modu" - -msgid "Game Sound Volume" -msgstr "Oyun Ses Düzeyi" - -msgid "Game Split Size" -msgstr "" - -msgid "Game is already installed:" -msgstr "Oyun zaten kurulu:" - -msgid "Game/Install Partition" -msgstr "" - -msgid "Gamename [GAMEID]" -msgstr "" - -msgid "Games" -msgstr "Oyunlar" - -msgid "Genre:" -msgstr "" - -msgid "German" -msgstr "Almanca" - -msgid "Global Settings" -msgstr "" - -msgid "HOME Menu" -msgstr "HOME Menü" - -msgid "Homebrew Apps Path" -msgstr "Homebrew Yazılımlarının Yolu" - -msgid "Homebrew Channel" -msgstr "" - -msgid "Homebrew Launcher" -msgstr "Homebrew Başlatıcı" - -msgid "Hour" -msgstr "Saat" - -msgid "How do you want to update?" -msgstr "Nasıl güncellemek istiyorsun?" - -msgid "How to Shutdown?" -msgstr "Nasıl Kapansın?" - -#, c-format -msgid "Incoming file %0.2fKB" -msgstr "Gelen dosya %0.2fKB" - -#, c-format -msgid "Incoming file %0.2fMB" -msgstr "Gelen dosya %0.2fMB" - -msgid "Initializing Network" -msgstr "Ağa Bağlanıyor" - -msgid "Insert Disk" -msgstr "Diski Takın" - -msgid "Insert a Wii Disc!" -msgstr "Bir Wii Diski Takın!" - -msgid "Install" -msgstr "Kur" - -msgid "Install Error!" -msgstr "Kurulum Hatasi!" - -msgid "Install a game" -msgstr "Oyun kur" - -msgid "Install directories" -msgstr "" - -msgid "Install partitions" -msgstr "" - -msgid "Installing content... Ok!" -msgstr "İçerik kuruluyor.. OK!" - -msgid "Installing game:" -msgstr "Kurulan oyun:" - -msgid "Installing ticket... Ok!" -msgstr "Bilet kuruluyor.. OK!" - -msgid "Installing title... Ok!" -msgstr "Başlık kuruluyor.. OK!" - -msgid "Installing wad" -msgstr "Wad kuruluyor" - -msgid "Issue manager /" -msgstr "" - -msgid "It seems that you have some information that will be helpful to us. Please pass this information along to the DEV team." -msgstr "İşimize yarabilecek bilgilere sahip gibi gözüküyorsunuz. Lütfen bu bilgiyi Geliştirme takımına iletin." - -msgid "Italian" -msgstr "Italyanca" - -msgid "Jan" -msgstr "Oca" - -msgid "Japanese" -msgstr "Japonca" - -msgid "July" -msgstr "Tem" - -msgid "June" -msgstr "Haz" - -msgid "Keep" -msgstr "Sakla" - -msgid "Keyboard" -msgstr "Klavye" - -msgid "Korean" -msgstr "Korece" - -msgid "Language File" -msgstr "Dil dosyası" - -msgid "Language change:" -msgstr "Dil değişimi:" - -msgid "Languagefiles Path" -msgstr "" - -msgid "Languagepath changed." -msgstr "Dil dosya yolu değişti." - -msgid "Left" -msgstr "Sol" - -msgid "Like SysMenu" -msgstr "Sistem Menüsü Gibi" - -msgid "List on Gamelaunch" -msgstr "" - -msgid "Load" -msgstr "Yükle" - -msgid "Load From SD/USB" -msgstr "SD/USB den yükle" - -#, c-format -msgid "Load file from: %s ?" -msgstr "Dosya %s 'ten yüklensin mi?" - -msgid "Load this DOL as alternate DOL?" -msgstr "Bu DOL alternatif DOL olarak mı yüklensin?" - -msgid "Loader Settings" -msgstr "" - -msgid "Loading standard language." -msgstr "Standart dil yükleniyor." - -msgid "Loading standard music." -msgstr "Standart müzik yükleniyor." - -msgid "Lock Console" -msgstr "Konsolu Kilitle" - -msgid "Lock USB Loader GX" -msgstr "" - -msgid "Locked" -msgstr "Kilitlendi" - -msgid "Loop Directory" -msgstr "" - -msgid "Loop Music" -msgstr "" - -msgid "Loop Sound" -msgstr "Döngüdeki Ses" - -msgid "Main tester:" -msgstr "" - -msgid "Mar" -msgstr "" - -msgid "Mark new games" -msgstr "Yeni oyunlari imle" - -msgid "May" -msgstr "" - -msgid "Messageboard Update" -msgstr "" - -msgid "Motion+ Video" -msgstr "" - -msgid "Mount DVD drive" -msgstr "DVD sürücüsü bağla" - -msgid "Multiple Partitions" -msgstr "" - -msgid "Music Loop Mode" -msgstr "" - -msgid "Music Volume" -msgstr "Ses Seviyesi" - -msgid "Neither" -msgstr "Hiçbiri" - -msgid "Network is not initiated." -msgstr "" - -msgid "New Disc Detected" -msgstr "Yeni Disk Bulundu" - -msgid "Next" -msgstr "Ileri" - -msgid "No" -msgstr "Hayır" - -msgid "No Cheatfile found" -msgstr "Hile dosyası bulunamadı" - -msgid "No DOL file found on disc." -msgstr "Diskte DOL dosyası bulunamadı" - -msgid "No Splitting" -msgstr "" - -msgid "No URL or Path specified." -msgstr "" - -msgid "No WBFS or FAT/NTFS/EXT partition found" -msgstr "" - -msgid "No cheats were selected" -msgstr "Hile seçilmedi" - -msgid "No data could be read." -msgstr "Hiç veri okunamadı." - -msgid "No favorites selected." -msgstr "" - -msgid "No file missing!" -msgstr "Kayıp dosya yok!" - -msgid "No new updates." -msgstr "Güncelleme yok" - -msgid "No themes found on the site." -msgstr "Bu sitede tema bulunamadı" - -msgid "No themes found." -msgstr "" - -msgid "None" -msgstr "" - -msgid "Normal" -msgstr "" - -msgid "Not a WAD file." -msgstr "" - -msgid "Not a Wii Disc" -msgstr "Wii Diski Değil" - -msgid "Not a valid URL" -msgstr "" - -msgid "Not a valid URL path" -msgstr "" - -msgid "Not a valid domain" -msgstr "" - -msgid "Not enough free memory." -msgstr "Yeterli boş hafıza yok" - -msgid "Not enough free space!" -msgstr "Yeterli boş yer yok!" - -msgid "Not enough memory." -msgstr "" - -msgid "Not required" -msgstr "" - -msgid "Not supported format!" -msgstr "Desteklenmeyen format!" - -msgid "Nov" -msgstr "Kas" - -msgid "OFF" -msgstr "KAPALI" - -msgid "OK" -msgstr "" - -msgid "ON" -msgstr "AÇIK" - -msgid "Ocarina" -msgstr "" - -msgid "Oct" -msgstr "Eki" - -msgid "Official Site:" -msgstr "Resmi Site:" - -msgid "Offset" -msgstr "" - -msgid "Only Game Partition" -msgstr "" - -msgid "Only for Install" -msgstr "Sadece Kurulum için" - -msgid "Original Discarts" -msgstr "" - -msgid "Original/Customs" -msgstr "Orjinal/Kişisel" - -msgid "Parental Control" -msgstr "Ebeveyn kontrolü" - -msgid "Partition" -msgstr "Bölüm" - -msgid "Password" -msgstr "Parola" - -msgid "Password Changed" -msgstr "Parola degiştirildi" - -msgid "Password has been changed" -msgstr "Parola değiştirildi" - -msgid "Patch Country Strings" -msgstr "Ülke İsimlerini Yamala" - -msgid "Path Changed" -msgstr "" - -msgid "Permission denied." -msgstr "" - -msgid "Pick from a list" -msgstr "Listeden seç" - -msgid "Play Count" -msgstr "Oynama Sayısı" - -msgid "Play Next" -msgstr "" - -msgid "Play Once" -msgstr "" - -msgid "Play Previous" -msgstr "" - -msgid "Playing Music:" -msgstr "" - -msgid "Please wait..." -msgstr "Lütfen bekleyin.." - -msgid "Power off the Wii" -msgstr "Wii'yi kapat" - -msgid "Prev" -msgstr "Önceki" - -msgid "Prompts Buttons" -msgstr "Hız ve Butonlar" - -msgid "Published by" -msgstr "Yayıncı" - -msgid "Quick Boot" -msgstr "Hızlı Başlatma" - -msgid "Random Directory Music" -msgstr "" - -msgid "Reading WAD data... Ok!" -msgstr "Wad verisi okunuyor..OK!" - -msgid "Receiving file from:" -msgstr "Dosyanın alındığı yer:" - -msgid "Region Patch" -msgstr "" - -msgid "Released" -msgstr "Çıktı" - -msgid "Reload SD" -msgstr "SD'yi yeniden yükle" - -msgid "Remove update" -msgstr "" - -msgid "Rename Game on WBFS" -msgstr "WBFS'deki oyunu yeniden isimlendir" - -msgid "Reset" -msgstr "" - -msgid "Reset BG Music" -msgstr "" - -msgid "Reset Playcounter" -msgstr "Sayacı sıfırla" - -msgid "Reset to default BGM?" -msgstr "" - -msgid "Restarting..." -msgstr "Yeniden başlatılıyor" - -msgid "Return" -msgstr "Dönüş" - -msgid "Return To" -msgstr "" - -msgid "Return to Wii Menu" -msgstr "Wii Menü ye Dön" - -msgid "Right" -msgstr "Sağ" - -msgid "Rumble" -msgstr "Titreşim" - -msgid "SChinese" -msgstr "Basitleştirilmis Çince" - -msgid "SFX Volume" -msgstr "Efekt Seviyesi" - -msgid "Save" -msgstr "Kaydet" - -msgid "Save Failed. No device inserted?" -msgstr "" - -msgid "Save Game List to" -msgstr "Oyun Listesini kaydet" - -msgid "Save List" -msgstr "" - -msgid "Saved" -msgstr "Kaydedildi" - -msgid "Screensaver" -msgstr "Ekran Koruyucu" - -msgid "Select" -msgstr "Seç" - -msgid "Select DOL Offset" -msgstr "" - -msgid "Select a DOL" -msgstr "Bir DOL seç" - -msgid "Select a DOL from Game" -msgstr "" - -msgid "Sept" -msgstr "Eyl" - -msgid "Set Search-Filter" -msgstr "Arama Filtresi Ayarla" - -msgid "Settings" -msgstr "Ayarlar" - -msgid "Show Free Space" -msgstr "" - -msgid "Shutdown System" -msgstr "Sistemi Kapat" - -msgid "Shutdown Wii" -msgstr "" - -msgid "Sort alphabetically" -msgstr "Alfabetik Diz" - -msgid "Sort by number of players" -msgstr "" - -msgid "Sort by rank" -msgstr "Puana göre diz" - -msgid "Sort order by most played" -msgstr "En çok oynanana göre diz" - -msgid "Sound" -msgstr "Ses" - -msgid "Sound Settings" -msgstr "" - -msgid "Sound+BGM" -msgstr "Ses+BGM" - -msgid "Sound+Quiet" -msgstr "Ses+Quiet" - -msgid "Spanish" -msgstr "Ispanyolca" - -msgid "Special thanks to:" -msgstr "Özel tesekkürler" - -msgid "Split each 2GB" -msgstr "" - -msgid "Split each 4GB" -msgstr "" - -msgid "Standby" -msgstr "" - -msgid "Success" -msgstr "Başarılı" - -msgid "Success:" -msgstr "Başarılı:" - -msgid "Successfully Saved" -msgstr "Başarıyla Kaydedildi" - -msgid "Successfully Updated" -msgstr "Başarıyla Güncellendi" - -msgid "Successfully Updated thanks to www.techjawa.com" -msgstr "" - -msgid "Successfully deleted:" -msgstr "Başarıyla silindi:" - -msgid "Successfully extracted theme." -msgstr "Tema başarıyla çıkarıldı." - -msgid "Successfully installed:" -msgstr "Başarıyla kuruldu:" - -msgid "Sync FAT32 FS Info" -msgstr "" - -msgid "Synchronizing..." -msgstr "" - -msgid "System Default" -msgstr "Sistem Varsayılanı" - -msgid "TChinese" -msgstr "Geleneksel Çince" - -msgid "TXT Cheatcodes Path" -msgstr "TXT Hile Yolu" - -msgid "The .them file was not found in the zip." -msgstr "" - -msgid "The entered directory does not exist. Would you like to create it?" -msgstr "Girilen klasör mevcut değil. Oluşturmak ister misin?" - -msgid "The game installation is disabled under this IOS because of instability in usb write." -msgstr "" - -msgid "The wad file was installed" -msgstr "" - -#, c-format -msgid "The wad installation failed with error %i" -msgstr "" - -msgid "Theme Downloader" -msgstr "Tema İndirici" - -msgid "Theme Menu" -msgstr "" - -msgid "Theme Path" -msgstr "Tema Yolu" - -msgid "Theme Title:" -msgstr "Tema Başlığı:" - -msgid "Themes by www.spiffy360.com" -msgstr "" - -msgid "This IOS is the BootMii ios. If you are sure it is not BootMii and you have something else installed there than ignore this warning." -msgstr "" - -msgid "This IOS was not found on the titles list. If you are sure you have it installed than ignore this warning." -msgstr "" - -msgid "Time left:" -msgstr "Kalan zaman:" - -msgid "Title Launcher" -msgstr "Başlık Başlatıcı" - -msgid "Titles from WiiTDB" -msgstr "WiiTDB deki Başlıklar" - -msgid "Tooltips" -msgstr "Yardımlar" - -msgid "Transfer failed" -msgstr "" - -msgid "USB Device not found" -msgstr "USB Aygıtı bulunamadı" - -msgid "USB Loader GX is protected" -msgstr "USB Loader GX koruma altında" - -msgid "USB Port" -msgstr "" - -msgid "USB Port changing is only supported on Hermes cIOS." -msgstr "" - -msgid "Uninstall" -msgstr "Kaldır" - -msgid "Uninstall Game" -msgstr "Oyun Kaldır" - -msgid "Uninstall Menu" -msgstr "Kaldırma Menüsü" - -msgid "Uninstall all" -msgstr "" - -msgid "Uninstalling wad" -msgstr "Wad Kaldırılıyor" - -msgid "Unknown" -msgstr "" - -msgid "Unlock USB Loader GX" -msgstr "" - -msgid "Unlocked" -msgstr "Kilit açıldı" - -msgid "Unsupported format, try to extract manually TempTheme.zip." -msgstr "" - -msgid "Update" -msgstr "Güncelleme" - -msgid "Update All" -msgstr "Hepsini Güncelle" - -msgid "Update DOL" -msgstr "DOL Güncelle" - -msgid "Update Files" -msgstr "Dosyaları Güncelle" - -msgid "Update Path" -msgstr "Güncelleme Yolu" - -msgid "Update all Language Files" -msgstr "Tüm Dil Dosyalarını Güncelle" - -msgid "Update failed" -msgstr "Güncelleme başarısız" - -msgid "Update successfull" -msgstr "" - -msgid "Updating Language Files:" -msgstr "Güncellenen Dil Dosyaları:" - -msgid "Uploaded ZIP file installed to homebrew directory." -msgstr "ZIp dosyası homebrew klasörüne kuruldu" - -msgid "VIDTV Patch" -msgstr "VIDTV Yaması" - -msgid "Version:" -msgstr "" - -#, c-format -msgid "Version: %s" -msgstr "Vesiyon: %s" - -msgid "Video Mode" -msgstr "Video Modu" - -msgid "WDM Files Path" -msgstr "" - -msgid "WIP Patches Path" -msgstr "" - -msgid "Waiting..." -msgstr "Beklemede..." - -msgid "Warning:" -msgstr "" - -msgid "What do you want to update?" -msgstr "Neyi güncelleme istiyorsun?" - -msgid "What should be deleted for this game title:" -msgstr "" - -msgid "WiFi Features" -msgstr "WiFi Özellikleri" - -msgid "Widescreen Fix" -msgstr "Genişekran Çözümü" - -msgid "Wii Menu" -msgstr "Wii Menü" - -msgid "Wii Settings" -msgstr "Wii Ayarları" - -msgid "WiiTDB Files" -msgstr "WiiTDB Dosyaları" - -msgid "WiiTDB Path" -msgstr "WiiTDB Yaması" - -msgid "WiiTDB is up to date." -msgstr "" - -msgid "Wiilight" -msgstr "" - -msgid "Wrong Password" -msgstr "Yanlış Parola" - -msgid "Yes" -msgstr "Evet" - -msgid "You are currently using IOS" -msgstr "" - -msgid "You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk." -msgstr "" - -msgid "You need to select or format a partition" -msgstr "Bir bölüm seçmeniz ya da formatlamanız gerekiyor" - -msgid "and translators for language files updates" -msgstr "" - -msgid "available" -msgstr "mevcut" - -msgid "does not exist!" -msgstr "oluşturulmamış!" - -msgid "does not exist! Loading game without cheats." -msgstr "oluşturulmamış! Oyun hileler olmadan yükleniyor" - -msgid "files left" -msgstr "dosyalar kaldı" - -msgid "for FAT/NTFS support" -msgstr "" - -msgid "for Ocarina" -msgstr "Ocarina için" - -msgid "for WiiTDB and hosting covers / disc images" -msgstr "WiiTDB ve kapak/disk resimlerini sunduğu için" - -msgid "for diverse patches" -msgstr "çeşitli yamalar için" - -msgid "for his awesome tool LibWiiGui" -msgstr "LibWiiGui awesome tool için" - -msgid "for hosting the themes" -msgstr "tema sunucusu icin" - -msgid "for hosting the update files" -msgstr "güncelleme dosyalarını sunduğu için" - -msgid "for the USB Loader source" -msgstr "USB Loader kaynak kodu için" - -msgid "formatted!" -msgstr "biçimlendirildi!" - -msgid "free" -msgstr "boş" - -msgid "not set" -msgstr "ayarlanmadı" - -msgid "of" -msgstr "./" - -msgid "seconds left" -msgstr "saniye kaldı" - -#~ msgid "Author:" -#~ msgstr "Yazar:" - -#~ msgid "Download Boxart image?" -#~ msgstr "Kutu resmi indirilsin mi?" - -#~ msgid "Download Discart image?" -#~ msgstr "Disk resmi indirilsin mi?" - -#~ msgid "Downloading file" -#~ msgstr "Indirilen dosya" - -#~ msgid "Missing files" -#~ msgstr "Kayıp dosyalar" - -#~ msgid "files not found on the server!" -#~ msgstr "dosyalar sunucuda bulunamadı!" - -#~ msgid "Disc Images" -#~ msgstr "Disk Resimleri" - -#~ msgid "Only Customs" -#~ msgstr "Sadece Kişiseller" - -#~ msgid "Only Original" -#~ msgstr "Sadece Orjinal" - -#~ msgid "Do you really want to delete:" -#~ msgstr "Gerçekten silmek istiyor musunuz:" - -#~ msgid "Do you want to use the alternate DOL that is known to be correct?" -#~ msgstr "Doğru olduğu bilinen alternatif DOL ü kullanmak ister misiniz?" - -#~ msgid "Unlock console to use this option." -#~ msgstr "Bu seçeneği kullanmak için konsol kilidini açın" - -#~ msgid "Full Shutdown" -#~ msgstr "Tam Kapama" - -#~ msgid "If you don't have WiFi, press 1 to get an URL to get your WiiTDB.zip" -#~ msgstr "Eğer WiFi yoksa, WiiTDB.zip dosyasını alabileceğiniz URL için 1'e basın" - -#~ msgid "Paste it into your browser to get your WiiTDB.zip." -#~ msgstr "WiiTDP.zip için bu adresi tarayıcıya yapıştırın" - -#~ msgid "Shutdown to Idle" -#~ msgstr "Sistemi Beklemeye Al" - -#~ msgid "Your URL has been saved in %sWiiTDB_URL.txt." -#~ msgstr "URL %sWiiTDB_URL.txt dosyasına kaydedildi" - -#~ msgid "Can't create file" -#~ msgstr "Dosya oluşturulamıyor" - -#~ msgid "Download failed." -#~ msgstr "İndirme başarısız" - -#~ msgid "Download request failed." -#~ msgstr "İndirme isteği başarısız" - -#~ msgid "Downloading Page List:" -#~ msgstr "İndirilen Sayfa Listesi:" - -#~ msgid "Theme Download Path" -#~ msgstr "Tema İndirme Yolu" - -#~ msgid "Transfer failed." -#~ msgstr "Transfer başarısız" - -#~ msgid "Unsupported format, try to extract manually." -#~ msgstr "Desteklenmeyen format,elle çıkartmayı deneyin" - -#~ msgid "and translaters for language files updates" -#~ msgstr "ve dil dosya güncellemelerinin çevirmenleri" - -#~ msgid "Insert an SD-Card to save." -#~ msgstr "Kaydedebilmek için SD takın." - -#~ msgid "Insert an SD-Card to use this option." -#~ msgstr "Bu seçeneği kullanmak için SD takın." - -#~ msgid "No SD-Card inserted!" -#~ msgstr "SD-Card takılı değil!" - -#~ msgid "Waiting for USB Device" -#~ msgstr "USB Aygıtı için Bekleniyor" - -#~ msgid "Back to Loader" -#~ msgstr "Yükleyiciye dönüş" - -#~ msgid "FAT: Use directories" -#~ msgstr "FAT: Klasörleri kullanın" - -#~ msgid "An Error occured" -#~ msgstr "Bir Hata oluştu" - -#~ msgid "AutoPatch" -#~ msgstr "OtoYama" - -#~ msgid "Checking for Updates" -#~ msgstr "Güncellemeler kontrol ediliyor" - -#~ msgid "Downloading" -#~ msgstr "Indiriliyor" - -#~ msgid "The wad file was installed. But It could not be deleted from the SD card." -#~ msgstr "Wad dosyası kuruldu. Fakat SD den silinemedi" - -#~ msgid "The wad installation failed with error %ld" -#~ msgstr "Wad kurulumu %ld hatasıyla başarısız oldu" - -#~ msgid "Unable to open the wad that was just downloaded (%s)." -#~ msgstr "Az önce indirilen wad açılamıyor(%s)" - -#~ msgid "Update to" -#~ msgstr "Güncellenecek" - -#~ msgid "Updating" -#~ msgstr "Güncelleniyor" - -#~ msgid "Updating Language Files..." -#~ msgstr "Dil Dosyaları Güncelleniyor..." - -#~ msgid "Updating WiiTDB.zip" -#~ msgstr "WiiTDB.zip güncelleniyor" - -#~ msgid "%s : %s May not boot correctly if your System Menu is not up to date." -#~ msgstr "%s: Sisteminiz güncel değil %s doğru şekilde başlatılamayabilir" - -#~ msgid "BCA Codes Path changed" -#~ msgstr "BCA Kod Yolu değişti" - -#~ msgid "Back to Wii Menu" -#~ msgstr "Wii Menüye dönüş" - -#~ msgid "Channels" -#~ msgstr "Kanallar" - -#~ msgid "Checking existing artwork" -#~ msgstr "Hazır görsel kontrol ediliyor" - -#~ msgid "Confirm" -#~ msgstr "Onayla" - -#~ msgid "Could not find a WBFS partition." -#~ msgstr "WBFS bölümü bulunamadı" - -#~ msgid "Could not open WBFS partition" -#~ msgstr "WBFS bölümü açılamadı" - -#~ msgid "Could not read the disc." -#~ msgstr "Disk okunamadı" - -#~ msgid "Could not set USB." -#~ msgstr "USB ayarlanamadı" - -#~ msgid "Cover Path Changed" -#~ msgstr "Kapak Yolu Değiştir" - -#~ msgid "DOL path changed" -#~ msgstr "DOL yolu değiştirildi" - -#~ msgid "Disc Path Changed" -#~ msgstr "Disk Yolu Değiştirildi" - -#~ msgid "Display favorites" -#~ msgstr "Görüntü favorileri" - -#~ msgid "Do you want to retry for 30 secs?" -#~ msgstr "30 saniye sonra denemek ister misiniz?" - -#~ msgid "Force" -#~ msgstr "Zorla" - -#~ msgid "GCT Cheatcodes Path changed" -#~ msgstr "GCT Hile Yolu değiştirildi" - -#~ msgid "Homebrew Appspath changed" -#~ msgstr "Homebrew Yazılım Yolu değişti" - -#~ msgid "Insert an SD-Card to download images." -#~ msgstr "Resimleri indirebilmek için SD takın." - -#~ msgid "Most likely it has dimensions that are not evenly divisible by 4." -#~ msgstr "Muhtemelen 4 ile tam bölünemeyen boyutları var." - -#~ msgid "Network init error" -#~ msgstr "Ag baslatma hatasi" - -#~ msgid "No .dol or .elf files found." -#~ msgstr ".dol veya .elf dosyası bulunamadı" - -#~ msgid "No Favorites" -#~ msgstr "Hiç Favori yok" - -#~ msgid "No USB Device" -#~ msgstr "USB Aygıtı yok" - -#~ msgid "No USB Device found." -#~ msgstr "USB Aygıtı bulunamadı" - -#~ msgid "Normal Covers" -#~ msgstr "Normal Kapaklar" - -#~ msgid "Not Found" -#~ msgstr "Bulunamadı" - -#~ msgid "Not a DOL/ELF file." -#~ msgstr "DOL/ELF dosyası değil" - -#~ msgid "Save Failed" -#~ msgstr "Kaydedilemedi" - -#~ msgid "Selected DOL" -#~ msgstr "Seçilen DOL" - -#~ msgid "Standard" -#~ msgstr "Standart" - -#~ msgid "TXT Cheatcodes Path changed" -#~ msgstr "TXT Hile Yolu değiştirildi" - -#~ msgid "Theme Download Path changed" -#~ msgstr "Tema İndirme Yolu değişti" - -#~ msgid "Theme Path Changed" -#~ msgstr "Tema Yolu Değişti" - -#~ msgid "USB Loader GX will only run with Hermes CIOS rev 4! Please make sure you have revision 4 installed!" -#~ msgstr "USB Loader GX sadece Hermes CIOS rev4 ile çalışır! Lütfen rev4 ün yüklü olduğundan emin olun!" - -#~ msgid "Update Path changed." -#~ msgstr "Güncelleme yolu değiştirildi." - -#~ msgid "WiiTDB Path changed." -#~ msgstr "WiiTDB Yolu değişti" - -#~ msgid "You are about to delete " -#~ msgstr "Silmek üzeresiniz" - -#~ 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" - -#~ msgid "You have attempted to load a bad image" -#~ msgstr "Bozuk bir resim yüklemeye çalıştın" - -#~ msgid "does not exist! You Messed something up, Idiot." -#~ msgstr "oluşturulmamış! Saçmaladın, mal." - -#~ msgid "file left" -#~ msgstr "dosya kaldı" diff --git a/Make.config.default b/Make.config.default deleted file mode 100644 index 63e7993a..00000000 --- a/Make.config.default +++ /dev/null @@ -1,12 +0,0 @@ -# -# to use this file rename Make.config.default to Make.config -# or create a new Make.config -# -# you can here add defines -# -# in example i have included a switch to diseble -# the gecko-debug stuff. so also in source gecko.c+gecko.h -# -# NOTE when add, remove or change a define here then a "make clean" is needed -# -CFLAGS += -DNO_DEBUG DDEBUG_WBFS diff --git a/Makefile b/Makefile deleted file mode 100644 index 989da6ae..00000000 --- a/Makefile +++ /dev/null @@ -1,281 +0,0 @@ -#--------------------------------------------------------------------------------- -# Clear the implicit built in rules -#--------------------------------------------------------------------------------- -.SUFFIXES: -#--------------------------------------------------------------------------------- -ifeq ($(strip $(DEVKITPPC)),) -$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=devkitPPC") -endif - -include $(DEVKITPPC)/wii_rules -#--------------------------------------------------------------------------------- -# TARGET is the name of the output -# BUILD is the directory where object files & intermediate files will be placed -# SOURCES is a list of directories containing source code -# INCLUDES is a list of directories containing extra header files -#--------------------------------------------------------------------------------- -TARGET := boot -BUILD := build -SOURCES := source \ - source/libwiigui \ - source/images \ - source/fonts \ - source/sounds \ - source/Controls \ - source/system \ - source/libs/libwbfs \ - source/language \ - source/mload \ - source/mload/modules \ - source/patches \ - source/usbloader \ - source/xml \ - source/network \ - source/settings \ - source/settings/menus \ - source/prompts \ - source/wad \ - source/banner \ - source/BoxCover \ - source/cheats \ - source/homebrewboot \ - source/themes \ - source/menu \ - source/memory \ - source/FileOperations \ - source/ImageOperations \ - source/SoundOperations \ - source/utils \ - source/utils/minizip \ - source/usbloader/wbfs -DATA := data -INCLUDES := source - -#--------------------------------------------------------------------------------- -# options for code generation -#--------------------------------------------------------------------------------- - -CFLAGS = -g -O3 -Wall -Wno-multichar -Wno-unused-parameter -Wextra $(MACHDEP) $(INCLUDE) -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 --include $(PROJECTDIR)/Make.config - -#--------------------------------------------------------------------------------- -# any extra libraries we wish to link with the project -#--------------------------------------------------------------------------------- -LIBS := -lpngu -lpng -lgd -lm -lz -lwiiuse -lbte -lasnd -logc -lfreetype -lvorbisidec \ - -lmad -lmxml -ljpeg -lzip -lcustomfat -lcustomntfs -lcustomext2fs -#--------------------------------------------------------------------------------- -# list of directories containing libraries, this must be the top level containing -# include and lib -#--------------------------------------------------------------------------------- -LIBDIRS := $(DEVKITPPC)/lib $(CURDIR) -#--------------------------------------------------------------------------------- -# no real need to edit anything past this point unless you need to add additional -# rules for different file extensions -#--------------------------------------------------------------------------------- -ifneq ($(BUILD),$(notdir $(CURDIR))) -#--------------------------------------------------------------------------------- -export PROJECTDIR := $(CURDIR) -export OUTPUT := $(CURDIR)/$(TARGETDIR)/$(TARGET) -export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \ - $(foreach dir,$(DATA),$(CURDIR)/$(dir)) -export DEPSDIR := $(CURDIR)/$(BUILD) - -#--------------------------------------------------------------------------------- -# automatically build a list of object files for our project -#--------------------------------------------------------------------------------- -SVNREV := $(shell bash ./svnrev.sh) -export CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) -export CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) -sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) -SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S))) -ELFFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.elf))) -BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.bin))) -TTFFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.ttf))) -PNGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.png))) -OGGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.ogg))) -PCMFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pcm))) -WAVFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.wav))) -DOLFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.dol))) -MP3FILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.mp3))) - -#--------------------------------------------------------------------------------- -# use CXX for linking C++ projects, CC for standard C -#--------------------------------------------------------------------------------- -ifeq ($(strip $(CPPFILES)),) - export LD := $(CC) -else - export LD := $(CXX) -endif - -export OFILES := $(addsuffix .o,$(BINFILES)) \ - $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \ - $(sFILES:.s=.o) $(SFILES:.S=.o) \ - $(TTFFILES:.ttf=.ttf.o) $(PNGFILES:.png=.png.o) $(addsuffix .o,$(DOLFILES))\ - $(OGGFILES:.ogg=.ogg.o) $(PCMFILES:.pcm=.pcm.o) $(MP3FILES:.mp3=.mp3.o) \ - $(WAVFILES:.wav=.wav.o) $(addsuffix .o,$(ELFFILES)) $(CURDIR)/data/magic_patcher.o - -#--------------------------------------------------------------------------------- -# build a list of include paths -#--------------------------------------------------------------------------------- -export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ - $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ - -I$(CURDIR)/$(BUILD) \ - -I$(LIBOGC_INC) - -#--------------------------------------------------------------------------------- -# build a list of library paths -#--------------------------------------------------------------------------------- -export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) -L$(CURDIR)/source/libs/libfat/ \ - -L$(CURDIR)/source/libs/libntfs/ -L$(CURDIR)/source/libs/libext2fs/ \ - -L$(LIBOGC_LIB) - -export OUTPUT := $(CURDIR)/$(TARGET) -.PHONY: $(BUILD) lang all clean - -#--------------------------------------------------------------------------------- -$(BUILD): - @[ -d $@ ] || mkdir -p $@ - @/bin/bash ./buildtype.sh - @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile -# @echo debug... -# start geckoreader.exe - -channel: - @[ -d build ] || mkdir -p build - @/bin/bash ./buildtype.sh FULLCHANNEL - @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile - -#--------------------------------------------------------------------------------- -lang: - @[ -d build ] || mkdir -p build - @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile language - -#--------------------------------------------------------------------------------- -theme: - @[ -d build ] || mkdir -p build - @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile language - -#--------------------------------------------------------------------------------- -all: - @[ -d build ] || mkdir -p build - @./buildtype.sh - @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile - @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile language - -#--------------------------------------------------------------------------------- -clean: - @echo clean ... - @rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol -#--------------------------------------------------------------------------------- -run: - $(MAKE) - @echo Done building ... - @echo Now Run That Shit ... - - wiiload $(OUTPUT).dol - -#--------------------------------------------------------------------------------- -reload: - wiiload -r $(OUTPUT).dol - -#--------------------------------------------------------------------------------- -release: - $(MAKE) - cp boot.dol ./hbc/boot.dol - - -#--------------------------------------------------------------------------------- -else - -DEPENDS := $(OFILES:.o=.d) - -#--------------------------------------------------------------------------------- -# main targets -#--------------------------------------------------------------------------------- -$(OUTPUT).dol: $(OUTPUT).elf -$(OUTPUT).elf: $(OFILES) - -language: $(wildcard $(PROJECTDIR)/Languages/*.lang) $(wildcard $(PROJECTDIR)/Themes/*.them) -#--------------------------------------------------------------------------------- -# This rule links in binary data with .ttf, .png, and .mp3 extensions -#--------------------------------------------------------------------------------- - -%.elf.o : %.elf - @echo $(notdir $<) - @bin2s -a 32 $< | $(AS) -o $(@) - -%.dol.o : %.dol - @echo $(notdir $<) - @bin2s -a 32 $< | $(AS) -o $(@) - -%.ttf.o : %.ttf - @echo $(notdir $<) - @bin2s -a 32 $< | $(AS) -o $(@) - -%.png.o : %.png - @echo $(notdir $<) - @bin2s -a 32 $< | $(AS) -o $(@) - -%.ogg.o : %.ogg - @echo $(notdir $<) - @bin2s -a 32 $< | $(AS) -o $(@) - -%.pcm.o : %.pcm - @echo $(notdir $<) - @bin2s -a 32 $< | $(AS) -o $(@) - -%.wav.o : %.wav - @echo $(notdir $<) - @bin2s -a 32 $< | $(AS) -o $(@) - -%.mp3.o : %.mp3 - @echo $(notdir $<) - @bin2s -a 32 $< | $(AS) -o $(@) - -%.certs.o : %.certs - @echo $(notdir $<) - @bin2s -a 32 $< | $(AS) -o $(@) - -%.dat.o : %.dat - @echo $(notdir $<) - @bin2s -a 32 $< | $(AS) -o $(@) - -%.bin.o : %.bin - @echo $(notdir $<) - @bin2s -a 32 $< | $(AS) -o $(@) - -%.tik.o : %.tik - @echo $(notdir $<) - @bin2s -a 32 $< | $(AS) -o $(@) - -%.tmd.o : %.tmd - @echo $(notdir $<) - @bin2s -a 32 $< | $(AS) -o $(@) - - - -export PATH := $(PROJECTDIR)/gettext-bin:$(PATH) - -%.pot: $(CFILES) $(CPPFILES) - @echo Updating Languagefiles ... - @touch $(PROJECTDIR)/Languages/$(TARGET).pot - @xgettext -C -cTRANSLATORS --from-code=utf-8 --sort-output --no-wrap --no-location -ktr -ktrNOOP -o$(PROJECTDIR)/Languages/$(TARGET).pot -p $@ $^ - @echo Updating Themefiles ... - @touch $(PROJECTDIR)/Themes/$(TARGET).pot - @xgettext -C -cTRANSLATORS --from-code=utf-8 -F --no-wrap --add-location -kthInt -kthColor -kthAlign -o$(PROJECTDIR)/Themes/$(TARGET).pot -p $@ $^ - -%.lang: $(PROJECTDIR)/Languages/$(TARGET).pot - @msgmerge -U -N --no-wrap --no-location --backup=none -q $@ $< - @touch $@ - -%.them: $(PROJECTDIR)/Themes/$(TARGET).pot - @msgmerge -U -N --no-wrap --no-location --backup=none -q $@ $< - @touch $@ - --include $(DEPENDS) - -#--------------------------------------------------------------------------------- -endif -#--------------------------------------------------------------------------------- diff --git a/Themes/Default.them b/Themes/Default.them deleted file mode 100644 index bfb36e91..00000000 --- a/Themes/Default.them +++ /dev/null @@ -1,431 +0,0 @@ -# USB Loader GX theme source file. -# don't delete/change this line (é). -# ONLY the value before the '-' char needs to be entered in msgstr "" -# not the complete text. -# It is important that the image folder is defined for the images to load. -# The image folder should be in the same folder as the .them file and include the theme images. -msgid "" -msgstr "" -"Project-Id-Version: USB Loader GX\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-01-20 15:51+0100\n" -"PO-Revision-Date: 2009-10-01 01:00+0200\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Theme-Title: Example\n" -"Image-Folder: Example\n" -"Last-Themer: Example\n" -"Theme-Team: Example\n" -"Theme-Version: Example\n" - -msgid "r=0 g=0 b=0 a=255 - prompt windows text color" -msgstr "" - -msgid "r=0 g=0 b=0 a=255 - settings text color" -msgstr "" - -msgid "9 - game list browser page size" -msgstr "" - -msgid "r=0 g=0 b=0 a=255 - game browser list text color" -msgstr "" - -msgid "r=0 g=0 b=0 a=255 - game browser list text color over" -msgstr "" - -msgid "left - carousel layout left arrow align hor" -msgstr "" - -msgid "top - carousel layout left arrow align ver" -msgstr "" - -msgid "20 - carousel layout left arrow pos x" -msgstr "" - -msgid "65 - carousel layout left arrow pos y" -msgstr "" - -msgid "right - carousel layout right arrow align hor" -msgstr "" - -msgid "top - carousel layout right arrow align ver" -msgstr "" - -msgid "-20 - carousel layout right arrow pos x" -msgstr "" - -msgid "65 - carousel layout right arrow pos y" -msgstr "" - -msgid "r=55 g=190 b=237 a=255 - carousel game name text color" -msgstr "" - -msgid "0 - game grid layout pos x" -msgstr "" - -msgid "20 - game grid layout pos y" -msgstr "" - -msgid "255 - tooltip alpha" -msgstr "" - -msgid "r=55 g=190 b=237 a=255 - hdd info color" -msgstr "" - -msgid "center - hdd info align hor" -msgstr "" - -msgid "top - hdd info align ver" -msgstr "" - -msgid "0 - hdd info pos x" -msgstr "" - -msgid "400 - hdd info pos y" -msgstr "" - -msgid "r=55 g=190 b=237 a=255 - game count color" -msgstr "" - -msgid "center - game count align hor" -msgstr "" - -msgid "top - game count align ver" -msgstr "" - -msgid "0 - game count pos x" -msgstr "" - -msgid "420 - game count pos y" -msgstr "" - -msgid "16 - install btn pos x" -msgstr "" - -msgid "355 - install btn pos y" -msgstr "" - -msgid "371 - settings btn pos y" -msgstr "" - -msgid "64 - settings btn pos x" -msgstr "" - -msgid "371 - home menu btn pos y" -msgstr "" - -msgid "489 - home menu btn pos x" -msgstr "" - -msgid "355 - power off btn pos y" -msgstr "" - -msgid "576 - power off btn pos x" -msgstr "" - -msgid "160 - sd card btn pos x" -msgstr "" - -msgid "395 - sd card btn pos y" -msgstr "" - -msgid "405 - HBC btn pos y" -msgstr "" - -msgid "410 - HBC btn pos x" -msgstr "" - -msgid "26 - cover/download btn pos x" -msgstr "" - -msgid "58 - cover/download btn pos y" -msgstr "" - -msgid "305 - gameID btn pos y" -msgstr "" - -msgid "68 - gameID btn pos x" -msgstr "" - -msgid "r=138 g=138 b=138 a=240 - clock color" -msgstr "" - -msgid "left - clock align hor" -msgstr "" - -msgid "top - clock align ver" -msgstr "" - -msgid "275 - clock pos x" -msgstr "" - -msgid "335 - clock pos y" -msgstr "" - -msgid "260 - list layout favorite btn pos x" -msgstr "" - -msgid "288 - list layout favorite btn pos x widescreen" -msgstr "" - -msgid "13 - list layout favorite btn pos y" -msgstr "" - -msgid "300 - list layout search btn pos x" -msgstr "" - -msgid "320 - list layout search btn pos x widescreen" -msgstr "" - -msgid "13 - list layout search btn pos y" -msgstr "" - -msgid "340 - list layout abc/sort btn pos x" -msgstr "" - -msgid "352 - list layout abc/sort btn pos x widescreen" -msgstr "" - -msgid "13 - list layout abc/sort btn pos y" -msgstr "" - -msgid "380 - list layout list btn pos x" -msgstr "" - -msgid "384 - list layout list btn pos x widescreen" -msgstr "" - -msgid "13 - list layout list btn pos y" -msgstr "" - -msgid "416 - list layout grid btn pos x widescreen" -msgstr "" - -msgid "420 - list layout grid btn pos x" -msgstr "" - -msgid "13 - list layout grid btn pos y" -msgstr "" - -msgid "448 - list layout carousel btn pos x widescreen" -msgstr "" - -msgid "460 - list layout carousel btn pos x" -msgstr "" - -msgid "13 - list layout carousel btn pos y" -msgstr "" - -msgid "480 - list layout lock btn pos x widescreen" -msgstr "" - -msgid "500 - list layout lock btn pos x" -msgstr "" - -msgid "13 - list layout lock btn pos y" -msgstr "" - -msgid "512 - list layout dvd btn pos x widescreen" -msgstr "" - -msgid "540 - list layout dvd btn pos x" -msgstr "" - -msgid "13 - list layout dvd btn pos y" -msgstr "" - -msgid "280 - game list layout height" -msgstr "" - -msgid "396 - game list layout width" -msgstr "" - -msgid "200 - game list layout pos x" -msgstr "" - -msgid "49 - game list layout pos y" -msgstr "" - -msgid "200 - grid layout favorite btn pos x" -msgstr "" - -msgid "224 - grid layout favorite btn pos x widescreen" -msgstr "" - -msgid "13 - grid layout favorite btn pos y" -msgstr "" - -msgid "240 - grid layout search btn pos x" -msgstr "" - -msgid "256 - grid layout search btn pos x widescreen" -msgstr "" - -msgid "13 - grid layout search btn pos y" -msgstr "" - -msgid "280 - grid layout abc/sort btn pos x" -msgstr "" - -msgid "288 - grid layout abc/sort btn pos x widescreen" -msgstr "" - -msgid "13 - grid layout abc/sort btn pos y" -msgstr "" - -msgid "320 - grid layout list btn pos x" -msgstr "" - -msgid "320 - grid layout list btn pos x widescreen" -msgstr "" - -msgid "13 - grid layout list btn pos y" -msgstr "" - -msgid "352 - grid layout grid btn pos x widescreen" -msgstr "" - -msgid "360 - grid layout grid btn pos x" -msgstr "" - -msgid "13 - grid layout grid btn pos y" -msgstr "" - -msgid "384 - grid layout carousel btn pos x widescreen" -msgstr "" - -msgid "400 - grid layout carousel btn pos x" -msgstr "" - -msgid "13 - grid layout carousel btn pos y" -msgstr "" - -msgid "416 - grid layout lock btn pos x widescreen" -msgstr "" - -msgid "440 - grid layout lock btn pos x" -msgstr "" - -msgid "13 - grid layout lock btn pos y" -msgstr "" - -msgid "448 - grid layout dvd btn pos x widescreen" -msgstr "" - -msgid "480 - grid layout dvd btn pos x" -msgstr "" - -msgid "13 - grid layout dvd btn pos y" -msgstr "" - -msgid "400 - game grid layout height" -msgstr "" - -msgid "640 - game grid layout width" -msgstr "" - -msgid "200 - carousel layout favorite btn pos x" -msgstr "" - -msgid "224 - carousel layout favorite btn pos x widescreen" -msgstr "" - -msgid "13 - carousel layout favorite btn pos y" -msgstr "" - -msgid "240 - carousel layout search btn pos x" -msgstr "" - -msgid "256 - carousel layout search btn pos x widescreen" -msgstr "" - -msgid "13 - carousel layout search btn pos y" -msgstr "" - -msgid "280 - carousel layout abc/sort btn pos x" -msgstr "" - -msgid "288 - carousel layout abc/sort btn pos x widescreen" -msgstr "" - -msgid "13 - carousel layout abc/sort btn pos y" -msgstr "" - -msgid "320 - carousel layout list btn pos x" -msgstr "" - -msgid "320 - carousel layout list btn pos x widescreen" -msgstr "" - -msgid "13 - carousel layout list btn pos y" -msgstr "" - -msgid "352 - carousel layout grid btn pos x widescreen" -msgstr "" - -msgid "360 - carousel layout grid btn pos x" -msgstr "" - -msgid "13 - carousel layout grid btn pos y" -msgstr "" - -msgid "384 - carousel layout carousel btn pos x widescreen" -msgstr "" - -msgid "400 - carousel layout carousel btn pos x" -msgstr "" - -msgid "13 - carousel layout carousel btn pos y" -msgstr "" - -msgid "416 - carousel layout lock btn pos x widescreen" -msgstr "" - -msgid "440 - carousel layout lock btn pos x" -msgstr "" - -msgid "13 - carousel layout lock btn pos y" -msgstr "" - -msgid "448 - carousel layout dvd btn pos x widescreen" -msgstr "" - -msgid "480 - carousel layout dvd btn pos x" -msgstr "" - -msgid "13 - carousel layout dvd btn pos y" -msgstr "" - -msgid "400 - game carousel layout height" -msgstr "" - -msgid "640 - game carousel layout width" -msgstr "" - -msgid "-20 - game carousel layout pos y" -msgstr "" - -msgid "0 - game carousel layout pos x" -msgstr "" - -msgid "1 - show hdd info: 1 for on and 0 for off" -msgstr "" - -msgid "1 - show game count: 1 for on and 0 for off" -msgstr "" - -msgid "r=55 g=190 b=237 a=255 - game id text color" -msgstr "" - -msgid "r=55 g=190 b=237 a=255 - region info text color" -msgstr "" - -msgid "30 - region info text pos y" -msgstr "" - -msgid "68 - region info text pos x" -msgstr "" - -msgid "1 - Enable tooltips: 0 for off and 1 for on" -msgstr "" diff --git a/buildtype.sh b/buildtype.sh deleted file mode 100755 index 22066e27..00000000 --- a/buildtype.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -if [ ! -z "$1" ]; -then - if [ ! -s source/buildtype.h ]; - then - echo "#define $1" > source/buildtype.h - fi -else - if [[ ! -f source/buildtype.h || -s source/buildtype.h ]]; - then - cp /dev/null source/buildtype.h - fi -fi diff --git a/cios_installer.dol b/cios_installer.dol new file mode 100644 index 00000000..25fb6f2c Binary files /dev/null and b/cios_installer.dol differ diff --git a/cios_installer/COPYING b/cios_installer/COPYING new file mode 100644 index 00000000..82fa1daa --- /dev/null +++ b/cios_installer/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/cios_installer/MakeIt.bat b/cios_installer/MakeIt.bat new file mode 100644 index 00000000..0957ed27 --- /dev/null +++ b/cios_installer/MakeIt.bat @@ -0,0 +1,5 @@ + + +make + +pause diff --git a/cios_installer/Makefile b/cios_installer/Makefile new file mode 100644 index 00000000..6b13bcf0 --- /dev/null +++ b/cios_installer/Makefile @@ -0,0 +1,141 @@ +#--------------------------------------------------------------------------------- +# Clear the implicit built in rules +#--------------------------------------------------------------------------------- +.SUFFIXES: +#--------------------------------------------------------------------------------- +ifeq ($(strip $(DEVKITPPC)),) +$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=devkitPPC) +endif + +include $(DEVKITPPC)/wii_rules + +#--------------------------------------------------------------------------------- +# TARGET is the name of the output +# BUILD is the directory where object files & intermediate files will be placed +# SOURCES is a list of directories containing source code +# INCLUDES is a list of directories containing extra header files +#--------------------------------------------------------------------------------- +TARGET := cios_installer +BUILD := build +SOURCES := . +DATA := data +INCLUDES := + +#--------------------------------------------------------------------------------- +# options for code generation +#--------------------------------------------------------------------------------- + +CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE) $(DEBUG) $(ADD_DIP_PLUGIN) +CXXFLAGS = $(CFLAGS) + +LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map + +#--------------------------------------------------------------------------------- +# any extra libraries we wish to link with the project +#--------------------------------------------------------------------------------- +LIBS := -lwiiuse -lbte -lm -lfat -logc -ldb + +#--------------------------------------------------------------------------------- +# list of directories containing libraries, this must be the top level containing +# include and lib +#--------------------------------------------------------------------------------- +LIBDIRS := + +#--------------------------------------------------------------------------------- +# no real need to edit anything past this point unless you need to add additional +# rules for different file extensions +#--------------------------------------------------------------------------------- +ifneq ($(BUILD),$(notdir $(CURDIR))) +#--------------------------------------------------------------------------------- + +export OUTPUT := $(CURDIR)/$(TARGET) + +export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \ + $(foreach dir,$(DATA),$(CURDIR)/$(dir)) + +export DEPSDIR := $(CURDIR)/$(BUILD) + +#--------------------------------------------------------------------------------- +# automatically build a list of object files for our project +#--------------------------------------------------------------------------------- +CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) +CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) +sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) +SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S))) +BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) + +#--------------------------------------------------------------------------------- +# use CXX for linking C++ projects, CC for standard C +#--------------------------------------------------------------------------------- +ifeq ($(strip $(CPPFILES)),) + export LD := $(CC) +else + export LD := $(CXX) +endif + +export OFILES := $(addsuffix .o,$(BINFILES)) \ + $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \ + $(sFILES:.s=.o) $(SFILES:.S=.o) + +#--------------------------------------------------------------------------------- +# build a list of include paths +#--------------------------------------------------------------------------------- +export INCLUDE := $(foreach dir,$(INCLUDES), -iquote $(CURDIR)/$(dir)) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ + -I$(CURDIR)/$(BUILD) \ + -I$(LIBOGC_INC) + +#--------------------------------------------------------------------------------- +# build a list of library paths +#--------------------------------------------------------------------------------- +export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \ + -L$(LIBOGC_LIB) + +export OUTPUT := $(CURDIR)/$(TARGET) +.PHONY: $(BUILD) clean + +#--------------------------------------------------------------------------------- +$(BUILD): + @[ -d $@ ] || mkdir -p $@ + @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile + +#--------------------------------------------------------------------------------- +clean: + @echo clean ... + @rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol + +#--------------------------------------------------------------------------------- +upload: + $(DEVKITPPC)/bin/geckoupload $(TARGET).dol; nanokdp -d /dev/tty.usbserial-GECKUSB0 + +#--------------------------------------------------------------------------------- +else + +DEPENDS := $(OFILES:.o=.d) + +#--------------------------------------------------------------------------------- +# main targets +#--------------------------------------------------------------------------------- +$(OUTPUT).dol: $(OUTPUT).elf +$(OUTPUT).elf: $(OFILES) + +%.certs.o : %.certs + @echo $(notdir $<) + $(bin2o) + +%.elf.o : %.elf + @echo $(notdir $<) + $(bin2o) + +%.bin.o : %.bin + @echo $(notdir $<) + $(bin2o) +%.raw.o : %.raw + @echo $(notdir $<) + $(bin2o) + +-include $(DEPENDS) + +#--------------------------------------------------------------------------------- +endif +#--------------------------------------------------------------------------------- diff --git a/data/haxx.certs b/cios_installer/data/haxx.certs similarity index 100% rename from data/haxx.certs rename to cios_installer/data/haxx.certs diff --git a/cios_installer/data/mload.elf b/cios_installer/data/mload.elf new file mode 100644 index 00000000..0cb41996 Binary files /dev/null and b/cios_installer/data/mload.elf differ diff --git a/cios_installer/debug_printf.h b/cios_installer/debug_printf.h new file mode 100644 index 00000000..c80681a0 --- /dev/null +++ b/cios_installer/debug_printf.h @@ -0,0 +1,7 @@ +#ifndef _DEBUG_PRINTF_H_ +#define _DEBUG_PRINTF_H_ + +void debug_printf(const char *fmt, ...); +void error_debug_printf(const char *fmt, ...); + +#endif diff --git a/cios_installer/elf.h b/cios_installer/elf.h new file mode 100644 index 00000000..1c060628 --- /dev/null +++ b/cios_installer/elf.h @@ -0,0 +1,57 @@ +/* Copyright (C) 2008 Mega Man */ +#ifndef __ELF_H_ +#define __ELF_H_ + +#include "stdint.h" + +/* File header */ +typedef struct Elf32_Ehdr +{ + uint32_t magic; /* Magic number */ + unsigned char info[12]; /* other info */ + uint16_t type; /* Object file type */ + uint16_t machine; /* Architecture */ + uint32_t version; /* Object file version */ + uint32_t entry; /* Entry point virtual address */ + uint32_t phoff; /* Program header table file offset */ + uint32_t shoff; /* Section header table file offset */ + uint32_t flags; /* Processor-specific flags */ + uint16_t ehsize; /* ELF header size in bytes */ + uint16_t phentsize; /* Program header table entry size */ + uint16_t phnum; /* Program header table entry count */ + uint16_t shentsize; /* Section header table entry size */ + uint16_t shnum; /* Section header table entry count */ + uint16_t shstrndx; /* Section header string table index */ +} Elf32_Ehdr_t; + +/* Conglomeration of the identification bytes, for easy testing as a word. */ +#if 0 +/** ELF magic for little endian. */ +#define ELFMAGIC 0x464c457f +#else +/** ELF magic for big endian. */ +#define ELFMAGIC 0x7f454c46 +#endif + +/* Program segment header. */ +typedef struct Elf32_Phdr +{ + uint32_t type; /* type */ + uint32_t offset; /* file offset */ + uint32_t vaddr; /* virtual address */ + uint32_t paddr; /* physical address */ + uint32_t filesz; /* size in file */ + uint32_t memsz; /* size in memory */ + uint32_t flags; /* flags */ + uint32_t align; /* alignment */ +} Elf32_Phdr_t; + +/* Possible values for segment type. */ +#define PT_LOAD 1 /* Loadable program segment */ + +/* Possible values for segment flags. */ +#define PF_X 1 /* executable */ +#define PF_W 2 /* writable */ +#define PF_R 4 /* readable */ + +#endif /* __ELF_H_ */ diff --git a/cios_installer/http.c b/cios_installer/http.c new file mode 100644 index 00000000..b9791672 --- /dev/null +++ b/cios_installer/http.c @@ -0,0 +1,397 @@ +/* http -- http convenience functions + + Copyright (C) 2008 bushing + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, version 2. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +void debug_printf(const char *fmt, ...); + +#include "http.h" + +char *http_host; +u16 http_port; +char *http_path; +u32 http_max_size; + +http_res result; +u32 http_status; +u32 content_length; +u8 *http_data; + +s32 tcp_socket (void) { + s32 s, res; + + s = net_socket (PF_INET, SOCK_STREAM, 0); + if (s < 0) { + debug_printf ("net_socket failed: %d\n", s); + return s; + } + + res = net_fcntl (s, F_GETFL, 0); + if (res < 0) { + debug_printf ("F_GETFL failed: %d\n", res); + net_close (s); + return res; + } + + res = net_fcntl (s, F_SETFL, res | 4); + if (res < 0) { + debug_printf ("F_SETFL failed: %d\n", res); + net_close (s); + return res; + } + + return s; +} + +s32 tcp_connect (char *host, const u16 port) { + struct hostent *hp; + struct sockaddr_in sa; + s32 s, res; + s64 t; + + hp = net_gethostbyname (host); + if (!hp || !(hp->h_addrtype == PF_INET)) { + debug_printf ("net_gethostbyname failed: %d\n", errno); + return errno; + } + + s = tcp_socket (); + if (s < 0) + return s; + + memset (&sa, 0, sizeof (struct sockaddr_in)); + sa.sin_family= PF_INET; + sa.sin_len = sizeof (struct sockaddr_in); + sa.sin_port= htons (port); + memcpy ((char *) &sa.sin_addr, hp->h_addr_list[0], hp->h_length); + + t = gettime (); + while (true) { + if (ticks_to_millisecs (diff_ticks (t, gettime ())) > + TCP_CONNECT_TIMEOUT) { + debug_printf ("tcp_connect timeout\n"); + net_close (s); + + return -ETIMEDOUT; + } + + res = net_connect (s, (struct sockaddr *) &sa, + sizeof (struct sockaddr_in)); + + if (res < 0) { + if (res == -EISCONN) + break; + + if (res == -EINPROGRESS || res == -EALREADY) { + usleep (20 * 1000); + + continue; + } + + debug_printf ("net_connect failed: %d\n", res); + net_close (s); + + return res; + } + + break; + } + + return s; +} + +char * tcp_readln (const s32 s, const u16 max_length, const u64 start_time, const u32 timeout) { + char *buf; + u16 c; + s32 res; + char *ret; + + buf = (char *) malloc (max_length); + + c = 0; + ret = NULL; + while (true) { + if (ticks_to_millisecs (diff_ticks (start_time, gettime ())) > timeout) + break; + + res = net_read (s, &buf[c], 1); + + if ((res == 0) || (res == -EAGAIN)) { + usleep (20 * 1000); + + continue; + } + + if (res < 0) { + debug_printf ("tcp_readln failed: %d\n", res); + + break; + } + + if ((c > 0) && (buf[c - 1] == '\r') && (buf[c] == '\n')) { + if (c == 1) { + ret = strdup (""); + + break; + } + + ret = strndup (buf, c - 1); + + break; + } + + c++; + + if (c == max_length) + break; + } + + free (buf); + return ret; +} + +bool tcp_read (const s32 s, u8 **buffer, const u32 length) { + u8 *p; + u32 step, left, block, received; + s64 t; + s32 res; + + step = 0; + p = *buffer; + left = length; + received = 0; + + t = gettime (); + while (left) { + if (ticks_to_millisecs (diff_ticks (t, gettime ())) > + TCP_BLOCK_RECV_TIMEOUT) { + debug_printf ("tcp_read timeout\n"); + + break; + } + + block = left; + if (block > (32*1024)) + block = (32*1024); + + res = net_read (s, p, block); + + if ((res == 0) || (res == -EAGAIN)) { + usleep (20 * 1000); + + continue; + } + + if (res < 0) { + debug_printf ("net_read failed: %d\n", res); + + break; + } + + received += res; + left -= res; + p += res; + + if ((received / TCP_BLOCK_SIZE) > step) { + t = gettime (); + step++; + } + } + + return left == 0; +} + +bool tcp_write (const s32 s, const u8 *buffer, const u32 length) { + const u8 *p; + u32 step, left, block, sent; + s64 t; + s32 res; + + step = 0; + p = buffer; + left = length; + sent = 0; + + t = gettime (); + while (left) { + if (ticks_to_millisecs (diff_ticks (t, gettime ())) > + TCP_BLOCK_SEND_TIMEOUT) { + + debug_printf ("tcp_write timeout\n"); + break; + } + + block = left; + if (block > 2048) + block = 2048; + + res = net_write (s, p, block); + + if ((res == 0) || (res == -56)) { + usleep (20 * 1000); + continue; + } + + if (res < 0) { + debug_printf ("net_write failed: %d\n", res); + break; + } + + sent += res; + left -= res; + p += res; + + if ((sent / TCP_BLOCK_SIZE) > step) { + t = gettime (); + step++; + } + } + + return left == 0; +} +bool http_split_url (char **host, char **path, const char *url) { + const char *p; + char *c; + + if (strncasecmp (url, "http://", 7)) + return false; + + p = url + 7; + c = strchr (p, '/'); + + if (c[0] == 0) + return false; + + *host = strndup (p, c - p); + *path = strdup (c); + + return true; +} + +bool http_request (const char *url, const u32 max_size) { + int linecount; + if (!http_split_url(&http_host, &http_path, url)) return false; + + http_port = 80; + http_max_size = max_size; + + http_status = 404; + content_length = 0; + http_data = NULL; + + int s = tcp_connect (http_host, http_port); +// debug_printf("tcp_connect(%s, %hu) = %d\n", http_host, http_port, s); + if (s < 0) { + result = HTTPR_ERR_CONNECT; + return false; + } + + char *request = (char *) malloc (1024); + char *r = request; + r += sprintf (r, "GET %s HTTP/1.1\r\n", http_path); + r += sprintf (r, "Host: %s\r\n", http_host); + r += sprintf (r, "Cache-Control: no-cache\r\n\r\n"); + +// debug_printf("request = %s\n", request); + + bool b = tcp_write (s, (u8 *) request, strlen (request)); +// debug_printf("tcp_write returned %d\n", b); + + free (request); + linecount = 0; + + for (linecount=0; linecount < 32; linecount++) { + char *line = tcp_readln (s, 0xff, gettime(), HTTP_TIMEOUT); +// debug_printf("tcp_readln returned %p (%s)\n", line, line?line:"(null)"); + if (!line) { + http_status = 404; + result = HTTPR_ERR_REQUEST; + break; + } + + if (strlen (line) < 1) { + free (line); + line = NULL; + break; + } + + sscanf (line, "HTTP/1.1 %u", &http_status); + sscanf (line, "Content-Length: %u", &content_length); + + free (line); + line = NULL; + + } +// debug_printf("content_length = %d, status = %d, linecount = %d\n", content_length, http_status, linecount); + if (linecount == 32 || !content_length) http_status = 404; + if (http_status != 200) { + result = HTTPR_ERR_STATUS; + net_close (s); + return false; + } + if (content_length > http_max_size) { + result = HTTPR_ERR_TOOBIG; + net_close (s); + return false; + } + http_data = (u8 *) malloc (content_length); + b = tcp_read (s, &http_data, content_length); + if (!b) { + free (http_data); + http_data = NULL; + result = HTTPR_ERR_RECEIVE; + net_close (s); + return false; + } + + result = HTTPR_OK; + + net_close (s); + + return true; +} + +bool http_get_result (u32 *_http_status, u8 **content, u32 *length) { + if (http_status) *_http_status = http_status; + + if (result == HTTPR_OK) { + *content = http_data; + *length = content_length; + + } else { + *content = NULL; + *length = 0; + } + + free (http_host); + free (http_path); + + return true; +} + diff --git a/cios_installer/http.h b/cios_installer/http.h new file mode 100644 index 00000000..411edae6 --- /dev/null +++ b/cios_installer/http.h @@ -0,0 +1,32 @@ +#ifndef _HTTP_H_ +#define _HTTP_H_ + +#include +#define TCP_CONNECT_TIMEOUT 10000 +#define TCP_BLOCK_SIZE (8 * 1024) +#define TCP_BLOCK_RECV_TIMEOUT 10000 +#define TCP_BLOCK_SEND_TIMEOUT 10000 + +s32 tcp_socket (void); +s32 tcp_connect (char *host, const u16 port); + +char * tcp_readln (const s32 s, const u16 max_length, const u64 start_time, const u32 timeout); +bool tcp_read (const s32 s, u8 **buffer, const u32 length); +bool tcp_write (const s32 s, const u8 *buffer, const u32 length); + +#define HTTP_TIMEOUT 300000 + +typedef enum { + HTTPR_OK, + HTTPR_ERR_CONNECT, + HTTPR_ERR_REQUEST, + HTTPR_ERR_STATUS, + HTTPR_ERR_TOOBIG, + HTTPR_ERR_RECEIVE +} http_res; + +bool http_request (const char *url, const u32 max_size); +bool http_get_result (u32 *http_status, u8 **content, u32 *length); + +#endif + diff --git a/cios_installer/patchmii_core.c b/cios_installer/patchmii_core.c new file mode 100644 index 00000000..1bfedba7 --- /dev/null +++ b/cios_installer/patchmii_core.c @@ -0,0 +1,1618 @@ +/* patchmii_core -- low-level functions to handle the downloading, patching + and installation of updates on the Wii + + Copyright (C) 2008 bushing / hackmii.com + Copyright (C) 2008 WiiGator + Copyright (C) 2009 Hermes + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, version 2. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "patchmii_core.h" +#include "sha1.h" +#include "debug.h" +#include "http.h" +#include "haxx_certs.h" +#include "runtime_ios_patch.h" + +//#define _DEBUG_PRINTF_H_ 1 + +#include "debug_printf.h" + +/* +NOTE: i don't necessary +#ifdef ADD_DIP_PLUGIN +#include "add_dip_plugin.h" +#include "patch_handle_di_cmd_raw.h" +#endif +*/ + +char *str_trace=""; + +#define VERSION "5.1" + +#define INPUT_TITLEID_H 1 +int INPUT_TITLEID_L= 36; +int INPUT_VERSION= 1042; + +#define OUTPUT_TITLEID_H 1 +int OUTPUT_TITLEID_L=222; + +#define OUTPUT_VERSION 65535 + + +#define ALIGN(a,b) ((((a)+(b)-1)/(b))*(b)) +#define round_up(x,n) (-(-(x) & -(n))) + +static u8 ESCommonKey[16] = { 0xeb, 0xe4, 0x2a, 0x22, 0x5e, 0x85, 0x93, 0xe4, 0x48, 0xd9, 0xc5, 0x45, 0x73, 0x81, 0xaa, 0xf7 }; + +int http_status = 0; +int useSd = 1; +int tmd_dirty = 0, tik_dirty = 0; + + +u32 DIP_patch1_pos=0x6800; +u32 DIP_DVD_enable_orig_pos1=0x964; +u32 DIP_DVD_enable_orig_pos2=0x9F0; + +u32 DIP_handle_di_cmd=0x112c; +u8 *patch_handle_di_cmd=NULL; +int len_patch_handle_di_cmd=0; + +u32 DIP_handle_di_cmd_reentry=0x8248; +u32 len_handle_di_cmd_reentry=0; +u8 *handle_di_cmd_reentry=NULL; + +//u32 ES_ioctvl_patch_pos=0x12ab0; +//u8 *ES_patch_ioctvl=NULL; + + + +void IRQS_patchs(unsigned char *p, int len) +{ +int n; + +for(n=0;n>8; // patch IRQ 4 + p[m+3]=data; + + m+=5*4; + p[m+0]=0x13; // IRQ 9 (unused by system) vector patched (used to call function in system mode) + p[m+1]=0x8c; + p[m+2]=0x00; + p[m+3]=0x08+1; + + printf("Software IRQ 4 and IRQ 9 patched\n"); + return; + } + + } + return; + } + p++; + } +return; +} + + +u8 patch_handle_di_cmd36[12] = { + 0x4B, 0x01, 0x68, 0x1B, 0x47, 0x18, 0x00, 0x00,/*addr to get handle_di_cmd*/ 0x20, 0x20, 0x90, 0x40 +}; + +// handle_di_cmd_reentry= 0x20209030 (default) +u8 handle_di_cmd_reentry36[24] = { + 0x20, 0x20, 0x90, 0x44+1, + 0xB5, 0xF0, 0x46, 0x5F, 0x46, 0x56, 0x46, 0x4D, 0x46, 0x44, 0xB4, 0xF0, 0x4B, 0x00, 0x47, 0x18, + /* handle_di_cmd_reentry */ 0x20, 0x20, 0x10, 0x10+1 // (Thumb) +}; + +u8 patch_handle_di_cmd37[12] = { + 0x4B, 0x01, 0x68, 0x1B, 0x47, 0x18, 0x00, 0x00,/*addr to get handle_di_cmd*/ 0x20, 0x20, 0x90, 0x30 +}; + +// handle_di_cmd_reentry= 0x20209030 (default) +u8 handle_di_cmd_reentry37[24] = { + 0x20, 0x20, 0x90, 0x34+1, + 0xB5, 0xF0, 0x46, 0x5F, 0x46, 0x56, 0x46, 0x4D, 0x46, 0x44, 0xB4, 0xF0, 0x4B, 0x00, 0x47, 0x18, + /* handle_di_cmd_reentry */ 0x20, 0x20, 0x0f, 0x04+1 // (Thumb) +}; + + +u8 patch_handle_di_cmd38[12] = { + 0x4B, 0x01, 0x68, 0x1B, 0x47, 0x18, 0x00, 0x00,/*addr to get handle_di_cmd*/ 0x20, 0x20, 0x80, 0x30 +}; + +// handle_di_cmd_reentry= 0x20208030 (default) +u8 handle_di_cmd_reentry38[24] = { + 0x20, 0x20, 0x80, 0x34+1, + 0xB5, 0xF0, 0x46, 0x5F, 0x46, 0x56, 0x46, 0x4D, 0x46, 0x44, 0xB4, 0xF0, 0x4B, 0x00, 0x47, 0x18, + /* handle_di_cmd_reentry */ 0x20, 0x20, 0x0D, 0x38+1 // (Thumb) +}; + + +u8 patch_handle_di_cmd60[12] = { + 0x4B, 0x01, 0x68, 0x1B, 0x47, 0x18, 0x00, 0x00,/*addr to get handle_di_cmd*/ 0x20, 0x20, 0x80, 0x30 +}; + +// handle_di_cmd_reentry= 0x20208030 (default) +u8 handle_di_cmd_reentry60[24] = { + 0x20, 0x20, 0x80, 0x34+1, + 0xB5, 0xF0, 0x46, 0x5F, 0x46, 0x56, 0x46, 0x4D, 0x46, 0x44, 0xB4, 0xF0, 0x4B, 0x00, 0x47, 0x18, + /* handle_di_cmd_reentry */ 0x20, 0x20, 0x0D, 0x38+1 // (Thumb) +}; + + +void adjust_patch(int ios) +{ + +switch(ios) + { + case 36: + DIP_patch1_pos=0x6800; + DIP_DVD_enable_orig_pos1=0x964; + DIP_DVD_enable_orig_pos2=0x9F0; + DIP_handle_di_cmd=0x112c; + patch_handle_di_cmd=patch_handle_di_cmd36; + len_patch_handle_di_cmd=sizeof(patch_handle_di_cmd36); + DIP_handle_di_cmd_reentry=0x8248; + handle_di_cmd_reentry=handle_di_cmd_reentry36; + len_handle_di_cmd_reentry=sizeof(handle_di_cmd_reentry36); + break; + + case 38: + DIP_patch1_pos=0x6494; + DIP_DVD_enable_orig_pos1=0x68c; + DIP_DVD_enable_orig_pos2= 0x718; + DIP_handle_di_cmd= 0xe54; + patch_handle_di_cmd=patch_handle_di_cmd38; + len_patch_handle_di_cmd=sizeof(patch_handle_di_cmd38); + DIP_handle_di_cmd_reentry=0x7ecc; + handle_di_cmd_reentry=handle_di_cmd_reentry38; + len_handle_di_cmd_reentry=sizeof(handle_di_cmd_reentry38); + break; + + case 37: + + DIP_patch1_pos=0x6768; + DIP_DVD_enable_orig_pos1=0x6e4; + DIP_DVD_enable_orig_pos2=0x774; + + DIP_handle_di_cmd=0x1020; + patch_handle_di_cmd=patch_handle_di_cmd37; + len_patch_handle_di_cmd=sizeof(patch_handle_di_cmd37); + DIP_handle_di_cmd_reentry=0x81e0; + handle_di_cmd_reentry=handle_di_cmd_reentry37; + len_handle_di_cmd_reentry=sizeof(handle_di_cmd_reentry37); + break; + + case 57: + + // use IOS57 DIP and ES: NOTE DIP IOS60 is equal to this IOS57 version an ES use the same patch + + /* old 5404 + DIP_patch1_pos=0x671c; + DIP_DVD_enable_orig_pos1=0x6e4; + DIP_DVD_enable_orig_pos2= 0x774; + DIP_handle_di_cmd= 0x1020; + patch_handle_di_cmd=patch_handle_di_cmd60; + len_patch_handle_di_cmd=sizeof(patch_handle_di_cmd60); + DIP_handle_di_cmd_reentry=0x8058; + handle_di_cmd_reentry=handle_di_cmd_reentry60; + len_handle_di_cmd_reentry=sizeof(handle_di_cmd_reentry60); + */ + DIP_patch1_pos=0x680c; + DIP_DVD_enable_orig_pos1=0x6e4; + DIP_DVD_enable_orig_pos2= 0x774; + DIP_handle_di_cmd= 0x1020; + patch_handle_di_cmd=patch_handle_di_cmd60; + len_patch_handle_di_cmd=sizeof(patch_handle_di_cmd60); + DIP_handle_di_cmd_reentry=0x8148; + handle_di_cmd_reentry=handle_di_cmd_reentry60; // use the same patch from IOS 60 + len_handle_di_cmd_reentry=sizeof(handle_di_cmd_reentry60); + break; + + case 60: + // use IOS60 DIP and ES + + DIP_patch1_pos=0x671c; + DIP_DVD_enable_orig_pos1=0x6e4; + DIP_DVD_enable_orig_pos2= 0x774; + DIP_handle_di_cmd= 0x1020; + patch_handle_di_cmd=patch_handle_di_cmd60; + len_patch_handle_di_cmd=sizeof(patch_handle_di_cmd60); + DIP_handle_di_cmd_reentry=0x8058; + handle_di_cmd_reentry=handle_di_cmd_reentry60; + len_handle_di_cmd_reentry=sizeof(handle_di_cmd_reentry60); + break; + + default: + error_debug_printf("Unsupported IOS"); + exit(0); + break; + } + +} + + + +u8 DIP_orig1[] = { 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +u8 DIP_patch1[] = { 0x7e, 0xd4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + +u8 DIP_DVD_enable_orig[] = { 0x20, 0x01 }; +u8 DIP_DVD_enable_patch[] = { 0x20, 0x00 }; +u8 DIP_handle_di_cmd_orig[] = { 0xb5, 0xf0, 0x46, 0x5f, 0x46, 0x56, 0x46, 0x4d, 0x46, 0x44, 0xb4, 0xf0 }; + +static int patchmii(void); + +int replace_ios_modules(u8 **decrypted_buf, u32 *content_size); +int add_custom_modules(tmd *p_tmd); + + +void debug_printf(const char *fmt, ...) { + char buf[1024]; + int len; + va_list ap; + usb_flush(1); + va_start(ap, fmt); + len = vsnprintf(buf, sizeof(buf), fmt, ap); + va_end(ap); + if (len <= 0 || len > sizeof(buf)) printf("\33[41mError: len = %d\33[40m\n", len); + else usb_sendbuffer(1, buf, len); + printf("%s",buf); +} + +void error_debug_printf(const char *fmt, ...) { + char buf[1024]; + int len; + va_list ap; + usb_flush(1); + va_start(ap, fmt); + len = vsnprintf(buf, sizeof(buf), fmt, ap); + va_end(ap); + if (len <= 0 || len > sizeof(buf)) printf("\33[41mError: len = %d\33[40m\n", len); + else usb_sendbuffer(1, buf, len); + printf("\33[41m%s\33[40m\n",buf); +} + +char ascii(char s) { + if(s < 0x20) return '.'; + if(s > 0x7E) return '.'; + return s; +} + +void hexdump(void *d, int len) { + u8 *data; + int i, off; + data = (u8*)d; + for (off=0; off=len) debug_printf(" "); + else debug_printf("%02x ",data[off+i]); + + debug_printf(" "); + for(i=0; i<16; i++) + if((i+off)>=len) debug_printf(" "); + else debug_printf("%c",ascii(data[off+i])); + debug_printf("\n"); + } +} + +char *spinner_chars="/-\\|"; +int spin = 0; + +void spinner(void) { + printf("\b%c", spinner_chars[spin++]); + if(!spinner_chars[spin]) spin=0; +} + +static void *xfb = NULL; +static GXRModeObj *rmode = NULL; + +void printvers(void) { + debug_printf("IOS Version: %08x\n", *((u32*)0xC0003140)); +} + +void console_setup(void) { + VIDEO_Init(); + PAD_Init(); + WPAD_Init(); + + rmode = VIDEO_GetPreferredMode(NULL); + + xfb = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode)); + VIDEO_ClearFrameBuffer(rmode,xfb,COLOR_BLACK); + VIDEO_Configure(rmode); + VIDEO_SetNextFramebuffer(xfb); + VIDEO_SetBlack(FALSE); + VIDEO_Flush(); + VIDEO_WaitVSync(); + if(rmode->viTVMode&VI_NON_INTERLACE) VIDEO_WaitVSync(); + CON_InitEx(rmode,20,30,rmode->fbWidth - 40,rmode->xfbHeight - 60); +} + +static char buf[128]; + +int get_nus_object(u32 titleid1, u32 titleid2, u32 version, char *content, u8 **outbuf, u32 *outlen) { + + int retval; + u32 http_status; + static int netInit = 0; + +FILE *fd; + + if (useSd) { + + + // NUS Downloader format + snprintf(buf, 128, "sd:/ios/%08x%08xv%d/%s", titleid1, titleid2, version, content); + fd = fopen(buf, "rb"); + if(!fd) + { + snprintf(buf, 128, "sd:/%08x/%08x/v%d/%s", titleid1, titleid2, version, content); + fd = fopen(buf, "rb"); + } + + if (!fd) { + debug_printf("from Internet: "); + } else { + debug_printf("from SD: "); + fseek(fd, 0, SEEK_END); + *outlen = ftell(fd); + fseek(fd, 0, SEEK_SET); + + *outbuf = malloc(*outlen); + if (*outbuf == NULL) { + error_debug_printf("Out of memory size %d", *outlen); + return 2; + } + + if (fread(*outbuf, *outlen, 1, fd) != 1) { + fclose(fd); + return 3; + } else { + fclose(fd); + return 0; + } + } + } + if (!netInit) + { + time_t rel_time=time(NULL); + + printf("Initializing network."); fflush(stdout); + while (1) { + retval = net_init (); + if (retval < 0) { + if (retval != -EAGAIN) { + error_debug_printf ("net_init failed: %d", retval); + return 4; + } + } + if (!retval) break; + usleep(100000); + printf("."); fflush(stdout); + if((time(NULL)-rel_time)>15) + { + error_debug_printf ("net_init failed: %d", retval); + return 4; + } + } + sleep(1); + printf("Done!\n"); + netInit = 1; + } + snprintf(buf, 128, "http://nus.cdn.shop.wii.com/ccs/download/%08x%08x/%s", + titleid1, titleid2, content); + + debug_printf("\nwget -O sd:/ios/%08x%08xv%d/%s %s\n", titleid1, titleid2, version, content,buf); + + {int retry=10; + while(1) + { + retval = http_request(buf, (u32) (1 << 31)); + if (!retval) { + retry--; + error_debug_printf("Error making http request"); + sleep(1); + if(retry<0) return 1; + } + else break; + } + } + retval = http_get_result(&http_status, outbuf, outlen); + //snprintf(buf, 128, "sd:/%08x/%08x/v%d/%s", titleid1, titleid2, version, content); + snprintf(buf, 128, "sd:/ios/%08x%08xv%d/%s", titleid1, titleid2, version, content); + + if (useSd) + { + fd = fopen(buf, "wb"); + if (fd) { + fwrite(*outbuf, *outlen, 1, fd); + fclose(fd); + } + } + + if (((int)*outbuf & 0xF0000000) == 0xF0000000) { + + + return (int) *outbuf; + } + + return 0; +} + +void decrypt_buffer(u16 index, u8 *source, u8 *dest, u32 len) { + static u8 iv[16]; + if (!source) { + error_debug_printf("decrypt_buffer: invalid source paramater"); + exit(1); + } + if (!dest) { + error_debug_printf("decrypt_buffer: invalid dest paramater"); + exit(1); + } + + memset(iv, 0, 16); + memcpy(iv, &index, 2); + aes_decrypt(iv, source, dest, len); +} + +static u8 encrypt_iv[16]; +void set_encrypt_iv(u16 index) { + memset(encrypt_iv, 0, 16); + memcpy(encrypt_iv, &index, 2); +} + +void encrypt_buffer(u8 *source, u8 *dest, u32 len) { + aes_encrypt(encrypt_iv, source, dest, len); +} + +int create_temp_dir(void) { + int retval; + retval = ISFS_CreateDir ("/tmp/patchmii", 0, 3, 1, 1); + + if (retval) error_debug_printf("ISFS_CreateDir(/tmp/patchmii) returned %d", retval); + return retval; +} + +u32 save_nus_object (u16 index, u8 *buf, u32 size) { + char filename[256]; + static u8 bounce_buf[1024] ATTRIBUTE_ALIGN(0x20); + u32 i; + + int retval, fd; + snprintf(filename, sizeof(filename), "/tmp/patchmii/%08x", index); + + retval = ISFS_CreateFile (filename, 0, 3, 1, 1); + + if (retval != ISFS_OK) { + error_debug_printf("ISFS_CreateFile(%s) returned %d", filename, retval); + return retval; + } + + fd = ISFS_Open (filename, ISFS_ACCESS_WRITE); + + if (fd < 0) { + error_debug_printf("ISFS_OpenFile(%s) returned %d", filename, fd); + return retval; + } + + for (i=0; ititle_id, rindex); + + cfd = ES_AddContentStart(p_tmd->title_id, p_cr[index].cid); + if(cfd < 0) { + error_debug_printf(":\nES_AddContentStart(%016llx, %x) failed: %d",p_tmd->title_id, index, cfd); + ES_AddTitleCancel(); + return -1; + } + debug_printf(" (cfd %d): ",cfd); + for (i=0; icipher_title_key; + memcpy(keyin, enc_key, sizeof keyin); + memset(keyout, 0, sizeof keyout); + memset(iv, 0, sizeof iv); + memcpy(iv, &p_tik->titleid, sizeof p_tik->titleid); + + //retval = ES_Decrypt(ES_KEY_COMMON, iv, keyin, sizeof keyin, keyout); + //if (retval) error_debug_printf("ES_Decrypt returned %d", retval); + aes_set_key(ESCommonKey); + aes_decrypt(iv, keyin, keyout, sizeof(keyin)); + + memcpy(key, keyout, sizeof keyout); + return retval; +} + +int change_ticket_title_id(signed_blob *s_tik, u32 titleid1, u32 titleid2) { + static u8 iv[16] ATTRIBUTE_ALIGN(0x20); + static u8 keyin[16] ATTRIBUTE_ALIGN(0x20); + static u8 keyout[16] ATTRIBUTE_ALIGN(0x20); + int retval = 0; + + tik *p_tik; + p_tik = (tik*)SIGNATURE_PAYLOAD(s_tik); + u8 *enc_key = (u8 *)&p_tik->cipher_title_key; + memcpy(keyin, enc_key, sizeof keyin); + memset(keyout, 0, sizeof keyout); + memset(iv, 0, sizeof iv); + memcpy(iv, &p_tik->titleid, sizeof p_tik->titleid); + + //retval = ES_Decrypt(ES_KEY_COMMON, iv, keyin, sizeof keyin, keyout); + aes_set_key(ESCommonKey); + aes_decrypt(iv, keyin, keyout, sizeof(keyin)); + + p_tik->titleid = (u64)titleid1 << 32 | (u64)titleid2; + memset(iv, 0, sizeof iv); + memcpy(iv, &p_tik->titleid, sizeof p_tik->titleid); + + //retval = ES_Encrypt(ES_KEY_COMMON, iv, keyout, sizeof keyout, keyin); + //if (retval) error_debug_printf("ES_Decrypt returned %d", retval); + aes_set_key(ESCommonKey); + aes_encrypt(iv, keyout, keyin, sizeof(keyout)); + + memcpy(enc_key, keyin, sizeof keyin); + tik_dirty = 1; + + return retval; +} + +void change_tmd_title_id(signed_blob *s_tmd, u32 titleid1, u32 titleid2) { + tmd *p_tmd; + u64 title_id = titleid1; + title_id <<= 32; + title_id |= titleid2; + p_tmd = (tmd*)SIGNATURE_PAYLOAD(s_tmd); + p_tmd->title_id = title_id; + tmd_dirty = 1; +} + +void display_tag(u8 *buf) { + debug_printf("Firmware version: %s Builder: %s\n", + buf, buf+0x30); +} + +void display_ios_tags(u8 *buf, u32 size) { + u32 i; + char *ios_version_tag = "$IOSVersion:"; + + if (size == 64) { + display_tag(buf); + return; + } + + for (i=0; i<(size-64); i++) { + if (!strncmp((char *)buf+i, ios_version_tag, 10)) { + char version_buf[128], *date; + while (buf[i+strlen(ios_version_tag)] == ' ') i++; // skip spaces + strlcpy(version_buf, (char *)buf + i + strlen(ios_version_tag), sizeof version_buf); + date = version_buf; + strsep(&date, "$"); + date = version_buf; + strsep(&date, ":"); + debug_printf("%s (%s)\n", version_buf, date); + i += 64; + } + } +} + +void print_tmd_summary(const tmd *p_tmd) { + const tmd_content *p_cr; + p_cr = TMD_CONTENTS(p_tmd); + + u32 size=0; + + u16 i=0; + for(i=0;inum_contents;i++) { + size += p_cr[i].size; + } + + debug_printf("Title ID: %016llx\n",p_tmd->title_id); + debug_printf("Number of parts: %d. Total size: %uK\n", p_tmd->num_contents, (u32) (size / 1024)); +} + +void zero_sig(signed_blob *sig) { + u8 *sig_ptr = (u8 *)sig; + memset(sig_ptr + 4, 0, SIGNATURE_SIZE(sig)-4); +} + +void brute_tmd(tmd *p_tmd) { + u16 fill; + for(fill=0; fill<65535; fill++) { + p_tmd->fill3=fill; + sha1 hash; + // debug_printf("SHA1(%p, %x, %p)\n", p_tmd, TMD_SIZE(p_tmd), hash); + SHA1((u8 *)p_tmd, TMD_SIZE(p_tmd), hash); + + if (hash[0]==0) { + // debug_printf("setting fill3 to %04hx\n", fill); + return; + } + } + error_debug_printf("Unable to fix tmd :("); + exit(4); +} + +void brute_tik(tik *p_tik) { + u16 fill; + for(fill=0; fill<65535; fill++) { + p_tik->padding=fill; + sha1 hash; + // debug_printf("SHA1(%p, %x, %p)\n", p_tmd, TMD_SIZE(p_tmd), hash); + SHA1((u8 *)p_tik, sizeof(tik), hash); + + if (hash[0]==0) return; + } + error_debug_printf("Unable to fix tik :("); + exit(5); +} + +void forge_tmd(signed_blob *s_tmd) { + debug_printf("forging tmd sig\n"); + zero_sig(s_tmd); + brute_tmd(SIGNATURE_PAYLOAD(s_tmd)); +} + +void forge_tik(signed_blob *s_tik) { + debug_printf("forging tik sig\n"); + zero_sig(s_tik); + brute_tik(SIGNATURE_PAYLOAD(s_tik)); +} + +s32 install_ticket(const signed_blob *s_tik, const signed_blob *s_certs, u32 certs_len) { + u32 ret; + + debug_printf("Installing ticket...\n"); + ret = ES_AddTicket(s_tik,STD_SIGNED_TIK_SIZE,s_certs,certs_len, NULL, 0); + if (ret < 0) { + error_debug_printf("ES_AddTicket failed: %d",ret); + return ret; + } + return 0; +} + +s32 install(const signed_blob *s_tmd, const signed_blob *s_certs, u32 certs_len) { + u32 ret, i; + tmd *p_tmd = SIGNATURE_PAYLOAD(s_tmd); + debug_printf("Adding title...\n"); + + ret = ES_AddTitleStart(s_tmd, SIGNED_TMD_SIZE(s_tmd), s_certs, certs_len, NULL, 0); + + if(ret < 0) { + error_debug_printf("ES_AddTitleStart failed: %d",ret); + ES_AddTitleCancel(); + return ret; + } + + for(i=0; inum_contents; i++) { + debug_printf("Adding content ID %08x", i); + ret = install_nus_object((tmd *)SIGNATURE_PAYLOAD(s_tmd), i); + if (ret) return ret; + } + + ret = ES_AddTitleFinish(); + if(ret < 0) { + error_debug_printf("ES_AddTitleFinish failed: %d",ret); + ES_AddTitleCancel(); + return ret; + } + + printf("Installation complete!\n"); + return 0; + +} + + +void fun_exit() +{ + WPAD_Shutdown(); + sleep(5); +} + +u64 *titles = NULL; +u32 num_titles=0; +int ios_index=0; + +u8 ios_found[256]; + +int get_title_list() +{ + + + u32 len_buf; + s32 ret; + int n; + + memset((void *) ios_found,0, 256); + + ret = ES_GetNumTitles(&num_titles); + if (ret < 0) + return ret; + + if(num_titles<1) return -1; + + len_buf = round_up((num_titles+1) * sizeof(u64), 32); + + titles = memalign(32, len_buf); + if (!titles) + return -1; + + + ret = ES_GetTitles(titles, num_titles); + if (ret < 0) + goto err; + + n=0; + while(n> 32); + u32 tidl = (titles[n] & 0xFFFFFFFF); + + if ((tidh != 0x1) || (tidl < 3) || (tidl > 255)) + { + num_titles--; + memcpy(&titles[n],&titles[n+1], (num_titles-n) * sizeof(u64)); + } + else + {ios_found[tidl]=1;n++;} + } + + +return 0; + +err: + + if (titles) free(titles); titles = NULL; + + return ret; + +} + +int exit_by_reset=0; + +void reset_call() {exit_by_reset=1;} + +int main(int argc, char **argv) { + int rv; + s32 pressed; + int selected=0; + int tick_counter=0; + + atexit(fun_exit); + console_setup(); + printf("This program is a modification of patchmii, and is unsupported and not condoned by the original authors of it.\n"); + printf("The backup loader modification is solely the work of WiiGator.\n"); + printf("This version includes optimizations made by Waninkoko and Hermes\n"); + printf("USB2/wbfs support by Kwiirk\n"); + printf("\n"); + printf("cIOS installer %s by Hermes.\n", VERSION); + printf("If you get an error, you need to downgrade your Wii first.\n"); + printf("\n"); + printf("USE ON YOUR OWN RISK!\n"); + printf("\n"); + + SYS_SetResetCallback(reset_call); + sleep(2); + int ahbprot_ok = 0; + + if (HAVE_AHBPROT) { + printf("Found IOS with disabled AHB Protection!\n"); + printf("\n"); + printf("Applying patches"); + if (IOSPATCH_Apply()) { + printf(" done!\n"); + ahbprot_ok = 1; + } else { + printf("something went wrong.\n"); + } + sleep(2); + } + + if (!ahbprot_ok) { +#if 1 + + if(get_title_list()!=0) + { + printf("Error getting title list\n"); + return 0; + } + + ios_index=36; + if(ios_found[249]) ios_index=249; + else + if(ios_found[250]) ios_index=250; + else + if(ios_found[222]) ios_index=222; + else + if(ios_found[223]) ios_index=223; + else + if(ios_found[35]) ios_index=35; + + while(!ios_found[ios_index]) {ios_index++;if(ios_index>255) ios_index=0;} + + + + while(1) + { + printf("\33[2J\n\n\33[46m\33[2K\n\33[2K cIOS Installer %s by Hermes (www.elotrolado.net)\n\33[2K\33[40m\n\n",VERSION); + + printf(" Select IOS with Trucha Bug to use during installation \n\n", ios_index); + printf(" %sThe selected IOS must have dev/es patched to work\33[37m\n\n\n", (tick_counter & 32) ? "\33[33m" : "\33[30m"); + printf(" Press LEFT/RIGHT to select other different IOS\n\n"); + printf(" Press A to continue (TAKE THE RISK).\n\n"); + printf(" Press B to abort.\n\n"); + + WPAD_ScanPads(); + pressed = WPAD_ButtonsDown(0); + + if(pressed) { + if (pressed == WPAD_BUTTON_A) { + break; + } + if (pressed == WPAD_BUTTON_B) { + printf("Aborted, exiting...\n"); + return 0; + } + if (pressed == WPAD_BUTTON_RIGHT) + { + do{ios_index++;if(ios_index>255) ios_index=0;} while(!ios_found[ios_index]); + } + if (pressed == WPAD_BUTTON_LEFT) + { + do{ios_index--;if(ios_index<0) ios_index=255;} while(!ios_found[ios_index]); + } + } + VIDEO_WaitVSync(); + tick_counter++; + if(exit_by_reset) { + printf("Aborted, exiting...\n"); + return 0; + } + } +#endif + + printf("\33[42m >>>>>>>>>>>>>>> Reloading IOS %i <<<<<<<<<<<<<<<\33[40m\n", ios_index); + WPAD_Shutdown(); + sleep(1); + IOS_ReloadIOS(ios_index); + sleep(1); + + WPAD_Init(); + selected=1; +} + + while(1) + { + + printf("\33[2J\n\n\33[46m\33[2K\n\33[2K cIOS Installer (Select Custom IOS)\n\33[2K\33[40m\n\n"); + printf(" %sInstall Custom IOS 202 v%d (Homebrew) \33[40m\n\n", (selected==0 && (tick_counter & 32)) ? ">\33[44m" : " \33[40m", OUTPUT_VERSION); + printf(" %sInstall Custom IOS 222 v%d (Default) \33[40m\n\n", (selected==1 && (tick_counter & 32)) ? ">\33[44m" : " \33[40m", OUTPUT_VERSION); + printf(" %sInstall Custom IOS 223 v%d \33[40m\n\n", (selected==2 && (tick_counter & 32)) ? ">\33[44m" : " \33[40m", OUTPUT_VERSION); + printf(" %sInstall Custom IOS 224 v%d \33[40m\n\n", (selected==3 && (tick_counter & 32)) ? ">\33[44m" : " \33[40m", OUTPUT_VERSION); + printf(" %sInstall Custom IOS 225 v%d \33[40m\n\n", (selected==4 && (tick_counter & 32)) ? ">\33[44m" : " \33[40m", OUTPUT_VERSION); + + printf("\n\n Press A to select or B to Abort\n\n"); + printf("\33[33m Current IOS: %d v%d\33[37m\n\n", *((volatile u32 *) 0x80003140)>>16, *((volatile u32 *) 0x80003140) & 0xffff); + + WPAD_ScanPads(); + pressed = WPAD_ButtonsDown(0); + + if(pressed) { + if (pressed == WPAD_BUTTON_A) { + break; + } + if (pressed == WPAD_BUTTON_B) { + printf("Aborted, exiting...\n"); + return 0; + } + if (pressed == WPAD_BUTTON_UP) { + selected--;if(selected<0) selected=0; + } + + if (pressed == WPAD_BUTTON_DOWN) { + selected++;if(selected>4) selected=4; + } + } + VIDEO_WaitVSync(); + tick_counter++; + if(exit_by_reset) { + printf("Aborted, exiting...\n"); + return 0; + } + + } + + switch(selected) + { + case 0: + OUTPUT_TITLEID_L=202; + break; + case 1: + OUTPUT_TITLEID_L=222; + break; + case 2: + OUTPUT_TITLEID_L=223; + break; + case 3: + OUTPUT_TITLEID_L=224; + break; + case 4: + OUTPUT_TITLEID_L=225; + break; + } + + + selected=0; + + while(1) + { + printf("\33[2J\n\n\33[46m\33[2K\n\33[2K cIOS Installer (Select IOS Base)\n\33[2K\33[40m\n\n"); + + if(OUTPUT_TITLEID_L!=222) + { + if(OUTPUT_TITLEID_L==202) printf(" %sUse IOS 38 (Recommended) \33[40m\n\n", (selected==0 && (tick_counter & 32)) ? ">\33[44m" : " \33[40m"); + else + if(selected==0) selected++; + + printf(" %sUse IOS 37 \33[40m\n\n", (selected==1 && (tick_counter & 32)) ? ">\33[44m" : " \33[40m"); + printf(" %sUse IOS 57 \33[40m\n\n", (selected==2 && (tick_counter & 32)) ? ">\33[44m" : " \33[40m"); + printf(" %sUse IOS 60 \33[40m\n\n", (selected==3 && (tick_counter & 32)) ? ">\33[44m" : " \33[40m"); + } + + else + { + printf(" %sUse IOS 38 (Recommended) \33[40m\n\n", (selected==0 && (tick_counter & 32)) ? ">\33[44m" : " \33[40m"); + selected=0; + printf("\nNote: You can only install cIOS 222 with IOS 38 because other IOS\nsupported in this installer don't works installing channels\n(ES error -1029. Its works fine installing IOS or for NAND access)\n\n"); + } + + switch(selected) + { + case 0: + // IOS 38 + INPUT_TITLEID_L= 38; + INPUT_VERSION= 3867/*3610*/; + break; + case 1: + // IOS 37 + INPUT_TITLEID_L= 37; + INPUT_VERSION= 3869 /*3612*/; + break; + + case 2: + // IOS 57 + INPUT_TITLEID_L=57; + INPUT_VERSION=5661 /*5404*/; + break; + + case 3: + // IOS 60 + INPUT_TITLEID_L=60; + INPUT_VERSION=6174; + break; + /* + case 3: + // IOS 36 + INPUT_TITLEID_L= 36; + INPUT_VERSION= 1042; + break; + */ + } + + printf("\n\n Press A to select or B to Abort\n\n"); + + + printf("To install the current selection you need the files in:\n \33[33msd:/ios/%08x%08xv%d\33[37m\n\n", INPUT_TITLEID_H, INPUT_TITLEID_L, INPUT_VERSION); + printf("Use the NUS Download application if you cannot access to Internet from the Wii and copy the files to the sd:/ios/ folder (no wads)\n\n"); + + + WPAD_ScanPads(); + pressed = WPAD_ButtonsDown(0); + + if(pressed) { + if (pressed == WPAD_BUTTON_A) { + break; + } + if (pressed == WPAD_BUTTON_B) { + printf("Aborted, exiting...\n"); + return 0; + } + if (pressed == WPAD_BUTTON_UP) { + selected--;if(selected<0) selected=0; + } + + if (pressed == WPAD_BUTTON_DOWN) { + selected++;if(selected>3) selected=3; + } + } + VIDEO_WaitVSync(); + tick_counter++; + if(exit_by_reset) { + printf("Aborted, exiting...\n"); + return 0; + } + } + + + adjust_patch(INPUT_TITLEID_L); + + if (fatInitDefault()) { + chdir ("sd:/"); + } + else useSd=0; + + rv = patchmii(); + + if(useSd) fatUnmount("sd"); + + return rv; +} + +int apply_patch(u8 *data, u32 offset, u8 *orig, u32 orig_size, u8 *patch, u32 patch_size) +{ + if (memcmp(&data[offset], orig, orig_size) == 0) { + memcpy(&data[offset], patch, patch_size); + return -1; + } else { + return 0; + } +} + + + +int patch_dip(u8 * decrypted_buf) +{ + if (!apply_patch(decrypted_buf, DIP_patch1_pos, DIP_orig1, sizeof(DIP_orig1), DIP_patch1, sizeof(DIP_patch1))) { + printf("DIP patch 1 failed.\n"); + return 0; + } + + if (!apply_patch(decrypted_buf, DIP_DVD_enable_orig_pos1, DIP_DVD_enable_orig, sizeof(DIP_DVD_enable_orig), DIP_DVD_enable_patch, sizeof(DIP_DVD_enable_patch))) { + printf("DIP DVD enable patch 1 failed.\n"); + return 0; + } + + if (!apply_patch(decrypted_buf, DIP_DVD_enable_orig_pos2, DIP_DVD_enable_orig, sizeof(DIP_DVD_enable_orig), DIP_DVD_enable_patch, sizeof(DIP_DVD_enable_patch))) { + printf("DIP DVD enable patch 2 failed.\n"); + return 0; + } + + + if(OUTPUT_TITLEID_L!=202) + { + /* Replace function handle DI command. */ + + if (!apply_patch(decrypted_buf, DIP_handle_di_cmd, DIP_handle_di_cmd_orig, sizeof(DIP_handle_di_cmd_orig), + patch_handle_di_cmd,len_patch_handle_di_cmd)) { + printf("DIP A8 patch failed.\n"); + return 0; + } + + debug_printf("Patched DIP handle cmd.\n"); + + // apply patch directly + memcpy(&decrypted_buf[DIP_handle_di_cmd_reentry], handle_di_cmd_reentry, len_handle_di_cmd_reentry); + + } + + +return 1; +} +static int patchmii(void) +{ +#if SAVE_DECRYPTED +char name[256]; +FILE *fd; +#endif +// ******* WARNING ******* +// Obviously, if you're reading this, you're obviously capable of disabling the +// following checks. If you put any of the following titles into an unusuable state, +// your Wii will fail to boot: +// +// 1-1 (BOOT2), 1-2 (System Menu), 1-30 (IOS30, currently specified by 1-2's TMD) +// Corrupting other titles (for example, BC or the banners of installed channels) +// may also cause difficulty booting. Please do not remove these safety checks +// unless you have performed extensive testing and are willing to take on the risk +// of bricking the systems of people to whom you give this code. -bushing + +/* if ((OUTPUT_TITLEID_H == 1) && (OUTPUT_TITLEID_L == 2)) { + printf("Sorry, I won't modify the system menu; too dangerous. :(\n"); + while(1); + } + + if ((OUTPUT_TITLEID_H == 1) && (OUTPUT_TITLEID_L == 30)) { + printf("Sorry, I won't modify IOS30; too dangerous. :(\n"); + while(1); + } +*/ + + + printvers(); + + + int retval; + + if (ISFS_Initialize() || create_temp_dir()) { + perror("Failed to create temp dir: "); + return(1); + } + + signed_blob *s_tmd = NULL, *s_tik = NULL, *s_certs = NULL; + + u8 *temp_tmdbuf = NULL, *temp_tikbuf = NULL; + + static u8 tmdbuf[MAX_SIGNED_TMD_SIZE*2] ATTRIBUTE_ALIGN(0x20); + static u8 tikbuf[STD_SIGNED_TIK_SIZE*2] ATTRIBUTE_ALIGN(0x20); + + u32 tmdsize; + int update_tmd; + static char tmdname[32]; + + + if (useSd) + { + snprintf(buf, 128, "sd:/ios"); + mkdir(buf,S_IREAD | S_IWRITE); + + snprintf(buf, 128, "sd:/ios/%08x%08xv%d", INPUT_TITLEID_H, INPUT_TITLEID_L, INPUT_VERSION); + mkdir(buf,S_IREAD | S_IWRITE); + } + + + debug_printf("Downloading IOS%d metadata: ..", INPUT_TITLEID_L); + sleep(2); + snprintf(tmdname, sizeof(tmdname),"tmd.%d", INPUT_VERSION); + retval = get_nus_object(INPUT_TITLEID_H, INPUT_TITLEID_L, INPUT_VERSION, tmdname, &temp_tmdbuf, &tmdsize); + if (retval<0) { + error_debug_printf("get_nus_object(tmd) returned %d, tmdsize = %u", retval, tmdsize); + return(1); + } + if (temp_tmdbuf == NULL) { + error_debug_printf("Failed to allocate temp buffer for encrypted content, size was %u", tmdsize); + return(1); + } + memcpy(tmdbuf, temp_tmdbuf, MIN(tmdsize, sizeof(tmdbuf))); + free(temp_tmdbuf); + + s_tmd = (signed_blob *)tmdbuf; + if(!IS_VALID_SIGNATURE(s_tmd)) { + error_debug_printf("Bad TMD signature!"); + return(1); + } + + debug_printf("\b ..tmd.."); + + u32 ticketsize; + retval = get_nus_object(INPUT_TITLEID_H, INPUT_TITLEID_L, INPUT_VERSION, + "cetk", &temp_tikbuf, &ticketsize); + + if (retval < 0) error_debug_printf("get_nus_object(cetk) returned %d, ticketsize = %u", retval, ticketsize); + memcpy(tikbuf, temp_tikbuf, MIN(ticketsize, sizeof(tikbuf))); + + s_tik = (signed_blob *)tikbuf; + if(!IS_VALID_SIGNATURE(s_tik)) { + error_debug_printf("Bad tik signature!"); + return(1); + } + + free(temp_tikbuf); + + s_certs = (signed_blob *)haxx_certs; + if(!IS_VALID_SIGNATURE(s_certs)) { + error_debug_printf("Bad cert signature!"); + return(1); + } + + debug_printf("\b ..ticket.."); + + u8 key[16]; + get_title_key(s_tik, key); + aes_set_key(key); + + tmd *p_tmd; + tmd_content *p_cr; + p_tmd = (tmd*)SIGNATURE_PAYLOAD(s_tmd); + p_cr = TMD_CONTENTS(p_tmd); + + if (p_tmd->title_version != INPUT_VERSION) { + printf("TMD Version wrong %d != %d.\n", p_tmd->title_version, INPUT_VERSION); + return 1; + } + /* Patch version number. */ + p_tmd->title_version = OUTPUT_VERSION; + + print_tmd_summary(p_tmd); + + debug_printf("Downloading contents: \n"); + static char cidstr[32]; + u16 i; + for (i=0;inum_contents;i++) { + debug_printf("Downloading part %d/%d (%uK): ", i+1, + p_tmd->num_contents, p_cr[i].size / 1024); + sprintf(cidstr, "%08x", p_cr[i].cid); + + u8 *content_buf, *decrypted_buf; + u32 content_size; + + retval = get_nus_object(INPUT_TITLEID_H, INPUT_TITLEID_L, INPUT_VERSION, cidstr, &content_buf, &content_size); + if (retval < 0) { + error_debug_printf("get_nus_object(%s) failed with error %d, content size = %u", + cidstr, retval, content_size); + return(1); + } + + if (content_buf == NULL) { + error_debug_printf("error allocating content buffer, size was %u", content_size); + return(1); + } + + if (content_size % 16) { + error_debug_printf("ERROR: downloaded content[%hu] size %u is not a multiple of 16", + i, content_size); + free(content_buf); + return(1); + } + + if (content_size < p_cr[i].size) { + error_debug_printf("ERROR: only downloaded %u / %llu bytes", content_size, p_cr[i].size); + free(content_buf); + return(1); + } + + decrypted_buf = malloc(content_size); + if (!decrypted_buf) { + error_debug_printf("ERROR: failed to allocate decrypted_buf (%u bytes)", content_size); + free(content_buf); + return(1); + } + + decrypt_buffer(i, content_buf, decrypted_buf, content_size); + + sha1 hash; + SHA1(decrypted_buf, p_cr[i].size, hash); + + if (!memcmp(p_cr[i].hash, hash, sizeof hash)) { + debug_printf("\b hash OK.\n"); + //display_ios_tags(decrypted_buf, content_size); + + +#if SAVE_DECRYPTED + +sprintf(name,"sd:/modulo_%s.elf",cidstr); + fd = fopen(name, "wb"); + if (fd) { + fwrite(decrypted_buf, content_size, 1, fd); + fclose(fd); + } +#else + + update_tmd = 0; + switch (p_cr[i].cid) { + case 0x00000000: + break; + + case 0x00000001: /* DIP */ + + if(INPUT_TITLEID_L==36 || INPUT_TITLEID_L==38 /*|| INPUT_TITLEID_L==57 old v5404*/|| INPUT_TITLEID_L==60) + { + + printf("DIP Patch\n"); + + if(!patch_dip(decrypted_buf)) return 0; + debug_printf("Patched DIP.\n"); + update_tmd = 1; + + + } + + break; + + case 0x00000010: /* DIP */ + + if(INPUT_TITLEID_L==37) + { + + printf("DIP Patch\n"); + + if(!patch_dip(decrypted_buf)) return 0; + + debug_printf("Patched DIP.\n"); + update_tmd = 1; + } + break; + + case 0x000000016: /* DIP */ + + if(INPUT_TITLEID_L==57 ) + { + + printf("DIP Patch\n"); + if(!patch_dip(decrypted_buf)) return 0; + + debug_printf("Patched DIP.\n"); + update_tmd = 1; + } + + break; + + + case 0x0000000e: /* FFS, ES, IOSP */ + if(INPUT_TITLEID_L==36 || INPUT_TITLEID_L==60) + { + + printf("Patch ES\n"); + + IRQS_patchs((unsigned char * ) decrypted_buf, content_size); + + update_tmd = 1; + } + + break; + + + /*0x00000011 old 38 v3610 */ + case 0x00000014 : /* FFS, ES, IOSP */ + if(INPUT_TITLEID_L==38) + { // 1 + + printf("Patch ES\n"); + + IRQS_patchs((unsigned char * ) decrypted_buf, content_size); + + + update_tmd = 1; + } // 1 + + break; + // case 0x000000012: old ios57 v5404 + case 0x000000017:/* FFS, ES, IOSP */ + if(INPUT_TITLEID_L==57) + { + + printf("Patch ES\n"); + + IRQS_patchs((unsigned char * ) decrypted_buf, content_size); + + update_tmd = 1; + } + + break; + + // case 0x0000001b: old 37 (v3612) + case 0x0000001e: + if(INPUT_TITLEID_L==37) /* FFS, ES, IOSP */ + { // 1 + + printf("Patch ES\n"); + + IRQS_patchs((unsigned char * ) decrypted_buf, content_size); + + + update_tmd = 1; + } // 1 + + break; + + default: + break; + } + + if(update_tmd == 1) { + debug_printf("Updating TMD.\n"); + SHA1(decrypted_buf, p_cr[i].size, hash); + memcpy(p_cr[i].hash, hash, sizeof hash); + if (p_cr[i].type == 0x8001) { + p_cr[i].type = 1; + } + tmd_dirty=1; + } + + retval = (int) save_nus_object(p_cr[i].cid, decrypted_buf, content_size); + if (retval < 0) { + error_debug_printf("save_nus_object(%x) returned error %d", p_cr[i].cid, retval); + return(1); + } +#endif // save_decrypt + + } else { + error_debug_printf("hash BAD"); + return(1); + } + + free(decrypted_buf); + free(content_buf); + } + +#ifndef SAVE_DECRYPTED + + if(add_custom_modules(p_tmd)) + tmd_dirty=1; + + if ((INPUT_TITLEID_H != OUTPUT_TITLEID_H) + || (INPUT_TITLEID_L != OUTPUT_TITLEID_L)) { + debug_printf("Changing titleid from %08x-%08x to %08x-%08x\n", + INPUT_TITLEID_H, INPUT_TITLEID_L, + OUTPUT_TITLEID_H, OUTPUT_TITLEID_L); + change_ticket_title_id(s_tik, OUTPUT_TITLEID_H, OUTPUT_TITLEID_L); + change_tmd_title_id(s_tmd, OUTPUT_TITLEID_H, OUTPUT_TITLEID_L); + } + aes_set_key(key); + + if (tmd_dirty) { + forge_tmd(s_tmd); + tmd_dirty = 0; + } + + if (tik_dirty) { + forge_tik(s_tik); + tik_dirty = 0; + } + + //debug_printf("Download complete. Installing:\n"); + + printf("\33[2J\n\n\33[46m\33[2K\n\33[2K Download completed.\n\33[2K Press button 1 for Install (Take the Risk) or B to Abort\n\33[2K\33[40m\n\n"); + while(1) + { + s32 pressed; + WPAD_ScanPads(); + pressed = WPAD_ButtonsDown(0); + + if(pressed) { + if (pressed == WPAD_BUTTON_B) { + printf("Aborted, exiting...\n"); + return 0; + break; + } + + if (pressed == WPAD_BUTTON_1) { + break; + } + } + + VIDEO_WaitVSync(); + + if(exit_by_reset) { + printf("Aborted, exiting...\n"); + return 0; + } + + } + + retval = install_ticket(s_tik, s_certs, haxx_certs_size); + if (retval) { + error_debug_printf("install_ticket returned %d", retval); + return(1); + } + + retval = install(s_tmd, s_certs, haxx_certs_size); +#endif + if (retval) { + error_debug_printf("install returned %d", retval); + return(1); + } + + debug_printf("Done!\n"); + + return(0); +} diff --git a/cios_installer/patchmii_core.h b/cios_installer/patchmii_core.h new file mode 100644 index 00000000..e7d8b779 --- /dev/null +++ b/cios_installer/patchmii_core.h @@ -0,0 +1,40 @@ +// Basic I/O. + +static inline u32 read32(u32 addr) +{ + u32 x; + asm volatile("lwz %0,0(%1) ; sync" : "=r"(x) : "b"(0xc0000000 | addr)); + return x; +} + +static inline void write32(u32 addr, u32 x) +{ + asm("stw %0,0(%1) ; eieio" : : "r"(x), "b"(0xc0000000 | addr)); +} + +// USB Gecko. + +void usb_flush(int chn); +int usb_sendbuffer(int chn,const void *buffer,int size); + +// Version string. + +extern const char version[]; + +// Debug: blink the tray led. + +static inline void blink(void) +{ + write32(0x0d8000c0, read32(0x0d8000c0) ^ 0x20); +} + +void debug_printf(const char *fmt, ...); +void hexdump(void *d, int len); +void aes_set_key(u8 *key); +void aes_decrypt(u8 *iv, u8 *inbuf, u8 *outbuf, unsigned long long len); +void aes_encrypt(u8 *iv, u8 *inbuf, u8 *outbuf, unsigned long long len); + +#define TRACE(x) debug_printf("%s / %d: %d\n", __FUNCTION__, __LINE__, (x)) + +#define ISFS_ACCESS_READ 1 +#define ISFS_ACCESS_WRITE 2 diff --git a/cios_installer/replace_ios_modules.c b/cios_installer/replace_ios_modules.c new file mode 100644 index 00000000..8eadd58a --- /dev/null +++ b/cios_installer/replace_ios_modules.c @@ -0,0 +1,60 @@ +#include +#include +#include +#include +#include +#include + +//#define OH0_REPL +#ifdef OH0_REPL +#include "oh0_elf.h" +#endif +struct ios_module_replacement +{ + char *name; + u8 *data; + u32 *size; +}; + +struct ios_module_replacement ios_repls[]={ +#ifdef OH0_REPL + {"OH0",(u8*)oh0_elf,(u32*)&oh0_elf_size} +#endif +}; + +void debug_printf(const char *fmt, ...); + +int replace_ios_modules(u8 **decrypted_buf, u32 *content_size) +{ + int i,version; + u32 len; + u8*buf = *decrypted_buf; + char *ios_version_tag = "$IOSVersion:"; + len = *content_size; + if (len == 64) + return 0; + version =0; + for (i=0; i<(len-64); i++) + if (!strncmp((char *)buf+i, ios_version_tag, 10)) { + version = i; + break; + } + + for (i=0;iname,strlen(repl->name))) + { + debug_printf("replaced %s\n",repl->name); + free(*decrypted_buf); + len = *repl->size; + len+=31; + len&=~31; + *decrypted_buf = malloc(len); + memcpy(*decrypted_buf,repl->data,len); + *content_size = len; + return 1; + } + } + return 0; +} + diff --git a/cios_installer/rijndael.c b/cios_installer/rijndael.c new file mode 100644 index 00000000..7135a069 --- /dev/null +++ b/cios_installer/rijndael.c @@ -0,0 +1,398 @@ +/* Rijndael Block Cipher - rijndael.c + + Written by Mike Scott 21st April 1999 + mike@compapp.dcu.ie + + Permission for free direct or derivative use is granted subject + to compliance with any conditions that the originators of the + algorithm place on its exploitation. + +*/ + +#include +#include + +#define u8 unsigned char /* 8 bits */ +#define u32 unsigned long /* 32 bits */ +#define u64 unsigned long long + +/* rotates x one bit to the left */ + +#define ROTL(x) (((x)>>7)|((x)<<1)) + +/* Rotates 32-bit word left by 1, 2 or 3 byte */ + +#define ROTL8(x) (((x)<<8)|((x)>>24)) +#define ROTL16(x) (((x)<<16)|((x)>>16)) +#define ROTL24(x) (((x)<<24)|((x)>>8)) + +/* Fixed Data */ + +static u8 InCo[4]={0xB,0xD,0x9,0xE}; /* Inverse Coefficients */ + +static u8 fbsub[256]; +static u8 rbsub[256]; +static u8 ptab[256],ltab[256]; +static u32 ftable[256]; +static u32 rtable[256]; +static u32 rco[30]; + +/* Parameter-dependent data */ + +int Nk,Nb,Nr; +u8 fi[24],ri[24]; +u32 fkey[120]; +u32 rkey[120]; + +static u32 pack(u8 *b) +{ /* pack bytes into a 32-bit Word */ + return ((u32)b[3]<<24)|((u32)b[2]<<16)|((u32)b[1]<<8)|(u32)b[0]; +} + +static void unpack(u32 a,u8 *b) +{ /* unpack bytes from a word */ + b[0]=(u8)a; + b[1]=(u8)(a>>8); + b[2]=(u8)(a>>16); + b[3]=(u8)(a>>24); +} + +static u8 xtime(u8 a) +{ + u8 b; + if (a&0x80) b=0x1B; + else b=0; + a<<=1; + a^=b; + return a; +} + +static u8 bmul(u8 x,u8 y) +{ /* x.y= AntiLog(Log(x) + Log(y)) */ + if (x && y) return ptab[(ltab[x]+ltab[y])%255]; + else return 0; +} + +static u32 SubByte(u32 a) +{ + u8 b[4]; + unpack(a,b); + b[0]=fbsub[b[0]]; + b[1]=fbsub[b[1]]; + b[2]=fbsub[b[2]]; + b[3]=fbsub[b[3]]; + return pack(b); +} + +static u8 product(u32 x,u32 y) +{ /* dot product of two 4-byte arrays */ + u8 xb[4],yb[4]; + unpack(x,xb); + unpack(y,yb); + return bmul(xb[0],yb[0])^bmul(xb[1],yb[1])^bmul(xb[2],yb[2])^bmul(xb[3],yb[3]); +} + +static u32 InvMixCol(u32 x) +{ /* matrix Multiplication */ + u32 y,m; + u8 b[4]; + + m=pack(InCo); + b[3]=product(m,x); + m=ROTL24(m); + b[2]=product(m,x); + m=ROTL24(m); + b[1]=product(m,x); + m=ROTL24(m); + b[0]=product(m,x); + y=pack(b); + return y; +} + +u8 ByteSub(u8 x) +{ + u8 y=ptab[255-ltab[x]]; /* multiplicative inverse */ + x=y; x=ROTL(x); + y^=x; x=ROTL(x); + y^=x; x=ROTL(x); + y^=x; x=ROTL(x); + y^=x; y^=0x63; + return y; +} + +void gentables(void) +{ /* generate tables */ + int i; + u8 y,b[4]; + + /* use 3 as primitive root to generate power and log tables */ + + ltab[0]=0; + ptab[0]=1; ltab[1]=0; + ptab[1]=3; ltab[3]=1; + for (i=2;i<256;i++) + { + ptab[i]=ptab[i-1]^xtime(ptab[i-1]); + ltab[ptab[i]]=i; + } + + /* affine transformation:- each bit is xored with itself shifted one bit */ + + fbsub[0]=0x63; + rbsub[0x63]=0; + for (i=1;i<256;i++) + { + y=ByteSub((u8)i); + fbsub[i]=y; rbsub[y]=i; + } + + for (i=0,y=1;i<30;i++) + { + rco[i]=y; + y=xtime(y); + } + + /* calculate forward and reverse tables */ + for (i=0;i<256;i++) + { + y=fbsub[i]; + b[3]=y^xtime(y); b[2]=y; + b[1]=y; b[0]=xtime(y); + ftable[i]=pack(b); + + y=rbsub[i]; + b[3]=bmul(InCo[0],y); b[2]=bmul(InCo[1],y); + b[1]=bmul(InCo[2],y); b[0]=bmul(InCo[3],y); + rtable[i]=pack(b); + } +} + +void gkey(int nb,int nk,char *key) +{ /* blocksize=32*nb bits. Key=32*nk bits */ + /* currently nb,bk = 4, 6 or 8 */ + /* key comes as 4*Nk bytes */ + /* Key Scheduler. Create expanded encryption key */ + int i,j,k,m,N; + int C1,C2,C3; + u32 CipherKey[8]; + + Nb=nb; Nk=nk; + + /* Nr is number of rounds */ + if (Nb>=Nk) Nr=6+Nb; + else Nr=6+Nk; + + C1=1; + if (Nb<8) { C2=2; C3=3; } + else { C2=3; C3=4; } + + /* pre-calculate forward and reverse increments */ + for (m=j=0;j>8)])^ + ROTL16(ftable[(u8)(x[fi[m+1]]>>16)])^ + ROTL24(ftable[x[fi[m+2]]>>24]); + } + t=x; x=y; y=t; /* swap pointers */ + } + +/* Last Round - unroll if possible */ + for (m=j=0;j>8)])^ + ROTL16((u32)fbsub[(u8)(x[fi[m+1]]>>16)])^ + ROTL24((u32)fbsub[x[fi[m+2]]>>24]); + } + for (i=j=0;i>8)])^ + ROTL16(rtable[(u8)(x[ri[m+1]]>>16)])^ + ROTL24(rtable[x[ri[m+2]]>>24]); + } + t=x; x=y; y=t; /* swap pointers */ + } + +/* Last Round - unroll if possible */ + for (m=j=0;j>8)])^ + ROTL16((u32)rbsub[(u8)(x[ri[m+1]]>>16)])^ + ROTL24((u32)rbsub[x[ri[m+2]]>>24]); + } + for (i=j=0;i +// This code is licensed to you under the terms of the GNU GPL, version 2; +// see file COPYING or http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt + +// Some modifications taken from dop-mii. Credits to them +#include +#include +#include + +#include + +#include "runtime_ios_patch.h" + +#define MEM_REG_BASE 0xd8b4000 +#define MEM_PROT (MEM_REG_BASE + 0x20a) + +static void disable_memory_protection() { + write32(MEM_PROT, read32(MEM_PROT) & 0x0000FFFF); +} + +static u32 apply_patch(char *name, const u8 *old, u32 old_size, const u8 *patch, u32 patch_size, u32 patch_offset) { + u8 *ptr = (u8 *)0x93400000; + u32 found = 0; + u8 *location = NULL; + while ((u32)ptr < (0x94000000 - patch_size)) { + if (!memcmp(ptr, old, old_size)) { + found++; + location = ptr + patch_offset; + u8 *start = location; + u32 i; + for (i = 0; i < patch_size; i++) { + *location++ = patch[i]; + } + DCFlushRange((u8 *)(((u32)start) >> 5 << 5), (patch_size >> 5 << 5) + 64); + ICInvalidateRange((u8 *)(((u32)start) >> 5 << 5), (patch_size >> 5 << 5) + 64); + } + ptr++; + } + if (found) { + printf("\b.."); + } else { + printf("\b!."); + } + return found; +} + +static const u8 di_readlimit_old[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0A, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, + 0x7E, 0xD4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 +}; +static const u8 di_readlimit_patch[] = { 0x7e, 0xd4 }; + +const u8 isfs_permissions_old[] = { 0x42, 0x8B, 0xD0, 0x01, 0x25, 0x66 }; +const u8 isfs_permissions_patch[] = { 0x42, 0x8B, 0xE0, 0x01, 0x25, 0x66 }; +static const u8 setuid_old[] = { 0xD1, 0x2A, 0x1C, 0x39 }; +static const u8 setuid_patch[] = { 0x46, 0xC0 }; +const u8 es_identify_old[] = { 0x28, 0x03, 0xD1, 0x23 }; +const u8 es_identify_patch[] = { 0x00, 0x00 }; +const u8 hash_old[] = { 0x20, 0x07, 0x23, 0xA2 }; +const u8 hash_patch[] = { 0x00 }; +const u8 new_hash_old[] = { 0x20, 0x07, 0x4B, 0x0B }; + +u32 IOSPATCH_Apply() { + printf("\n\n"); + u32 count = 0; + if (HAVE_AHBPROT) { + disable_memory_protection(); + count += apply_patch("di_readlimit", di_readlimit_old, sizeof(di_readlimit_old), di_readlimit_patch, sizeof(di_readlimit_patch), 12); + count += apply_patch("isfs_permissions", isfs_permissions_old, sizeof(isfs_permissions_old), isfs_permissions_patch, sizeof(isfs_permissions_patch), 0); + count += apply_patch("es_setuid", setuid_old, sizeof(setuid_old), setuid_patch, sizeof(setuid_patch), 0); + count += apply_patch("es_identify", es_identify_old, sizeof(es_identify_old), es_identify_patch, sizeof(es_identify_patch), 2); + count += apply_patch("hash_check", hash_old, sizeof(hash_old), hash_patch, sizeof(hash_patch), 1); + count += apply_patch("new_hash_check", new_hash_old, sizeof(new_hash_old), hash_patch, sizeof(hash_patch), 1); + } + return count; +} diff --git a/cios_installer/runtime_ios_patch.h b/cios_installer/runtime_ios_patch.h new file mode 100644 index 00000000..bdbd76dd --- /dev/null +++ b/cios_installer/runtime_ios_patch.h @@ -0,0 +1,14 @@ +// Copyright 2010 Joseph Jordan +// This code is licensed to you under the terms of the GNU GPL, version 2; +// see file COPYING or http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt + +#ifndef __RUNTIMEIOSPATCH_H +#define __RUNTIMEIOSPATCH_H + +#include + +#define HAVE_AHBPROT ((*(vu32*)0xcd800064 == 0xFFFFFFFF) ? 1 : 0) + +u32 IOSPATCH_Apply(); + +#endif diff --git a/cios_installer/sha1.c b/cios_installer/sha1.c new file mode 100644 index 00000000..83a533a7 --- /dev/null +++ b/cios_installer/sha1.c @@ -0,0 +1,172 @@ +/* +SHA-1 in C +By Steve Reid +100% Public Domain + +Test Vectors (from FIPS PUB 180-1) +"abc" + A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D +"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" + 84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1 +A million repetitions of "a" + 34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F +*/ + +/* #define LITTLE_ENDIAN * This should be #define'd if true. */ +#define SHA1HANDSOFF + +#include +#include +#include "sha1.h" + +#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) + +/* blk0() and blk() perform the initial expand. */ +/* I got the idea of expanding during the round function from SSLeay */ +#ifdef LITTLE_ENDIAN +#define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \ + |(rol(block->l[i],8)&0x00FF00FF)) +#else +#define blk0(i) block->l[i] +#endif +#define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \ + ^block->l[(i+2)&15]^block->l[i&15],1)) + +/* (R0+R1), R2, R3, R4 are the different operations used in SHA1 */ +#define R0(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk0(i)+0x5A827999+rol(v,5);w=rol(w,30); +#define R1(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30); +#define R2(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30); +#define R3(v,w,x,y,z,i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30); +#define R4(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30); + + +/* Hash a single 512-bit block. This is the core of the algorithm. */ + +void SHA1Transform(unsigned long state[5], unsigned char buffer[64]) +{ +unsigned long a, b, c, d, e; +typedef union { + unsigned char c[64]; + unsigned long l[16]; +} CHAR64LONG16; +CHAR64LONG16* block; +#ifdef SHA1HANDSOFF +static unsigned char workspace[64]; + block = (CHAR64LONG16*)workspace; + memcpy(block, buffer, 64); +#else + block = (CHAR64LONG16*)buffer; +#endif + /* Copy context->state[] to working vars */ + a = state[0]; + b = state[1]; + c = state[2]; + d = state[3]; + e = state[4]; + /* 4 rounds of 20 operations each. Loop unrolled. */ + R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3); + R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7); + R0(c,d,e,a,b, 8); R0(b,c,d,e,a, 9); R0(a,b,c,d,e,10); R0(e,a,b,c,d,11); + R0(d,e,a,b,c,12); R0(c,d,e,a,b,13); R0(b,c,d,e,a,14); R0(a,b,c,d,e,15); + R1(e,a,b,c,d,16); R1(d,e,a,b,c,17); R1(c,d,e,a,b,18); R1(b,c,d,e,a,19); + R2(a,b,c,d,e,20); R2(e,a,b,c,d,21); R2(d,e,a,b,c,22); R2(c,d,e,a,b,23); + R2(b,c,d,e,a,24); R2(a,b,c,d,e,25); R2(e,a,b,c,d,26); R2(d,e,a,b,c,27); + R2(c,d,e,a,b,28); R2(b,c,d,e,a,29); R2(a,b,c,d,e,30); R2(e,a,b,c,d,31); + R2(d,e,a,b,c,32); R2(c,d,e,a,b,33); R2(b,c,d,e,a,34); R2(a,b,c,d,e,35); + R2(e,a,b,c,d,36); R2(d,e,a,b,c,37); R2(c,d,e,a,b,38); R2(b,c,d,e,a,39); + R3(a,b,c,d,e,40); R3(e,a,b,c,d,41); R3(d,e,a,b,c,42); R3(c,d,e,a,b,43); + R3(b,c,d,e,a,44); R3(a,b,c,d,e,45); R3(e,a,b,c,d,46); R3(d,e,a,b,c,47); + R3(c,d,e,a,b,48); R3(b,c,d,e,a,49); R3(a,b,c,d,e,50); R3(e,a,b,c,d,51); + R3(d,e,a,b,c,52); R3(c,d,e,a,b,53); R3(b,c,d,e,a,54); R3(a,b,c,d,e,55); + R3(e,a,b,c,d,56); R3(d,e,a,b,c,57); R3(c,d,e,a,b,58); R3(b,c,d,e,a,59); + R4(a,b,c,d,e,60); R4(e,a,b,c,d,61); R4(d,e,a,b,c,62); R4(c,d,e,a,b,63); + R4(b,c,d,e,a,64); R4(a,b,c,d,e,65); R4(e,a,b,c,d,66); R4(d,e,a,b,c,67); + R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71); + R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75); + R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79); + /* Add the working vars back into context.state[] */ + state[0] += a; + state[1] += b; + state[2] += c; + state[3] += d; + state[4] += e; + /* Wipe variables */ + a = b = c = d = e = 0; +} + + +/* SHA1Init - Initialize new context */ + +void SHA1Init(SHA1_CTX* context) +{ + /* SHA1 initialization constants */ + context->state[0] = 0x67452301; + context->state[1] = 0xEFCDAB89; + context->state[2] = 0x98BADCFE; + context->state[3] = 0x10325476; + context->state[4] = 0xC3D2E1F0; + context->count[0] = context->count[1] = 0; +} + + +/* Run your data through this. */ + +void SHA1Update(SHA1_CTX* context, unsigned char* data, unsigned int len) +{ +unsigned int i, j; + + j = (context->count[0] >> 3) & 63; + if ((context->count[0] += len << 3) < (len << 3)) context->count[1]++; + context->count[1] += (len >> 29); + if ((j + len) > 63) { + memcpy(&context->buffer[j], data, (i = 64-j)); + SHA1Transform(context->state, context->buffer); + for ( ; i + 63 < len; i += 64) { + SHA1Transform(context->state, &data[i]); + } + j = 0; + } + else i = 0; + memcpy(&context->buffer[j], &data[i], len - i); +} + + +/* Add padding and return the message digest. */ + +void SHA1Final(unsigned char digest[20], SHA1_CTX* context) +{ +unsigned long i, j; +unsigned char finalcount[8]; + + for (i = 0; i < 8; i++) { + finalcount[i] = (unsigned char)((context->count[(i >= 4 ? 0 : 1)] + >> ((3-(i & 3)) * 8) ) & 255); /* Endian independent */ + } + SHA1Update(context, (unsigned char *)"\200", 1); + while ((context->count[0] & 504) != 448) { + SHA1Update(context, (unsigned char *)"\0", 1); + } + SHA1Update(context, finalcount, 8); /* Should cause a SHA1Transform() */ + for (i = 0; i < 20; i++) { + digest[i] = (unsigned char) + ((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255); + } + /* Wipe variables */ + i = j = 0; + memset(context->buffer, 0, 64); + memset(context->state, 0, 20); + memset(context->count, 0, 8); + memset(&finalcount, 0, 8); +#ifdef SHA1HANDSOFF /* make SHA1Transform overwrite it's own static vars */ + SHA1Transform(context->state, context->buffer); +#endif +} + +void SHA1(unsigned char *ptr, unsigned int size, unsigned char *outbuf) { + SHA1_CTX ctx; + + SHA1Init(&ctx); + SHA1Update(&ctx, ptr, size); + SHA1Final(outbuf, &ctx); +} + diff --git a/cios_installer/sha1.h b/cios_installer/sha1.h new file mode 100644 index 00000000..757af1cd --- /dev/null +++ b/cios_installer/sha1.h @@ -0,0 +1,12 @@ +typedef struct { + unsigned long state[5]; + unsigned long count[2]; + unsigned char buffer[64]; +} SHA1_CTX; + +void SHA1Transform(unsigned long state[5], unsigned char buffer[64]); +void SHA1Init(SHA1_CTX* context); +void SHA1Update(SHA1_CTX* context, unsigned char* data, unsigned int len); +void SHA1Final(unsigned char digest[20], SHA1_CTX* context); + +void SHA1(unsigned char *ptr, unsigned int size, unsigned char *outbuf); diff --git a/cios_installer/tmd_add_module.c b/cios_installer/tmd_add_module.c new file mode 100644 index 00000000..8d685491 --- /dev/null +++ b/cios_installer/tmd_add_module.c @@ -0,0 +1,114 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "patchmii_core.h" +#include "sha1.h" +#include "debug.h" +#include "http.h" +//#include "haxx_certs.h" +#include +//#include "ehc_elf.h" +#include "mload_elf.h" + +//#define ADD_EHC + +#define ADD_HAXX // active this if you want to play with starlet without installing 50 times an hour +//#define REMOVE_OH0 +u32 save_nus_object (u16 index, u8 *buf, u32 size); + +/* add module inside the tmd + take care of alignement. +*/ + +extern int INPUT_TITLEID_L; + +void tmd_add_module(tmd *p_tmd,const u8 *elf, u32 elf_size) +{ + int ncid; + int i,found=0; + tmd_content *p_cr = (tmd_content *)TMD_CONTENTS(p_tmd); + sha1 hash; + int content_size = (elf_size+31)&~31; + u8 *buf = memalign(32,content_size); + int index = p_tmd->num_contents; + memset((void *) buf,0,content_size); + + memcpy((void *) buf,elf,elf_size); + + + ncid = 10; + while(!found){ + found = 1; + ncid++; + for (i=0;inum_contents;i++) { + if(p_cr[i].cid == ncid){ found = 0;break;} + } + } + + debug_printf("found a free cid: %x\n",ncid); + p_cr[index].cid = ncid; + p_cr[index].type = 0x0001; // shared is 0x8001 + p_cr[index].size = content_size; + p_cr[index].index = index; + + //calc sha + SHA1(buf, content_size, hash); + memcpy(p_cr[index].hash, hash, sizeof hash); + p_tmd->num_contents++; + save_nus_object(ncid, buf, content_size); +} + +int add_custom_modules(tmd *p_tmd) +{ + tmd_content tmp; + int tmd_dirty=0; + tmd_content *p_cr = (tmd_content *)TMD_CONTENTS(p_tmd); +#ifdef REMOVE_OH0 // remove oh0 module + { + int i; + debug_printf("removing cid %d\n",p_cr[2].cid); + memmove(&p_cr[2],&p_cr[3],p_tmd->num_contents*sizeof(tmd_content)-2); + p_tmd->num_contents--; + for (i=0;inum_contents;i++) + p_cr[i].index = i; + tmd_dirty = 1; + } +#endif +#ifdef ADD_EHC +/* add ehc module. We need it installed before OH0 and OH1, because IOS loads it in the order of the tmd. + for some reason, we cant shift all indexes or the IOS_Reload will crashed without saying anything. +*/ + debug_printf("adding EHC module\n"); + tmd_add_module(p_tmd,ehc_elf,ehc_elf_size); + + tmp = p_cr[3]; // inverse ehc and oh0 place in tmd + p_cr[3] = p_cr[p_tmd->num_contents-1]; + p_cr[p_tmd->num_contents-1] = tmp; + tmd_dirty = 1; +#endif +#ifdef ADD_HAXX +/*add haxx module. We need it installed before OH0 and OH1, because IOS loads it in the order of the tmd. + for some reason, we cant shift all indexes or the IOS_Reload will crashed without saying anything. +*/ + debug_printf("adding haxx module\n"); + tmd_add_module(p_tmd,mload_elf,mload_elf_size); + + tmp = p_cr[3-(INPUT_TITLEID_L==57)]; // inverse ehc and oh0 place in tmd + p_cr[3-(INPUT_TITLEID_L==57)] = p_cr[p_tmd->num_contents-1]; + p_cr[p_tmd->num_contents-1] = tmp; + + + tmd_dirty = 1; +#endif + return tmd_dirty; +} diff --git a/data/app_booter.dol b/data/app_booter.dol deleted file mode 100644 index 62c156fe..00000000 Binary files a/data/app_booter.dol and /dev/null differ diff --git a/data/certs.dat b/data/certs.dat deleted file mode 100644 index 2184107d..00000000 Binary files a/data/certs.dat and /dev/null differ diff --git a/data/magic_patcher.o b/data/magic_patcher.o deleted file mode 100644 index ad7af879..00000000 Binary files a/data/magic_patcher.o and /dev/null differ diff --git a/data/stub.bin b/data/stub.bin deleted file mode 100644 index 63a37a0b..00000000 Binary files a/data/stub.bin and /dev/null differ diff --git a/ehcmodule/MakeIt.bat b/ehcmodule/MakeIt.bat new file mode 100644 index 00000000..a6340c2d --- /dev/null +++ b/ehcmodule/MakeIt.bat @@ -0,0 +1,4 @@ + +make + +pause diff --git a/ehcmodule/Makefile b/ehcmodule/Makefile new file mode 100644 index 00000000..3618ccb9 --- /dev/null +++ b/ehcmodule/Makefile @@ -0,0 +1,144 @@ +#--------------------------------------------------------------------------------- +# Clear the implicit built in rules +#--------------------------------------------------------------------------------- +.SUFFIXES: + +#--------------------------------------------------------------------------------- +# TARGET is the name of the output +# BUILD is the directory where object files & intermediate files will be placed +# SOURCES is a list of directories containing source code +# INCLUDES is a list of directories containing extra header files +#--------------------------------------------------------------------------------- +TARGET := $(notdir $(CURDIR)) +BUILD := build +SOURCES := source ../libcios/source ../wii_wbfs +DATA := data +INCLUDES := include ../tinyehci ../libcios/include ../wii_wbfs +SCRIPTDIR := scripts +BIN := bin + +STRIPIOS := ../stripios/stripios.exe + +LIBS := +LIBDIRS := + +export IOS_MODULE=ehc + +CFLAGS+=-D$(IOS_MODULE) $(DEBUG) + +#--------------------------------------------------------------------------------- +# the prefix on the compiler executables +#--------------------------------------------------------------------------------- +#$(DEVKITARM)/bin/ +PREFIX := $(DEVKITARM)/bin/arm-eabi- +CC := $(PREFIX)gcc +CXX := $(PREFIX)g++ +AR := $(PREFIX)ar +OBJCOPY := $(PREFIX)objcopy +LD := $(PREFIX)g++ +AS := $(PREFIX)g++ + +#--------------------------------------------------------------------------------- +# linker script +#--------------------------------------------------------------------------------- +LINKSCRIPT := $(ROOT)/$(SCRIPTDIR)/link.ld +SPECS := $(ROOT)/$(SCRIPTDIR)/nostart.specs + +ifeq ($(BUILDING),$(emptystring)) + +export ROOT := $(CURDIR) + + +all: + @[ -d $(BUILD) ] || mkdir -p $(BUILD) + @$(MAKE) -C $(BUILD) --no-print-directory -f $(CURDIR)/Makefile BUILDING=all +clean: + @echo clean ... + @rm -fr $(BUILD) $(BIN)/*.elf +else + +TARGET := $(notdir $(ROOT)) +STRIPIOS := $(ROOT)/$(STRIPIOS) +#---------------------------------------------------- +# MS Visual Studio Style Fix: +#---------------------------------------------------- +#STYLEFIX = 2>&1 | sed -e 's/\([a-zA-Z\.]\+\):\([0-9]\+\):\([0-9]\+:\)\?\(.\+\)/\1(\2):\4/' -e 's/undefined/error: undefined/' +STYLEFIX ?= + +#--------------------------------------------------------------------------------- +# automatically build a list of object files for our project +#--------------------------------------------------------------------------------- +OUTPUT := $(ROOT)/$(BIN)/$(TARGET) +CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(ROOT)/$(dir)/*.c))) +CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(ROOT)/$(dir)/*.cpp))) +sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(ROOT)/$(dir)/*.s))) +SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(ROOT)/$(dir)/*.S))) +BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(ROOT)/$(dir)/*.*))) + +OFILES := $(addsuffix _bin.o,$(BINFILES)) \ + $(CPPFILES:.cpp=_cpp.o) $(CFILES:.c=_c.o) \ + $(sFILES:.s=_s.o) $(SFILES:.S=_S.o) + +DEPENDS := $(OFILES:.o=.d) + +VPATH = $(foreach dir,$(SOURCES),$(ROOT)/$(dir)) + + +#--------------------------------------------------------------------------------- +# options for code generation +#--------------------------------------------------------------------------------- +INCLUDE := $(foreach dir,$(INCLUDES),-I$(ROOT)/$(dir)) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ + -I$(ROOT)/$(BUILD) + +#--------------------------------------------------------------------------------- +# build a list of library paths +#--------------------------------------------------------------------------------- +LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) + +ARCH = -mcpu=arm9tdmi -mtune=arm9tdmi -mthumb -mthumb-interwork -mbig-endian + +CFLAGS += -g $(ARCH) $(INCLUDE) -fno-strict-aliasing -Wall -Os -fomit-frame-pointer -ffast-math -fverbose-asm -Wpointer-arith -Winline -Wundef -g -ffunction-sections -fdata-sections -fno-exceptions +CFLAGS += -Wstrict-prototypes + + +AFLAGS = -g $(ARCH) -x assembler-with-cpp + +LDFLAGS = -g $(ARCH) -specs=$(SPECS) -T$(LINKSCRIPT) $(LIBPATHS) $(LIBS) -Wl,--gc-sections -Wl,-static -Wl,-Map,$(TARGET).map -nostartfiles + + +$(OUTPUT).elf: $(TARGET).elf + @echo stripping $(notdir $@) + @$(STRIPIOS) $< $@ + + +%.elf: $(OFILES) + @echo linking $(notdir $@) + @$(LD) -g -o $@ $(OFILES) $(LDFLAGS) $(STYLEFIX) + + +%_cpp.o : %.cpp + @echo $(notdir $<) + @$(CXX) -MMD -MF $*_cpp.d $(CFLAGS) -c $< -o$@ $(STYLEFIX) + +%_c.o : %.c + @echo $(notdir $<) + @$(CC) -MMD -MF $*_c.d $(CFLAGS) -c $< -o$@ $(STYLEFIX) + +%_s.o : %.s + @echo $(notdir $<) + @$(AS) -MMD -MF $*_s.d $(AFLAGS) -c $< -o$@ $(STYLEFIX) + +%_bin.o : %.bin + @echo $(notdir $<) + @$(bin2o) + +-include $(DEPENDS) + +define bin2o + @echo -e "\t.section .rodata\n\t.align 4\n\t.global $(*)\n\t.global $(*)_end\n$(*):\n\t.incbin \"$(subst /,\\\\\\\\,$(shell echo $< | sed 's=/==;s=/=:/='))\"\n$(*)_end:\n" > $@.s + @$(CC) $(ASFLAGS) $(AFLAGS) -c $@.s -o $@ + @rm -rf $@.s +endef + +endif diff --git a/ehcmodule/bin/convert.bat b/ehcmodule/bin/convert.bat new file mode 100644 index 00000000..62e3ef26 --- /dev/null +++ b/ehcmodule/bin/convert.bat @@ -0,0 +1,11 @@ +del *.c +del *.h +filetochar ehcmodule.elf ehcmodule_5 -h -align 32 +del C:\devkitPro\soft\usbloader\source\mload\modules\ehcmodule_5.c +del C:\devkitPro\soft\usbloader\source\mload\modules\ehcmodule_5.h +copy ehcmodule_5.c C:\devkitPro\soft\usbloader\source\mload\modules\ +copy ehcmodule_5.h C:\devkitPro\soft\usbloader\source\mload\modules\ + + + + diff --git a/source/mload/modules/ehcmodule_5.c b/ehcmodule/bin/ehcmodule_5.c similarity index 99% rename from source/mload/modules/ehcmodule_5.c rename to ehcmodule/bin/ehcmodule_5.c index 94fd5fa6..2687a359 100644 --- a/source/mload/modules/ehcmodule_5.c +++ b/ehcmodule/bin/ehcmodule_5.c @@ -1,927 +1,927 @@ -#define size_ehcmodule_5 25776 - -unsigned char ehcmodule_5[25776] __attribute__((aligned (32)))={ - 127, 69, 76, 70, 1, 2, 1, 97, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 40, 0, 0, 0, 1, 19, 112, 0, 0, 0, 0, 0, 52, 0, 0, 0, - 0, 0, 0, 6, 6, 0, 52, 0, 32, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, - 0, 0, 0, 160, 0, 240, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 212, 0, 0, 0, 160, 0, 0, 0, 160, 0, 0, 0, 52, 0, 0, 0, - 52, 0, 240, 0, 0, 0, 0, 0, 4, 0, 0, 0, 1, 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 212, 0, 0, 0, 212, 0, 240, 0, - 0, 0, 0, 64, 0, 0, 0, 0, 1, 0, 0, 1, 8, 19, 112, 0, 0, 19, 112, 0, 0, 0, 0, 90, 32, 0, 0, 90, 32, 0, 240, 0, 5, 0, 0, - 0, 4, 0, 0, 0, 1, 0, 0, 91, 40, 19, 112, 96, 0, 19, 112, 96, 0, 0, 0, 9, 136, 0, 2, 152, 8, 0, 240, 0, 6, 0, 0, 0, 4, - 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 6, 0, 0, 0, 11, 0, 0, 0, 4, 0, 0, 0, 9, 19, 112, 0, 0, 0, 0, 0, 125, 0, 0, 0, 120, - 0, 0, 0, 126, 0, 0, 48, 0, 0, 0, 0, 127, 19, 114, 246, 8, 227, 160, 0, 0, 227, 160, 16, 0, 229, 159, 49, 0, 225, 47, - 255, 19, 229, 159, 192, 252, 229, 156, 192, 0, 225, 160, 0, 0, 231, 156, 193, 11, 225, 160, 0, 0, 225, 47, 255, 28, - 225, 160, 0, 0, 225, 160, 0, 0, 227, 160, 176, 63, 234, 255, 255, 245, 225, 160, 0, 0, 225, 160, 0, 0, 227, 160, 176, - 64, 234, 255, 255, 241, 227, 160, 0, 0, 238, 7, 15, 21, 225, 47, 255, 30, 225, 160, 0, 0, 225, 160, 0, 0, 225, 160, - 0, 0, 227, 24, 0, 16, 10, 0, 0, 18, 227, 200, 128, 16, 227, 160, 32, 16, 229, 135, 32, 0, 225, 160, 0, 0, 225, 160, - 32, 13, 225, 160, 0, 0, 229, 159, 208, 144, 225, 160, 0, 0, 233, 45, 95, 254, 225, 160, 0, 0, 235, 0, 0, 15, 232, 189, - 95, 254, 225, 160, 0, 0, 225, 160, 208, 2, 227, 16, 0, 1, 10, 0, 0, 2, 225, 160, 0, 0, 227, 160, 0, 4, 235, 0, 0, 5, - 227, 24, 0, 1, 10, 0, 0, 1, 229, 159, 240, 88, 225, 160, 0, 0, 229, 159, 240, 84, 225, 160, 0, 0, 229, 159, 240, 80, - 225, 160, 0, 0, 229, 159, 32, 76, 225, 47, 255, 18, 225, 160, 0, 0, 238, 19, 15, 16, 225, 47, 255, 30, 225, 160, 0, - 0, 225, 160, 0, 0, 238, 3, 15, 16, 225, 47, 255, 30, 225, 160, 0, 0, 225, 160, 0, 0, 69, 72, 67, 95, 67, 70, 71, 0, - 18, 52, 0, 1, 0, 0, 0, 0, 19, 112, 16, 157, 19, 114, 194, 96, 19, 114, 248, 8, 255, 255, 30, 128, 255, 255, 30, 156, - 255, 255, 29, 68, 19, 112, 13, 61, 225, 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 181, 0, 40, 2, 208, - 16, 40, 2, 216, 4, 40, 0, 208, 7, 40, 1, 209, 19, 224, 7, 40, 16, 208, 12, 40, 17, 209, 14, 224, 11, 75, 8, 104, 24, - 224, 11, 72, 7, 224, 9, 75, 7, 34, 1, 96, 26, 32, 0, 224, 4, 72, 6, 224, 2, 72, 6, 224, 0, 72, 6, 188, 2, 71, 8, 19, - 112, 96, 48, 19, 112, 72, 101, 19, 112, 105, 168, 19, 112, 65, 97, 19, 112, 66, 169, 255, 255, 253, 102, 181, 112, 28, - 12, 28, 5, 240, 5, 252, 17, 28, 6, 32, 1, 66, 64, 240, 5, 252, 0, 14, 43, 115, 35, 12, 43, 115, 99, 10, 43, 115, 163, - 124, 34, 124, 99, 6, 18, 4, 27, 67, 19, 124, 162, 115, 229, 2, 18, 67, 19, 124, 226, 6, 45, 67, 19, 28, 32, 96, 29, - 48, 12, 33, 4, 240, 5, 252, 0, 124, 35, 124, 96, 6, 27, 4, 0, 67, 24, 124, 163, 33, 4, 2, 27, 67, 24, 124, 227, 67, - 24, 240, 5, 251, 243, 28, 48, 240, 5, 251, 216, 32, 0, 188, 112, 188, 2, 71, 8, 181, 8, 75, 12, 28, 1, 34, 32, 104, - 24, 240, 5, 251, 249, 40, 0, 209, 13, 72, 9, 240, 5, 251, 208, 240, 4, 252, 7, 32, 200, 240, 0, 255, 33, 240, 4, 252, - 12, 32, 200, 240, 0, 255, 28, 231, 244, 188, 8, 188, 2, 71, 8, 19, 112, 96, 48, 19, 112, 96, 84, 181, 8, 75, 4, 28, - 1, 104, 24, 240, 5, 251, 164, 188, 8, 188, 1, 71, 0, 70, 192, 19, 112, 96, 48, 181, 240, 176, 139, 144, 4, 145, 5, 28, - 8, 28, 17, 28, 23, 146, 7, 240, 5, 251, 176, 76, 129, 104, 35, 43, 0, 209, 0, 224, 241, 168, 9, 240, 3, 253, 172, 75, - 126, 96, 24, 40, 0, 208, 4, 35, 128, 154, 9, 1, 27, 66, 154, 208, 4, 35, 1, 74, 122, 66, 91, 96, 19, 224, 224, 78, 121, - 72, 122, 104, 51, 24, 26, 42, 0, 208, 104, 43, 0, 219, 102, 75, 116, 104, 26, 28, 81, 209, 98, 28, 53, 75, 112, 104, - 48, 104, 28, 33, 31, 34, 16, 52, 31, 24, 18, 67, 140, 146, 2, 33, 16, 28, 34, 240, 3, 255, 74, 40, 0, 209, 0, 224, 195, - 120, 35, 43, 67, 209, 11, 120, 99, 43, 73, 209, 8, 120, 163, 43, 83, 209, 5, 120, 227, 43, 79, 209, 2, 75, 103, 96, - 51, 224, 8, 104, 43, 43, 0, 208, 2, 35, 0, 96, 43, 231, 218, 35, 1, 66, 91, 96, 43, 121, 98, 121, 163, 2, 18, 4, 27, - 24, 211, 121, 34, 77, 95, 24, 155, 121, 226, 28, 40, 6, 18, 24, 155, 10, 219, 147, 3, 154, 3, 75, 91, 33, 0, 96, 26, - 34, 128, 1, 18, 240, 5, 250, 55, 75, 84, 104, 26, 75, 85, 66, 154, 209, 30, 32, 7, 35, 0, 70, 132, 70, 102, 64, 30, - 209, 4, 16, 218, 152, 2, 73, 82, 0, 146, 80, 80, 24, 226, 122, 18, 42, 0, 208, 10, 16, 218, 92, 168, 33, 1, 64, 177, - 67, 8, 84, 168, 154, 2, 28, 16, 154, 3, 24, 128, 144, 2, 34, 128, 51, 1, 1, 210, 66, 147, 209, 227, 75, 63, 34, 31, - 104, 27, 153, 5, 51, 31, 67, 147, 34, 128, 2, 18, 147, 3, 145, 2, 78, 60, 146, 6, 224, 97, 155, 4, 32, 15, 10, 93, 104, - 51, 67, 133, 66, 157, 208, 63, 73, 56, 75, 57, 104, 10, 96, 53, 66, 154, 209, 33, 75, 57, 28, 40, 104, 28, 28, 33, 240, - 5, 250, 201, 75, 55, 8, 193, 0, 138, 88, 210, 35, 0, 147, 1, 35, 7, 64, 24, 70, 140, 35, 0, 144, 0, 224, 9, 72, 47, - 70, 97, 92, 64, 28, 1, 65, 25, 32, 1, 66, 8, 208, 0, 25, 18, 51, 1, 153, 0, 66, 139, 211, 242, 60, 1, 64, 44, 25, 21, - 75, 34, 104, 28, 27, 100, 44, 16, 220, 10, 44, 16, 208, 9, 34, 128, 152, 3, 33, 0, 2, 18, 240, 5, 249, 202, 44, 0, 221, - 8, 224, 0, 36, 16, 28, 40, 28, 33, 154, 3, 240, 3, 254, 163, 40, 0, 208, 29, 154, 4, 152, 6, 4, 209, 12, 73, 26, 67, - 28, 60, 66, 187, 216, 0, 28, 28, 154, 3, 152, 2, 24, 137, 28, 34, 240, 5, 249, 110, 152, 2, 28, 33, 240, 5, 250, 196, - 155, 2, 152, 4, 25, 27, 27, 63, 16, 164, 25, 0, 147, 2, 144, 4, 47, 0, 209, 155, 224, 5, 32, 128, 2, 0, 176, 11, 188, - 240, 188, 2, 71, 8, 152, 5, 153, 7, 240, 5, 250, 207, 32, 0, 231, 245, 70, 192, 19, 112, 106, 56, 19, 112, 105, 176, - 19, 112, 96, 24, 19, 112, 96, 12, 128, 0, 0, 1, 127, 255, 255, 255, 19, 112, 122, 96, 19, 112, 105, 180, 19, 112, 130, - 96, 181, 56, 28, 12, 240, 5, 250, 126, 30, 5, 209, 38, 44, 0, 208, 36, 104, 34, 42, 0, 208, 33, 120, 17, 120, 83, 6, - 9, 4, 27, 67, 11, 120, 145, 2, 9, 67, 11, 120, 209, 67, 11, 43, 6, 209, 21, 123, 17, 123, 83, 6, 9, 4, 27, 67, 11, 123, - 145, 2, 9, 67, 11, 123, 209, 67, 11, 43, 122, 208, 2, 43, 136, 209, 7, 224, 2, 72, 5, 33, 21, 224, 1, 72, 4, 33, 20, - 240, 4, 250, 146, 28, 40, 188, 56, 188, 2, 71, 8, 70, 192, 19, 112, 1, 153, 181, 240, 176, 145, 75, 206, 33, 128, 104, - 24, 240, 5, 250, 9, 33, 32, 240, 5, 250, 56, 144, 8, 240, 0, 251, 131, 240, 5, 250, 123, 33, 120, 240, 5, 250, 52, 153, - 8, 72, 199, 240, 5, 250, 32, 72, 198, 154, 8, 28, 1, 35, 0, 240, 5, 249, 240, 73, 196, 144, 9, 32, 205, 240, 4, 250, - 17, 33, 0, 36, 1, 145, 7, 145, 11, 145, 6, 39, 0, 152, 8, 169, 15, 34, 0, 240, 5, 250, 34, 144, 14, 155, 14, 43, 0, - 209, 246, 44, 0, 208, 2, 152, 9, 240, 5, 249, 235, 74, 185, 158, 15, 35, 0, 96, 19, 46, 0, 209, 87, 75, 183, 104, 27, - 43, 0, 208, 5, 75, 182, 104, 27, 43, 0, 209, 1, 74, 181, 96, 19, 36, 0, 47, 0, 208, 222, 75, 178, 104, 27, 43, 0, 208, - 218, 75, 175, 104, 27, 43, 0, 209, 214, 75, 175, 104, 27, 43, 0, 208, 9, 240, 3, 252, 252, 40, 0, 208, 5, 240, 3, 252, - 248, 40, 0, 208, 1, 240, 3, 252, 244, 75, 168, 104, 27, 147, 4, 43, 0, 209, 36, 77, 167, 75, 167, 104, 42, 58, 1, 66, - 154, 216, 30, 78, 159, 76, 165, 35, 1, 96, 51, 104, 32, 33, 1, 74, 164, 240, 3, 253, 190, 155, 4, 96, 51, 40, 0, 208, - 9, 35, 128, 104, 42, 0, 155, 66, 154, 209, 4, 104, 35, 33, 128, 2, 9, 24, 91, 96, 35, 75, 154, 74, 156, 104, 25, 104, - 18, 66, 145, 211, 1, 34, 0, 96, 26, 75, 145, 36, 0, 104, 27, 43, 0, 209, 153, 152, 9, 73, 138, 240, 5, 249, 131, 36, - 1, 231, 147, 120, 51, 120, 112, 6, 27, 4, 0, 67, 24, 120, 179, 2, 27, 67, 24, 120, 243, 67, 24, 56, 1, 40, 6, 217, 0, - 226, 152, 240, 4, 254, 237, 0, 10, 0, 73, 2, 151, 2, 151, 2, 151, 0, 7, 0, 92, 38, 1, 37, 1, 226, 150, 123, 51, 123, - 116, 6, 27, 4, 36, 67, 28, 123, 179, 73, 119, 2, 27, 67, 28, 123, 243, 67, 28, 28, 32, 240, 5, 248, 221, 40, 0, 209, - 11, 125, 51, 125, 117, 6, 27, 4, 45, 67, 29, 125, 179, 2, 27, 67, 29, 125, 243, 38, 1, 67, 29, 226, 122, 28, 32, 73, - 120, 240, 5, 248, 203, 40, 0, 208, 0, 226, 108, 125, 51, 125, 117, 6, 27, 4, 45, 67, 29, 125, 179, 34, 1, 2, 27, 67, - 29, 125, 243, 39, 0, 67, 29, 75, 103, 38, 1, 96, 26, 75, 103, 96, 24, 72, 110, 240, 0, 251, 48, 75, 109, 34, 4, 104, - 27, 104, 155, 96, 154, 240, 1, 248, 39, 226, 87, 122, 50, 122, 115, 6, 18, 4, 27, 67, 19, 122, 178, 2, 18, 67, 19, 122, - 242, 67, 19, 154, 6, 66, 154, 209, 0, 226, 70, 240, 1, 248, 46, 38, 1, 37, 0, 226, 68, 126, 51, 126, 116, 6, 27, 4, - 36, 67, 28, 126, 179, 124, 50, 2, 27, 67, 28, 126, 243, 6, 18, 67, 28, 124, 115, 4, 27, 67, 19, 124, 178, 2, 18, 67, - 19, 124, 242, 67, 26, 146, 4, 125, 51, 125, 117, 6, 27, 4, 45, 67, 29, 125, 179, 2, 27, 67, 29, 125, 243, 67, 29, 155, - 6, 43, 0, 209, 16, 123, 51, 43, 0, 209, 13, 122, 50, 122, 115, 122, 176, 6, 18, 4, 27, 67, 19, 2, 0, 67, 3, 122, 240, - 67, 24, 240, 1, 248, 10, 28, 6, 224, 0, 38, 0, 153, 4, 28, 32, 25, 73, 145, 10, 0, 201, 240, 5, 249, 76, 34, 0, 28, - 37, 146, 5, 224, 7, 104, 40, 104, 105, 240, 5, 249, 68, 155, 5, 53, 8, 51, 1, 147, 5, 153, 5, 154, 10, 66, 145, 219, - 243, 73, 48, 104, 11, 147, 5, 43, 0, 208, 0, 225, 213, 154, 15, 123, 16, 123, 83, 6, 0, 4, 27, 67, 3, 123, 144, 2, 0, - 67, 3, 123, 208, 67, 3, 72, 51, 66, 131, 209, 0, 225, 38, 66, 131, 216, 31, 43, 6, 216, 11, 43, 5, 211, 0, 225, 180, - 43, 1, 209, 0, 224, 159, 43, 0, 208, 119, 43, 2, 208, 0, 225, 70, 225, 171, 43, 27, 216, 6, 43, 26, 211, 0, 224, 172, - 43, 12, 208, 0, 225, 61, 224, 156, 74, 37, 66, 147, 209, 0, 224, 167, 50, 1, 66, 147, 208, 0, 225, 52, 224, 246, 72, - 34, 66, 131, 209, 0, 224, 226, 66, 131, 216, 68, 74, 32, 66, 147, 209, 0, 224, 182, 66, 147, 216, 8, 58, 12, 66, 147, - 209, 0, 225, 17, 50, 2, 66, 147, 208, 0, 225, 31, 225, 20, 74, 25, 66, 147, 209, 0, 225, 22, 50, 1, 66, 147, 208, 0, - 225, 22, 224, 169, 70, 192, 19, 112, 96, 48, 19, 112, 96, 109, 0, 152, 150, 128, 19, 112, 1, 65, 19, 112, 105, 208, - 19, 112, 105, 164, 19, 112, 105, 168, 19, 112, 96, 20, 19, 112, 106, 52, 19, 114, 198, 0, 0, 0, 15, 254, 19, 112, 105, - 160, 19, 112, 106, 96, 19, 114, 198, 4, 19, 112, 96, 121, 19, 112, 21, 69, 19, 112, 96, 60, 85, 77, 83, 3, 85, 77, 83, - 1, 85, 77, 83, 130, 85, 77, 83, 16, 85, 77, 83, 128, 73, 196, 66, 139, 209, 0, 225, 63, 66, 139, 216, 7, 73, 194, 66, - 139, 208, 119, 73, 194, 66, 139, 208, 0, 224, 219, 224, 220, 74, 192, 66, 147, 209, 0, 225, 36, 50, 1, 66, 147, 208, - 0, 224, 210, 225, 20, 46, 0, 209, 0, 225, 55, 105, 162, 105, 35, 136, 21, 106, 34, 136, 27, 136, 16, 104, 34, 2, 25, - 10, 27, 120, 18, 67, 11, 2, 41, 10, 45, 67, 13, 146, 5, 4, 45, 104, 162, 12, 45, 120, 18, 149, 0, 2, 5, 10, 0, 67, 40, - 4, 0, 12, 0, 144, 1, 107, 32, 4, 27, 144, 2, 12, 27, 28, 48, 153, 5, 240, 1, 251, 44, 225, 3, 46, 0, 209, 0, 225, 17, - 104, 35, 28, 48, 120, 25, 104, 163, 136, 26, 105, 35, 240, 1, 251, 12, 224, 247, 46, 0, 208, 0, 225, 5, 104, 35, 105, - 34, 120, 24, 104, 163, 120, 25, 105, 163, 240, 0, 255, 46, 224, 235, 38, 0, 37, 1, 225, 4, 154, 11, 42, 0, 209, 1, 240, - 0, 254, 203, 240, 3, 249, 29, 39, 0, 28, 5, 40, 0, 219, 3, 75, 151, 34, 1, 96, 26, 39, 1, 155, 15, 38, 1, 122, 25, 122, - 90, 6, 9, 4, 18, 67, 10, 122, 153, 122, 219, 2, 9, 67, 10, 67, 19, 147, 6, 150, 11, 224, 230, 75, 141, 153, 5, 38, 1, - 96, 25, 37, 0, 39, 0, 224, 223, 104, 35, 104, 26, 75, 138, 224, 97, 104, 35, 37, 0, 120, 222, 75, 136, 120, 27, 66, - 179, 208, 16, 75, 135, 104, 27, 43, 0, 208, 12, 240, 3, 248, 206, 240, 0, 254, 206, 240, 0, 254, 180, 75, 129, 112, - 30, 240, 0, 254, 146, 240, 3, 248, 228, 28, 5, 75, 126, 112, 30, 224, 165, 35, 1, 96, 11, 154, 5, 75, 121, 72, 124, - 96, 26, 240, 0, 249, 164, 75, 123, 34, 4, 104, 27, 39, 0, 104, 155, 96, 154, 240, 0, 254, 154, 77, 120, 28, 40, 240, - 3, 249, 238, 75, 119, 96, 24, 104, 35, 43, 0, 208, 1, 104, 42, 96, 26, 75, 116, 104, 29, 224, 135, 104, 35, 105, 34, - 104, 24, 104, 163, 38, 1, 104, 25, 240, 3, 251, 162, 75, 111, 28, 5, 120, 26, 42, 0, 209, 0, 224, 148, 70, 105, 34, - 23, 92, 81, 112, 25, 104, 35, 40, 0, 221, 2, 104, 25, 72, 105, 224, 1, 104, 25, 72, 105, 240, 1, 248, 24, 224, 133, - 104, 35, 105, 34, 104, 24, 104, 163, 104, 25, 240, 3, 252, 42, 224, 97, 75, 100, 104, 26, 66, 81, 65, 74, 96, 26, 224, - 105, 104, 35, 104, 26, 75, 85, 96, 26, 38, 1, 231, 106, 122, 17, 122, 83, 6, 9, 4, 27, 67, 11, 122, 145, 122, 210, 2, - 9, 67, 11, 67, 26, 104, 37, 35, 0, 146, 6, 147, 13, 120, 42, 42, 95, 209, 26, 120, 106, 42, 68, 209, 23, 120, 170, 42, - 86, 209, 20, 120, 234, 42, 68, 209, 17, 77, 82, 74, 69, 96, 43, 104, 227, 33, 1, 96, 17, 43, 4, 209, 6, 104, 161, 168, - 13, 34, 4, 240, 4, 254, 46, 155, 13, 96, 43, 240, 3, 254, 176, 224, 17, 104, 227, 43, 4, 209, 4, 104, 161, 168, 13, - 34, 4, 240, 4, 254, 33, 28, 40, 153, 13, 240, 3, 254, 231, 144, 7, 40, 0, 208, 46, 75, 53, 34, 1, 96, 26, 38, 1, 37, - 0, 224, 43, 240, 3, 250, 230, 38, 1, 28, 5, 40, 0, 209, 42, 35, 1, 74, 60, 66, 91, 96, 19, 224, 37, 75, 45, 34, 1, 96, - 26, 104, 35, 105, 33, 104, 24, 104, 163, 104, 26, 247, 255, 251, 159, 28, 5, 38, 1, 224, 24, 154, 7, 42, 0, 208, 18, - 104, 35, 105, 34, 104, 25, 104, 163, 152, 7, 104, 27, 240, 4, 250, 181, 38, 1, 37, 0, 224, 10, 38, 1, 37, 6, 224, 6, - 37, 1, 38, 1, 66, 109, 39, 1, 224, 2, 38, 1, 37, 1, 66, 109, 153, 4, 0, 203, 24, 228, 224, 7, 104, 32, 104, 97, 240, - 4, 255, 53, 154, 4, 52, 8, 50, 1, 146, 4, 155, 4, 153, 10, 66, 139, 219, 243, 224, 9, 38, 1, 37, 1, 224, 1, 38, 1, 37, - 6, 66, 109, 224, 2, 37, 0, 38, 1, 149, 6, 74, 12, 36, 0, 104, 19, 43, 0, 208, 4, 152, 9, 73, 23, 240, 4, 254, 199, 36, - 1, 46, 0, 209, 0, 228, 213, 152, 15, 28, 41, 240, 4, 255, 29, 228, 208, 87, 70, 83, 2, 85, 77, 83, 131, 87, 70, 83, - 1, 87, 70, 83, 3, 19, 112, 96, 20, 19, 112, 105, 164, 19, 112, 1, 12, 19, 112, 106, 24, 19, 112, 21, 69, 19, 112, 96, - 60, 19, 114, 198, 0, 19, 114, 198, 4, 19, 112, 96, 16, 19, 112, 96, 137, 19, 112, 96, 164, 19, 112, 105, 172, 19, 112, - 96, 12, 19, 112, 96, 24, 0, 152, 150, 128, 74, 3, 35, 128, 104, 17, 2, 27, 67, 11, 96, 19, 71, 112, 70, 192, 13, 4, - 0, 204, 75, 2, 74, 3, 104, 25, 64, 10, 96, 26, 71, 112, 13, 4, 0, 204, 255, 255, 127, 255, 181, 16, 247, 255, 255, 243, - 32, 128, 240, 3, 253, 180, 33, 32, 240, 4, 254, 169, 76, 9, 96, 32, 32, 4, 240, 4, 254, 180, 104, 33, 34, 0, 32, 4, - 240, 4, 254, 215, 247, 255, 255, 215, 32, 4, 240, 4, 254, 128, 188, 16, 188, 1, 71, 0, 70, 192, 19, 112, 96, 32, 181, - 16, 28, 4, 75, 15, 28, 8, 0, 137, 24, 9, 104, 26, 0, 73, 35, 1, 240, 4, 254, 83, 75, 12, 33, 16, 96, 24, 72, 11, 240, - 3, 254, 182, 33, 16, 72, 10, 240, 3, 254, 189, 75, 10, 34, 55, 96, 28, 75, 9, 32, 4, 104, 27, 104, 155, 96, 154, 240, - 4, 254, 91, 188, 16, 188, 1, 71, 0, 19, 112, 96, 32, 19, 112, 96, 28, 13, 128, 0, 56, 13, 128, 0, 60, 19, 112, 105, - 192, 19, 112, 96, 60, 181, 112, 76, 21, 75, 21, 38, 2, 66, 118, 28, 33, 104, 24, 34, 0, 96, 38, 240, 4, 254, 103, 75, - 18, 77, 18, 104, 27, 104, 154, 35, 0, 96, 147, 74, 17, 104, 40, 96, 19, 240, 4, 254, 46, 104, 40, 240, 4, 254, 117, - 35, 1, 66, 91, 96, 43, 104, 35, 43, 0, 209, 3, 75, 11, 104, 27, 96, 35, 224, 0, 96, 38, 32, 4, 240, 4, 254, 37, 75, - 2, 104, 24, 188, 112, 188, 2, 71, 8, 19, 112, 105, 184, 19, 112, 96, 32, 19, 112, 96, 60, 19, 112, 96, 28, 19, 112, - 105, 192, 19, 112, 105, 188, 75, 2, 34, 0, 96, 24, 75, 2, 96, 26, 71, 112, 19, 112, 105, 196, 19, 112, 105, 192, 181, - 248, 76, 34, 38, 16, 104, 35, 77, 33, 67, 179, 96, 35, 104, 43, 73, 32, 104, 154, 121, 19, 121, 87, 6, 27, 4, 63, 67, - 31, 121, 147, 2, 27, 67, 31, 121, 211, 67, 31, 104, 11, 43, 0, 208, 18, 28, 56, 240, 0, 248, 56, 40, 0, 220, 20, 74, - 22, 35, 0, 96, 19, 75, 22, 96, 24, 32, 4, 240, 4, 253, 234, 104, 43, 34, 55, 104, 155, 64, 23, 96, 95, 224, 22, 75, - 17, 104, 27, 43, 0, 208, 8, 28, 56, 240, 0, 248, 33, 104, 43, 34, 55, 104, 155, 64, 23, 96, 95, 224, 2, 35, 55, 64, - 31, 96, 87, 104, 35, 67, 51, 96, 35, 75, 9, 104, 26, 67, 22, 96, 30, 32, 0, 188, 248, 188, 2, 71, 8, 70, 192, 13, 128, - 0, 60, 19, 112, 96, 60, 19, 112, 105, 192, 19, 112, 105, 188, 19, 112, 105, 196, 13, 128, 0, 56, 71, 24, 70, 192, 181, - 112, 28, 12, 28, 5, 240, 4, 253, 235, 28, 6, 32, 1, 66, 64, 240, 4, 253, 218, 104, 34, 75, 17, 66, 154, 209, 25, 75, - 16, 73, 17, 34, 1, 67, 19, 96, 75, 28, 32, 34, 8, 240, 4, 252, 131, 28, 32, 27, 100, 8, 164, 33, 8, 60, 2, 240, 4, 253, - 222, 2, 36, 35, 234, 10, 36, 6, 27, 67, 35, 96, 43, 28, 40, 33, 4, 240, 4, 253, 212, 28, 48, 240, 4, 253, 185, 188, - 112, 188, 1, 71, 0, 230, 0, 1, 112, 19, 112, 4, 153, 19, 112, 96, 36, 181, 56, 28, 4, 240, 4, 253, 114, 44, 38, 208, - 72, 44, 38, 216, 5, 44, 36, 208, 9, 44, 37, 208, 0, 224, 169, 224, 14, 44, 57, 208, 112, 44, 60, 208, 0, 224, 163, 224, - 110, 73, 83, 75, 84, 72, 84, 96, 75, 34, 8, 240, 4, 252, 75, 72, 82, 224, 150, 72, 82, 73, 82, 247, 255, 255, 171, 76, - 77, 75, 81, 77, 82, 96, 99, 34, 8, 28, 40, 28, 33, 240, 4, 252, 60, 28, 40, 33, 8, 240, 4, 253, 154, 75, 77, 77, 78, - 96, 99, 34, 8, 28, 40, 28, 33, 240, 4, 252, 48, 28, 40, 33, 8, 240, 4, 253, 142, 75, 73, 77, 74, 96, 99, 34, 8, 28, - 33, 28, 40, 240, 4, 252, 36, 28, 40, 33, 8, 240, 4, 253, 130, 75, 59, 72, 69, 96, 99, 28, 33, 34, 8, 240, 4, 252, 25, - 72, 66, 224, 100, 72, 66, 73, 66, 247, 255, 255, 121, 76, 52, 75, 65, 77, 57, 96, 99, 34, 8, 28, 40, 28, 33, 240, 4, - 252, 10, 28, 40, 33, 8, 240, 4, 253, 104, 75, 60, 77, 53, 96, 99, 34, 8, 28, 40, 28, 33, 240, 4, 251, 254, 28, 40, 33, - 8, 240, 4, 253, 92, 75, 55, 77, 49, 96, 99, 34, 8, 28, 33, 28, 40, 240, 4, 251, 242, 28, 40, 33, 8, 240, 4, 253, 80, - 75, 34, 72, 50, 96, 99, 28, 33, 34, 8, 240, 4, 251, 231, 72, 47, 224, 50, 72, 47, 224, 0, 72, 47, 73, 47, 247, 255, - 255, 69, 76, 26, 75, 46, 77, 31, 96, 99, 34, 8, 28, 40, 28, 33, 240, 4, 251, 214, 28, 40, 33, 8, 240, 4, 253, 52, 75, - 41, 77, 27, 96, 99, 34, 8, 28, 40, 28, 33, 240, 4, 251, 202, 28, 40, 33, 8, 240, 4, 253, 40, 75, 36, 77, 23, 96, 99, - 34, 8, 28, 33, 28, 40, 240, 4, 251, 190, 28, 40, 33, 8, 240, 4, 253, 28, 75, 8, 72, 31, 96, 99, 28, 33, 34, 8, 240, - 4, 251, 179, 72, 28, 33, 8, 240, 4, 253, 17, 32, 0, 188, 56, 188, 2, 71, 8, 70, 192, 19, 112, 96, 36, 19, 112, 0, 96, - 255, 255, 30, 120, 32, 32, 93, 232, 32, 32, 64, 140, 255, 255, 31, 112, 19, 112, 0, 188, 255, 255, 31, 140, 19, 112, - 0, 196, 255, 255, 30, 52, 19, 112, 0, 204, 255, 255, 31, 104, 32, 32, 91, 20, 32, 32, 62, 108, 255, 255, 30, 176, 255, - 255, 30, 204, 255, 255, 29, 116, 255, 255, 30, 168, 32, 32, 94, 132, 32, 32, 93, 148, 32, 32, 63, 96, 255, 255, 33, - 48, 255, 255, 33, 76, 255, 255, 31, 244, 255, 255, 33, 40, 181, 56, 77, 11, 35, 0, 104, 42, 73, 10, 240, 4, 252, 113, - 76, 10, 73, 10, 34, 0, 96, 32, 104, 40, 240, 4, 252, 172, 104, 32, 240, 4, 252, 123, 104, 32, 240, 4, 252, 194, 188, - 56, 188, 1, 71, 0, 70, 192, 19, 112, 96, 44, 0, 152, 150, 128, 19, 112, 96, 52, 19, 112, 105, 200, 181, 8, 1, 67, 26, - 27, 0, 155, 24, 24, 0, 192, 247, 255, 255, 216, 188, 8, 188, 1, 71, 0, 0, 0, 181, 0, 74, 5, 2, 192, 104, 19, 104, 17, - 26, 201, 213, 0, 104, 19, 66, 129, 217, 249, 188, 1, 71, 0, 13, 128, 0, 16, 181, 8, 75, 24, 120, 26, 30, 83, 65, 154, - 75, 23, 96, 26, 240, 3, 252, 112, 75, 22, 33, 4, 96, 24, 28, 24, 240, 4, 252, 137, 240, 3, 252, 114, 34, 0, 28, 1, 72, - 18, 240, 3, 252, 167, 33, 160, 2, 73, 72, 16, 240, 4, 252, 113, 75, 16, 33, 128, 96, 24, 240, 4, 252, 34, 33, 32, 240, - 4, 252, 81, 75, 13, 96, 24, 240, 3, 250, 201, 40, 0, 219, 3, 247, 255, 250, 7, 32, 0, 224, 1, 32, 1, 66, 64, 188, 8, - 188, 2, 71, 8, 19, 112, 1, 12, 19, 112, 106, 48, 19, 114, 194, 96, 19, 112, 14, 77, 19, 113, 130, 96, 19, 112, 96, 48, - 19, 112, 96, 44, 181, 240, 7, 65, 213, 27, 34, 128, 78, 14, 77, 15, 76, 15, 35, 0, 1, 146, 104, 49, 0, 152, 104, 137, - 104, 47, 49, 68, 24, 9, 104, 8, 66, 187, 209, 5, 7, 193, 212, 7, 73, 9, 32, 2, 96, 8, 224, 3, 64, 32, 40, 3, 209, 0, - 96, 10, 51, 1, 43, 4, 209, 233, 188, 240, 188, 1, 71, 0, 19, 112, 96, 60, 19, 112, 106, 48, 0, 0, 32, 3, 19, 112, 106, - 52, 181, 240, 176, 131, 147, 1, 155, 8, 76, 14, 0, 91, 104, 38, 28, 13, 28, 23, 147, 0, 32, 10, 247, 255, 255, 79, 104, - 43, 154, 1, 64, 59, 66, 147, 208, 9, 104, 35, 27, 155, 213, 0, 104, 38, 154, 0, 66, 147, 211, 240, 32, 2, 66, 64, 224, - 0, 32, 0, 176, 3, 188, 240, 188, 2, 71, 8, 70, 192, 13, 128, 0, 16, 181, 56, 28, 4, 240, 3, 250, 191, 33, 0, 28, 5, - 34, 96, 28, 32, 240, 4, 250, 232, 35, 64, 96, 163, 35, 128, 4, 91, 99, 101, 96, 35, 96, 99, 188, 56, 188, 1, 71, 0, - 181, 16, 75, 12, 36, 0, 104, 27, 108, 26, 42, 7, 220, 13, 73, 10, 104, 12, 0, 228, 24, 164, 0, 97, 25, 12, 106, 25, - 1, 100, 25, 12, 50, 1, 100, 26, 28, 32, 247, 255, 255, 215, 28, 32, 188, 16, 188, 2, 71, 8, 70, 192, 19, 112, 96, 60, - 19, 112, 106, 32, 181, 240, 28, 4, 176, 133, 28, 8, 28, 14, 147, 3, 28, 23, 240, 4, 250, 59, 35, 0, 98, 35, 5, 53, 35, - 128, 13, 45, 1, 91, 27, 93, 96, 224, 66, 175, 210, 1, 28, 61, 224, 49, 32, 128, 1, 64, 24, 54, 11, 54, 3, 54, 150, 2, - 33, 1, 28, 38, 54, 16, 145, 1, 224, 20, 152, 2, 240, 4, 250, 33, 34, 0, 198, 1, 97, 50, 155, 2, 33, 128, 28, 24, 35, - 128, 1, 91, 1, 73, 24, 192, 24, 109, 144, 2, 66, 189, 211, 0, 28, 61, 154, 1, 50, 1, 146, 1, 66, 189, 210, 8, 152, 1, - 33, 0, 15, 195, 34, 4, 66, 130, 65, 75, 6, 27, 43, 0, 209, 223, 66, 189, 208, 4, 28, 40, 153, 10, 240, 4, 251, 106, - 26, 109, 155, 3, 4, 40, 67, 24, 240, 4, 249, 248, 35, 128, 4, 91, 96, 160, 100, 37, 96, 35, 96, 99, 176, 5, 28, 40, - 188, 240, 188, 2, 71, 8, 0, 0, 181, 240, 176, 139, 28, 5, 247, 255, 255, 133, 28, 6, 32, 0, 46, 0, 209, 0, 224, 145, - 99, 245, 105, 42, 126, 107, 126, 47, 97, 104, 146, 3, 147, 7, 47, 0, 209, 25, 35, 8, 147, 0, 35, 160, 104, 105, 34, - 8, 0, 155, 28, 48, 247, 255, 255, 140, 247, 255, 255, 108, 28, 4, 28, 56, 44, 0, 208, 121, 107, 96, 99, 229, 240, 4, - 249, 198, 154, 3, 96, 48, 99, 180, 42, 0, 208, 4, 79, 58, 224, 3, 28, 52, 39, 128, 224, 0, 79, 56, 104, 235, 154, 7, - 147, 4, 42, 0, 208, 2, 35, 128, 0, 91, 67, 31, 105, 235, 150, 9, 5, 91, 13, 91, 147, 5, 154, 5, 35, 128, 4, 91, 58, - 1, 147, 6, 146, 8, 155, 5, 154, 3, 147, 0, 28, 32, 28, 59, 153, 4, 247, 255, 255, 92, 154, 3, 155, 4, 26, 18, 146, 3, - 154, 7, 24, 27, 147, 4, 42, 0, 208, 1, 155, 6, 96, 99, 154, 8, 155, 5, 24, 128, 66, 3, 209, 2, 34, 128, 6, 18, 24, 191, - 155, 3, 43, 0, 221, 11, 247, 255, 255, 38, 30, 6, 208, 52, 107, 112, 99, 245, 240, 4, 249, 130, 99, 166, 96, 32, 28, - 52, 231, 213, 35, 128, 4, 91, 96, 99, 105, 43, 158, 9, 148, 3, 43, 0, 208, 29, 126, 42, 146, 4, 42, 0, 209, 25, 247, - 255, 255, 14, 28, 4, 32, 0, 44, 0, 208, 27, 107, 96, 99, 229, 240, 4, 249, 104, 155, 3, 34, 128, 96, 24, 99, 156, 35, - 128, 0, 91, 6, 18, 64, 123, 67, 19, 154, 4, 28, 32, 146, 0, 33, 0, 34, 0, 247, 255, 255, 20, 104, 162, 35, 128, 4, 27, - 67, 19, 96, 163, 28, 48, 224, 0, 32, 0, 176, 11, 188, 240, 188, 2, 71, 8, 128, 0, 0, 128, 128, 0, 1, 128, 181, 56, 76, - 19, 37, 32, 104, 35, 104, 155, 120, 25, 120, 90, 6, 9, 4, 18, 67, 10, 120, 153, 120, 219, 2, 9, 67, 10, 67, 19, 224, - 18, 104, 34, 67, 171, 104, 146, 32, 10, 96, 19, 247, 255, 253, 243, 104, 35, 104, 155, 120, 25, 120, 90, 6, 9, 4, 18, - 67, 10, 120, 153, 120, 219, 2, 9, 67, 10, 67, 19, 66, 29, 209, 234, 188, 56, 188, 1, 71, 0, 19, 112, 96, 60, 181, 56, - 76, 19, 37, 32, 104, 35, 104, 155, 120, 25, 120, 90, 6, 9, 4, 18, 67, 10, 120, 153, 120, 219, 2, 9, 67, 10, 67, 19, - 224, 18, 104, 34, 67, 43, 104, 146, 32, 10, 96, 19, 247, 255, 253, 201, 104, 35, 104, 155, 120, 25, 120, 90, 6, 9, 4, - 18, 67, 10, 120, 153, 120, 219, 2, 9, 67, 10, 67, 19, 66, 29, 208, 234, 188, 56, 188, 1, 71, 0, 19, 112, 96, 60, 181, - 248, 28, 12, 40, 0, 209, 33, 77, 28, 76, 29, 79, 29, 38, 0, 104, 43, 104, 155, 126, 25, 126, 90, 6, 9, 4, 18, 67, 10, - 126, 153, 126, 219, 2, 9, 67, 10, 67, 19, 105, 34, 108, 82, 66, 147, 211, 6, 105, 98, 108, 82, 66, 147, 216, 2, 247, - 255, 255, 142, 224, 25, 32, 10, 54, 1, 247, 255, 253, 147, 66, 190, 209, 226, 224, 18, 40, 1, 209, 16, 224, 6, 32, 10, - 54, 1, 247, 255, 253, 137, 66, 190, 209, 3, 224, 8, 77, 6, 79, 8, 38, 0, 104, 43, 104, 155, 105, 154, 108, 99, 66, 154, - 208, 239, 32, 0, 188, 248, 188, 2, 71, 8, 70, 192, 19, 112, 96, 60, 19, 114, 194, 128, 0, 0, 19, 136, 181, 0, 7, 67, - 213, 21, 75, 12, 104, 27, 104, 154, 75, 11, 108, 81, 64, 11, 43, 3, 209, 2, 35, 128, 1, 155, 100, 83, 75, 6, 104, 27, - 104, 154, 75, 6, 108, 145, 64, 11, 43, 3, 209, 2, 35, 128, 1, 155, 100, 147, 188, 1, 71, 0, 70, 192, 19, 112, 96, 60, - 0, 0, 32, 3, 181, 16, 75, 19, 28, 4, 104, 27, 52, 16, 104, 155, 0, 164, 25, 28, 34, 128, 104, 99, 1, 146, 66, 19, 209, - 0, 64, 83, 34, 46, 67, 147, 96, 99, 32, 5, 247, 255, 253, 106, 34, 128, 104, 99, 1, 146, 66, 19, 208, 0, 64, 83, 34, - 46, 67, 147, 96, 99, 32, 5, 247, 255, 253, 94, 75, 4, 32, 5, 96, 99, 247, 255, 253, 89, 188, 16, 188, 1, 71, 0, 19, - 112, 96, 60, 0, 0, 24, 1, 181, 240, 176, 131, 75, 36, 28, 5, 104, 27, 53, 16, 104, 155, 0, 173, 25, 93, 104, 107, 74, - 33, 29, 44, 64, 26, 38, 4, 42, 1, 208, 4, 4, 154, 213, 51, 247, 255, 255, 192, 224, 48, 39, 136, 1, 127, 34, 4, 67, - 147, 67, 59, 96, 35, 32, 60, 247, 255, 253, 40, 104, 35, 74, 24, 32, 50, 64, 19, 96, 35, 247, 255, 253, 33, 75, 22, - 34, 128, 147, 0, 28, 32, 28, 33, 0, 82, 35, 0, 247, 255, 253, 156, 40, 0, 208, 2, 104, 107, 72, 17, 224, 20, 104, 35, - 34, 4, 66, 26, 209, 16, 62, 1, 46, 0, 209, 220, 34, 128, 1, 146, 67, 19, 33, 42, 67, 139, 96, 107, 32, 10, 96, 106, - 247, 255, 253, 2, 72, 8, 224, 1, 32, 1, 66, 64, 176, 3, 188, 240, 188, 2, 71, 8, 19, 112, 96, 60, 0, 0, 32, 1, 255, - 255, 254, 213, 0, 0, 19, 136, 255, 255, 248, 48, 255, 255, 251, 161, 181, 16, 75, 20, 28, 4, 104, 27, 52, 16, 104, 155, - 0, 164, 25, 28, 34, 128, 104, 99, 1, 146, 66, 19, 209, 0, 64, 83, 34, 46, 67, 147, 96, 99, 32, 5, 247, 255, 252, 230, - 34, 128, 104, 99, 1, 146, 66, 19, 208, 0, 64, 83, 34, 46, 67, 147, 96, 99, 32, 5, 247, 255, 252, 218, 75, 5, 32, 60, - 96, 99, 247, 255, 252, 213, 32, 1, 188, 16, 188, 2, 71, 8, 70, 192, 19, 112, 96, 60, 0, 0, 24, 1, 32, 0, 71, 112, 75, - 5, 48, 16, 104, 27, 0, 128, 104, 155, 24, 24, 35, 128, 1, 155, 96, 67, 32, 0, 71, 112, 70, 192, 19, 112, 96, 60, 74, - 5, 32, 0, 104, 19, 104, 153, 35, 128, 1, 155, 100, 75, 104, 18, 104, 146, 100, 147, 71, 112, 70, 192, 19, 112, 96, 60, - 181, 0, 75, 10, 104, 27, 104, 154, 35, 128, 108, 81, 1, 155, 66, 25, 209, 0, 100, 83, 75, 5, 104, 27, 104, 154, 35, - 128, 108, 145, 1, 155, 66, 25, 209, 0, 100, 147, 32, 0, 188, 2, 71, 8, 19, 112, 96, 60, 75, 6, 33, 0, 104, 26, 35, 1, - 66, 91, 28, 16, 103, 17, 103, 147, 48, 152, 50, 160, 96, 1, 96, 19, 71, 112, 70, 192, 19, 112, 96, 60, 75, 6, 120, 27, - 30, 90, 65, 147, 74, 5, 0, 152, 96, 19, 74, 5, 24, 195, 0, 219, 104, 16, 51, 88, 24, 192, 71, 112, 19, 112, 1, 12, 19, - 112, 106, 48, 19, 112, 96, 60, 181, 16, 73, 19, 120, 9, 30, 72, 65, 129, 72, 18, 0, 140, 96, 1, 72, 17, 24, 97, 104, - 0, 0, 201, 24, 64, 111, 4, 33, 0, 44, 0, 208, 16, 128, 25, 128, 89, 28, 1, 49, 96, 136, 8, 4, 0, 10, 4, 14, 0, 67, 32, - 128, 152, 136, 73, 4, 9, 10, 8, 14, 9, 67, 1, 128, 217, 33, 1, 32, 0, 112, 17, 188, 16, 188, 2, 71, 8, 70, 192, 19, - 112, 1, 12, 19, 112, 106, 48, 19, 112, 96, 60, 181, 0, 28, 3, 224, 8, 120, 90, 58, 4, 6, 18, 14, 18, 42, 1, 217, 4, - 120, 26, 26, 137, 24, 155, 41, 0, 209, 244, 26, 24, 188, 2, 71, 8, 181, 240, 176, 133, 124, 130, 124, 195, 6, 18, 4, - 27, 67, 19, 125, 2, 28, 5, 2, 18, 67, 19, 125, 66, 67, 26, 208, 103, 34, 0, 146, 3, 146, 1, 224, 83, 6, 36, 4, 9, 2, - 18, 67, 12, 67, 20, 158, 3, 67, 35, 25, 156, 122, 98, 122, 163, 6, 18, 4, 27, 67, 19, 122, 226, 2, 18, 67, 19, 123, - 34, 67, 26, 208, 58, 39, 0, 151, 2, 28, 46, 224, 36, 6, 0, 4, 9, 2, 18, 67, 8, 67, 16, 67, 3, 25, 221, 123, 170, 123, - 235, 6, 18, 4, 27, 67, 19, 124, 42, 124, 104, 2, 18, 67, 19, 67, 24, 208, 1, 240, 2, 255, 158, 122, 106, 122, 171, 6, - 18, 4, 27, 67, 19, 122, 234, 123, 40, 2, 18, 67, 19, 67, 24, 208, 1, 240, 2, 255, 145, 154, 2, 55, 18, 50, 1, 146, 2, - 121, 35, 157, 2, 70, 156, 122, 96, 122, 161, 122, 226, 123, 35, 69, 101, 219, 209, 28, 53, 6, 6, 4, 8, 67, 48, 2, 18, - 67, 16, 67, 24, 240, 2, 255, 123, 158, 1, 154, 3, 54, 1, 50, 13, 150, 1, 146, 3, 124, 104, 158, 1, 124, 172, 124, 233, - 125, 42, 125, 107, 66, 134, 219, 163, 6, 36, 4, 8, 67, 32, 2, 18, 67, 16, 67, 24, 240, 2, 255, 101, 176, 5, 188, 240, - 188, 1, 71, 0, 0, 0, 181, 248, 30, 5, 209, 4, 75, 28, 34, 48, 112, 26, 112, 93, 224, 47, 76, 26, 28, 46, 28, 48, 33, - 10, 240, 4, 248, 40, 28, 48, 28, 15, 33, 10, 240, 4, 248, 31, 23, 251, 24, 255, 64, 95, 55, 48, 75, 20, 112, 39, 60, - 1, 28, 6, 66, 156, 209, 236, 75, 15, 34, 0, 118, 154, 45, 0, 218, 2, 34, 45, 112, 26, 34, 1, 35, 16, 72, 10, 224, 0, - 51, 1, 92, 193, 41, 48, 208, 251, 66, 72, 65, 65, 26, 91, 73, 6, 224, 2, 84, 136, 51, 1, 50, 1, 92, 200, 40, 0, 209, - 249, 84, 136, 188, 248, 188, 1, 71, 0, 70, 192, 19, 114, 196, 64, 19, 114, 196, 89, 19, 114, 196, 79, 181, 248, 30, - 4, 209, 4, 75, 24, 34, 48, 112, 26, 112, 92, 224, 40, 77, 22, 28, 47, 63, 10, 28, 32, 33, 10, 240, 3, 255, 191, 28, - 32, 28, 14, 33, 10, 240, 3, 255, 198, 54, 48, 112, 46, 61, 1, 28, 4, 66, 189, 209, 240, 74, 12, 35, 0, 118, 147, 28, - 17, 35, 16, 224, 0, 51, 1, 92, 202, 42, 48, 208, 251, 66, 81, 65, 74, 26, 155, 73, 6, 34, 0, 224, 2, 84, 136, 51, 1, - 50, 1, 92, 200, 40, 0, 209, 249, 84, 136, 188, 248, 188, 1, 71, 0, 19, 114, 196, 64, 19, 114, 196, 89, 181, 16, 40, - 0, 209, 4, 75, 24, 34, 48, 112, 26, 112, 88, 224, 40, 75, 22, 33, 15, 28, 28, 60, 8, 28, 10, 64, 2, 9, 0, 42, 9, 221, - 0, 50, 7, 50, 48, 112, 26, 59, 1, 66, 163, 209, 244, 74, 14, 35, 0, 118, 19, 35, 48, 112, 19, 35, 120, 112, 83, 35, - 16, 224, 0, 51, 1, 92, 209, 41, 48, 208, 251, 66, 74, 65, 74, 26, 155, 73, 6, 34, 2, 224, 2, 84, 136, 51, 1, 50, 1, - 92, 200, 40, 0, 209, 249, 84, 136, 188, 16, 188, 1, 71, 0, 19, 114, 196, 64, 19, 114, 196, 87, 180, 15, 181, 240, 176, - 133, 171, 10, 203, 64, 34, 128, 1, 146, 169, 3, 128, 10, 147, 2, 36, 0, 77, 46, 79, 46, 224, 81, 28, 114, 146, 1, 43, - 37, 208, 12, 70, 106, 115, 19, 168, 3, 240, 3, 254, 209, 25, 4, 158, 1, 66, 172, 220, 68, 168, 3, 240, 3, 255, 134, - 224, 64, 120, 115, 43, 115, 208, 46, 43, 115, 216, 4, 43, 100, 208, 7, 43, 105, 209, 53, 224, 4, 43, 117, 208, 9, 43, - 120, 209, 48, 224, 20, 155, 2, 29, 26, 146, 2, 104, 24, 247, 255, 255, 26, 224, 19, 155, 2, 29, 26, 146, 2, 104, 24, - 247, 255, 255, 85, 28, 56, 240, 3, 254, 170, 25, 4, 28, 56, 66, 172, 220, 27, 224, 24, 155, 2, 29, 26, 146, 2, 104, - 24, 247, 255, 255, 127, 72, 16, 240, 3, 254, 156, 25, 4, 66, 172, 220, 14, 72, 13, 224, 10, 155, 2, 29, 26, 146, 2, - 104, 30, 28, 48, 240, 3, 254, 144, 25, 4, 66, 172, 220, 2, 28, 48, 240, 3, 255, 70, 158, 1, 54, 1, 120, 51, 43, 0, 209, - 170, 176, 5, 188, 240, 188, 8, 176, 4, 71, 24, 0, 0, 13, 171, 19, 114, 196, 64, 181, 240, 28, 12, 176, 133, 28, 6, 33, - 0, 32, 0, 247, 255, 252, 176, 126, 35, 43, 0, 209, 6, 74, 218, 33, 8, 96, 19, 104, 32, 240, 2, 253, 233, 96, 96, 105, - 33, 41, 0, 208, 9, 126, 99, 104, 160, 43, 0, 208, 2, 240, 2, 253, 223, 224, 1, 240, 2, 253, 228, 96, 224, 126, 35, 43, - 0, 209, 3, 75, 207, 104, 27, 105, 219, 224, 6, 126, 99, 43, 0, 208, 1, 75, 205, 224, 0, 75, 205, 104, 27, 147, 2, 77, - 204, 75, 205, 153, 2, 28, 40, 96, 25, 34, 96, 240, 2, 255, 12, 33, 0, 34, 48, 152, 2, 240, 3, 253, 237, 75, 195, 34, - 0, 104, 27, 28, 32, 100, 26, 75, 197, 34, 1, 104, 25, 64, 74, 96, 26, 247, 255, 251, 121, 75, 195, 100, 168, 96, 24, - 126, 34, 35, 15, 146, 1, 64, 26, 146, 3, 155, 3, 28, 7, 34, 128, 105, 176, 2, 29, 1, 146, 155, 1, 67, 2, 105, 225, 67, - 42, 43, 0, 209, 1, 72, 186, 224, 5, 5, 72, 35, 128, 9, 64, 5, 219, 67, 3, 28, 24, 67, 16, 240, 3, 253, 70, 77, 176, - 35, 64, 96, 171, 75, 180, 33, 255, 104, 27, 34, 255, 108, 91, 2, 9, 4, 18, 64, 25, 64, 26, 2, 9, 10, 18, 67, 10, 14, - 25, 67, 10, 33, 224, 64, 11, 33, 2, 67, 11, 6, 27, 67, 26, 96, 104, 96, 42, 107, 120, 240, 3, 253, 42, 35, 128, 153, - 1, 4, 91, 97, 40, 97, 107, 41, 0, 208, 16, 9, 203, 153, 3, 106, 114, 1, 27, 24, 91, 64, 218, 28, 19, 7, 218, 213, 3, - 105, 170, 35, 128, 67, 19, 224, 2, 105, 171, 34, 128, 67, 147, 97, 171, 77, 150, 75, 156, 105, 170, 28, 40, 64, 19, - 97, 171, 33, 96, 240, 2, 253, 103, 108, 173, 224, 4, 28, 40, 33, 96, 240, 2, 253, 97, 107, 173, 45, 0, 209, 248, 152, - 2, 73, 141, 34, 96, 240, 2, 254, 132, 75, 146, 120, 27, 43, 0, 208, 4, 75, 145, 72, 145, 104, 25, 247, 255, 254, 218, - 75, 144, 34, 1, 96, 26, 77, 130, 35, 0, 147, 1, 153, 1, 74, 139, 49, 1, 145, 1, 72, 140, 104, 17, 247, 254, 255, 192, - 104, 43, 33, 32, 105, 152, 240, 2, 253, 81, 104, 42, 73, 124, 39, 2, 108, 75, 105, 145, 34, 255, 2, 18, 64, 26, 2, 16, - 34, 255, 4, 18, 64, 26, 10, 18, 67, 2, 14, 24, 67, 2, 32, 224, 64, 3, 67, 59, 6, 24, 28, 19, 67, 3, 96, 11, 104, 43, - 33, 32, 105, 152, 240, 2, 253, 33, 247, 255, 251, 163, 247, 254, 255, 201, 154, 1, 42, 4, 208, 6, 28, 3, 51, 9, 209, - 3, 72, 118, 247, 255, 254, 158, 231, 200, 75, 114, 34, 0, 96, 26, 75, 109, 28, 7, 120, 27, 43, 0, 208, 3, 72, 113, 28, - 57, 247, 255, 254, 145, 47, 0, 209, 3, 75, 93, 104, 27, 43, 0, 208, 15, 75, 92, 104, 27, 104, 154, 75, 107, 50, 68, - 104, 27, 0, 155, 24, 211, 104, 27, 34, 5, 64, 19, 43, 5, 208, 2, 75, 84, 34, 1, 96, 26, 66, 121, 65, 121, 145, 1, 29, - 122, 208, 1, 41, 0, 208, 65, 247, 255, 251, 66, 77, 79, 33, 32, 104, 43, 105, 152, 240, 3, 254, 56, 104, 43, 33, 32, - 105, 152, 240, 2, 252, 203, 75, 82, 104, 42, 104, 27, 105, 145, 108, 91, 34, 255, 2, 18, 64, 26, 2, 16, 34, 255, 4, - 18, 64, 26, 10, 18, 67, 2, 14, 24, 67, 2, 32, 224, 64, 3, 32, 2, 67, 3, 6, 24, 28, 19, 67, 3, 96, 11, 104, 43, 33, 32, - 105, 152, 240, 3, 253, 246, 247, 255, 251, 66, 126, 34, 42, 0, 208, 98, 9, 211, 32, 15, 64, 16, 1, 27, 24, 27, 106, - 113, 34, 1, 64, 154, 67, 145, 28, 10, 73, 70, 104, 9, 6, 9, 15, 201, 64, 153, 28, 11, 67, 19, 98, 115, 224, 79, 247, - 255, 251, 0, 75, 49, 108, 157, 224, 4, 107, 104, 33, 96, 240, 2, 252, 179, 107, 173, 45, 0, 209, 248, 77, 44, 34, 32, - 28, 40, 153, 2, 240, 2, 253, 206, 126, 34, 42, 0, 208, 16, 9, 211, 32, 15, 64, 16, 1, 27, 24, 27, 106, 113, 34, 1, 64, - 154, 67, 145, 28, 10, 105, 169, 6, 9, 15, 201, 64, 153, 28, 11, 67, 19, 98, 115, 77, 28, 33, 32, 104, 43, 38, 2, 105, - 152, 240, 3, 253, 209, 104, 43, 33, 32, 105, 152, 240, 2, 252, 100, 75, 30, 104, 42, 104, 27, 105, 145, 108, 91, 34, - 255, 2, 18, 64, 26, 2, 16, 34, 255, 4, 18, 64, 26, 10, 18, 67, 2, 14, 24, 67, 2, 32, 224, 64, 3, 67, 51, 6, 24, 28, - 19, 67, 3, 96, 11, 104, 43, 33, 32, 105, 152, 240, 3, 253, 144, 247, 255, 250, 220, 73, 10, 32, 1, 247, 255, 251, 2, - 105, 33, 41, 0, 208, 48, 126, 99, 104, 224, 43, 0, 208, 42, 240, 2, 252, 83, 224, 41, 19, 112, 106, 52, 19, 112, 96, - 60, 19, 112, 105, 212, 19, 112, 106, 40, 19, 114, 195, 224, 19, 112, 105, 220, 19, 112, 106, 32, 19, 112, 105, 244, - 64, 64, 64, 0, 19, 112, 106, 36, 1, 0, 0, 128, 19, 112, 105, 216, 19, 112, 96, 56, 19, 112, 96, 194, 19, 112, 105, 240, - 19, 112, 41, 41, 19, 112, 96, 240, 19, 112, 96, 247, 19, 112, 106, 48, 19, 112, 105, 228, 240, 2, 252, 46, 126, 35, - 43, 0, 209, 3, 104, 96, 33, 8, 240, 2, 252, 33, 155, 1, 43, 0, 208, 0, 105, 103, 176, 5, 28, 56, 188, 240, 188, 2, 71, - 8, 181, 48, 176, 137, 70, 108, 118, 33, 9, 201, 118, 97, 33, 128, 0, 137, 37, 0, 145, 7, 70, 105, 149, 0, 146, 4, 147, - 2, 247, 255, 253, 246, 176, 9, 188, 48, 188, 2, 71, 8, 181, 240, 176, 139, 28, 6, 70, 104, 48, 70, 136, 4, 72, 43, 70, - 156, 104, 0, 70, 107, 51, 66, 48, 248, 104, 0, 136, 27, 112, 66, 4, 27, 70, 98, 147, 1, 2, 19, 10, 18, 67, 19, 4, 26, - 12, 19, 14, 18, 112, 1, 159, 18, 112, 130, 112, 195, 155, 1, 4, 36, 10, 26, 14, 27, 67, 19, 4, 27, 12, 37, 12, 26, 14, - 27, 113, 3, 14, 36, 2, 43, 67, 35, 4, 27, 113, 66, 14, 26, 12, 27, 113, 195, 172, 2, 35, 0, 113, 130, 118, 35, 35, 64, - 97, 227, 75, 21, 9, 201, 144, 2, 118, 97, 97, 37, 66, 159, 217, 22, 28, 40, 240, 2, 251, 216, 28, 42, 28, 57, 96, 160, - 240, 3, 251, 149, 28, 33, 28, 48, 247, 255, 253, 171, 104, 164, 28, 6, 28, 33, 28, 56, 28, 42, 240, 3, 251, 138, 28, - 32, 240, 2, 251, 227, 224, 5, 28, 48, 96, 167, 28, 33, 247, 255, 253, 155, 28, 6, 176, 11, 28, 48, 188, 240, 188, 2, - 71, 8, 70, 192, 19, 112, 96, 60, 19, 136, 0, 0, 181, 0, 176, 133, 145, 0, 35, 0, 33, 2, 34, 1, 147, 1, 147, 2, 247, - 255, 255, 148, 176, 5, 188, 2, 71, 8, 181, 0, 176, 133, 28, 19, 34, 0, 145, 0, 146, 1, 146, 2, 33, 1, 34, 11, 247, 255, - 255, 134, 176, 5, 188, 2, 71, 8, 181, 0, 176, 133, 34, 0, 146, 0, 146, 1, 146, 2, 28, 11, 34, 9, 33, 0, 247, 255, 255, - 120, 176, 5, 188, 2, 71, 8, 181, 112, 28, 4, 176, 132, 32, 1, 28, 14, 240, 2, 251, 132, 30, 5, 208, 18, 35, 0, 147, - 0, 35, 1, 147, 1, 28, 32, 33, 128, 34, 8, 35, 0, 149, 2, 247, 255, 255, 97, 30, 4, 219, 1, 120, 43, 112, 51, 28, 40, - 240, 2, 251, 142, 224, 1, 36, 4, 66, 100, 176, 4, 28, 32, 188, 112, 188, 2, 71, 8, 181, 16, 176, 132, 70, 108, 2, 18, - 52, 27, 120, 36, 67, 19, 34, 0, 146, 0, 145, 2, 34, 6, 33, 128, 148, 1, 247, 255, 255, 67, 176, 4, 188, 16, 188, 2, - 71, 8, 181, 240, 176, 141, 144, 11, 32, 22, 28, 13, 240, 2, 251, 78, 30, 7, 209, 0, 225, 137, 35, 18, 147, 0, 152, 11, - 28, 57, 34, 1, 35, 0, 247, 255, 255, 219, 30, 4, 218, 0, 225, 108, 28, 57, 34, 18, 28, 40, 240, 3, 250, 253, 28, 56, - 240, 2, 251, 86, 120, 170, 120, 235, 2, 18, 67, 26, 4, 18, 10, 19, 14, 18, 67, 19, 4, 27, 12, 26, 112, 234, 14, 27, - 122, 42, 112, 171, 122, 107, 2, 18, 67, 26, 4, 18, 10, 19, 14, 18, 67, 19, 4, 27, 12, 26, 114, 106, 14, 27, 122, 170, - 114, 43, 122, 235, 2, 18, 67, 26, 4, 18, 10, 19, 14, 18, 67, 19, 4, 27, 12, 26, 114, 234, 14, 27, 123, 42, 114, 171, - 123, 107, 2, 18, 67, 26, 4, 18, 10, 19, 14, 18, 67, 19, 4, 27, 12, 26, 14, 27, 115, 43, 124, 107, 115, 106, 0, 88, 24, - 192, 0, 128, 24, 192, 240, 2, 250, 253, 14, 3, 116, 171, 12, 3, 116, 235, 10, 3, 117, 43, 117, 104, 40, 0, 209, 0, 225, - 45, 124, 107, 33, 0, 0, 90, 24, 210, 0, 146, 24, 210, 240, 3, 250, 239, 33, 0, 145, 10, 145, 5, 28, 46, 225, 6, 32, - 9, 240, 2, 250, 227, 30, 4, 209, 0, 225, 29, 154, 5, 28, 33, 6, 19, 14, 27, 147, 3, 35, 9, 147, 0, 34, 2, 155, 3, 152, - 11, 247, 255, 255, 108, 124, 179, 124, 245, 6, 27, 4, 45, 67, 29, 125, 51, 28, 33, 2, 27, 67, 29, 125, 115, 34, 9, 67, - 29, 155, 10, 24, 237, 28, 40, 240, 3, 250, 133, 28, 32, 240, 2, 250, 222, 120, 170, 120, 235, 2, 18, 67, 26, 4, 18, - 10, 19, 14, 18, 67, 19, 4, 27, 12, 28, 14, 27, 112, 171, 112, 236, 28, 32, 240, 2, 250, 176, 30, 7, 209, 0, 224, 234, - 120, 235, 152, 11, 147, 0, 28, 57, 34, 2, 155, 3, 247, 255, 255, 61, 40, 0, 218, 0, 224, 204, 120, 41, 145, 2, 121, - 43, 0, 216, 24, 192, 0, 64, 240, 2, 250, 154, 14, 3, 114, 107, 12, 3, 114, 171, 10, 3, 114, 235, 115, 40, 40, 0, 209, - 0, 224, 201, 155, 2, 154, 2, 26, 228, 25, 210, 146, 3, 148, 4, 121, 43, 33, 0, 0, 218, 24, 210, 0, 82, 240, 3, 250, - 135, 33, 0, 145, 9, 145, 7, 224, 144, 122, 107, 122, 172, 6, 27, 4, 36, 67, 28, 122, 235, 154, 9, 2, 27, 67, 28, 123, - 43, 153, 3, 67, 28, 24, 164, 28, 32, 34, 9, 240, 3, 250, 48, 120, 35, 147, 2, 121, 35, 0, 216, 26, 192, 240, 2, 250, - 103, 14, 3, 115, 163, 12, 3, 115, 227, 10, 3, 116, 35, 116, 96, 40, 0, 209, 0, 224, 150, 153, 3, 155, 4, 28, 10, 153, - 2, 24, 82, 153, 2, 146, 3, 26, 91, 147, 4, 121, 35, 33, 0, 0, 218, 26, 210, 240, 3, 250, 82, 152, 3, 153, 4, 247, 255, - 250, 124, 35, 11, 144, 2, 70, 106, 92, 154, 115, 98, 155, 2, 43, 0, 208, 25, 28, 24, 240, 2, 250, 63, 14, 3, 114, 99, - 12, 3, 114, 163, 10, 3, 114, 227, 115, 32, 40, 0, 209, 0, 224, 110, 153, 3, 154, 2, 240, 3, 249, 243, 153, 3, 155, 4, - 28, 10, 153, 2, 24, 82, 153, 2, 146, 3, 26, 91, 147, 4, 34, 0, 146, 6, 146, 8, 224, 43, 123, 162, 123, 227, 6, 18, 4, - 27, 67, 19, 124, 34, 153, 6, 2, 18, 67, 19, 124, 98, 67, 19, 24, 201, 145, 2, 28, 8, 34, 7, 153, 3, 240, 3, 249, 212, - 154, 2, 153, 3, 120, 19, 24, 201, 145, 3, 153, 2, 121, 18, 121, 75, 2, 18, 67, 26, 4, 18, 10, 17, 14, 19, 67, 11, 4, - 27, 153, 2, 12, 26, 14, 27, 113, 11, 113, 74, 154, 8, 155, 6, 50, 1, 51, 7, 146, 8, 147, 6, 121, 35, 153, 8, 66, 153, - 211, 207, 154, 7, 155, 9, 50, 1, 51, 18, 146, 7, 147, 9, 121, 43, 153, 7, 66, 153, 210, 0, 231, 105, 28, 56, 240, 2, - 250, 4, 154, 5, 155, 10, 50, 1, 51, 13, 146, 5, 147, 10, 39, 0, 124, 115, 153, 5, 66, 153, 210, 0, 230, 243, 28, 53, - 36, 0, 47, 0, 209, 2, 224, 9, 28, 4, 28, 53, 28, 56, 240, 2, 249, 238, 44, 0, 208, 2, 28, 40, 247, 255, 250, 14, 176, - 13, 28, 32, 188, 240, 188, 2, 71, 8, 28, 53, 36, 4, 66, 100, 231, 238, 28, 53, 36, 4, 66, 100, 231, 239, 181, 240, 176, - 137, 75, 65, 28, 2, 104, 30, 0, 129, 104, 179, 24, 9, 50, 16, 0, 201, 0, 146, 24, 154, 28, 11, 51, 88, 28, 7, 24, 240, - 144, 5, 24, 113, 32, 0, 103, 8, 104, 81, 29, 21, 74, 56, 64, 10, 42, 1, 209, 99, 34, 4, 146, 4, 147, 7, 75, 54, 32, - 10, 96, 43, 247, 254, 254, 6, 75, 52, 32, 100, 96, 43, 247, 254, 254, 1, 75, 51, 34, 128, 96, 43, 35, 250, 0, 219, 147, - 0, 0, 82, 35, 0, 28, 40, 28, 41, 247, 254, 254, 121, 104, 42, 75, 45, 28, 4, 64, 19, 43, 5, 209, 50, 35, 192, 1, 27, - 64, 26, 35, 128, 0, 219, 66, 154, 208, 43, 40, 0, 209, 43, 32, 100, 247, 254, 253, 227, 75, 38, 74, 38, 104, 24, 96, - 26, 154, 7, 35, 22, 147, 1, 24, 179, 147, 2, 35, 128, 144, 6, 33, 128, 152, 5, 34, 6, 0, 91, 148, 0, 247, 255, 253, - 81, 30, 4, 219, 12, 28, 123, 32, 0, 4, 27, 144, 0, 144, 1, 144, 2, 12, 27, 152, 5, 33, 0, 34, 5, 247, 255, 253, 67, - 28, 4, 75, 21, 154, 6, 96, 26, 44, 0, 219, 2, 224, 8, 36, 1, 66, 100, 155, 4, 59, 1, 147, 4, 43, 0, 209, 169, 44, 0, - 219, 10, 0, 187, 25, 219, 0, 219, 24, 246, 55, 1, 35, 0, 103, 243, 103, 55, 224, 1, 36, 1, 66, 100, 176, 9, 28, 32, - 188, 240, 188, 2, 71, 8, 70, 192, 19, 112, 96, 60, 0, 0, 32, 1, 0, 0, 24, 3, 0, 0, 25, 3, 0, 0, 16, 1, 0, 0, 32, 5, - 19, 112, 96, 56, 0, 6, 26, 128, 181, 248, 76, 25, 28, 6, 104, 35, 104, 157, 35, 1, 96, 171, 247, 255, 255, 97, 30, 7, - 218, 24, 104, 35, 33, 55, 104, 155, 28, 52, 104, 90, 32, 10, 64, 10, 96, 90, 52, 16, 247, 254, 253, 124, 0, 164, 75, - 15, 25, 44, 96, 99, 32, 50, 247, 254, 253, 117, 75, 13, 32, 100, 96, 99, 247, 254, 253, 112, 75, 11, 96, 99, 75, 7, - 32, 55, 104, 26, 104, 146, 104, 81, 64, 1, 96, 81, 104, 27, 34, 4, 104, 155, 28, 56, 96, 154, 188, 248, 188, 2, 71, - 8, 70, 192, 19, 112, 96, 60, 0, 0, 24, 3, 0, 0, 25, 3, 0, 0, 16, 1, 181, 240, 176, 137, 75, 126, 34, 0, 104, 31, 0, - 131, 24, 27, 0, 219, 28, 30, 147, 5, 54, 88, 24, 251, 28, 4, 25, 190, 103, 26, 32, 50, 247, 254, 253, 68, 37, 3, 150, - 6, 72, 118, 247, 255, 250, 69, 32, 50, 247, 254, 253, 60, 35, 22, 147, 1, 155, 6, 34, 0, 147, 2, 35, 128, 146, 0, 28, - 48, 33, 128, 34, 6, 0, 91, 247, 255, 252, 175, 40, 0, 218, 12, 72, 109, 247, 255, 250, 48, 32, 50, 247, 254, 253, 39, - 61, 1, 32, 100, 247, 254, 253, 35, 45, 0, 209, 222, 224, 2, 154, 5, 24, 187, 224, 38, 28, 32, 247, 254, 255, 212, 75, - 100, 66, 152, 209, 0, 224, 184, 32, 100, 247, 254, 253, 19, 72, 98, 247, 255, 250, 22, 35, 22, 147, 1, 155, 6, 34, 0, - 147, 2, 35, 128, 146, 0, 28, 48, 33, 128, 34, 6, 0, 91, 247, 255, 252, 131, 40, 0, 218, 6, 72, 90, 53, 1, 247, 255, - 250, 3, 45, 3, 209, 221, 224, 12, 0, 163, 25, 27, 0, 219, 24, 251, 110, 26, 75, 85, 66, 154, 209, 46, 28, 32, 247, 255, - 248, 49, 76, 83, 224, 144, 28, 32, 247, 254, 255, 120, 32, 100, 247, 254, 252, 231, 28, 32, 247, 254, 255, 158, 74, - 73, 66, 144, 209, 0, 224, 130, 32, 100, 247, 254, 252, 221, 72, 75, 247, 255, 249, 224, 35, 0, 154, 6, 147, 0, 35, 22, - 147, 1, 35, 128, 146, 2, 28, 48, 33, 128, 34, 6, 0, 91, 247, 255, 252, 77, 40, 0, 218, 7, 72, 63, 61, 1, 247, 255, 249, - 205, 45, 0, 209, 215, 76, 64, 224, 102, 72, 64, 247, 255, 249, 198, 28, 99, 147, 5, 4, 27, 12, 27, 147, 7, 0, 163, 25, - 28, 0, 228, 37, 0, 25, 63, 32, 50, 247, 254, 252, 179, 72, 57, 28, 41, 247, 255, 249, 181, 35, 0, 147, 0, 147, 1, 147, - 2, 28, 48, 33, 0, 34, 5, 155, 7, 247, 255, 252, 37, 30, 4, 218, 7, 76, 50, 28, 41, 72, 50, 27, 100, 247, 255, 249, 163, - 53, 1, 224, 3, 72, 48, 28, 41, 247, 255, 249, 157, 155, 5, 34, 0, 103, 250, 103, 59, 44, 0, 218, 47, 33, 0, 28, 48, - 247, 255, 252, 111, 32, 50, 247, 254, 252, 138, 72, 40, 247, 255, 249, 141, 35, 22, 147, 1, 155, 6, 34, 0, 147, 2, 35, - 128, 146, 0, 28, 48, 33, 128, 34, 6, 0, 91, 247, 255, 251, 250, 30, 4, 218, 6, 72, 32, 247, 255, 249, 123, 34, 0, 103, - 58, 76, 31, 224, 2, 72, 31, 247, 255, 249, 116, 53, 1, 44, 0, 218, 7, 15, 233, 34, 0, 35, 4, 66, 171, 65, 74, 6, 18, - 42, 0, 209, 172, 44, 0, 219, 4, 72, 24, 247, 255, 249, 100, 224, 0, 76, 6, 176, 9, 28, 32, 188, 240, 188, 2, 71, 8, - 70, 192, 19, 112, 96, 60, 19, 112, 97, 82, 19, 112, 97, 7, 255, 255, 251, 161, 19, 112, 97, 37, 19, 112, 97, 76, 149, - 11, 32, 119, 255, 255, 251, 160, 19, 112, 97, 113, 255, 255, 247, 103, 19, 112, 97, 162, 19, 112, 97, 188, 255, 255, - 224, 192, 19, 112, 97, 219, 19, 112, 97, 250, 19, 112, 98, 62, 19, 112, 98, 21, 255, 255, 247, 62, 19, 112, 98, 59, - 19, 112, 98, 94, 181, 16, 75, 10, 34, 1, 104, 27, 28, 4, 104, 155, 96, 154, 247, 254, 254, 223, 40, 0, 219, 2, 28, 32, - 247, 255, 254, 202, 75, 3, 34, 4, 104, 27, 104, 155, 96, 154, 188, 16, 188, 2, 71, 8, 19, 112, 96, 60, 181, 248, 28, - 4, 38, 3, 39, 64, 224, 79, 104, 160, 240, 2, 255, 44, 10, 3, 64, 51, 28, 5, 43, 2, 208, 7, 107, 227, 108, 34, 105, 89, - 24, 138, 0, 65, 12, 73, 26, 82, 97, 90, 108, 35, 43, 0, 208, 59, 66, 47, 208, 57, 75, 36, 120, 27, 43, 0, 208, 2, 72, - 35, 247, 255, 248, 251, 6, 235, 213, 6, 75, 32, 120, 27, 43, 0, 208, 2, 72, 32, 247, 255, 248, 242, 7, 107, 213, 6, - 75, 27, 120, 27, 43, 0, 208, 2, 72, 28, 247, 255, 248, 233, 6, 171, 213, 6, 75, 23, 120, 27, 43, 0, 208, 2, 72, 25, - 247, 255, 248, 224, 7, 43, 213, 6, 75, 18, 120, 27, 43, 0, 208, 2, 72, 21, 247, 255, 248, 215, 75, 15, 120, 27, 43, - 0, 208, 2, 72, 19, 247, 255, 248, 208, 75, 11, 120, 27, 43, 0, 208, 8, 72, 16, 247, 255, 248, 201, 224, 4, 107, 164, - 44, 0, 209, 173, 32, 0, 224, 3, 107, 227, 32, 1, 66, 64, 97, 88, 75, 11, 34, 0, 104, 27, 100, 26, 188, 248, 188, 2, - 71, 8, 19, 112, 105, 216, 19, 112, 98, 103, 19, 112, 98, 116, 19, 112, 98, 124, 19, 112, 98, 145, 19, 112, 98, 164, - 19, 112, 98, 175, 19, 112, 104, 90, 19, 112, 96, 60, 181, 240, 176, 131, 28, 5, 35, 9, 7, 193, 213, 60, 75, 58, 120, - 27, 43, 0, 208, 2, 72, 57, 247, 255, 248, 153, 75, 57, 104, 28, 44, 0, 208, 9, 107, 96, 33, 96, 240, 3, 248, 85, 107, - 96, 33, 96, 240, 1, 254, 241, 107, 164, 231, 243, 76, 51, 104, 35, 43, 0, 208, 24, 108, 88, 33, 32, 240, 3, 248, 71, - 104, 35, 33, 32, 108, 88, 240, 1, 254, 226, 104, 35, 34, 128, 4, 82, 97, 26, 74, 43, 108, 88, 104, 18, 33, 32, 107, - 82, 97, 90, 240, 3, 248, 38, 104, 35, 105, 154, 75, 39, 96, 26, 75, 35, 104, 24, 247, 255, 255, 78, 35, 0, 40, 0, 208, - 4, 74, 36, 104, 18, 100, 19, 35, 5, 66, 91, 7, 106, 213, 40, 75, 26, 120, 27, 43, 0, 208, 2, 72, 31, 247, 255, 248, - 89, 33, 128, 1, 137, 79, 28, 78, 29, 35, 1, 34, 0, 145, 1, 104, 56, 104, 49, 104, 128, 0, 148, 48, 68, 25, 0, 70, 140, - 104, 4, 69, 98, 209, 7, 32, 1, 66, 32, 209, 10, 75, 22, 96, 24, 35, 1, 66, 91, 224, 5, 73, 20, 64, 12, 44, 3, 209, 1, - 153, 1, 96, 1, 50, 1, 42, 4, 209, 228, 43, 0, 208, 4, 34, 18, 66, 42, 208, 1, 35, 6, 66, 91, 176, 3, 28, 24, 188, 240, - 188, 2, 71, 8, 70, 192, 19, 112, 105, 216, 19, 112, 98, 192, 19, 112, 105, 244, 19, 112, 105, 220, 19, 112, 105, 232, - 19, 112, 105, 228, 19, 112, 96, 60, 19, 112, 98, 225, 19, 112, 106, 48, 19, 112, 106, 52, 0, 0, 32, 3, 181, 240, 176, - 131, 147, 1, 70, 107, 51, 39, 120, 30, 28, 5, 30, 115, 6, 27, 14, 27, 145, 0, 28, 23, 43, 15, 216, 61, 28, 4, 52, 160, - 104, 32, 40, 0, 208, 56, 33, 0, 34, 31, 240, 2, 254, 145, 104, 35, 74, 29, 96, 26, 28, 43, 51, 152, 104, 24, 240, 2, - 254, 13, 104, 35, 96, 88, 28, 56, 240, 2, 254, 8, 104, 35, 70, 105, 96, 152, 29, 202, 120, 17, 104, 35, 70, 106, 115, - 25, 28, 209, 104, 35, 120, 10, 115, 90, 104, 34, 35, 6, 46, 6, 217, 0, 35, 10, 28, 44, 115, 147, 52, 160, 104, 32, 153, - 8, 28, 50, 48, 15, 240, 2, 254, 40, 28, 43, 51, 144, 104, 24, 123, 105, 104, 35, 34, 31, 247, 255, 250, 52, 40, 31, - 208, 6, 40, 0, 219, 5, 72, 5, 224, 3, 32, 3, 66, 64, 224, 0, 32, 0, 176, 3, 188, 240, 188, 2, 71, 8, 85, 83, 66, 67, - 255, 255, 216, 238, 181, 240, 28, 4, 176, 131, 52, 160, 28, 5, 145, 0, 28, 23, 33, 255, 34, 13, 104, 32, 240, 2, 254, - 68, 28, 43, 51, 144, 104, 24, 123, 41, 104, 35, 34, 13, 247, 255, 250, 14, 40, 13, 208, 1, 40, 0, 218, 40, 40, 0, 219, - 43, 28, 43, 51, 160, 104, 28, 104, 32, 240, 2, 253, 180, 144, 1, 104, 96, 240, 2, 253, 176, 28, 6, 104, 160, 240, 2, - 253, 172, 74, 16, 153, 1, 123, 35, 66, 145, 209, 21, 47, 0, 208, 0, 96, 56, 154, 0, 42, 0, 208, 0, 112, 19, 53, 152, - 104, 43, 66, 158, 209, 12, 28, 179, 4, 27, 12, 54, 12, 27, 4, 54, 67, 30, 96, 46, 32, 0, 224, 4, 72, 5, 224, 2, 72, - 5, 224, 0, 72, 5, 176, 3, 188, 240, 188, 2, 71, 8, 83, 66, 83, 85, 255, 255, 216, 237, 255, 255, 216, 236, 255, 255, - 216, 235, 181, 240, 176, 135, 74, 75, 75, 76, 120, 18, 28, 6, 104, 31, 42, 0, 208, 1, 73, 74, 224, 0, 73, 74, 96, 25, - 28, 51, 51, 144, 104, 24, 75, 72, 104, 27, 104, 153, 105, 195, 49, 68, 0, 155, 24, 203, 104, 25, 35, 1, 66, 11, 209, - 6, 74, 68, 36, 1, 96, 19, 75, 62, 66, 100, 96, 31, 224, 113, 75, 60, 42, 0, 208, 1, 74, 60, 224, 0, 74, 60, 96, 26, - 75, 62, 120, 27, 43, 0, 208, 17, 136, 243, 34, 255, 147, 0, 33, 33, 35, 0, 147, 1, 147, 2, 247, 255, 249, 174, 28, 4, - 28, 33, 72, 55, 247, 254, 255, 47, 32, 60, 247, 254, 250, 38, 224, 6, 33, 0, 247, 255, 250, 4, 32, 5, 247, 254, 250, - 31, 36, 0, 75, 41, 120, 26, 75, 41, 42, 0, 208, 1, 74, 41, 224, 0, 74, 41, 28, 53, 96, 26, 53, 144, 44, 0, 218, 10, - 32, 50, 247, 254, 250, 14, 104, 40, 33, 0, 247, 255, 249, 236, 32, 5, 247, 254, 250, 7, 224, 48, 123, 49, 104, 40, 247, - 255, 249, 228, 28, 4, 32, 5, 247, 254, 249, 254, 72, 33, 28, 33, 247, 254, 255, 0, 44, 0, 219, 34, 123, 113, 104, 40, - 247, 255, 249, 214, 28, 4, 32, 5, 247, 254, 249, 240, 72, 27, 28, 33, 247, 254, 254, 242, 44, 0, 219, 20, 32, 10, 247, - 254, 249, 231, 70, 105, 49, 23, 104, 40, 247, 255, 249, 237, 28, 4, 28, 33, 72, 20, 247, 254, 254, 227, 44, 0, 219, - 5, 72, 19, 247, 254, 254, 222, 75, 7, 96, 31, 224, 4, 75, 6, 34, 1, 96, 31, 75, 8, 96, 26, 176, 7, 28, 32, 188, 240, - 188, 2, 71, 8, 70, 192, 19, 112, 1, 15, 19, 112, 96, 56, 0, 15, 66, 64, 0, 3, 13, 64, 19, 112, 96, 60, 19, 112, 106, - 52, 19, 112, 1, 13, 19, 112, 99, 2, 19, 112, 99, 35, 19, 112, 99, 74, 19, 112, 99, 114, 19, 112, 99, 161, 181, 240, - 176, 141, 146, 6, 70, 106, 50, 79, 120, 18, 28, 31, 70, 107, 51, 95, 146, 7, 70, 106, 120, 27, 50, 83, 120, 18, 6, 27, - 22, 27, 146, 8, 70, 106, 50, 47, 147, 4, 35, 0, 112, 19, 74, 147, 77, 148, 28, 6, 145, 5, 147, 10, 96, 19, 147, 3, 36, - 0, 28, 163, 43, 1, 216, 0, 225, 6, 44, 0, 208, 33, 28, 48, 33, 0, 247, 255, 255, 38, 30, 4, 219, 1, 32, 5, 224, 0, 32, - 60, 247, 254, 249, 131, 75, 137, 104, 27, 104, 154, 75, 136, 50, 68, 104, 27, 0, 155, 24, 211, 104, 27, 44, 0, 218, - 9, 154, 3, 50, 1, 146, 3, 42, 2, 221, 0, 224, 232, 32, 10, 247, 254, 249, 111, 224, 219, 35, 0, 147, 3, 155, 4, 154, - 8, 59, 1, 6, 27, 22, 27, 147, 4, 42, 0, 208, 59, 104, 43, 74, 123, 147, 2, 120, 19, 43, 0, 208, 1, 75, 121, 224, 0, - 75, 121, 96, 43, 154, 7, 155, 18, 146, 1, 147, 0, 28, 58, 35, 0, 28, 48, 153, 5, 247, 255, 254, 66, 75, 110, 154, 2, - 28, 4, 96, 26, 28, 131, 43, 1, 216, 0, 224, 190, 40, 0, 218, 0, 224, 178, 155, 6, 34, 144, 25, 146, 28, 60, 147, 2, - 146, 9, 224, 18, 155, 9, 123, 113, 104, 24, 28, 34, 155, 2, 247, 255, 248, 163, 28, 131, 43, 1, 216, 0, 224, 159, 40, - 0, 219, 69, 66, 160, 209, 67, 154, 2, 26, 36, 24, 18, 146, 2, 44, 0, 209, 234, 224, 62, 104, 43, 74, 93, 147, 2, 120, - 19, 43, 0, 208, 1, 75, 91, 224, 0, 75, 91, 96, 43, 154, 7, 155, 18, 146, 1, 147, 0, 28, 58, 35, 128, 28, 48, 153, 5, - 247, 255, 254, 6, 75, 80, 154, 2, 28, 4, 96, 26, 40, 0, 218, 3, 72, 83, 28, 33, 247, 254, 254, 16, 28, 163, 43, 1, 217, - 125, 44, 0, 218, 22, 224, 113, 28, 51, 51, 144, 104, 24, 123, 49, 28, 58, 155, 6, 247, 255, 248, 104, 30, 4, 218, 3, - 72, 74, 28, 33, 247, 254, 253, 252, 28, 163, 43, 1, 217, 96, 44, 0, 219, 5, 66, 188, 208, 5, 224, 2, 47, 0, 209, 231, - 224, 1, 76, 68, 224, 86, 75, 59, 74, 61, 104, 27, 147, 2, 120, 19, 43, 0, 208, 1, 75, 59, 224, 0, 75, 59, 74, 54, 70, - 105, 96, 19, 28, 48, 49, 47, 170, 10, 247, 255, 254, 33, 30, 4, 218, 34, 72, 58, 28, 33, 247, 254, 253, 215, 28, 99, - 209, 3, 75, 46, 154, 2, 96, 26, 224, 65, 28, 52, 52, 144, 104, 32, 123, 49, 247, 255, 248, 167, 123, 51, 32, 15, 104, - 34, 64, 24, 9, 219, 1, 27, 106, 81, 24, 27, 32, 1, 64, 152, 67, 129, 98, 81, 70, 105, 28, 48, 49, 47, 170, 10, 247, - 255, 253, 253, 28, 4, 75, 31, 154, 2, 96, 26, 28, 163, 43, 1, 217, 34, 155, 10, 43, 0, 208, 7, 75, 37, 104, 27, 43, - 0, 208, 3, 70, 107, 34, 1, 51, 47, 112, 26, 44, 0, 219, 12, 75, 32, 36, 0, 104, 27, 43, 0, 208, 7, 70, 107, 51, 47, - 120, 27, 43, 0, 208, 2, 76, 28, 224, 0, 28, 4, 155, 4, 43, 0, 221, 2, 44, 0, 218, 0, 230, 247, 34, 0, 44, 0, 218, 0, - 34, 1, 75, 9, 96, 26, 154, 21, 42, 0, 208, 3, 70, 107, 51, 47, 120, 27, 112, 19, 155, 22, 43, 0, 208, 2, 155, 10, 154, - 22, 96, 19, 176, 13, 28, 32, 188, 240, 188, 2, 71, 8, 19, 112, 106, 52, 19, 112, 96, 56, 19, 112, 96, 60, 19, 112, 106, - 48, 19, 112, 1, 15, 0, 15, 66, 64, 0, 3, 13, 64, 19, 112, 99, 171, 19, 112, 99, 190, 255, 255, 216, 233, 19, 112, 99, - 214, 19, 112, 105, 252, 255, 255, 216, 234, 181, 240, 28, 3, 176, 143, 51, 160, 104, 30, 145, 7, 70, 109, 33, 128, 1, - 9, 53, 55, 35, 0, 172, 9, 24, 118, 28, 7, 112, 43, 28, 32, 33, 0, 34, 16, 240, 2, 251, 224, 46, 0, 208, 91, 35, 6, 147, - 1, 35, 1, 33, 0, 147, 2, 35, 10, 145, 4, 147, 5, 28, 56, 153, 7, 34, 0, 35, 0, 149, 3, 148, 0, 247, 255, 254, 130, 30, - 5, 218, 5, 72, 41, 28, 41, 247, 254, 253, 52, 28, 107, 208, 71, 45, 0, 219, 4, 70, 107, 51, 55, 120, 27, 43, 0, 208, - 64, 153, 7, 171, 9, 34, 3, 112, 26, 1, 74, 112, 90, 34, 18, 113, 26, 34, 0, 113, 90, 28, 48, 33, 0, 34, 18, 240, 2, - 251, 176, 75, 28, 53, 2, 209, 1, 74, 28, 224, 0, 74, 28, 96, 26, 171, 9, 147, 0, 35, 6, 147, 1, 35, 0, 147, 2, 147, - 3, 147, 4, 35, 10, 147, 5, 153, 7, 28, 56, 28, 50, 35, 18, 247, 255, 254, 77, 28, 5, 28, 41, 72, 19, 247, 254, 253, - 0, 45, 0, 219, 19, 120, 179, 33, 15, 70, 108, 64, 25, 52, 55, 72, 15, 112, 33, 247, 254, 252, 245, 120, 35, 59, 2, 6, - 27, 14, 27, 43, 2, 217, 3, 224, 3, 37, 4, 66, 109, 224, 0, 77, 9, 176, 15, 28, 40, 188, 240, 188, 2, 71, 8, 70, 192, - 19, 112, 99, 229, 19, 112, 96, 56, 0, 38, 37, 160, 0, 152, 150, 128, 19, 112, 100, 6, 19, 112, 100, 37, 255, 255, 216, - 239, 181, 240, 176, 147, 70, 106, 35, 0, 50, 71, 112, 19, 74, 196, 28, 4, 32, 16, 112, 16, 72, 195, 28, 34, 50, 152, - 96, 16, 174, 12, 58, 8, 96, 17, 28, 8, 130, 115, 28, 49, 130, 179, 247, 254, 255, 250, 28, 5, 28, 41, 72, 189, 247, - 254, 252, 186, 45, 0, 218, 0, 225, 195, 75, 187, 104, 27, 43, 0, 208, 37, 75, 186, 121, 50, 121, 153, 66, 145, 209, - 23, 121, 217, 121, 114, 66, 145, 209, 19, 137, 25, 137, 50, 66, 145, 209, 15, 137, 89, 137, 114, 66, 145, 209, 11, 123, - 25, 123, 178, 66, 145, 209, 7, 123, 89, 123, 242, 66, 145, 209, 3, 123, 154, 124, 51, 66, 154, 208, 8, 168, 12, 247, - 254, 251, 102, 37, 1, 72, 170, 247, 254, 252, 143, 66, 109, 225, 167, 170, 12, 121, 17, 75, 166, 38, 0, 113, 153, 121, - 81, 113, 217, 137, 17, 129, 25, 137, 81, 129, 89, 123, 145, 115, 25, 123, 209, 115, 89, 124, 18, 115, 154, 74, 160, - 35, 128, 66, 91, 96, 19, 35, 0, 147, 8, 147, 5, 224, 222, 138, 111, 138, 171, 154, 8, 4, 63, 67, 31, 24, 191, 122, 58, - 72, 154, 0, 82, 153, 5, 247, 254, 252, 104, 34, 156, 35, 0, 25, 18, 147, 10, 147, 6, 146, 11, 224, 192, 122, 123, 122, - 189, 6, 27, 4, 45, 67, 29, 122, 251, 2, 27, 67, 29, 123, 59, 67, 29, 155, 10, 24, 237, 121, 107, 43, 8, 209, 116, 121, - 235, 43, 80, 209, 113, 121, 43, 43, 1, 217, 110, 154, 11, 35, 1, 112, 19, 121, 169, 72, 136, 34, 1, 247, 254, 252, 68, - 35, 0, 115, 102, 115, 38, 147, 9, 147, 7, 224, 49, 123, 170, 123, 235, 6, 18, 4, 27, 67, 19, 124, 42, 2, 18, 67, 19, - 124, 106, 67, 19, 154, 9, 24, 155, 120, 218, 42, 2, 209, 28, 120, 154, 6, 17, 41, 0, 218, 11, 123, 33, 41, 0, 209, 8, - 42, 0, 208, 6, 115, 34, 121, 25, 121, 91, 2, 9, 67, 25, 72, 118, 224, 10, 123, 97, 41, 0, 209, 9, 42, 0, 208, 7, 115, - 98, 121, 25, 121, 91, 2, 9, 72, 113, 67, 25, 247, 254, 252, 18, 155, 7, 154, 9, 51, 1, 50, 7, 147, 7, 146, 9, 121, 43, - 154, 7, 66, 154, 211, 201, 123, 33, 41, 0, 208, 94, 123, 98, 42, 0, 208, 91, 72, 104, 247, 254, 251, 255, 75, 96, 123, - 34, 168, 12, 116, 26, 123, 98, 116, 90, 121, 122, 70, 111, 112, 34, 120, 170, 55, 71, 96, 98, 115, 218, 120, 235, 28, - 37, 96, 163, 247, 254, 250, 192, 78, 89, 75, 94, 72, 95, 96, 51, 120, 33, 104, 162, 53, 144, 247, 254, 251, 228, 104, - 40, 28, 57, 247, 254, 254, 229, 40, 0, 218, 91, 224, 85, 123, 170, 123, 235, 6, 18, 4, 27, 67, 19, 124, 42, 124, 104, - 2, 18, 67, 19, 67, 24, 208, 1, 240, 1, 250, 126, 122, 106, 122, 171, 6, 18, 4, 27, 67, 19, 122, 234, 123, 40, 2, 18, - 67, 19, 115, 174, 115, 238, 116, 46, 116, 110, 67, 24, 208, 1, 240, 1, 250, 109, 121, 107, 114, 110, 114, 174, 114, - 238, 115, 46, 43, 9, 209, 4, 74, 70, 75, 62, 168, 12, 96, 26, 224, 39, 43, 8, 209, 10, 121, 235, 43, 80, 209, 7, 121, - 43, 43, 1, 217, 4, 121, 171, 74, 64, 26, 211, 74, 54, 96, 19, 155, 6, 154, 10, 51, 1, 50, 18, 147, 6, 146, 10, 121, - 59, 154, 6, 66, 154, 210, 0, 231, 57, 155, 5, 154, 8, 51, 1, 50, 13, 147, 5, 146, 8, 173, 12, 124, 107, 154, 5, 66, - 154, 210, 0, 231, 26, 72, 52, 247, 254, 251, 140, 28, 40, 247, 254, 250, 92, 77, 48, 224, 147, 72, 49, 247, 254, 251, - 132, 77, 48, 224, 142, 120, 57, 72, 48, 120, 34, 247, 254, 251, 125, 75, 47, 104, 40, 96, 51, 120, 33, 247, 254, 254, - 110, 40, 0, 218, 2, 72, 44, 247, 254, 251, 114, 74, 43, 75, 27, 121, 225, 96, 26, 28, 35, 51, 144, 104, 24, 122, 226, - 247, 254, 254, 81, 40, 0, 218, 2, 72, 38, 247, 254, 251, 99, 72, 38, 70, 109, 247, 254, 251, 95, 53, 70, 35, 0, 112, - 43, 28, 35, 51, 144, 104, 24, 136, 227, 33, 161, 147, 0, 35, 1, 147, 1, 34, 254, 35, 0, 149, 2, 247, 254, 253, 201, - 40, 0, 218, 58, 72, 28, 247, 254, 251, 74, 35, 8, 115, 163, 224, 60, 70, 192, 19, 112, 96, 64, 44, 13, 224, 1, 19, 112, - 100, 71, 19, 112, 106, 24, 19, 112, 106, 4, 19, 112, 100, 113, 19, 112, 105, 224, 19, 112, 100, 151, 19, 112, 100, 190, - 19, 112, 100, 245, 19, 112, 101, 3, 19, 112, 101, 18, 255, 255, 251, 79, 19, 112, 101, 87, 255, 255, 177, 224, 255, - 255, 216, 240, 19, 112, 101, 38, 19, 112, 101, 133, 255, 255, 216, 231, 19, 112, 101, 163, 255, 255, 251, 78, 19, 112, - 101, 196, 255, 255, 251, 77, 19, 112, 101, 226, 19, 112, 102, 17, 19, 112, 102, 76, 120, 41, 72, 24, 49, 1, 6, 9, 14, - 9, 115, 161, 247, 254, 251, 10, 28, 37, 53, 160, 104, 43, 43, 0, 209, 7, 32, 129, 1, 64, 240, 1, 249, 145, 35, 31, 48, - 31, 67, 152, 96, 40, 52, 160, 104, 35, 37, 0, 43, 0, 209, 4, 74, 12, 75, 13, 37, 4, 96, 26, 66, 109, 74, 12, 75, 12, - 96, 26, 45, 0, 208, 5, 75, 8, 72, 11, 104, 25, 247, 254, 250, 233, 224, 2, 72, 9, 247, 254, 250, 229, 176, 19, 28, 40, - 188, 240, 188, 2, 71, 8, 19, 112, 102, 115, 255, 255, 251, 75, 19, 112, 105, 224, 0, 15, 66, 64, 19, 112, 96, 56, 19, - 112, 102, 138, 19, 112, 102, 172, 181, 8, 33, 0, 247, 255, 251, 100, 188, 8, 188, 2, 71, 8, 0, 0, 181, 240, 176, 139, - 171, 8, 34, 18, 112, 26, 1, 74, 112, 90, 34, 0, 112, 154, 112, 218, 113, 90, 28, 15, 28, 2, 33, 36, 50, 160, 113, 25, - 104, 20, 34, 128, 1, 18, 24, 164, 144, 7, 44, 0, 208, 42, 38, 0, 33, 0, 34, 36, 28, 32, 240, 2, 249, 65, 171, 8, 34, - 6, 147, 0, 35, 10, 37, 0, 146, 1, 147, 5, 152, 7, 28, 57, 28, 34, 35, 36, 149, 2, 149, 3, 149, 4, 247, 255, 251, 229, - 40, 0, 219, 7, 120, 35, 34, 31, 64, 19, 43, 5, 208, 6, 43, 7, 209, 8, 224, 3, 54, 1, 46, 2, 208, 9, 231, 220, 75, 6, - 34, 1, 96, 26, 224, 4, 75, 4, 96, 29, 224, 1, 32, 4, 66, 64, 176, 11, 188, 240, 188, 2, 71, 8, 19, 112, 105, 236, 181, - 112, 176, 136, 28, 22, 28, 29, 34, 37, 171, 7, 112, 26, 1, 74, 112, 90, 28, 2, 50, 160, 104, 20, 34, 128, 1, 18, 24, - 164, 44, 0, 208, 42, 147, 0, 35, 2, 147, 1, 35, 0, 147, 2, 147, 3, 147, 4, 35, 10, 147, 5, 28, 34, 35, 8, 247, 255, - 251, 170, 40, 0, 219, 29, 168, 6, 28, 33, 34, 4, 240, 2, 248, 173, 45, 0, 208, 1, 155, 6, 96, 43, 29, 33, 168, 6, 34, - 4, 240, 2, 248, 164, 46, 0, 208, 1, 155, 6, 96, 51, 35, 128, 154, 6, 1, 27, 32, 0, 66, 154, 209, 5, 75, 4, 34, 1, 96, - 26, 224, 1, 32, 4, 66, 64, 176, 8, 188, 112, 188, 2, 71, 8, 19, 112, 105, 236, 181, 240, 176, 131, 123, 131, 28, 15, - 28, 5, 66, 187, 217, 72, 78, 40, 73, 40, 72, 41, 96, 49, 33, 0, 247, 254, 250, 46, 75, 39, 28, 40, 96, 51, 28, 57, 247, - 255, 252, 200, 30, 4, 219, 53, 74, 33, 28, 57, 96, 50, 28, 40, 247, 255, 255, 86, 28, 4, 28, 33, 72, 32, 247, 254, 250, - 27, 44, 0, 219, 40, 28, 43, 51, 160, 104, 26, 35, 128, 1, 27, 92, 211, 33, 31, 64, 25, 72, 27, 247, 254, 250, 14, 28, - 59, 29, 62, 51, 20, 0, 182, 0, 155, 25, 170, 147, 1, 28, 57, 24, 235, 28, 40, 247, 255, 255, 130, 153, 1, 28, 4, 89, - 75, 89, 114, 72, 18, 28, 33, 247, 254, 249, 250, 89, 114, 75, 17, 66, 154, 217, 3, 154, 1, 89, 83, 43, 9, 216, 1, 36, - 33, 66, 100, 74, 6, 75, 5, 96, 26, 224, 1, 36, 3, 66, 100, 176, 3, 28, 32, 188, 240, 188, 2, 71, 8, 70, 192, 19, 112, - 96, 56, 0, 15, 66, 64, 19, 112, 102, 205, 1, 49, 45, 0, 19, 112, 102, 232, 19, 112, 102, 252, 19, 112, 103, 17, 0, 0, - 1, 255, 181, 240, 176, 141, 175, 9, 37, 40, 112, 61, 1, 77, 112, 125, 14, 21, 112, 189, 70, 110, 12, 21, 36, 0, 112, - 253, 113, 122, 10, 21, 54, 47, 10, 26, 112, 52, 113, 61, 113, 188, 113, 250, 114, 59, 114, 124, 123, 130, 66, 138, 217, - 28, 29, 10, 0, 146, 88, 18, 146, 7, 42, 0, 208, 22, 77, 15, 34, 1, 96, 42, 154, 7, 151, 0, 67, 83, 34, 10, 146, 1, 34, - 6, 146, 5, 154, 18, 148, 2, 150, 3, 148, 4, 247, 255, 250, 236, 96, 44, 40, 0, 221, 7, 120, 51, 43, 0, 209, 3, 224, - 3, 32, 3, 66, 64, 224, 0, 72, 3, 176, 13, 188, 240, 188, 2, 71, 8, 70, 192, 19, 112, 105, 252, 255, 255, 216, 234, 181, - 240, 176, 141, 147, 7, 1, 75, 175, 9, 37, 42, 70, 156, 112, 61, 35, 8, 70, 101, 67, 43, 112, 123, 14, 21, 155, 7, 112, - 189, 70, 110, 12, 21, 36, 0, 112, 253, 113, 122, 10, 21, 54, 47, 10, 26, 112, 52, 113, 61, 113, 188, 113, 250, 114, - 59, 114, 124, 123, 130, 66, 138, 217, 32, 29, 10, 0, 146, 88, 18, 70, 148, 69, 164, 208, 26, 77, 17, 35, 1, 96, 43, - 155, 7, 151, 0, 70, 98, 67, 90, 70, 148, 34, 1, 146, 2, 34, 6, 146, 5, 39, 10, 154, 18, 70, 99, 151, 1, 150, 3, 148, - 4, 247, 255, 250, 158, 96, 44, 40, 0, 221, 7, 120, 51, 43, 0, 209, 3, 224, 3, 32, 3, 66, 64, 224, 0, 72, 3, 176, 13, - 188, 240, 188, 2, 71, 8, 70, 192, 19, 112, 105, 252, 255, 255, 216, 234, 181, 240, 176, 135, 28, 28, 147, 2, 28, 11, - 51, 4, 0, 155, 145, 3, 88, 25, 28, 6, 28, 11, 67, 99, 32, 128, 2, 64, 28, 23, 66, 131, 217, 2, 240, 2, 248, 153, 144, - 2, 155, 3, 32, 1, 51, 4, 0, 155, 66, 64, 147, 5, 224, 28, 154, 2, 28, 37, 66, 148, 217, 0, 28, 21, 4, 43, 12, 27, 147, - 4, 155, 12, 28, 48, 147, 0, 153, 3, 28, 58, 155, 4, 247, 255, 255, 67, 40, 0, 219, 12, 154, 4, 25, 127, 26, 164, 154, - 5, 4, 36, 89, 147, 12, 36, 67, 93, 155, 12, 25, 91, 147, 12, 44, 0, 209, 224, 176, 7, 188, 240, 188, 2, 71, 8, 181, - 240, 176, 135, 28, 28, 147, 2, 28, 11, 51, 4, 0, 155, 145, 3, 88, 25, 28, 6, 28, 11, 67, 99, 32, 128, 2, 64, 28, 23, - 66, 131, 217, 2, 240, 2, 248, 91, 144, 2, 155, 3, 32, 1, 51, 4, 0, 155, 66, 64, 147, 5, 224, 28, 154, 2, 28, 37, 66, - 148, 217, 0, 28, 21, 4, 43, 12, 27, 147, 4, 155, 12, 28, 48, 147, 0, 153, 3, 28, 58, 155, 4, 247, 255, 255, 73, 40, - 0, 219, 12, 154, 4, 25, 127, 26, 164, 154, 5, 4, 36, 89, 147, 12, 36, 67, 93, 155, 12, 25, 91, 147, 12, 44, 0, 209, - 224, 176, 7, 188, 240, 188, 2, 71, 8, 181, 240, 176, 139, 74, 135, 35, 0, 128, 19, 74, 135, 36, 0, 128, 19, 75, 134, - 74, 135, 112, 28, 75, 135, 79, 135, 112, 28, 35, 120, 144, 8, 66, 91, 96, 19, 28, 56, 153, 8, 247, 255, 251, 218, 40, - 0, 218, 0, 224, 241, 34, 1, 75, 129, 115, 186, 104, 25, 41, 0, 208, 74, 121, 91, 43, 0, 209, 3, 75, 126, 120, 27, 66, - 26, 208, 29, 76, 122, 35, 0, 115, 163, 77, 124, 75, 124, 38, 1, 96, 43, 28, 35, 51, 144, 104, 24, 136, 227, 33, 161, - 147, 0, 28, 35, 51, 14, 147, 2, 34, 254, 35, 0, 150, 1, 247, 254, 251, 5, 75, 117, 96, 43, 40, 0, 218, 1, 115, 166, - 224, 188, 123, 163, 51, 1, 115, 163, 75, 108, 72, 113, 121, 29, 28, 41, 247, 254, 248, 124, 78, 104, 28, 41, 28, 48, - 247, 255, 254, 59, 28, 4, 28, 33, 72, 108, 247, 254, 248, 114, 28, 163, 43, 1, 216, 9, 28, 48, 247, 255, 253, 154, 74, - 94, 35, 121, 66, 91, 96, 19, 34, 0, 75, 91, 224, 61, 44, 0, 218, 0, 224, 153, 75, 88, 34, 1, 112, 26, 75, 89, 112, 29, - 224, 139, 38, 1, 113, 92, 37, 0, 28, 60, 150, 6, 55, 144, 28, 40, 30, 67, 65, 152, 144, 9, 40, 0, 209, 5, 75, 84, 120, - 27, 7, 217, 213, 1, 46, 0, 209, 41, 72, 87, 28, 41, 247, 254, 248, 70, 6, 43, 14, 27, 28, 25, 72, 76, 147, 5, 247, 255, - 254, 3, 144, 7, 153, 7, 72, 80, 247, 254, 248, 58, 155, 7, 51, 2, 43, 1, 216, 16, 154, 9, 42, 0, 208, 13, 74, 73, 75, - 70, 72, 67, 96, 26, 247, 255, 253, 91, 74, 63, 35, 121, 66, 91, 96, 19, 75, 60, 34, 0, 112, 26, 224, 105, 155, 7, 43, - 0, 218, 59, 46, 0, 208, 52, 78, 61, 75, 62, 73, 66, 96, 51, 136, 227, 32, 0, 96, 8, 115, 160, 104, 56, 147, 0, 28, 35, - 34, 1, 51, 14, 146, 1, 147, 2, 33, 161, 35, 0, 34, 254, 247, 254, 250, 134, 75, 53, 144, 5, 96, 51, 40, 0, 218, 5, 73, - 55, 35, 1, 32, 0, 115, 163, 96, 8, 224, 5, 123, 163, 34, 1, 51, 1, 115, 163, 75, 42, 113, 90, 75, 40, 72, 49, 123, 155, - 153, 5, 28, 26, 147, 6, 247, 253, 255, 243, 75, 38, 38, 0, 120, 27, 7, 216, 213, 3, 153, 5, 15, 206, 224, 0, 53, 1, - 154, 6, 66, 149, 219, 144, 224, 29, 33, 23, 70, 104, 74, 29, 92, 8, 35, 1, 96, 19, 113, 16, 154, 8, 152, 8, 137, 17, - 74, 19, 128, 17, 137, 65, 74, 19, 128, 17, 74, 19, 70, 105, 112, 19, 34, 23, 75, 19, 92, 81, 112, 25, 74, 23, 75, 21, - 32, 0, 96, 26, 75, 14, 34, 0, 96, 26, 224, 14, 74, 12, 35, 122, 66, 91, 96, 19, 72, 12, 247, 255, 252, 239, 75, 8, 34, - 0, 112, 26, 72, 20, 247, 253, 255, 187, 32, 3, 66, 64, 176, 11, 188, 240, 188, 2, 71, 8, 70, 192, 19, 112, 105, 248, - 19, 112, 106, 0, 19, 112, 106, 28, 19, 112, 105, 224, 19, 112, 96, 64, 19, 114, 196, 96, 19, 112, 106, 4, 19, 112, 1, - 14, 19, 112, 96, 56, 0, 152, 150, 128, 0, 15, 66, 64, 19, 112, 103, 72, 19, 112, 103, 102, 19, 112, 103, 77, 19, 112, - 106, 52, 19, 112, 103, 131, 19, 112, 103, 172, 181, 8, 74, 10, 104, 19, 43, 0, 208, 13, 75, 9, 33, 16, 112, 25, 35, - 0, 73, 8, 96, 19, 74, 8, 112, 11, 96, 19, 72, 7, 33, 0, 34, 20, 240, 1, 254, 19, 188, 8, 188, 1, 71, 0, 19, 112, 106, - 24, 19, 112, 96, 64, 19, 112, 106, 28, 19, 112, 106, 52, 19, 112, 106, 4, 181, 240, 176, 135, 75, 119, 36, 0, 104, 29, - 45, 0, 208, 0, 224, 227, 75, 117, 32, 0, 104, 27, 104, 155, 96, 157, 247, 253, 248, 189, 74, 115, 35, 1, 66, 91, 96, - 19, 74, 114, 35, 1, 96, 19, 74, 113, 72, 114, 112, 21, 74, 114, 112, 19, 247, 253, 255, 85, 75, 113, 120, 27, 43, 1, - 208, 4, 43, 2, 208, 6, 34, 0, 146, 4, 224, 6, 35, 1, 147, 4, 36, 1, 224, 2, 34, 1, 146, 4, 36, 0, 0, 167, 224, 174, - 75, 98, 74, 104, 104, 29, 0, 163, 25, 27, 0, 219, 24, 235, 103, 92, 111, 27, 96, 20, 43, 0, 209, 52, 104, 171, 34, 1, - 51, 68, 25, 219, 104, 27, 66, 26, 209, 2, 28, 32, 247, 253, 253, 57, 78, 87, 34, 1, 104, 51, 104, 155, 51, 68, 25, 219, - 104, 27, 66, 26, 208, 33, 28, 32, 247, 254, 253, 237, 34, 140, 0, 210, 24, 131, 43, 1, 216, 2, 75, 79, 96, 24, 224, - 130, 28, 32, 247, 254, 252, 126, 144, 3, 32, 20, 247, 253, 250, 12, 104, 51, 104, 155, 51, 68, 25, 219, 104, 26, 155, - 3, 43, 0, 219, 4, 75, 77, 64, 26, 75, 77, 66, 154, 208, 2, 28, 32, 247, 254, 253, 206, 0, 160, 25, 0, 0, 192, 24, 43, - 111, 27, 43, 0, 208, 100, 75, 64, 34, 1, 48, 88, 96, 26, 24, 40, 247, 255, 254, 46, 144, 3, 40, 0, 209, 87, 75, 56, - 34, 1, 96, 26, 79, 65, 74, 57, 96, 16, 28, 56, 247, 253, 248, 66, 77, 52, 34, 4, 104, 43, 72, 62, 104, 155, 96, 154, - 247, 253, 254, 224, 32, 100, 247, 253, 249, 215, 32, 128, 1, 0, 240, 0, 253, 105, 78, 57, 75, 57, 34, 1, 96, 51, 75, - 57, 144, 4, 112, 26, 104, 43, 154, 3, 104, 155, 32, 0, 96, 154, 247, 253, 248, 37, 72, 53, 247, 253, 254, 200, 75, 52, - 34, 0, 120, 25, 155, 4, 72, 51, 147, 0, 35, 1, 247, 255, 253, 125, 144, 5, 28, 56, 247, 253, 248, 21, 104, 43, 34, 4, - 104, 155, 96, 154, 70, 107, 34, 15, 92, 210, 75, 40, 152, 4, 112, 26, 75, 43, 96, 51, 240, 0, 253, 91, 155, 5, 43, 0, - 218, 7, 72, 40, 247, 253, 254, 167, 28, 32, 247, 253, 252, 224, 76, 38, 224, 27, 72, 38, 247, 253, 254, 159, 75, 38, - 104, 27, 43, 0, 208, 20, 52, 2, 224, 18, 28, 32, 247, 253, 252, 210, 52, 1, 55, 4, 154, 4, 66, 148, 220, 0, 231, 76, - 72, 18, 247, 252, 255, 231, 74, 7, 104, 19, 34, 4, 104, 155, 96, 154, 75, 5, 104, 28, 176, 7, 28, 32, 188, 240, 188, - 2, 71, 8, 70, 192, 19, 112, 106, 24, 19, 112, 96, 60, 19, 112, 105, 224, 19, 112, 106, 52, 19, 112, 106, 28, 19, 112, - 103, 201, 19, 112, 1, 15, 19, 112, 1, 12, 19, 112, 106, 48, 0, 0, 57, 5, 0, 0, 16, 5, 19, 112, 17, 29, 19, 112, 104, - 92, 19, 112, 96, 56, 0, 152, 150, 128, 19, 112, 105, 216, 19, 112, 104, 141, 19, 112, 96, 64, 19, 114, 196, 96, 0, 15, - 66, 64, 19, 112, 104, 114, 255, 255, 251, 162, 19, 112, 104, 138, 19, 112, 105, 236, 181, 0, 30, 3, 208, 1, 34, 0, 96, - 26, 74, 12, 32, 0, 120, 18, 42, 1, 209, 16, 74, 10, 120, 18, 42, 16, 208, 12, 43, 0, 208, 4, 50, 4, 73, 8, 0, 146, 88, - 82, 96, 26, 75, 5, 120, 26, 75, 5, 50, 20, 0, 146, 88, 208, 188, 2, 71, 8, 70, 192, 19, 112, 106, 28, 19, 112, 96, 64, - 19, 114, 196, 96, 181, 240, 176, 139, 75, 78, 104, 27, 43, 0, 209, 0, 224, 139, 75, 77, 34, 16, 112, 26, 75, 76, 120, - 26, 75, 76, 42, 0, 208, 1, 74, 76, 224, 0, 74, 76, 78, 76, 96, 26, 172, 4, 35, 0, 28, 53, 130, 99, 130, 163, 53, 144, - 28, 33, 104, 40, 247, 254, 249, 73, 75, 71, 121, 34, 121, 153, 66, 145, 209, 23, 121, 217, 121, 98, 66, 145, 209, 19, - 137, 25, 137, 34, 66, 145, 209, 15, 137, 89, 137, 98, 66, 145, 209, 11, 123, 25, 123, 162, 66, 145, 209, 7, 123, 89, - 123, 226, 66, 145, 209, 3, 123, 154, 124, 35, 66, 154, 208, 6, 168, 4, 247, 253, 252, 193, 72, 56, 247, 253, 253, 235, - 224, 80, 28, 32, 247, 253, 252, 186, 74, 54, 75, 47, 104, 40, 96, 26, 120, 49, 247, 254, 248, 215, 40, 0, 219, 70, 104, - 178, 42, 0, 208, 7, 6, 18, 104, 40, 121, 241, 14, 18, 247, 254, 248, 190, 40, 0, 219, 61, 76, 41, 35, 0, 115, 163, 77, - 36, 75, 42, 39, 1, 96, 43, 28, 35, 51, 144, 104, 24, 136, 227, 33, 161, 147, 0, 28, 35, 51, 14, 147, 2, 34, 254, 35, - 0, 151, 1, 247, 254, 248, 56, 75, 28, 96, 43, 40, 0, 218, 6, 115, 167, 28, 32, 33, 0, 247, 254, 254, 75, 72, 30, 224, - 34, 123, 163, 78, 25, 51, 1, 115, 163, 75, 28, 28, 32, 96, 43, 121, 49, 247, 255, 248, 73, 75, 18, 96, 43, 40, 0, 219, - 17, 121, 49, 28, 32, 247, 255, 250, 215, 40, 0, 219, 13, 121, 50, 75, 9, 112, 26, 75, 19, 112, 31, 224, 8, 72, 19, 224, - 6, 72, 19, 224, 4, 72, 19, 224, 2, 72, 19, 224, 0, 72, 19, 176, 11, 188, 240, 188, 2, 71, 8, 19, 112, 106, 24, 19, 112, - 96, 64, 19, 112, 1, 15, 19, 112, 96, 56, 0, 15, 66, 64, 0, 3, 13, 64, 19, 114, 196, 96, 19, 112, 106, 4, 19, 112, 100, - 113, 0, 152, 150, 128, 255, 255, 252, 20, 1, 49, 45, 0, 19, 112, 106, 28, 255, 255, 252, 15, 255, 255, 252, 23, 255, - 255, 252, 22, 255, 255, 252, 19, 255, 255, 252, 18, 181, 240, 176, 131, 75, 57, 76, 58, 120, 26, 38, 1, 30, 83, 65, - 154, 75, 56, 96, 34, 104, 27, 43, 0, 208, 99, 75, 55, 0, 146, 104, 27, 104, 155, 28, 25, 49, 68, 24, 138, 104, 18, 66, - 22, 208, 89, 34, 0, 32, 0, 96, 154, 247, 252, 254, 166, 104, 32, 247, 254, 250, 177, 30, 7, 218, 3, 104, 32, 247, 254, - 250, 172, 28, 7, 32, 60, 247, 253, 248, 58, 77, 41, 72, 42, 104, 43, 28, 57, 104, 154, 75, 37, 50, 68, 104, 27, 38, - 1, 0, 155, 24, 211, 104, 27, 28, 26, 147, 1, 247, 253, 253, 48, 76, 32, 35, 1, 96, 35, 47, 0, 219, 48, 155, 1, 74, 32, - 64, 26, 75, 32, 66, 154, 209, 42, 74, 32, 35, 0, 112, 19, 34, 0, 96, 34, 247, 255, 254, 242, 74, 29, 75, 30, 96, 26, - 40, 0, 219, 12, 74, 26, 35, 0, 112, 22, 96, 35, 72, 27, 247, 252, 254, 108, 104, 43, 34, 4, 104, 155, 38, 0, 96, 154, - 224, 17, 28, 57, 72, 23, 96, 38, 247, 253, 253, 7, 75, 17, 34, 0, 112, 26, 32, 100, 247, 252, 255, 251, 72, 17, 247, - 252, 254, 88, 104, 43, 34, 4, 104, 155, 96, 154, 32, 100, 247, 252, 255, 241, 176, 3, 28, 48, 188, 240, 188, 2, 71, - 8, 19, 112, 1, 12, 19, 112, 106, 48, 19, 112, 106, 52, 19, 112, 96, 60, 19, 112, 104, 159, 0, 0, 49, 5, 0, 0, 16, 5, - 19, 112, 106, 28, 0, 15, 66, 64, 19, 112, 96, 56, 19, 112, 17, 29, 19, 112, 104, 187, 181, 240, 176, 131, 75, 30, 34, - 0, 104, 27, 146, 1, 43, 0, 208, 50, 247, 255, 255, 104, 75, 27, 104, 27, 43, 0, 209, 44, 75, 26, 120, 27, 43, 0, 208, - 40, 77, 25, 79, 26, 76, 26, 78, 27, 96, 47, 121, 49, 28, 32, 247, 255, 249, 245, 40, 0, 219, 29, 96, 47, 121, 49, 28, - 32, 28, 11, 29, 10, 51, 20, 0, 146, 0, 155, 25, 18, 25, 27, 247, 255, 250, 49, 40, 0, 219, 15, 75, 17, 104, 26, 42, - 0, 208, 7, 121, 49, 35, 128, 49, 4, 0, 137, 89, 9, 1, 27, 66, 153, 209, 3, 28, 19, 30, 90, 65, 147, 147, 1, 152, 1, - 176, 3, 188, 240, 188, 2, 71, 8, 19, 112, 106, 24, 19, 112, 106, 52, 19, 112, 106, 28, 19, 112, 96, 56, 0, 15, 66, 64, - 19, 114, 196, 96, 19, 112, 106, 4, 19, 112, 105, 236, 181, 240, 176, 135, 75, 66, 144, 3, 104, 27, 146, 4, 43, 0, 209, - 7, 75, 64, 104, 27, 43, 0, 208, 3, 0, 66, 75, 63, 8, 82, 96, 26, 75, 62, 104, 27, 43, 0, 208, 6, 75, 61, 104, 26, 42, - 1, 221, 2, 34, 1, 96, 26, 224, 101, 4, 9, 12, 9, 79, 56, 38, 4, 36, 0, 145, 5, 247, 255, 254, 255, 30, 67, 65, 152, - 104, 59, 66, 64, 64, 4, 43, 0, 208, 3, 74, 50, 104, 19, 43, 3, 208, 79, 44, 0, 219, 3, 75, 48, 120, 27, 43, 1, 208, - 4, 75, 45, 34, 1, 36, 1, 96, 26, 66, 100, 75, 43, 104, 27, 43, 0, 209, 61, 75, 38, 104, 26, 75, 42, 42, 0, 208, 1, 74, - 41, 224, 0, 74, 41, 96, 26, 28, 99, 208, 24, 32, 0, 247, 252, 253, 153, 77, 39, 34, 0, 104, 43, 72, 38, 104, 155, 96, - 154, 154, 4, 75, 37, 120, 25, 155, 5, 146, 0, 154, 3, 247, 255, 250, 239, 28, 4, 72, 34, 247, 252, 253, 135, 104, 43, - 34, 4, 104, 155, 96, 154, 74, 32, 75, 24, 96, 26, 44, 0, 218, 2, 75, 20, 34, 1, 96, 26, 75, 18, 104, 27, 43, 0, 208, - 3, 75, 17, 104, 27, 43, 0, 209, 15, 75, 15, 104, 27, 43, 0, 209, 5, 75, 14, 120, 27, 43, 1, 209, 1, 44, 0, 218, 7, 62, - 1, 46, 0, 209, 162, 67, 228, 15, 224, 224, 2, 32, 0, 224, 0, 32, 1, 176, 7, 188, 240, 188, 2, 71, 8, 19, 112, 105, 208, - 19, 112, 105, 236, 19, 112, 105, 160, 19, 112, 105, 164, 19, 112, 106, 52, 19, 112, 106, 28, 19, 112, 96, 56, 0, 152, - 150, 128, 0, 45, 198, 192, 19, 112, 96, 60, 19, 114, 196, 96, 19, 112, 96, 64, 19, 112, 17, 29, 0, 15, 66, 64, 181, - 240, 176, 133, 75, 39, 28, 7, 104, 27, 28, 22, 32, 0, 43, 0, 209, 67, 4, 9, 12, 9, 36, 0, 145, 3, 247, 255, 254, 111, - 40, 0, 208, 2, 44, 0, 219, 5, 224, 0, 36, 0, 74, 31, 120, 19, 43, 1, 208, 4, 75, 30, 34, 1, 36, 1, 96, 26, 66, 100, - 75, 27, 104, 27, 43, 0, 209, 234, 73, 26, 74, 27, 96, 17, 28, 98, 208, 22, 77, 26, 32, 0, 104, 42, 104, 146, 96, 147, - 247, 252, 253, 18, 75, 23, 28, 58, 120, 25, 72, 23, 155, 3, 150, 0, 247, 255, 250, 172, 28, 4, 72, 21, 247, 252, 253, - 6, 104, 43, 34, 4, 104, 155, 96, 154, 74, 18, 75, 13, 96, 26, 44, 0, 218, 2, 75, 9, 34, 1, 96, 26, 75, 7, 104, 27, 43, - 0, 209, 194, 44, 0, 219, 192, 32, 1, 176, 5, 188, 240, 188, 2, 71, 8, 70, 192, 19, 112, 105, 236, 19, 112, 106, 28, - 19, 112, 106, 52, 0, 45, 198, 192, 19, 112, 96, 56, 19, 112, 96, 60, 19, 112, 96, 64, 19, 114, 196, 96, 19, 112, 17, - 29, 0, 15, 66, 64, 181, 240, 176, 137, 74, 95, 104, 19, 43, 0, 209, 6, 75, 94, 104, 27, 105, 153, 96, 17, 106, 26, 75, - 93, 96, 26, 75, 92, 77, 90, 104, 28, 38, 0, 28, 55, 104, 43, 55, 8, 0, 191, 80, 252, 28, 32, 33, 0, 34, 96, 240, 1, - 249, 249, 104, 43, 33, 96, 88, 248, 240, 0, 249, 214, 52, 127, 33, 31, 54, 1, 67, 140, 46, 8, 209, 234, 37, 8, 38, 31, - 28, 32, 33, 0, 34, 96, 240, 1, 249, 231, 61, 1, 28, 32, 33, 96, 52, 127, 240, 0, 249, 195, 67, 180, 45, 0, 209, 241, - 75, 72, 34, 255, 96, 28, 75, 68, 39, 128, 104, 29, 35, 255, 2, 18, 4, 27, 76, 69, 38, 0, 5, 255, 146, 2, 147, 3, 33, - 0, 96, 37, 34, 96, 28, 40, 240, 1, 249, 202, 28, 40, 240, 0, 249, 152, 28, 50, 100, 104, 104, 35, 30, 81, 65, 138, 5, - 210, 96, 90, 104, 35, 34, 0, 96, 154, 104, 35, 33, 31, 97, 159, 53, 127, 67, 141, 104, 34, 28, 40, 146, 5, 240, 0, 249, - 132, 144, 6, 28, 40, 240, 0, 249, 128, 144, 1, 28, 40, 240, 0, 249, 124, 144, 7, 28, 40, 240, 0, 249, 120, 35, 255, - 2, 27, 153, 2, 147, 4, 34, 255, 155, 1, 4, 18, 64, 11, 146, 1, 153, 3, 154, 7, 2, 27, 64, 10, 10, 18, 67, 19, 14, 0, - 154, 6, 67, 3, 32, 224, 64, 16, 33, 2, 67, 8, 154, 5, 6, 0, 67, 3, 96, 19, 104, 34, 35, 128, 4, 91, 97, 19, 104, 34, - 33, 96, 97, 83, 204, 1, 54, 1, 240, 0, 249, 100, 46, 6, 209, 175, 76, 22, 77, 26, 104, 32, 105, 110, 240, 0, 249, 75, - 144, 2, 104, 32, 240, 0, 249, 71, 28, 7, 104, 32, 240, 0, 249, 67, 144, 3, 104, 32, 240, 0, 249, 63, 155, 4, 153, 1, - 64, 31, 155, 3, 2, 63, 64, 11, 10, 27, 67, 31, 154, 2, 14, 3, 28, 56, 67, 24, 35, 224, 64, 19, 33, 2, 67, 11, 6, 27, - 67, 24, 96, 48, 105, 104, 33, 96, 240, 0, 249, 57, 176, 9, 188, 240, 188, 1, 71, 0, 70, 192, 19, 112, 106, 44, 19, 112, - 96, 60, 19, 112, 105, 204, 19, 112, 105, 232, 19, 114, 194, 128, 181, 248, 75, 16, 39, 128, 104, 28, 38, 0, 4, 127, - 28, 32, 247, 252, 254, 77, 46, 3, 208, 15, 28, 37, 35, 31, 53, 127, 67, 157, 107, 104, 240, 1, 248, 186, 96, 103, 96, - 32, 33, 96, 28, 32, 240, 0, 249, 18, 54, 1, 28, 44, 231, 234, 28, 32, 33, 96, 240, 0, 249, 11, 188, 248, 188, 1, 71, - 0, 19, 112, 105, 232, 181, 240, 176, 131, 247, 255, 255, 12, 247, 255, 255, 214, 76, 65, 75, 66, 104, 34, 104, 24, 77, - 65, 97, 144, 104, 89, 78, 65, 97, 209, 104, 154, 79, 64, 96, 42, 104, 218, 105, 27, 96, 50, 96, 59, 33, 96, 240, 0, - 249, 1, 104, 35, 33, 0, 105, 154, 100, 211, 105, 154, 100, 145, 105, 155, 28, 24, 147, 1, 240, 0, 248, 209, 155, 1, - 104, 34, 100, 88, 104, 59, 105, 145, 108, 91, 34, 255, 2, 18, 64, 26, 2, 16, 34, 255, 4, 18, 64, 26, 10, 18, 67, 2, - 14, 24, 67, 2, 32, 224, 64, 3, 39, 2, 67, 59, 6, 24, 28, 19, 67, 3, 96, 11, 104, 35, 34, 128, 105, 153, 4, 18, 96, 74, - 105, 154, 33, 0, 96, 145, 105, 153, 34, 128, 5, 210, 97, 138, 105, 153, 34, 128, 4, 82, 97, 10, 105, 153, 97, 74, 105, - 152, 33, 96, 240, 0, 248, 179, 104, 35, 33, 96, 105, 216, 240, 0, 248, 194, 104, 35, 33, 0, 105, 218, 100, 211, 105, - 218, 100, 145, 105, 223, 28, 56, 240, 0, 248, 147, 33, 96, 100, 120, 104, 40, 240, 0, 248, 179, 104, 47, 104, 35, 28, - 56, 100, 251, 35, 0, 100, 187, 240, 0, 248, 134, 33, 96, 100, 120, 104, 40, 240, 0, 248, 146, 104, 48, 33, 96, 240, - 0, 248, 162, 104, 53, 104, 35, 33, 0, 100, 235, 100, 169, 28, 40, 240, 0, 248, 117, 33, 96, 100, 104, 104, 48, 240, - 0, 248, 129, 176, 3, 188, 240, 188, 1, 71, 0, 70, 192, 19, 112, 96, 60, 19, 114, 194, 128, 19, 112, 105, 212, 19, 112, - 106, 40, 19, 112, 106, 36, 181, 248, 76, 35, 75, 35, 96, 35, 240, 0, 248, 74, 40, 0, 219, 58, 240, 0, 249, 117, 74, - 32, 104, 131, 96, 32, 96, 26, 104, 32, 35, 1, 104, 130, 104, 17, 66, 11, 209, 252, 33, 252, 240, 0, 248, 91, 38, 128, - 39, 128, 76, 23, 37, 0, 4, 118, 1, 127, 104, 35, 33, 4, 108, 219, 81, 94, 104, 35, 108, 219, 89, 88, 53, 4, 240, 0, - 248, 75, 66, 189, 209, 243, 247, 255, 255, 65, 104, 35, 34, 2, 51, 84, 112, 26, 247, 253, 248, 21, 104, 35, 32, 0, 104, - 154, 105, 155, 108, 91, 97, 147, 104, 35, 34, 4, 104, 155, 96, 154, 104, 35, 74, 8, 104, 155, 96, 26, 104, 35, 104, - 155, 104, 27, 224, 1, 32, 1, 66, 64, 188, 248, 188, 2, 71, 8, 19, 112, 96, 60, 19, 114, 197, 4, 0, 1, 0, 32, 0, 1, 0, - 33, 181, 8, 33, 224, 72, 4, 2, 9, 240, 1, 249, 70, 75, 3, 96, 24, 23, 192, 188, 8, 188, 2, 71, 8, 19, 112, 162, 96, - 19, 112, 96, 68, 71, 112, 71, 112, 181, 16, 28, 4, 240, 1, 249, 66, 28, 32, 188, 16, 188, 2, 71, 8, 181, 16, 28, 4, - 240, 1, 249, 58, 28, 32, 188, 16, 188, 2, 71, 8, 181, 16, 28, 4, 240, 1, 249, 50, 28, 32, 188, 16, 188, 2, 71, 8, 181, - 8, 240, 1, 249, 75, 188, 8, 188, 1, 71, 0, 181, 8, 240, 1, 249, 69, 188, 8, 188, 1, 71, 0, 181, 8, 240, 1, 249, 63, - 188, 8, 188, 1, 71, 0, 181, 8, 75, 12, 28, 1, 34, 32, 104, 24, 240, 1, 249, 49, 40, 0, 209, 13, 72, 9, 240, 1, 249, - 8, 240, 0, 249, 63, 32, 200, 247, 252, 252, 89, 240, 0, 249, 68, 32, 200, 247, 252, 252, 84, 231, 244, 188, 8, 188, - 2, 71, 8, 19, 112, 96, 68, 19, 112, 104, 211, 181, 8, 75, 4, 28, 1, 104, 24, 240, 1, 248, 220, 188, 8, 188, 1, 71, 0, - 70, 192, 19, 112, 96, 68, 181, 248, 76, 13, 28, 15, 104, 33, 28, 30, 28, 24, 28, 21, 67, 81, 240, 1, 248, 232, 28, 56, - 28, 41, 28, 50, 247, 255, 252, 173, 35, 1, 40, 0, 208, 5, 104, 33, 28, 48, 67, 105, 240, 1, 248, 251, 35, 0, 28, 24, - 188, 248, 188, 2, 71, 8, 19, 114, 198, 0, 181, 16, 76, 11, 104, 32, 40, 0, 208, 3, 240, 0, 252, 39, 35, 0, 96, 35, 76, - 8, 104, 35, 43, 0, 209, 3, 72, 7, 247, 251, 252, 224, 96, 32, 74, 6, 35, 1, 66, 91, 96, 19, 188, 16, 188, 1, 71, 0, - 19, 112, 106, 64, 19, 112, 106, 56, 0, 0, 128, 32, 19, 112, 96, 24, 181, 56, 75, 14, 104, 24, 40, 0, 208, 1, 247, 251, - 252, 231, 76, 12, 75, 10, 104, 32, 37, 0, 96, 29, 40, 0, 208, 2, 240, 0, 251, 254, 96, 37, 75, 8, 104, 24, 40, 0, 208, - 1, 240, 0, 251, 91, 75, 5, 34, 0, 96, 26, 188, 56, 188, 1, 71, 0, 70, 192, 19, 112, 106, 56, 19, 112, 106, 64, 19, 112, - 106, 60, 181, 240, 176, 135, 75, 37, 28, 7, 104, 24, 145, 5, 40, 0, 208, 1, 247, 251, 252, 192, 75, 33, 77, 34, 34, - 0, 96, 26, 104, 43, 43, 0, 209, 23, 247, 255, 249, 95, 78, 31, 36, 0, 28, 48, 247, 255, 250, 124, 75, 29, 96, 24, 40, - 0, 208, 43, 154, 5, 104, 51, 33, 0, 144, 0, 146, 1, 72, 26, 34, 0, 148, 2, 240, 0, 249, 238, 96, 40, 40, 0, 208, 30, - 77, 23, 104, 44, 44, 0, 208, 11, 72, 22, 28, 57, 34, 6, 240, 0, 254, 214, 40, 0, 208, 19, 28, 32, 240, 0, 251, 179, - 35, 0, 96, 43, 75, 11, 28, 57, 104, 24, 240, 0, 251, 54, 75, 12, 28, 4, 96, 24, 40, 0, 208, 4, 72, 11, 28, 57, 34, 6, - 240, 0, 254, 238, 176, 7, 28, 32, 188, 240, 188, 2, 71, 8, 70, 192, 19, 112, 106, 56, 19, 112, 106, 60, 19, 114, 198, - 0, 19, 114, 198, 4, 19, 112, 71, 233, 19, 112, 106, 64, 19, 112, 96, 72, 181, 8, 28, 3, 28, 10, 32, 0, 28, 25, 35, 0, - 240, 1, 248, 60, 188, 8, 188, 1, 71, 0, 181, 8, 32, 1, 33, 0, 34, 0, 35, 0, 240, 1, 248, 50, 188, 8, 188, 2, 71, 8, - 181, 8, 32, 17, 33, 0, 34, 0, 35, 0, 240, 1, 248, 40, 188, 8, 188, 2, 71, 8, 181, 8, 32, 18, 33, 0, 34, 0, 35, 0, 240, - 1, 248, 30, 188, 8, 188, 2, 71, 8, 181, 56, 28, 5, 28, 12, 30, 19, 221, 4, 32, 2, 28, 41, 28, 34, 240, 1, 248, 17, 188, - 56, 188, 1, 71, 0, 181, 56, 28, 5, 28, 12, 30, 19, 221, 4, 32, 9, 28, 41, 28, 34, 240, 1, 248, 4, 188, 56, 188, 1, 71, - 0, 181, 8, 28, 3, 28, 10, 32, 5, 28, 25, 35, 0, 240, 0, 255, 249, 188, 8, 188, 1, 71, 0, 181, 8, 28, 3, 28, 10, 32, - 6, 28, 25, 35, 0, 240, 0, 255, 238, 188, 8, 188, 1, 71, 0, 181, 56, 28, 5, 28, 12, 28, 19, 28, 41, 28, 34, 32, 16, 240, - 0, 255, 226, 188, 56, 188, 2, 71, 8, 181, 8, 32, 128, 33, 0, 34, 0, 35, 0, 240, 0, 255, 216, 188, 8, 188, 1, 71, 0, - 181, 8, 32, 129, 33, 0, 34, 0, 35, 0, 240, 0, 255, 206, 188, 8, 188, 1, 71, 0, 181, 0, 35, 0, 224, 3, 51, 1, 6, 27, - 14, 27, 8, 64, 40, 0, 209, 249, 30, 88, 6, 0, 14, 0, 188, 2, 71, 8, 0, 0, 181, 240, 176, 133, 144, 1, 32, 84, 145, 3, - 146, 2, 28, 30, 159, 11, 247, 251, 251, 190, 28, 4, 30, 48, 209, 1, 32, 128, 0, 128, 247, 251, 251, 183, 28, 5, 32, - 128, 2, 0, 97, 32, 247, 255, 255, 218, 75, 125, 117, 32, 97, 227, 154, 10, 75, 124, 96, 37, 96, 30, 11, 211, 67, 115, - 97, 163, 155, 12, 98, 231, 43, 0, 208, 50, 33, 0, 28, 50, 28, 40, 240, 0, 254, 106, 35, 87, 112, 43, 35, 66, 112, 107, - 35, 70, 112, 171, 35, 83, 112, 235, 28, 48, 247, 255, 255, 188, 114, 40, 159, 10, 73, 111, 14, 59, 113, 43, 12, 59, - 113, 107, 10, 59, 113, 171, 113, 239, 105, 162, 35, 6, 66, 138, 217, 16, 73, 106, 35, 7, 66, 138, 217, 12, 73, 105, - 35, 8, 66, 138, 217, 8, 73, 104, 35, 9, 66, 138, 217, 4, 75, 103, 66, 147, 65, 155, 66, 91, 51, 10, 125, 34, 24, 155, - 114, 107, 224, 6, 28, 57, 152, 2, 34, 1, 28, 43, 159, 1, 240, 0, 248, 207, 120, 43, 120, 106, 6, 27, 4, 18, 67, 26, - 120, 171, 2, 27, 67, 26, 120, 235, 67, 26, 75, 91, 66, 154, 208, 4, 72, 90, 240, 0, 255, 53, 72, 90, 224, 40, 75, 90, - 104, 27, 66, 95, 65, 95, 46, 0, 208, 12, 47, 0, 208, 10, 28, 48, 247, 255, 255, 117, 122, 43, 66, 131, 208, 4, 72, 81, - 240, 0, 255, 34, 72, 82, 224, 21, 154, 10, 42, 0, 208, 31, 47, 0, 208, 29, 121, 42, 121, 107, 6, 18, 4, 27, 67, 19, - 121, 170, 159, 10, 2, 18, 67, 19, 121, 234, 67, 19, 66, 187, 208, 16, 72, 69, 240, 0, 255, 11, 72, 72, 240, 0, 255, - 8, 72, 71, 240, 0, 255, 5, 28, 32, 247, 251, 251, 68, 28, 40, 247, 251, 251, 65, 36, 0, 224, 100, 122, 46, 39, 1, 28, - 58, 64, 178, 96, 98, 122, 43, 28, 22, 147, 0, 114, 35, 121, 42, 121, 107, 6, 18, 4, 27, 67, 19, 121, 170, 121, 232, - 2, 18, 67, 19, 67, 24, 105, 33, 96, 224, 240, 0, 254, 172, 67, 112, 97, 160, 122, 107, 125, 34, 64, 159, 98, 99, 26, - 155, 105, 226, 64, 216, 64, 218, 4, 18, 12, 18, 4, 51, 12, 27, 133, 98, 50, 128, 4, 1, 133, 32, 0, 82, 30, 88, 24, 130, - 66, 91, 64, 26, 155, 3, 28, 37, 53, 72, 99, 99, 12, 201, 155, 0, 98, 39, 128, 42, 26, 127, 154, 1, 64, 223, 99, 34, - 100, 39, 154, 2, 159, 12, 99, 162, 47, 0, 209, 1, 100, 103, 224, 11, 30, 112, 24, 65, 66, 112, 64, 8, 247, 251, 250, - 217, 141, 34, 100, 96, 8, 210, 33, 255, 240, 0, 253, 159, 28, 35, 51, 72, 136, 25, 108, 32, 122, 35, 56, 1, 65, 25, - 240, 0, 254, 108, 4, 2, 104, 96, 12, 18, 28, 3, 59, 12, 135, 162, 66, 154, 217, 0, 135, 163, 247, 251, 250, 191, 35, - 0, 100, 224, 101, 35, 176, 5, 28, 32, 188, 240, 188, 2, 71, 8, 70, 192, 0, 4, 96, 144, 19, 112, 106, 76, 0, 63, 255, - 255, 0, 127, 255, 255, 0, 255, 255, 255, 1, 255, 255, 255, 3, 255, 255, 255, 87, 66, 70, 83, 19, 112, 104, 242, 19, - 112, 104, 254, 19, 112, 106, 72, 19, 112, 105, 8, 19, 112, 105, 37, 19, 112, 104, 90, 71, 56, 70, 192, 181, 240, 176, - 165, 144, 9, 28, 24, 146, 10, 147, 11, 145, 15, 247, 251, 250, 143, 35, 1, 74, 140, 77, 141, 66, 91, 96, 19, 104, 43, - 28, 4, 43, 0, 209, 3, 152, 11, 247, 251, 250, 131, 96, 40, 75, 136, 152, 11, 33, 0, 96, 24, 34, 1, 152, 10, 28, 35, - 157, 9, 240, 0, 249, 24, 40, 0, 208, 0, 224, 246, 35, 255, 0, 91, 92, 227, 43, 85, 209, 28, 51, 171, 51, 255, 92, 227, - 43, 170, 209, 23, 28, 224, 73, 125, 34, 4, 240, 0, 253, 142, 40, 0, 208, 16, 77, 123, 28, 32, 48, 54, 28, 41, 34, 3, - 240, 0, 253, 133, 40, 0, 208, 7, 28, 32, 48, 82, 28, 41, 34, 3, 240, 0, 253, 125, 40, 0, 209, 5, 168, 20, 33, 0, 34, - 64, 240, 0, 253, 26, 224, 6, 28, 33, 49, 191, 49, 255, 168, 20, 34, 64, 240, 0, 252, 208, 175, 32, 151, 5, 32, 228, - 39, 1, 66, 127, 0, 64, 38, 0, 173, 20, 144, 14, 151, 8, 122, 235, 122, 47, 122, 105, 122, 170, 147, 7, 120, 32, 120, - 99, 6, 0, 4, 27, 67, 24, 120, 163, 2, 27, 67, 24, 120, 227, 67, 24, 75, 97, 66, 152, 208, 3, 121, 40, 40, 0, 209, 0, - 224, 162, 2, 9, 4, 18, 67, 17, 67, 57, 159, 7, 6, 59, 67, 25, 145, 7, 121, 43, 43, 15, 209, 101, 33, 227, 32, 0, 0, - 73, 159, 8, 144, 12, 35, 0, 145, 13, 149, 4, 154, 7, 152, 10, 24, 210, 146, 8, 28, 17, 28, 35, 34, 1, 157, 9, 240, 0, - 248, 169, 40, 0, 208, 0, 224, 135, 72, 78, 153, 14, 92, 34, 92, 99, 2, 18, 4, 27, 67, 26, 77, 76, 155, 13, 152, 8, 92, - 225, 93, 99, 67, 10, 6, 27, 67, 19, 24, 192, 35, 235, 144, 8, 0, 91, 92, 227, 152, 10, 147, 16, 75, 69, 153, 8, 92, - 227, 34, 1, 147, 17, 35, 236, 0, 91, 92, 227, 157, 9, 147, 18, 75, 65, 92, 227, 147, 19, 28, 35, 240, 0, 248, 128, 40, - 0, 209, 95, 120, 34, 120, 99, 6, 18, 4, 27, 67, 19, 120, 162, 73, 54, 2, 18, 67, 19, 120, 226, 67, 19, 66, 139, 209, - 10, 154, 43, 66, 150, 209, 2, 144, 0, 155, 8, 224, 48, 152, 8, 66, 184, 208, 1, 54, 1, 28, 7, 153, 17, 157, 18, 2, 11, - 4, 42, 152, 16, 153, 19, 67, 19, 67, 3, 6, 10, 67, 19, 208, 53, 154, 12, 50, 1, 146, 12, 42, 8, 209, 162, 224, 47, 152, - 10, 153, 7, 34, 1, 28, 35, 159, 9, 240, 0, 248, 79, 40, 0, 209, 45, 120, 34, 120, 99, 6, 18, 4, 27, 67, 19, 120, 162, - 73, 29, 2, 18, 67, 19, 120, 226, 67, 19, 66, 139, 209, 27, 154, 43, 66, 150, 209, 15, 155, 7, 144, 0, 157, 44, 147, - 1, 152, 9, 153, 15, 154, 10, 155, 11, 149, 2, 247, 255, 253, 201, 28, 5, 28, 32, 247, 251, 249, 171, 224, 17, 159, 7, - 152, 8, 66, 135, 208, 4, 54, 1, 151, 8, 224, 1, 157, 4, 151, 8, 153, 5, 66, 141, 208, 1, 53, 16, 231, 65, 28, 32, 247, - 251, 249, 153, 37, 0, 176, 37, 28, 40, 188, 240, 188, 2, 71, 8, 70, 192, 19, 112, 96, 80, 19, 112, 106, 68, 19, 112, - 106, 76, 19, 112, 105, 65, 19, 112, 105, 70, 87, 66, 70, 83, 0, 0, 1, 199, 0, 0, 1, 201, 0, 0, 1, 215, 0, 0, 1, 217, - 71, 40, 71, 56, 181, 16, 109, 3, 28, 4, 43, 0, 208, 9, 72, 13, 240, 0, 253, 50, 72, 12, 240, 0, 253, 47, 72, 12, 240, - 0, 253, 44, 224, 13, 104, 0, 247, 251, 249, 106, 108, 224, 247, 251, 249, 103, 108, 96, 40, 0, 208, 1, 247, 251, 249, - 98, 28, 32, 247, 251, 249, 95, 188, 16, 188, 1, 71, 0, 19, 112, 104, 242, 19, 112, 105, 74, 19, 112, 104, 90, 181, 240, - 28, 3, 51, 72, 176, 131, 136, 26, 122, 3, 28, 5, 65, 26, 146, 1, 35, 1, 74, 48, 66, 91, 96, 19, 34, 0, 28, 14, 146, - 0, 39, 0, 224, 79, 104, 43, 25, 219, 123, 27, 43, 0, 208, 68, 106, 233, 155, 0, 49, 1, 24, 201, 34, 1, 107, 168, 108, - 235, 107, 44, 240, 0, 248, 83, 108, 233, 28, 48, 34, 6, 240, 0, 251, 110, 40, 0, 209, 51, 32, 12, 247, 251, 249, 13, - 30, 6, 209, 9, 72, 32, 240, 0, 252, 228, 72, 31, 240, 0, 252, 225, 72, 31, 240, 0, 252, 222, 224, 46, 28, 43, 51, 72, - 96, 53, 96, 183, 136, 24, 247, 251, 248, 250, 28, 3, 96, 112, 40, 0, 209, 12, 72, 21, 240, 0, 252, 207, 72, 21, 240, - 0, 252, 204, 72, 20, 240, 0, 252, 201, 28, 48, 247, 251, 249, 8, 224, 21, 106, 233, 154, 0, 49, 1, 24, 137, 107, 168, - 107, 44, 154, 1, 240, 0, 248, 28, 109, 43, 51, 1, 101, 43, 224, 9, 155, 0, 55, 1, 28, 26, 155, 1, 24, 210, 146, 0, 143, - 171, 66, 159, 211, 172, 38, 0, 176, 3, 28, 48, 188, 240, 188, 2, 71, 8, 70, 192, 19, 112, 96, 80, 19, 112, 104, 242, - 19, 112, 105, 118, 19, 112, 104, 90, 71, 32, 70, 192, 181, 16, 104, 3, 28, 4, 109, 26, 58, 1, 101, 26, 104, 64, 247, - 251, 248, 215, 28, 32, 247, 251, 248, 212, 188, 16, 188, 1, 71, 0, 0, 0, 181, 240, 176, 137, 104, 5, 147, 0, 106, 107, - 146, 1, 28, 6, 30, 154, 28, 8, 64, 208, 4, 2, 12, 18, 104, 104, 146, 4, 70, 132, 152, 4, 104, 116, 48, 128, 0, 64, 90, - 32, 122, 47, 106, 42, 144, 2, 36, 1, 40, 0, 209, 0, 224, 194, 58, 1, 64, 250, 27, 219, 146, 6, 63, 2, 28, 10, 64, 250, - 147, 5, 155, 6, 28, 23, 70, 96, 64, 31, 8, 131, 59, 1, 28, 26, 64, 10, 146, 7, 209, 0, 224, 133, 155, 2, 152, 5, 106, - 233, 64, 131, 24, 121, 147, 3, 24, 201, 75, 87, 104, 26, 108, 235, 66, 138, 209, 5, 74, 85, 28, 24, 104, 17, 74, 85, - 104, 18, 224, 18, 107, 44, 107, 168, 34, 1, 240, 0, 248, 165, 30, 4, 208, 0, 224, 149, 106, 235, 152, 3, 73, 76, 24, - 251, 24, 27, 96, 11, 75, 75, 108, 233, 104, 24, 75, 75, 104, 26, 240, 0, 250, 231, 154, 7, 104, 108, 0, 145, 155, 0, - 26, 100, 66, 156, 217, 0, 28, 28, 108, 235, 152, 1, 24, 89, 28, 34, 240, 0, 250, 217, 152, 0, 153, 1, 27, 0, 25, 9, - 144, 0, 145, 1, 55, 1, 40, 0, 208, 71, 154, 6, 66, 186, 210, 68, 155, 4, 104, 114, 51, 1, 4, 27, 12, 27, 147, 4, 51, - 128, 0, 91, 90, 211, 36, 1, 147, 2, 39, 0, 43, 0, 209, 54, 224, 95, 122, 43, 152, 0, 64, 216, 106, 43, 25, 194, 144, - 3, 66, 154, 217, 1, 27, 219, 147, 3, 154, 5, 106, 233, 155, 2, 24, 121, 64, 147, 24, 201, 107, 168, 107, 44, 154, 3, - 155, 1, 240, 0, 248, 86, 40, 0, 209, 70, 122, 43, 152, 3, 153, 0, 64, 152, 154, 3, 26, 9, 28, 3, 145, 0, 24, 191, 41, - 0, 208, 15, 152, 6, 66, 184, 210, 12, 154, 4, 104, 113, 50, 1, 4, 18, 12, 18, 146, 4, 50, 128, 0, 82, 90, 138, 146, - 2, 42, 0, 208, 42, 39, 0, 153, 1, 24, 201, 145, 1, 104, 107, 154, 0, 66, 154, 210, 197, 36, 0, 42, 0, 208, 34, 155, - 5, 158, 2, 106, 233, 64, 158, 24, 121, 107, 44, 107, 168, 25, 137, 108, 235, 34, 1, 240, 0, 248, 35, 30, 4, 209, 20, - 106, 235, 108, 233, 24, 255, 75, 11, 25, 190, 96, 30, 75, 11, 104, 24, 75, 11, 104, 26, 240, 0, 250, 103, 108, 233, - 152, 1, 154, 0, 240, 0, 250, 98, 224, 2, 36, 1, 224, 0, 28, 4, 176, 9, 28, 32, 188, 240, 188, 2, 71, 8, 70, 192, 19, - 112, 96, 80, 19, 112, 106, 68, 19, 112, 106, 76, 71, 32, 70, 192, 0, 0, 0, 0, 0, 0, 0, 0, 239, 0, 0, 204, 225, 47, 255, - 30, 225, 160, 0, 0, 225, 160, 0, 0, 230, 0, 0, 16, 225, 47, 255, 30, 230, 0, 0, 48, 225, 47, 255, 30, 230, 0, 0, 80, - 225, 47, 255, 30, 230, 0, 0, 112, 225, 47, 255, 30, 230, 0, 0, 144, 225, 47, 255, 30, 230, 0, 0, 176, 225, 47, 255, - 30, 230, 0, 0, 208, 225, 47, 255, 30, 230, 0, 0, 240, 225, 47, 255, 30, 230, 0, 1, 16, 225, 47, 255, 30, 230, 0, 1, - 48, 225, 47, 255, 30, 230, 0, 1, 80, 225, 47, 255, 30, 230, 0, 1, 112, 225, 47, 255, 30, 230, 0, 1, 144, 225, 47, 255, - 30, 230, 0, 1, 176, 225, 47, 255, 30, 230, 0, 1, 208, 225, 47, 255, 30, 230, 0, 1, 240, 225, 47, 255, 30, 230, 0, 2, - 16, 225, 47, 255, 30, 230, 0, 2, 48, 225, 47, 255, 30, 230, 0, 2, 80, 225, 47, 255, 30, 230, 0, 2, 112, 225, 47, 255, - 30, 230, 0, 2, 144, 225, 47, 255, 30, 230, 0, 2, 176, 225, 47, 255, 30, 230, 0, 2, 208, 225, 47, 255, 30, 230, 0, 2, - 240, 225, 47, 255, 30, 230, 0, 3, 16, 225, 47, 255, 30, 230, 0, 3, 48, 225, 47, 255, 30, 230, 0, 3, 80, 225, 47, 255, - 30, 230, 0, 3, 112, 225, 47, 255, 30, 230, 0, 3, 144, 225, 47, 255, 30, 230, 0, 3, 176, 225, 47, 255, 30, 230, 0, 3, - 208, 225, 47, 255, 30, 230, 0, 3, 240, 225, 47, 255, 30, 230, 0, 4, 16, 225, 47, 255, 30, 230, 0, 4, 48, 225, 47, 255, - 30, 230, 0, 4, 80, 225, 47, 255, 30, 230, 0, 4, 112, 225, 47, 255, 30, 230, 0, 4, 144, 225, 47, 255, 30, 230, 0, 4, - 176, 225, 47, 255, 30, 230, 0, 4, 208, 225, 47, 255, 30, 230, 0, 4, 240, 225, 47, 255, 30, 230, 0, 5, 16, 225, 47, 255, - 30, 230, 0, 5, 48, 225, 47, 255, 30, 230, 0, 5, 80, 225, 47, 255, 30, 230, 0, 6, 144, 225, 47, 255, 30, 230, 0, 7, 240, - 225, 47, 255, 30, 230, 0, 8, 16, 225, 47, 255, 30, 230, 0, 10, 16, 225, 47, 255, 30, 226, 144, 16, 0, 227, 176, 0, 4, - 239, 0, 0, 171, 225, 47, 255, 30, 225, 160, 0, 0, 225, 160, 0, 0, 180, 3, 70, 113, 8, 73, 0, 64, 0, 73, 90, 9, 0, 73, - 68, 142, 188, 3, 71, 112, 226, 81, 32, 1, 1, 47, 255, 30, 58, 0, 0, 54, 225, 80, 0, 1, 154, 0, 0, 34, 225, 17, 0, 2, - 10, 0, 0, 35, 227, 17, 2, 14, 1, 160, 17, 129, 3, 160, 48, 8, 19, 160, 48, 1, 227, 81, 2, 1, 49, 81, 0, 0, 49, 160, - 18, 1, 49, 160, 50, 3, 58, 255, 255, 250, 227, 81, 1, 2, 49, 81, 0, 0, 49, 160, 16, 129, 49, 160, 48, 131, 58, 255, - 255, 250, 227, 160, 32, 0, 225, 80, 0, 1, 32, 64, 0, 1, 33, 130, 32, 3, 225, 80, 0, 161, 32, 64, 0, 161, 33, 130, 32, - 163, 225, 80, 1, 33, 32, 64, 1, 33, 33, 130, 33, 35, 225, 80, 1, 161, 32, 64, 1, 161, 33, 130, 33, 163, 227, 80, 0, - 0, 17, 176, 50, 35, 17, 160, 18, 33, 26, 255, 255, 239, 225, 160, 0, 2, 225, 47, 255, 30, 3, 160, 0, 1, 19, 160, 0, - 0, 225, 47, 255, 30, 227, 81, 8, 1, 33, 160, 24, 33, 35, 160, 32, 16, 51, 160, 32, 0, 227, 81, 12, 1, 33, 160, 20, 33, - 34, 130, 32, 8, 227, 81, 0, 16, 33, 160, 18, 33, 34, 130, 32, 4, 227, 81, 0, 4, 130, 130, 32, 3, 144, 130, 32, 161, - 225, 160, 2, 48, 225, 47, 255, 30, 225, 47, 255, 31, 225, 160, 0, 0, 227, 80, 0, 0, 19, 224, 0, 0, 234, 0, 1, 11, 227, - 81, 0, 0, 10, 255, 255, 248, 233, 45, 64, 3, 235, 255, 255, 188, 232, 189, 64, 6, 224, 3, 0, 146, 224, 65, 16, 3, 225, - 47, 255, 30, 227, 81, 0, 0, 10, 0, 0, 67, 224, 32, 192, 1, 66, 97, 16, 0, 226, 81, 32, 1, 10, 0, 0, 39, 225, 176, 48, - 0, 66, 96, 48, 0, 225, 83, 0, 1, 154, 0, 0, 38, 225, 17, 0, 2, 10, 0, 0, 40, 227, 17, 2, 14, 1, 160, 17, 129, 3, 160, - 32, 8, 19, 160, 32, 1, 227, 81, 2, 1, 49, 81, 0, 3, 49, 160, 18, 1, 49, 160, 34, 2, 58, 255, 255, 250, 227, 81, 1, 2, - 49, 81, 0, 3, 49, 160, 16, 129, 49, 160, 32, 130, 58, 255, 255, 250, 227, 160, 0, 0, 225, 83, 0, 1, 32, 67, 48, 1, 33, - 128, 0, 2, 225, 83, 0, 161, 32, 67, 48, 161, 33, 128, 0, 162, 225, 83, 1, 33, 32, 67, 49, 33, 33, 128, 1, 34, 225, 83, - 1, 161, 32, 67, 49, 161, 33, 128, 1, 162, 227, 83, 0, 0, 17, 176, 34, 34, 17, 160, 18, 33, 26, 255, 255, 239, 227, 92, - 0, 0, 66, 96, 0, 0, 225, 47, 255, 30, 225, 60, 0, 0, 66, 96, 0, 0, 225, 47, 255, 30, 51, 160, 0, 0, 1, 160, 15, 204, - 3, 128, 0, 1, 225, 47, 255, 30, 227, 81, 8, 1, 33, 160, 24, 33, 35, 160, 32, 16, 51, 160, 32, 0, 227, 81, 12, 1, 33, - 160, 20, 33, 34, 130, 32, 8, 227, 81, 0, 16, 33, 160, 18, 33, 34, 130, 32, 4, 227, 81, 0, 4, 130, 130, 32, 3, 144, 130, - 32, 161, 227, 92, 0, 0, 225, 160, 2, 51, 66, 96, 0, 0, 225, 47, 255, 30, 225, 47, 255, 31, 225, 160, 0, 0, 227, 80, - 0, 0, 195, 224, 1, 2, 179, 160, 1, 2, 234, 0, 0, 183, 227, 81, 0, 0, 10, 255, 255, 247, 233, 45, 64, 3, 235, 255, 255, - 177, 232, 189, 64, 6, 224, 3, 0, 146, 224, 65, 16, 3, 225, 47, 255, 30, 71, 112, 70, 192, 33, 16, 6, 2, 14, 3, 65, 200, - 67, 19, 6, 2, 14, 0, 67, 16, 65, 200, 67, 24, 71, 112, 70, 192, 181, 112, 28, 4, 28, 13, 42, 3, 217, 33, 28, 11, 67, - 3, 7, 158, 208, 18, 120, 32, 120, 41, 66, 136, 209, 29, 58, 1, 35, 0, 224, 5, 52, 1, 51, 1, 120, 32, 92, 233, 66, 136, - 209, 20, 66, 154, 209, 247, 32, 0, 188, 112, 188, 2, 71, 8, 28, 13, 28, 4, 201, 8, 200, 64, 66, 158, 209, 4, 58, 4, - 28, 4, 28, 13, 42, 3, 216, 244, 32, 0, 42, 0, 209, 222, 231, 237, 26, 64, 231, 235, 70, 192, 181, 240, 28, 5, 28, 14, - 28, 20, 42, 15, 217, 3, 28, 11, 67, 3, 7, 159, 208, 10, 44, 0, 208, 5, 35, 0, 92, 242, 84, 234, 51, 1, 66, 163, 209, - 250, 188, 240, 188, 2, 71, 8, 28, 21, 28, 12, 28, 3, 104, 38, 96, 30, 104, 102, 96, 94, 104, 166, 96, 158, 104, 230, - 61, 16, 96, 222, 52, 16, 51, 16, 45, 15, 216, 242, 58, 16, 9, 23, 28, 126, 1, 63, 1, 54, 27, 215, 25, 133, 28, 60, 25, - 142, 47, 3, 217, 217, 28, 52, 28, 59, 28, 42, 204, 2, 59, 4, 194, 2, 43, 3, 216, 250, 63, 4, 8, 188, 28, 99, 0, 155, - 0, 164, 24, 237, 24, 246, 27, 60, 231, 200, 70, 192, 181, 112, 28, 3, 7, 132, 208, 13, 42, 0, 208, 64, 6, 13, 58, 1, - 14, 45, 36, 3, 224, 2, 42, 0, 208, 57, 58, 1, 112, 29, 51, 1, 66, 35, 209, 248, 42, 3, 217, 41, 37, 255, 64, 13, 2, - 44, 67, 37, 4, 44, 28, 30, 67, 37, 42, 15, 217, 18, 28, 28, 28, 22, 62, 16, 96, 37, 96, 101, 96, 165, 96, 229, 52, 16, - 46, 15, 216, 247, 58, 16, 9, 22, 54, 1, 1, 54, 25, 158, 35, 15, 64, 26, 42, 3, 217, 12, 28, 52, 28, 19, 59, 4, 196, - 32, 43, 3, 216, 251, 58, 4, 8, 147, 51, 1, 0, 155, 24, 246, 35, 3, 64, 26, 28, 51, 42, 0, 208, 6, 6, 9, 14, 12, 33, - 0, 84, 92, 49, 1, 66, 138, 209, 251, 188, 112, 188, 2, 71, 8, 120, 2, 120, 11, 48, 1, 49, 1, 42, 0, 208, 1, 66, 154, - 208, 247, 26, 208, 71, 112, 35, 0, 92, 194, 51, 1, 42, 0, 209, 251, 30, 88, 71, 112, 70, 192, 181, 240, 28, 3, 32, 0, - 42, 0, 208, 72, 28, 8, 67, 24, 36, 3, 30, 85, 64, 4, 209, 42, 28, 30, 28, 13, 42, 3, 217, 67, 104, 31, 104, 8, 66, 135, - 209, 63, 58, 4, 28, 32, 42, 0, 208, 54, 72, 34, 24, 61, 67, 189, 79, 33, 28, 32, 66, 61, 209, 47, 29, 28, 29, 8, 224, - 11, 204, 8, 200, 2, 66, 139, 209, 45, 58, 4, 42, 0, 208, 40, 77, 25, 25, 89, 67, 153, 66, 57, 209, 35, 28, 38, 28, 5, - 42, 3, 216, 239, 28, 35, 28, 1, 42, 0, 208, 33, 30, 85, 120, 28, 120, 8, 66, 132, 209, 18, 32, 0, 45, 0, 208, 16, 44, - 0, 208, 14, 61, 1, 34, 0, 224, 4, 66, 170, 208, 12, 50, 1, 44, 0, 208, 9, 24, 152, 120, 68, 24, 136, 120, 64, 66, 132, - 208, 244, 26, 32, 188, 240, 188, 2, 71, 8, 32, 0, 231, 250, 28, 41, 28, 51, 30, 85, 231, 222, 120, 36, 120, 0, 26, 32, - 231, 242, 70, 192, 254, 254, 254, 255, 128, 128, 128, 128, 0, 0, 0, 0, 71, 120, 70, 192, 234, 255, 254, 125, 71, 120, - 70, 192, 234, 255, 254, 137, 71, 120, 70, 192, 234, 255, 254, 123, 71, 120, 70, 192, 234, 255, 254, 253, 71, 120, 70, - 192, 234, 255, 233, 193, 71, 120, 70, 192, 234, 255, 254, 119, 71, 120, 70, 192, 234, 255, 254, 184, 71, 120, 70, 192, - 234, 255, 254, 163, 71, 120, 70, 192, 234, 255, 233, 218, 229, 159, 192, 0, 225, 47, 255, 28, 19, 112, 86, 161, 71, - 120, 70, 192, 234, 255, 254, 124, 71, 120, 70, 192, 234, 255, 254, 244, 71, 120, 70, 192, 234, 255, 255, 62, 71, 120, - 70, 192, 234, 255, 254, 84, 71, 120, 70, 192, 234, 255, 254, 80, 71, 120, 70, 192, 234, 255, 254, 112, 71, 120, 70, - 192, 234, 255, 254, 86, 71, 120, 70, 192, 234, 255, 254, 88, 71, 120, 70, 192, 234, 255, 233, 206, 71, 120, 70, 192, - 234, 255, 254, 96, 71, 120, 70, 192, 234, 255, 254, 144, 71, 120, 70, 192, 234, 255, 233, 196, 71, 120, 70, 192, 234, - 255, 254, 136, 71, 120, 70, 192, 234, 255, 254, 84, 71, 120, 70, 192, 234, 255, 233, 150, 71, 120, 70, 192, 234, 255, - 254, 124, 71, 120, 70, 192, 234, 255, 254, 34, 71, 120, 70, 192, 234, 255, 254, 66, 71, 120, 70, 192, 234, 255, 233, - 138, 71, 120, 70, 192, 234, 255, 254, 82, 71, 120, 70, 192, 234, 255, 254, 118, 71, 120, 70, 192, 234, 255, 254, 34, - 0, 0, 0, 0, 73, 79, 83, 32, 109, 111, 100, 117, 108, 101, 0, 0, 255, 255, 255, 255, 1, 0, 0, 0, 0, 0, 0, 1, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 229, 31, 240, 4, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 0, 15, 66, 64, 19, 114, 197, 4, 16, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, - 255, 255, 87, 66, 70, 83, 32, 110, 111, 116, 32, 101, 110, 111, 117, 103, 104, 32, 109, 101, 109, 111, 114, 121, 33, - 10, 0, 47, 100, 101, 118, 47, 117, 115, 98, 49, 50, 51, 0, 47, 100, 101, 118, 47, 117, 115, 98, 49, 50, 51, 47, 79, - 70, 70, 0, 102, 105, 114, 115, 116, 32, 114, 101, 97, 100, 32, 115, 101, 99, 116, 111, 114, 32, 40, 37, 105, 41, 32, - 79, 75, 10, 0, 102, 105, 114, 115, 116, 32, 114, 101, 97, 100, 32, 115, 101, 99, 116, 111, 114, 32, 40, 37, 105, 41, - 32, 69, 82, 82, 79, 82, 10, 0, 101, 104, 99, 105, 95, 105, 110, 116, 95, 119, 111, 114, 107, 105, 110, 103, 95, 99, - 97, 108, 108, 98, 97, 99, 107, 95, 112, 97, 114, 116, 49, 44, 32, 116, 105, 109, 101, 111, 117, 116, 58, 32, 37, 117, - 10, 0, 114, 101, 116, 114, 121, 10, 0, 117, 114, 98, 32, 114, 101, 116, 118, 97, 108, 58, 32, 37, 105, 10, 0, 117, 110, - 97, 98, 108, 101, 32, 116, 111, 32, 103, 101, 116, 32, 100, 101, 118, 105, 99, 101, 32, 100, 101, 115, 99, 46, 46, 46, - 10, 0, 103, 101, 116, 116, 105, 110, 103, 32, 85, 83, 66, 95, 82, 69, 81, 95, 71, 69, 84, 68, 69, 83, 67, 82, 73, 80, - 84, 79, 82, 32, 45, 32, 114, 101, 115, 101, 116, 10, 0, 101, 114, 114, 111, 114, 32, 103, 101, 116, 116, 105, 110, 103, - 32, 85, 83, 66, 95, 82, 69, 81, 95, 71, 69, 84, 68, 69, 83, 67, 82, 73, 80, 84, 79, 82, 10, 0, 103, 101, 116, 116, 105, - 110, 103, 32, 85, 83, 66, 95, 82, 69, 81, 95, 71, 69, 84, 68, 69, 83, 67, 82, 73, 80, 84, 79, 82, 32, 45, 32, 97, 100, - 113, 117, 105, 114, 101, 32, 45, 32, 114, 101, 115, 101, 116, 10, 0, 85, 83, 66, 95, 82, 69, 81, 95, 71, 69, 84, 68, - 69, 83, 67, 82, 73, 80, 84, 79, 82, 32, 111, 107, 10, 0, 116, 114, 121, 105, 110, 103, 32, 85, 83, 66, 95, 82, 69, 81, - 95, 83, 69, 84, 65, 68, 68, 82, 69, 83, 83, 58, 32, 37, 100, 10, 0, 117, 110, 97, 98, 108, 101, 32, 116, 111, 32, 115, - 101, 116, 32, 100, 101, 118, 105, 99, 101, 32, 97, 100, 100, 114, 58, 32, 37, 100, 10, 0, 85, 83, 66, 95, 82, 69, 81, - 95, 83, 69, 84, 65, 68, 68, 82, 69, 83, 83, 32, 111, 107, 58, 32, 37, 100, 10, 0, 101, 114, 114, 111, 114, 32, 99, 104, - 101, 99, 107, 105, 110, 103, 32, 85, 83, 66, 95, 82, 69, 81, 95, 71, 69, 84, 68, 69, 83, 67, 82, 73, 80, 84, 79, 82, - 10, 0, 111, 107, 32, 99, 104, 101, 99, 107, 105, 110, 103, 32, 85, 83, 66, 95, 82, 69, 81, 95, 71, 69, 84, 68, 69, 83, - 67, 82, 73, 80, 84, 79, 82, 10, 0, 105, 110, 105, 116, 32, 111, 107, 10, 0, 10, 113, 116, 100, 32, 101, 114, 114, 111, - 114, 33, 58, 0, 32, 66, 65, 66, 66, 76, 69, 0, 32, 32, 109, 105, 115, 115, 101, 100, 32, 109, 105, 99, 114, 111, 32, - 102, 114, 97, 109, 101, 0, 32, 32, 100, 97, 116, 97, 98, 117, 102, 102, 101, 114, 32, 101, 114, 114, 111, 114, 0, 32, - 119, 114, 111, 110, 103, 32, 97, 99, 107, 0, 32, 116, 111, 111, 32, 109, 97, 110, 121, 32, 101, 114, 114, 111, 114, - 115, 0, 105, 110, 116, 101, 114, 114, 117, 112, 116, 95, 99, 97, 108, 108, 98, 97, 99, 107, 95, 104, 97, 110, 100, 32, - 83, 84, 83, 95, 73, 78, 84, 10, 0, 105, 110, 116, 101, 114, 114, 117, 112, 116, 95, 99, 97, 108, 108, 98, 97, 99, 107, - 95, 104, 97, 110, 100, 32, 83, 84, 83, 95, 80, 67, 68, 10, 0, 117, 115, 98, 115, 116, 111, 114, 97, 103, 101, 32, 114, - 101, 115, 101, 116, 58, 32, 66, 85, 76, 75, 32, 82, 69, 83, 69, 84, 32, 37, 105, 10, 0, 117, 115, 98, 115, 116, 111, - 114, 97, 103, 101, 32, 114, 101, 115, 101, 116, 58, 32, 99, 108, 101, 97, 114, 104, 97, 108, 116, 32, 105, 110, 32, - 114, 101, 116, 32, 37, 105, 10, 0, 117, 115, 98, 115, 116, 111, 114, 97, 103, 101, 32, 114, 101, 115, 101, 116, 58, - 32, 99, 108, 101, 97, 114, 104, 97, 108, 116, 32, 111, 117, 116, 32, 114, 101, 116, 32, 37, 105, 10, 0, 117, 115, 98, - 115, 116, 111, 114, 97, 103, 101, 32, 114, 101, 115, 101, 116, 58, 32, 85, 83, 66, 95, 71, 101, 116, 67, 111, 110, 102, - 105, 103, 117, 114, 97, 116, 105, 111, 110, 32, 114, 101, 116, 32, 37, 105, 10, 0, 114, 101, 115, 101, 116, 32, 111, - 107, 10, 0, 95, 95, 115, 101, 110, 100, 95, 99, 98, 119, 32, 114, 101, 116, 32, 37, 105, 10, 0, 95, 95, 85, 83, 66, - 95, 66, 108, 107, 77, 115, 103, 84, 105, 109, 101, 111, 117, 116, 32, 37, 105, 10, 0, 95, 95, 114, 101, 97, 100, 95, - 99, 115, 119, 32, 37, 105, 10, 0, 32, 32, 32, 32, 83, 67, 83, 73, 95, 84, 69, 83, 84, 95, 85, 78, 73, 84, 95, 82, 69, - 65, 68, 89, 32, 114, 101, 116, 32, 37, 105, 10, 0, 32, 32, 32, 32, 83, 67, 83, 73, 95, 82, 69, 81, 85, 69, 83, 84, 95, - 83, 69, 78, 83, 69, 32, 114, 101, 116, 32, 37, 105, 10, 0, 32, 32, 32, 32, 83, 67, 83, 73, 95, 82, 69, 81, 85, 69, 83, - 84, 95, 83, 69, 78, 83, 69, 32, 115, 116, 97, 116, 117, 115, 32, 37, 120, 10, 0, 85, 83, 66, 83, 116, 111, 114, 97, - 103, 101, 95, 79, 112, 101, 110, 40, 41, 58, 32, 85, 83, 66, 95, 71, 101, 116, 68, 101, 115, 99, 114, 105, 112, 116, - 111, 114, 115, 32, 37, 105, 10, 0, 85, 83, 66, 83, 116, 111, 114, 97, 103, 101, 95, 79, 112, 101, 110, 40, 41, 58, 32, - 100, 101, 118, 105, 99, 101, 32, 99, 104, 97, 110, 103, 101, 100, 33, 33, 33, 10, 0, 85, 83, 66, 83, 116, 111, 114, - 97, 103, 101, 95, 79, 112, 101, 110, 40, 41, 58, 32, 117, 99, 100, 32, 37, 105, 32, 80, 111, 119, 101, 114, 32, 37, - 105, 32, 109, 65, 10, 0, 85, 83, 66, 83, 116, 111, 114, 97, 103, 101, 95, 79, 112, 101, 110, 40, 41, 58, 32, 105, 110, - 116, 101, 114, 102, 97, 99, 101, 32, 115, 117, 98, 99, 108, 97, 115, 115, 32, 37, 105, 32, 97, 116, 97, 95, 112, 114, - 111, 116, 32, 37, 105, 32, 10, 0, 73, 110, 32, 80, 111, 105, 110, 116, 58, 32, 37, 105, 10, 0, 79, 117, 116, 32, 80, - 111, 105, 110, 116, 58, 32, 37, 105, 10, 0, 101, 112, 95, 105, 110, 32, 37, 120, 32, 101, 112, 95, 111, 117, 116, 32, - 37, 120, 10, 0, 85, 83, 66, 83, 116, 111, 114, 97, 103, 101, 95, 79, 112, 101, 110, 40, 41, 58, 32, 99, 97, 110, 110, - 111, 116, 32, 102, 105, 110, 100, 32, 97, 110, 121, 32, 105, 110, 116, 101, 114, 102, 97, 99, 101, 33, 33, 33, 10, 0, - 85, 83, 66, 83, 116, 111, 114, 97, 103, 101, 95, 79, 112, 101, 110, 40, 41, 58, 32, 99, 111, 110, 102, 58, 32, 37, 120, - 32, 97, 108, 116, 73, 110, 116, 101, 114, 102, 97, 99, 101, 58, 32, 37, 120, 10, 0, 85, 83, 66, 95, 71, 101, 116, 67, - 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 40, 41, 32, 69, 114, 114, 111, 114, 10, 0, 65, 99, 116, 117, - 97, 108, 32, 99, 111, 110, 102, 58, 32, 37, 120, 32, 32, 32, 110, 101, 120, 116, 32, 99, 111, 110, 102, 58, 32, 37, - 120, 10, 0, 85, 83, 66, 95, 83, 101, 116, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 40, 41, 32, - 69, 114, 114, 111, 114, 10, 0, 85, 83, 66, 95, 83, 101, 116, 65, 108, 116, 101, 114, 110, 97, 116, 105, 118, 101, 73, - 110, 116, 101, 114, 102, 97, 99, 101, 40, 41, 32, 69, 114, 114, 111, 114, 46, 32, 67, 111, 110, 116, 105, 110, 117, - 101, 10, 0, 85, 83, 66, 95, 83, 101, 116, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 40, 41, 32, - 38, 32, 85, 83, 66, 95, 83, 101, 116, 65, 108, 116, 101, 114, 110, 97, 116, 105, 118, 101, 73, 110, 116, 101, 114, 102, - 97, 99, 101, 40, 41, 32, 79, 75, 10, 0, 71, 101, 116, 95, 77, 97, 120, 95, 76, 117, 110, 40, 41, 58, 32, 101, 114, 114, - 44, 32, 100, 101, 102, 97, 117, 108, 116, 32, 109, 97, 120, 95, 108, 117, 110, 61, 56, 10, 0, 71, 101, 116, 95, 77, - 97, 120, 95, 76, 117, 110, 40, 41, 58, 32, 79, 75, 58, 32, 37, 105, 10, 0, 85, 83, 66, 83, 116, 111, 114, 97, 103, 101, - 95, 79, 112, 101, 110, 40, 41, 58, 32, 116, 114, 121, 95, 115, 116, 97, 116, 117, 115, 32, 37, 105, 10, 0, 85, 83, 66, - 83, 116, 111, 114, 97, 103, 101, 95, 79, 112, 101, 110, 40, 41, 58, 32, 79, 75, 44, 32, 114, 101, 116, 117, 114, 110, - 32, 48, 10, 0, 32, 32, 32, 32, 115, 116, 97, 114, 116, 95, 115, 116, 111, 112, 32, 99, 109, 100, 32, 114, 101, 116, - 32, 37, 105, 10, 0, 32, 32, 32, 32, 73, 110, 113, 117, 105, 114, 121, 32, 114, 101, 116, 32, 37, 105, 10, 0, 32, 32, - 32, 32, 68, 101, 118, 105, 99, 101, 32, 84, 121, 112, 101, 58, 32, 37, 120, 10, 0, 32, 32, 32, 32, 82, 101, 97, 100, - 67, 97, 112, 97, 99, 105, 116, 121, 32, 114, 101, 116, 32, 37, 105, 32, 32, 115, 101, 99, 116, 111, 114, 95, 115, 105, - 122, 101, 58, 32, 37, 117, 32, 32, 115, 101, 99, 116, 111, 114, 115, 58, 32, 37, 117, 10, 0, 70, 97, 115, 116, 32, 85, - 83, 66, 83, 116, 111, 114, 97, 103, 101, 95, 77, 111, 117, 110, 116, 76, 85, 78, 32, 37, 105, 35, 10, 0, 85, 83, 66, - 83, 116, 111, 114, 97, 103, 101, 95, 77, 111, 117, 110, 116, 76, 85, 78, 58, 32, 114, 101, 116, 32, 37, 105, 10, 0, - 85, 83, 66, 83, 84, 79, 82, 65, 71, 69, 95, 71, 69, 84, 95, 77, 65, 88, 95, 76, 85, 78, 32, 114, 101, 116, 32, 37, 105, - 32, 109, 97, 120, 108, 117, 110, 32, 37, 105, 10, 0, 85, 83, 66, 83, 116, 111, 114, 97, 103, 101, 95, 77, 111, 117, - 110, 116, 76, 85, 78, 32, 102, 97, 105, 108, 33, 33, 33, 10, 0, 10, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 10, 82, 111, 100, 114, 105, 101, 115, 32, 101, 104, 99, 109, 111, 100, 117, - 108, 101, 32, 49, 46, 48, 10, 85, 83, 66, 83, 116, 111, 114, 97, 103, 101, 95, 73, 110, 105, 116, 40, 41, 10, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 10, 10, 0, 85, 83, 66, 83, 116, 111, - 114, 97, 103, 101, 95, 73, 110, 105, 116, 40, 41, 32, 79, 107, 10, 0, 69, 114, 114, 111, 114, 32, 82, 101, 97, 100, - 105, 110, 103, 32, 115, 101, 99, 116, 111, 114, 32, 48, 10, 0, 79, 75, 32, 82, 101, 97, 100, 105, 110, 103, 32, 115, - 101, 99, 116, 111, 114, 32, 48, 10, 0, 85, 110, 112, 108, 117, 103, 58, 32, 114, 101, 115, 101, 116, 32, 37, 105, 32, - 115, 116, 97, 116, 117, 115, 32, 37, 120, 10, 0, 102, 97, 115, 116, 95, 114, 101, 109, 111, 117, 110, 116, 32, 75, 79, - 32, 114, 101, 116, 32, 37, 105, 10, 0, 85, 83, 66, 32, 65, 108, 108, 111, 99, 58, 32, 110, 111, 116, 32, 101, 110, 111, - 117, 103, 104, 32, 109, 101, 109, 111, 114, 121, 33, 10, 0, 119, 98, 102, 115, 32, 101, 114, 114, 111, 114, 32, 0, 98, - 97, 100, 32, 109, 97, 103, 105, 99, 0, 104, 100, 32, 115, 101, 99, 116, 111, 114, 32, 115, 105, 122, 101, 32, 100, 111, - 101, 115, 110, 39, 116, 32, 109, 97, 116, 99, 104, 0, 104, 100, 32, 110, 117, 109, 32, 115, 101, 99, 116, 111, 114, - 32, 100, 111, 101, 115, 110, 39, 116, 32, 109, 97, 116, 99, 104, 0, 78, 84, 70, 83, 0, 70, 65, 84, 0, 116, 114, 121, - 105, 110, 103, 32, 116, 111, 32, 99, 108, 111, 115, 101, 32, 119, 98, 102, 115, 32, 119, 104, 105, 108, 101, 32, 100, - 105, 115, 99, 115, 32, 115, 116, 105, 108, 108, 32, 111, 112, 101, 110, 0, 97, 108, 108, 111, 99, 97, 116, 105, 110, - 103, 32, 109, 101, 109, 111, 114, 121, 0 -}; +#define size_ehcmodule_5 25776 + +unsigned char ehcmodule_5[25776] __attribute__((aligned (32)))={ + 127, 69, 76, 70, 1, 2, 1, 97, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 40, 0, 0, 0, 1, 19, 112, 0, 0, 0, 0, 0, 52, 0, 0, 0, + 0, 0, 0, 6, 6, 0, 52, 0, 32, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, + 0, 0, 0, 160, 0, 240, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 212, 0, 0, 0, 160, 0, 0, 0, 160, 0, 0, 0, 52, 0, 0, 0, + 52, 0, 240, 0, 0, 0, 0, 0, 4, 0, 0, 0, 1, 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 212, 0, 0, 0, 212, 0, 240, 0, + 0, 0, 0, 64, 0, 0, 0, 0, 1, 0, 0, 1, 8, 19, 112, 0, 0, 19, 112, 0, 0, 0, 0, 90, 32, 0, 0, 90, 32, 0, 240, 0, 5, 0, 0, + 0, 4, 0, 0, 0, 1, 0, 0, 91, 40, 19, 112, 96, 0, 19, 112, 96, 0, 0, 0, 9, 136, 0, 2, 152, 8, 0, 240, 0, 6, 0, 0, 0, 4, + 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 6, 0, 0, 0, 11, 0, 0, 0, 4, 0, 0, 0, 9, 19, 112, 0, 0, 0, 0, 0, 125, 0, 0, 0, 120, + 0, 0, 0, 126, 0, 0, 48, 0, 0, 0, 0, 127, 19, 114, 246, 8, 227, 160, 0, 0, 227, 160, 16, 0, 229, 159, 49, 0, 225, 47, + 255, 19, 229, 159, 192, 252, 229, 156, 192, 0, 225, 160, 0, 0, 231, 156, 193, 11, 225, 160, 0, 0, 225, 47, 255, 28, + 225, 160, 0, 0, 225, 160, 0, 0, 227, 160, 176, 63, 234, 255, 255, 245, 225, 160, 0, 0, 225, 160, 0, 0, 227, 160, 176, + 64, 234, 255, 255, 241, 227, 160, 0, 0, 238, 7, 15, 21, 225, 47, 255, 30, 225, 160, 0, 0, 225, 160, 0, 0, 225, 160, + 0, 0, 227, 24, 0, 16, 10, 0, 0, 18, 227, 200, 128, 16, 227, 160, 32, 16, 229, 135, 32, 0, 225, 160, 0, 0, 225, 160, + 32, 13, 225, 160, 0, 0, 229, 159, 208, 144, 225, 160, 0, 0, 233, 45, 95, 254, 225, 160, 0, 0, 235, 0, 0, 15, 232, 189, + 95, 254, 225, 160, 0, 0, 225, 160, 208, 2, 227, 16, 0, 1, 10, 0, 0, 2, 225, 160, 0, 0, 227, 160, 0, 4, 235, 0, 0, 5, + 227, 24, 0, 1, 10, 0, 0, 1, 229, 159, 240, 88, 225, 160, 0, 0, 229, 159, 240, 84, 225, 160, 0, 0, 229, 159, 240, 80, + 225, 160, 0, 0, 229, 159, 32, 76, 225, 47, 255, 18, 225, 160, 0, 0, 238, 19, 15, 16, 225, 47, 255, 30, 225, 160, 0, + 0, 225, 160, 0, 0, 238, 3, 15, 16, 225, 47, 255, 30, 225, 160, 0, 0, 225, 160, 0, 0, 69, 72, 67, 95, 67, 70, 71, 0, + 18, 52, 0, 1, 0, 0, 0, 0, 19, 112, 16, 157, 19, 114, 194, 96, 19, 114, 248, 8, 255, 255, 30, 128, 255, 255, 30, 156, + 255, 255, 29, 68, 19, 112, 13, 61, 225, 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 181, 0, 40, 2, 208, + 16, 40, 2, 216, 4, 40, 0, 208, 7, 40, 1, 209, 19, 224, 7, 40, 16, 208, 12, 40, 17, 209, 14, 224, 11, 75, 8, 104, 24, + 224, 11, 72, 7, 224, 9, 75, 7, 34, 1, 96, 26, 32, 0, 224, 4, 72, 6, 224, 2, 72, 6, 224, 0, 72, 6, 188, 2, 71, 8, 19, + 112, 96, 48, 19, 112, 72, 101, 19, 112, 105, 168, 19, 112, 65, 97, 19, 112, 66, 169, 255, 255, 253, 102, 181, 112, 28, + 12, 28, 5, 240, 5, 252, 17, 28, 6, 32, 1, 66, 64, 240, 5, 252, 0, 14, 43, 115, 35, 12, 43, 115, 99, 10, 43, 115, 163, + 124, 34, 124, 99, 6, 18, 4, 27, 67, 19, 124, 162, 115, 229, 2, 18, 67, 19, 124, 226, 6, 45, 67, 19, 28, 32, 96, 29, + 48, 12, 33, 4, 240, 5, 252, 0, 124, 35, 124, 96, 6, 27, 4, 0, 67, 24, 124, 163, 33, 4, 2, 27, 67, 24, 124, 227, 67, + 24, 240, 5, 251, 243, 28, 48, 240, 5, 251, 216, 32, 0, 188, 112, 188, 2, 71, 8, 181, 8, 75, 12, 28, 1, 34, 32, 104, + 24, 240, 5, 251, 249, 40, 0, 209, 13, 72, 9, 240, 5, 251, 208, 240, 4, 252, 7, 32, 200, 240, 0, 255, 33, 240, 4, 252, + 12, 32, 200, 240, 0, 255, 28, 231, 244, 188, 8, 188, 2, 71, 8, 19, 112, 96, 48, 19, 112, 96, 84, 181, 8, 75, 4, 28, + 1, 104, 24, 240, 5, 251, 164, 188, 8, 188, 1, 71, 0, 70, 192, 19, 112, 96, 48, 181, 240, 176, 139, 144, 4, 145, 5, 28, + 8, 28, 17, 28, 23, 146, 7, 240, 5, 251, 176, 76, 129, 104, 35, 43, 0, 209, 0, 224, 241, 168, 9, 240, 3, 253, 172, 75, + 126, 96, 24, 40, 0, 208, 4, 35, 128, 154, 9, 1, 27, 66, 154, 208, 4, 35, 1, 74, 122, 66, 91, 96, 19, 224, 224, 78, 121, + 72, 122, 104, 51, 24, 26, 42, 0, 208, 104, 43, 0, 219, 102, 75, 116, 104, 26, 28, 81, 209, 98, 28, 53, 75, 112, 104, + 48, 104, 28, 33, 31, 34, 16, 52, 31, 24, 18, 67, 140, 146, 2, 33, 16, 28, 34, 240, 3, 255, 74, 40, 0, 209, 0, 224, 195, + 120, 35, 43, 67, 209, 11, 120, 99, 43, 73, 209, 8, 120, 163, 43, 83, 209, 5, 120, 227, 43, 79, 209, 2, 75, 103, 96, + 51, 224, 8, 104, 43, 43, 0, 208, 2, 35, 0, 96, 43, 231, 218, 35, 1, 66, 91, 96, 43, 121, 98, 121, 163, 2, 18, 4, 27, + 24, 211, 121, 34, 77, 95, 24, 155, 121, 226, 28, 40, 6, 18, 24, 155, 10, 219, 147, 3, 154, 3, 75, 91, 33, 0, 96, 26, + 34, 128, 1, 18, 240, 5, 250, 55, 75, 84, 104, 26, 75, 85, 66, 154, 209, 30, 32, 7, 35, 0, 70, 132, 70, 102, 64, 30, + 209, 4, 16, 218, 152, 2, 73, 82, 0, 146, 80, 80, 24, 226, 122, 18, 42, 0, 208, 10, 16, 218, 92, 168, 33, 1, 64, 177, + 67, 8, 84, 168, 154, 2, 28, 16, 154, 3, 24, 128, 144, 2, 34, 128, 51, 1, 1, 210, 66, 147, 209, 227, 75, 63, 34, 31, + 104, 27, 153, 5, 51, 31, 67, 147, 34, 128, 2, 18, 147, 3, 145, 2, 78, 60, 146, 6, 224, 97, 155, 4, 32, 15, 10, 93, 104, + 51, 67, 133, 66, 157, 208, 63, 73, 56, 75, 57, 104, 10, 96, 53, 66, 154, 209, 33, 75, 57, 28, 40, 104, 28, 28, 33, 240, + 5, 250, 201, 75, 55, 8, 193, 0, 138, 88, 210, 35, 0, 147, 1, 35, 7, 64, 24, 70, 140, 35, 0, 144, 0, 224, 9, 72, 47, + 70, 97, 92, 64, 28, 1, 65, 25, 32, 1, 66, 8, 208, 0, 25, 18, 51, 1, 153, 0, 66, 139, 211, 242, 60, 1, 64, 44, 25, 21, + 75, 34, 104, 28, 27, 100, 44, 16, 220, 10, 44, 16, 208, 9, 34, 128, 152, 3, 33, 0, 2, 18, 240, 5, 249, 202, 44, 0, 221, + 8, 224, 0, 36, 16, 28, 40, 28, 33, 154, 3, 240, 3, 254, 163, 40, 0, 208, 29, 154, 4, 152, 6, 4, 209, 12, 73, 26, 67, + 28, 60, 66, 187, 216, 0, 28, 28, 154, 3, 152, 2, 24, 137, 28, 34, 240, 5, 249, 110, 152, 2, 28, 33, 240, 5, 250, 196, + 155, 2, 152, 4, 25, 27, 27, 63, 16, 164, 25, 0, 147, 2, 144, 4, 47, 0, 209, 155, 224, 5, 32, 128, 2, 0, 176, 11, 188, + 240, 188, 2, 71, 8, 152, 5, 153, 7, 240, 5, 250, 207, 32, 0, 231, 245, 70, 192, 19, 112, 106, 56, 19, 112, 105, 176, + 19, 112, 96, 24, 19, 112, 96, 12, 128, 0, 0, 1, 127, 255, 255, 255, 19, 112, 122, 96, 19, 112, 105, 180, 19, 112, 130, + 96, 181, 56, 28, 12, 240, 5, 250, 126, 30, 5, 209, 38, 44, 0, 208, 36, 104, 34, 42, 0, 208, 33, 120, 17, 120, 83, 6, + 9, 4, 27, 67, 11, 120, 145, 2, 9, 67, 11, 120, 209, 67, 11, 43, 6, 209, 21, 123, 17, 123, 83, 6, 9, 4, 27, 67, 11, 123, + 145, 2, 9, 67, 11, 123, 209, 67, 11, 43, 122, 208, 2, 43, 136, 209, 7, 224, 2, 72, 5, 33, 21, 224, 1, 72, 4, 33, 20, + 240, 4, 250, 146, 28, 40, 188, 56, 188, 2, 71, 8, 70, 192, 19, 112, 1, 153, 181, 240, 176, 145, 75, 206, 33, 128, 104, + 24, 240, 5, 250, 9, 33, 32, 240, 5, 250, 56, 144, 8, 240, 0, 251, 131, 240, 5, 250, 123, 33, 120, 240, 5, 250, 52, 153, + 8, 72, 199, 240, 5, 250, 32, 72, 198, 154, 8, 28, 1, 35, 0, 240, 5, 249, 240, 73, 196, 144, 9, 32, 205, 240, 4, 250, + 17, 33, 0, 36, 1, 145, 7, 145, 11, 145, 6, 39, 0, 152, 8, 169, 15, 34, 0, 240, 5, 250, 34, 144, 14, 155, 14, 43, 0, + 209, 246, 44, 0, 208, 2, 152, 9, 240, 5, 249, 235, 74, 185, 158, 15, 35, 0, 96, 19, 46, 0, 209, 87, 75, 183, 104, 27, + 43, 0, 208, 5, 75, 182, 104, 27, 43, 0, 209, 1, 74, 181, 96, 19, 36, 0, 47, 0, 208, 222, 75, 178, 104, 27, 43, 0, 208, + 218, 75, 175, 104, 27, 43, 0, 209, 214, 75, 175, 104, 27, 43, 0, 208, 9, 240, 3, 252, 252, 40, 0, 208, 5, 240, 3, 252, + 248, 40, 0, 208, 1, 240, 3, 252, 244, 75, 168, 104, 27, 147, 4, 43, 0, 209, 36, 77, 167, 75, 167, 104, 42, 58, 1, 66, + 154, 216, 30, 78, 159, 76, 165, 35, 1, 96, 51, 104, 32, 33, 1, 74, 164, 240, 3, 253, 190, 155, 4, 96, 51, 40, 0, 208, + 9, 35, 128, 104, 42, 0, 155, 66, 154, 209, 4, 104, 35, 33, 128, 2, 9, 24, 91, 96, 35, 75, 154, 74, 156, 104, 25, 104, + 18, 66, 145, 211, 1, 34, 0, 96, 26, 75, 145, 36, 0, 104, 27, 43, 0, 209, 153, 152, 9, 73, 138, 240, 5, 249, 131, 36, + 1, 231, 147, 120, 51, 120, 112, 6, 27, 4, 0, 67, 24, 120, 179, 2, 27, 67, 24, 120, 243, 67, 24, 56, 1, 40, 6, 217, 0, + 226, 152, 240, 4, 254, 237, 0, 10, 0, 73, 2, 151, 2, 151, 2, 151, 0, 7, 0, 92, 38, 1, 37, 1, 226, 150, 123, 51, 123, + 116, 6, 27, 4, 36, 67, 28, 123, 179, 73, 119, 2, 27, 67, 28, 123, 243, 67, 28, 28, 32, 240, 5, 248, 221, 40, 0, 209, + 11, 125, 51, 125, 117, 6, 27, 4, 45, 67, 29, 125, 179, 2, 27, 67, 29, 125, 243, 38, 1, 67, 29, 226, 122, 28, 32, 73, + 120, 240, 5, 248, 203, 40, 0, 208, 0, 226, 108, 125, 51, 125, 117, 6, 27, 4, 45, 67, 29, 125, 179, 34, 1, 2, 27, 67, + 29, 125, 243, 39, 0, 67, 29, 75, 103, 38, 1, 96, 26, 75, 103, 96, 24, 72, 110, 240, 0, 251, 48, 75, 109, 34, 4, 104, + 27, 104, 155, 96, 154, 240, 1, 248, 39, 226, 87, 122, 50, 122, 115, 6, 18, 4, 27, 67, 19, 122, 178, 2, 18, 67, 19, 122, + 242, 67, 19, 154, 6, 66, 154, 209, 0, 226, 70, 240, 1, 248, 46, 38, 1, 37, 0, 226, 68, 126, 51, 126, 116, 6, 27, 4, + 36, 67, 28, 126, 179, 124, 50, 2, 27, 67, 28, 126, 243, 6, 18, 67, 28, 124, 115, 4, 27, 67, 19, 124, 178, 2, 18, 67, + 19, 124, 242, 67, 26, 146, 4, 125, 51, 125, 117, 6, 27, 4, 45, 67, 29, 125, 179, 2, 27, 67, 29, 125, 243, 67, 29, 155, + 6, 43, 0, 209, 16, 123, 51, 43, 0, 209, 13, 122, 50, 122, 115, 122, 176, 6, 18, 4, 27, 67, 19, 2, 0, 67, 3, 122, 240, + 67, 24, 240, 1, 248, 10, 28, 6, 224, 0, 38, 0, 153, 4, 28, 32, 25, 73, 145, 10, 0, 201, 240, 5, 249, 76, 34, 0, 28, + 37, 146, 5, 224, 7, 104, 40, 104, 105, 240, 5, 249, 68, 155, 5, 53, 8, 51, 1, 147, 5, 153, 5, 154, 10, 66, 145, 219, + 243, 73, 48, 104, 11, 147, 5, 43, 0, 208, 0, 225, 213, 154, 15, 123, 16, 123, 83, 6, 0, 4, 27, 67, 3, 123, 144, 2, 0, + 67, 3, 123, 208, 67, 3, 72, 51, 66, 131, 209, 0, 225, 38, 66, 131, 216, 31, 43, 6, 216, 11, 43, 5, 211, 0, 225, 180, + 43, 1, 209, 0, 224, 159, 43, 0, 208, 119, 43, 2, 208, 0, 225, 70, 225, 171, 43, 27, 216, 6, 43, 26, 211, 0, 224, 172, + 43, 12, 208, 0, 225, 61, 224, 156, 74, 37, 66, 147, 209, 0, 224, 167, 50, 1, 66, 147, 208, 0, 225, 52, 224, 246, 72, + 34, 66, 131, 209, 0, 224, 226, 66, 131, 216, 68, 74, 32, 66, 147, 209, 0, 224, 182, 66, 147, 216, 8, 58, 12, 66, 147, + 209, 0, 225, 17, 50, 2, 66, 147, 208, 0, 225, 31, 225, 20, 74, 25, 66, 147, 209, 0, 225, 22, 50, 1, 66, 147, 208, 0, + 225, 22, 224, 169, 70, 192, 19, 112, 96, 48, 19, 112, 96, 109, 0, 152, 150, 128, 19, 112, 1, 65, 19, 112, 105, 208, + 19, 112, 105, 164, 19, 112, 105, 168, 19, 112, 96, 20, 19, 112, 106, 52, 19, 114, 198, 0, 0, 0, 15, 254, 19, 112, 105, + 160, 19, 112, 106, 96, 19, 114, 198, 4, 19, 112, 96, 121, 19, 112, 21, 69, 19, 112, 96, 60, 85, 77, 83, 3, 85, 77, 83, + 1, 85, 77, 83, 130, 85, 77, 83, 16, 85, 77, 83, 128, 73, 196, 66, 139, 209, 0, 225, 63, 66, 139, 216, 7, 73, 194, 66, + 139, 208, 119, 73, 194, 66, 139, 208, 0, 224, 219, 224, 220, 74, 192, 66, 147, 209, 0, 225, 36, 50, 1, 66, 147, 208, + 0, 224, 210, 225, 20, 46, 0, 209, 0, 225, 55, 105, 162, 105, 35, 136, 21, 106, 34, 136, 27, 136, 16, 104, 34, 2, 25, + 10, 27, 120, 18, 67, 11, 2, 41, 10, 45, 67, 13, 146, 5, 4, 45, 104, 162, 12, 45, 120, 18, 149, 0, 2, 5, 10, 0, 67, 40, + 4, 0, 12, 0, 144, 1, 107, 32, 4, 27, 144, 2, 12, 27, 28, 48, 153, 5, 240, 1, 251, 44, 225, 3, 46, 0, 209, 0, 225, 17, + 104, 35, 28, 48, 120, 25, 104, 163, 136, 26, 105, 35, 240, 1, 251, 12, 224, 247, 46, 0, 208, 0, 225, 5, 104, 35, 105, + 34, 120, 24, 104, 163, 120, 25, 105, 163, 240, 0, 255, 46, 224, 235, 38, 0, 37, 1, 225, 4, 154, 11, 42, 0, 209, 1, 240, + 0, 254, 203, 240, 3, 249, 29, 39, 0, 28, 5, 40, 0, 219, 3, 75, 151, 34, 1, 96, 26, 39, 1, 155, 15, 38, 1, 122, 25, 122, + 90, 6, 9, 4, 18, 67, 10, 122, 153, 122, 219, 2, 9, 67, 10, 67, 19, 147, 6, 150, 11, 224, 230, 75, 141, 153, 5, 38, 1, + 96, 25, 37, 0, 39, 0, 224, 223, 104, 35, 104, 26, 75, 138, 224, 97, 104, 35, 37, 0, 120, 222, 75, 136, 120, 27, 66, + 179, 208, 16, 75, 135, 104, 27, 43, 0, 208, 12, 240, 3, 248, 206, 240, 0, 254, 206, 240, 0, 254, 180, 75, 129, 112, + 30, 240, 0, 254, 146, 240, 3, 248, 228, 28, 5, 75, 126, 112, 30, 224, 165, 35, 1, 96, 11, 154, 5, 75, 121, 72, 124, + 96, 26, 240, 0, 249, 164, 75, 123, 34, 4, 104, 27, 39, 0, 104, 155, 96, 154, 240, 0, 254, 154, 77, 120, 28, 40, 240, + 3, 249, 238, 75, 119, 96, 24, 104, 35, 43, 0, 208, 1, 104, 42, 96, 26, 75, 116, 104, 29, 224, 135, 104, 35, 105, 34, + 104, 24, 104, 163, 38, 1, 104, 25, 240, 3, 251, 162, 75, 111, 28, 5, 120, 26, 42, 0, 209, 0, 224, 148, 70, 105, 34, + 23, 92, 81, 112, 25, 104, 35, 40, 0, 221, 2, 104, 25, 72, 105, 224, 1, 104, 25, 72, 105, 240, 1, 248, 24, 224, 133, + 104, 35, 105, 34, 104, 24, 104, 163, 104, 25, 240, 3, 252, 42, 224, 97, 75, 100, 104, 26, 66, 81, 65, 74, 96, 26, 224, + 105, 104, 35, 104, 26, 75, 85, 96, 26, 38, 1, 231, 106, 122, 17, 122, 83, 6, 9, 4, 27, 67, 11, 122, 145, 122, 210, 2, + 9, 67, 11, 67, 26, 104, 37, 35, 0, 146, 6, 147, 13, 120, 42, 42, 95, 209, 26, 120, 106, 42, 68, 209, 23, 120, 170, 42, + 86, 209, 20, 120, 234, 42, 68, 209, 17, 77, 82, 74, 69, 96, 43, 104, 227, 33, 1, 96, 17, 43, 4, 209, 6, 104, 161, 168, + 13, 34, 4, 240, 4, 254, 46, 155, 13, 96, 43, 240, 3, 254, 176, 224, 17, 104, 227, 43, 4, 209, 4, 104, 161, 168, 13, + 34, 4, 240, 4, 254, 33, 28, 40, 153, 13, 240, 3, 254, 231, 144, 7, 40, 0, 208, 46, 75, 53, 34, 1, 96, 26, 38, 1, 37, + 0, 224, 43, 240, 3, 250, 230, 38, 1, 28, 5, 40, 0, 209, 42, 35, 1, 74, 60, 66, 91, 96, 19, 224, 37, 75, 45, 34, 1, 96, + 26, 104, 35, 105, 33, 104, 24, 104, 163, 104, 26, 247, 255, 251, 159, 28, 5, 38, 1, 224, 24, 154, 7, 42, 0, 208, 18, + 104, 35, 105, 34, 104, 25, 104, 163, 152, 7, 104, 27, 240, 4, 250, 181, 38, 1, 37, 0, 224, 10, 38, 1, 37, 6, 224, 6, + 37, 1, 38, 1, 66, 109, 39, 1, 224, 2, 38, 1, 37, 1, 66, 109, 153, 4, 0, 203, 24, 228, 224, 7, 104, 32, 104, 97, 240, + 4, 255, 53, 154, 4, 52, 8, 50, 1, 146, 4, 155, 4, 153, 10, 66, 139, 219, 243, 224, 9, 38, 1, 37, 1, 224, 1, 38, 1, 37, + 6, 66, 109, 224, 2, 37, 0, 38, 1, 149, 6, 74, 12, 36, 0, 104, 19, 43, 0, 208, 4, 152, 9, 73, 23, 240, 4, 254, 199, 36, + 1, 46, 0, 209, 0, 228, 213, 152, 15, 28, 41, 240, 4, 255, 29, 228, 208, 87, 70, 83, 2, 85, 77, 83, 131, 87, 70, 83, + 1, 87, 70, 83, 3, 19, 112, 96, 20, 19, 112, 105, 164, 19, 112, 1, 12, 19, 112, 106, 24, 19, 112, 21, 69, 19, 112, 96, + 60, 19, 114, 198, 0, 19, 114, 198, 4, 19, 112, 96, 16, 19, 112, 96, 137, 19, 112, 96, 164, 19, 112, 105, 172, 19, 112, + 96, 12, 19, 112, 96, 24, 0, 152, 150, 128, 74, 3, 35, 128, 104, 17, 2, 27, 67, 11, 96, 19, 71, 112, 70, 192, 13, 4, + 0, 204, 75, 2, 74, 3, 104, 25, 64, 10, 96, 26, 71, 112, 13, 4, 0, 204, 255, 255, 127, 255, 181, 16, 247, 255, 255, 243, + 32, 128, 240, 3, 253, 180, 33, 32, 240, 4, 254, 169, 76, 9, 96, 32, 32, 4, 240, 4, 254, 180, 104, 33, 34, 0, 32, 4, + 240, 4, 254, 215, 247, 255, 255, 215, 32, 4, 240, 4, 254, 128, 188, 16, 188, 1, 71, 0, 70, 192, 19, 112, 96, 32, 181, + 16, 28, 4, 75, 15, 28, 8, 0, 137, 24, 9, 104, 26, 0, 73, 35, 1, 240, 4, 254, 83, 75, 12, 33, 16, 96, 24, 72, 11, 240, + 3, 254, 182, 33, 16, 72, 10, 240, 3, 254, 189, 75, 10, 34, 55, 96, 28, 75, 9, 32, 4, 104, 27, 104, 155, 96, 154, 240, + 4, 254, 91, 188, 16, 188, 1, 71, 0, 19, 112, 96, 32, 19, 112, 96, 28, 13, 128, 0, 56, 13, 128, 0, 60, 19, 112, 105, + 192, 19, 112, 96, 60, 181, 112, 76, 21, 75, 21, 38, 2, 66, 118, 28, 33, 104, 24, 34, 0, 96, 38, 240, 4, 254, 103, 75, + 18, 77, 18, 104, 27, 104, 154, 35, 0, 96, 147, 74, 17, 104, 40, 96, 19, 240, 4, 254, 46, 104, 40, 240, 4, 254, 117, + 35, 1, 66, 91, 96, 43, 104, 35, 43, 0, 209, 3, 75, 11, 104, 27, 96, 35, 224, 0, 96, 38, 32, 4, 240, 4, 254, 37, 75, + 2, 104, 24, 188, 112, 188, 2, 71, 8, 19, 112, 105, 184, 19, 112, 96, 32, 19, 112, 96, 60, 19, 112, 96, 28, 19, 112, + 105, 192, 19, 112, 105, 188, 75, 2, 34, 0, 96, 24, 75, 2, 96, 26, 71, 112, 19, 112, 105, 196, 19, 112, 105, 192, 181, + 248, 76, 34, 38, 16, 104, 35, 77, 33, 67, 179, 96, 35, 104, 43, 73, 32, 104, 154, 121, 19, 121, 87, 6, 27, 4, 63, 67, + 31, 121, 147, 2, 27, 67, 31, 121, 211, 67, 31, 104, 11, 43, 0, 208, 18, 28, 56, 240, 0, 248, 56, 40, 0, 220, 20, 74, + 22, 35, 0, 96, 19, 75, 22, 96, 24, 32, 4, 240, 4, 253, 234, 104, 43, 34, 55, 104, 155, 64, 23, 96, 95, 224, 22, 75, + 17, 104, 27, 43, 0, 208, 8, 28, 56, 240, 0, 248, 33, 104, 43, 34, 55, 104, 155, 64, 23, 96, 95, 224, 2, 35, 55, 64, + 31, 96, 87, 104, 35, 67, 51, 96, 35, 75, 9, 104, 26, 67, 22, 96, 30, 32, 0, 188, 248, 188, 2, 71, 8, 70, 192, 13, 128, + 0, 60, 19, 112, 96, 60, 19, 112, 105, 192, 19, 112, 105, 188, 19, 112, 105, 196, 13, 128, 0, 56, 71, 24, 70, 192, 181, + 112, 28, 12, 28, 5, 240, 4, 253, 235, 28, 6, 32, 1, 66, 64, 240, 4, 253, 218, 104, 34, 75, 17, 66, 154, 209, 25, 75, + 16, 73, 17, 34, 1, 67, 19, 96, 75, 28, 32, 34, 8, 240, 4, 252, 131, 28, 32, 27, 100, 8, 164, 33, 8, 60, 2, 240, 4, 253, + 222, 2, 36, 35, 234, 10, 36, 6, 27, 67, 35, 96, 43, 28, 40, 33, 4, 240, 4, 253, 212, 28, 48, 240, 4, 253, 185, 188, + 112, 188, 1, 71, 0, 230, 0, 1, 112, 19, 112, 4, 153, 19, 112, 96, 36, 181, 56, 28, 4, 240, 4, 253, 114, 44, 38, 208, + 72, 44, 38, 216, 5, 44, 36, 208, 9, 44, 37, 208, 0, 224, 169, 224, 14, 44, 57, 208, 112, 44, 60, 208, 0, 224, 163, 224, + 110, 73, 83, 75, 84, 72, 84, 96, 75, 34, 8, 240, 4, 252, 75, 72, 82, 224, 150, 72, 82, 73, 82, 247, 255, 255, 171, 76, + 77, 75, 81, 77, 82, 96, 99, 34, 8, 28, 40, 28, 33, 240, 4, 252, 60, 28, 40, 33, 8, 240, 4, 253, 154, 75, 77, 77, 78, + 96, 99, 34, 8, 28, 40, 28, 33, 240, 4, 252, 48, 28, 40, 33, 8, 240, 4, 253, 142, 75, 73, 77, 74, 96, 99, 34, 8, 28, + 33, 28, 40, 240, 4, 252, 36, 28, 40, 33, 8, 240, 4, 253, 130, 75, 59, 72, 69, 96, 99, 28, 33, 34, 8, 240, 4, 252, 25, + 72, 66, 224, 100, 72, 66, 73, 66, 247, 255, 255, 121, 76, 52, 75, 65, 77, 57, 96, 99, 34, 8, 28, 40, 28, 33, 240, 4, + 252, 10, 28, 40, 33, 8, 240, 4, 253, 104, 75, 60, 77, 53, 96, 99, 34, 8, 28, 40, 28, 33, 240, 4, 251, 254, 28, 40, 33, + 8, 240, 4, 253, 92, 75, 55, 77, 49, 96, 99, 34, 8, 28, 33, 28, 40, 240, 4, 251, 242, 28, 40, 33, 8, 240, 4, 253, 80, + 75, 34, 72, 50, 96, 99, 28, 33, 34, 8, 240, 4, 251, 231, 72, 47, 224, 50, 72, 47, 224, 0, 72, 47, 73, 47, 247, 255, + 255, 69, 76, 26, 75, 46, 77, 31, 96, 99, 34, 8, 28, 40, 28, 33, 240, 4, 251, 214, 28, 40, 33, 8, 240, 4, 253, 52, 75, + 41, 77, 27, 96, 99, 34, 8, 28, 40, 28, 33, 240, 4, 251, 202, 28, 40, 33, 8, 240, 4, 253, 40, 75, 36, 77, 23, 96, 99, + 34, 8, 28, 33, 28, 40, 240, 4, 251, 190, 28, 40, 33, 8, 240, 4, 253, 28, 75, 8, 72, 31, 96, 99, 28, 33, 34, 8, 240, + 4, 251, 179, 72, 28, 33, 8, 240, 4, 253, 17, 32, 0, 188, 56, 188, 2, 71, 8, 70, 192, 19, 112, 96, 36, 19, 112, 0, 96, + 255, 255, 30, 120, 32, 32, 93, 232, 32, 32, 64, 140, 255, 255, 31, 112, 19, 112, 0, 188, 255, 255, 31, 140, 19, 112, + 0, 196, 255, 255, 30, 52, 19, 112, 0, 204, 255, 255, 31, 104, 32, 32, 91, 20, 32, 32, 62, 108, 255, 255, 30, 176, 255, + 255, 30, 204, 255, 255, 29, 116, 255, 255, 30, 168, 32, 32, 94, 132, 32, 32, 93, 148, 32, 32, 63, 96, 255, 255, 33, + 48, 255, 255, 33, 76, 255, 255, 31, 244, 255, 255, 33, 40, 181, 56, 77, 11, 35, 0, 104, 42, 73, 10, 240, 4, 252, 113, + 76, 10, 73, 10, 34, 0, 96, 32, 104, 40, 240, 4, 252, 172, 104, 32, 240, 4, 252, 123, 104, 32, 240, 4, 252, 194, 188, + 56, 188, 1, 71, 0, 70, 192, 19, 112, 96, 44, 0, 152, 150, 128, 19, 112, 96, 52, 19, 112, 105, 200, 181, 8, 1, 67, 26, + 27, 0, 155, 24, 24, 0, 192, 247, 255, 255, 216, 188, 8, 188, 1, 71, 0, 0, 0, 181, 0, 74, 5, 2, 192, 104, 19, 104, 17, + 26, 201, 213, 0, 104, 19, 66, 129, 217, 249, 188, 1, 71, 0, 13, 128, 0, 16, 181, 8, 75, 24, 120, 26, 30, 83, 65, 154, + 75, 23, 96, 26, 240, 3, 252, 112, 75, 22, 33, 4, 96, 24, 28, 24, 240, 4, 252, 137, 240, 3, 252, 114, 34, 0, 28, 1, 72, + 18, 240, 3, 252, 167, 33, 160, 2, 73, 72, 16, 240, 4, 252, 113, 75, 16, 33, 128, 96, 24, 240, 4, 252, 34, 33, 32, 240, + 4, 252, 81, 75, 13, 96, 24, 240, 3, 250, 201, 40, 0, 219, 3, 247, 255, 250, 7, 32, 0, 224, 1, 32, 1, 66, 64, 188, 8, + 188, 2, 71, 8, 19, 112, 1, 12, 19, 112, 106, 48, 19, 114, 194, 96, 19, 112, 14, 77, 19, 113, 130, 96, 19, 112, 96, 48, + 19, 112, 96, 44, 181, 240, 7, 65, 213, 27, 34, 128, 78, 14, 77, 15, 76, 15, 35, 0, 1, 146, 104, 49, 0, 152, 104, 137, + 104, 47, 49, 68, 24, 9, 104, 8, 66, 187, 209, 5, 7, 193, 212, 7, 73, 9, 32, 2, 96, 8, 224, 3, 64, 32, 40, 3, 209, 0, + 96, 10, 51, 1, 43, 4, 209, 233, 188, 240, 188, 1, 71, 0, 19, 112, 96, 60, 19, 112, 106, 48, 0, 0, 32, 3, 19, 112, 106, + 52, 181, 240, 176, 131, 147, 1, 155, 8, 76, 14, 0, 91, 104, 38, 28, 13, 28, 23, 147, 0, 32, 10, 247, 255, 255, 79, 104, + 43, 154, 1, 64, 59, 66, 147, 208, 9, 104, 35, 27, 155, 213, 0, 104, 38, 154, 0, 66, 147, 211, 240, 32, 2, 66, 64, 224, + 0, 32, 0, 176, 3, 188, 240, 188, 2, 71, 8, 70, 192, 13, 128, 0, 16, 181, 56, 28, 4, 240, 3, 250, 191, 33, 0, 28, 5, + 34, 96, 28, 32, 240, 4, 250, 232, 35, 64, 96, 163, 35, 128, 4, 91, 99, 101, 96, 35, 96, 99, 188, 56, 188, 1, 71, 0, + 181, 16, 75, 12, 36, 0, 104, 27, 108, 26, 42, 7, 220, 13, 73, 10, 104, 12, 0, 228, 24, 164, 0, 97, 25, 12, 106, 25, + 1, 100, 25, 12, 50, 1, 100, 26, 28, 32, 247, 255, 255, 215, 28, 32, 188, 16, 188, 2, 71, 8, 70, 192, 19, 112, 96, 60, + 19, 112, 106, 32, 181, 240, 28, 4, 176, 133, 28, 8, 28, 14, 147, 3, 28, 23, 240, 4, 250, 59, 35, 0, 98, 35, 5, 53, 35, + 128, 13, 45, 1, 91, 27, 93, 96, 224, 66, 175, 210, 1, 28, 61, 224, 49, 32, 128, 1, 64, 24, 54, 11, 54, 3, 54, 150, 2, + 33, 1, 28, 38, 54, 16, 145, 1, 224, 20, 152, 2, 240, 4, 250, 33, 34, 0, 198, 1, 97, 50, 155, 2, 33, 128, 28, 24, 35, + 128, 1, 91, 1, 73, 24, 192, 24, 109, 144, 2, 66, 189, 211, 0, 28, 61, 154, 1, 50, 1, 146, 1, 66, 189, 210, 8, 152, 1, + 33, 0, 15, 195, 34, 4, 66, 130, 65, 75, 6, 27, 43, 0, 209, 223, 66, 189, 208, 4, 28, 40, 153, 10, 240, 4, 251, 106, + 26, 109, 155, 3, 4, 40, 67, 24, 240, 4, 249, 248, 35, 128, 4, 91, 96, 160, 100, 37, 96, 35, 96, 99, 176, 5, 28, 40, + 188, 240, 188, 2, 71, 8, 0, 0, 181, 240, 176, 139, 28, 5, 247, 255, 255, 133, 28, 6, 32, 0, 46, 0, 209, 0, 224, 145, + 99, 245, 105, 42, 126, 107, 126, 47, 97, 104, 146, 3, 147, 7, 47, 0, 209, 25, 35, 8, 147, 0, 35, 160, 104, 105, 34, + 8, 0, 155, 28, 48, 247, 255, 255, 140, 247, 255, 255, 108, 28, 4, 28, 56, 44, 0, 208, 121, 107, 96, 99, 229, 240, 4, + 249, 198, 154, 3, 96, 48, 99, 180, 42, 0, 208, 4, 79, 58, 224, 3, 28, 52, 39, 128, 224, 0, 79, 56, 104, 235, 154, 7, + 147, 4, 42, 0, 208, 2, 35, 128, 0, 91, 67, 31, 105, 235, 150, 9, 5, 91, 13, 91, 147, 5, 154, 5, 35, 128, 4, 91, 58, + 1, 147, 6, 146, 8, 155, 5, 154, 3, 147, 0, 28, 32, 28, 59, 153, 4, 247, 255, 255, 92, 154, 3, 155, 4, 26, 18, 146, 3, + 154, 7, 24, 27, 147, 4, 42, 0, 208, 1, 155, 6, 96, 99, 154, 8, 155, 5, 24, 128, 66, 3, 209, 2, 34, 128, 6, 18, 24, 191, + 155, 3, 43, 0, 221, 11, 247, 255, 255, 38, 30, 6, 208, 52, 107, 112, 99, 245, 240, 4, 249, 130, 99, 166, 96, 32, 28, + 52, 231, 213, 35, 128, 4, 91, 96, 99, 105, 43, 158, 9, 148, 3, 43, 0, 208, 29, 126, 42, 146, 4, 42, 0, 209, 25, 247, + 255, 255, 14, 28, 4, 32, 0, 44, 0, 208, 27, 107, 96, 99, 229, 240, 4, 249, 104, 155, 3, 34, 128, 96, 24, 99, 156, 35, + 128, 0, 91, 6, 18, 64, 123, 67, 19, 154, 4, 28, 32, 146, 0, 33, 0, 34, 0, 247, 255, 255, 20, 104, 162, 35, 128, 4, 27, + 67, 19, 96, 163, 28, 48, 224, 0, 32, 0, 176, 11, 188, 240, 188, 2, 71, 8, 128, 0, 0, 128, 128, 0, 1, 128, 181, 56, 76, + 19, 37, 32, 104, 35, 104, 155, 120, 25, 120, 90, 6, 9, 4, 18, 67, 10, 120, 153, 120, 219, 2, 9, 67, 10, 67, 19, 224, + 18, 104, 34, 67, 171, 104, 146, 32, 10, 96, 19, 247, 255, 253, 243, 104, 35, 104, 155, 120, 25, 120, 90, 6, 9, 4, 18, + 67, 10, 120, 153, 120, 219, 2, 9, 67, 10, 67, 19, 66, 29, 209, 234, 188, 56, 188, 1, 71, 0, 19, 112, 96, 60, 181, 56, + 76, 19, 37, 32, 104, 35, 104, 155, 120, 25, 120, 90, 6, 9, 4, 18, 67, 10, 120, 153, 120, 219, 2, 9, 67, 10, 67, 19, + 224, 18, 104, 34, 67, 43, 104, 146, 32, 10, 96, 19, 247, 255, 253, 201, 104, 35, 104, 155, 120, 25, 120, 90, 6, 9, 4, + 18, 67, 10, 120, 153, 120, 219, 2, 9, 67, 10, 67, 19, 66, 29, 208, 234, 188, 56, 188, 1, 71, 0, 19, 112, 96, 60, 181, + 248, 28, 12, 40, 0, 209, 33, 77, 28, 76, 29, 79, 29, 38, 0, 104, 43, 104, 155, 126, 25, 126, 90, 6, 9, 4, 18, 67, 10, + 126, 153, 126, 219, 2, 9, 67, 10, 67, 19, 105, 34, 108, 82, 66, 147, 211, 6, 105, 98, 108, 82, 66, 147, 216, 2, 247, + 255, 255, 142, 224, 25, 32, 10, 54, 1, 247, 255, 253, 147, 66, 190, 209, 226, 224, 18, 40, 1, 209, 16, 224, 6, 32, 10, + 54, 1, 247, 255, 253, 137, 66, 190, 209, 3, 224, 8, 77, 6, 79, 8, 38, 0, 104, 43, 104, 155, 105, 154, 108, 99, 66, 154, + 208, 239, 32, 0, 188, 248, 188, 2, 71, 8, 70, 192, 19, 112, 96, 60, 19, 114, 194, 128, 0, 0, 19, 136, 181, 0, 7, 67, + 213, 21, 75, 12, 104, 27, 104, 154, 75, 11, 108, 81, 64, 11, 43, 3, 209, 2, 35, 128, 1, 155, 100, 83, 75, 6, 104, 27, + 104, 154, 75, 6, 108, 145, 64, 11, 43, 3, 209, 2, 35, 128, 1, 155, 100, 147, 188, 1, 71, 0, 70, 192, 19, 112, 96, 60, + 0, 0, 32, 3, 181, 16, 75, 19, 28, 4, 104, 27, 52, 16, 104, 155, 0, 164, 25, 28, 34, 128, 104, 99, 1, 146, 66, 19, 209, + 0, 64, 83, 34, 46, 67, 147, 96, 99, 32, 5, 247, 255, 253, 106, 34, 128, 104, 99, 1, 146, 66, 19, 208, 0, 64, 83, 34, + 46, 67, 147, 96, 99, 32, 5, 247, 255, 253, 94, 75, 4, 32, 5, 96, 99, 247, 255, 253, 89, 188, 16, 188, 1, 71, 0, 19, + 112, 96, 60, 0, 0, 24, 1, 181, 240, 176, 131, 75, 36, 28, 5, 104, 27, 53, 16, 104, 155, 0, 173, 25, 93, 104, 107, 74, + 33, 29, 44, 64, 26, 38, 4, 42, 1, 208, 4, 4, 154, 213, 51, 247, 255, 255, 192, 224, 48, 39, 136, 1, 127, 34, 4, 67, + 147, 67, 59, 96, 35, 32, 60, 247, 255, 253, 40, 104, 35, 74, 24, 32, 50, 64, 19, 96, 35, 247, 255, 253, 33, 75, 22, + 34, 128, 147, 0, 28, 32, 28, 33, 0, 82, 35, 0, 247, 255, 253, 156, 40, 0, 208, 2, 104, 107, 72, 17, 224, 20, 104, 35, + 34, 4, 66, 26, 209, 16, 62, 1, 46, 0, 209, 220, 34, 128, 1, 146, 67, 19, 33, 42, 67, 139, 96, 107, 32, 10, 96, 106, + 247, 255, 253, 2, 72, 8, 224, 1, 32, 1, 66, 64, 176, 3, 188, 240, 188, 2, 71, 8, 19, 112, 96, 60, 0, 0, 32, 1, 255, + 255, 254, 213, 0, 0, 19, 136, 255, 255, 248, 48, 255, 255, 251, 161, 181, 16, 75, 20, 28, 4, 104, 27, 52, 16, 104, 155, + 0, 164, 25, 28, 34, 128, 104, 99, 1, 146, 66, 19, 209, 0, 64, 83, 34, 46, 67, 147, 96, 99, 32, 5, 247, 255, 252, 230, + 34, 128, 104, 99, 1, 146, 66, 19, 208, 0, 64, 83, 34, 46, 67, 147, 96, 99, 32, 5, 247, 255, 252, 218, 75, 5, 32, 60, + 96, 99, 247, 255, 252, 213, 32, 1, 188, 16, 188, 2, 71, 8, 70, 192, 19, 112, 96, 60, 0, 0, 24, 1, 32, 0, 71, 112, 75, + 5, 48, 16, 104, 27, 0, 128, 104, 155, 24, 24, 35, 128, 1, 155, 96, 67, 32, 0, 71, 112, 70, 192, 19, 112, 96, 60, 74, + 5, 32, 0, 104, 19, 104, 153, 35, 128, 1, 155, 100, 75, 104, 18, 104, 146, 100, 147, 71, 112, 70, 192, 19, 112, 96, 60, + 181, 0, 75, 10, 104, 27, 104, 154, 35, 128, 108, 81, 1, 155, 66, 25, 209, 0, 100, 83, 75, 5, 104, 27, 104, 154, 35, + 128, 108, 145, 1, 155, 66, 25, 209, 0, 100, 147, 32, 0, 188, 2, 71, 8, 19, 112, 96, 60, 75, 6, 33, 0, 104, 26, 35, 1, + 66, 91, 28, 16, 103, 17, 103, 147, 48, 152, 50, 160, 96, 1, 96, 19, 71, 112, 70, 192, 19, 112, 96, 60, 75, 6, 120, 27, + 30, 90, 65, 147, 74, 5, 0, 152, 96, 19, 74, 5, 24, 195, 0, 219, 104, 16, 51, 88, 24, 192, 71, 112, 19, 112, 1, 12, 19, + 112, 106, 48, 19, 112, 96, 60, 181, 16, 73, 19, 120, 9, 30, 72, 65, 129, 72, 18, 0, 140, 96, 1, 72, 17, 24, 97, 104, + 0, 0, 201, 24, 64, 111, 4, 33, 0, 44, 0, 208, 16, 128, 25, 128, 89, 28, 1, 49, 96, 136, 8, 4, 0, 10, 4, 14, 0, 67, 32, + 128, 152, 136, 73, 4, 9, 10, 8, 14, 9, 67, 1, 128, 217, 33, 1, 32, 0, 112, 17, 188, 16, 188, 2, 71, 8, 70, 192, 19, + 112, 1, 12, 19, 112, 106, 48, 19, 112, 96, 60, 181, 0, 28, 3, 224, 8, 120, 90, 58, 4, 6, 18, 14, 18, 42, 1, 217, 4, + 120, 26, 26, 137, 24, 155, 41, 0, 209, 244, 26, 24, 188, 2, 71, 8, 181, 240, 176, 133, 124, 130, 124, 195, 6, 18, 4, + 27, 67, 19, 125, 2, 28, 5, 2, 18, 67, 19, 125, 66, 67, 26, 208, 103, 34, 0, 146, 3, 146, 1, 224, 83, 6, 36, 4, 9, 2, + 18, 67, 12, 67, 20, 158, 3, 67, 35, 25, 156, 122, 98, 122, 163, 6, 18, 4, 27, 67, 19, 122, 226, 2, 18, 67, 19, 123, + 34, 67, 26, 208, 58, 39, 0, 151, 2, 28, 46, 224, 36, 6, 0, 4, 9, 2, 18, 67, 8, 67, 16, 67, 3, 25, 221, 123, 170, 123, + 235, 6, 18, 4, 27, 67, 19, 124, 42, 124, 104, 2, 18, 67, 19, 67, 24, 208, 1, 240, 2, 255, 158, 122, 106, 122, 171, 6, + 18, 4, 27, 67, 19, 122, 234, 123, 40, 2, 18, 67, 19, 67, 24, 208, 1, 240, 2, 255, 145, 154, 2, 55, 18, 50, 1, 146, 2, + 121, 35, 157, 2, 70, 156, 122, 96, 122, 161, 122, 226, 123, 35, 69, 101, 219, 209, 28, 53, 6, 6, 4, 8, 67, 48, 2, 18, + 67, 16, 67, 24, 240, 2, 255, 123, 158, 1, 154, 3, 54, 1, 50, 13, 150, 1, 146, 3, 124, 104, 158, 1, 124, 172, 124, 233, + 125, 42, 125, 107, 66, 134, 219, 163, 6, 36, 4, 8, 67, 32, 2, 18, 67, 16, 67, 24, 240, 2, 255, 101, 176, 5, 188, 240, + 188, 1, 71, 0, 0, 0, 181, 248, 30, 5, 209, 4, 75, 28, 34, 48, 112, 26, 112, 93, 224, 47, 76, 26, 28, 46, 28, 48, 33, + 10, 240, 4, 248, 40, 28, 48, 28, 15, 33, 10, 240, 4, 248, 31, 23, 251, 24, 255, 64, 95, 55, 48, 75, 20, 112, 39, 60, + 1, 28, 6, 66, 156, 209, 236, 75, 15, 34, 0, 118, 154, 45, 0, 218, 2, 34, 45, 112, 26, 34, 1, 35, 16, 72, 10, 224, 0, + 51, 1, 92, 193, 41, 48, 208, 251, 66, 72, 65, 65, 26, 91, 73, 6, 224, 2, 84, 136, 51, 1, 50, 1, 92, 200, 40, 0, 209, + 249, 84, 136, 188, 248, 188, 1, 71, 0, 70, 192, 19, 114, 196, 64, 19, 114, 196, 89, 19, 114, 196, 79, 181, 248, 30, + 4, 209, 4, 75, 24, 34, 48, 112, 26, 112, 92, 224, 40, 77, 22, 28, 47, 63, 10, 28, 32, 33, 10, 240, 3, 255, 191, 28, + 32, 28, 14, 33, 10, 240, 3, 255, 198, 54, 48, 112, 46, 61, 1, 28, 4, 66, 189, 209, 240, 74, 12, 35, 0, 118, 147, 28, + 17, 35, 16, 224, 0, 51, 1, 92, 202, 42, 48, 208, 251, 66, 81, 65, 74, 26, 155, 73, 6, 34, 0, 224, 2, 84, 136, 51, 1, + 50, 1, 92, 200, 40, 0, 209, 249, 84, 136, 188, 248, 188, 1, 71, 0, 19, 114, 196, 64, 19, 114, 196, 89, 181, 16, 40, + 0, 209, 4, 75, 24, 34, 48, 112, 26, 112, 88, 224, 40, 75, 22, 33, 15, 28, 28, 60, 8, 28, 10, 64, 2, 9, 0, 42, 9, 221, + 0, 50, 7, 50, 48, 112, 26, 59, 1, 66, 163, 209, 244, 74, 14, 35, 0, 118, 19, 35, 48, 112, 19, 35, 120, 112, 83, 35, + 16, 224, 0, 51, 1, 92, 209, 41, 48, 208, 251, 66, 74, 65, 74, 26, 155, 73, 6, 34, 2, 224, 2, 84, 136, 51, 1, 50, 1, + 92, 200, 40, 0, 209, 249, 84, 136, 188, 16, 188, 1, 71, 0, 19, 114, 196, 64, 19, 114, 196, 87, 180, 15, 181, 240, 176, + 133, 171, 10, 203, 64, 34, 128, 1, 146, 169, 3, 128, 10, 147, 2, 36, 0, 77, 46, 79, 46, 224, 81, 28, 114, 146, 1, 43, + 37, 208, 12, 70, 106, 115, 19, 168, 3, 240, 3, 254, 209, 25, 4, 158, 1, 66, 172, 220, 68, 168, 3, 240, 3, 255, 134, + 224, 64, 120, 115, 43, 115, 208, 46, 43, 115, 216, 4, 43, 100, 208, 7, 43, 105, 209, 53, 224, 4, 43, 117, 208, 9, 43, + 120, 209, 48, 224, 20, 155, 2, 29, 26, 146, 2, 104, 24, 247, 255, 255, 26, 224, 19, 155, 2, 29, 26, 146, 2, 104, 24, + 247, 255, 255, 85, 28, 56, 240, 3, 254, 170, 25, 4, 28, 56, 66, 172, 220, 27, 224, 24, 155, 2, 29, 26, 146, 2, 104, + 24, 247, 255, 255, 127, 72, 16, 240, 3, 254, 156, 25, 4, 66, 172, 220, 14, 72, 13, 224, 10, 155, 2, 29, 26, 146, 2, + 104, 30, 28, 48, 240, 3, 254, 144, 25, 4, 66, 172, 220, 2, 28, 48, 240, 3, 255, 70, 158, 1, 54, 1, 120, 51, 43, 0, 209, + 170, 176, 5, 188, 240, 188, 8, 176, 4, 71, 24, 0, 0, 13, 171, 19, 114, 196, 64, 181, 240, 28, 12, 176, 133, 28, 6, 33, + 0, 32, 0, 247, 255, 252, 176, 126, 35, 43, 0, 209, 6, 74, 218, 33, 8, 96, 19, 104, 32, 240, 2, 253, 233, 96, 96, 105, + 33, 41, 0, 208, 9, 126, 99, 104, 160, 43, 0, 208, 2, 240, 2, 253, 223, 224, 1, 240, 2, 253, 228, 96, 224, 126, 35, 43, + 0, 209, 3, 75, 207, 104, 27, 105, 219, 224, 6, 126, 99, 43, 0, 208, 1, 75, 205, 224, 0, 75, 205, 104, 27, 147, 2, 77, + 204, 75, 205, 153, 2, 28, 40, 96, 25, 34, 96, 240, 2, 255, 12, 33, 0, 34, 48, 152, 2, 240, 3, 253, 237, 75, 195, 34, + 0, 104, 27, 28, 32, 100, 26, 75, 197, 34, 1, 104, 25, 64, 74, 96, 26, 247, 255, 251, 121, 75, 195, 100, 168, 96, 24, + 126, 34, 35, 15, 146, 1, 64, 26, 146, 3, 155, 3, 28, 7, 34, 128, 105, 176, 2, 29, 1, 146, 155, 1, 67, 2, 105, 225, 67, + 42, 43, 0, 209, 1, 72, 186, 224, 5, 5, 72, 35, 128, 9, 64, 5, 219, 67, 3, 28, 24, 67, 16, 240, 3, 253, 70, 77, 176, + 35, 64, 96, 171, 75, 180, 33, 255, 104, 27, 34, 255, 108, 91, 2, 9, 4, 18, 64, 25, 64, 26, 2, 9, 10, 18, 67, 10, 14, + 25, 67, 10, 33, 224, 64, 11, 33, 2, 67, 11, 6, 27, 67, 26, 96, 104, 96, 42, 107, 120, 240, 3, 253, 42, 35, 128, 153, + 1, 4, 91, 97, 40, 97, 107, 41, 0, 208, 16, 9, 203, 153, 3, 106, 114, 1, 27, 24, 91, 64, 218, 28, 19, 7, 218, 213, 3, + 105, 170, 35, 128, 67, 19, 224, 2, 105, 171, 34, 128, 67, 147, 97, 171, 77, 150, 75, 156, 105, 170, 28, 40, 64, 19, + 97, 171, 33, 96, 240, 2, 253, 103, 108, 173, 224, 4, 28, 40, 33, 96, 240, 2, 253, 97, 107, 173, 45, 0, 209, 248, 152, + 2, 73, 141, 34, 96, 240, 2, 254, 132, 75, 146, 120, 27, 43, 0, 208, 4, 75, 145, 72, 145, 104, 25, 247, 255, 254, 218, + 75, 144, 34, 1, 96, 26, 77, 130, 35, 0, 147, 1, 153, 1, 74, 139, 49, 1, 145, 1, 72, 140, 104, 17, 247, 254, 255, 192, + 104, 43, 33, 32, 105, 152, 240, 2, 253, 81, 104, 42, 73, 124, 39, 2, 108, 75, 105, 145, 34, 255, 2, 18, 64, 26, 2, 16, + 34, 255, 4, 18, 64, 26, 10, 18, 67, 2, 14, 24, 67, 2, 32, 224, 64, 3, 67, 59, 6, 24, 28, 19, 67, 3, 96, 11, 104, 43, + 33, 32, 105, 152, 240, 2, 253, 33, 247, 255, 251, 163, 247, 254, 255, 201, 154, 1, 42, 4, 208, 6, 28, 3, 51, 9, 209, + 3, 72, 118, 247, 255, 254, 158, 231, 200, 75, 114, 34, 0, 96, 26, 75, 109, 28, 7, 120, 27, 43, 0, 208, 3, 72, 113, 28, + 57, 247, 255, 254, 145, 47, 0, 209, 3, 75, 93, 104, 27, 43, 0, 208, 15, 75, 92, 104, 27, 104, 154, 75, 107, 50, 68, + 104, 27, 0, 155, 24, 211, 104, 27, 34, 5, 64, 19, 43, 5, 208, 2, 75, 84, 34, 1, 96, 26, 66, 121, 65, 121, 145, 1, 29, + 122, 208, 1, 41, 0, 208, 65, 247, 255, 251, 66, 77, 79, 33, 32, 104, 43, 105, 152, 240, 3, 254, 56, 104, 43, 33, 32, + 105, 152, 240, 2, 252, 203, 75, 82, 104, 42, 104, 27, 105, 145, 108, 91, 34, 255, 2, 18, 64, 26, 2, 16, 34, 255, 4, + 18, 64, 26, 10, 18, 67, 2, 14, 24, 67, 2, 32, 224, 64, 3, 32, 2, 67, 3, 6, 24, 28, 19, 67, 3, 96, 11, 104, 43, 33, 32, + 105, 152, 240, 3, 253, 246, 247, 255, 251, 66, 126, 34, 42, 0, 208, 98, 9, 211, 32, 15, 64, 16, 1, 27, 24, 27, 106, + 113, 34, 1, 64, 154, 67, 145, 28, 10, 73, 70, 104, 9, 6, 9, 15, 201, 64, 153, 28, 11, 67, 19, 98, 115, 224, 79, 247, + 255, 251, 0, 75, 49, 108, 157, 224, 4, 107, 104, 33, 96, 240, 2, 252, 179, 107, 173, 45, 0, 209, 248, 77, 44, 34, 32, + 28, 40, 153, 2, 240, 2, 253, 206, 126, 34, 42, 0, 208, 16, 9, 211, 32, 15, 64, 16, 1, 27, 24, 27, 106, 113, 34, 1, 64, + 154, 67, 145, 28, 10, 105, 169, 6, 9, 15, 201, 64, 153, 28, 11, 67, 19, 98, 115, 77, 28, 33, 32, 104, 43, 38, 2, 105, + 152, 240, 3, 253, 209, 104, 43, 33, 32, 105, 152, 240, 2, 252, 100, 75, 30, 104, 42, 104, 27, 105, 145, 108, 91, 34, + 255, 2, 18, 64, 26, 2, 16, 34, 255, 4, 18, 64, 26, 10, 18, 67, 2, 14, 24, 67, 2, 32, 224, 64, 3, 67, 51, 6, 24, 28, + 19, 67, 3, 96, 11, 104, 43, 33, 32, 105, 152, 240, 3, 253, 144, 247, 255, 250, 220, 73, 10, 32, 1, 247, 255, 251, 2, + 105, 33, 41, 0, 208, 48, 126, 99, 104, 224, 43, 0, 208, 42, 240, 2, 252, 83, 224, 41, 19, 112, 106, 52, 19, 112, 96, + 60, 19, 112, 105, 212, 19, 112, 106, 40, 19, 114, 195, 224, 19, 112, 105, 220, 19, 112, 106, 32, 19, 112, 105, 244, + 64, 64, 64, 0, 19, 112, 106, 36, 1, 0, 0, 128, 19, 112, 105, 216, 19, 112, 96, 56, 19, 112, 96, 194, 19, 112, 105, 240, + 19, 112, 41, 41, 19, 112, 96, 240, 19, 112, 96, 247, 19, 112, 106, 48, 19, 112, 105, 228, 240, 2, 252, 46, 126, 35, + 43, 0, 209, 3, 104, 96, 33, 8, 240, 2, 252, 33, 155, 1, 43, 0, 208, 0, 105, 103, 176, 5, 28, 56, 188, 240, 188, 2, 71, + 8, 181, 48, 176, 137, 70, 108, 118, 33, 9, 201, 118, 97, 33, 128, 0, 137, 37, 0, 145, 7, 70, 105, 149, 0, 146, 4, 147, + 2, 247, 255, 253, 246, 176, 9, 188, 48, 188, 2, 71, 8, 181, 240, 176, 139, 28, 6, 70, 104, 48, 70, 136, 4, 72, 43, 70, + 156, 104, 0, 70, 107, 51, 66, 48, 248, 104, 0, 136, 27, 112, 66, 4, 27, 70, 98, 147, 1, 2, 19, 10, 18, 67, 19, 4, 26, + 12, 19, 14, 18, 112, 1, 159, 18, 112, 130, 112, 195, 155, 1, 4, 36, 10, 26, 14, 27, 67, 19, 4, 27, 12, 37, 12, 26, 14, + 27, 113, 3, 14, 36, 2, 43, 67, 35, 4, 27, 113, 66, 14, 26, 12, 27, 113, 195, 172, 2, 35, 0, 113, 130, 118, 35, 35, 64, + 97, 227, 75, 21, 9, 201, 144, 2, 118, 97, 97, 37, 66, 159, 217, 22, 28, 40, 240, 2, 251, 216, 28, 42, 28, 57, 96, 160, + 240, 3, 251, 149, 28, 33, 28, 48, 247, 255, 253, 171, 104, 164, 28, 6, 28, 33, 28, 56, 28, 42, 240, 3, 251, 138, 28, + 32, 240, 2, 251, 227, 224, 5, 28, 48, 96, 167, 28, 33, 247, 255, 253, 155, 28, 6, 176, 11, 28, 48, 188, 240, 188, 2, + 71, 8, 70, 192, 19, 112, 96, 60, 19, 136, 0, 0, 181, 0, 176, 133, 145, 0, 35, 0, 33, 2, 34, 1, 147, 1, 147, 2, 247, + 255, 255, 148, 176, 5, 188, 2, 71, 8, 181, 0, 176, 133, 28, 19, 34, 0, 145, 0, 146, 1, 146, 2, 33, 1, 34, 11, 247, 255, + 255, 134, 176, 5, 188, 2, 71, 8, 181, 0, 176, 133, 34, 0, 146, 0, 146, 1, 146, 2, 28, 11, 34, 9, 33, 0, 247, 255, 255, + 120, 176, 5, 188, 2, 71, 8, 181, 112, 28, 4, 176, 132, 32, 1, 28, 14, 240, 2, 251, 132, 30, 5, 208, 18, 35, 0, 147, + 0, 35, 1, 147, 1, 28, 32, 33, 128, 34, 8, 35, 0, 149, 2, 247, 255, 255, 97, 30, 4, 219, 1, 120, 43, 112, 51, 28, 40, + 240, 2, 251, 142, 224, 1, 36, 4, 66, 100, 176, 4, 28, 32, 188, 112, 188, 2, 71, 8, 181, 16, 176, 132, 70, 108, 2, 18, + 52, 27, 120, 36, 67, 19, 34, 0, 146, 0, 145, 2, 34, 6, 33, 128, 148, 1, 247, 255, 255, 67, 176, 4, 188, 16, 188, 2, + 71, 8, 181, 240, 176, 141, 144, 11, 32, 22, 28, 13, 240, 2, 251, 78, 30, 7, 209, 0, 225, 137, 35, 18, 147, 0, 152, 11, + 28, 57, 34, 1, 35, 0, 247, 255, 255, 219, 30, 4, 218, 0, 225, 108, 28, 57, 34, 18, 28, 40, 240, 3, 250, 253, 28, 56, + 240, 2, 251, 86, 120, 170, 120, 235, 2, 18, 67, 26, 4, 18, 10, 19, 14, 18, 67, 19, 4, 27, 12, 26, 112, 234, 14, 27, + 122, 42, 112, 171, 122, 107, 2, 18, 67, 26, 4, 18, 10, 19, 14, 18, 67, 19, 4, 27, 12, 26, 114, 106, 14, 27, 122, 170, + 114, 43, 122, 235, 2, 18, 67, 26, 4, 18, 10, 19, 14, 18, 67, 19, 4, 27, 12, 26, 114, 234, 14, 27, 123, 42, 114, 171, + 123, 107, 2, 18, 67, 26, 4, 18, 10, 19, 14, 18, 67, 19, 4, 27, 12, 26, 14, 27, 115, 43, 124, 107, 115, 106, 0, 88, 24, + 192, 0, 128, 24, 192, 240, 2, 250, 253, 14, 3, 116, 171, 12, 3, 116, 235, 10, 3, 117, 43, 117, 104, 40, 0, 209, 0, 225, + 45, 124, 107, 33, 0, 0, 90, 24, 210, 0, 146, 24, 210, 240, 3, 250, 239, 33, 0, 145, 10, 145, 5, 28, 46, 225, 6, 32, + 9, 240, 2, 250, 227, 30, 4, 209, 0, 225, 29, 154, 5, 28, 33, 6, 19, 14, 27, 147, 3, 35, 9, 147, 0, 34, 2, 155, 3, 152, + 11, 247, 255, 255, 108, 124, 179, 124, 245, 6, 27, 4, 45, 67, 29, 125, 51, 28, 33, 2, 27, 67, 29, 125, 115, 34, 9, 67, + 29, 155, 10, 24, 237, 28, 40, 240, 3, 250, 133, 28, 32, 240, 2, 250, 222, 120, 170, 120, 235, 2, 18, 67, 26, 4, 18, + 10, 19, 14, 18, 67, 19, 4, 27, 12, 28, 14, 27, 112, 171, 112, 236, 28, 32, 240, 2, 250, 176, 30, 7, 209, 0, 224, 234, + 120, 235, 152, 11, 147, 0, 28, 57, 34, 2, 155, 3, 247, 255, 255, 61, 40, 0, 218, 0, 224, 204, 120, 41, 145, 2, 121, + 43, 0, 216, 24, 192, 0, 64, 240, 2, 250, 154, 14, 3, 114, 107, 12, 3, 114, 171, 10, 3, 114, 235, 115, 40, 40, 0, 209, + 0, 224, 201, 155, 2, 154, 2, 26, 228, 25, 210, 146, 3, 148, 4, 121, 43, 33, 0, 0, 218, 24, 210, 0, 82, 240, 3, 250, + 135, 33, 0, 145, 9, 145, 7, 224, 144, 122, 107, 122, 172, 6, 27, 4, 36, 67, 28, 122, 235, 154, 9, 2, 27, 67, 28, 123, + 43, 153, 3, 67, 28, 24, 164, 28, 32, 34, 9, 240, 3, 250, 48, 120, 35, 147, 2, 121, 35, 0, 216, 26, 192, 240, 2, 250, + 103, 14, 3, 115, 163, 12, 3, 115, 227, 10, 3, 116, 35, 116, 96, 40, 0, 209, 0, 224, 150, 153, 3, 155, 4, 28, 10, 153, + 2, 24, 82, 153, 2, 146, 3, 26, 91, 147, 4, 121, 35, 33, 0, 0, 218, 26, 210, 240, 3, 250, 82, 152, 3, 153, 4, 247, 255, + 250, 124, 35, 11, 144, 2, 70, 106, 92, 154, 115, 98, 155, 2, 43, 0, 208, 25, 28, 24, 240, 2, 250, 63, 14, 3, 114, 99, + 12, 3, 114, 163, 10, 3, 114, 227, 115, 32, 40, 0, 209, 0, 224, 110, 153, 3, 154, 2, 240, 3, 249, 243, 153, 3, 155, 4, + 28, 10, 153, 2, 24, 82, 153, 2, 146, 3, 26, 91, 147, 4, 34, 0, 146, 6, 146, 8, 224, 43, 123, 162, 123, 227, 6, 18, 4, + 27, 67, 19, 124, 34, 153, 6, 2, 18, 67, 19, 124, 98, 67, 19, 24, 201, 145, 2, 28, 8, 34, 7, 153, 3, 240, 3, 249, 212, + 154, 2, 153, 3, 120, 19, 24, 201, 145, 3, 153, 2, 121, 18, 121, 75, 2, 18, 67, 26, 4, 18, 10, 17, 14, 19, 67, 11, 4, + 27, 153, 2, 12, 26, 14, 27, 113, 11, 113, 74, 154, 8, 155, 6, 50, 1, 51, 7, 146, 8, 147, 6, 121, 35, 153, 8, 66, 153, + 211, 207, 154, 7, 155, 9, 50, 1, 51, 18, 146, 7, 147, 9, 121, 43, 153, 7, 66, 153, 210, 0, 231, 105, 28, 56, 240, 2, + 250, 4, 154, 5, 155, 10, 50, 1, 51, 13, 146, 5, 147, 10, 39, 0, 124, 115, 153, 5, 66, 153, 210, 0, 230, 243, 28, 53, + 36, 0, 47, 0, 209, 2, 224, 9, 28, 4, 28, 53, 28, 56, 240, 2, 249, 238, 44, 0, 208, 2, 28, 40, 247, 255, 250, 14, 176, + 13, 28, 32, 188, 240, 188, 2, 71, 8, 28, 53, 36, 4, 66, 100, 231, 238, 28, 53, 36, 4, 66, 100, 231, 239, 181, 240, 176, + 137, 75, 65, 28, 2, 104, 30, 0, 129, 104, 179, 24, 9, 50, 16, 0, 201, 0, 146, 24, 154, 28, 11, 51, 88, 28, 7, 24, 240, + 144, 5, 24, 113, 32, 0, 103, 8, 104, 81, 29, 21, 74, 56, 64, 10, 42, 1, 209, 99, 34, 4, 146, 4, 147, 7, 75, 54, 32, + 10, 96, 43, 247, 254, 254, 6, 75, 52, 32, 100, 96, 43, 247, 254, 254, 1, 75, 51, 34, 128, 96, 43, 35, 250, 0, 219, 147, + 0, 0, 82, 35, 0, 28, 40, 28, 41, 247, 254, 254, 121, 104, 42, 75, 45, 28, 4, 64, 19, 43, 5, 209, 50, 35, 192, 1, 27, + 64, 26, 35, 128, 0, 219, 66, 154, 208, 43, 40, 0, 209, 43, 32, 100, 247, 254, 253, 227, 75, 38, 74, 38, 104, 24, 96, + 26, 154, 7, 35, 22, 147, 1, 24, 179, 147, 2, 35, 128, 144, 6, 33, 128, 152, 5, 34, 6, 0, 91, 148, 0, 247, 255, 253, + 81, 30, 4, 219, 12, 28, 123, 32, 0, 4, 27, 144, 0, 144, 1, 144, 2, 12, 27, 152, 5, 33, 0, 34, 5, 247, 255, 253, 67, + 28, 4, 75, 21, 154, 6, 96, 26, 44, 0, 219, 2, 224, 8, 36, 1, 66, 100, 155, 4, 59, 1, 147, 4, 43, 0, 209, 169, 44, 0, + 219, 10, 0, 187, 25, 219, 0, 219, 24, 246, 55, 1, 35, 0, 103, 243, 103, 55, 224, 1, 36, 1, 66, 100, 176, 9, 28, 32, + 188, 240, 188, 2, 71, 8, 70, 192, 19, 112, 96, 60, 0, 0, 32, 1, 0, 0, 24, 3, 0, 0, 25, 3, 0, 0, 16, 1, 0, 0, 32, 5, + 19, 112, 96, 56, 0, 6, 26, 128, 181, 248, 76, 25, 28, 6, 104, 35, 104, 157, 35, 1, 96, 171, 247, 255, 255, 97, 30, 7, + 218, 24, 104, 35, 33, 55, 104, 155, 28, 52, 104, 90, 32, 10, 64, 10, 96, 90, 52, 16, 247, 254, 253, 124, 0, 164, 75, + 15, 25, 44, 96, 99, 32, 50, 247, 254, 253, 117, 75, 13, 32, 100, 96, 99, 247, 254, 253, 112, 75, 11, 96, 99, 75, 7, + 32, 55, 104, 26, 104, 146, 104, 81, 64, 1, 96, 81, 104, 27, 34, 4, 104, 155, 28, 56, 96, 154, 188, 248, 188, 2, 71, + 8, 70, 192, 19, 112, 96, 60, 0, 0, 24, 3, 0, 0, 25, 3, 0, 0, 16, 1, 181, 240, 176, 137, 75, 126, 34, 0, 104, 31, 0, + 131, 24, 27, 0, 219, 28, 30, 147, 5, 54, 88, 24, 251, 28, 4, 25, 190, 103, 26, 32, 50, 247, 254, 253, 68, 37, 3, 150, + 6, 72, 118, 247, 255, 250, 69, 32, 50, 247, 254, 253, 60, 35, 22, 147, 1, 155, 6, 34, 0, 147, 2, 35, 128, 146, 0, 28, + 48, 33, 128, 34, 6, 0, 91, 247, 255, 252, 175, 40, 0, 218, 12, 72, 109, 247, 255, 250, 48, 32, 50, 247, 254, 253, 39, + 61, 1, 32, 100, 247, 254, 253, 35, 45, 0, 209, 222, 224, 2, 154, 5, 24, 187, 224, 38, 28, 32, 247, 254, 255, 212, 75, + 100, 66, 152, 209, 0, 224, 184, 32, 100, 247, 254, 253, 19, 72, 98, 247, 255, 250, 22, 35, 22, 147, 1, 155, 6, 34, 0, + 147, 2, 35, 128, 146, 0, 28, 48, 33, 128, 34, 6, 0, 91, 247, 255, 252, 131, 40, 0, 218, 6, 72, 90, 53, 1, 247, 255, + 250, 3, 45, 3, 209, 221, 224, 12, 0, 163, 25, 27, 0, 219, 24, 251, 110, 26, 75, 85, 66, 154, 209, 46, 28, 32, 247, 255, + 248, 49, 76, 83, 224, 144, 28, 32, 247, 254, 255, 120, 32, 100, 247, 254, 252, 231, 28, 32, 247, 254, 255, 158, 74, + 73, 66, 144, 209, 0, 224, 130, 32, 100, 247, 254, 252, 221, 72, 75, 247, 255, 249, 224, 35, 0, 154, 6, 147, 0, 35, 22, + 147, 1, 35, 128, 146, 2, 28, 48, 33, 128, 34, 6, 0, 91, 247, 255, 252, 77, 40, 0, 218, 7, 72, 63, 61, 1, 247, 255, 249, + 205, 45, 0, 209, 215, 76, 64, 224, 102, 72, 64, 247, 255, 249, 198, 28, 99, 147, 5, 4, 27, 12, 27, 147, 7, 0, 163, 25, + 28, 0, 228, 37, 0, 25, 63, 32, 50, 247, 254, 252, 179, 72, 57, 28, 41, 247, 255, 249, 181, 35, 0, 147, 0, 147, 1, 147, + 2, 28, 48, 33, 0, 34, 5, 155, 7, 247, 255, 252, 37, 30, 4, 218, 7, 76, 50, 28, 41, 72, 50, 27, 100, 247, 255, 249, 163, + 53, 1, 224, 3, 72, 48, 28, 41, 247, 255, 249, 157, 155, 5, 34, 0, 103, 250, 103, 59, 44, 0, 218, 47, 33, 0, 28, 48, + 247, 255, 252, 111, 32, 50, 247, 254, 252, 138, 72, 40, 247, 255, 249, 141, 35, 22, 147, 1, 155, 6, 34, 0, 147, 2, 35, + 128, 146, 0, 28, 48, 33, 128, 34, 6, 0, 91, 247, 255, 251, 250, 30, 4, 218, 6, 72, 32, 247, 255, 249, 123, 34, 0, 103, + 58, 76, 31, 224, 2, 72, 31, 247, 255, 249, 116, 53, 1, 44, 0, 218, 7, 15, 233, 34, 0, 35, 4, 66, 171, 65, 74, 6, 18, + 42, 0, 209, 172, 44, 0, 219, 4, 72, 24, 247, 255, 249, 100, 224, 0, 76, 6, 176, 9, 28, 32, 188, 240, 188, 2, 71, 8, + 70, 192, 19, 112, 96, 60, 19, 112, 97, 82, 19, 112, 97, 7, 255, 255, 251, 161, 19, 112, 97, 37, 19, 112, 97, 76, 149, + 11, 32, 119, 255, 255, 251, 160, 19, 112, 97, 113, 255, 255, 247, 103, 19, 112, 97, 162, 19, 112, 97, 188, 255, 255, + 224, 192, 19, 112, 97, 219, 19, 112, 97, 250, 19, 112, 98, 62, 19, 112, 98, 21, 255, 255, 247, 62, 19, 112, 98, 59, + 19, 112, 98, 94, 181, 16, 75, 10, 34, 1, 104, 27, 28, 4, 104, 155, 96, 154, 247, 254, 254, 223, 40, 0, 219, 2, 28, 32, + 247, 255, 254, 202, 75, 3, 34, 4, 104, 27, 104, 155, 96, 154, 188, 16, 188, 2, 71, 8, 19, 112, 96, 60, 181, 248, 28, + 4, 38, 3, 39, 64, 224, 79, 104, 160, 240, 2, 255, 44, 10, 3, 64, 51, 28, 5, 43, 2, 208, 7, 107, 227, 108, 34, 105, 89, + 24, 138, 0, 65, 12, 73, 26, 82, 97, 90, 108, 35, 43, 0, 208, 59, 66, 47, 208, 57, 75, 36, 120, 27, 43, 0, 208, 2, 72, + 35, 247, 255, 248, 251, 6, 235, 213, 6, 75, 32, 120, 27, 43, 0, 208, 2, 72, 32, 247, 255, 248, 242, 7, 107, 213, 6, + 75, 27, 120, 27, 43, 0, 208, 2, 72, 28, 247, 255, 248, 233, 6, 171, 213, 6, 75, 23, 120, 27, 43, 0, 208, 2, 72, 25, + 247, 255, 248, 224, 7, 43, 213, 6, 75, 18, 120, 27, 43, 0, 208, 2, 72, 21, 247, 255, 248, 215, 75, 15, 120, 27, 43, + 0, 208, 2, 72, 19, 247, 255, 248, 208, 75, 11, 120, 27, 43, 0, 208, 8, 72, 16, 247, 255, 248, 201, 224, 4, 107, 164, + 44, 0, 209, 173, 32, 0, 224, 3, 107, 227, 32, 1, 66, 64, 97, 88, 75, 11, 34, 0, 104, 27, 100, 26, 188, 248, 188, 2, + 71, 8, 19, 112, 105, 216, 19, 112, 98, 103, 19, 112, 98, 116, 19, 112, 98, 124, 19, 112, 98, 145, 19, 112, 98, 164, + 19, 112, 98, 175, 19, 112, 104, 90, 19, 112, 96, 60, 181, 240, 176, 131, 28, 5, 35, 9, 7, 193, 213, 60, 75, 58, 120, + 27, 43, 0, 208, 2, 72, 57, 247, 255, 248, 153, 75, 57, 104, 28, 44, 0, 208, 9, 107, 96, 33, 96, 240, 3, 248, 85, 107, + 96, 33, 96, 240, 1, 254, 241, 107, 164, 231, 243, 76, 51, 104, 35, 43, 0, 208, 24, 108, 88, 33, 32, 240, 3, 248, 71, + 104, 35, 33, 32, 108, 88, 240, 1, 254, 226, 104, 35, 34, 128, 4, 82, 97, 26, 74, 43, 108, 88, 104, 18, 33, 32, 107, + 82, 97, 90, 240, 3, 248, 38, 104, 35, 105, 154, 75, 39, 96, 26, 75, 35, 104, 24, 247, 255, 255, 78, 35, 0, 40, 0, 208, + 4, 74, 36, 104, 18, 100, 19, 35, 5, 66, 91, 7, 106, 213, 40, 75, 26, 120, 27, 43, 0, 208, 2, 72, 31, 247, 255, 248, + 89, 33, 128, 1, 137, 79, 28, 78, 29, 35, 1, 34, 0, 145, 1, 104, 56, 104, 49, 104, 128, 0, 148, 48, 68, 25, 0, 70, 140, + 104, 4, 69, 98, 209, 7, 32, 1, 66, 32, 209, 10, 75, 22, 96, 24, 35, 1, 66, 91, 224, 5, 73, 20, 64, 12, 44, 3, 209, 1, + 153, 1, 96, 1, 50, 1, 42, 4, 209, 228, 43, 0, 208, 4, 34, 18, 66, 42, 208, 1, 35, 6, 66, 91, 176, 3, 28, 24, 188, 240, + 188, 2, 71, 8, 70, 192, 19, 112, 105, 216, 19, 112, 98, 192, 19, 112, 105, 244, 19, 112, 105, 220, 19, 112, 105, 232, + 19, 112, 105, 228, 19, 112, 96, 60, 19, 112, 98, 225, 19, 112, 106, 48, 19, 112, 106, 52, 0, 0, 32, 3, 181, 240, 176, + 131, 147, 1, 70, 107, 51, 39, 120, 30, 28, 5, 30, 115, 6, 27, 14, 27, 145, 0, 28, 23, 43, 15, 216, 61, 28, 4, 52, 160, + 104, 32, 40, 0, 208, 56, 33, 0, 34, 31, 240, 2, 254, 145, 104, 35, 74, 29, 96, 26, 28, 43, 51, 152, 104, 24, 240, 2, + 254, 13, 104, 35, 96, 88, 28, 56, 240, 2, 254, 8, 104, 35, 70, 105, 96, 152, 29, 202, 120, 17, 104, 35, 70, 106, 115, + 25, 28, 209, 104, 35, 120, 10, 115, 90, 104, 34, 35, 6, 46, 6, 217, 0, 35, 10, 28, 44, 115, 147, 52, 160, 104, 32, 153, + 8, 28, 50, 48, 15, 240, 2, 254, 40, 28, 43, 51, 144, 104, 24, 123, 105, 104, 35, 34, 31, 247, 255, 250, 52, 40, 31, + 208, 6, 40, 0, 219, 5, 72, 5, 224, 3, 32, 3, 66, 64, 224, 0, 32, 0, 176, 3, 188, 240, 188, 2, 71, 8, 85, 83, 66, 67, + 255, 255, 216, 238, 181, 240, 28, 4, 176, 131, 52, 160, 28, 5, 145, 0, 28, 23, 33, 255, 34, 13, 104, 32, 240, 2, 254, + 68, 28, 43, 51, 144, 104, 24, 123, 41, 104, 35, 34, 13, 247, 255, 250, 14, 40, 13, 208, 1, 40, 0, 218, 40, 40, 0, 219, + 43, 28, 43, 51, 160, 104, 28, 104, 32, 240, 2, 253, 180, 144, 1, 104, 96, 240, 2, 253, 176, 28, 6, 104, 160, 240, 2, + 253, 172, 74, 16, 153, 1, 123, 35, 66, 145, 209, 21, 47, 0, 208, 0, 96, 56, 154, 0, 42, 0, 208, 0, 112, 19, 53, 152, + 104, 43, 66, 158, 209, 12, 28, 179, 4, 27, 12, 54, 12, 27, 4, 54, 67, 30, 96, 46, 32, 0, 224, 4, 72, 5, 224, 2, 72, + 5, 224, 0, 72, 5, 176, 3, 188, 240, 188, 2, 71, 8, 83, 66, 83, 85, 255, 255, 216, 237, 255, 255, 216, 236, 255, 255, + 216, 235, 181, 240, 176, 135, 74, 75, 75, 76, 120, 18, 28, 6, 104, 31, 42, 0, 208, 1, 73, 74, 224, 0, 73, 74, 96, 25, + 28, 51, 51, 144, 104, 24, 75, 72, 104, 27, 104, 153, 105, 195, 49, 68, 0, 155, 24, 203, 104, 25, 35, 1, 66, 11, 209, + 6, 74, 68, 36, 1, 96, 19, 75, 62, 66, 100, 96, 31, 224, 113, 75, 60, 42, 0, 208, 1, 74, 60, 224, 0, 74, 60, 96, 26, + 75, 62, 120, 27, 43, 0, 208, 17, 136, 243, 34, 255, 147, 0, 33, 33, 35, 0, 147, 1, 147, 2, 247, 255, 249, 174, 28, 4, + 28, 33, 72, 55, 247, 254, 255, 47, 32, 60, 247, 254, 250, 38, 224, 6, 33, 0, 247, 255, 250, 4, 32, 5, 247, 254, 250, + 31, 36, 0, 75, 41, 120, 26, 75, 41, 42, 0, 208, 1, 74, 41, 224, 0, 74, 41, 28, 53, 96, 26, 53, 144, 44, 0, 218, 10, + 32, 50, 247, 254, 250, 14, 104, 40, 33, 0, 247, 255, 249, 236, 32, 5, 247, 254, 250, 7, 224, 48, 123, 49, 104, 40, 247, + 255, 249, 228, 28, 4, 32, 5, 247, 254, 249, 254, 72, 33, 28, 33, 247, 254, 255, 0, 44, 0, 219, 34, 123, 113, 104, 40, + 247, 255, 249, 214, 28, 4, 32, 5, 247, 254, 249, 240, 72, 27, 28, 33, 247, 254, 254, 242, 44, 0, 219, 20, 32, 10, 247, + 254, 249, 231, 70, 105, 49, 23, 104, 40, 247, 255, 249, 237, 28, 4, 28, 33, 72, 20, 247, 254, 254, 227, 44, 0, 219, + 5, 72, 19, 247, 254, 254, 222, 75, 7, 96, 31, 224, 4, 75, 6, 34, 1, 96, 31, 75, 8, 96, 26, 176, 7, 28, 32, 188, 240, + 188, 2, 71, 8, 70, 192, 19, 112, 1, 15, 19, 112, 96, 56, 0, 15, 66, 64, 0, 3, 13, 64, 19, 112, 96, 60, 19, 112, 106, + 52, 19, 112, 1, 13, 19, 112, 99, 2, 19, 112, 99, 35, 19, 112, 99, 74, 19, 112, 99, 114, 19, 112, 99, 161, 181, 240, + 176, 141, 146, 6, 70, 106, 50, 79, 120, 18, 28, 31, 70, 107, 51, 95, 146, 7, 70, 106, 120, 27, 50, 83, 120, 18, 6, 27, + 22, 27, 146, 8, 70, 106, 50, 47, 147, 4, 35, 0, 112, 19, 74, 147, 77, 148, 28, 6, 145, 5, 147, 10, 96, 19, 147, 3, 36, + 0, 28, 163, 43, 1, 216, 0, 225, 6, 44, 0, 208, 33, 28, 48, 33, 0, 247, 255, 255, 38, 30, 4, 219, 1, 32, 5, 224, 0, 32, + 60, 247, 254, 249, 131, 75, 137, 104, 27, 104, 154, 75, 136, 50, 68, 104, 27, 0, 155, 24, 211, 104, 27, 44, 0, 218, + 9, 154, 3, 50, 1, 146, 3, 42, 2, 221, 0, 224, 232, 32, 10, 247, 254, 249, 111, 224, 219, 35, 0, 147, 3, 155, 4, 154, + 8, 59, 1, 6, 27, 22, 27, 147, 4, 42, 0, 208, 59, 104, 43, 74, 123, 147, 2, 120, 19, 43, 0, 208, 1, 75, 121, 224, 0, + 75, 121, 96, 43, 154, 7, 155, 18, 146, 1, 147, 0, 28, 58, 35, 0, 28, 48, 153, 5, 247, 255, 254, 66, 75, 110, 154, 2, + 28, 4, 96, 26, 28, 131, 43, 1, 216, 0, 224, 190, 40, 0, 218, 0, 224, 178, 155, 6, 34, 144, 25, 146, 28, 60, 147, 2, + 146, 9, 224, 18, 155, 9, 123, 113, 104, 24, 28, 34, 155, 2, 247, 255, 248, 163, 28, 131, 43, 1, 216, 0, 224, 159, 40, + 0, 219, 69, 66, 160, 209, 67, 154, 2, 26, 36, 24, 18, 146, 2, 44, 0, 209, 234, 224, 62, 104, 43, 74, 93, 147, 2, 120, + 19, 43, 0, 208, 1, 75, 91, 224, 0, 75, 91, 96, 43, 154, 7, 155, 18, 146, 1, 147, 0, 28, 58, 35, 128, 28, 48, 153, 5, + 247, 255, 254, 6, 75, 80, 154, 2, 28, 4, 96, 26, 40, 0, 218, 3, 72, 83, 28, 33, 247, 254, 254, 16, 28, 163, 43, 1, 217, + 125, 44, 0, 218, 22, 224, 113, 28, 51, 51, 144, 104, 24, 123, 49, 28, 58, 155, 6, 247, 255, 248, 104, 30, 4, 218, 3, + 72, 74, 28, 33, 247, 254, 253, 252, 28, 163, 43, 1, 217, 96, 44, 0, 219, 5, 66, 188, 208, 5, 224, 2, 47, 0, 209, 231, + 224, 1, 76, 68, 224, 86, 75, 59, 74, 61, 104, 27, 147, 2, 120, 19, 43, 0, 208, 1, 75, 59, 224, 0, 75, 59, 74, 54, 70, + 105, 96, 19, 28, 48, 49, 47, 170, 10, 247, 255, 254, 33, 30, 4, 218, 34, 72, 58, 28, 33, 247, 254, 253, 215, 28, 99, + 209, 3, 75, 46, 154, 2, 96, 26, 224, 65, 28, 52, 52, 144, 104, 32, 123, 49, 247, 255, 248, 167, 123, 51, 32, 15, 104, + 34, 64, 24, 9, 219, 1, 27, 106, 81, 24, 27, 32, 1, 64, 152, 67, 129, 98, 81, 70, 105, 28, 48, 49, 47, 170, 10, 247, + 255, 253, 253, 28, 4, 75, 31, 154, 2, 96, 26, 28, 163, 43, 1, 217, 34, 155, 10, 43, 0, 208, 7, 75, 37, 104, 27, 43, + 0, 208, 3, 70, 107, 34, 1, 51, 47, 112, 26, 44, 0, 219, 12, 75, 32, 36, 0, 104, 27, 43, 0, 208, 7, 70, 107, 51, 47, + 120, 27, 43, 0, 208, 2, 76, 28, 224, 0, 28, 4, 155, 4, 43, 0, 221, 2, 44, 0, 218, 0, 230, 247, 34, 0, 44, 0, 218, 0, + 34, 1, 75, 9, 96, 26, 154, 21, 42, 0, 208, 3, 70, 107, 51, 47, 120, 27, 112, 19, 155, 22, 43, 0, 208, 2, 155, 10, 154, + 22, 96, 19, 176, 13, 28, 32, 188, 240, 188, 2, 71, 8, 19, 112, 106, 52, 19, 112, 96, 56, 19, 112, 96, 60, 19, 112, 106, + 48, 19, 112, 1, 15, 0, 15, 66, 64, 0, 3, 13, 64, 19, 112, 99, 171, 19, 112, 99, 190, 255, 255, 216, 233, 19, 112, 99, + 214, 19, 112, 105, 252, 255, 255, 216, 234, 181, 240, 28, 3, 176, 143, 51, 160, 104, 30, 145, 7, 70, 109, 33, 128, 1, + 9, 53, 55, 35, 0, 172, 9, 24, 118, 28, 7, 112, 43, 28, 32, 33, 0, 34, 16, 240, 2, 251, 224, 46, 0, 208, 91, 35, 6, 147, + 1, 35, 1, 33, 0, 147, 2, 35, 10, 145, 4, 147, 5, 28, 56, 153, 7, 34, 0, 35, 0, 149, 3, 148, 0, 247, 255, 254, 130, 30, + 5, 218, 5, 72, 41, 28, 41, 247, 254, 253, 52, 28, 107, 208, 71, 45, 0, 219, 4, 70, 107, 51, 55, 120, 27, 43, 0, 208, + 64, 153, 7, 171, 9, 34, 3, 112, 26, 1, 74, 112, 90, 34, 18, 113, 26, 34, 0, 113, 90, 28, 48, 33, 0, 34, 18, 240, 2, + 251, 176, 75, 28, 53, 2, 209, 1, 74, 28, 224, 0, 74, 28, 96, 26, 171, 9, 147, 0, 35, 6, 147, 1, 35, 0, 147, 2, 147, + 3, 147, 4, 35, 10, 147, 5, 153, 7, 28, 56, 28, 50, 35, 18, 247, 255, 254, 77, 28, 5, 28, 41, 72, 19, 247, 254, 253, + 0, 45, 0, 219, 19, 120, 179, 33, 15, 70, 108, 64, 25, 52, 55, 72, 15, 112, 33, 247, 254, 252, 245, 120, 35, 59, 2, 6, + 27, 14, 27, 43, 2, 217, 3, 224, 3, 37, 4, 66, 109, 224, 0, 77, 9, 176, 15, 28, 40, 188, 240, 188, 2, 71, 8, 70, 192, + 19, 112, 99, 229, 19, 112, 96, 56, 0, 38, 37, 160, 0, 152, 150, 128, 19, 112, 100, 6, 19, 112, 100, 37, 255, 255, 216, + 239, 181, 240, 176, 147, 70, 106, 35, 0, 50, 71, 112, 19, 74, 196, 28, 4, 32, 16, 112, 16, 72, 195, 28, 34, 50, 152, + 96, 16, 174, 12, 58, 8, 96, 17, 28, 8, 130, 115, 28, 49, 130, 179, 247, 254, 255, 250, 28, 5, 28, 41, 72, 189, 247, + 254, 252, 186, 45, 0, 218, 0, 225, 195, 75, 187, 104, 27, 43, 0, 208, 37, 75, 186, 121, 50, 121, 153, 66, 145, 209, + 23, 121, 217, 121, 114, 66, 145, 209, 19, 137, 25, 137, 50, 66, 145, 209, 15, 137, 89, 137, 114, 66, 145, 209, 11, 123, + 25, 123, 178, 66, 145, 209, 7, 123, 89, 123, 242, 66, 145, 209, 3, 123, 154, 124, 51, 66, 154, 208, 8, 168, 12, 247, + 254, 251, 102, 37, 1, 72, 170, 247, 254, 252, 143, 66, 109, 225, 167, 170, 12, 121, 17, 75, 166, 38, 0, 113, 153, 121, + 81, 113, 217, 137, 17, 129, 25, 137, 81, 129, 89, 123, 145, 115, 25, 123, 209, 115, 89, 124, 18, 115, 154, 74, 160, + 35, 128, 66, 91, 96, 19, 35, 0, 147, 8, 147, 5, 224, 222, 138, 111, 138, 171, 154, 8, 4, 63, 67, 31, 24, 191, 122, 58, + 72, 154, 0, 82, 153, 5, 247, 254, 252, 104, 34, 156, 35, 0, 25, 18, 147, 10, 147, 6, 146, 11, 224, 192, 122, 123, 122, + 189, 6, 27, 4, 45, 67, 29, 122, 251, 2, 27, 67, 29, 123, 59, 67, 29, 155, 10, 24, 237, 121, 107, 43, 8, 209, 116, 121, + 235, 43, 80, 209, 113, 121, 43, 43, 1, 217, 110, 154, 11, 35, 1, 112, 19, 121, 169, 72, 136, 34, 1, 247, 254, 252, 68, + 35, 0, 115, 102, 115, 38, 147, 9, 147, 7, 224, 49, 123, 170, 123, 235, 6, 18, 4, 27, 67, 19, 124, 42, 2, 18, 67, 19, + 124, 106, 67, 19, 154, 9, 24, 155, 120, 218, 42, 2, 209, 28, 120, 154, 6, 17, 41, 0, 218, 11, 123, 33, 41, 0, 209, 8, + 42, 0, 208, 6, 115, 34, 121, 25, 121, 91, 2, 9, 67, 25, 72, 118, 224, 10, 123, 97, 41, 0, 209, 9, 42, 0, 208, 7, 115, + 98, 121, 25, 121, 91, 2, 9, 72, 113, 67, 25, 247, 254, 252, 18, 155, 7, 154, 9, 51, 1, 50, 7, 147, 7, 146, 9, 121, 43, + 154, 7, 66, 154, 211, 201, 123, 33, 41, 0, 208, 94, 123, 98, 42, 0, 208, 91, 72, 104, 247, 254, 251, 255, 75, 96, 123, + 34, 168, 12, 116, 26, 123, 98, 116, 90, 121, 122, 70, 111, 112, 34, 120, 170, 55, 71, 96, 98, 115, 218, 120, 235, 28, + 37, 96, 163, 247, 254, 250, 192, 78, 89, 75, 94, 72, 95, 96, 51, 120, 33, 104, 162, 53, 144, 247, 254, 251, 228, 104, + 40, 28, 57, 247, 254, 254, 229, 40, 0, 218, 91, 224, 85, 123, 170, 123, 235, 6, 18, 4, 27, 67, 19, 124, 42, 124, 104, + 2, 18, 67, 19, 67, 24, 208, 1, 240, 1, 250, 126, 122, 106, 122, 171, 6, 18, 4, 27, 67, 19, 122, 234, 123, 40, 2, 18, + 67, 19, 115, 174, 115, 238, 116, 46, 116, 110, 67, 24, 208, 1, 240, 1, 250, 109, 121, 107, 114, 110, 114, 174, 114, + 238, 115, 46, 43, 9, 209, 4, 74, 70, 75, 62, 168, 12, 96, 26, 224, 39, 43, 8, 209, 10, 121, 235, 43, 80, 209, 7, 121, + 43, 43, 1, 217, 4, 121, 171, 74, 64, 26, 211, 74, 54, 96, 19, 155, 6, 154, 10, 51, 1, 50, 18, 147, 6, 146, 10, 121, + 59, 154, 6, 66, 154, 210, 0, 231, 57, 155, 5, 154, 8, 51, 1, 50, 13, 147, 5, 146, 8, 173, 12, 124, 107, 154, 5, 66, + 154, 210, 0, 231, 26, 72, 52, 247, 254, 251, 140, 28, 40, 247, 254, 250, 92, 77, 48, 224, 147, 72, 49, 247, 254, 251, + 132, 77, 48, 224, 142, 120, 57, 72, 48, 120, 34, 247, 254, 251, 125, 75, 47, 104, 40, 96, 51, 120, 33, 247, 254, 254, + 110, 40, 0, 218, 2, 72, 44, 247, 254, 251, 114, 74, 43, 75, 27, 121, 225, 96, 26, 28, 35, 51, 144, 104, 24, 122, 226, + 247, 254, 254, 81, 40, 0, 218, 2, 72, 38, 247, 254, 251, 99, 72, 38, 70, 109, 247, 254, 251, 95, 53, 70, 35, 0, 112, + 43, 28, 35, 51, 144, 104, 24, 136, 227, 33, 161, 147, 0, 35, 1, 147, 1, 34, 254, 35, 0, 149, 2, 247, 254, 253, 201, + 40, 0, 218, 58, 72, 28, 247, 254, 251, 74, 35, 8, 115, 163, 224, 60, 70, 192, 19, 112, 96, 64, 44, 13, 224, 1, 19, 112, + 100, 71, 19, 112, 106, 24, 19, 112, 106, 4, 19, 112, 100, 113, 19, 112, 105, 224, 19, 112, 100, 151, 19, 112, 100, 190, + 19, 112, 100, 245, 19, 112, 101, 3, 19, 112, 101, 18, 255, 255, 251, 79, 19, 112, 101, 87, 255, 255, 177, 224, 255, + 255, 216, 240, 19, 112, 101, 38, 19, 112, 101, 133, 255, 255, 216, 231, 19, 112, 101, 163, 255, 255, 251, 78, 19, 112, + 101, 196, 255, 255, 251, 77, 19, 112, 101, 226, 19, 112, 102, 17, 19, 112, 102, 76, 120, 41, 72, 24, 49, 1, 6, 9, 14, + 9, 115, 161, 247, 254, 251, 10, 28, 37, 53, 160, 104, 43, 43, 0, 209, 7, 32, 129, 1, 64, 240, 1, 249, 145, 35, 31, 48, + 31, 67, 152, 96, 40, 52, 160, 104, 35, 37, 0, 43, 0, 209, 4, 74, 12, 75, 13, 37, 4, 96, 26, 66, 109, 74, 12, 75, 12, + 96, 26, 45, 0, 208, 5, 75, 8, 72, 11, 104, 25, 247, 254, 250, 233, 224, 2, 72, 9, 247, 254, 250, 229, 176, 19, 28, 40, + 188, 240, 188, 2, 71, 8, 19, 112, 102, 115, 255, 255, 251, 75, 19, 112, 105, 224, 0, 15, 66, 64, 19, 112, 96, 56, 19, + 112, 102, 138, 19, 112, 102, 172, 181, 8, 33, 0, 247, 255, 251, 100, 188, 8, 188, 2, 71, 8, 0, 0, 181, 240, 176, 139, + 171, 8, 34, 18, 112, 26, 1, 74, 112, 90, 34, 0, 112, 154, 112, 218, 113, 90, 28, 15, 28, 2, 33, 36, 50, 160, 113, 25, + 104, 20, 34, 128, 1, 18, 24, 164, 144, 7, 44, 0, 208, 42, 38, 0, 33, 0, 34, 36, 28, 32, 240, 2, 249, 65, 171, 8, 34, + 6, 147, 0, 35, 10, 37, 0, 146, 1, 147, 5, 152, 7, 28, 57, 28, 34, 35, 36, 149, 2, 149, 3, 149, 4, 247, 255, 251, 229, + 40, 0, 219, 7, 120, 35, 34, 31, 64, 19, 43, 5, 208, 6, 43, 7, 209, 8, 224, 3, 54, 1, 46, 2, 208, 9, 231, 220, 75, 6, + 34, 1, 96, 26, 224, 4, 75, 4, 96, 29, 224, 1, 32, 4, 66, 64, 176, 11, 188, 240, 188, 2, 71, 8, 19, 112, 105, 236, 181, + 112, 176, 136, 28, 22, 28, 29, 34, 37, 171, 7, 112, 26, 1, 74, 112, 90, 28, 2, 50, 160, 104, 20, 34, 128, 1, 18, 24, + 164, 44, 0, 208, 42, 147, 0, 35, 2, 147, 1, 35, 0, 147, 2, 147, 3, 147, 4, 35, 10, 147, 5, 28, 34, 35, 8, 247, 255, + 251, 170, 40, 0, 219, 29, 168, 6, 28, 33, 34, 4, 240, 2, 248, 173, 45, 0, 208, 1, 155, 6, 96, 43, 29, 33, 168, 6, 34, + 4, 240, 2, 248, 164, 46, 0, 208, 1, 155, 6, 96, 51, 35, 128, 154, 6, 1, 27, 32, 0, 66, 154, 209, 5, 75, 4, 34, 1, 96, + 26, 224, 1, 32, 4, 66, 64, 176, 8, 188, 112, 188, 2, 71, 8, 19, 112, 105, 236, 181, 240, 176, 131, 123, 131, 28, 15, + 28, 5, 66, 187, 217, 72, 78, 40, 73, 40, 72, 41, 96, 49, 33, 0, 247, 254, 250, 46, 75, 39, 28, 40, 96, 51, 28, 57, 247, + 255, 252, 200, 30, 4, 219, 53, 74, 33, 28, 57, 96, 50, 28, 40, 247, 255, 255, 86, 28, 4, 28, 33, 72, 32, 247, 254, 250, + 27, 44, 0, 219, 40, 28, 43, 51, 160, 104, 26, 35, 128, 1, 27, 92, 211, 33, 31, 64, 25, 72, 27, 247, 254, 250, 14, 28, + 59, 29, 62, 51, 20, 0, 182, 0, 155, 25, 170, 147, 1, 28, 57, 24, 235, 28, 40, 247, 255, 255, 130, 153, 1, 28, 4, 89, + 75, 89, 114, 72, 18, 28, 33, 247, 254, 249, 250, 89, 114, 75, 17, 66, 154, 217, 3, 154, 1, 89, 83, 43, 9, 216, 1, 36, + 33, 66, 100, 74, 6, 75, 5, 96, 26, 224, 1, 36, 3, 66, 100, 176, 3, 28, 32, 188, 240, 188, 2, 71, 8, 70, 192, 19, 112, + 96, 56, 0, 15, 66, 64, 19, 112, 102, 205, 1, 49, 45, 0, 19, 112, 102, 232, 19, 112, 102, 252, 19, 112, 103, 17, 0, 0, + 1, 255, 181, 240, 176, 141, 175, 9, 37, 40, 112, 61, 1, 77, 112, 125, 14, 21, 112, 189, 70, 110, 12, 21, 36, 0, 112, + 253, 113, 122, 10, 21, 54, 47, 10, 26, 112, 52, 113, 61, 113, 188, 113, 250, 114, 59, 114, 124, 123, 130, 66, 138, 217, + 28, 29, 10, 0, 146, 88, 18, 146, 7, 42, 0, 208, 22, 77, 15, 34, 1, 96, 42, 154, 7, 151, 0, 67, 83, 34, 10, 146, 1, 34, + 6, 146, 5, 154, 18, 148, 2, 150, 3, 148, 4, 247, 255, 250, 236, 96, 44, 40, 0, 221, 7, 120, 51, 43, 0, 209, 3, 224, + 3, 32, 3, 66, 64, 224, 0, 72, 3, 176, 13, 188, 240, 188, 2, 71, 8, 70, 192, 19, 112, 105, 252, 255, 255, 216, 234, 181, + 240, 176, 141, 147, 7, 1, 75, 175, 9, 37, 42, 70, 156, 112, 61, 35, 8, 70, 101, 67, 43, 112, 123, 14, 21, 155, 7, 112, + 189, 70, 110, 12, 21, 36, 0, 112, 253, 113, 122, 10, 21, 54, 47, 10, 26, 112, 52, 113, 61, 113, 188, 113, 250, 114, + 59, 114, 124, 123, 130, 66, 138, 217, 32, 29, 10, 0, 146, 88, 18, 70, 148, 69, 164, 208, 26, 77, 17, 35, 1, 96, 43, + 155, 7, 151, 0, 70, 98, 67, 90, 70, 148, 34, 1, 146, 2, 34, 6, 146, 5, 39, 10, 154, 18, 70, 99, 151, 1, 150, 3, 148, + 4, 247, 255, 250, 158, 96, 44, 40, 0, 221, 7, 120, 51, 43, 0, 209, 3, 224, 3, 32, 3, 66, 64, 224, 0, 72, 3, 176, 13, + 188, 240, 188, 2, 71, 8, 70, 192, 19, 112, 105, 252, 255, 255, 216, 234, 181, 240, 176, 135, 28, 28, 147, 2, 28, 11, + 51, 4, 0, 155, 145, 3, 88, 25, 28, 6, 28, 11, 67, 99, 32, 128, 2, 64, 28, 23, 66, 131, 217, 2, 240, 2, 248, 153, 144, + 2, 155, 3, 32, 1, 51, 4, 0, 155, 66, 64, 147, 5, 224, 28, 154, 2, 28, 37, 66, 148, 217, 0, 28, 21, 4, 43, 12, 27, 147, + 4, 155, 12, 28, 48, 147, 0, 153, 3, 28, 58, 155, 4, 247, 255, 255, 67, 40, 0, 219, 12, 154, 4, 25, 127, 26, 164, 154, + 5, 4, 36, 89, 147, 12, 36, 67, 93, 155, 12, 25, 91, 147, 12, 44, 0, 209, 224, 176, 7, 188, 240, 188, 2, 71, 8, 181, + 240, 176, 135, 28, 28, 147, 2, 28, 11, 51, 4, 0, 155, 145, 3, 88, 25, 28, 6, 28, 11, 67, 99, 32, 128, 2, 64, 28, 23, + 66, 131, 217, 2, 240, 2, 248, 91, 144, 2, 155, 3, 32, 1, 51, 4, 0, 155, 66, 64, 147, 5, 224, 28, 154, 2, 28, 37, 66, + 148, 217, 0, 28, 21, 4, 43, 12, 27, 147, 4, 155, 12, 28, 48, 147, 0, 153, 3, 28, 58, 155, 4, 247, 255, 255, 73, 40, + 0, 219, 12, 154, 4, 25, 127, 26, 164, 154, 5, 4, 36, 89, 147, 12, 36, 67, 93, 155, 12, 25, 91, 147, 12, 44, 0, 209, + 224, 176, 7, 188, 240, 188, 2, 71, 8, 181, 240, 176, 139, 74, 135, 35, 0, 128, 19, 74, 135, 36, 0, 128, 19, 75, 134, + 74, 135, 112, 28, 75, 135, 79, 135, 112, 28, 35, 120, 144, 8, 66, 91, 96, 19, 28, 56, 153, 8, 247, 255, 251, 218, 40, + 0, 218, 0, 224, 241, 34, 1, 75, 129, 115, 186, 104, 25, 41, 0, 208, 74, 121, 91, 43, 0, 209, 3, 75, 126, 120, 27, 66, + 26, 208, 29, 76, 122, 35, 0, 115, 163, 77, 124, 75, 124, 38, 1, 96, 43, 28, 35, 51, 144, 104, 24, 136, 227, 33, 161, + 147, 0, 28, 35, 51, 14, 147, 2, 34, 254, 35, 0, 150, 1, 247, 254, 251, 5, 75, 117, 96, 43, 40, 0, 218, 1, 115, 166, + 224, 188, 123, 163, 51, 1, 115, 163, 75, 108, 72, 113, 121, 29, 28, 41, 247, 254, 248, 124, 78, 104, 28, 41, 28, 48, + 247, 255, 254, 59, 28, 4, 28, 33, 72, 108, 247, 254, 248, 114, 28, 163, 43, 1, 216, 9, 28, 48, 247, 255, 253, 154, 74, + 94, 35, 121, 66, 91, 96, 19, 34, 0, 75, 91, 224, 61, 44, 0, 218, 0, 224, 153, 75, 88, 34, 1, 112, 26, 75, 89, 112, 29, + 224, 139, 38, 1, 113, 92, 37, 0, 28, 60, 150, 6, 55, 144, 28, 40, 30, 67, 65, 152, 144, 9, 40, 0, 209, 5, 75, 84, 120, + 27, 7, 217, 213, 1, 46, 0, 209, 41, 72, 87, 28, 41, 247, 254, 248, 70, 6, 43, 14, 27, 28, 25, 72, 76, 147, 5, 247, 255, + 254, 3, 144, 7, 153, 7, 72, 80, 247, 254, 248, 58, 155, 7, 51, 2, 43, 1, 216, 16, 154, 9, 42, 0, 208, 13, 74, 73, 75, + 70, 72, 67, 96, 26, 247, 255, 253, 91, 74, 63, 35, 121, 66, 91, 96, 19, 75, 60, 34, 0, 112, 26, 224, 105, 155, 7, 43, + 0, 218, 59, 46, 0, 208, 52, 78, 61, 75, 62, 73, 66, 96, 51, 136, 227, 32, 0, 96, 8, 115, 160, 104, 56, 147, 0, 28, 35, + 34, 1, 51, 14, 146, 1, 147, 2, 33, 161, 35, 0, 34, 254, 247, 254, 250, 134, 75, 53, 144, 5, 96, 51, 40, 0, 218, 5, 73, + 55, 35, 1, 32, 0, 115, 163, 96, 8, 224, 5, 123, 163, 34, 1, 51, 1, 115, 163, 75, 42, 113, 90, 75, 40, 72, 49, 123, 155, + 153, 5, 28, 26, 147, 6, 247, 253, 255, 243, 75, 38, 38, 0, 120, 27, 7, 216, 213, 3, 153, 5, 15, 206, 224, 0, 53, 1, + 154, 6, 66, 149, 219, 144, 224, 29, 33, 23, 70, 104, 74, 29, 92, 8, 35, 1, 96, 19, 113, 16, 154, 8, 152, 8, 137, 17, + 74, 19, 128, 17, 137, 65, 74, 19, 128, 17, 74, 19, 70, 105, 112, 19, 34, 23, 75, 19, 92, 81, 112, 25, 74, 23, 75, 21, + 32, 0, 96, 26, 75, 14, 34, 0, 96, 26, 224, 14, 74, 12, 35, 122, 66, 91, 96, 19, 72, 12, 247, 255, 252, 239, 75, 8, 34, + 0, 112, 26, 72, 20, 247, 253, 255, 187, 32, 3, 66, 64, 176, 11, 188, 240, 188, 2, 71, 8, 70, 192, 19, 112, 105, 248, + 19, 112, 106, 0, 19, 112, 106, 28, 19, 112, 105, 224, 19, 112, 96, 64, 19, 114, 196, 96, 19, 112, 106, 4, 19, 112, 1, + 14, 19, 112, 96, 56, 0, 152, 150, 128, 0, 15, 66, 64, 19, 112, 103, 72, 19, 112, 103, 102, 19, 112, 103, 77, 19, 112, + 106, 52, 19, 112, 103, 131, 19, 112, 103, 172, 181, 8, 74, 10, 104, 19, 43, 0, 208, 13, 75, 9, 33, 16, 112, 25, 35, + 0, 73, 8, 96, 19, 74, 8, 112, 11, 96, 19, 72, 7, 33, 0, 34, 20, 240, 1, 254, 19, 188, 8, 188, 1, 71, 0, 19, 112, 106, + 24, 19, 112, 96, 64, 19, 112, 106, 28, 19, 112, 106, 52, 19, 112, 106, 4, 181, 240, 176, 135, 75, 119, 36, 0, 104, 29, + 45, 0, 208, 0, 224, 227, 75, 117, 32, 0, 104, 27, 104, 155, 96, 157, 247, 253, 248, 189, 74, 115, 35, 1, 66, 91, 96, + 19, 74, 114, 35, 1, 96, 19, 74, 113, 72, 114, 112, 21, 74, 114, 112, 19, 247, 253, 255, 85, 75, 113, 120, 27, 43, 1, + 208, 4, 43, 2, 208, 6, 34, 0, 146, 4, 224, 6, 35, 1, 147, 4, 36, 1, 224, 2, 34, 1, 146, 4, 36, 0, 0, 167, 224, 174, + 75, 98, 74, 104, 104, 29, 0, 163, 25, 27, 0, 219, 24, 235, 103, 92, 111, 27, 96, 20, 43, 0, 209, 52, 104, 171, 34, 1, + 51, 68, 25, 219, 104, 27, 66, 26, 209, 2, 28, 32, 247, 253, 253, 57, 78, 87, 34, 1, 104, 51, 104, 155, 51, 68, 25, 219, + 104, 27, 66, 26, 208, 33, 28, 32, 247, 254, 253, 237, 34, 140, 0, 210, 24, 131, 43, 1, 216, 2, 75, 79, 96, 24, 224, + 130, 28, 32, 247, 254, 252, 126, 144, 3, 32, 20, 247, 253, 250, 12, 104, 51, 104, 155, 51, 68, 25, 219, 104, 26, 155, + 3, 43, 0, 219, 4, 75, 77, 64, 26, 75, 77, 66, 154, 208, 2, 28, 32, 247, 254, 253, 206, 0, 160, 25, 0, 0, 192, 24, 43, + 111, 27, 43, 0, 208, 100, 75, 64, 34, 1, 48, 88, 96, 26, 24, 40, 247, 255, 254, 46, 144, 3, 40, 0, 209, 87, 75, 56, + 34, 1, 96, 26, 79, 65, 74, 57, 96, 16, 28, 56, 247, 253, 248, 66, 77, 52, 34, 4, 104, 43, 72, 62, 104, 155, 96, 154, + 247, 253, 254, 224, 32, 100, 247, 253, 249, 215, 32, 128, 1, 0, 240, 0, 253, 105, 78, 57, 75, 57, 34, 1, 96, 51, 75, + 57, 144, 4, 112, 26, 104, 43, 154, 3, 104, 155, 32, 0, 96, 154, 247, 253, 248, 37, 72, 53, 247, 253, 254, 200, 75, 52, + 34, 0, 120, 25, 155, 4, 72, 51, 147, 0, 35, 1, 247, 255, 253, 125, 144, 5, 28, 56, 247, 253, 248, 21, 104, 43, 34, 4, + 104, 155, 96, 154, 70, 107, 34, 15, 92, 210, 75, 40, 152, 4, 112, 26, 75, 43, 96, 51, 240, 0, 253, 91, 155, 5, 43, 0, + 218, 7, 72, 40, 247, 253, 254, 167, 28, 32, 247, 253, 252, 224, 76, 38, 224, 27, 72, 38, 247, 253, 254, 159, 75, 38, + 104, 27, 43, 0, 208, 20, 52, 2, 224, 18, 28, 32, 247, 253, 252, 210, 52, 1, 55, 4, 154, 4, 66, 148, 220, 0, 231, 76, + 72, 18, 247, 252, 255, 231, 74, 7, 104, 19, 34, 4, 104, 155, 96, 154, 75, 5, 104, 28, 176, 7, 28, 32, 188, 240, 188, + 2, 71, 8, 70, 192, 19, 112, 106, 24, 19, 112, 96, 60, 19, 112, 105, 224, 19, 112, 106, 52, 19, 112, 106, 28, 19, 112, + 103, 201, 19, 112, 1, 15, 19, 112, 1, 12, 19, 112, 106, 48, 0, 0, 57, 5, 0, 0, 16, 5, 19, 112, 17, 29, 19, 112, 104, + 92, 19, 112, 96, 56, 0, 152, 150, 128, 19, 112, 105, 216, 19, 112, 104, 141, 19, 112, 96, 64, 19, 114, 196, 96, 0, 15, + 66, 64, 19, 112, 104, 114, 255, 255, 251, 162, 19, 112, 104, 138, 19, 112, 105, 236, 181, 0, 30, 3, 208, 1, 34, 0, 96, + 26, 74, 12, 32, 0, 120, 18, 42, 1, 209, 16, 74, 10, 120, 18, 42, 16, 208, 12, 43, 0, 208, 4, 50, 4, 73, 8, 0, 146, 88, + 82, 96, 26, 75, 5, 120, 26, 75, 5, 50, 20, 0, 146, 88, 208, 188, 2, 71, 8, 70, 192, 19, 112, 106, 28, 19, 112, 96, 64, + 19, 114, 196, 96, 181, 240, 176, 139, 75, 78, 104, 27, 43, 0, 209, 0, 224, 139, 75, 77, 34, 16, 112, 26, 75, 76, 120, + 26, 75, 76, 42, 0, 208, 1, 74, 76, 224, 0, 74, 76, 78, 76, 96, 26, 172, 4, 35, 0, 28, 53, 130, 99, 130, 163, 53, 144, + 28, 33, 104, 40, 247, 254, 249, 73, 75, 71, 121, 34, 121, 153, 66, 145, 209, 23, 121, 217, 121, 98, 66, 145, 209, 19, + 137, 25, 137, 34, 66, 145, 209, 15, 137, 89, 137, 98, 66, 145, 209, 11, 123, 25, 123, 162, 66, 145, 209, 7, 123, 89, + 123, 226, 66, 145, 209, 3, 123, 154, 124, 35, 66, 154, 208, 6, 168, 4, 247, 253, 252, 193, 72, 56, 247, 253, 253, 235, + 224, 80, 28, 32, 247, 253, 252, 186, 74, 54, 75, 47, 104, 40, 96, 26, 120, 49, 247, 254, 248, 215, 40, 0, 219, 70, 104, + 178, 42, 0, 208, 7, 6, 18, 104, 40, 121, 241, 14, 18, 247, 254, 248, 190, 40, 0, 219, 61, 76, 41, 35, 0, 115, 163, 77, + 36, 75, 42, 39, 1, 96, 43, 28, 35, 51, 144, 104, 24, 136, 227, 33, 161, 147, 0, 28, 35, 51, 14, 147, 2, 34, 254, 35, + 0, 151, 1, 247, 254, 248, 56, 75, 28, 96, 43, 40, 0, 218, 6, 115, 167, 28, 32, 33, 0, 247, 254, 254, 75, 72, 30, 224, + 34, 123, 163, 78, 25, 51, 1, 115, 163, 75, 28, 28, 32, 96, 43, 121, 49, 247, 255, 248, 73, 75, 18, 96, 43, 40, 0, 219, + 17, 121, 49, 28, 32, 247, 255, 250, 215, 40, 0, 219, 13, 121, 50, 75, 9, 112, 26, 75, 19, 112, 31, 224, 8, 72, 19, 224, + 6, 72, 19, 224, 4, 72, 19, 224, 2, 72, 19, 224, 0, 72, 19, 176, 11, 188, 240, 188, 2, 71, 8, 19, 112, 106, 24, 19, 112, + 96, 64, 19, 112, 1, 15, 19, 112, 96, 56, 0, 15, 66, 64, 0, 3, 13, 64, 19, 114, 196, 96, 19, 112, 106, 4, 19, 112, 100, + 113, 0, 152, 150, 128, 255, 255, 252, 20, 1, 49, 45, 0, 19, 112, 106, 28, 255, 255, 252, 15, 255, 255, 252, 23, 255, + 255, 252, 22, 255, 255, 252, 19, 255, 255, 252, 18, 181, 240, 176, 131, 75, 57, 76, 58, 120, 26, 38, 1, 30, 83, 65, + 154, 75, 56, 96, 34, 104, 27, 43, 0, 208, 99, 75, 55, 0, 146, 104, 27, 104, 155, 28, 25, 49, 68, 24, 138, 104, 18, 66, + 22, 208, 89, 34, 0, 32, 0, 96, 154, 247, 252, 254, 166, 104, 32, 247, 254, 250, 177, 30, 7, 218, 3, 104, 32, 247, 254, + 250, 172, 28, 7, 32, 60, 247, 253, 248, 58, 77, 41, 72, 42, 104, 43, 28, 57, 104, 154, 75, 37, 50, 68, 104, 27, 38, + 1, 0, 155, 24, 211, 104, 27, 28, 26, 147, 1, 247, 253, 253, 48, 76, 32, 35, 1, 96, 35, 47, 0, 219, 48, 155, 1, 74, 32, + 64, 26, 75, 32, 66, 154, 209, 42, 74, 32, 35, 0, 112, 19, 34, 0, 96, 34, 247, 255, 254, 242, 74, 29, 75, 30, 96, 26, + 40, 0, 219, 12, 74, 26, 35, 0, 112, 22, 96, 35, 72, 27, 247, 252, 254, 108, 104, 43, 34, 4, 104, 155, 38, 0, 96, 154, + 224, 17, 28, 57, 72, 23, 96, 38, 247, 253, 253, 7, 75, 17, 34, 0, 112, 26, 32, 100, 247, 252, 255, 251, 72, 17, 247, + 252, 254, 88, 104, 43, 34, 4, 104, 155, 96, 154, 32, 100, 247, 252, 255, 241, 176, 3, 28, 48, 188, 240, 188, 2, 71, + 8, 19, 112, 1, 12, 19, 112, 106, 48, 19, 112, 106, 52, 19, 112, 96, 60, 19, 112, 104, 159, 0, 0, 49, 5, 0, 0, 16, 5, + 19, 112, 106, 28, 0, 15, 66, 64, 19, 112, 96, 56, 19, 112, 17, 29, 19, 112, 104, 187, 181, 240, 176, 131, 75, 30, 34, + 0, 104, 27, 146, 1, 43, 0, 208, 50, 247, 255, 255, 104, 75, 27, 104, 27, 43, 0, 209, 44, 75, 26, 120, 27, 43, 0, 208, + 40, 77, 25, 79, 26, 76, 26, 78, 27, 96, 47, 121, 49, 28, 32, 247, 255, 249, 245, 40, 0, 219, 29, 96, 47, 121, 49, 28, + 32, 28, 11, 29, 10, 51, 20, 0, 146, 0, 155, 25, 18, 25, 27, 247, 255, 250, 49, 40, 0, 219, 15, 75, 17, 104, 26, 42, + 0, 208, 7, 121, 49, 35, 128, 49, 4, 0, 137, 89, 9, 1, 27, 66, 153, 209, 3, 28, 19, 30, 90, 65, 147, 147, 1, 152, 1, + 176, 3, 188, 240, 188, 2, 71, 8, 19, 112, 106, 24, 19, 112, 106, 52, 19, 112, 106, 28, 19, 112, 96, 56, 0, 15, 66, 64, + 19, 114, 196, 96, 19, 112, 106, 4, 19, 112, 105, 236, 181, 240, 176, 135, 75, 66, 144, 3, 104, 27, 146, 4, 43, 0, 209, + 7, 75, 64, 104, 27, 43, 0, 208, 3, 0, 66, 75, 63, 8, 82, 96, 26, 75, 62, 104, 27, 43, 0, 208, 6, 75, 61, 104, 26, 42, + 1, 221, 2, 34, 1, 96, 26, 224, 101, 4, 9, 12, 9, 79, 56, 38, 4, 36, 0, 145, 5, 247, 255, 254, 255, 30, 67, 65, 152, + 104, 59, 66, 64, 64, 4, 43, 0, 208, 3, 74, 50, 104, 19, 43, 3, 208, 79, 44, 0, 219, 3, 75, 48, 120, 27, 43, 1, 208, + 4, 75, 45, 34, 1, 36, 1, 96, 26, 66, 100, 75, 43, 104, 27, 43, 0, 209, 61, 75, 38, 104, 26, 75, 42, 42, 0, 208, 1, 74, + 41, 224, 0, 74, 41, 96, 26, 28, 99, 208, 24, 32, 0, 247, 252, 253, 153, 77, 39, 34, 0, 104, 43, 72, 38, 104, 155, 96, + 154, 154, 4, 75, 37, 120, 25, 155, 5, 146, 0, 154, 3, 247, 255, 250, 239, 28, 4, 72, 34, 247, 252, 253, 135, 104, 43, + 34, 4, 104, 155, 96, 154, 74, 32, 75, 24, 96, 26, 44, 0, 218, 2, 75, 20, 34, 1, 96, 26, 75, 18, 104, 27, 43, 0, 208, + 3, 75, 17, 104, 27, 43, 0, 209, 15, 75, 15, 104, 27, 43, 0, 209, 5, 75, 14, 120, 27, 43, 1, 209, 1, 44, 0, 218, 7, 62, + 1, 46, 0, 209, 162, 67, 228, 15, 224, 224, 2, 32, 0, 224, 0, 32, 1, 176, 7, 188, 240, 188, 2, 71, 8, 19, 112, 105, 208, + 19, 112, 105, 236, 19, 112, 105, 160, 19, 112, 105, 164, 19, 112, 106, 52, 19, 112, 106, 28, 19, 112, 96, 56, 0, 152, + 150, 128, 0, 45, 198, 192, 19, 112, 96, 60, 19, 114, 196, 96, 19, 112, 96, 64, 19, 112, 17, 29, 0, 15, 66, 64, 181, + 240, 176, 133, 75, 39, 28, 7, 104, 27, 28, 22, 32, 0, 43, 0, 209, 67, 4, 9, 12, 9, 36, 0, 145, 3, 247, 255, 254, 111, + 40, 0, 208, 2, 44, 0, 219, 5, 224, 0, 36, 0, 74, 31, 120, 19, 43, 1, 208, 4, 75, 30, 34, 1, 36, 1, 96, 26, 66, 100, + 75, 27, 104, 27, 43, 0, 209, 234, 73, 26, 74, 27, 96, 17, 28, 98, 208, 22, 77, 26, 32, 0, 104, 42, 104, 146, 96, 147, + 247, 252, 253, 18, 75, 23, 28, 58, 120, 25, 72, 23, 155, 3, 150, 0, 247, 255, 250, 172, 28, 4, 72, 21, 247, 252, 253, + 6, 104, 43, 34, 4, 104, 155, 96, 154, 74, 18, 75, 13, 96, 26, 44, 0, 218, 2, 75, 9, 34, 1, 96, 26, 75, 7, 104, 27, 43, + 0, 209, 194, 44, 0, 219, 192, 32, 1, 176, 5, 188, 240, 188, 2, 71, 8, 70, 192, 19, 112, 105, 236, 19, 112, 106, 28, + 19, 112, 106, 52, 0, 45, 198, 192, 19, 112, 96, 56, 19, 112, 96, 60, 19, 112, 96, 64, 19, 114, 196, 96, 19, 112, 17, + 29, 0, 15, 66, 64, 181, 240, 176, 137, 74, 95, 104, 19, 43, 0, 209, 6, 75, 94, 104, 27, 105, 153, 96, 17, 106, 26, 75, + 93, 96, 26, 75, 92, 77, 90, 104, 28, 38, 0, 28, 55, 104, 43, 55, 8, 0, 191, 80, 252, 28, 32, 33, 0, 34, 96, 240, 1, + 249, 249, 104, 43, 33, 96, 88, 248, 240, 0, 249, 214, 52, 127, 33, 31, 54, 1, 67, 140, 46, 8, 209, 234, 37, 8, 38, 31, + 28, 32, 33, 0, 34, 96, 240, 1, 249, 231, 61, 1, 28, 32, 33, 96, 52, 127, 240, 0, 249, 195, 67, 180, 45, 0, 209, 241, + 75, 72, 34, 255, 96, 28, 75, 68, 39, 128, 104, 29, 35, 255, 2, 18, 4, 27, 76, 69, 38, 0, 5, 255, 146, 2, 147, 3, 33, + 0, 96, 37, 34, 96, 28, 40, 240, 1, 249, 202, 28, 40, 240, 0, 249, 152, 28, 50, 100, 104, 104, 35, 30, 81, 65, 138, 5, + 210, 96, 90, 104, 35, 34, 0, 96, 154, 104, 35, 33, 31, 97, 159, 53, 127, 67, 141, 104, 34, 28, 40, 146, 5, 240, 0, 249, + 132, 144, 6, 28, 40, 240, 0, 249, 128, 144, 1, 28, 40, 240, 0, 249, 124, 144, 7, 28, 40, 240, 0, 249, 120, 35, 255, + 2, 27, 153, 2, 147, 4, 34, 255, 155, 1, 4, 18, 64, 11, 146, 1, 153, 3, 154, 7, 2, 27, 64, 10, 10, 18, 67, 19, 14, 0, + 154, 6, 67, 3, 32, 224, 64, 16, 33, 2, 67, 8, 154, 5, 6, 0, 67, 3, 96, 19, 104, 34, 35, 128, 4, 91, 97, 19, 104, 34, + 33, 96, 97, 83, 204, 1, 54, 1, 240, 0, 249, 100, 46, 6, 209, 175, 76, 22, 77, 26, 104, 32, 105, 110, 240, 0, 249, 75, + 144, 2, 104, 32, 240, 0, 249, 71, 28, 7, 104, 32, 240, 0, 249, 67, 144, 3, 104, 32, 240, 0, 249, 63, 155, 4, 153, 1, + 64, 31, 155, 3, 2, 63, 64, 11, 10, 27, 67, 31, 154, 2, 14, 3, 28, 56, 67, 24, 35, 224, 64, 19, 33, 2, 67, 11, 6, 27, + 67, 24, 96, 48, 105, 104, 33, 96, 240, 0, 249, 57, 176, 9, 188, 240, 188, 1, 71, 0, 70, 192, 19, 112, 106, 44, 19, 112, + 96, 60, 19, 112, 105, 204, 19, 112, 105, 232, 19, 114, 194, 128, 181, 248, 75, 16, 39, 128, 104, 28, 38, 0, 4, 127, + 28, 32, 247, 252, 254, 77, 46, 3, 208, 15, 28, 37, 35, 31, 53, 127, 67, 157, 107, 104, 240, 1, 248, 186, 96, 103, 96, + 32, 33, 96, 28, 32, 240, 0, 249, 18, 54, 1, 28, 44, 231, 234, 28, 32, 33, 96, 240, 0, 249, 11, 188, 248, 188, 1, 71, + 0, 19, 112, 105, 232, 181, 240, 176, 131, 247, 255, 255, 12, 247, 255, 255, 214, 76, 65, 75, 66, 104, 34, 104, 24, 77, + 65, 97, 144, 104, 89, 78, 65, 97, 209, 104, 154, 79, 64, 96, 42, 104, 218, 105, 27, 96, 50, 96, 59, 33, 96, 240, 0, + 249, 1, 104, 35, 33, 0, 105, 154, 100, 211, 105, 154, 100, 145, 105, 155, 28, 24, 147, 1, 240, 0, 248, 209, 155, 1, + 104, 34, 100, 88, 104, 59, 105, 145, 108, 91, 34, 255, 2, 18, 64, 26, 2, 16, 34, 255, 4, 18, 64, 26, 10, 18, 67, 2, + 14, 24, 67, 2, 32, 224, 64, 3, 39, 2, 67, 59, 6, 24, 28, 19, 67, 3, 96, 11, 104, 35, 34, 128, 105, 153, 4, 18, 96, 74, + 105, 154, 33, 0, 96, 145, 105, 153, 34, 128, 5, 210, 97, 138, 105, 153, 34, 128, 4, 82, 97, 10, 105, 153, 97, 74, 105, + 152, 33, 96, 240, 0, 248, 179, 104, 35, 33, 96, 105, 216, 240, 0, 248, 194, 104, 35, 33, 0, 105, 218, 100, 211, 105, + 218, 100, 145, 105, 223, 28, 56, 240, 0, 248, 147, 33, 96, 100, 120, 104, 40, 240, 0, 248, 179, 104, 47, 104, 35, 28, + 56, 100, 251, 35, 0, 100, 187, 240, 0, 248, 134, 33, 96, 100, 120, 104, 40, 240, 0, 248, 146, 104, 48, 33, 96, 240, + 0, 248, 162, 104, 53, 104, 35, 33, 0, 100, 235, 100, 169, 28, 40, 240, 0, 248, 117, 33, 96, 100, 104, 104, 48, 240, + 0, 248, 129, 176, 3, 188, 240, 188, 1, 71, 0, 70, 192, 19, 112, 96, 60, 19, 114, 194, 128, 19, 112, 105, 212, 19, 112, + 106, 40, 19, 112, 106, 36, 181, 248, 76, 35, 75, 35, 96, 35, 240, 0, 248, 74, 40, 0, 219, 58, 240, 0, 249, 117, 74, + 32, 104, 131, 96, 32, 96, 26, 104, 32, 35, 1, 104, 130, 104, 17, 66, 11, 209, 252, 33, 252, 240, 0, 248, 91, 38, 128, + 39, 128, 76, 23, 37, 0, 4, 118, 1, 127, 104, 35, 33, 4, 108, 219, 81, 94, 104, 35, 108, 219, 89, 88, 53, 4, 240, 0, + 248, 75, 66, 189, 209, 243, 247, 255, 255, 65, 104, 35, 34, 2, 51, 84, 112, 26, 247, 253, 248, 21, 104, 35, 32, 0, 104, + 154, 105, 155, 108, 91, 97, 147, 104, 35, 34, 4, 104, 155, 96, 154, 104, 35, 74, 8, 104, 155, 96, 26, 104, 35, 104, + 155, 104, 27, 224, 1, 32, 1, 66, 64, 188, 248, 188, 2, 71, 8, 19, 112, 96, 60, 19, 114, 197, 4, 0, 1, 0, 32, 0, 1, 0, + 33, 181, 8, 33, 224, 72, 4, 2, 9, 240, 1, 249, 70, 75, 3, 96, 24, 23, 192, 188, 8, 188, 2, 71, 8, 19, 112, 162, 96, + 19, 112, 96, 68, 71, 112, 71, 112, 181, 16, 28, 4, 240, 1, 249, 66, 28, 32, 188, 16, 188, 2, 71, 8, 181, 16, 28, 4, + 240, 1, 249, 58, 28, 32, 188, 16, 188, 2, 71, 8, 181, 16, 28, 4, 240, 1, 249, 50, 28, 32, 188, 16, 188, 2, 71, 8, 181, + 8, 240, 1, 249, 75, 188, 8, 188, 1, 71, 0, 181, 8, 240, 1, 249, 69, 188, 8, 188, 1, 71, 0, 181, 8, 240, 1, 249, 63, + 188, 8, 188, 1, 71, 0, 181, 8, 75, 12, 28, 1, 34, 32, 104, 24, 240, 1, 249, 49, 40, 0, 209, 13, 72, 9, 240, 1, 249, + 8, 240, 0, 249, 63, 32, 200, 247, 252, 252, 89, 240, 0, 249, 68, 32, 200, 247, 252, 252, 84, 231, 244, 188, 8, 188, + 2, 71, 8, 19, 112, 96, 68, 19, 112, 104, 211, 181, 8, 75, 4, 28, 1, 104, 24, 240, 1, 248, 220, 188, 8, 188, 1, 71, 0, + 70, 192, 19, 112, 96, 68, 181, 248, 76, 13, 28, 15, 104, 33, 28, 30, 28, 24, 28, 21, 67, 81, 240, 1, 248, 232, 28, 56, + 28, 41, 28, 50, 247, 255, 252, 173, 35, 1, 40, 0, 208, 5, 104, 33, 28, 48, 67, 105, 240, 1, 248, 251, 35, 0, 28, 24, + 188, 248, 188, 2, 71, 8, 19, 114, 198, 0, 181, 16, 76, 11, 104, 32, 40, 0, 208, 3, 240, 0, 252, 39, 35, 0, 96, 35, 76, + 8, 104, 35, 43, 0, 209, 3, 72, 7, 247, 251, 252, 224, 96, 32, 74, 6, 35, 1, 66, 91, 96, 19, 188, 16, 188, 1, 71, 0, + 19, 112, 106, 64, 19, 112, 106, 56, 0, 0, 128, 32, 19, 112, 96, 24, 181, 56, 75, 14, 104, 24, 40, 0, 208, 1, 247, 251, + 252, 231, 76, 12, 75, 10, 104, 32, 37, 0, 96, 29, 40, 0, 208, 2, 240, 0, 251, 254, 96, 37, 75, 8, 104, 24, 40, 0, 208, + 1, 240, 0, 251, 91, 75, 5, 34, 0, 96, 26, 188, 56, 188, 1, 71, 0, 70, 192, 19, 112, 106, 56, 19, 112, 106, 64, 19, 112, + 106, 60, 181, 240, 176, 135, 75, 37, 28, 7, 104, 24, 145, 5, 40, 0, 208, 1, 247, 251, 252, 192, 75, 33, 77, 34, 34, + 0, 96, 26, 104, 43, 43, 0, 209, 23, 247, 255, 249, 95, 78, 31, 36, 0, 28, 48, 247, 255, 250, 124, 75, 29, 96, 24, 40, + 0, 208, 43, 154, 5, 104, 51, 33, 0, 144, 0, 146, 1, 72, 26, 34, 0, 148, 2, 240, 0, 249, 238, 96, 40, 40, 0, 208, 30, + 77, 23, 104, 44, 44, 0, 208, 11, 72, 22, 28, 57, 34, 6, 240, 0, 254, 214, 40, 0, 208, 19, 28, 32, 240, 0, 251, 179, + 35, 0, 96, 43, 75, 11, 28, 57, 104, 24, 240, 0, 251, 54, 75, 12, 28, 4, 96, 24, 40, 0, 208, 4, 72, 11, 28, 57, 34, 6, + 240, 0, 254, 238, 176, 7, 28, 32, 188, 240, 188, 2, 71, 8, 70, 192, 19, 112, 106, 56, 19, 112, 106, 60, 19, 114, 198, + 0, 19, 114, 198, 4, 19, 112, 71, 233, 19, 112, 106, 64, 19, 112, 96, 72, 181, 8, 28, 3, 28, 10, 32, 0, 28, 25, 35, 0, + 240, 1, 248, 60, 188, 8, 188, 1, 71, 0, 181, 8, 32, 1, 33, 0, 34, 0, 35, 0, 240, 1, 248, 50, 188, 8, 188, 2, 71, 8, + 181, 8, 32, 17, 33, 0, 34, 0, 35, 0, 240, 1, 248, 40, 188, 8, 188, 2, 71, 8, 181, 8, 32, 18, 33, 0, 34, 0, 35, 0, 240, + 1, 248, 30, 188, 8, 188, 2, 71, 8, 181, 56, 28, 5, 28, 12, 30, 19, 221, 4, 32, 2, 28, 41, 28, 34, 240, 1, 248, 17, 188, + 56, 188, 1, 71, 0, 181, 56, 28, 5, 28, 12, 30, 19, 221, 4, 32, 9, 28, 41, 28, 34, 240, 1, 248, 4, 188, 56, 188, 1, 71, + 0, 181, 8, 28, 3, 28, 10, 32, 5, 28, 25, 35, 0, 240, 0, 255, 249, 188, 8, 188, 1, 71, 0, 181, 8, 28, 3, 28, 10, 32, + 6, 28, 25, 35, 0, 240, 0, 255, 238, 188, 8, 188, 1, 71, 0, 181, 56, 28, 5, 28, 12, 28, 19, 28, 41, 28, 34, 32, 16, 240, + 0, 255, 226, 188, 56, 188, 2, 71, 8, 181, 8, 32, 128, 33, 0, 34, 0, 35, 0, 240, 0, 255, 216, 188, 8, 188, 1, 71, 0, + 181, 8, 32, 129, 33, 0, 34, 0, 35, 0, 240, 0, 255, 206, 188, 8, 188, 1, 71, 0, 181, 0, 35, 0, 224, 3, 51, 1, 6, 27, + 14, 27, 8, 64, 40, 0, 209, 249, 30, 88, 6, 0, 14, 0, 188, 2, 71, 8, 0, 0, 181, 240, 176, 133, 144, 1, 32, 84, 145, 3, + 146, 2, 28, 30, 159, 11, 247, 251, 251, 190, 28, 4, 30, 48, 209, 1, 32, 128, 0, 128, 247, 251, 251, 183, 28, 5, 32, + 128, 2, 0, 97, 32, 247, 255, 255, 218, 75, 125, 117, 32, 97, 227, 154, 10, 75, 124, 96, 37, 96, 30, 11, 211, 67, 115, + 97, 163, 155, 12, 98, 231, 43, 0, 208, 50, 33, 0, 28, 50, 28, 40, 240, 0, 254, 106, 35, 87, 112, 43, 35, 66, 112, 107, + 35, 70, 112, 171, 35, 83, 112, 235, 28, 48, 247, 255, 255, 188, 114, 40, 159, 10, 73, 111, 14, 59, 113, 43, 12, 59, + 113, 107, 10, 59, 113, 171, 113, 239, 105, 162, 35, 6, 66, 138, 217, 16, 73, 106, 35, 7, 66, 138, 217, 12, 73, 105, + 35, 8, 66, 138, 217, 8, 73, 104, 35, 9, 66, 138, 217, 4, 75, 103, 66, 147, 65, 155, 66, 91, 51, 10, 125, 34, 24, 155, + 114, 107, 224, 6, 28, 57, 152, 2, 34, 1, 28, 43, 159, 1, 240, 0, 248, 207, 120, 43, 120, 106, 6, 27, 4, 18, 67, 26, + 120, 171, 2, 27, 67, 26, 120, 235, 67, 26, 75, 91, 66, 154, 208, 4, 72, 90, 240, 0, 255, 53, 72, 90, 224, 40, 75, 90, + 104, 27, 66, 95, 65, 95, 46, 0, 208, 12, 47, 0, 208, 10, 28, 48, 247, 255, 255, 117, 122, 43, 66, 131, 208, 4, 72, 81, + 240, 0, 255, 34, 72, 82, 224, 21, 154, 10, 42, 0, 208, 31, 47, 0, 208, 29, 121, 42, 121, 107, 6, 18, 4, 27, 67, 19, + 121, 170, 159, 10, 2, 18, 67, 19, 121, 234, 67, 19, 66, 187, 208, 16, 72, 69, 240, 0, 255, 11, 72, 72, 240, 0, 255, + 8, 72, 71, 240, 0, 255, 5, 28, 32, 247, 251, 251, 68, 28, 40, 247, 251, 251, 65, 36, 0, 224, 100, 122, 46, 39, 1, 28, + 58, 64, 178, 96, 98, 122, 43, 28, 22, 147, 0, 114, 35, 121, 42, 121, 107, 6, 18, 4, 27, 67, 19, 121, 170, 121, 232, + 2, 18, 67, 19, 67, 24, 105, 33, 96, 224, 240, 0, 254, 172, 67, 112, 97, 160, 122, 107, 125, 34, 64, 159, 98, 99, 26, + 155, 105, 226, 64, 216, 64, 218, 4, 18, 12, 18, 4, 51, 12, 27, 133, 98, 50, 128, 4, 1, 133, 32, 0, 82, 30, 88, 24, 130, + 66, 91, 64, 26, 155, 3, 28, 37, 53, 72, 99, 99, 12, 201, 155, 0, 98, 39, 128, 42, 26, 127, 154, 1, 64, 223, 99, 34, + 100, 39, 154, 2, 159, 12, 99, 162, 47, 0, 209, 1, 100, 103, 224, 11, 30, 112, 24, 65, 66, 112, 64, 8, 247, 251, 250, + 217, 141, 34, 100, 96, 8, 210, 33, 255, 240, 0, 253, 159, 28, 35, 51, 72, 136, 25, 108, 32, 122, 35, 56, 1, 65, 25, + 240, 0, 254, 108, 4, 2, 104, 96, 12, 18, 28, 3, 59, 12, 135, 162, 66, 154, 217, 0, 135, 163, 247, 251, 250, 191, 35, + 0, 100, 224, 101, 35, 176, 5, 28, 32, 188, 240, 188, 2, 71, 8, 70, 192, 0, 4, 96, 144, 19, 112, 106, 76, 0, 63, 255, + 255, 0, 127, 255, 255, 0, 255, 255, 255, 1, 255, 255, 255, 3, 255, 255, 255, 87, 66, 70, 83, 19, 112, 104, 242, 19, + 112, 104, 254, 19, 112, 106, 72, 19, 112, 105, 8, 19, 112, 105, 37, 19, 112, 104, 90, 71, 56, 70, 192, 181, 240, 176, + 165, 144, 9, 28, 24, 146, 10, 147, 11, 145, 15, 247, 251, 250, 143, 35, 1, 74, 140, 77, 141, 66, 91, 96, 19, 104, 43, + 28, 4, 43, 0, 209, 3, 152, 11, 247, 251, 250, 131, 96, 40, 75, 136, 152, 11, 33, 0, 96, 24, 34, 1, 152, 10, 28, 35, + 157, 9, 240, 0, 249, 24, 40, 0, 208, 0, 224, 246, 35, 255, 0, 91, 92, 227, 43, 85, 209, 28, 51, 171, 51, 255, 92, 227, + 43, 170, 209, 23, 28, 224, 73, 125, 34, 4, 240, 0, 253, 142, 40, 0, 208, 16, 77, 123, 28, 32, 48, 54, 28, 41, 34, 3, + 240, 0, 253, 133, 40, 0, 208, 7, 28, 32, 48, 82, 28, 41, 34, 3, 240, 0, 253, 125, 40, 0, 209, 5, 168, 20, 33, 0, 34, + 64, 240, 0, 253, 26, 224, 6, 28, 33, 49, 191, 49, 255, 168, 20, 34, 64, 240, 0, 252, 208, 175, 32, 151, 5, 32, 228, + 39, 1, 66, 127, 0, 64, 38, 0, 173, 20, 144, 14, 151, 8, 122, 235, 122, 47, 122, 105, 122, 170, 147, 7, 120, 32, 120, + 99, 6, 0, 4, 27, 67, 24, 120, 163, 2, 27, 67, 24, 120, 227, 67, 24, 75, 97, 66, 152, 208, 3, 121, 40, 40, 0, 209, 0, + 224, 162, 2, 9, 4, 18, 67, 17, 67, 57, 159, 7, 6, 59, 67, 25, 145, 7, 121, 43, 43, 15, 209, 101, 33, 227, 32, 0, 0, + 73, 159, 8, 144, 12, 35, 0, 145, 13, 149, 4, 154, 7, 152, 10, 24, 210, 146, 8, 28, 17, 28, 35, 34, 1, 157, 9, 240, 0, + 248, 169, 40, 0, 208, 0, 224, 135, 72, 78, 153, 14, 92, 34, 92, 99, 2, 18, 4, 27, 67, 26, 77, 76, 155, 13, 152, 8, 92, + 225, 93, 99, 67, 10, 6, 27, 67, 19, 24, 192, 35, 235, 144, 8, 0, 91, 92, 227, 152, 10, 147, 16, 75, 69, 153, 8, 92, + 227, 34, 1, 147, 17, 35, 236, 0, 91, 92, 227, 157, 9, 147, 18, 75, 65, 92, 227, 147, 19, 28, 35, 240, 0, 248, 128, 40, + 0, 209, 95, 120, 34, 120, 99, 6, 18, 4, 27, 67, 19, 120, 162, 73, 54, 2, 18, 67, 19, 120, 226, 67, 19, 66, 139, 209, + 10, 154, 43, 66, 150, 209, 2, 144, 0, 155, 8, 224, 48, 152, 8, 66, 184, 208, 1, 54, 1, 28, 7, 153, 17, 157, 18, 2, 11, + 4, 42, 152, 16, 153, 19, 67, 19, 67, 3, 6, 10, 67, 19, 208, 53, 154, 12, 50, 1, 146, 12, 42, 8, 209, 162, 224, 47, 152, + 10, 153, 7, 34, 1, 28, 35, 159, 9, 240, 0, 248, 79, 40, 0, 209, 45, 120, 34, 120, 99, 6, 18, 4, 27, 67, 19, 120, 162, + 73, 29, 2, 18, 67, 19, 120, 226, 67, 19, 66, 139, 209, 27, 154, 43, 66, 150, 209, 15, 155, 7, 144, 0, 157, 44, 147, + 1, 152, 9, 153, 15, 154, 10, 155, 11, 149, 2, 247, 255, 253, 201, 28, 5, 28, 32, 247, 251, 249, 171, 224, 17, 159, 7, + 152, 8, 66, 135, 208, 4, 54, 1, 151, 8, 224, 1, 157, 4, 151, 8, 153, 5, 66, 141, 208, 1, 53, 16, 231, 65, 28, 32, 247, + 251, 249, 153, 37, 0, 176, 37, 28, 40, 188, 240, 188, 2, 71, 8, 70, 192, 19, 112, 96, 80, 19, 112, 106, 68, 19, 112, + 106, 76, 19, 112, 105, 65, 19, 112, 105, 70, 87, 66, 70, 83, 0, 0, 1, 199, 0, 0, 1, 201, 0, 0, 1, 215, 0, 0, 1, 217, + 71, 40, 71, 56, 181, 16, 109, 3, 28, 4, 43, 0, 208, 9, 72, 13, 240, 0, 253, 50, 72, 12, 240, 0, 253, 47, 72, 12, 240, + 0, 253, 44, 224, 13, 104, 0, 247, 251, 249, 106, 108, 224, 247, 251, 249, 103, 108, 96, 40, 0, 208, 1, 247, 251, 249, + 98, 28, 32, 247, 251, 249, 95, 188, 16, 188, 1, 71, 0, 19, 112, 104, 242, 19, 112, 105, 74, 19, 112, 104, 90, 181, 240, + 28, 3, 51, 72, 176, 131, 136, 26, 122, 3, 28, 5, 65, 26, 146, 1, 35, 1, 74, 48, 66, 91, 96, 19, 34, 0, 28, 14, 146, + 0, 39, 0, 224, 79, 104, 43, 25, 219, 123, 27, 43, 0, 208, 68, 106, 233, 155, 0, 49, 1, 24, 201, 34, 1, 107, 168, 108, + 235, 107, 44, 240, 0, 248, 83, 108, 233, 28, 48, 34, 6, 240, 0, 251, 110, 40, 0, 209, 51, 32, 12, 247, 251, 249, 13, + 30, 6, 209, 9, 72, 32, 240, 0, 252, 228, 72, 31, 240, 0, 252, 225, 72, 31, 240, 0, 252, 222, 224, 46, 28, 43, 51, 72, + 96, 53, 96, 183, 136, 24, 247, 251, 248, 250, 28, 3, 96, 112, 40, 0, 209, 12, 72, 21, 240, 0, 252, 207, 72, 21, 240, + 0, 252, 204, 72, 20, 240, 0, 252, 201, 28, 48, 247, 251, 249, 8, 224, 21, 106, 233, 154, 0, 49, 1, 24, 137, 107, 168, + 107, 44, 154, 1, 240, 0, 248, 28, 109, 43, 51, 1, 101, 43, 224, 9, 155, 0, 55, 1, 28, 26, 155, 1, 24, 210, 146, 0, 143, + 171, 66, 159, 211, 172, 38, 0, 176, 3, 28, 48, 188, 240, 188, 2, 71, 8, 70, 192, 19, 112, 96, 80, 19, 112, 104, 242, + 19, 112, 105, 118, 19, 112, 104, 90, 71, 32, 70, 192, 181, 16, 104, 3, 28, 4, 109, 26, 58, 1, 101, 26, 104, 64, 247, + 251, 248, 215, 28, 32, 247, 251, 248, 212, 188, 16, 188, 1, 71, 0, 0, 0, 181, 240, 176, 137, 104, 5, 147, 0, 106, 107, + 146, 1, 28, 6, 30, 154, 28, 8, 64, 208, 4, 2, 12, 18, 104, 104, 146, 4, 70, 132, 152, 4, 104, 116, 48, 128, 0, 64, 90, + 32, 122, 47, 106, 42, 144, 2, 36, 1, 40, 0, 209, 0, 224, 194, 58, 1, 64, 250, 27, 219, 146, 6, 63, 2, 28, 10, 64, 250, + 147, 5, 155, 6, 28, 23, 70, 96, 64, 31, 8, 131, 59, 1, 28, 26, 64, 10, 146, 7, 209, 0, 224, 133, 155, 2, 152, 5, 106, + 233, 64, 131, 24, 121, 147, 3, 24, 201, 75, 87, 104, 26, 108, 235, 66, 138, 209, 5, 74, 85, 28, 24, 104, 17, 74, 85, + 104, 18, 224, 18, 107, 44, 107, 168, 34, 1, 240, 0, 248, 165, 30, 4, 208, 0, 224, 149, 106, 235, 152, 3, 73, 76, 24, + 251, 24, 27, 96, 11, 75, 75, 108, 233, 104, 24, 75, 75, 104, 26, 240, 0, 250, 231, 154, 7, 104, 108, 0, 145, 155, 0, + 26, 100, 66, 156, 217, 0, 28, 28, 108, 235, 152, 1, 24, 89, 28, 34, 240, 0, 250, 217, 152, 0, 153, 1, 27, 0, 25, 9, + 144, 0, 145, 1, 55, 1, 40, 0, 208, 71, 154, 6, 66, 186, 210, 68, 155, 4, 104, 114, 51, 1, 4, 27, 12, 27, 147, 4, 51, + 128, 0, 91, 90, 211, 36, 1, 147, 2, 39, 0, 43, 0, 209, 54, 224, 95, 122, 43, 152, 0, 64, 216, 106, 43, 25, 194, 144, + 3, 66, 154, 217, 1, 27, 219, 147, 3, 154, 5, 106, 233, 155, 2, 24, 121, 64, 147, 24, 201, 107, 168, 107, 44, 154, 3, + 155, 1, 240, 0, 248, 86, 40, 0, 209, 70, 122, 43, 152, 3, 153, 0, 64, 152, 154, 3, 26, 9, 28, 3, 145, 0, 24, 191, 41, + 0, 208, 15, 152, 6, 66, 184, 210, 12, 154, 4, 104, 113, 50, 1, 4, 18, 12, 18, 146, 4, 50, 128, 0, 82, 90, 138, 146, + 2, 42, 0, 208, 42, 39, 0, 153, 1, 24, 201, 145, 1, 104, 107, 154, 0, 66, 154, 210, 197, 36, 0, 42, 0, 208, 34, 155, + 5, 158, 2, 106, 233, 64, 158, 24, 121, 107, 44, 107, 168, 25, 137, 108, 235, 34, 1, 240, 0, 248, 35, 30, 4, 209, 20, + 106, 235, 108, 233, 24, 255, 75, 11, 25, 190, 96, 30, 75, 11, 104, 24, 75, 11, 104, 26, 240, 0, 250, 103, 108, 233, + 152, 1, 154, 0, 240, 0, 250, 98, 224, 2, 36, 1, 224, 0, 28, 4, 176, 9, 28, 32, 188, 240, 188, 2, 71, 8, 70, 192, 19, + 112, 96, 80, 19, 112, 106, 68, 19, 112, 106, 76, 71, 32, 70, 192, 0, 0, 0, 0, 0, 0, 0, 0, 239, 0, 0, 204, 225, 47, 255, + 30, 225, 160, 0, 0, 225, 160, 0, 0, 230, 0, 0, 16, 225, 47, 255, 30, 230, 0, 0, 48, 225, 47, 255, 30, 230, 0, 0, 80, + 225, 47, 255, 30, 230, 0, 0, 112, 225, 47, 255, 30, 230, 0, 0, 144, 225, 47, 255, 30, 230, 0, 0, 176, 225, 47, 255, + 30, 230, 0, 0, 208, 225, 47, 255, 30, 230, 0, 0, 240, 225, 47, 255, 30, 230, 0, 1, 16, 225, 47, 255, 30, 230, 0, 1, + 48, 225, 47, 255, 30, 230, 0, 1, 80, 225, 47, 255, 30, 230, 0, 1, 112, 225, 47, 255, 30, 230, 0, 1, 144, 225, 47, 255, + 30, 230, 0, 1, 176, 225, 47, 255, 30, 230, 0, 1, 208, 225, 47, 255, 30, 230, 0, 1, 240, 225, 47, 255, 30, 230, 0, 2, + 16, 225, 47, 255, 30, 230, 0, 2, 48, 225, 47, 255, 30, 230, 0, 2, 80, 225, 47, 255, 30, 230, 0, 2, 112, 225, 47, 255, + 30, 230, 0, 2, 144, 225, 47, 255, 30, 230, 0, 2, 176, 225, 47, 255, 30, 230, 0, 2, 208, 225, 47, 255, 30, 230, 0, 2, + 240, 225, 47, 255, 30, 230, 0, 3, 16, 225, 47, 255, 30, 230, 0, 3, 48, 225, 47, 255, 30, 230, 0, 3, 80, 225, 47, 255, + 30, 230, 0, 3, 112, 225, 47, 255, 30, 230, 0, 3, 144, 225, 47, 255, 30, 230, 0, 3, 176, 225, 47, 255, 30, 230, 0, 3, + 208, 225, 47, 255, 30, 230, 0, 3, 240, 225, 47, 255, 30, 230, 0, 4, 16, 225, 47, 255, 30, 230, 0, 4, 48, 225, 47, 255, + 30, 230, 0, 4, 80, 225, 47, 255, 30, 230, 0, 4, 112, 225, 47, 255, 30, 230, 0, 4, 144, 225, 47, 255, 30, 230, 0, 4, + 176, 225, 47, 255, 30, 230, 0, 4, 208, 225, 47, 255, 30, 230, 0, 4, 240, 225, 47, 255, 30, 230, 0, 5, 16, 225, 47, 255, + 30, 230, 0, 5, 48, 225, 47, 255, 30, 230, 0, 5, 80, 225, 47, 255, 30, 230, 0, 6, 144, 225, 47, 255, 30, 230, 0, 7, 240, + 225, 47, 255, 30, 230, 0, 8, 16, 225, 47, 255, 30, 230, 0, 10, 16, 225, 47, 255, 30, 226, 144, 16, 0, 227, 176, 0, 4, + 239, 0, 0, 171, 225, 47, 255, 30, 225, 160, 0, 0, 225, 160, 0, 0, 180, 3, 70, 113, 8, 73, 0, 64, 0, 73, 90, 9, 0, 73, + 68, 142, 188, 3, 71, 112, 226, 81, 32, 1, 1, 47, 255, 30, 58, 0, 0, 54, 225, 80, 0, 1, 154, 0, 0, 34, 225, 17, 0, 2, + 10, 0, 0, 35, 227, 17, 2, 14, 1, 160, 17, 129, 3, 160, 48, 8, 19, 160, 48, 1, 227, 81, 2, 1, 49, 81, 0, 0, 49, 160, + 18, 1, 49, 160, 50, 3, 58, 255, 255, 250, 227, 81, 1, 2, 49, 81, 0, 0, 49, 160, 16, 129, 49, 160, 48, 131, 58, 255, + 255, 250, 227, 160, 32, 0, 225, 80, 0, 1, 32, 64, 0, 1, 33, 130, 32, 3, 225, 80, 0, 161, 32, 64, 0, 161, 33, 130, 32, + 163, 225, 80, 1, 33, 32, 64, 1, 33, 33, 130, 33, 35, 225, 80, 1, 161, 32, 64, 1, 161, 33, 130, 33, 163, 227, 80, 0, + 0, 17, 176, 50, 35, 17, 160, 18, 33, 26, 255, 255, 239, 225, 160, 0, 2, 225, 47, 255, 30, 3, 160, 0, 1, 19, 160, 0, + 0, 225, 47, 255, 30, 227, 81, 8, 1, 33, 160, 24, 33, 35, 160, 32, 16, 51, 160, 32, 0, 227, 81, 12, 1, 33, 160, 20, 33, + 34, 130, 32, 8, 227, 81, 0, 16, 33, 160, 18, 33, 34, 130, 32, 4, 227, 81, 0, 4, 130, 130, 32, 3, 144, 130, 32, 161, + 225, 160, 2, 48, 225, 47, 255, 30, 225, 47, 255, 31, 225, 160, 0, 0, 227, 80, 0, 0, 19, 224, 0, 0, 234, 0, 1, 11, 227, + 81, 0, 0, 10, 255, 255, 248, 233, 45, 64, 3, 235, 255, 255, 188, 232, 189, 64, 6, 224, 3, 0, 146, 224, 65, 16, 3, 225, + 47, 255, 30, 227, 81, 0, 0, 10, 0, 0, 67, 224, 32, 192, 1, 66, 97, 16, 0, 226, 81, 32, 1, 10, 0, 0, 39, 225, 176, 48, + 0, 66, 96, 48, 0, 225, 83, 0, 1, 154, 0, 0, 38, 225, 17, 0, 2, 10, 0, 0, 40, 227, 17, 2, 14, 1, 160, 17, 129, 3, 160, + 32, 8, 19, 160, 32, 1, 227, 81, 2, 1, 49, 81, 0, 3, 49, 160, 18, 1, 49, 160, 34, 2, 58, 255, 255, 250, 227, 81, 1, 2, + 49, 81, 0, 3, 49, 160, 16, 129, 49, 160, 32, 130, 58, 255, 255, 250, 227, 160, 0, 0, 225, 83, 0, 1, 32, 67, 48, 1, 33, + 128, 0, 2, 225, 83, 0, 161, 32, 67, 48, 161, 33, 128, 0, 162, 225, 83, 1, 33, 32, 67, 49, 33, 33, 128, 1, 34, 225, 83, + 1, 161, 32, 67, 49, 161, 33, 128, 1, 162, 227, 83, 0, 0, 17, 176, 34, 34, 17, 160, 18, 33, 26, 255, 255, 239, 227, 92, + 0, 0, 66, 96, 0, 0, 225, 47, 255, 30, 225, 60, 0, 0, 66, 96, 0, 0, 225, 47, 255, 30, 51, 160, 0, 0, 1, 160, 15, 204, + 3, 128, 0, 1, 225, 47, 255, 30, 227, 81, 8, 1, 33, 160, 24, 33, 35, 160, 32, 16, 51, 160, 32, 0, 227, 81, 12, 1, 33, + 160, 20, 33, 34, 130, 32, 8, 227, 81, 0, 16, 33, 160, 18, 33, 34, 130, 32, 4, 227, 81, 0, 4, 130, 130, 32, 3, 144, 130, + 32, 161, 227, 92, 0, 0, 225, 160, 2, 51, 66, 96, 0, 0, 225, 47, 255, 30, 225, 47, 255, 31, 225, 160, 0, 0, 227, 80, + 0, 0, 195, 224, 1, 2, 179, 160, 1, 2, 234, 0, 0, 183, 227, 81, 0, 0, 10, 255, 255, 247, 233, 45, 64, 3, 235, 255, 255, + 177, 232, 189, 64, 6, 224, 3, 0, 146, 224, 65, 16, 3, 225, 47, 255, 30, 71, 112, 70, 192, 33, 16, 6, 2, 14, 3, 65, 200, + 67, 19, 6, 2, 14, 0, 67, 16, 65, 200, 67, 24, 71, 112, 70, 192, 181, 112, 28, 4, 28, 13, 42, 3, 217, 33, 28, 11, 67, + 3, 7, 158, 208, 18, 120, 32, 120, 41, 66, 136, 209, 29, 58, 1, 35, 0, 224, 5, 52, 1, 51, 1, 120, 32, 92, 233, 66, 136, + 209, 20, 66, 154, 209, 247, 32, 0, 188, 112, 188, 2, 71, 8, 28, 13, 28, 4, 201, 8, 200, 64, 66, 158, 209, 4, 58, 4, + 28, 4, 28, 13, 42, 3, 216, 244, 32, 0, 42, 0, 209, 222, 231, 237, 26, 64, 231, 235, 70, 192, 181, 240, 28, 5, 28, 14, + 28, 20, 42, 15, 217, 3, 28, 11, 67, 3, 7, 159, 208, 10, 44, 0, 208, 5, 35, 0, 92, 242, 84, 234, 51, 1, 66, 163, 209, + 250, 188, 240, 188, 2, 71, 8, 28, 21, 28, 12, 28, 3, 104, 38, 96, 30, 104, 102, 96, 94, 104, 166, 96, 158, 104, 230, + 61, 16, 96, 222, 52, 16, 51, 16, 45, 15, 216, 242, 58, 16, 9, 23, 28, 126, 1, 63, 1, 54, 27, 215, 25, 133, 28, 60, 25, + 142, 47, 3, 217, 217, 28, 52, 28, 59, 28, 42, 204, 2, 59, 4, 194, 2, 43, 3, 216, 250, 63, 4, 8, 188, 28, 99, 0, 155, + 0, 164, 24, 237, 24, 246, 27, 60, 231, 200, 70, 192, 181, 112, 28, 3, 7, 132, 208, 13, 42, 0, 208, 64, 6, 13, 58, 1, + 14, 45, 36, 3, 224, 2, 42, 0, 208, 57, 58, 1, 112, 29, 51, 1, 66, 35, 209, 248, 42, 3, 217, 41, 37, 255, 64, 13, 2, + 44, 67, 37, 4, 44, 28, 30, 67, 37, 42, 15, 217, 18, 28, 28, 28, 22, 62, 16, 96, 37, 96, 101, 96, 165, 96, 229, 52, 16, + 46, 15, 216, 247, 58, 16, 9, 22, 54, 1, 1, 54, 25, 158, 35, 15, 64, 26, 42, 3, 217, 12, 28, 52, 28, 19, 59, 4, 196, + 32, 43, 3, 216, 251, 58, 4, 8, 147, 51, 1, 0, 155, 24, 246, 35, 3, 64, 26, 28, 51, 42, 0, 208, 6, 6, 9, 14, 12, 33, + 0, 84, 92, 49, 1, 66, 138, 209, 251, 188, 112, 188, 2, 71, 8, 120, 2, 120, 11, 48, 1, 49, 1, 42, 0, 208, 1, 66, 154, + 208, 247, 26, 208, 71, 112, 35, 0, 92, 194, 51, 1, 42, 0, 209, 251, 30, 88, 71, 112, 70, 192, 181, 240, 28, 3, 32, 0, + 42, 0, 208, 72, 28, 8, 67, 24, 36, 3, 30, 85, 64, 4, 209, 42, 28, 30, 28, 13, 42, 3, 217, 67, 104, 31, 104, 8, 66, 135, + 209, 63, 58, 4, 28, 32, 42, 0, 208, 54, 72, 34, 24, 61, 67, 189, 79, 33, 28, 32, 66, 61, 209, 47, 29, 28, 29, 8, 224, + 11, 204, 8, 200, 2, 66, 139, 209, 45, 58, 4, 42, 0, 208, 40, 77, 25, 25, 89, 67, 153, 66, 57, 209, 35, 28, 38, 28, 5, + 42, 3, 216, 239, 28, 35, 28, 1, 42, 0, 208, 33, 30, 85, 120, 28, 120, 8, 66, 132, 209, 18, 32, 0, 45, 0, 208, 16, 44, + 0, 208, 14, 61, 1, 34, 0, 224, 4, 66, 170, 208, 12, 50, 1, 44, 0, 208, 9, 24, 152, 120, 68, 24, 136, 120, 64, 66, 132, + 208, 244, 26, 32, 188, 240, 188, 2, 71, 8, 32, 0, 231, 250, 28, 41, 28, 51, 30, 85, 231, 222, 120, 36, 120, 0, 26, 32, + 231, 242, 70, 192, 254, 254, 254, 255, 128, 128, 128, 128, 0, 0, 0, 0, 71, 120, 70, 192, 234, 255, 254, 125, 71, 120, + 70, 192, 234, 255, 254, 137, 71, 120, 70, 192, 234, 255, 254, 123, 71, 120, 70, 192, 234, 255, 254, 253, 71, 120, 70, + 192, 234, 255, 233, 193, 71, 120, 70, 192, 234, 255, 254, 119, 71, 120, 70, 192, 234, 255, 254, 184, 71, 120, 70, 192, + 234, 255, 254, 163, 71, 120, 70, 192, 234, 255, 233, 218, 229, 159, 192, 0, 225, 47, 255, 28, 19, 112, 86, 161, 71, + 120, 70, 192, 234, 255, 254, 124, 71, 120, 70, 192, 234, 255, 254, 244, 71, 120, 70, 192, 234, 255, 255, 62, 71, 120, + 70, 192, 234, 255, 254, 84, 71, 120, 70, 192, 234, 255, 254, 80, 71, 120, 70, 192, 234, 255, 254, 112, 71, 120, 70, + 192, 234, 255, 254, 86, 71, 120, 70, 192, 234, 255, 254, 88, 71, 120, 70, 192, 234, 255, 233, 206, 71, 120, 70, 192, + 234, 255, 254, 96, 71, 120, 70, 192, 234, 255, 254, 144, 71, 120, 70, 192, 234, 255, 233, 196, 71, 120, 70, 192, 234, + 255, 254, 136, 71, 120, 70, 192, 234, 255, 254, 84, 71, 120, 70, 192, 234, 255, 233, 150, 71, 120, 70, 192, 234, 255, + 254, 124, 71, 120, 70, 192, 234, 255, 254, 34, 71, 120, 70, 192, 234, 255, 254, 66, 71, 120, 70, 192, 234, 255, 233, + 138, 71, 120, 70, 192, 234, 255, 254, 82, 71, 120, 70, 192, 234, 255, 254, 118, 71, 120, 70, 192, 234, 255, 254, 34, + 0, 0, 0, 0, 73, 79, 83, 32, 109, 111, 100, 117, 108, 101, 0, 0, 255, 255, 255, 255, 1, 0, 0, 0, 0, 0, 0, 1, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 229, 31, 240, 4, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 0, 15, 66, 64, 19, 114, 197, 4, 16, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, + 255, 255, 87, 66, 70, 83, 32, 110, 111, 116, 32, 101, 110, 111, 117, 103, 104, 32, 109, 101, 109, 111, 114, 121, 33, + 10, 0, 47, 100, 101, 118, 47, 117, 115, 98, 49, 50, 51, 0, 47, 100, 101, 118, 47, 117, 115, 98, 49, 50, 51, 47, 79, + 70, 70, 0, 102, 105, 114, 115, 116, 32, 114, 101, 97, 100, 32, 115, 101, 99, 116, 111, 114, 32, 40, 37, 105, 41, 32, + 79, 75, 10, 0, 102, 105, 114, 115, 116, 32, 114, 101, 97, 100, 32, 115, 101, 99, 116, 111, 114, 32, 40, 37, 105, 41, + 32, 69, 82, 82, 79, 82, 10, 0, 101, 104, 99, 105, 95, 105, 110, 116, 95, 119, 111, 114, 107, 105, 110, 103, 95, 99, + 97, 108, 108, 98, 97, 99, 107, 95, 112, 97, 114, 116, 49, 44, 32, 116, 105, 109, 101, 111, 117, 116, 58, 32, 37, 117, + 10, 0, 114, 101, 116, 114, 121, 10, 0, 117, 114, 98, 32, 114, 101, 116, 118, 97, 108, 58, 32, 37, 105, 10, 0, 117, 110, + 97, 98, 108, 101, 32, 116, 111, 32, 103, 101, 116, 32, 100, 101, 118, 105, 99, 101, 32, 100, 101, 115, 99, 46, 46, 46, + 10, 0, 103, 101, 116, 116, 105, 110, 103, 32, 85, 83, 66, 95, 82, 69, 81, 95, 71, 69, 84, 68, 69, 83, 67, 82, 73, 80, + 84, 79, 82, 32, 45, 32, 114, 101, 115, 101, 116, 10, 0, 101, 114, 114, 111, 114, 32, 103, 101, 116, 116, 105, 110, 103, + 32, 85, 83, 66, 95, 82, 69, 81, 95, 71, 69, 84, 68, 69, 83, 67, 82, 73, 80, 84, 79, 82, 10, 0, 103, 101, 116, 116, 105, + 110, 103, 32, 85, 83, 66, 95, 82, 69, 81, 95, 71, 69, 84, 68, 69, 83, 67, 82, 73, 80, 84, 79, 82, 32, 45, 32, 97, 100, + 113, 117, 105, 114, 101, 32, 45, 32, 114, 101, 115, 101, 116, 10, 0, 85, 83, 66, 95, 82, 69, 81, 95, 71, 69, 84, 68, + 69, 83, 67, 82, 73, 80, 84, 79, 82, 32, 111, 107, 10, 0, 116, 114, 121, 105, 110, 103, 32, 85, 83, 66, 95, 82, 69, 81, + 95, 83, 69, 84, 65, 68, 68, 82, 69, 83, 83, 58, 32, 37, 100, 10, 0, 117, 110, 97, 98, 108, 101, 32, 116, 111, 32, 115, + 101, 116, 32, 100, 101, 118, 105, 99, 101, 32, 97, 100, 100, 114, 58, 32, 37, 100, 10, 0, 85, 83, 66, 95, 82, 69, 81, + 95, 83, 69, 84, 65, 68, 68, 82, 69, 83, 83, 32, 111, 107, 58, 32, 37, 100, 10, 0, 101, 114, 114, 111, 114, 32, 99, 104, + 101, 99, 107, 105, 110, 103, 32, 85, 83, 66, 95, 82, 69, 81, 95, 71, 69, 84, 68, 69, 83, 67, 82, 73, 80, 84, 79, 82, + 10, 0, 111, 107, 32, 99, 104, 101, 99, 107, 105, 110, 103, 32, 85, 83, 66, 95, 82, 69, 81, 95, 71, 69, 84, 68, 69, 83, + 67, 82, 73, 80, 84, 79, 82, 10, 0, 105, 110, 105, 116, 32, 111, 107, 10, 0, 10, 113, 116, 100, 32, 101, 114, 114, 111, + 114, 33, 58, 0, 32, 66, 65, 66, 66, 76, 69, 0, 32, 32, 109, 105, 115, 115, 101, 100, 32, 109, 105, 99, 114, 111, 32, + 102, 114, 97, 109, 101, 0, 32, 32, 100, 97, 116, 97, 98, 117, 102, 102, 101, 114, 32, 101, 114, 114, 111, 114, 0, 32, + 119, 114, 111, 110, 103, 32, 97, 99, 107, 0, 32, 116, 111, 111, 32, 109, 97, 110, 121, 32, 101, 114, 114, 111, 114, + 115, 0, 105, 110, 116, 101, 114, 114, 117, 112, 116, 95, 99, 97, 108, 108, 98, 97, 99, 107, 95, 104, 97, 110, 100, 32, + 83, 84, 83, 95, 73, 78, 84, 10, 0, 105, 110, 116, 101, 114, 114, 117, 112, 116, 95, 99, 97, 108, 108, 98, 97, 99, 107, + 95, 104, 97, 110, 100, 32, 83, 84, 83, 95, 80, 67, 68, 10, 0, 117, 115, 98, 115, 116, 111, 114, 97, 103, 101, 32, 114, + 101, 115, 101, 116, 58, 32, 66, 85, 76, 75, 32, 82, 69, 83, 69, 84, 32, 37, 105, 10, 0, 117, 115, 98, 115, 116, 111, + 114, 97, 103, 101, 32, 114, 101, 115, 101, 116, 58, 32, 99, 108, 101, 97, 114, 104, 97, 108, 116, 32, 105, 110, 32, + 114, 101, 116, 32, 37, 105, 10, 0, 117, 115, 98, 115, 116, 111, 114, 97, 103, 101, 32, 114, 101, 115, 101, 116, 58, + 32, 99, 108, 101, 97, 114, 104, 97, 108, 116, 32, 111, 117, 116, 32, 114, 101, 116, 32, 37, 105, 10, 0, 117, 115, 98, + 115, 116, 111, 114, 97, 103, 101, 32, 114, 101, 115, 101, 116, 58, 32, 85, 83, 66, 95, 71, 101, 116, 67, 111, 110, 102, + 105, 103, 117, 114, 97, 116, 105, 111, 110, 32, 114, 101, 116, 32, 37, 105, 10, 0, 114, 101, 115, 101, 116, 32, 111, + 107, 10, 0, 95, 95, 115, 101, 110, 100, 95, 99, 98, 119, 32, 114, 101, 116, 32, 37, 105, 10, 0, 95, 95, 85, 83, 66, + 95, 66, 108, 107, 77, 115, 103, 84, 105, 109, 101, 111, 117, 116, 32, 37, 105, 10, 0, 95, 95, 114, 101, 97, 100, 95, + 99, 115, 119, 32, 37, 105, 10, 0, 32, 32, 32, 32, 83, 67, 83, 73, 95, 84, 69, 83, 84, 95, 85, 78, 73, 84, 95, 82, 69, + 65, 68, 89, 32, 114, 101, 116, 32, 37, 105, 10, 0, 32, 32, 32, 32, 83, 67, 83, 73, 95, 82, 69, 81, 85, 69, 83, 84, 95, + 83, 69, 78, 83, 69, 32, 114, 101, 116, 32, 37, 105, 10, 0, 32, 32, 32, 32, 83, 67, 83, 73, 95, 82, 69, 81, 85, 69, 83, + 84, 95, 83, 69, 78, 83, 69, 32, 115, 116, 97, 116, 117, 115, 32, 37, 120, 10, 0, 85, 83, 66, 83, 116, 111, 114, 97, + 103, 101, 95, 79, 112, 101, 110, 40, 41, 58, 32, 85, 83, 66, 95, 71, 101, 116, 68, 101, 115, 99, 114, 105, 112, 116, + 111, 114, 115, 32, 37, 105, 10, 0, 85, 83, 66, 83, 116, 111, 114, 97, 103, 101, 95, 79, 112, 101, 110, 40, 41, 58, 32, + 100, 101, 118, 105, 99, 101, 32, 99, 104, 97, 110, 103, 101, 100, 33, 33, 33, 10, 0, 85, 83, 66, 83, 116, 111, 114, + 97, 103, 101, 95, 79, 112, 101, 110, 40, 41, 58, 32, 117, 99, 100, 32, 37, 105, 32, 80, 111, 119, 101, 114, 32, 37, + 105, 32, 109, 65, 10, 0, 85, 83, 66, 83, 116, 111, 114, 97, 103, 101, 95, 79, 112, 101, 110, 40, 41, 58, 32, 105, 110, + 116, 101, 114, 102, 97, 99, 101, 32, 115, 117, 98, 99, 108, 97, 115, 115, 32, 37, 105, 32, 97, 116, 97, 95, 112, 114, + 111, 116, 32, 37, 105, 32, 10, 0, 73, 110, 32, 80, 111, 105, 110, 116, 58, 32, 37, 105, 10, 0, 79, 117, 116, 32, 80, + 111, 105, 110, 116, 58, 32, 37, 105, 10, 0, 101, 112, 95, 105, 110, 32, 37, 120, 32, 101, 112, 95, 111, 117, 116, 32, + 37, 120, 10, 0, 85, 83, 66, 83, 116, 111, 114, 97, 103, 101, 95, 79, 112, 101, 110, 40, 41, 58, 32, 99, 97, 110, 110, + 111, 116, 32, 102, 105, 110, 100, 32, 97, 110, 121, 32, 105, 110, 116, 101, 114, 102, 97, 99, 101, 33, 33, 33, 10, 0, + 85, 83, 66, 83, 116, 111, 114, 97, 103, 101, 95, 79, 112, 101, 110, 40, 41, 58, 32, 99, 111, 110, 102, 58, 32, 37, 120, + 32, 97, 108, 116, 73, 110, 116, 101, 114, 102, 97, 99, 101, 58, 32, 37, 120, 10, 0, 85, 83, 66, 95, 71, 101, 116, 67, + 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 40, 41, 32, 69, 114, 114, 111, 114, 10, 0, 65, 99, 116, 117, + 97, 108, 32, 99, 111, 110, 102, 58, 32, 37, 120, 32, 32, 32, 110, 101, 120, 116, 32, 99, 111, 110, 102, 58, 32, 37, + 120, 10, 0, 85, 83, 66, 95, 83, 101, 116, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 40, 41, 32, + 69, 114, 114, 111, 114, 10, 0, 85, 83, 66, 95, 83, 101, 116, 65, 108, 116, 101, 114, 110, 97, 116, 105, 118, 101, 73, + 110, 116, 101, 114, 102, 97, 99, 101, 40, 41, 32, 69, 114, 114, 111, 114, 46, 32, 67, 111, 110, 116, 105, 110, 117, + 101, 10, 0, 85, 83, 66, 95, 83, 101, 116, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 40, 41, 32, + 38, 32, 85, 83, 66, 95, 83, 101, 116, 65, 108, 116, 101, 114, 110, 97, 116, 105, 118, 101, 73, 110, 116, 101, 114, 102, + 97, 99, 101, 40, 41, 32, 79, 75, 10, 0, 71, 101, 116, 95, 77, 97, 120, 95, 76, 117, 110, 40, 41, 58, 32, 101, 114, 114, + 44, 32, 100, 101, 102, 97, 117, 108, 116, 32, 109, 97, 120, 95, 108, 117, 110, 61, 56, 10, 0, 71, 101, 116, 95, 77, + 97, 120, 95, 76, 117, 110, 40, 41, 58, 32, 79, 75, 58, 32, 37, 105, 10, 0, 85, 83, 66, 83, 116, 111, 114, 97, 103, 101, + 95, 79, 112, 101, 110, 40, 41, 58, 32, 116, 114, 121, 95, 115, 116, 97, 116, 117, 115, 32, 37, 105, 10, 0, 85, 83, 66, + 83, 116, 111, 114, 97, 103, 101, 95, 79, 112, 101, 110, 40, 41, 58, 32, 79, 75, 44, 32, 114, 101, 116, 117, 114, 110, + 32, 48, 10, 0, 32, 32, 32, 32, 115, 116, 97, 114, 116, 95, 115, 116, 111, 112, 32, 99, 109, 100, 32, 114, 101, 116, + 32, 37, 105, 10, 0, 32, 32, 32, 32, 73, 110, 113, 117, 105, 114, 121, 32, 114, 101, 116, 32, 37, 105, 10, 0, 32, 32, + 32, 32, 68, 101, 118, 105, 99, 101, 32, 84, 121, 112, 101, 58, 32, 37, 120, 10, 0, 32, 32, 32, 32, 82, 101, 97, 100, + 67, 97, 112, 97, 99, 105, 116, 121, 32, 114, 101, 116, 32, 37, 105, 32, 32, 115, 101, 99, 116, 111, 114, 95, 115, 105, + 122, 101, 58, 32, 37, 117, 32, 32, 115, 101, 99, 116, 111, 114, 115, 58, 32, 37, 117, 10, 0, 70, 97, 115, 116, 32, 85, + 83, 66, 83, 116, 111, 114, 97, 103, 101, 95, 77, 111, 117, 110, 116, 76, 85, 78, 32, 37, 105, 35, 10, 0, 85, 83, 66, + 83, 116, 111, 114, 97, 103, 101, 95, 77, 111, 117, 110, 116, 76, 85, 78, 58, 32, 114, 101, 116, 32, 37, 105, 10, 0, + 85, 83, 66, 83, 84, 79, 82, 65, 71, 69, 95, 71, 69, 84, 95, 77, 65, 88, 95, 76, 85, 78, 32, 114, 101, 116, 32, 37, 105, + 32, 109, 97, 120, 108, 117, 110, 32, 37, 105, 10, 0, 85, 83, 66, 83, 116, 111, 114, 97, 103, 101, 95, 77, 111, 117, + 110, 116, 76, 85, 78, 32, 102, 97, 105, 108, 33, 33, 33, 10, 0, 10, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 10, 82, 111, 100, 114, 105, 101, 115, 32, 101, 104, 99, 109, 111, 100, 117, + 108, 101, 32, 49, 46, 48, 10, 85, 83, 66, 83, 116, 111, 114, 97, 103, 101, 95, 73, 110, 105, 116, 40, 41, 10, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 10, 10, 0, 85, 83, 66, 83, 116, 111, + 114, 97, 103, 101, 95, 73, 110, 105, 116, 40, 41, 32, 79, 107, 10, 0, 69, 114, 114, 111, 114, 32, 82, 101, 97, 100, + 105, 110, 103, 32, 115, 101, 99, 116, 111, 114, 32, 48, 10, 0, 79, 75, 32, 82, 101, 97, 100, 105, 110, 103, 32, 115, + 101, 99, 116, 111, 114, 32, 48, 10, 0, 85, 110, 112, 108, 117, 103, 58, 32, 114, 101, 115, 101, 116, 32, 37, 105, 32, + 115, 116, 97, 116, 117, 115, 32, 37, 120, 10, 0, 102, 97, 115, 116, 95, 114, 101, 109, 111, 117, 110, 116, 32, 75, 79, + 32, 114, 101, 116, 32, 37, 105, 10, 0, 85, 83, 66, 32, 65, 108, 108, 111, 99, 58, 32, 110, 111, 116, 32, 101, 110, 111, + 117, 103, 104, 32, 109, 101, 109, 111, 114, 121, 33, 10, 0, 119, 98, 102, 115, 32, 101, 114, 114, 111, 114, 32, 0, 98, + 97, 100, 32, 109, 97, 103, 105, 99, 0, 104, 100, 32, 115, 101, 99, 116, 111, 114, 32, 115, 105, 122, 101, 32, 100, 111, + 101, 115, 110, 39, 116, 32, 109, 97, 116, 99, 104, 0, 104, 100, 32, 110, 117, 109, 32, 115, 101, 99, 116, 111, 114, + 32, 100, 111, 101, 115, 110, 39, 116, 32, 109, 97, 116, 99, 104, 0, 78, 84, 70, 83, 0, 70, 65, 84, 0, 116, 114, 121, + 105, 110, 103, 32, 116, 111, 32, 99, 108, 111, 115, 101, 32, 119, 98, 102, 115, 32, 119, 104, 105, 108, 101, 32, 100, + 105, 115, 99, 115, 32, 115, 116, 105, 108, 108, 32, 111, 112, 101, 110, 0, 97, 108, 108, 111, 99, 97, 116, 105, 110, + 103, 32, 109, 101, 109, 111, 114, 121, 0 +}; diff --git a/source/mload/modules/ehcmodule_5.h b/ehcmodule/bin/ehcmodule_5.h similarity index 96% rename from source/mload/modules/ehcmodule_5.h rename to ehcmodule/bin/ehcmodule_5.h index c0a0f306..a0ae319a 100644 --- a/source/mload/modules/ehcmodule_5.h +++ b/ehcmodule/bin/ehcmodule_5.h @@ -1,3 +1,3 @@ -#define size_ehcmodule_5 25776 - -extern unsigned char ehcmodule_5[25776]; +#define size_ehcmodule_5 25776 + +extern unsigned char ehcmodule_5[25776]; diff --git a/ehcmodule/bin/filetochar.exe b/ehcmodule/bin/filetochar.exe new file mode 100644 index 00000000..b0a3d511 Binary files /dev/null and b/ehcmodule/bin/filetochar.exe differ diff --git a/ehcmodule/include/libwbfs_os.h b/ehcmodule/include/libwbfs_os.h new file mode 100644 index 00000000..c7dd4b65 --- /dev/null +++ b/ehcmodule/include/libwbfs_os.h @@ -0,0 +1,30 @@ +#ifndef LIBWBFS_OS_H +#define LIBWBFS_OS_H +// libwbfs_os.h for ehc module env + +#include "syscalls.h" +#include "ehci_types.h" +#include "ehci.h" + +void *WBFS_Alloc(int size); +void WBFS_Free(void *ptr); +void my_sprint(char *cad, char *s); + +#define wbfs_fatal(x) do{os_puts("wbfs panic ");os_puts(x);os_puts("\n"); while(1) ehci_msleep(100);}while(0) +#define wbfs_error(x) do{os_puts("wbfs error ");os_puts(x);;os_puts("\n");}while(0) +#define wbfs_malloc(x) WBFS_Alloc(x) +#define wbfs_free(x) WBFS_Free(x) +#define wbfs_ioalloc(x) WBFS_Alloc(x) +#define wbfs_iofree(x) WBFS_Free(x) +#define wbfs_ntohl(x) (x) +#define wbfs_htonl(x) (x) +#define wbfs_ntohs(x) (x) +#define wbfs_htons(x) (x) + +#include +#define wbfs_memcmp(x,y,z) memcmp(x,y,z) +#define wbfs_memcpy(x,y,z) memcpy(x,y,z) +#define wbfs_memset(x,y,z) memset(x,y,z) + + +#endif diff --git a/ehcmodule/include/utils.h b/ehcmodule/include/utils.h new file mode 100644 index 00000000..87bc401f --- /dev/null +++ b/ehcmodule/include/utils.h @@ -0,0 +1,9 @@ +#define swab32(x) ((u32)( \ + (((u32)(x) & (u32)0x000000ffUL) << 24) | \ + (((u32)(x) & (u32)0x0000ff00UL) << 8) | \ + (((u32)(x) & (u32)0x00ff0000UL) >> 8) | \ + (((u32)(x) & (u32)0xff000000UL) >> 24))) +#define swab16(x) ((u16)( \ + (((u16)(x) & (u16)0x00ffU) << 8) | \ + (((u16)(x) & (u16)0xff00U) >> 8))) + diff --git a/ehcmodule/m.bat b/ehcmodule/m.bat new file mode 100644 index 00000000..402cf0f0 --- /dev/null +++ b/ehcmodule/m.bat @@ -0,0 +1,8 @@ +make +if not %errorlevel% == 0 goto end +@echo off +cd bin +call convert.bat +cd .. + +:end diff --git a/ehcmodule/scripts/link.ld b/ehcmodule/scripts/link.ld new file mode 100644 index 00000000..48ae244a --- /dev/null +++ b/ehcmodule/scripts/link.ld @@ -0,0 +1,50 @@ +OUTPUT_FORMAT("elf32-bigarm", "elf32-bigarm", "elf32-littlearm") +OUTPUT_ARCH(arm) +ENTRY(_start) + + +/* + Change exe start and ram start as needed for the custom IOS module. + Current settings are for the EHC module from IOS 31. actually this is free space in this IOS + */ + +MEMORY { + ios_info_table : ORIGIN = 0x0, LENGTH = 0x4000 + exe(rwx) : ORIGIN = 0x13700000, LENGTH = 0x6000 + ram(rw) : ORIGIN = 0x13706000, LENGTH = 0x2A000 /* END 0x13730000 */ +} + + + +__exe_start_virt__ = 0x13700000; +__exe_start_phys__ = 0x13700000; +__ram_start_virt__ = 0x13706000; +__ram_start_phys__ = 0x13706000; +__ios_info_table_start = 0x0; + + +SECTIONS +{ + .debug_aranges 0 : { *(.debug_aranges) } .debug_pubnames 0 : { *(.debug_pubnames) } .debug_info 0 : { *(.debug_info) } .debug_abbrev 0 : { *(.debug_abbrev) } .debug_line 0 : { *(.debug_line) } .debug_frame 0 : { *(.debug_frame) } .debug_str 0 : { *(.debug_str) } .debug_loc 0 : { *(.debug_loc) } .debug_macinfo 0 : { *(.debug_macinfo) } .note.arm.ident 0 : { KEEP (*(.note.arm.ident)) } + .ios_info_table __ios_info_table_start : { . = .; KEEP (*(.ios_info_table)) } > ios_info_table + .init __exe_start_virt__ : AT (__exe_start_phys__) { . = .; KEEP (*(.init)) } > exe + .text ALIGN (0x20) : { + *(.text*) + *(.gnu.warning) + *(.gnu.linkonce.t.*) + *(.init) + *(.glue_7) + *(.glue_7t) } > exe + .data __ram_start_virt__ : AT (__ram_start_phys__) { KEEP( *(.ios_data) ) *(.data*) *(.data1) *(.gnu.linkonce.d.*) . = ALIGN (4); __CTOR_LIST__ = ABSOLUTE (.); KEEP (*(SORT (.ctors*))) __CTOR_END__ = ABSOLUTE (.); __DTOR_LIST__ = ABSOLUTE (.); KEEP (*(SORT (.dtors*))) __DTOR_END__ = ABSOLUTE (.); *(.dynamic) *(.sdata*) *(.gnu.linkonce.s.*) . = ALIGN (4); *(.2ram.*) } > ram + .fini : { . = .; *(.fini) } > ram + .rodata ALIGN (0x4) : { + . = .; + *(.rodata*) + *(.gnu.linkonce.r.*) } > ram + .rodata1 ALIGN (0x4) : { . = .; *(.rodata1) } > ram + .fixup ALIGN (0x4) : { . = .; *(.fixup) } > ram + .gcc_except_table ALIGN (0x4) : { . = .; *(.gcc_except_table) } > ram + .got ALIGN (0x4) : { *(.got.plt) *(.got) } > ram + .bss ALIGN (0x20) : { *(.scommon) *(.dynsbss) *(.sbss*) *(.gnu.linkonce.sb.*) *(.dynbss) *(.bss*) *(.gnu.linkonce.b.*) *(COMMON) KEEP( *(.ios_bss) ) } > ram + . = ALIGN(4); +} diff --git a/ehcmodule/scripts/nostart.specs b/ehcmodule/scripts/nostart.specs new file mode 100644 index 00000000..9c27dcad --- /dev/null +++ b/ehcmodule/scripts/nostart.specs @@ -0,0 +1,2 @@ +*startfile: +crti%O%s crtbegin%O%s diff --git a/ehcmodule/source/crt0.s b/ehcmodule/source/crt0.s new file mode 100644 index 00000000..46b7fc79 --- /dev/null +++ b/ehcmodule/source/crt0.s @@ -0,0 +1,249 @@ +/* + Custom IOS module for Wii. + Copyright (C) 2008 neimod. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + + .section ".init" + .global _start + + .align 4 + .arm + +/******************************************************************************* + * + * crt0.s - IOS module startup code + * + ******************************************************************************* + * + * + * v1.0 - 26 July 2008 - initial release by neimod + * v1.1 - 5 September 2008 - prepared for public release + * + */ + + .EQU ios_thread_arg, 4 + .EQU ios_thread_priority, 0x78 //0x48 + .EQU ios_thread_stacksize, 0x3000 + + +_start: + + /* Execute main program */ + mov r0, #0 @ int argc + mov r1, #0 @ char *argv[] + ldr r3, =main + bx r3 + + + .align 4 + .code 32 + .global direct_syscall +direct_syscall: + ldr r12, =syscall_base + ldr r12, [r12] + nop + ldr r12, [r12,r11,lsl#2] + nop + bx r12 + + .align 4 + .code 32 + .global direct_os_sync_before_read +direct_os_sync_before_read: + + + mov r11, #0x3f + b direct_syscall + + .align 4 + .code 32 + .global direct_os_sync_after_write +direct_os_sync_after_write: + + + mov r11, #0x40 + b direct_syscall + + .global ic_invalidate +ic_invalidate: + mov r0, #0 + mcr p15, 0, r0, c7, c5, 0 + bx lr + +// bypass to interrupt vector + + .align 4 + .code 32 + + .global interrupt_vector +interrupt_vector: + tst r8, #0x10 + beq int_cont1 + + bic r8, r8, #0x10 // disable next EHCI treatment + + mov r2, #0x10 + str r2, [r7] + nop + + mov r2, sp + nop + ldr sp, =_interrupt_stack + nop + + stmfd sp!, {r1-r12,lr} + nop + + bl _ehci_vector_ + + ldmfd sp!, {r1-r12,lr} + nop + mov sp, r2 + + tst r0, #0x1 + beq int_cont1 + + nop + mov r0,#4 + bl int_send_device_message + + +int_cont1: + tst r8, #0x1 + beq patch2_timer_cont +// int timer + .global patch1_timer +patch1_timer: + ldr pc, =0xFFFF1E80 + nop + .global patch2_timer_cont +patch2_timer_cont: + ldr pc, =0xFFFF1E9C + nop + + .global int_send_device_message +int_send_device_message: + ldr pc, =0xFFFF1D44 + nop + +_ehci_vector_: + + ldr r2,=ehci_vector + bx r2 + + .align 4 + .code 32 + .global read_access_perm +read_access_perm: + mrc p15, 0, r0,c3,c0 + bx lr + + .align 4 + .code 32 + .global write_access_perm +write_access_perm: + mcr p15, 0, r0,c3,c0 + bx lr + + .align 4 + +/******************************************************************************* + * + * DRIVER CONFIGURATION AREA + * + ******************************************************************************* + */ + + .string "EHC_CFG" + .long 0x12340001 + .global use_usb_port1 +use_usb_port1: + .byte 0x0 + + .global use_reset_bulk +use_reset_bulk: + .byte 0x0 + +/* force_flags 1 ->force GetMaxLun, 2-> force SetConfiguration */ + .global force_flags +force_flags: + .byte 0x0 + + .global use_alternative_timeout +use_alternative_timeout: + .byte 0x0 + + .align + .pool + + +/******************************************************************************* + * IOS data section + * + * Basically, this is required for the program header not to be messed up + * The program header will only be generated correctly if there is "something" + * in the ram segment, this makes sure of that by placing a silly string there. + ******************************************************************************* + */ + .section ".ios_data" ,"aw",%progbits + .ascii "IOS module" + + +/******************************************************************************* + * IOS bss section + * + * This contains the module's thread stack + ******************************************************************************* + */ + .section ".ios_bss", "a", %nobits + + .global ios_thread_stack_start +ios_thread_stack_start: + .space ios_thread_stacksize + .global ios_thread_stack /* stack decrements from high address.. */ +ios_thread_stack: + .space 0x200 +_interrupt_stack: + + .section ".ios_info_table","ax",%progbits + +/******************************************************************************* + * IOS info table section + * + * This contains the module's loader information + * The stripios tool will find this, and package it nicely for the IOS system + ******************************************************************************* + */ + .global ios_info_table +ios_info_table: + .long 0x0 + .long 0x28 @ numentries * 0x28 + .long 0x6 + .long 0xB + .long ios_thread_arg @ passed to thread entry func, maybe module id + .long 0x9 + .long _start + .long 0x7D + .long ios_thread_priority + .long 0x7E + .long ios_thread_stacksize + .long 0x7F + .long ios_thread_stack + + + .pool + .end diff --git a/ehcmodule/source/ehc_loop.c b/ehcmodule/source/ehc_loop.c new file mode 100644 index 00000000..eb341661 --- /dev/null +++ b/ehcmodule/source/ehc_loop.c @@ -0,0 +1,865 @@ +/* + Custom IOS module for Wii. + OH0 message loop + Copyright (C) 2009 kwiirk. + Copyright (C) 2008 neimod. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + + +/******************************************************************************* + * + * oh0_loop.c - IOS module main code + * even if we are "ehc" driver, we still pretend to be "oh0" + * and implement "standard" ios oh0 usb api + * + ******************************************************************************* + * + */ + + + +#include +#include +#include "syscalls.h" +#include "ehci_types.h" +#include "ehci.h" +#include "utils.h" +#include "libwbfs.h" +#include "ehci_interrupt.h" + +#undef ehci_writel +#define ehci_writel(v,a) do{*((volatile u32*)(a))=(v);}while(0) + + + +void ehci_usleep(int usec); +void ehci_msleep(int msec); + +int ehci_release_externals_usb_ports(void); + +void off_callback_hand(u32 flags); + +int disable_ehc=0; + +#undef NULL +#define NULL ((void *)0) +#define IOS_OPEN 0x01 +#define IOS_CLOSE 0x02 +#define IOS_IOCTL 0x06 +#define IOS_IOCTLV 0x07 + +#define USB_IOCTL_CTRLMSG 0 +#define USB_IOCTL_BLKMSG 1 +#define USB_IOCTL_INTRMSG 2 +#define USB_IOCTL_SUSPENDDEV 5 +#define USB_IOCTL_RESUMEDEV 6 +#define USB_IOCTL_GETDEVLIST 12 +#define USB_IOCTL_DEVREMOVALHOOK 26 +#define USB_IOCTL_DEVINSERTHOOK 27 + +#define UMS_BASE (('U'<<24)|('M'<<16)|('S'<<8)) +#define USB_IOCTL_UMS_INIT (UMS_BASE+0x1) +#define USB_IOCTL_UMS_GET_CAPACITY (UMS_BASE+0x2) +#define USB_IOCTL_UMS_READ_SECTORS (UMS_BASE+0x3) +#define USB_IOCTL_UMS_WRITE_SECTORS (UMS_BASE+0x4) + +#define USB_IOCTL_UMS_READ_STRESS (UMS_BASE+0x5) + +#define USB_IOCTL_UMS_SET_VERBOSE (UMS_BASE+0x6) + +#define USB_IOCTL_UMS_UMOUNT (UMS_BASE+0x10) +#define USB_IOCTL_UMS_WATCHDOG (UMS_BASE+0x80) + +#define USB_IOCTL_UMS_TESTMODE (UMS_BASE+0x81) + +#define USB_IOCTL_UMS_OFF (UMS_BASE+0x82) +#define USB_IOCTL_SET_PORT (UMS_BASE+0x83) + + + +#define WBFS_BASE (('W'<<24)|('F'<<16)|('S'<<8)) +#define USB_IOCTL_WBFS_OPEN_DISC (WBFS_BASE+0x1) +#define USB_IOCTL_WBFS_READ_DISC (WBFS_BASE+0x2) +#define USB_IOCTL_WBFS_READ_DIRECT_DISC (WBFS_BASE+0x3) +#define USB_IOCTL_WBFS_STS_DISC (WBFS_BASE+0x4) + +//#define USB_IOCTL_WBFS_SPEED_LIMIT (WBFS_BASE+0x80) + +void USBStorage_Umount(void); + +//#define DEVICE "/dev/usb/ehc" +#define DEVICE "/dev/usb123" + +int verbose = 0; +#define ioctlv_u8(a) (*((u8*)(a).data)) +#define ioctlv_u16(a) (*((u16*)(a).data)) +#define ioctlv_u32(a) (*((u32*)(a).data)) +#define ioctlv_len(a) (a).len +#define ioctlv_voidp(a) (a).data + +wbfs_disc_t * wbfs_init_with_partition(u8*discid, int partition); + +extern char use_usb_port1; + + +int USBStorage_DVD_Test(void); + +#define WATCHDOG_TIMER 1000*1000*10 + + +int test_mode=0; + +char *parse_hex(char *base,int *val) +{ + int v = 0,done=0; + char *ptr = base,c; + while(!done) + { + c = *ptr++; + if(c >= '0' && c <= '9') + v = v << 4 | (c-'0'); + else if(c >= 'a' && c <= 'f') + v = v << 4 | (10+c-'a'); + else if(c >= 'A' && c <= 'F') + v = v << 4 | (10+c-'A'); + else + done = 1; + } + if(ptr==base+1)//only incremented once + return 0; //we did not found any hex numbers + *val = v; + return ptr-1; +} +int parse_and_open_device(char *devname,int fd) +{ + char *ptr = devname; + int vid,pid; + if (! (ptr = parse_hex(ptr,&vid))) + return -6; + if ( *ptr != '/' ) + return -6; + ptr++;// skip / + if (! (ptr = parse_hex(ptr,&pid))) + return -6; + if ( *ptr != '\0' ) + return -6; + return ehci_open_device(vid,pid,fd); +} + + +int DVD_speed_limit=0; // ingame it can fix x6 speed + +int watchdog_enable=1; + +// special ingame +int wbfs_disc_read2(wbfs_disc_t*d,u32 offset, u8 *data, u32 len); + +// heap space for WBFS and queue + +extern int heaphandle; + +void msleep(int msec); + +u8 mem_sector[4096] __attribute__ ((aligned (32))); + +void *WBFS_Alloc(int size) +{ + void * ret = 0; + // ret= os_heap_alloc(heaphandle, size); + ret= os_heap_alloc_aligned(heaphandle, size, 32); + if(ret==0) + {debug_printf("WBFS not enough memory! need %d\n",size); + os_puts("WBFS not enough memory!\n"); + + while(1) {swi_mload_led_on();ehci_msleep(200);swi_mload_led_off();ehci_msleep(200);} + } + return ret; +} + +void WBFS_Free(void *ptr) +{ + return os_heap_free(heaphandle, ptr); +} + +extern u8 *disc_buff; + +u32 last_disc_lba=0; +u32 current_disc_lba=0xffffffff; + + +void wbfs_perform_disc(void); + +// CISO mem area +int ciso_lba=-1; +int ciso_size=0; +u32 table_lba[2048]; +u8 mem_index[2048] __attribute__ ((aligned (32))); + + +// offset -> disc_offset in words +// data -> buffer +// len -> len to read in bytes + +int WBFS_direct_disc_read(u32 offset, u8 *data, u32 len) +{ +int r=true; +u32 lba; +u32 len2=len; +u8* data2=data; +u32 sec_size; +int l; +u8 *buff; + + os_sync_after_write(data2, len2); + + if(!disc_buff) return 0x8000; + + + + last_disc_lba= USBStorage_Get_Capacity(&sec_size); + + if(last_disc_lba==0 || sec_size!=2048) + { + current_disc_lba=0xffffffff; + return 0x8000; + } + + if(ciso_lba>=0 && ciso_lba!=0x7fffffff && current_disc_lba==0xffffffff) + { + u32 lba_glob; + + current_disc_lba=0xffffffff; + + while(1) + { + lba_glob=ciso_lba+16; + + buff=(u8 *) (((u32)disc_buff+31) & ~31); // 32 bytes aligment + r=USBStorage_Read_Sectors(ciso_lba, 16, buff); // read 16 cached sectors + if(!r) return 0x8000; + + if((buff[0]=='C' && buff[1]=='I' && buff[2]=='S' && buff[3]=='O')) ciso_lba=0x7fffffff; + else + { + if(ciso_lba!=0) {ciso_lba=0;continue;} + ciso_lba=-1; + } + break; + } + + ciso_size=(((u32)buff[4])+(((u32)buff[5])<<8)+(((u32)buff[6])<<16)+(((u32)buff[7])<<24))/2048; + + memset(mem_index,0,2048); + + if(ciso_lba==0x7fffffff) + + for(l=0;l<16384;l++) + { + if((l & 7)==0) table_lba[l>>3]=lba_glob; + + if(buff[8+l]) + { + mem_index[l>>3]|=1<<(l & 7); + lba_glob+=ciso_size; + } + } + + } + + + buff=(u8 *) (((u32)disc_buff+31) & ~31); // 32 bytes aligment + + while(len>0) + { + lba=offset>>9; // offset to LBA (sector have 512 words) + + if((lba & ~15)!=current_disc_lba) + { + u32 read_lba; + + current_disc_lba=(lba & ~15); + + read_lba=current_disc_lba; + + if(ciso_lba==0x7fffffff) + { + u32 temp=current_disc_lba/ciso_size; + + read_lba=table_lba[temp>>3]; + + for(l=0;l<(temp & 7);l++) if((mem_index[temp>>3]>>l) & 1) read_lba+=ciso_size; + + read_lba+=current_disc_lba & (ciso_size-1); + + } + + l=(last_disc_lba-read_lba/*current_disc_lba*/);if(l>16) l=16; + + + if(l<16) memset(buff,0,0x8000); + if(l>0) + { + r=USBStorage_Read_Sectors(/*current_disc_lba*/read_lba, l, buff); // read 16 cached sectors + if(!r) break; + } + } + + l=0x8000-((offset & 8191)<<2); // get max size in the cache relative to offset + if(l>len) l=len; + + memcpy(data, &buff[((offset & 8191)<<2)], l); + os_sync_after_write(data, l); + + data+=l; + len-=l; + offset+=l>>2; + } + + if(!r) return 0x8000; + os_sync_before_read(data2, len2); + +return 0; +} + + + +extern int unplug_device; + +int unplug_procedure(void); + +extern int is_watchdog_read_sector; + +extern u32 n_sec,sec_size; + +int last_sector=0; + + +void direct_os_sync_before_read(void* ptr, int size); +void direct_os_sync_after_write(void* ptr, int size); +u32 read_access_perm(void); +void write_access_perm(u32 flags); + +/******************************************************************************************************************************************************/ +// dev/di ioctl os_message_queue_receive +/******************************************************************************************************************************************************/ + +int swi_di_queue(u32 cmd, ipcmessage *message) +{ +u32 perm; + + perm=read_access_perm(); + write_access_perm(0xffffffff); + message->ioctl.command=cmd; + *((u32 *) message->ioctl.buffer_in)=cmd<<24; + direct_os_sync_after_write(&message->ioctl.command,4); + direct_os_sync_after_write(message->ioctl.buffer_in,4); + write_access_perm(perm); + +return 0; +} + +int my_di_os_message_queue_receive(int queuehandle, ipcmessage ** message,int flag) +{ +int ret,ret2; + + +ret= os_message_queue_receive(queuehandle, (void*) message, flag); + + +if(ret==0 && message && *message) + { + + if((*message)->command==IOS_IOCTL) + { + switch((*message)->ioctl.command) + { + case 0x7a: + ret2=swi_mload_call_func((void *) swi_di_queue, (void *) 0x15, (void *) (*message)); + break; + case 0x88: + ret2=swi_mload_call_func((void *) swi_di_queue, (void *) 0x14, (void *) (*message)); + break; + + } + + } + + } + +return ret; +} + +/******************************************************************************************************************************************************/ +// ehcmodule swi service +/******************************************************************************************************************************************************/ +void release_wbfs_mem(void); + +int swi_ehcmodule(u32 cmd, u32 param1, u32 param2, u32 param3) +{ +s32 ret=-666; + + switch(cmd) + { + case 0: // get mem alloc handle (139264 bytes heap) + ret=heaphandle; + break; + case 1: // obtain release_wbfs_mem() function to be sure you have free memory + ret=(int) release_wbfs_mem; + break; + case 2: + ret=0;disable_ehc=1; // disable ehcmodule device for direct access operations + break; + case 16: // get USBStorage_Read_Sectors() for direct operations (remember you disable_ehc must be 1) + ret= (int) USBStorage_Read_Sectors; + break; + case 17: + ret= (int) USBStorage_Write_Sectors; + break; + + } + +return ret; +} + +int ehc_loop(void) +{ + ipcmessage* message; + int timer2_id=-1; + static bool first_read=true; + char port; + + extern int ums_init_done; + + + + int must_read_sectors=0; + + + + void* queuespace = os_heap_alloc(heaphandle, 0x80); + + + int queuehandle = os_message_queue_create(queuespace, 32); + + + init_thread_ehci(); + + os_thread_set_priority(os_get_thread_id(), /*os_thread_get_priority()-1*/0x78); + + os_device_register(DEVICE, queuehandle); + timer2_id=os_create_timer(WATCHDOG_TIMER, WATCHDOG_TIMER, queuehandle, 0x0); + + int ums_mode = 0; + int already_discovered = 0; + wbfs_disc_t *d = 0; + + int usb_lock=0; + + int watch_time_on=1; + + // register SWI function (0xcd) + + swi_mload_add_handler(0xcd, swi_ehcmodule); + + + + while(1) + { + int result = 1; + int ack = 1; + volatile int ret; + + // Wait for message to arrive + ret=os_message_queue_receive(queuehandle, (void*)&message, 0); + if(ret) continue; + + + // timer message WATCHDOG + //if((int) message==0x555) continue; + + if(watch_time_on) + os_stop_timer(timer2_id); // stops watchdog timer + watch_time_on=0; + + is_watchdog_read_sector=0; + + if((int) message==0x0) + { + if(test_mode && !disable_ehc) + watchdog_enable=0; // test mode blocks watchdog + + if(must_read_sectors && watchdog_enable && !disable_ehc) + { + int n,r; + + if(unplug_device) + { + for(n=0;n<3;n++) + if(!unplug_procedure()) break; + } + + if(unplug_device==0) + { + + if(sec_size!=0 && sec_size<4096) // only support sector size minor to 2048 + { + + + is_watchdog_read_sector=1; + + r=USBStorage_Read_Sectors(last_sector, 1, mem_sector); + + is_watchdog_read_sector=0; + if(r!=0 && sec_size==512) + last_sector+=0x1000000/sec_size; // steps of 16MB + if(last_sector>=n_sec) last_sector=0; + } + + } + + if(!disable_ehc) + { + watch_time_on=1; + os_restart_timer(timer2_id, WATCHDOG_TIMER); + } + } + continue; + } + + + //print_hex_dump_bytes("msg",0, message,sizeof(*message)); + switch( message->command ) + { + case IOS_OPEN: + { + + //debug_printf("%s try open %sfor fd %d\n",DEVICE,message->open.device,message->open.resultfd); + // Checking device name + if (0 == strcmp(message->open.device, DEVICE)) + { + result = message->open.resultfd; + + + + } + else + if (0 == strcmp(message->open.device, DEVICE"/OFF")) + { + result = message->open.resultfd; + disable_ehc=1; + + must_read_sectors=0; + watchdog_enable=0; + + ehci_int_passive_callback(off_callback_hand); + ehci_writel (STS_PCD, &ehci->regs->intr_enable); + ehci_release_externals_usb_ports(); + + //swi_mload_led_on(); + + } + /*else if (!ums_mode && 0 == memcmp(message->open.device, DEVICE"/", sizeof(DEVICE)) && !disable_ehc) + result = parse_and_open_device(message->open.device+sizeof(DEVICE),message->open.resultfd); + */ + else + result = -6; + } + break; + + case IOS_CLOSE: + { + + //debug_printf("close fd %d\n",message->fd); + //USBStorage_Umount(); + //ehci_release_externals_usb_ports(); + + if(ums_mode == message->fd) + ums_mode = 0; + else + ehci_close_devices(); + + result = 0; + } + break; + + case IOS_IOCTL: + { + + break; + } + case IOS_IOCTLV: + { + ioctlv *vec = message->ioctlv.vector; + void *dev =NULL; + int i,in = message->ioctlv.num_in,io= message->ioctlv.num_io; + if( 0==(message->ioctl.command>>24) && !ums_mode) + dev = ehci_fd_to_dev(message->fd); + os_sync_before_read( vec, (in+io)*sizeof(ioctlv)); + for(i=0;iioctl.command ) + { + case USB_IOCTL_CTRLMSG: + //debug_printf("ctrl message%x\n",dev); + if(!dev)result= -6; + else + result = ehci_control_message(dev,ioctlv_u8(vec[0]),ioctlv_u8(vec[1]), + swab16(ioctlv_u16(vec[2])),swab16(ioctlv_u16(vec[3])), + swab16(ioctlv_u16(vec[4])),ioctlv_voidp(vec[6])); + break; + case USB_IOCTL_BLKMSG: + //debug_printf("bulk message\n"); + if(!dev)result= -6; + else + result = ehci_bulk_message(dev,ioctlv_u8(vec[0]),ioctlv_u16(vec[1]), + ioctlv_voidp(vec[2])); + break; + case USB_IOCTL_INTRMSG: + debug_printf("intr message\n"); + case USB_IOCTL_SUSPENDDEV: + case USB_IOCTL_RESUMEDEV: + debug_printf("or resume/suspend message\n"); + result = 0;//-1;// not supported + break; + case USB_IOCTL_GETDEVLIST: + debug_printf("get dev list\n"); + if(dev)result= -6; + else + result = ehci_get_device_list(ioctlv_u8(vec[0]),ioctlv_u8(vec[1]), + ioctlv_voidp(vec[2]),ioctlv_voidp(vec[3])); + break; + case USB_IOCTL_DEVREMOVALHOOK: + case USB_IOCTL_DEVINSERTHOOK: + debug_printf("removal/insert hook\n"); + ack = 0; // dont reply to those, as we dont detect anything + break; + case USB_IOCTL_UMS_INIT: + must_read_sectors=0; + + if(!already_discovered ) + ehci_discover(); + already_discovered=1; + + result = USBStorage_Init(); + + + //result=-os_thread_get_priority(); + if(result>=0) {must_read_sectors=1;watchdog_enable=1;} + ums_mode = message->fd; + + break; + case USB_IOCTL_UMS_UMOUNT: + must_read_sectors=0; + watchdog_enable=0; + // USBStorage_Umount(); + result =0; + break; + case USB_IOCTL_UMS_TESTMODE: + test_mode=ioctlv_u32(vec[0]); + result =0; + break; + + case USB_IOCTL_SET_PORT: + result =0; + port=ioctlv_u32(vec[0]); + if(use_usb_port1!=port) + { + if(ums_init_done) + { + USBStorage_Umount(); + ehci_close_devices(); + ehci_release_externals_usb_ports(); + use_usb_port1=port; + ehci_discover(); + result = USBStorage_Init(); + } + } + use_usb_port1=port; + break; + + case USB_IOCTL_UMS_OFF: + { + + disable_ehc=1; + + must_read_sectors=0; + watchdog_enable=0; + + ehci_int_passive_callback(off_callback_hand); + ehci_writel (STS_PCD, &ehci->regs->intr_enable); + ehci_release_externals_usb_ports(); + + result =0; + } + + case USB_IOCTL_UMS_GET_CAPACITY: + n_sec = USBStorage_Get_Capacity(&sec_size); + if(ioctlv_voidp(vec[0])) + { + *((u32 *) ioctlv_voidp(vec[0]))= sec_size; + } + + result =n_sec ; + break; + case USB_IOCTL_UMS_READ_SECTORS: + #ifdef VIGILANTE + enable_button=1; + #endif + result = USBStorage_Read_Sectors(ioctlv_u32(vec[0]),ioctlv_u32(vec[1]), ioctlv_voidp(vec[2])); + if(first_read) + { + void s_printf(char *format,...); + //#define s_printf(a...) + first_read=false; + + if(result>0) + s_printf("first read sector (%i) OK\n",ioctlv_u32(vec[0])); + else + s_printf("first read sector (%i) ERROR\n",ioctlv_u32(vec[0])); + } + + break; + case USB_IOCTL_UMS_WRITE_SECTORS: + #ifdef VIGILANTE + enable_button=1; + #endif + + result = USBStorage_Write_Sectors(ioctlv_u32(vec[0]),ioctlv_u32(vec[1]), ioctlv_voidp(vec[2])); + break; + case USB_IOCTL_UMS_READ_STRESS: + // result = USBStorage_Read_Stress(ioctlv_u32(vec[0]),ioctlv_u32(vec[1]), ioctlv_voidp(vec[2])); + break; + case USB_IOCTL_UMS_SET_VERBOSE: + verbose = !verbose; + result = 0; + break; + /*case USB_IOCTL_WBFS_SPEED_LIMIT: + DVD_speed_limit=ioctlv_u32(vec[0]); + break;*/ + case USB_IOCTL_UMS_WATCHDOG: + watchdog_enable=ioctlv_u32(vec[0]); + break; + case USB_IOCTL_WBFS_OPEN_DISC: + ums_mode = message->fd; + u8 *discid; + + int partition=0; + #ifdef VIGILANTE + enable_button=1; + #endif + + discid=ioctlv_voidp(vec[0]); + if(discid[0]=='_' && discid[1]=='D' && discid[2]=='V' && discid[3]=='D') + { + result = 0;watchdog_enable=1; + ciso_lba=0; + if(vec[1].len==4) + { + memcpy(&partition, ioctlv_voidp(vec[1]), 4); + ciso_lba=partition; + } + + //ciso_lba=265; + wbfs_perform_disc(); + } + else + { + + if(vec[1].len==4) memcpy(&partition, ioctlv_voidp(vec[1]), 4); + d = wbfs_init_with_partition(discid, partition); + if(!d) + result = -1; + else + {result = 0;watchdog_enable=1;} + } + + must_read_sectors=1; + + break; + case USB_IOCTL_WBFS_STS_DISC: + result=USBStorage_DVD_Test(); + if(result==0) current_disc_lba=0xffffffff; // test fail + + break; + case USB_IOCTL_WBFS_READ_DIRECT_DISC: // used to read USB DVD + usb_lock=1; + watchdog_enable=1; + result = WBFS_direct_disc_read(ioctlv_u32(vec[0]),ioctlv_voidp(vec[2]),ioctlv_u32(vec[1])); + usb_lock=0; + break; + + case USB_IOCTL_WBFS_READ_DISC: + /*if (verbose) + debug_printf("r%x %x\n",ioctlv_u32(vec[0]),ioctlv_u32(vec[1])); + else + debug_printf("r%x %x\r",ioctlv_u32(vec[0]),ioctlv_u32(vec[1])); + */ + if(!d /*|| usb_lock*/) + result = -1; + else + { + + usb_lock=1; + //os_stop_timer(timer2_id); + result = wbfs_disc_read(d,ioctlv_u32(vec[0]),ioctlv_voidp(vec[2]),ioctlv_u32(vec[1])); + usb_lock=0; + if(result){ + //debug_printf("wbfs failed! %d\n",result); + //result = 0x7800; // wii games shows unrecoverable error.. + result = 0;//0x8000; + } + //result=0; + } + + break; + } + for(i=in;i0x20?0x20:vec[i].len); + os_sync_after_write( vec[i].data, vec[i].len); + } + + break; + } + default: + result = -1; + //ack = 0; + break; + } + + if(watchdog_enable) + { + watch_time_on=1; + os_restart_timer(timer2_id, WATCHDOG_TIMER); + } + // Acknowledge message + + if (ack) + os_message_queue_ack( (void*)message, result ); + + + } + + return 0; +} diff --git a/ehcmodule/source/ehci_interrupt.c b/ehcmodule/source/ehci_interrupt.c new file mode 100644 index 00000000..1cc4f9d4 --- /dev/null +++ b/ehcmodule/source/ehci_interrupt.c @@ -0,0 +1,188 @@ +#include "ehci_interrupt.h" +#include "swi_mload.h" + +#define ehci_readl(a) (*((volatile u32*)(a))) +#define ehci_writel(v,a) do{*((volatile u32*)(a))=(v);}while(0) +#define get_timer() (*(((volatile u32*)0x0D800010))) + +void enable_EHCI_IRQ(void) +{ + *((volatile u32 *) 0x0d0400cc)|=1<<15; +} + +void disable_EHCI_IRQ(void) +{ + *((volatile u32 *) 0x0d0400cc) &=~(1<<15); +} + +#if 0 + +void enable_OHCI0_IRQ(void) +{ + *((volatile u32 *) 0x0d0400cc)|=1<<11; +} + +void disable_OHCI0_IRQ(void) +{ + *((volatile u32 *) 0x0d0400cc) &=~(1<<11); +} + +void enable_OHCI1_IRQ(void) +{ + *((volatile u32 *) 0x0d0400cc)|=1<<12; +} + +void disable_OHCI1_IRQ(void) +{ + *((volatile u32 *) 0x0d0400cc) &=~(1<<12); +} + +#endif + + +int ehci1_queuehandle=-1; + + +void init_thread_ehci(void) +{ + disable_EHCI_IRQ(); + + + ehci1_queuehandle= os_message_queue_create( USB_Alloc(4*32)/*os_heap_alloc(heaphandle, 4*32)*/, 32); + + os_unregister_event_handler(DEV_EHCI); + os_register_event_handler(DEV_EHCI, ehci1_queuehandle, 0); // register interrupt event handler + + enable_EHCI_IRQ(); + os_software_IRQ(DEV_EHCI); + +} + +static int (*working_callback)(u32 flags)= NULL; + +static void (*passive_callback)(u32 flags)= NULL; + +static int private_timer_id=-1; +static int remote_message=0; + +void ehci_int_working_callback_part1( int (*callback)(u32 flags), u32 timeout) +{ + + private_timer_id=os_create_timer(timeout, timeout*10, ehci1_queuehandle, 1); + + swi_mload_set_register(0x0d800038,(1<regs->intr_enable); + + os_software_IRQ(DEV_EHCI); // enable and mask interrupt flag + +} + +int ehci_int_working_callback_part2(void) +{ +static int message=0; + + message=-ETIMEDOUT; + + os_message_queue_receive(ehci1_queuehandle, (void*)&message, 0); // waits for interrupt or timeout + + ehci_writel (0, &ehci->regs->intr_enable); // disable interrupts flags + working_callback=NULL; // disable callback + + os_stop_timer(private_timer_id); // stops the timeout timer + os_destroy_timer(private_timer_id); + private_timer_id=-1; + + + if(message==0) // build message response + { + message=remote_message; + } + else message=-ETIMEDOUT; + + os_software_IRQ(DEV_EHCI); // enable and mask interrupt flag + + return message; +} + +void ehci_int_passive_callback( void (*callback)(u32 flags)) +{ + + passive_callback=callback; + working_callback=NULL; + +} + + + + +void int_send_device_message(int device); + + +int ehci_vector(void) +{ +int ret=0; +u32 flags; + +int message=1; + + *((volatile u32 *)0x0d80003c ) &= ~(1<regs->status); + + if(working_callback) + { + + message= working_callback(flags); + + if(((int)message)<=0) + { + working_callback=NULL; + + remote_message=message; + int_send_device_message(DEV_EHCI); + //ret=1; + + ehci_writel (flags & INTR_MASK, &ehci->regs->status); + } + else + { + ehci_writel (flags & INTR_MASK, &ehci->regs->status); + //temp=ehci_readl( &ehci->regs->command); + + *((volatile u32 *)0x0d80003c ) |= 1<regs->status); + *((volatile u32 *)0x0d80003c ) |= 1<regs->status); + *((volatile u32 *)0x0d80003c ) |= 1< +#include +#include "syscalls.h" +#include "swi_mload.h" + +int tiny_ehci_init(void); + +//int ehc_loop(void); + +u8 heap_space2[0xe000] __attribute__ ((aligned (32))); + +/* USB timer */ + + +int timer1_queuehandle=-1; +int timer1_id=-1; + +void ehci_usleep(u32 time) +{ +static u32 message; +//int n; + + //os_message_queue_send(timer1_queuehandle, 0x555, 0); + //os_restart_timer(timer1_id, time); + timer1_id=os_create_timer(time, 1000*1000*10, timer1_queuehandle, 0x0); + os_message_queue_receive(timer1_queuehandle,(void *) &message, 0); + os_stop_timer(timer1_id); + os_destroy_timer(timer1_id); + +} + +void ehci_msleep(int msec) +{ + ehci_usleep(((u32) msec)*1000); +} + + +#define get_timer() (*(((volatile u32*)0x0D800010))) + +void ehci_udelay(int usec) +{ + u32 tmr,temp; + u32 time_usec; + + tmr = get_timer(); + time_usec=2*usec; + + while (1) {temp=get_timer()-tmr;if(((int) temp)<0) tmr = get_timer(); if(((int)temp) > time_usec) break;} + +} +void ehci_mdelay(int msec)//@todo not really sleeping.. +{ + u32 tmr,temp; + u32 time_usec; + + tmr = get_timer(); + time_usec=2048*msec; + + while (1) {temp=get_timer()-tmr;if(((int) temp)<0) tmr = get_timer(); if(((int)temp) > time_usec) break;} + + +} + + + + +int ehc_loop(void); + +int heaphandle=-1; +unsigned int heapspace[0x5000/*0x8800*/] __attribute__ ((aligned (32))); + + +void interrupt_vector(void); +void patch1_timer(void); +void patch2_timer_cont(void); +void int_send_device_message(u32); + +void direct_os_sync_before_read(void* ptr, int size); +void direct_os_sync_after_write(void* ptr, int size); +void ic_invalidate(void); + +static u32 vector[2]={ 0xE51FF004, 0}; // ldr pc,=addr + +u32 syscall_base; + + +int my_di_os_message_queue_receive(int queuehandle, ipcmessage ** message,int flag); + +u32 read_access_perm(void); +void write_access_perm(u32 flags); + +static void di_patch(u32 addr1, u32 addr2) +{ +u32 perm; + + perm=read_access_perm(); + write_access_perm(0xffffffff); + + if(*((u32 *) addr2)==0xE6000170) // detect an unused syscall in dev/di to store the entry + { + vector[1]= ((u32) my_di_os_message_queue_receive) | 1; + memcpy((void *) addr2, vector, 8); + direct_os_sync_after_write((void *) addr2, 8); + + *((u32 *) addr1)= 0xEA000000 | (((addr2-addr1)/4-2) & 0xFFFFFF); // change the jump + direct_os_sync_after_write((void *) addr1, 4); + } + + write_access_perm(perm); + +} + +int copy_int_vect(u32 ios, u32 none) +{ + ic_invalidate(); + + switch(ios) + { + case 36: + // WARNING!!!: IOS 36 ins not recommended because it fails using the ehcmodule some times + vector[1]= (u32) interrupt_vector; + + memcpy((void *) 0xFFFF1E78, vector,8); // fix interrupt jump + direct_os_sync_after_write((void *) 0xFFFF1E78, 8); + break; + + case 37: + + // patch for DI (IOS37 v3869) os_message_queue_receive() syscalls + di_patch(0x20205DE8, 0x2020408c); + + vector[1]= (u32) 0xFFFF1F70; + memcpy((void *) patch1_timer, vector,8); // patch1 -> timer + direct_os_sync_after_write((void *) patch1_timer, 8); + + vector[1]= (u32) 0xFFFF1F8C; + memcpy((void *) patch2_timer_cont, vector,8); // patch2-> next interrupt case + direct_os_sync_after_write((void *) patch2_timer_cont, 8); + + vector[1]= (u32) 0xFFFF1E34; + memcpy((void *) int_send_device_message, vector,8); // patch3 ->send device message + direct_os_sync_after_write((void *) int_send_device_message, 8); + + vector[1]= (u32) interrupt_vector; + + memcpy((void *) 0xFFFF1F68, vector,8); // fix interrupt jump + direct_os_sync_after_write((void *) 0xFFFF1F68, 8); + break; + + case 38: + + // patch for DI (IOS38 v3867) os_message_queue_receive() syscalls + di_patch(0x20205B14, 0x20203E6C); + + vector[1]= (u32) 0xFFFF1EB0; + memcpy((void *) patch1_timer, vector, 8); // patch1 -> timer + direct_os_sync_after_write((void *) patch1_timer, 8); + + vector[1]= (u32) 0xFFFF1ECC; + memcpy((void *) patch2_timer_cont, vector, 8); // patch2-> next interrupt case + direct_os_sync_after_write((void *) patch2_timer_cont, 8); + + vector[1]= (u32) 0xFFFF1D74; + memcpy((void *) int_send_device_message, vector, 8); // patch3 ->send device message + direct_os_sync_after_write((void *) int_send_device_message, 8); + + vector[1]= (u32) interrupt_vector; + + memcpy((void *) 0xFFFF1EA8, vector,8); + direct_os_sync_after_write((void *) 0xFFFF1EA8, 8); + break; + + case 57: + // patch for DI (IOS57 v5661) os_message_queue_receive() syscalls + di_patch(0x20205E84, 0x20203F60); + + vector[1]= (u32) 0xFFFF2130; + memcpy((void *) patch1_timer, vector,8); // patch1 -> timer + direct_os_sync_after_write((void *) patch1_timer, 8); + + vector[1]= (u32) 0xFFFF214C; + memcpy((void *) patch2_timer_cont, vector,8); // patch2-> next interrupt case + direct_os_sync_after_write((void *) patch2_timer_cont, 8); + + vector[1]= (u32) 0xFFFF1FF4; + memcpy((void *) int_send_device_message, vector,8); // patch3 ->send device message + direct_os_sync_after_write((void *) int_send_device_message, 8); + + vector[1]= (u32) interrupt_vector; + + memcpy((void *) 0xFFFF2128, vector,8); // fix interrupt jump + direct_os_sync_after_write((void *) 0xFFFF2128, 8); + break; + + case 60: + + // patch for DI (IOS60 v6174) os_message_queue_receive() syscalls + di_patch(0x20205D94, 0x20203F60); + + vector[1]= (u32) 0xFFFF2130; + memcpy((void *) patch1_timer, vector,8); // patch1 -> timer + direct_os_sync_after_write((void *) patch1_timer, 8); + + vector[1]= (u32) 0xFFFF214C; + memcpy((void *) patch2_timer_cont, vector,8); // patch2-> next interrupt case + direct_os_sync_after_write((void *) patch2_timer_cont, 8); + + vector[1]= (u32) 0xFFFF1FF4; + memcpy((void *) int_send_device_message, vector,8); // patch3 ->send device message + direct_os_sync_after_write((void *) int_send_device_message, 8); + + vector[1]= (u32) interrupt_vector; + + memcpy((void *) 0xFFFF2128, vector,8); // fix interrupt jump + direct_os_sync_after_write((void *) 0xFFFF2128, 8); + break; + + } + + //*((volatile u32 *)0x0d8000c0) |=0x20; + +return 0; +} + +extern char use_usb_port1; +extern u32 current_port; + +int main(void) +{ + +current_port= ((u32) use_usb_port1)!=0; +// changes IOS vector interrupt to crt0.s routine + +//swi_mload_led_on(); + + +syscall_base=swi_mload_get_syscall_base(); +os_sync_after_write((void *) &syscall_base, 4); + +swi_mload_call_func((void *) copy_int_vect, (void *) swi_mload_get_ios_base(), NULL); + + +heaphandle = os_heap_create(heapspace, sizeof(heapspace)); + +void* timer1_queuespace = os_heap_alloc(heaphandle, 0x80); + +timer1_queuehandle = os_message_queue_create(timer1_queuespace, 32); + + + + if(tiny_ehci_init()<0) return -1; + + + ehc_loop(); + + return 0; +} diff --git a/ehcmodule/source/tiny_ehci_glue.c b/ehcmodule/source/tiny_ehci_glue.c new file mode 100644 index 00000000..a6544652 --- /dev/null +++ b/ehcmodule/source/tiny_ehci_glue.c @@ -0,0 +1,367 @@ +/* + EHCI glue. A bit hacky for the moment. needs cleaning.. + + Copyright (C) 2008 kwiirk. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#include +#include +#include "syscalls.h" + +#include "ehci_types.h" +#include "utils.h" +#include "ehci_interrupt.h" +#include "swi_mload.h" + +#define static +#define inline extern + + +#define readl(a) (*((volatile u32*)(a))) +#define writel(v,a) do{*((volatile u32*)(a))=(v);}while(0) +#define ehci_dbg(a...) debug_printf(a) +#define printk(a...) debug_printf(a) +#define get_timer() (*(((volatile u32*)0x0D800010))) + + +void BUG(void) +{ + debug_printf("bug\n"); +// stack_trace(); + // while(1); +} +#define BUG_ON(a) if(a)BUG() + +void ehci_usleep(int usec); +void ehci_msleep(int msec); +/* +void udelay(int usec) +{ + u32 tmr,temp; + u32 time_usec; + + tmr = get_timer(); + time_usec=2*usec; + + while (1) {temp=get_timer()-tmr;if(temp > time_usec) break;} + +} +void msleep(int msec)//@todo not really sleeping.. +{ + u32 tmr,temp; + u32 time_usec; + + tmr = get_timer(); + time_usec=2048*msec; + + while (1) {temp=get_timer()-tmr;if(temp > time_usec) break;} + + +} +*/ +extern u32 __exe_start_virt__; +extern u32 __ram_start_virt__; + +extern u32 ios_thread_stack; + +#define cpu_to_le32(a) swab32(a) +#define le32_to_cpu(a) swab32(a) +#define cpu_to_le16(a) swab16(a) +#define le16_to_cpu(a) swab16(a) +#define cpu_to_be32(a) (a) +#define be32_to_cpu(a) (a) +void print_hex_dump_bytes(char *header,int prefix,u8 *buf,int len) +{ + int i; + if (len>0x100)len=0x100; + debug_printf("%s %08X\n",header,(u32)buf); + for (i=0;iqtd_dma; +} + +void init_qh_and_qtd(void) +{ +int n; +struct ehci_qtd * qtd; + +struct ehci_qh * qh; + + if(!qh_header) + { + //u32 mem = (u32) USB_Alloc(4096*3); + //mem=(mem+4095) & ~4095; + qh_header= (struct ehci_qh *) ehci->async;//mem; + qtd_header= (struct ehci_qtd *) ehci->qtds[0]; + } + + +qtd=qtd_header;//= (struct ehci_qtd *) (((u32)qh_header)+4096); + +for(n=0;nqtds[n]=qtd; + + memset((void *) ehci->qtds[n], 0, sizeof(struct ehci_qtd)); + ehci_dma_map_bidir((void *) ehci->qtds[n],sizeof(struct ehci_qtd)); + + qtd=(struct ehci_qtd *) (((((u32) qtd)+sizeof(struct ehci_qtd)+31) & ~31)); + } + +for(n=0;nqh_dma = ehci_virt_to_dma(qh); + qh_pointer[n]->hw_info1 = cpu_to_hc32((QH_HEAD*(n!=0))); + qh_pointer[n]->hw_info2 = cpu_to_hc32(0); + qh_pointer[n]->hw_token = cpu_to_hc32( QTD_STS_HALT); + qh=(struct ehci_qh *) (((((u32) qh)+sizeof(struct ehci_qh)+31) & ~31)); + qh_pointer[n]->hw_next = QH_NEXT( ehci_virt_to_dma(qh)); + qh_pointer[n]->hw_qtd_next =EHCI_LIST_END(); + qh_pointer[n]->hw_alt_next = EHCI_LIST_END(); + + ehci_dma_map_bidir((void *) qh_pointer[n],sizeof(struct ehci_qh)); + } +n--; +qh_pointer[n]->hw_next = QH_NEXT( ehci_virt_to_dma(qh_header)); +ehci_dma_map_bidir((void *) qh_pointer[n],sizeof(struct ehci_qh)); +} + +void create_qtd_dummy(void) +{ +int n; +struct ehci_qtd * qtd, *qtd_next; + + +qtd=qtd_dummy_first; + +for(n=0;;n++) + { + qtd_next=(struct ehci_qtd *) (((((u32) qtd)+sizeof(struct ehci_qtd)+31) & ~31)); + ehci_qtd_init(qtd); + + //qtd_fill( qtd, 0, 0, QTD_STS_HALT, 0); + if(n<3) + { + qtd->hw_next= QTD_NEXT(qtd_next->qtd_dma); + qtd->hw_alt_next= EHCI_LIST_END(); //QTD_NEXT(qtd_next->qtd_dma); + ehci_dma_map_bidir((void *) qtd,sizeof(struct ehci_qtd)); + } + else + { + ehci_dma_map_bidir(qtd,sizeof(struct ehci_qtd)); + break; + } + qtd=qtd_next; + } + +} + + + +/* +int hola(void *i, void *o) +{ + int n; + +for(n=0;n<10;n++) + { + *((volatile u32 *)0x0d8000c0) ^=0x20; + ehci_mdelay(50); + } +} +*/ + + + +void reinit_ehci_headers(void) +{ + init_qh_and_qtd(); + + create_qtd_dummy(); + + ehci->async= qh_pointer[0]; + ehci->asyncqh= qh_pointer[1]; + in_qh=qh_pointer[2]; + out_qh=qh_pointer[3]; + dummy_qh=qh_pointer[4]; + + ehci_dma_unmap_bidir((dma_addr_t) ehci->async,sizeof(struct ehci_qh)); + + ehci->async->ehci = ehci; + ehci->async->qtd_head = NULL; + ehci->async->qh_dma = ehci_virt_to_dma(ehci->async); + ehci->async->hw_next = QH_NEXT(dummy_qh->qh_dma/* ehci->async->qh_dma*/); + ehci->async->hw_info1 = cpu_to_hc32( QH_HEAD); + ehci->async->hw_info2 = cpu_to_hc32( 0); + ehci->async->hw_token = cpu_to_hc32( QTD_STS_HALT); + + + ehci->async->hw_qtd_next =EHCI_LIST_END(); + ehci->async->hw_alt_next =EHCI_LIST_END(); //QTD_NEXT(get_qtd_dummy()); + + ehci_dma_map_bidir(ehci->async,sizeof(struct ehci_qh)); + + ehci_dma_unmap_bidir((dma_addr_t)ehci->asyncqh,sizeof(struct ehci_qh)); + ehci->asyncqh->ehci = ehci; + ehci->asyncqh->qtd_head = NULL; + ehci->asyncqh->qh_dma = ehci_virt_to_dma(ehci->asyncqh); + + ehci_dma_unmap_bidir((dma_addr_t)in_qh,sizeof(struct ehci_qh)); + in_qh->ehci = ehci; + in_qh->qtd_head = NULL; + in_qh->qh_dma = ehci_virt_to_dma(in_qh); + ehci_dma_map_bidir(in_qh,sizeof(struct ehci_qh)); + + ehci_dma_unmap_bidir((dma_addr_t)out_qh,sizeof(struct ehci_qh)); + out_qh->ehci = ehci; + out_qh->qtd_head = NULL; + out_qh->qh_dma = ehci_virt_to_dma(out_qh); + ehci_dma_map_bidir(out_qh,sizeof(struct ehci_qh)); +} + + + +int tiny_ehci_init(void) +{ +int i; + ehci = &_ehci; + + + if(usb_os_init()<0) + return -1; + + if(1) + { // From Hermes: ohci mem is readed from dev/mload: (ehci init is from here) +/* int fd; + fd = os_open("/dev/mload",1); + if(fd<0) return -1; + ehci= (struct ehci_hcd *) os_ioctlv(fd, MLOAD_GET_EHCI_DATA ,0,0,0); + + os_close(fd); + */ + ehci=swi_mload_EHCI_data(); + + // stops EHCI + ehci_writel( 0x00010020 , &ehci->regs->command); + do + { + if(!(ehci_readl( &ehci->regs->command) & 1))break; + } while(1); + + + ehci_dma_map_bidir(ehci,sizeof(struct ehci_hcd)); + + for (i = 0; i < DEFAULT_I_TDPS; i++) + { + ehci->periodic [i] = EHCI_LIST_END(); + ehci_dma_map_bidir((void *) ehci->periodic [i],4); + } + + + + reinit_ehci_headers(); + + + ////////////////////////////////////////////////////////////////////////////////////////////// + /* WARNING: This ignore the port 1 (external) and 2,3 (internals) for USB 2.0 operations */ + /* from cIOS mload 1.6 port 1 is forced to USB 1.1. Only port 0 can work as USB 2.0 */ + + ehci->num_port=2; +ehci_release_ports(); + + //ehci_writel( 0x00080021, &ehci->regs->command); + //ehci_writel(0, &ehci->regs->frame_list); + + ehci_writel(ehci->async->qh_dma, &ehci->regs->async_next); + ehci_writel (/*INTR_MASK*/STS_PCD, &ehci->regs->intr_enable); +#define t125us (1) + ehci_writel( (t125us<<16) | 0x0021 , &ehci->regs->command); + ehci_readl( &ehci->regs->command); + + //swi_mload_led_on(); + //swi_mload_call_func(hola,NULL,NULL); + + + ///////////////////////////////////////////////////////////////////////////////////////////// + } + + return 0; +} diff --git a/ehcmodule/source/usb_os.c b/ehcmodule/source/usb_os.c new file mode 100644 index 00000000..ff3cc0ab --- /dev/null +++ b/ehcmodule/source/usb_os.c @@ -0,0 +1,90 @@ +#include "syscalls.h" +#include +#include "ehci_types.h" +#include "usb.h" +#include "ehci.h" + +static int heap=-1; + +void ehci_usleep(int usec); +void ehci_msleep(int msec); + +extern u8 heap_space2[0xe000]; + +int usb_os_init(void) +{ + heap = os_heap_create(heap_space2, 0xe000); + //heap = os_heap_create((void*)0x13890000, 0x8000); + if(heap<0) + { + return -1; + } + return 0; +} + +void read_cache_data(char *in, int len) +{ +int n; +char t; + + for(n=0;n +#include +#include "syscalls.h" +#include "libwbfs.h" + +u32 n_sec,sec_size; + + + + + +/*static*/ int read_sector(void *ign,u32 lba,u32 count,void*buf) +{ + int ret; + + + os_sync_after_write(buf, count*sec_size); + + /* do + {*/ + ret = USBStorage_Read_Sectors(lba,count, buf); + /*}*/ + if(!ret) return 1; + + os_sync_before_read(buf, count*sec_size); + return 0; +} + +static wbfs_disc_t *wbfs_disc=NULL; + +u8 *disc_buff=NULL; +extern u32 current_disc_lba; + + +void wbfs_perform_disc(void) +{ + if(wbfs_disc) + { + + wbfs_close_disc(wbfs_disc);wbfs_disc=NULL; + } + if(!disc_buff) {disc_buff=WBFS_Alloc(0x8020);} + + current_disc_lba=0xffffffff; + +} +static wbfs_t *p=NULL; + +void release_wbfs_mem(void) +{ + if(disc_buff) WBFS_Free(disc_buff);disc_buff=NULL; + + if(wbfs_disc) + { + wbfs_close_disc(wbfs_disc);wbfs_disc=NULL; + } + if(p) + wbfs_close(p);p= NULL; + +} + +wbfs_disc_t * wbfs_init_with_partition(u8*discid, int partition) +{ + + + static u8 old_discid[6]=""; + + if(disc_buff) WBFS_Free(disc_buff);disc_buff=NULL; + + // opens the hd only is is not opened + if(!p) + { + USBStorage_Init(); + n_sec = USBStorage_Get_Capacity(&sec_size); + //debug_printf("hd found n_sec:%x sec_size %x\n",n_sec,sec_size); + if (n_sec==0) + return NULL; //no hd + p = wbfs_open_hd(read_sector, 0, 0, sec_size, n_sec,partition, 0); + if(!p) // no partition + return NULL; + } + // close previously disc opened except if discid is equal + if(wbfs_disc) + { + + if(!memcmp(old_discid,discid,6)) return wbfs_disc; + + wbfs_close_disc(wbfs_disc);wbfs_disc=NULL; + } + + // open the disc + wbfs_disc=wbfs_open_disc(p, discid); + + if(wbfs_disc) memcpy(old_discid,discid,6); + + return wbfs_disc; +} diff --git a/gettext-bin/libexpat.dll b/gettext-bin/libexpat.dll deleted file mode 100644 index 13bc7eec..00000000 Binary files a/gettext-bin/libexpat.dll and /dev/null differ diff --git a/gettext-bin/libgettextlib.dll b/gettext-bin/libgettextlib.dll deleted file mode 100644 index 6bc7525b..00000000 Binary files a/gettext-bin/libgettextlib.dll and /dev/null differ diff --git a/gettext-bin/libgettextpo.dll b/gettext-bin/libgettextpo.dll deleted file mode 100644 index 9a9aa3fe..00000000 Binary files a/gettext-bin/libgettextpo.dll and /dev/null differ diff --git a/gettext-bin/libgettextsrc.dll b/gettext-bin/libgettextsrc.dll deleted file mode 100644 index 0d5a5933..00000000 Binary files a/gettext-bin/libgettextsrc.dll and /dev/null differ diff --git a/gettext-bin/libiconv2.dll b/gettext-bin/libiconv2.dll deleted file mode 100644 index fb1ffba3..00000000 Binary files a/gettext-bin/libiconv2.dll and /dev/null differ diff --git a/gettext-bin/libintl3.dll b/gettext-bin/libintl3.dll deleted file mode 100644 index ec11e6b1..00000000 Binary files a/gettext-bin/libintl3.dll and /dev/null differ diff --git a/gettext-bin/msgmerge.exe b/gettext-bin/msgmerge.exe deleted file mode 100644 index dc5a3ffc..00000000 Binary files a/gettext-bin/msgmerge.exe and /dev/null differ diff --git a/gettext-bin/xgettext.exe b/gettext-bin/xgettext.exe deleted file mode 100644 index 590a19b0..00000000 Binary files a/gettext-bin/xgettext.exe and /dev/null differ diff --git a/gui.pnproj b/gui.pnproj deleted file mode 100644 index 2f251a5d..00000000 --- a/gui.pnproj +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/gui.pnps b/gui.pnps deleted file mode 100644 index 45a7f010..00000000 --- a/gui.pnps +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/libcios/include/ios_usbstorage.h b/libcios/include/ios_usbstorage.h new file mode 100644 index 00000000..792811c6 --- /dev/null +++ b/libcios/include/ios_usbstorage.h @@ -0,0 +1,10 @@ +#ifndef IOS_USBSTORAGE_H +#define IOS_USBSTORAGE_H +#include "syscalls.h" + +void ums_init(void); +s32 ums_read_sectors(u32 sector, u32 numSectors, void *buffer); +void ums_close(void); +void *ums_alloc(int size); +void ums_free(void *ptr); +#endif diff --git a/libcios/include/starlet.h b/libcios/include/starlet.h new file mode 100644 index 00000000..5acc5efc --- /dev/null +++ b/libcios/include/starlet.h @@ -0,0 +1,92 @@ +#ifndef STARLET_H +#define STARLET_H + +// info from wiibrew.org + +// IRQS (32 bits registers) + +/* +IRQ Description + +0 Starlet Timer +1 NAND Interface +2 AES Engine +3 SHA-1 Engine +4 USB Host Controller (EHCI) +5 USB Host Controller (OHCI0) +6 USB Host Controller (OHCI1) +7 SD Host Controller +8 802.11 Wireless +9 Unknown +10 Hollywood GPIOs (Broadway) +11 Hollywood GPIOs (Starlet) +12-16 Unknown +17 Reset button +18-29 Unknown +30 IPC (Broadway) +31 IPC (Starlet) +*/ + +#define HW_PPCIRQFLAG 0x0d800030 // Broadway IRQ Flags (write 1 to clear) +#define HW_PPCIRQMASK 0x0d800034 // Broadway IRQ Mask (write 1 to set) +#define HW_ARMIRQFLAG 0x0d800038 // Starlet IRQ Flags (write 1 to clear) +#define HW_ARMIRQMASK 0x0d80003c // Starlet IRQ Mask (write 1 to set) + +// GPIOS (32 bits registers) + +/* + +Bit Direction Connection Description + +0 IN POWER Power button input (pulse width limited; will not detect a held-down state). +1 OUT SHUTDOWN Output high to turn system off (Power LED = red). +2 OUT FAN Fan power, active high. +3 OUT DC_DC DC/DC converter power, active high (powers the Broadway?[check]). When off, also triggers the Yellow power LED. +4 OUT DI_SPIN DI spinup disable. If clear, the drive attempts to spin up a disc when reset (if there is one in the drive). If set, the drive ignores a present disc when reset. +5 OUT SLOT_LED Blue disc slot LED, active high. +6 IN EJECT_BTN Eject button (pulse width limited). Button press will also trigger the drive directly. +7 IN SLOT_IN Disc slot optical detector. High if disc in drive, disc being inserted, or disc still in slot after eject. +8 OUT SENSOR_BAR Sensor bar, active high. +9 OUT DO_EJECT Pulse high to trigger a DI eject from software. +10 OUT EEP_CS SEEPROM Chip Select. +11 OUT EEP_CLK SEEPROM Clock. +12 OUT EEP_MOSI Data to SEEPROM. +13 IN EEP_MISO Data from SEEPROM. +14 OUT AVE_SCL A/V Encoder IC Clock. +15 I/O AVE_SDA A/V Encoder IC Data (has an external pull-up, so you should only drive it low). +16 OUT DEBUG0 Debug Testpoint TP221. +17 OUT DEBUG1 Debug Testpoint TP222. +18 OUT DEBUG2 Debug Testpoint TP223. +19 OUT DEBUG3 Debug Testpoint TP224. +20 OUT DEBUG4 Debug Testpoint TP225. +21 OUT DEBUG5 Debug Testpoint TP226. +22 OUT DEBUG6 Debug Testpoint TP219. +23 OUT DEBUG7 Debug Testpoint TP220. + +*/ + +#define HW_GPIOB_OUT 0x0d8000c0 // GPIO Outputs (Broadway access) +#define HW_GPIOB_DIR 0x0d8000c4 // GPIO Direction (Broadway access) +#define HW_GPIOB_IN 0x0d8000c8 // GPIO Inputs (Broadway access) +#define HW_GPIOB_INTLVL 0x0d8000cc // GPIO Interrupt Levels (Broadway access) +#define HW_GPIOB_INTFLAG 0x0d8000d0 // GPIO Interrupt Flags (Broadway access) +#define HW_GPIOB_INTMASK 0x0d8000d4 // GPIO Interrupt Masks (Broadway access) +#define HW_GPIOB_INMIR 0x0d8000d8 // GPIO Input Mirror (Broadway access) +#define HW_GPIO_ENABLE 0x0d8000dc // GPIO Enable (Starlet only) +#define HW_GPIO_OUT 0x0d8000e0 // GPIO Outputs (Starlet only) +#define HW_GPIO_DIR 0x0d8000e4 // GPIO Direction (Starlet only) +#define HW_GPIO_IN 0x0d8000e8 // GPIO Inputs (Starlet only) +#define HW_GPIO_INTLVL 0x0d8000ec // GPIO Interrupt Levels (Starlet only) +#define HW_GPIO_INTFLAG 0x0d8000f0 // GPIO Interrupt Flags (Starlet only) +#define HW_GPIO_INTMASK 0x0d8000f4 // GPIO Interrupt Masks (Starlet only) +#define HW_GPIO_INMIR 0x0d8000f8 // GPIO Input Mirror (Starlet only) +#define HW_GPIO_OWNER 0x0d8000fc // GPIO Owner Select (Starlet only) + +// TIMER (32 bits registers) + +#define HW_TIMER 0x0d800010 // Timer counter +#define HW_ALARM 0x0d800014 // Alarm value + + +#endif + diff --git a/libcios/include/swi_mload.h b/libcios/include/swi_mload.h new file mode 100644 index 00000000..4b60874a --- /dev/null +++ b/libcios/include/swi_mload.h @@ -0,0 +1,233 @@ +/* SWI service from dev/mload (c) 2009 Hermes / www.elotrolado.net */ + +#ifndef IOS_SWI_MLOAD_H +#define IOS_SWI_MLOAD_H + +#include "types.h" +#include "starlet.h" + +/* NOTE: stack for SWI services is 0x900 bytes */ +/* WARNING: Interrupt are disabled in SWI functions and you cannot call syscalls */ + + +/***************************************************************************************************************************************************/ +/* + swi_mload_add_handler: add a new service handler for SWI + + svc_code: for example 0xab for svc 0xab + + func: function for the new SWI service + + return: none + +*/ + +void swi_mload_add_handler(u8 svc_code, int (*func) (u32 arg0, u32 arg1, u32 arg2, u32 arg3)); + + +/***************************************************************************************************************************************************/ +/* + swi_mload_EHCI_data: gets the EHCI struct from dev/mload + + return: the struct pointer + +*/ + +void * swi_mload_EHCI_data(void); + + +/***************************************************************************************************************************************************/ +/* + swi_mload_get_syscall_base: gets the syscall base address to call directly + + return: the address + +*/ + +u32 swi_mload_get_syscall_base(void); + + +/***************************************************************************************************************************************************/ +/* + swi_mload_get_ios_base: gets the ios base (FFS, ES, IOSP) used to create this cIOS + + return: the IOS base version + +*/ + +u32 swi_mload_get_ios_base(void); + + +/***************************************************************************************************************************************************/ +/* + swi_mload_memcpy: memcpy from supervisor mode + + dst: destination address + + src: source address + + len: datas to move + + return: none + +*/ + +void swi_mload_memcpy(void * dst, void * src, int len); + +/***************************************************************************************************************************************************/ +/* + swi_mload_memcpy_from_uncached: memcpy from supervisor mode. Copies from uncached source RAM to cached RAM + + dst: destination address + + src: source address uncached + + len: datas to move + + return: none + +*/ + +void swi_mload_memcpy_from_uncached(void * dst, void * src, int len); + + +/***************************************************************************************************************************************************/ +/* + swi_mload_get_register: function thinking to read 32 bits registers from supervisor mode + + addr: register address + + return: value + +*/ + +u32 swi_mload_get_register(u32 addr); + + +/***************************************************************************************************************************************************/ +/* + swi_mload_put_register: function thinking to write 32 bits registers from supervisor mode + + addr: register address + + val: new value for register + + return: none + +*/ + +void swi_mload_put_register(u32 addr, u32 val); + + +/***************************************************************************************************************************************************/ +/* + swi_mload_set_register: function thinking to set bits to 1 (with OR) in 32 bits registers from supervisor mode + + addr: register address + + val: bits to set must be 1 (operation reg|=val) + + return: none + +*/ + +void swi_mload_set_register(u32 addr, u32 val); + + +/***************************************************************************************************************************************************/ +/* + swi_mload_clr_register: function thinking to clear bits to 0 (with AND) in 32 bits registers from supervisor mode + + addr: register address + + val: bits to clear must be 1 (operation register &=~value) + + return: none + +*/ + +void swi_mload_clr_register(u32 addr, u32 val); + + +/***************************************************************************************************************************************************/ +/* + swi_mload_call_func: call to one function in Supervisor Mode + + in: pointer to data in (received as argument 0 in the function) + + out: pointer to data out (received as argument 0 in the function) + + return: result from the function + +*/ + +int swi_mload_call_func(int (*func) (void *in, void *out), void *in, void *out); + +/***************************************************************************************************************************************************/ +/* + swi_mload_led_on: frontal LED ON + + return: none + +*/ + +void swi_mload_led_on(void); + + +/***************************************************************************************************************************************************/ +/* + swi_mload_led_off: frontal LED OFF + + return: none + +*/ + +void swi_mload_led_off(void); + + +/***************************************************************************************************************************************************/ +/* + swi_mload_led_blink: frontal LED Blinking (note: it use a XOR function, so must call some times for blinking :P). It is thinking to see some activity... + + return: none + +*/ + +void swi_mload_led_blink(void); + +/***************************************************************************************************************************************************/ +/* + swi_mload_os_software_IRQ_func: function to call from os_software_IRQ(9) in system mode + + system_mode_func: function address + + return: none + +*/ + +void swi_mload_os_software_IRQ9_func( int (*system_mode_func)(void)); + + +/***************************************************************************************************************************************************/ +/* + swi_mload_log_func: control the log buffer for os_puts() + + mode: 0-> return log buffer 1-> clear log buffer 2-> set a new log buffer + + buffer_log: new buffer log address (only with mode==2) + + maxsize_log: max size for log (only with mode==2) + + return: current buffer_log (by default 4KB) the string finish with '\0' code + +*/ + +void * swi_mload_log_func(u32 mode, void *buffer_log, int maxsize_log); + + +/***************************************************************************************************************************************************/ + + + +#endif + diff --git a/libcios/include/syscalls.h b/libcios/include/syscalls.h new file mode 100644 index 00000000..317c1b75 --- /dev/null +++ b/libcios/include/syscalls.h @@ -0,0 +1,115 @@ +#ifndef IOS_SYSCALLS_H +#define IOS_SYSCALLS_H + +#include "types.h" + +typedef struct _ioctlv +{ + void *data; + unsigned long len; +} ioctlv; +typedef struct ipcmessage +{ + unsigned int command; // 0 + unsigned int result; // 4 + unsigned int fd; // 8 + union + { + struct + { + char *device; // 12 + unsigned int mode; // 16 + unsigned int resultfd; // 20 + } open; + + struct + { + void *data; + unsigned int length; + } read, write; + + struct + { + int offset; + int origin; + } seek; + + struct + { + unsigned int command; + + unsigned int *buffer_in; + unsigned int length_in; + unsigned int *buffer_io; + unsigned int length_io; + } ioctl; + struct + { + unsigned int command; + + unsigned int num_in; + unsigned int num_io; + ioctlv *vector; + } ioctlv; + }; +} __attribute__((packed)) ipcmessage; + +// NOTE: I think "autostart" is a flag to indicate an internal (child thread) or external thread +int os_thread_create( unsigned int (*entry)(void* arg), void* arg, void* stack, unsigned int stacksize, unsigned int priority, int autostart); +void os_thread_set_priority(int id, unsigned int priority); +int os_thread_get_priority(void); +int os_get_thread_id(void); +int os_get_parent_thread_id(void); + +int os_thread_continue(int id); +int os_thread_stop(int id); + +int os_message_queue_create(void* ptr, unsigned int max_entries); +int os_message_queue_receive(int queue, unsigned int* message, unsigned int flags); +int os_message_queue_send(int queue, unsigned int message, int flags); +int os_message_queue_send_now(int queue, unsigned int message, int flags); +void os_message_queue_ack(void* message, int result); + +int os_heap_create(void* ptr, int size); +int os_heap_destroy(int heap); +void* os_heap_alloc(int heap, unsigned int size); +void* os_heap_alloc_aligned(int heap, int size, int align); +void os_heap_free(int heap, void* ptr); +int os_device_register(const char* devicename, int queuehandle); + +void os_sync_before_read(void* ptr, int size); +void os_sync_after_write(void* ptr, int size); +void os_syscall_50(unsigned int unknown); + +int os_open(char* device, int mode); +int os_close(int fd); +int os_read(int fd, void *d, int len); +int os_write(int fd, void *s, int len); +int os_seek(int fd, int offset, int mode); +int os_ioctlv(int fd, int request, int in, int out, ioctlv *vector); +int os_ioctl(int fd, int request, void *in, int bytes_in, void *out, int bytes_out); + +// timer control +int os_create_timer(int time_us, int repeat_time_us, int message_queue, int message); // return the timer_id +int os_destroy_timer(int time_id); +int os_stop_timer(int timer_id); +int os_restart_timer(int timer_id, int time_us); // restart one stopped timer +int os_timer_now(int time_id); + +#define DEV_EHCI 4 +int os_register_event_handler(int device, int queue, int message); + +int os_unregister_event_handler(int device); + +int os_software_IRQ(int dev); + +void os_puts(char *str); // to create log in dev/mload + + +#ifdef DEBUG +void debug_printf(const char *fmt, ...); +void hexdump(void *d, int len); +#else +#define debug_printf(a...) do{}while(0) +#endif +#endif // IOS_SYSCALLS_H diff --git a/libcios/include/types.h b/libcios/include/types.h new file mode 100644 index 00000000..58daff1e --- /dev/null +++ b/libcios/include/types.h @@ -0,0 +1,144 @@ +#ifndef __GCTYPES_H__ +#define __GCTYPES_H__ + +/*! \file gctypes.h +\brief Data type definitions + +*/ +typedef signed char int8_t ; +typedef unsigned char uint8_t; +typedef signed short int16_t; +typedef unsigned short uint16_t; +typedef signed int int32_t; +typedef unsigned int uint32_t; + +#ifdef __cplusplus + extern "C" { +#endif /* __cplusplus */ + +/*+----------------------------------------------------------------------------------------------+*/ +typedef unsigned char u8; ///< 8bit unsigned integer +typedef unsigned short u16; ///< 16bit unsigned integer +typedef unsigned int u32; ///< 32bit unsigned integer +typedef unsigned long long u64; ///< 64bit unsigned integer +/*+----------------------------------------------------------------------------------------------+*/ +typedef signed char s8; ///< 8bit signed integer +typedef signed short s16; ///< 16bit signed integer +typedef signed int s32; ///< 32bit signed integer +typedef signed long long s64; ///< 64bit signed integer +/*+----------------------------------------------------------------------------------------------+*/ +typedef volatile unsigned char vu8; ///< 8bit unsigned volatile integer +typedef volatile unsigned short vu16; ///< 16bit unsigned volatile integer +typedef volatile unsigned int vu32; ///< 32bit unsigned volatile integer +typedef volatile unsigned long long vu64; ///< 64bit unsigned volatile integer +/*+----------------------------------------------------------------------------------------------+*/ +typedef volatile signed char vs8; ///< 8bit signed volatile integer +typedef volatile signed short vs16; ///< 16bit signed volatile integer +typedef volatile signed int vs32; ///< 32bit signed volatile integer +typedef volatile signed long long vs64; ///< 64bit signed volatile integer +/*+----------------------------------------------------------------------------------------------+*/ +// fixed point math typedefs +typedef s16 sfp16; ///< 1:7:8 fixed point +typedef s32 sfp32; ///< 1:19:8 fixed point +typedef u16 ufp16; ///< 8:8 fixed point +typedef u32 ufp32; ///< 24:8 fixed point +/*+----------------------------------------------------------------------------------------------+*/ +typedef float f32; +typedef double f64; +/*+----------------------------------------------------------------------------------------------+*/ +typedef volatile float vf32; +typedef volatile double vf64; +/*+----------------------------------------------------------------------------------------------+*/ + +// bool is a standard type in cplusplus, but not in c. +#ifndef __cplusplus +/** C++ compatible bool for C + +*/ +typedef u8 bool; +enum { false, true }; +#endif + +typedef unsigned int BOOL; +/*+----------------------------------------------------------------------------------------------+*/ +// alias type typedefs +#define FIXED s32 ///< Alias type for sfp32 +/*+----------------------------------------------------------------------------------------------+*/ +// boolean defines +#ifndef boolean +#define boolean u8 +#endif +/*+----------------------------------------------------------------------------------------------+*/ +#ifndef TRUE +#define TRUE 1 ///< True +#endif +/*+----------------------------------------------------------------------------------------------+*/ +#ifndef FALSE +#define FALSE 0 ///< False +#endif +/*+----------------------------------------------------------------------------------------------+*/ +#ifndef NULL +#define NULL 0 ///< Pointer to 0 +#endif +/*+----------------------------------------------------------------------------------------------+*/ +#ifndef LITTLE_ENDIAN +#define LITTLE_ENDIAN 3412 +#endif /* LITTLE_ENDIAN */ +/*+----------------------------------------------------------------------------------------------+*/ +#ifndef BIG_ENDIAN +#define BIG_ENDIAN 1234 +#endif /* BIGE_ENDIAN */ +/*+----------------------------------------------------------------------------------------------+*/ +#ifndef BYTE_ORDER +#define BYTE_ORDER BIG_ENDIAN +#endif /* BYTE_ORDER */ +/*+----------------------------------------------------------------------------------------------+*/ + + +//! argv structure +/*! \struct __argv + + structure used to set up argc/argv + +*/ +struct __argv { + int argvMagic; //!< argv magic number, set to 0x5f617267 ('_arg') if valid + char *commandLine; //!< base address of command line, set of null terminated strings + int length;//!< total length of command line + int argc; + char **argv; + char **endARGV; +}; + +//! Default location for the system argv structure. +extern struct __argv *__system_argv; + +// argv struct magic number +#define ARGV_MAGIC 0x5f617267 + + +typedef uint32_t sec_t; + +/* Attributes */ +#ifndef ATTRIBUTE_ALIGN +# define ATTRIBUTE_ALIGN(v) __attribute__((aligned(v))) +#endif +#ifndef ATTRIBUTE_PACKED +# define ATTRIBUTE_PACKED __attribute__((packed)) +#endif + +/* Stack align */ +#define STACK_ALIGN(type, name, cnt, alignment) \ + u8 _al__##name[((sizeof(type)*(cnt)) + (alignment) + (((sizeof(type)*(cnt))%(alignment)) > 0 ? ((alignment) - ((sizeof(type)*(cnt))%(alignment))) : 0))]; \ + type *name = (type*)(((u32)(_al__##name)) + ((alignment) - (((u32)(_al__##name))&((alignment)-1)))) + + + +#ifdef __cplusplus + } +#endif /* __cplusplus */ + +#endif /* TYPES_H */ + + +/* END OF FILE */ diff --git a/libcios/source/printf.c b/libcios/source/printf.c new file mode 100644 index 00000000..98cada8d --- /dev/null +++ b/libcios/source/printf.c @@ -0,0 +1,140 @@ +#include "syscalls.h" +#include + +/** + @brief simple printf like function that write its output to os_puts + @param format the format string, followed by format arguments. + supported formatters are '%X' '%0*X' '% *X' '%d' '%u' + this may not be perfectly compliant with ANSI-C printf, but its suffisant for common debugging.. +*/ + +#ifdef DEBUG +void debug_printf(const char *format, ...) +{ + static const char HEX[] = "0123456789ABCDEF"; + static const char hex[] = "0123456789abcdef"; + const char *hexp = HEX; + int val,i; + unsigned int u_val, u_val_inv, base; + unsigned char c; + va_list list; + int zeros = 0,chars; + int spaces = 0; + char buffer[1024],*ptr; + va_start (list, format); + + ptr = buffer; + for (;;) { + c = *format++; + while(c != '%' && c != '\0') // Until '%' or '\0' + { + *ptr++ = c; + c = *format++; + } + if(c == '\0') + { + *ptr++ = c; + va_end (list); + os_puts(buffer); + return ; + } + hexp = HEX; + CONTINUE_FORMAT: + switch (c = *format++) { + case '0': c = *format++; + if(c >= '1' && c <= '9') + { + zeros = c - '0'; + goto CONTINUE_FORMAT; + } + else + format--; + break; + case ' ': c = *format++; + if(c >= '1' && c <= '9') + { + spaces = c - '0'; + goto CONTINUE_FORMAT; + } + else + format--; + break; + case 'c': c = va_arg(list,int); + case '%': + *ptr++ = c; + continue; + case 's': + if(ptr!=buffer){ + *ptr=0; + os_puts(buffer); + } + os_puts(va_arg(list,char*)); + ptr=buffer; + break; + case '\0': + default: format--; continue; // will write it at next loop.. + case 'u': + case 'd': base = 10; goto CONVERT_THIS; + case 'p': zeros = 8;case 'x' : hexp = hex; + case 'X':base = 16; + + CONVERT_THIS: + val = va_arg(list,int); + if (c == 'd') { + if (val < 0) { + val = - val; + c = '-'; + *ptr++ = c; + } + } + u_val = val; + u_val_inv = 0; + chars = 0; + while(u_val){u_val_inv*= base;u_val_inv += u_val %base;u_val/=base; chars++;} + if(chars == 0)chars++; + + if(zeros){ + for(i=zeros - chars;i>0;i--) + *ptr++ = '0'; + } + if(spaces) + { + for(i=spaces - chars;i>0;i--) + *ptr++ = ' '; + } + do { + c = u_val_inv % base; + *ptr++ = hexp[c]; + u_val_inv /= base; + chars --; + } while (chars>0); + zeros = 0; + spaces = 0; + } + } +} +char ascii(char s) { + if(s < 0x20) return '.'; + if(s > 0x7E) return '.'; + return s; +} + +void hexdump(void *d, int len) { + u8 *data; + int i, off; + data = (u8*)d; + for (off=0; off=len) debug_printf(" "); + else debug_printf("%02x ",data[off+i]); + + debug_printf(" "); + for(i=0; i<16; i++) + if((i+off)>=len) debug_printf(" "); + else debug_printf("%c",ascii(data[off+i])); + debug_printf("\n"); + } +} + +#endif diff --git a/libcios/source/swi_mload.c b/libcios/source/swi_mload.c new file mode 100644 index 00000000..1c3469be --- /dev/null +++ b/libcios/source/swi_mload.c @@ -0,0 +1,269 @@ +/* SWI service from dev/mload (c) 2009 Hermes / www.elotrolado.net */ + +#include "swi_mload.h" + +// ASM function +extern int swi_mload_func (u32 arg0, u32 arg1, u32 arg2, u32 arg3); + + +/***************************************************************************************************************************************************/ +/* + swi_mload_add_handler: add a new service handler for SWI + + svc_code: for example 0xab for svc 0xab + + func: function for the new SWI service + + return: none + +*/ + +void swi_mload_add_handler(u8 svc_code, int (*func) (u32 arg0, u32 arg1, u32 arg2, u32 arg3)) +{ + swi_mload_func(0, (u32) svc_code, (u32) func, 0); +} + + +/***************************************************************************************************************************************************/ +/* + swi_mload_EHCI_data: gets the EHCI struct from dev/mload + + return: the struct pointer + +*/ + +void * swi_mload_EHCI_data(void) +{ + return (void *) swi_mload_func(1, 0, 0, 0); +} + +/***************************************************************************************************************************************************/ +/* + swi_mload_get_syscall_base: gets the syscall base address to call directly + + return: the address + +*/ + +u32 swi_mload_get_syscall_base(void) +{ + return (u32) swi_mload_func(17, 0, 0, 0); +} + +/***************************************************************************************************************************************************/ +/* + swi_mload_get_ios_base: gets the ios base (FFS, ES, IOSP) used to create this cIOS + + return: the address + +*/ + +u32 swi_mload_get_ios_base(void) +{ + return (u32) swi_mload_func(18, 0, 0, 0); +} + + + +/***************************************************************************************************************************************************/ +/* + swi_mload_memcpy: memcpy from supervisor mode + + dst: destination address + + src: source address + + len: datas to move + + return: none + +*/ + +void swi_mload_memcpy(void * dst, void * src, int len) +{ + if(len<=0) return; + swi_mload_func(2, (u32) dst, (u32) src, (u32) len); +} + +/***************************************************************************************************************************************************/ +/* + swi_mload_memcpy_from_uncached: memcpy from supervisor mode. Copies from uncached source RAM to cached RAM + + dst: destination address + + src: source address + + len: datas to move + + return: none + +*/ + +void swi_mload_memcpy_from_uncached(void * dst, void * src, int len) +{ + if(len<=0) return; + swi_mload_func(9, (u32) dst, (u32) src, (u32) len); +} + + +/***************************************************************************************************************************************************/ +/* + swi_mload_get_register: function thinking to read 32 bits registers from supervisor mode + + addr: register address + + return: value + +*/ + +u32 swi_mload_get_register(u32 addr) +{ + return swi_mload_func(3, (u32) addr, (u32) 0, (u32) 0); +} + + +/***************************************************************************************************************************************************/ +/* + swi_mload_put_register: function thinking to write 32 bits registers from supervisor mode + + addr: register address + + val: new value for register + + return: none + +*/ + +void swi_mload_put_register(u32 addr, u32 val) +{ + swi_mload_func(4, (u32) addr, (u32) val, (u32) 0); +} + + +/***************************************************************************************************************************************************/ +/* + swi_mload_set_register: function thinking to set bits to 1 (with OR) in 32 bits registers from supervisor mode + + addr: register address + + val: bits to set must be 1 (operation reg|=val) + + return: none + +*/ + +void swi_mload_set_register(u32 addr, u32 val) +{ + swi_mload_func(5, (u32) addr, (u32) val, (u32) 0); +} + +/***************************************************************************************************************************************************/ +/* + swi_mload_clr_register: function thinking to clear bits to 0 (with AND) in 32 bits registers from supervisor mode + + addr: register address + + val: bits to clear must be 1 (operation register &=~value) + + return: none + +*/ + +void swi_mload_clr_register(u32 addr, u32 val) +{ + swi_mload_func(6, (u32) addr, (u32) val, (u32) 0); +} + +/***************************************************************************************************************************************************/ +/* + swi_mload_call_func: call to one function in Supervisor Mode + + in: pointer to data in (received as argument 0 in the function) + + out: pointer to data out (received as argument 0 in the function) + + return: result from the function + +*/ + +int swi_mload_call_func(int (*func) (void *in, void *out), void *in, void *out) +{ + return swi_mload_func(16, (u32) func, (u32) in, (u32) out); +} + +/***************************************************************************************************************************************************/ +/* + swi_mload_led_on: frontal LED ON + + return: none + +*/ + +void swi_mload_led_on(void) +{ + swi_mload_func(128, 0, 0, 0); +} + +/***************************************************************************************************************************************************/ +/* + swi_mload_led_off: frontal LED OFF + + return: none + +*/ + +void swi_mload_led_off(void) +{ + swi_mload_func(129, 0, 0, 0); +} + +/***************************************************************************************************************************************************/ +/* + swi_mload_led_blink: frontal LED Blinking (note: it use a XOR function, so must call some times for blinking :P). It is thinking to see some activity... + + return: none + +*/ + +void swi_mload_led_blink(void) +{ + swi_mload_func(130, 0, 0, 0); +} + +/***************************************************************************************************************************************************/ +/* + swi_mload_os_software_IRQ_func: function to call from os_software_IRQ(9) in system mode + + system_mode_func: function address + + return: none + +*/ + +void swi_mload_os_software_IRQ9_func( int (*system_mode_func)(void)) +{ + swi_mload_func(7, (u32) system_mode_func, (u32) 0, (u32) 0); +} + +/***************************************************************************************************************************************************/ +/* + swi_mload_log_func: control the log buffer for os_puts() + + mode: 0-> return log buffer 1-> clear log buffer 2-> set a new log buffer + + buffer_log: new buffer log address (only with mode==2) + + maxsize_log: max size for log (only with mode==2) + + return: current buffer_log (by default 4KB) the string finish with '\0' code + +*/ + +void * swi_mload_log_func(u32 mode, void *buffer_log, int maxsize_log) +{ + return (void *) swi_mload_func(8, (u32) mode, (u32) buffer_log, (u32) maxsize_log); +} + +/***************************************************************************************************************************************************/ + + diff --git a/libcios/source/swi_mload.s b/libcios/source/swi_mload.s new file mode 100644 index 00000000..9b31bae6 --- /dev/null +++ b/libcios/source/swi_mload.s @@ -0,0 +1,13 @@ +/* SWI service from dev/mload (c) 2009 Hermes / www.elotrolado.net */ + + + .align 4 + .arm + .code 32 + .global swi_mload_func +swi_mload_func: + + svc 0xcc + bx lr + + diff --git a/libcios/source/syscalls.s b/libcios/source/syscalls.s new file mode 100644 index 00000000..82278b44 --- /dev/null +++ b/libcios/source/syscalls.s @@ -0,0 +1,258 @@ +/* syscalls.s (c) 2009, Hermes +info from http://wiibrew.org/wiki/IOS/Syscalls +*/ + +.macro syscall vec_sys + .long 0xE6000010 +(\vec_sys<<5) + bx lr +.endm + .align 4 + .arm + + .code 32 + .global os_thread_create +os_thread_create: + syscall 0x0 + + .code 32 + .global os_thread_joint +os_thread_joint: + syscall 0x1 + + .code 32 + .global os_thread_cancel +os_thread_cancel: + syscall 0x2 + + .code 32 + .global os_get_thread_id +os_get_thread_id: + syscall 0x3 + + .code 32 + .global os_get_parent_thread_id +os_get_parent_thread_id: + syscall 0x4 + + .code 32 + .global os_thread_continue +os_thread_continue: + syscall 0x5 + + .code 32 + .global os_thread_stop +os_thread_stop: + syscall 0x6 + + .code 32 + .global os_thread_yield +os_thread_yiel: + syscall 0x7 + + .code 32 + .global os_thread_get_priority +os_thread_get_priority : + syscall 0x8 + + .code 32 + .global os_thread_set_priority +os_thread_set_priority: + syscall 0x9 + + .code 32 + .global os_message_queue_create +os_message_queue_create: + syscall 0xa + + .code 32 + .global os_message_queue_destroy +os_message_queue_destroy: + syscall 0xb + + .code 32 + .global os_message_queue_send +os_message_queue_send: + syscall 0xc + + .code 32 + .global os_message_queue_send_now +os_message_queue_send_now: + syscall 0xd + + .code 32 + .global os_message_queue_receive +os_message_queue_receive: + syscall 0xe + + .code 32 + .global os_register_event_handler +os_register_event_handler: + syscall 0xf + + .code 32 + .global os_unregister_event_handler +os_unregister_event_handler: + syscall 0x10 + + .code 32 + .global os_create_timer +os_create_timer: + syscall 0x11 + + + .code 32 + .global os_restart_timer +os_restart_timer: + syscall 0x12 + + .code 32 + .global os_stop_timer +os_stop_timer: + syscall 0x13 + + .code 32 + .global os_destroy_timer +os_destroy_timer: + syscall 0x14 + + .code 32 + .global os_timer_now +os_timer_now: + syscall 0x15 + + .code 32 + .global os_heap_create +os_heap_create: + syscall 0x16 + + .code 32 + .global os_heap_destroy +os_heap_destroy: + syscall 0x17 + + .code 32 + .global os_heap_alloc +os_heap_alloc: + syscall 0x18 + + .code 32 + .global os_heap_alloc_aligned +os_heap_alloc_aligned: + syscall 0x19 + + .code 32 + .global os_heap_free +os_heap_free: + syscall 0x1a + + .code 32 + .global os_device_register +os_device_register: + syscall 0x1b + + .code 32 + .global os_open +os_open: + syscall 0x1c + + .code 32 + .global os_close +os_close: + syscall 0x1d + + .code 32 + .global os_read +os_read: + syscall 0x1e + + .code 32 + .global os_write +os_write: + syscall 0x1f + + .code 32 + .global os_seek +os_seek: + syscall 0x20 + + .code 32 + .global os_ioctl +os_ioctl: + syscall 0x21 + + .code 32 + .global os_ioctlv +os_ioctlv: + syscall 0x22 + + .code 32 + .global os_open_async +os_open_async: + syscall 0x23 + + .code 32 + .global os_close_async +os_close_async: + syscall 0x24 + + .code 32 + .global os_read_async +os_read_async: + syscall 0x25 + + .code 32 + .global os_write_async +os_write_async: + syscall 0x26 + + .code 32 + .global os_seek_async +os_seek_async: + syscall 0x27 + + .code 32 + .global os_ioctl_async +os_ioctl_async: + syscall 0x28 + + .code 32 + .global os_ioctlv_async +os_ioctlv_async: + syscall 0x29 + + .code 32 + .global os_message_queue_ack +os_message_queue_ack: + syscall 0x2a + + .code 32 + .global os_software_IRQ +os_software_IRQ: + syscall 0x34 + + .code 32 + .global os_sync_before_read +os_sync_before_read: + syscall 0x3f + + .code 32 + .global os_sync_after_write +os_sync_after_write: + syscall 0x40 + + .code 32 + .global os_syscall_50 +os_syscall_50: + syscall 0x50 + + .code 32 + .global os_puts +os_puts: + adds r1,r0,#0 + movs R0,#4 + svc 0xAB + bx lr + + + + diff --git a/mload/MakeIt.bat b/mload/MakeIt.bat new file mode 100644 index 00000000..a6340c2d --- /dev/null +++ b/mload/MakeIt.bat @@ -0,0 +1,4 @@ + +make + +pause diff --git a/mload/Makefile b/mload/Makefile new file mode 100644 index 00000000..c172263a --- /dev/null +++ b/mload/Makefile @@ -0,0 +1,143 @@ +#--------------------------------------------------------------------------------- +# Clear the implicit built in rules +#--------------------------------------------------------------------------------- +.SUFFIXES: + +#--------------------------------------------------------------------------------- +# TARGET is the name of the output +# BUILD is the directory where object files & intermediate files will be placed +# SOURCES is a list of directories containing source code +# INCLUDES is a list of directories containing extra header files +#--------------------------------------------------------------------------------- +TARGET := $(notdir $(CURDIR)) +BUILD := build +SOURCES := source ../libcios/source +DATA := data +INCLUDES := include ../tinyehci ../libcios/include +SCRIPTDIR := scripts +BIN := bin + +STRIPIOS := ../stripios/stripios.exe + +LIBS := +LIBDIRS := + +export IOS_MODULE=haxx + +CFLAGS+=-D$(IOS_MODULE) + +#--------------------------------------------------------------------------------- +# the prefix on the compiler executables +#--------------------------------------------------------------------------------- +PREFIX := $(DEVKITARM)/bin/arm-eabi- +CC := $(PREFIX)gcc +CXX := $(PREFIX)g++ +AR := $(PREFIX)ar +OBJCOPY := $(PREFIX)objcopy +LD := $(PREFIX)g++ +AS := $(PREFIX)g++ + +#--------------------------------------------------------------------------------- +# linker script +#--------------------------------------------------------------------------------- +LINKSCRIPT := $(ROOT)/$(SCRIPTDIR)/link.ld +SPECS := $(ROOT)/$(SCRIPTDIR)/nostart.specs + +ifeq ($(BUILDING),$(emptystring)) + +export ROOT := $(CURDIR) + + +all: + @[ -d $(BUILD) ] || mkdir -p $(BUILD) + @$(MAKE) -C $(BUILD) --no-print-directory -f $(CURDIR)/Makefile BUILDING=all +clean: + @echo clean ... + @rm -fr $(BUILD) $(BIN)/*.elf +else + +TARGET := $(notdir $(ROOT)) +STRIPIOS := $(ROOT)/$(STRIPIOS) +#---------------------------------------------------- +# MS Visual Studio Style Fix: +#---------------------------------------------------- +STYLEFIX = 2>&1 | sed -e 's/\([a-zA-Z\.]\+\):\([0-9]\+\):\([0-9]\+:\)\?\(.\+\)/\1(\2):\4/' -e 's/undefined/error: undefined/' + +#--------------------------------------------------------------------------------- +# automatically build a list of object files for our project +#--------------------------------------------------------------------------------- +OUTPUT := $(ROOT)/$(BIN)/$(TARGET) +CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(ROOT)/$(dir)/*.c))) +CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(ROOT)/$(dir)/*.cpp))) +sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(ROOT)/$(dir)/*.s))) +SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(ROOT)/$(dir)/*.S))) +BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(ROOT)/$(dir)/*.*))) + +OFILES := $(addsuffix _bin.o,$(BINFILES)) \ + $(CPPFILES:.cpp=_cpp.o) $(CFILES:.c=_c.o) \ + $(sFILES:.s=_s.o) $(SFILES:.S=_S.o) + +DEPENDS := $(OFILES:.o=.d) + +VPATH = $(foreach dir,$(SOURCES),$(ROOT)/$(dir)) + + +#--------------------------------------------------------------------------------- +# options for code generation +#--------------------------------------------------------------------------------- +INCLUDE := $(foreach dir,$(INCLUDES),-I$(ROOT)/$(dir)) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ + -I$(ROOT)/$(BUILD) + +#--------------------------------------------------------------------------------- +# build a list of library paths +#--------------------------------------------------------------------------------- +LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) + +ARCH = -mcpu=arm9tdmi -mtune=arm9tdmi -mthumb -mthumb-interwork -mbig-endian + +CFLAGS = -g $(ARCH) $(INCLUDE) -fno-strict-aliasing -Wall -O3 -fomit-frame-pointer -ffast-math -fverbose-asm -Wpointer-arith -Winline -Wundef -g -ffunction-sections -fdata-sections -fno-exceptions +CFLAGS += -Wstrict-prototypes + + +AFLAGS = -g $(ARCH) -x assembler-with-cpp + +LDFLAGS = -g $(ARCH) -specs=$(SPECS) -T$(LINKSCRIPT) $(LIBPATHS) $(LIBS) -Wl,--gc-sections -Wl,-static -Wl,-Map,$(TARGET).map -nostartfiles + + +$(OUTPUT).elf: $(TARGET).elf + @echo stripping $(notdir $@) + @$(STRIPIOS) $< $@ strip 0x13700000 + cp -f $(OUTPUT).elf ../../cios_installer/data/$(TARGET).elf + + +%.elf: $(OFILES) + @echo linking $(notdir $@) + @$(LD) -g -o $@ $(OFILES) $(LDFLAGS) $(STYLEFIX) + + +%_cpp.o : %.cpp + @echo $(notdir $<) + @$(CXX) -MMD -MF $*_cpp.d $(CFLAGS) -c $< -o$@ $(STYLEFIX) + +%_c.o : %.c + @echo $(notdir $<) + @$(CC) -MMD -MF $*_c.d $(CFLAGS) -c $< -o$@ $(STYLEFIX) + +%_s.o : %.s + @echo $(notdir $<) + @$(AS) -MMD -MF $*_s.d $(AFLAGS) -c $< -o$@ $(STYLEFIX) + +%_bin.o : %.bin + @echo $(notdir $<) + @$(bin2o) + +-include $(DEPENDS) + +define bin2o + @echo -e "\t.section .rodata\n\t.align 4\n\t.global $(*)\n\t.global $(*)_end\n$(*):\n\t.incbin \"$(subst /,\\\\\\\\,$(shell echo $< | sed 's=/==;s=/=:/='))\"\n$(*)_end:\n" > $@.s + @$(CC) $(ASFLAGS) $(AFLAGS) -c $@.s -o $@ + @rm -rf $@.s +endef + +endif diff --git a/mload/Makefile_port1 b/mload/Makefile_port1 new file mode 100644 index 00000000..3c5be4eb --- /dev/null +++ b/mload/Makefile_port1 @@ -0,0 +1,143 @@ +#--------------------------------------------------------------------------------- +# Clear the implicit built in rules +#--------------------------------------------------------------------------------- +.SUFFIXES: + +#--------------------------------------------------------------------------------- +# TARGET is the name of the output +# BUILD is the directory where object files & intermediate files will be placed +# SOURCES is a list of directories containing source code +# INCLUDES is a list of directories containing extra header files +#--------------------------------------------------------------------------------- +TARGET := $(notdir $(CURDIR)) +BUILD := build +SOURCES := source ../libcios/source +DATA := data +INCLUDES := include ../tinyehci ../libcios/include +SCRIPTDIR := scripts +BIN := bin + +STRIPIOS := ../stripios/stripios.exe + +LIBS := +LIBDIRS := + +export IOS_MODULE=haxx + +CFLAGS+=-D$(IOS_MODULE) + +#--------------------------------------------------------------------------------- +# the prefix on the compiler executables +#--------------------------------------------------------------------------------- +PREFIX := $(DEVKITARM)/bin/arm-eabi- +CC := $(PREFIX)gcc +CXX := $(PREFIX)g++ +AR := $(PREFIX)ar +OBJCOPY := $(PREFIX)objcopy +LD := $(PREFIX)g++ +AS := $(PREFIX)g++ + +#--------------------------------------------------------------------------------- +# linker script +#--------------------------------------------------------------------------------- +LINKSCRIPT := $(ROOT)/$(SCRIPTDIR)/link.ld +SPECS := $(ROOT)/$(SCRIPTDIR)/nostart.specs + +ifeq ($(BUILDING),$(emptystring)) + +export ROOT := $(CURDIR) + + +all: + @[ -d $(BUILD) ] || mkdir -p $(BUILD) + @$(MAKE) -C $(BUILD) --no-print-directory -f $(CURDIR)/Makefile BUILDING=all +clean: + @echo clean ... + @rm -fr $(BUILD) $(BIN)/*.elf +else + +TARGET := $(notdir $(ROOT)) +STRIPIOS := $(ROOT)/$(STRIPIOS) +#---------------------------------------------------- +# MS Visual Studio Style Fix: +#---------------------------------------------------- +STYLEFIX = 2>&1 | sed -e 's/\([a-zA-Z\.]\+\):\([0-9]\+\):\([0-9]\+:\)\?\(.\+\)/\1(\2):\4/' -e 's/undefined/error: undefined/' + +#--------------------------------------------------------------------------------- +# automatically build a list of object files for our project +#--------------------------------------------------------------------------------- +OUTPUT := $(ROOT)/$(BIN)/$(TARGET) +CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(ROOT)/$(dir)/*.c))) +CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(ROOT)/$(dir)/*.cpp))) +sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(ROOT)/$(dir)/*.s))) +SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(ROOT)/$(dir)/*.S))) +BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(ROOT)/$(dir)/*.*))) + +OFILES := $(addsuffix _bin.o,$(BINFILES)) \ + $(CPPFILES:.cpp=_cpp.o) $(CFILES:.c=_c.o) \ + $(sFILES:.s=_s.o) $(SFILES:.S=_S.o) + +DEPENDS := $(OFILES:.o=.d) + +VPATH = $(foreach dir,$(SOURCES),$(ROOT)/$(dir)) + + +#--------------------------------------------------------------------------------- +# options for code generation +#--------------------------------------------------------------------------------- +INCLUDE := $(foreach dir,$(INCLUDES),-I$(ROOT)/$(dir)) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ + -I$(ROOT)/$(BUILD) + +#--------------------------------------------------------------------------------- +# build a list of library paths +#--------------------------------------------------------------------------------- +LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) + +ARCH = -mcpu=arm9tdmi -mtune=arm9tdmi -mthumb -mthumb-interwork -mbig-endian + +CFLAGS = -DUSE_USB_PORT_1 -g $(ARCH) $(INCLUDE) -fno-strict-aliasing -Wall -O3 -fomit-frame-pointer -ffast-math -fverbose-asm -Wpointer-arith -Winline -Wundef -g -ffunction-sections -fdata-sections -fno-exceptions +CFLAGS += -Wstrict-prototypes + + +AFLAGS = -g $(ARCH) -x assembler-with-cpp + +LDFLAGS = -g $(ARCH) -specs=$(SPECS) -T$(LINKSCRIPT) $(LIBPATHS) $(LIBS) -Wl,--gc-sections -Wl,-static -Wl,-Map,$(TARGET).map -nostartfiles + + +$(OUTPUT).elf: $(TARGET).elf + @echo stripping $(notdir $@) + @$(STRIPIOS) $< $@ strip 0x13700000 + cp -f $(OUTPUT).elf ../../cios_installer/data/$(TARGET).elf + + +%.elf: $(OFILES) + @echo linking $(notdir $@) + @$(LD) -g -o $@ $(OFILES) $(LDFLAGS) $(STYLEFIX) + + +%_cpp.o : %.cpp + @echo $(notdir $<) + @$(CXX) -MMD -MF $*_cpp.d $(CFLAGS) -c $< -o$@ $(STYLEFIX) + +%_c.o : %.c + @echo $(notdir $<) + @$(CC) -MMD -MF $*_c.d $(CFLAGS) -c $< -o$@ $(STYLEFIX) + +%_s.o : %.s + @echo $(notdir $<) + @$(AS) -MMD -MF $*_s.d $(AFLAGS) -c $< -o$@ $(STYLEFIX) + +%_bin.o : %.bin + @echo $(notdir $<) + @$(bin2o) + +-include $(DEPENDS) + +define bin2o + @echo -e "\t.section .rodata\n\t.align 4\n\t.global $(*)\n\t.global $(*)_end\n$(*):\n\t.incbin \"$(subst /,\\\\\\\\,$(shell echo $< | sed 's=/==;s=/=:/='))\"\n$(*)_end:\n" > $@.s + @$(CC) $(ASFLAGS) $(AFLAGS) -c $@.s -o $@ + @rm -rf $@.s +endef + +endif diff --git a/mload/include/utils.h b/mload/include/utils.h new file mode 100644 index 00000000..87aa6767 --- /dev/null +++ b/mload/include/utils.h @@ -0,0 +1,9 @@ +#define swab32(x) ((u32)( \ + (((u32)(x) & (u32)0x000000ffUL) << 24) | \ + (((u32)(x) & (u32)0x0000ff00UL) << 8) | \ + (((u32)(x) & (u32)0x00ff0000UL) >> 8) | \ + (((u32)(x) & (u32)0xff000000UL) >> 24))) +#define swab16(x) ((u16)( \ + (((u16)(x) & (u16)0x00ffU) << 8) | \ + (((u16)(x) & (u16)0xff00U) >> 8))) + diff --git a/mload/scripts/link.ld b/mload/scripts/link.ld new file mode 100644 index 00000000..951116e1 --- /dev/null +++ b/mload/scripts/link.ld @@ -0,0 +1,63 @@ +OUTPUT_FORMAT("elf32-bigarm", "elf32-bigarm", "elf32-littlearm") +OUTPUT_ARCH(arm) +ENTRY(_start) + + +/* + Change exe start and ram start as needed for the custom IOS module. + Current settings are for the freespace after OH1 module from IOS 31. + */ + +MEMORY { + ios_info_table : ORIGIN = 0x0, LENGTH = 0xf4 + exe(rwx) : ORIGIN = 0x138c0000, LENGTH = 0x4000 + + ram(rw) : ORIGIN = 0x138c8000, LENGTH = 0x8000 + + ios_exe(rw) : ORIGIN = 0x13700000, LENGTH = 0x80000 + +} + + + +__exe_start_virt__ = 0x138c0000; +__exe_start_phys__ = 0x138c0000; +__ram_start_virt__ = 0x138c8000; +__ram_start_phys__ = 0x138c8000; +__ios_info_table_start = 0x0; + + + +SECTIONS +{ + .debug_aranges 0 : { *(.debug_aranges) } .debug_pubnames 0 : { *(.debug_pubnames) } .debug_info 0 : { *(.debug_info) } .debug_abbrev 0 : { *(.debug_abbrev) } .debug_line 0 : { *(.debug_line) } .debug_frame 0 : { *(.debug_frame) } .debug_str 0 : { *(.debug_str) } .debug_loc 0 : { *(.debug_loc) } .debug_macinfo 0 : { *(.debug_macinfo) } .note.arm.ident 0 : { KEEP (*(.note.arm.ident)) } + + + .mem_exe 0x13700000 : { + *(.mem_exe) + } > ios_exe + + + .ios_info_table __ios_info_table_start : { . = .; KEEP (*(.ios_info_table)) } > ios_info_table + .init __exe_start_virt__ : AT (__exe_start_phys__) { . = .; KEEP (*(.init)) } > exe + .text ALIGN (0x4) : { + *(.text*) + *(.gnu.warning) + *(.gnu.linkonce.t.*) + *(.init) + *(.glue_7) + *(.glue_7t) } > exe + .data __ram_start_virt__ : AT (__ram_start_phys__) { KEEP( *(.ios_data) ) *(.data*) *(.data1) *(.gnu.linkonce.d.*) . = ALIGN (4); __CTOR_LIST__ = ABSOLUTE (.); KEEP (*(SORT (.ctors*))) __CTOR_END__ = ABSOLUTE (.); __DTOR_LIST__ = ABSOLUTE (.); KEEP (*(SORT (.dtors*))) __DTOR_END__ = ABSOLUTE (.); *(.dynamic) *(.sdata*) *(.gnu.linkonce.s.*) . = ALIGN (4); *(.2ram.*) } > ram + .fini : { . = .; *(.fini) } > ram + .rodata ALIGN (0x4) : { + . = .; + *(.rodata*) + *(.gnu.linkonce.r.*) } > ram + .rodata1 ALIGN (0x4) : { . = .; *(.rodata1) } > ram + .fixup ALIGN (0x4) : { . = .; *(.fixup) } > ram + .gcc_except_table ALIGN (0x4) : { . = .; *(.gcc_except_table) } > ram + .got ALIGN (0x4) : { *(.got.plt) *(.got) } > ram + .bss ALIGN (0x4) : { *(.scommon) *(.dynsbss) *(.sbss*) *(.gnu.linkonce.sb.*) *(.dynbss) *(.bss*) *(.gnu.linkonce.b.*) *(COMMON) KEEP( *(.ios_bss) ) } > ram + . = ALIGN(4); + +} diff --git a/mload/scripts/nostart.specs b/mload/scripts/nostart.specs new file mode 100644 index 00000000..9c27dcad --- /dev/null +++ b/mload/scripts/nostart.specs @@ -0,0 +1,2 @@ +*startfile: +crti%O%s crtbegin%O%s diff --git a/mload/source/crt0.s b/mload/source/crt0.s new file mode 100644 index 00000000..f08bc70b --- /dev/null +++ b/mload/source/crt0.s @@ -0,0 +1,299 @@ +/* + Custom IOS module for Wii. + Copyright (C) 2008 neimod. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + + .section ".init" + .global _start + + .align 4 + .arm + +/******************************************************************************* + * + * crt0.s - IOS module startup code + * + ******************************************************************************* + * + * + * v1.0 - 26 July 2008 - initial release by neimod + * v1.1 - 5 September 2008 - prepared for public release + * + */ + + // DIP values + //.EQU ios_thread_arg, 3 + //.EQU ios_thread_priority, 0x54 + // OH0 values + .EQU ios_thread_arg, 4 + .EQU ios_thread_priority, 0x79 + .EQU ios_thread_stacksize, 0x1000 + +// WARNING: You cannot change this code !!!! +_start: + b _start_2 + + + .global table_jump_ext + .thumb_func +table_jump_ext: + .code 16 + .align 2 + b ES_ioctlv_ret__ + nop + b IRQ_9 + nop + .code 32 + b swi_vector + + + .global ES_ioctlv_ret__ + .thumb_func +ES_ioctlv_ret__: + .code 16 + .align 2 + + ldr r1, = ES_ioctlv_vect + ldr r1, [r1] + nop + cmp r1, #0 + beq ES_ioctlv_ret + bx r1 + +/* return to dev/es ioctlv routine */ + + .global ES_ioctlv_ret + .thumb_func + .code 16 +ES_ioctlv_ret: + push {r4-r6,lr} + sub sp, sp, #0x20 + ldr r5, [r0,#8] + add r1, r0, #0 + ldr r3, = 0x201000D5 + bx r3 + +// to call one far function in system mode using os_software_IRQ(9) + .code 16 + .global IRQ_9 + .thumb_func +IRQ_9: + + push {r6} + bl call_system + add r5, r0, #0 + pop {r6} + +irq9_1: + bl exit_irq9 + add r0, r5, #0 + + pop {r4-r6} + pop {r1} + bx r1 + + + .code 16 +exit_irq9: + .thumb_func + bx pc + .align 4 + .code 32 + + add r0, r6, #0 + mrs r1, cpsr + bic r1, r1, #0xc0 + orr r1, r1, r0 + msr cpsr_c, r1 + bx lr + +// END of critic area + .align 4 + .code 32 +_start_2: + + ldr sp, =ios_thread_stack + + /* Execute main program */ + mov r0, #0 @ int argc + mov r1, #0 @ char *argv[] + ldr r3, =main + bx r3 + + .align 4 + .code 32 + .global direct_syscall +direct_syscall: + ldr r12, =syscall_base + ldr r12, [r12] + nop + ldr r12, [r12,r11,lsl#2] + nop + bx r12 + + .align 4 + .code 32 + .global direct_os_sync_before_read +direct_os_sync_before_read: + + + mov r11, #0x3f + b direct_syscall + + .align 4 + .code 32 + .global direct_os_sync_after_write +direct_os_sync_after_write: + + + mov r11, #0x40 + b direct_syscall + + .align 4 + .code 32 + .global read_access_perm +read_access_perm: + mrc p15, 0, r0,c3,c0 + bx lr + + .align 4 + .code 32 + .global write_access_perm +write_access_perm: + mcr p15, 0, r0,c3,c0 + bx lr + + .align 4 + .code 32 + .global ic_invalidate +ic_invalidate: + mov r0, #0 + mcr p15, 0, r0, c7, c5, 0 + bx lr + +// to exit in system mode using os_software_IRQ(10) + .global swi_vector + .code 16 +swi_vector: + bx pc + .code 32 + ldr sp, =swi_stack + nop + stmfd sp!, {r1-r12,lr} + nop + mrs r12, cpsr + stmfd sp!, {r12} + nop + + ldr r12,=swi_intr_addr + str lr, [r12] + nop + + bl _swi_handler_ + + ldmfd sp!, {r12} + nop + msr cpsr_c, r12 + ldmfd sp!, {r1-r12,lr} + nop + + movs pc, lr + +_swi_handler_: + ldr r12, =swi_handler + bx r12 + + + .thumb_func + .align + .pool + + .pool + + /****************************************************************************** + * + * IOS mem_exe for load modules (512KB) + * + * + ****************************************************************************** + */ + + + + .section ".mem_exe" ,"aw",%progbits + .global mem_exe +mem_exe: + .space 0x80000 + + + +/******************************************************************************* + * IOS data section + * + * Basically, this is required for the program header not to be messed up + * The program header will only be generated correctly if there is "something" + * in the ram segment, this makes sure of that by placing a silly string there. + ******************************************************************************* + */ + .section ".ios_data" ,"aw",%progbits + .ascii "IOS module" + + +/******************************************************************************* + * IOS bss section + * + * This contains the module's thread stack + ******************************************************************************* + */ + .section ".ios_bss", "a", %nobits + .global ios_thread_stack_start /* stack address decrease.. */ +ios_thread_stack_start: + .space ios_thread_stacksize + .global ios_thread_stack /* stack address decrease.. */ +ios_thread_stack: + .space 0x900 +swi_stack: + + .section ".ios_info_table","ax",%progbits + +/******************************************************************************* + * IOS info table section + * + * This contains the module's loader information + * The stripios tool will find this, and package it nicely for the IOS system + ******************************************************************************* + */ + .global ios_info_table +ios_info_table: + + .long 0x0 + .long 0x28 @ numentries * 0x28 + .long 0x6 + .long 0xB + .long ios_thread_arg @ passed to thread entry func, maybe module id + .long 0x9 + .long _start + .long 0x7D + .long ios_thread_priority + .long 0x7E + .long ios_thread_stacksize + .long 0x7F + .long ios_thread_stack + + + + .end diff --git a/mload/source/main.c b/mload/source/main.c new file mode 100644 index 00000000..3a4c3628 --- /dev/null +++ b/mload/source/main.c @@ -0,0 +1,964 @@ +/* + dev/mload: Custom IOS module for Wii, to load ios elfs, initialize USB 2.0 and others uses + This module is derived from haxx.elf + Copyright (C) 2009-2010 Hermes. + Copyright (C) 2008 neimod. + + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + + +/******************************************************************************* + * + * main.c - IOS module main code + * + ******************************************************************************* + * + * + * v1.0 - 26 July 2008 - initial release by neimod + * v1.1 - 5 September 2008 - prepared for public release + * v1.2 - march 2008 - added some IOTCL, put it into its own module, by kwiirk + * + */ + + +#include +#include +#include "syscalls.h" +#include "swi_mload.h" + +#define MLOAD_VER 5 +#define MLOAD_SUBVER 2 +#define STR_VERSION "dev/mload v5.2 (c) 2009-2010, Hermes\n" + +#define IOS_OPEN 0x01 +#define IOS_CLOSE 0x02 +#define IOS_READ 0x03 +#define IOS_WRITE 0x04 +#define IOS_SEEK 0x05 +#define IOS_IOCTL 0x06 +#define IOS_IOCTLV 0x07 + +#define MLOAD_MLOAD_THREAD_ID 0x4D4C4400 +#define MLOAD_GET_IOS_BASE 0x4D4C4401 +#define MLOAD_GET_MLOAD_VERSION 0x4D4C4402 + +#define MLOAD_LOAD_MODULE 0x4D4C4480 +#define MLOAD_RUN_MODULE 0x4D4C4481 +#define MLOAD_RUN_THREAD 0x4D4C4482 + +#define MLOAD_STOP_THREAD 0x4D4C4484 +#define MLOAD_CONTINUE_THREAD 0x4D4C4485 + +#define MLOAD_GET_LOAD_BASE 0x4D4C4490 +#define MLOAD_MEMSET 0x4D4C4491 + +#define MLOAD_GET_EHCI_DATA 0x4D4C44A0 +#define MLOAD_GET_LOG 0x4D4C44A1 + +#define MLOAD_SET_ES_IOCTLV 0x4D4C44B0 +#define MLOAD_SET_SYSTEM_FUNC 0x4D4C44B1 + +#define MLOAD_GETW 0x4D4C44C0 +#define MLOAD_GETH 0x4D4C44C1 +#define MLOAD_GETB 0x4D4C44C2 +#define MLOAD_SETW 0x4D4C44C3 +#define MLOAD_SETH 0x4D4C44C4 +#define MLOAD_SETB 0x4D4C44C5 + +#define DEVICE "/dev/mload" + + +u32 IOS_BASE=0; +u8 ES_patch_ioctvl[8] = { + 0x49, 0x00, 0x47, 0x08, /* addr in mload.elf */ 0x13, 0x8c, 0x00, 0x4+1 // (Thumb) +}; + + +extern void direct_syscall(void); +u32 syscall_base=0; + +extern int ES_ioctlv_ret(void *); + +unsigned ES_ioctlv_vect=((unsigned) ES_ioctlv_ret); + +int (*system_mode_func)(void)=0; + +unsigned int heapspace[0x100/4] __attribute__ ((aligned (32))); + +// from IOS ELF stripper of neimod + +typedef struct +{ + u32 ident0; + u32 ident1; + u32 ident2; + u32 ident3; + u32 machinetype; + u32 version; + u32 entry; + u32 phoff; + u32 shoff; + u32 flags; + u16 ehsize; + u16 phentsize; + u16 phnum; + u16 shentsize; + u16 shnum; + u16 shtrndx; +} elfheader; + +typedef struct +{ + u32 type; + u32 offset; + u32 vaddr; + u32 paddr; + u32 filesz; + u32 memsz; + u32 flags; + u32 align; +} elfphentry; + +#define ioctlv_u8(a) (*((u8*)(a).data)) +#define ioctlv_u16(a) (*((u16*)(a).data)) +#define ioctlv_u32(a) (*((u32*)(a).data)) +#define ioctlv_voidp(a) (a).data + +extern u8 *mem_exe; // size 0x80000 (see crt0.s) + + +struct _data_elf +{ + void *start; + int prio; + void *stack; + int size_stack; +} +data_elf; + +#define getbe32(x) ((adr[x]<<24) | (adr[x+1]<<16) | (adr[x+2]<<8) | (adr[x+3])) + +int load_elf(u32 elf); + +u8 *text_log; +int text_pos=0; +int text_limit=4096; + +extern void *ehci; +int tiny_ehci_init(void); + + +extern void swi_vector(void); +extern void load_swi_stack(void); + + +void direct_os_sync_before_read(void* ptr, int size); +void direct_os_sync_after_write(void* ptr, int size); +void ic_invalidate(void); + +u32 read_access_perm(void); +void write_access_perm(u32 flags); + +void find_and_patch_es(void) +{ +u16 *addr=(u16 *) 0x13A74F00; + + while(((u32) addr)<0x13A76F00) + { + if(addr[0]==0x2007) + { + if(addr[1]==0x23A2 || addr[1]==0x4B0B) {addr[0]=0x2000;direct_os_sync_after_write((void *) addr, 2);break;} + + } + addr++; + } + +} + +// call IRQ_software(9) syscall to go here + +int call_system(void) +{ +static int one=1; + + + if(system_mode_func) return system_mode_func(); + + // hack to add SWI vector + if(one) + { + u32 temp; + one=0; + + IOS_BASE=0; + + temp=*((volatile u32 *) 0xFFFF0028); + + if(temp==0xFFFF1C70) {IOS_BASE=36;syscall_base= 0xFFFF8980;} + else if(temp==0xFFFF1D60) {IOS_BASE=37;syscall_base= 0xFFFF91B0;} + else if(temp==0xFFFF1CA0) {IOS_BASE=38;syscall_base= 0xFFFF8AA0;} + else if(temp==0xFFFF1F20) + { + temp=*((volatile u32 *) 0xFFFF00FC); + if(temp==0xFFFFD004) + {IOS_BASE=57;syscall_base= 0xFFFF9390;} + else + if(temp==0xFFFFCE24) + {IOS_BASE=60;syscall_base= 0xFFFF9390;} + } + + ic_invalidate(); + + temp=read_access_perm(); + write_access_perm(0xffffffff); + + direct_os_sync_after_write((void *) &syscall_base, 4); + + // SWI patch + + *((volatile u32 *) 0xFFFF0028)=((u32) swi_vector); + + direct_os_sync_after_write((void *) 0xFFFF0028, 4); + + + + find_and_patch_es(); + + + // ES PATCH + switch(IOS_BASE) + { + case 36: + + // patch 1 + + *((u16 *) 0x13A75026)= 0xE000; + direct_os_sync_after_write((void *) 0x13A75026, 2); + + + // patch 2 + *((u16 *) 0x20102710)=0xe001; + direct_os_sync_after_write((void *) 0x20102710, 2); + + // patch 3 + *((u16 *) 0x20104F5E)=0x46c0; + direct_os_sync_after_write((void *) 0x20104F5E, 2); + + // patch 4 + *((u16 *) 0x201075EE)=0xe000; + direct_os_sync_after_write((void *) 0x201075EE, 2); + + break; + + case 37: + /* + // patch 1 + *((u16 *) 0x20100D4A)= 0x2803; + direct_os_sync_after_write((void *) 0x20100D4A, 2); + *((u16 *) 0x20100DC2)= 0x2803; + direct_os_sync_after_write((void *) 0x20100DC2, 2); + + + // patch 2 + *((u16 *) 0x201027A8)=0xd201; + direct_os_sync_after_write((void *) 0x201027A8, 2); + + // patch 3 + *((u16 *) 0x201051A6)=0x46c0; + direct_os_sync_after_write((void *) 0x201051A6, 2); + + // patch 4 + *((u16 *) 0x20107A9E)=0xe000; + direct_os_sync_after_write((void *) 0x20107A9E, 2); + */ + + + + + // patch 1 + *((u16 *) 0x20100D4A)= 0x2803; + direct_os_sync_after_write((void *) 0x20100D4A, 2); + *((u16 *) 0x20100DC2)= 0x2803; + direct_os_sync_after_write((void *) 0x20100DC2, 2); + + //*((u16 *) 0x20100D64)= 0x429A; + //direct_os_sync_after_write((void *) 0x20100D64, 2); + + // FFS access + *((u16 *) 0x200012F2)= 0xE001; + direct_os_sync_after_write((void *) 0x200012F2, 2); + + + // patch 2 + *((u16 *) 0x201027AC)=0xd201; + direct_os_sync_after_write((void *) 0x201027AC, 2); + + // patch 3 + *((u16 *) 0x2010522A)=0x46c0; + direct_os_sync_after_write((void *) 0x2010522A, 2); + + // patch 4 + *((u16 *) 0x20107B22)=0xe000; + direct_os_sync_after_write((void *) 0x20107B22, 2); + + // patch 5 + *((u16 *) 0x20105FC0)=0xe000; + direct_os_sync_after_write((void *) 0x20105FC0, 2); + + + + break; + + case 38: + + // patch 1 + *((u16 *) 0x20100CC8)= 0x2803; + direct_os_sync_after_write((void *) 0x20100CC8, 2); + + *((u16 *) 0x20100D40)= 0x2803; + direct_os_sync_after_write((void *) 0x20100D40, 2); + + // patch 2 + *((u16 *) 0x20102724)=0xd201; // 0x20102720 + direct_os_sync_after_write((void *) 0x20102724, 2); + + // patch 3 + *((u16 *) 0x20104FF2)=0x46c0; //0x20104F6E + direct_os_sync_after_write((void *) 0x20104FF2, 2); + + // patch 4 + *((u16 *) 0x20107682)=0xe000; //0x201075FE + direct_os_sync_after_write((void *) 0x20107682, 2); + + // FFS access + *((u16 *) 0x2000347E)= 0xE001; + direct_os_sync_after_write((void *) 0x2000347E, 2); + + + break; + + case 57: + + /*// patch 1 + *((u16 *) 0x20100DA4)= 0x2803; + direct_os_sync_after_write((void *) 0x20100DA4, 2); + *((u16 *) 0x20100E1C)= 0x2803; + direct_os_sync_after_write((void *) 0x20100E1C, 2); + + // patch 2 + *((u16 *) 0x20102800)=0xd201; + direct_os_sync_after_write((void *) 0x20102800, 2); + + // patch 3 + *((u16 *) 0x2010523A)=0x46c0; + direct_os_sync_after_write((void *) 0x2010523A, 2); + + // patch 4 + *((u16 *) 0x20107B32)=0xe000; + direct_os_sync_after_write((void *) 0x20107B32, 2); + */ + + // patch 1 + *((u16 *) 0x20100E74)= 0x2803; + direct_os_sync_after_write((void *) 0x20100E74, 2); + *((u16 *) 0x20100EEC)= 0x2803; + direct_os_sync_after_write((void *) 0x20100EEC, 2); + + // patch 2 + *((u16 *) 0x20102C74)=0xd201; + direct_os_sync_after_write((void *) 0x20102C74, 2); + + // patch 3 + *((u16 *) 0x2010576A)=0x46c0; + direct_os_sync_after_write((void *) 0x2010523A, 2); + + // patch 4 + *((u16 *) 0x2010849A)=0xe000; + direct_os_sync_after_write((void *) 0x2010849A, 2); + + // patch 5 + *((u16 *) 0x2010650C)=0xe000; + direct_os_sync_after_write((void *) 0x2010650C, 2); // ES_DECRYPT pass + + // FFS access + *((u16 *) 0x20001306)= 0xE001; + direct_os_sync_after_write((void *) 0x20001306, 2); + + + break; + + case 60: + + // patch 1 + *((u16 *) 0x20100DA4)= 0x2803; + direct_os_sync_after_write((void *) 0x20100DA4, 2); + *((u16 *) 0x20100E1C)= 0x2803; + direct_os_sync_after_write((void *) 0x20100E1C, 2); + + // patch 2 + *((u16 *) 0x20102800)=0xd201; + direct_os_sync_after_write((void *) 0x20102800, 2); + + // patch 3 + *((u16 *) 0x2010523A)=0x46c0; + direct_os_sync_after_write((void *) 0x2010523A, 2); + + // patch 4 + *((u16 *) 0x20107B32)=0xe000; + direct_os_sync_after_write((void *) 0x20107B32, 2); + + // patch 5 + *((u16 *) 0x20105FD0)=0xe000; + direct_os_sync_after_write((void *) 0x20105FD0, 2); // ES_DECRYPT pass + + // FFS access + *((u16 *) 0x20001306)= 0xE001; + direct_os_sync_after_write((void *) 0x20001306, 2); + + break; + + } + + // ES ioctlv patch + direct_os_sync_after_write((void *) ES_ioctlv_vect,4); + + memcpy((void *) 0x201000CC, (void *) ES_patch_ioctvl, 8); + + direct_os_sync_after_write((void *) 0x201000CC, 8); + + write_access_perm(temp); + + } + +return 0x555; +} + + +// SWI handler + +u8 * swi_intr_addr; + +int (*swi_table[256]) (u32 arg0, u32 arg1,u32 arg2, u32 arg3); + +int (* swi_func)(void * in, void * out); + +int swi_handler(u32 arg0, u32 arg1,u32 arg2, u32 arg3) +{ + +// detect SWI instruction + + // 32 bits aligned + if(swi_intr_addr[-4]==0xdf) swi_intr_addr-=3; // 16 bits function + else swi_intr_addr--; // 32 bits function + + + + if(*(swi_intr_addr)==0xcc) + { + + switch(arg0) + { + // add SWI handler + case 0: + swi_table[arg1]= (void *) arg2; + break; + // get EHCI DATA + case 1: + return (int) ehci; + // memcpy ( RAM cached to cached) + case 2: + { + u32 temp; + temp=read_access_perm(); + write_access_perm(0xffffffff); + memcpy((void *) arg1, (void *) arg2, arg3); + direct_os_sync_after_write((void *) arg1, arg3); + write_access_perm(temp); + } + break; + // get register + case 3: + return *((volatile u32 *) arg1); + // put register + case 4: + *((volatile u32 *) arg1)=arg2; + break; + // set register + case 5: + *((volatile u32 *) arg1)|=arg2; + break; + + // clr register + case 6: + *((volatile u32 *) arg1)&=~arg2; + break; + + // function to call in os_software_IRQ(9) + case 7: + system_mode_func=(void *) arg1; + break; + + // log buffer function + case 8: + switch(arg1) + { + case 1: + memset( (void *) text_log, 0, text_limit); + text_pos=0; + break; + case 2: + text_pos= 0; + text_log= (void *) arg2; + text_limit= (int) arg3; + memset( (void *) text_log, 0, text_limit); + break; + } + return (int) text_log; + case 9: + // memcpy ( RAM uncached to cached) + { + u32 temp; + temp=read_access_perm(); + write_access_perm(0xffffffff); + direct_os_sync_before_read((void *) arg2, arg3); + memcpy((void *) arg1, (void *) arg2, arg3); + direct_os_sync_after_write((void *) arg1, arg3); + write_access_perm(temp); + } + break; + + // call func + case 16: + swi_func= (void *) arg1; + return swi_func((void *) arg2, (void *) arg3); + + // get syscalls base + case 17: + return ((int) syscall_base); + + // get IOS base + case 18: + return ((int) IOS_BASE); + + // get mload version + case 19: + return ((MLOAD_VER<<4)+MLOAD_SUBVER); + + // led on + case 128: + *((volatile u32 *)0x0d8000c0) |=0x20; + break; + // led off + case 129: + *((volatile u32 *)0x0d8000c0) &=~0x20; + break; + // led blink + case 130: + *((volatile u32 *)0x0d8000c0) ^=0x20; + break; + + + // test + case 200: + if(arg3==0x666) + *((volatile u32 *)0x0d8000c0) |=0x20; + break; + + } + } + else + { + if(swi_table[*(swi_intr_addr)]) return swi_table[*(swi_intr_addr)](arg0, arg1, arg2, arg3); + else return arg0; + } + +return 0; +} + +int swi_handler_text(u32 arg0, u32 arg1,u32 arg2, u32 arg3) +{ +int n,max; +u8 *p; + + if(arg0!=4) return (int) arg0; + + p=(u8 *) arg1; + + for(n=0;n<40*3;n++) if(p[n]==0) break; + + max=(text_limit/40)*40; + + if((text_pos+n)>(max)) + { + text_pos=max-n; + memcpy((void *) &text_log[0],(void *) &text_log[n], max-n); + + } + + memcpy((void *) &text_log[text_pos], (void *) p, n); + text_pos+=n; + +return 0; +} + +int shadow_mload=0; + +int main(void) +{ + ipcmessage* message; + unsigned int offset = 0; + + + + mem_exe[0]=0; // don't remove this !!!!! + + + tiny_ehci_init(); + + unsigned int heaphandle = os_heap_create(heapspace, sizeof(heapspace)); + void* queuespace = os_heap_alloc(heaphandle, 0x20); + + unsigned int queuehandle = os_message_queue_create(queuespace, 8); + + memset( (void *) swi_table,0, 256); + swi_table[0xab]= swi_handler_text; + memset( (void *) text_log, 0, text_limit); + + + os_software_IRQ(9); // patch the SWI vector (see call_system()) + + os_device_register(DEVICE, queuehandle); + + os_puts(STR_VERSION); + + while(1) + { + int result = 1; + int ack = 1; + + // Wait for message to arrive + os_message_queue_receive(queuehandle, (void*)&message, 0); + + switch( message->command ) + { + case IOS_OPEN: + { + //debug_printf("%s try open %sfor fd %d\n",DEVICE,message->open.device,message->open.resultfd); + // Checking device name + if (0 == strcmp(message->open.device, DEVICE)) + { + if(shadow_mload) result=-6; + else result = message->open.resultfd; + } + else + if (0 == strcmp(message->open.device, DEVICE"/OFF")) + { + shadow_mload=1; + result=-6; + } + + else + result = -6; + } + break; + + case IOS_CLOSE: + { + + // do nothing + result = 0; + } + break; + + case IOS_READ: + { + // Read from Starlet memory + + #if 0 + // NOTE: no aligned is better + memcpy(message->read.data, (void*)offset, message->read.length); + // Clean cache + os_sync_after_write( message->read.data, message->read.length ); + #else + swi_mload_memcpy_from_uncached((void *) message->read.data, (void*)offset, message->read.length); + offset += message->read.length; + #endif + } + break; + + case IOS_WRITE: + { + // Write to Starlet memory + // Invalidate cache + #if 0 + os_sync_before_read( message->write.data, message->write.length ); + memcpy((void*)offset, message->write.data, message->write.length); + #else + swi_mload_memcpy((void*)offset, message->write.data, message->write.length); + offset += message->write.length; + #endif + } + break; + + case IOS_SEEK: + { + // Change current offset + switch(message->seek.origin) + { + case SEEK_SET: + { + offset = message->seek.offset; + break; + } + + case SEEK_CUR: + { + offset += message->seek.offset; + break; + } + + case SEEK_END: + { + offset = - message->seek.offset; + break; + } + } + result=offset; + } + break; + + + case IOS_IOCTL: + { + + break; + } + + case IOS_IOCTLV: + { + ioctlv *vec = message->ioctlv.vector; + + int i,in = message->ioctlv.num_in,io= message->ioctlv.num_io; + + os_sync_before_read( vec, (in+io)*sizeof(ioctlv)); + + for(i=0;iioctl.command ) + { + + case MLOAD_MLOAD_THREAD_ID: + + result=os_get_thread_id(); + + break; + case MLOAD_GET_IOS_BASE: + result= (u32) IOS_BASE; + break; + case MLOAD_GET_MLOAD_VERSION: + result= (u32) ((MLOAD_VER<<4)+MLOAD_SUBVER); + break; + + case MLOAD_GET_EHCI_DATA: + + result= (u32) ehci; + break; + + case MLOAD_GET_LOAD_BASE: + + result=0; + ioctlv_u32(vec[0])= 0x13700000; + ioctlv_u32(vec[1])= 0x80000; + break; + + case MLOAD_LOAD_MODULE: + + result = load_elf((u32) ioctlv_voidp(vec[0])); + break; + + case MLOAD_RUN_MODULE: + + result=os_thread_create( data_elf.start, NULL, data_elf.stack, data_elf.size_stack, data_elf.prio, 0); + if(result>=0) os_thread_continue(result); + + break; + + case MLOAD_RUN_THREAD: + + result=os_thread_create((void *) ioctlv_u32(vec[0]), NULL, (void *) ioctlv_u32(vec[1]), ioctlv_u32(vec[2]), ioctlv_u32(vec[3]), 0); + if(result>=0) os_thread_continue(result); + + break; + + case MLOAD_STOP_THREAD: + + result=os_thread_stop(ioctlv_u32(vec[0])); + + + break; + case MLOAD_CONTINUE_THREAD: + + result=os_thread_continue(ioctlv_u32(vec[0])); + + break; + + + case MLOAD_MEMSET: + result=0; + os_sync_before_read((void *) ioctlv_u32(vec[0]), ioctlv_u32(vec[2])); + memset((void *) ioctlv_u32(vec[0]), ioctlv_u32(vec[1]), ioctlv_u32(vec[2])); + + break; + + case MLOAD_SET_ES_IOCTLV: // changes the current vector for dev/es ioctl (put 0 to disable it) + result=0; + + ES_ioctlv_vect=ioctlv_u32(vec[0]); + os_sync_after_write( &ES_ioctlv_vect, 4); + break; + + case MLOAD_SET_SYSTEM_FUNC: + result=0; + + system_mode_func=(void *) ioctlv_u32(vec[0]); + + break; + + case MLOAD_GET_LOG: + result=text_limit; + offset =(unsigned int) text_log; + break; + + + case MLOAD_GETW: + result=0; + ioctlv_u32(vec[1])=*((volatile u32*) ioctlv_u32(vec[0])); + break; + case MLOAD_GETH: + result=0; + ioctlv_u16(vec[1])=*((volatile u16*) ioctlv_u32(vec[0])); + break; + case MLOAD_GETB: + result=0; + ioctlv_u8(vec[1])=*((volatile u8*) ioctlv_u32(vec[0])); + break; + + case MLOAD_SETW: + result=0; + *((volatile u32*) ioctlv_u32(vec[0]))=ioctlv_u32(vec[1]); + break; + case MLOAD_SETH: + result=0; + *((volatile u16*) ioctlv_u32(vec[0]))=ioctlv_u16(vec[1]); + break; + case MLOAD_SETB: + result=0; + *((volatile u8*) ioctlv_u32(vec[0]))=ioctlv_u8(vec[1]); + break; + + + } + for(i=in;iident0!=0x7F454C46) return -1; +if(head->ident1!=0x01020161) return -1; +if(head->ident2!=0x01000000) return -1; + +p=head->phoff; + +data_elf.start=(void *) head->entry; + +for(n=0; nphnum; n++) + { + entries=(void *) (elf+p); + p+=sizeof(elfphentry); + + if(entries->type == 4) + { + adr=(void *) (elf + entries->offset); + + if(getbe32(0)!=0) return -2; // bad info (sure) + + for(m=4; m < entries->memsz; m+=8) + { + switch(getbe32(m)) + { + case 0x9: + data_elf.start= (void *) getbe32(m+4); + break; + case 0x7D: + data_elf.prio= getbe32(m+4); + break; + case 0x7E: + data_elf.size_stack= getbe32(m+4); + break; + case 0x7F: + data_elf.stack= (void *) (getbe32(m+4)); + break; + + } + + } + + } + else + if(entries->type == 1 && entries->memsz != 0 && entries->vaddr!=0) + { + + os_sync_before_read((void *) entries->vaddr, entries->memsz ); + + memset((void *) entries->vaddr, 0, entries->memsz); + memcpy((void *) entries->vaddr, (void *) (elf + entries->offset), entries->filesz); + + os_sync_after_write((void *) entries->vaddr, entries->memsz ); + + } + } + +return 0; +} \ No newline at end of file diff --git a/mload/source/tiny_ehci_glue.c b/mload/source/tiny_ehci_glue.c new file mode 100644 index 00000000..2d2812ac --- /dev/null +++ b/mload/source/tiny_ehci_glue.c @@ -0,0 +1,301 @@ +/* + EHCI glue. A bit hacky for the moment. needs cleaning.. + + Copyright (C) 2008 kwiirk. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#include +#include +#include "syscalls.h" + +#include "ehci_types.h" +#include "utils.h" +#define static +#define inline extern + + +#define readl(a) (*((volatile u32*)(a))) +#define writel(v,a) do{*((volatile u32*)(a))=(v);}while(0) +#define ehci_dbg(a...) debug_printf(a) +#define printk(a...) debug_printf(a) +#define get_timer() (*(((volatile u32*)0x0D800010))) + + +void BUG(void) +{ + debug_printf("bug\n"); +// stack_trace(); + // while(1); +} +#define BUG_ON(a) if(a)BUG() + + +void udelay(int usec) +{ + u32 tmr,temp; + u32 time_usec; + + tmr = get_timer(); + time_usec=2*usec; + + while (1) {temp=get_timer()-tmr;if(temp > time_usec) break;} + +} +void msleep(int msec)//@todo not really sleeping.. +{ + u32 tmr,temp; + u32 time_usec; + + tmr = get_timer(); + time_usec=2048*msec; + + while (1) {temp=get_timer()-tmr;if(temp > time_usec) break;} + + +} +extern u32 __exe_start_virt__; +extern u32 __ram_start_virt__; + +extern u32 ios_thread_stack; + +#define cpu_to_le32(a) swab32(a) +#define le32_to_cpu(a) swab32(a) +#define cpu_to_le16(a) swab16(a) +#define le16_to_cpu(a) swab16(a) +#define cpu_to_be32(a) (a) +#define be32_to_cpu(a) (a) +void print_hex_dump_bytes(char *header,int prefix,u8 *buf,int len) +{ + + +} +#define DUMP_PREFIX_OFFSET 1 +#include "ehci.h" +#define ehci_readl(a) ((*((volatile u32*)(a)))) +//#define ehci_writel(e,v,a) do{msleep(40);debug_printf("writel %08X %08X\n",a,v);*((volatile u32*)(a))=(v);}while(0) +#define ehci_writel(v,a) do{*((volatile u32*)(a))=(v);}while(0) + +struct ehci_hcd _ehci; +struct ehci_hcd *ehci = &_ehci; + +//#include "ehci.c" + +u8 heap_space2[0x5000] __attribute__ ((aligned (32))); + +#include "ehci-mem.c" + +//static usbctrlrequest mem_usbctrlrequest __attribute__ ((aligned (32))); +static u8 mem_usbctrlrequest[sizeof(usbctrlrequest)+32] __attribute__ ((aligned (32))); +static int ehci_init(void) +{ + int retval; + if ((retval = ehci_mem_init()) < 0) + return retval; + /* + * dedicate a qh for the async ring head, since we couldn't unlink + * a 'real' qh without stopping the async schedule [4.8]. use it + * as the 'reclamation list head' too. + * its dummy is used in hw_alt_next of many tds, to prevent the qh + * from automatically advancing to the next td after short reads. + */ + ehci->async->hw_next = QH_NEXT( ehci->async->qh_dma); + ehci->async->hw_info1 = cpu_to_hc32( QH_HEAD); + ehci->async->hw_token = cpu_to_hc32( QTD_STS_HALT); + ehci->async->hw_qtd_next = EHCI_LIST_END(); + ehci->async->hw_alt_next = EHCI_LIST_END();//QTD_NEXT( ehci->async->dummy->qtd_dma); + ehci->ctrl_buffer = mem_usbctrlrequest ;//USB_Alloc(sizeof(usbctrlrequest)); + ehci->command = 0; + + ehci_dma_map_bidir(ehci->async,sizeof(struct ehci_qh)); + + ehci_writel( 0x008000002, &ehci->regs->command); + msleep(20); + ehci_writel( ehci->periodic_dma, &ehci->regs->frame_list); + ehci_writel( ehci->async->qh_dma, &ehci->regs->async_next); + ehci_writel( 0x00010001, &ehci->regs->command); + msleep(20); + ehci_writel( 1, &ehci->regs->configured_flag); + ehci_writel( 0x00010021, &ehci->regs->command); + msleep(20); + + + return 0; +} +/* +int ehci_adquire_port(int port) +{ + u32 __iomem *status_reg = &ehci->regs->port_status[port]; + u32 status = ehci_readl(status_reg); + + //change owner, port disabled + if(status & PORT_OWNER) + { + status ^= PORT_OWNER; + status &= ~(PORT_PE | PORT_RWC_BITS); + ehci_writel(status, status_reg); + msleep(5); + status = ehci_readl(status_reg); + } + ehci_writel( 0x1803,status_reg); + msleep(100); + ehci_writel( 0x1903,status_reg); + msleep(100);// wait 100ms for the reset sequence + ehci_writel( 0x1801,status_reg); + msleep(60); + #if 0 + status &= ~PORT_PE; + status |= 0x800 | PORT_RESET | PORT_POWER; + ehci_writel( status,status_reg); + msleep(60);// wait 60ms for the reset sequence + status=ehci_readl(status_reg); + status &= ~(PORT_RWC_BITS | PORT_RESET); // force reset to complete + ehci_writel( status,status_reg); + msleep(60); + //enable port + #endif + + status = ehci_readl(status_reg); + + if((status & PORT_OWNER) || PORT_USB11(status)) return 1; + +return 0; +} +*/ +extern u8 *text_log; + +int tiny_ehci_init(void) +{ + int retval; +// int n; + ehci = &_ehci; + + + ehci->caps = (void*)0x0D040000; + ehci->regs = (void*)(0x0D040000 + + HC_LENGTH(ehci_readl(&ehci->caps->hc_capbase))); + ehci->num_port = 4; // aqui numero de puertos usb + /* cache this readonly data; minimize chip reads */ + ehci->hcs_params = ehci_readl(&ehci->caps->hcs_params); + + text_log=ehci_maligned(4096, 4096, 4096); + + /* data structure init */ + retval = ehci_init(); + if (retval) + return retval; + + + ehci_release_ports(); //quickly release all ports + /* + #ifdef USE_USB_PORT_1 + + ehci_writel( PORT_OWNER, &ehci->regs->port_status[0]); // force port 0 to work as USB 1.1 + + for(n=0;n<3;n++) + { + if(!ehci_adquire_port(1)) break; + } + + #else + + ehci_writel( PORT_OWNER, &ehci->regs->port_status[1]); // force port 1 to work as USB 1.1 + + for(n=0;n<3;n++) + { + if(!ehci_adquire_port(0)) break; + } + + #endif + */ + return 0; +} + + +int ehci_release_ports(void) +{ + int i; + u32 __iomem *status_reg = &ehci->regs->port_status[2]; + while(ehci_readl(&ehci->regs->port_status[2]) == 0x1000);// wait port 2 to init + msleep(1);// wait another msec.. + for(i = 0;inum_port; i++){ //release all ports + status_reg = &ehci->regs->port_status[i]; + //u32 status = ehci_readl(status_reg); + //if (i==2 || !(PORT_CONNECT&status) || PORT_USB11(status)) + ehci_writel( PORT_OWNER,status_reg); // release port. + } + return 0; +} + +static u8* aligned_mem = 0; +static u8* aligned_base = 0; +/* @todo hum.. not that nice.. */ +void*ehci_maligned(int size,int alignement,int crossing) +{ + if (!aligned_mem ) + { + aligned_mem=aligned_base = (u8 *)((((u32) heap_space2+4095) & ~4095));//(void*)0x13890000; + } + u32 addr=(u32)aligned_mem; + alignement--; + addr += alignement; + addr &= ~alignement; + if (((addr +size-1)& ~(crossing-1)) != (addr&~(crossing-1))) + addr = (addr +size-1)&~(crossing-1); + aligned_mem = (void*)(addr + size); + if (aligned_mem>aligned_base + 0x4000) + { + debug_printf("not enough aligned memory!\n"); + while(1) msleep(1); + } + memset((void*)addr,0,size); + return (void*)addr; +} + +dma_addr_t ehci_virt_to_dma(void *a) +{ + + return (dma_addr_t)a; +} +dma_addr_t ehci_dma_map_to(void *buf,size_t len) +{ + os_sync_after_write(buf, len); + return (dma_addr_t)buf; + +} +dma_addr_t ehci_dma_map_from(void *buf,size_t len) +{ + os_sync_after_write(buf, len); + return (dma_addr_t)buf; +} +dma_addr_t ehci_dma_map_bidir(void *buf,size_t len) +{ + //debug_printf("sync_after_write %p %x\n",buf,len); + + os_sync_after_write(buf, len); + return (dma_addr_t)buf; +} +void ehci_dma_unmap_to(dma_addr_t buf,size_t len) +{ + os_sync_before_read((void*)buf, len); +} +void ehci_dma_unmap_from(dma_addr_t buf,size_t len) +{ + os_sync_before_read((void*)buf, len); +} +void ehci_dma_unmap_bidir(dma_addr_t buf,size_t len) +{ + os_sync_before_read((void*)buf, len); +} \ No newline at end of file diff --git a/mload/very_very_important.txt b/mload/very_very_important.txt new file mode 100644 index 00000000..209d646e --- /dev/null +++ b/mload/very_very_important.txt @@ -0,0 +1,3 @@ +You need to use my stripios modification to reduce the extended area to 1 byte + +if you use other version the size of the module can be very big \ No newline at end of file diff --git a/source/BoxCover/BoxCover.cpp b/source/BoxCover/BoxCover.cpp deleted file mode 100644 index 18da96cc..00000000 --- a/source/BoxCover/BoxCover.cpp +++ /dev/null @@ -1,362 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2011 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include "BoxCover.hpp" -#include "BoxMesh.hpp" -#include "themes/CTheme.h" - -BoxCover::BoxCover(GuiImageData * img, bool flat) - : GuiImage(img), - boxBorder(Resources::GetFile("boxBorder.png"), Resources::GetFileSize("boxBorder.png")), - defaultBox(NULL) -{ - flatCover = flat; - Zoomable = false; - moveChan = -1; - moveStartPosX = 0; - moveStartPosY = 0; - movePosX = 0.0f; - movePosY = 0.0f; - RotX = 0.0f; - RotY = 0.0f; - RotZ = 0.0f; - PosX = 0.0f; - PosY = 0.0f; - PosZ = -4.5f; - BoxScale = 1.0f; - AnimRotate = 0.0f; - last_manual_move_frame = 0; - camera = (guVector) {0.0F, 0.0F, 0.0F}; - up = (guVector) {0.0F, 1.0F, 0.0F}; - look = (guVector) {0.0F, 0.0F, -1.0F}; - boxColor = (GXColor) {233, 233, 233, 255}; - - guLookAt(view, &camera, &up, &look); - - if(flatCover || !image) - { - defaultBox = Resources::GetImageData("nocoverFull.png"); - GX_InitTexObj(&defaultBoxTex, defaultBox->GetImage(), defaultBox->GetWidth(), defaultBox->GetHeight(), defaultBox->GetTextureFormat(),GX_CLAMP, GX_CLAMP,GX_FALSE); - } - - if(!image) - { - GX_InitTexObj(&coverTex, defaultBox->GetImage(), defaultBox->GetWidth(), defaultBox->GetHeight(), defaultBox->GetTextureFormat(),GX_CLAMP, GX_CLAMP,GX_FALSE); - flatCover = false; - } - else - GX_InitTexObj(&coverTex, image, width,height, GX_TF_RGBA8,GX_CLAMP, GX_CLAMP,GX_FALSE); - - GX_InitTexObj(&boxBorderTex, boxBorder.GetImage(), boxBorder.GetWidth(), boxBorder.GetHeight(), boxBorder.GetTextureFormat(),GX_CLAMP, GX_CLAMP,GX_FALSE); -} - -BoxCover::~BoxCover() -{ - delete defaultBox; -} - -void BoxCover::WiiPADControl(GuiTrigger *t) -{ - if(t->wpad.btns_d & WPAD_BUTTON_A) - { - if(t->wpad.ir.valid) - { - moveChan = t->chan; - moveStartPosX = t->wpad.ir.x; - moveStartPosY = t->wpad.ir.y; - PosX += movePosX; - PosY += movePosY; - movePosX = 0.0f; - movePosY = 0.0f; - } - else - moveChan = -1; - } - else if((t->wpad.btns_h & WPAD_BUTTON_A) && moveChan == t->chan && t->wpad.ir.valid) - { - movePosX = (t->wpad.ir.x-moveStartPosX) / 180.0f; - movePosY = (moveStartPosY-t->wpad.ir.y) / 180.0f; - last_manual_move_frame = frameCount; - } - - if(t->wpad.btns_h & WPAD_BUTTON_UP) - { - RotX -= 1.0f; - last_manual_move_frame = frameCount; - } - if(t->wpad.btns_h & WPAD_BUTTON_DOWN) - { - RotX += 1.0f; - last_manual_move_frame = frameCount; - } - if(t->wpad.btns_h & WPAD_BUTTON_LEFT) - { - RotY -= 1.0f; - last_manual_move_frame = frameCount; - } - if(t->wpad.btns_h & WPAD_BUTTON_RIGHT) - { - RotY += 1.0f; - last_manual_move_frame = frameCount; - } - if(t->wpad.btns_h & WPAD_BUTTON_PLUS) - { - if(PosZ < -3.4f) - PosZ += 0.1f; - else if(BoxScale < 2.4f) - BoxScale += 0.05f; - } - if(t->wpad.btns_h & WPAD_BUTTON_MINUS) - { - if(BoxScale > 1.0f) - BoxScale -= 0.05f; - else - { - BoxScale = 1.0f; - PosZ -= 0.1f; - if(PosZ < -6.0f) PosZ = -6.0f; - } - } -} - -void BoxCover::Update(GuiTrigger * t) -{ - s8 movY = t->WPAD_Stick(0, 0) ; - s8 movX = t->WPAD_Stick(0, 1); - //! Drop nunchuck moves of less than 5 because of sensitivity - if(fabs(movY) < 5.0f) movY = 0; - if(fabs(movX) < 5.0f) movX = 0; - - if(movY != 0 || movX != 0) - last_manual_move_frame = frameCount; - - RotY += (f32) movY / 50.0f; - RotX -= (f32) movX / 50.0f; - - if(Zoomable) - WiiPADControl(t); - - //! Stop movement for about 5 sec after manual move - if(frameCount-last_manual_move_frame < 250) - return; - - Animation = sin(DegToRad(AnimRotate))*2.0f; - Animation2 = cos(DegToRad(AnimRotate))*5.0f; - AnimRotate += 0.1f; - if(AnimRotate > 360.0f) - AnimRotate = 0.0f; -} - -void BoxCover::Draw() -{ - u8 BoxAlpha = (int) (alpha+angleDyn) & 0xFF; - - Mtx44 projection; - guPerspective(projection, 45, (f32)screenwidth/(f32)screenheight, fabs(PosZ)-1.3f > 1.0f ? fabs(PosZ)-1.3f : 1.0f, -300.0F); - GX_LoadProjectionMtx(projection, GX_PERSPECTIVE); - GX_SetTevOp(GX_TEVSTAGE0, GX_MODULATE); - - GX_SetVtxDesc(GX_VA_POS, GX_INDEX8); - GX_SetVtxDesc(GX_VA_CLR0, GX_DIRECT); - GX_SetVtxDesc(GX_VA_TEX0, GX_INDEX8); - - Mtx modelView; - Mtx modelView2; - Mtx modelView3; - - guVector cubeAxis = {0,0,1}; - guVector cubeAxis2 = {0,1,0}; - guVector cubeAxis3 = {1,0,0}; - guMtxIdentity(modelView); - guMtxRotAxisDeg(modelView3, &cubeAxis3, RotX-Animation2); - guMtxRotAxisDeg(modelView2, &cubeAxis2, RotY+Animation2+xoffsetDyn/2.0f); - guMtxRotAxisDeg(modelView, &cubeAxis, RotZ-Animation); - guMtxConcat(modelView3, modelView2, modelView2); - guMtxConcat(modelView2, modelView, modelView); - guMtxScaleApply(modelView, modelView, BoxScale, BoxScale, BoxScale); - guMtxTransApply(modelView, modelView, PosX+xoffsetDyn/680.0f+movePosX, PosY+yoffsetDyn/680.0f+movePosY, PosZ); - guMtxConcat(view,modelView,modelView); - - GX_LoadPosMtxImm(modelView, GX_PNMTX0); - - //! Border quads - GX_LoadTexObj(&boxBorderTex, GX_TEXMAP0); - GX_InvalidateTexAll(); - - GX_SetArray(GX_VA_POS, (void *) &g_boxMeshQ[0].pos, sizeof(g_boxMeshQ[0])); - GX_SetArray(GX_VA_TEX0, (void *) &g_boxMeshQ[0].texCoord, sizeof(g_boxMeshQ[0])); - - GX_Begin(GX_QUADS, GX_VTXFMT0, g_boxMeshQSize); - for (u32 j = 0; j < g_boxMeshQSize; ++j) - { - GX_Position1x8(j); - GX_Color4u8(boxColor.r, boxColor.g, boxColor.b, BoxAlpha); - GX_TexCoord1x8(j); - } - GX_End(); - - //! Border triangles - GX_SetArray(GX_VA_POS, (void *) &g_boxMeshT[0].pos, sizeof(g_boxMeshT[0])); - GX_SetArray(GX_VA_TEX0, (void *) &g_boxMeshT[0].texCoord, sizeof(g_boxMeshT[0])); - - GX_Begin(GX_TRIANGLES, GX_VTXFMT0, g_boxMeshTSize); - for (u32 j = 0; j < g_boxMeshTSize; ++j) - { - GX_Position1x8(j); - GX_Color4u8(boxColor.r, boxColor.g, boxColor.b, BoxAlpha); - GX_TexCoord1x8(j); - } - GX_End(); - - //! Back Cover (Might be flat) - GX_LoadTexObj(flatCover ? &defaultBoxTex : &coverTex, GX_TEXMAP0); - GX_InvalidateTexAll(); - - GX_SetArray(GX_VA_POS, (void *) &g_boxBackCoverMesh[0].pos, sizeof(g_boxBackCoverMesh[0])); - GX_SetArray(GX_VA_TEX0, (void *) &g_boxBackCoverMesh[0].texCoord, sizeof(g_boxBackCoverMesh[0])); - - GX_Begin(GX_QUADS, GX_VTXFMT0, g_boxBackCoverMeshSize); - for (u32 j = 0; j < g_boxBackCoverMeshSize; ++j) - { - GX_Position1x8(j); - if(flatCover) - GX_Color4u8(boxColor.r, boxColor.g, boxColor.b, BoxAlpha); - else - GX_Color4u8(0xff, 0xff, 0xff, BoxAlpha); - GX_TexCoord1x8(j); - } - GX_End(); - - if(flatCover) - { - //! Front Flat Cover - GX_LoadTexObj(&coverTex, GX_TEXMAP0); - GX_InvalidateTexAll(); - - GX_SetArray(GX_VA_POS, (void *) &g_flatCoverMesh[0].pos, sizeof(g_flatCoverMesh[0])); - GX_SetArray(GX_VA_TEX0, (void *) &g_flatCoverMesh[0].texCoord, sizeof(g_flatCoverMesh[0])); - - GX_Begin(GX_QUADS, GX_VTXFMT0, g_flatCoverMeshSize); - for (u32 j = 0; j < g_flatCoverMeshSize; ++j) - { - GX_Position1x8(j); - GX_Color4u8(0xff, 0xff, 0xff, 0xff); - GX_TexCoord1x8(j); - } - GX_End(); - } - else - { - //! Front Cover - GX_SetArray(GX_VA_POS, (void *) &g_boxCoverMesh[0].pos, sizeof(g_boxCoverMesh[0])); - GX_SetArray(GX_VA_TEX0, (void *) &g_boxCoverMesh[0].texCoord, sizeof(g_boxCoverMesh[0])); - - GX_Begin(GX_QUADS, GX_VTXFMT0, g_boxCoverMeshSize); - for (u32 j = 0; j < g_boxCoverMeshSize; ++j) - { - GX_Position1x8(j); - GX_Color4u8(0xff, 0xff, 0xff, BoxAlpha); - GX_TexCoord1x8(j); - } - GX_End(); - } - - GX_SetVtxDesc(GX_VA_POS, GX_DIRECT); - GX_SetVtxDesc(GX_VA_CLR0, GX_DIRECT); - GX_SetVtxDesc(GX_VA_TEX0, GX_DIRECT); - GX_SetTevOp(GX_TEVSTAGE0, GX_PASSCLR); - - UpdateEffects(); -} - -void BoxCover::SetEffect(int eff, int amount, int target) -{ - GuiImage::SetEffect(eff, amount, target); -} - -void BoxCover::UpdateEffects() -{ - GuiImage::UpdateEffects(); - - if(effects & EFFECT_BOX_FLY_CENTRE) - { - if(PosX > 0.01f) - PosX -= effectAmount/1000.0f; - if(PosY > 0.01f) - PosY -= effectAmount/1000.0f; - if(PosX < -0.01f) - PosX += effectAmount/1000.0f; - if(PosY < -0.01f) - PosY += effectAmount/1000.0f; - - movePosX = 0.0f; - movePosY = 0.0f; - PosZ += 0.1f; - RotY += effectAmount/4.9f; - - if(fabs(PosX) < 0.1f && fabs(PosY) < 0.1f) - { - PosX = 0.0f; - PosY = 0.0f; - effects = 0; - effectAmount = 0; - } - } - else if(effects & EFFECT_BOX_FLY_BACK) - { - if(PosX > PosXOrig+0.1f) - PosX -= effectAmount/1000.0f; - if(PosY > PosYOrig+0.1f) - PosY -= effectAmount/1000.0f; - if(PosX < PosXOrig-0.1f) - PosX += effectAmount/1000.0f; - if(PosY < PosYOrig-0.1f) - PosY += effectAmount/1000.0f; - - PosZ -= 0.1f; - RotY -= effectAmount/4.9f; - if(BoxScale > 1.0f) - BoxScale -= 0.08f; - - if(movePosX > 0.1f) - movePosX -= 0.1f; - else if(movePosX < 0.1f) - movePosX += 0.1f; - if(movePosY > 0.1f) - movePosY -= 0.1f; - else if(movePosY < 0.1f) - movePosY += 0.1f; - - if(fabs(PosXOrig-PosX) < 0.1f && fabs(PosYOrig-PosY) < 0.1f) - { - movePosX = 0.0f; - movePosY = 0.0f; - BoxScale = 1.0f; - PosX = PosXOrig; - PosY = PosYOrig; - PosZ = PosZOrig; - effects = 0; - effectAmount = 0; - } - } -} diff --git a/source/BoxCover/BoxCover.hpp b/source/BoxCover/BoxCover.hpp deleted file mode 100644 index 56e02549..00000000 --- a/source/BoxCover/BoxCover.hpp +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#ifndef BOX_COVER_HPP_ -#define BOX_COVER_HPP_ - -#include "libwiigui/gui.h" - -#define EFFECT_BOX_FLY_CENTRE 0x4000000 -#define EFFECT_BOX_FLY_BACK 0x8000000 - -class BoxCover : public GuiImage -{ - public: - BoxCover(GuiImageData * img, bool flat = false); - ~BoxCover(); - //! Colors: - //! Gray Box (Default): r:233 g:233 b:233 - //! Red Box (NSMB): r:198 g:34 b:4 - void SetBoxColor(GXColor c) { LOCK(this); boxColor = c; }; - void SetPosition(f32 x, f32 y, f32 z) { LOCK(this); PosXOrig = PosX = x; PosYOrig = PosY = y; PosZOrig = PosZ = z; }; - void SetEffect(int eff, int amount, int target = 0); - void SetImage(GuiImageData *img); //forbid this call - void SetZoomable(bool z) { LOCK(this); Zoomable = z; }; - void Draw(); - void Update(GuiTrigger * t); - void UpdateEffects(); - private: - void WiiPADControl(GuiTrigger *t); - - f32 RotX; - f32 RotY; - f32 RotZ; - f32 PosX; - f32 PosY; - f32 PosZ; - f32 PosXOrig; - f32 PosYOrig; - f32 PosZOrig; - f32 BoxScale; - f32 AnimRotate; - f32 Animation; - f32 Animation2; - u32 last_manual_move_frame; - int moveStartPosX; - int moveStartPosY; - f32 movePosX; - f32 movePosY; - int moveChan; - bool flatCover; - bool Zoomable; - guVector camera, up, look; - GuiImageData boxBorder; - GuiImageData *defaultBox; - Mtx view; - GXTexObj coverTex; - GXTexObj boxBorderTex; - GXTexObj defaultBoxTex; - GXColor boxColor; - - -}; - -#endif diff --git a/source/BoxCover/BoxMesh.cpp b/source/BoxCover/BoxMesh.cpp deleted file mode 100644 index a8b11f81..00000000 --- a/source/BoxCover/BoxMesh.cpp +++ /dev/null @@ -1,156 +0,0 @@ -#include -#include "BoxMesh.hpp" - -// Quick and dirty hardcoded DVD box mesh - -static const guVector g_coverBL = { -0.65f, -0.915f, 0.f }; -static const guVector g_coverTR = { 0.65f, 0.915f, 0.f }; -static const float g_boxCoverY = 0.05f; -static const float g_boxBorderWidth = 0.022f; -static const guVector g_frontCoverBL = { g_coverBL.x, g_coverBL.y + g_boxCoverY, g_coverBL.z }; -static const guVector g_frontCoverTR = { g_coverTR.x, g_coverTR.y + g_boxCoverY, g_coverTR.z }; -static const guVector g_backCoverBL = { g_frontCoverBL.x, g_frontCoverBL.y, g_frontCoverBL.z - 0.16f }; -static const guVector g_backCoverTR = { g_frontCoverTR.x, g_frontCoverTR.y, g_frontCoverTR.z - 0.16f }; -const float g_boxCoverYCenter = (g_frontCoverTR.y - g_frontCoverBL.y) * 0.5f; -const float g_coverYCenter = (g_coverTR.y - g_coverBL.y) * 0.5f; - -#define w(x) ((float)x / 64.0f) -#define h(y) ((float)y / 256.0f) - - -const SMeshVert g_boxMeshQ[] ATTRIBUTE_ALIGN(32) = { // Quads - // Bordure du bas devant - { { g_frontCoverBL.x, g_frontCoverBL.y, g_frontCoverBL.z }, CTexCoord(w(0), h(256)) }, - { { g_frontCoverBL.x, g_frontCoverBL.y - g_boxBorderWidth, g_frontCoverBL.z - g_boxBorderWidth }, CTexCoord(w(10), h(224)) }, - { { g_frontCoverTR.x, g_frontCoverBL.y - g_boxBorderWidth, g_frontCoverBL.z - g_boxBorderWidth }, CTexCoord(w(10), h(224)) }, - { { g_frontCoverTR.x, g_frontCoverBL.y, g_frontCoverBL.z }, CTexCoord(w(0), h(224)) }, - - // Bordure du haut devant - { { g_frontCoverBL.x, g_frontCoverTR.y + g_boxBorderWidth, g_frontCoverBL.z - g_boxBorderWidth }, CTexCoord(w(10), h(1)) }, - { { g_frontCoverBL.x, g_frontCoverTR.y, g_frontCoverBL.z }, CTexCoord(w(0), h(1)) }, - { { g_frontCoverTR.x, g_frontCoverTR.y, g_frontCoverBL.z }, CTexCoord(w(0), h(32)) }, - { { g_frontCoverTR.x, g_frontCoverTR.y + g_boxBorderWidth, g_frontCoverBL.z - g_boxBorderWidth }, CTexCoord(w(10), h(32)) }, - - // Bordure du bas derrière - { { g_backCoverBL.x, g_backCoverBL.y - g_boxBorderWidth, g_backCoverBL.z + g_boxBorderWidth }, CTexCoord(w(54), h(256)) }, - { { g_backCoverBL.x, g_backCoverBL.y, g_backCoverBL.z }, CTexCoord(w(64), h(224)) }, - { { g_backCoverTR.x, g_backCoverBL.y, g_backCoverBL.z }, CTexCoord(w(64), h(224)) }, - { { g_backCoverTR.x, g_backCoverBL.y - g_boxBorderWidth, g_backCoverBL.z + g_boxBorderWidth }, CTexCoord(w(54), h(224)) }, - - // Bordure du haut derrière - { { g_backCoverBL.x, g_backCoverTR.y, g_backCoverBL.z }, CTexCoord(w(64), h(1)) }, - { { g_backCoverBL.x, g_backCoverTR.y + g_boxBorderWidth, g_backCoverBL.z + g_boxBorderWidth }, CTexCoord(w(54), h(1)) }, - { { g_backCoverTR.x, g_backCoverTR.y + g_boxBorderWidth, g_backCoverBL.z + g_boxBorderWidth }, CTexCoord(w(54), h(32)) }, - { { g_backCoverTR.x, g_backCoverTR.y, g_backCoverBL.z }, CTexCoord(w(64), h(32)) }, - - // Bordure de droite devant - { { g_frontCoverTR.x, g_frontCoverBL.y, g_frontCoverBL.z }, CTexCoord(w(0), h(256)) }, - { { g_frontCoverTR.x + g_boxBorderWidth, g_frontCoverBL.y, g_frontCoverBL.z - g_boxBorderWidth }, CTexCoord(w(10), h(256)) }, - { { g_frontCoverTR.x + g_boxBorderWidth, g_frontCoverTR.y, g_frontCoverBL.z - g_boxBorderWidth }, CTexCoord(w(10), h(0)) }, - { { g_frontCoverTR.x, g_frontCoverTR.y, g_frontCoverBL.z }, CTexCoord(w(0), h(0)) }, - - // Bordure de droite derrière - { { g_backCoverTR.x + g_boxBorderWidth, g_backCoverBL.y, g_backCoverBL.z + g_boxBorderWidth }, CTexCoord(w(54), h(256)) }, - { { g_backCoverTR.x, g_backCoverBL.y, g_backCoverBL.z }, CTexCoord(w(64), h(256)) }, - { { g_backCoverTR.x, g_backCoverTR.y, g_backCoverBL.z }, CTexCoord(w(64), h(0)) }, - { { g_backCoverTR.x + g_boxBorderWidth, g_backCoverTR.y, g_backCoverBL.z + g_boxBorderWidth }, CTexCoord(w(54), h(0)) }, - - // Face du haut - { { g_frontCoverBL.x, g_frontCoverTR.y + g_boxBorderWidth, g_frontCoverBL.z - g_boxBorderWidth }, CTexCoord(w(10), h(1)) }, - { { g_frontCoverTR.x, g_frontCoverTR.y + g_boxBorderWidth, g_frontCoverBL.z - g_boxBorderWidth }, CTexCoord(w(10), h(32)) }, - { { g_backCoverTR.x, g_backCoverTR.y + g_boxBorderWidth, g_backCoverBL.z + g_boxBorderWidth }, CTexCoord(w(54), h(32)) }, - { { g_backCoverBL.x, g_backCoverTR.y + g_boxBorderWidth, g_backCoverBL.z + g_boxBorderWidth }, CTexCoord(w(54), h(1)) }, - - // Angle face du haut / face de droite - { { g_frontCoverTR.x, g_frontCoverTR.y + g_boxBorderWidth, g_frontCoverBL.z - g_boxBorderWidth }, CTexCoord(w(10), h(32)) }, - { { g_frontCoverTR.x + g_boxBorderWidth, g_frontCoverTR.y, g_frontCoverBL.z - g_boxBorderWidth }, CTexCoord(w(10), h(0)) }, - { { g_backCoverTR.x + g_boxBorderWidth, g_backCoverTR.y, g_backCoverBL.z + g_boxBorderWidth }, CTexCoord(w(54), h(0)) }, - { { g_backCoverTR.x, g_backCoverTR.y + g_boxBorderWidth, g_backCoverBL.z + g_boxBorderWidth }, CTexCoord(w(54), h(32)) }, - - // Face de droite - { { g_frontCoverTR.x + g_boxBorderWidth, g_frontCoverTR.y, g_frontCoverBL.z - g_boxBorderWidth }, CTexCoord(w(10), h(0)) }, - { { g_frontCoverTR.x + g_boxBorderWidth, g_frontCoverBL.y, g_frontCoverBL.z - g_boxBorderWidth }, CTexCoord(w(10), h(256)) }, - { { g_backCoverTR.x + g_boxBorderWidth, g_backCoverBL.y, g_backCoverBL.z + g_boxBorderWidth }, CTexCoord(w(54), h(256)) }, - { { g_backCoverTR.x + g_boxBorderWidth, g_backCoverTR.y, g_backCoverBL.z + g_boxBorderWidth }, CTexCoord(w(54), h(0)) }, - - // Angle face de droite / face du bas - { { g_frontCoverTR.x + g_boxBorderWidth, g_frontCoverBL.y, g_frontCoverBL.z - g_boxBorderWidth }, CTexCoord(w(10), h(256)) }, - { { g_frontCoverTR.x, g_frontCoverBL.y - g_boxBorderWidth, g_frontCoverBL.z - g_boxBorderWidth }, CTexCoord(w(10), h(224)) }, - { { g_backCoverTR.x, g_backCoverBL.y - g_boxBorderWidth, g_backCoverBL.z + g_boxBorderWidth }, CTexCoord(w(54), h(224)) }, - { { g_backCoverTR.x + g_boxBorderWidth, g_backCoverBL.y, g_backCoverBL.z + g_boxBorderWidth }, CTexCoord(w(54), h(256)) }, - - // Face du bas - { { g_frontCoverTR.x, g_frontCoverBL.y - g_boxBorderWidth, g_frontCoverBL.z - g_boxBorderWidth }, CTexCoord(w(10), h(224)) }, - { { g_frontCoverBL.x, g_frontCoverBL.y - g_boxBorderWidth, g_frontCoverBL.z - g_boxBorderWidth }, CTexCoord(w(10), h(224)) }, - { { g_backCoverBL.x, g_backCoverBL.y - g_boxBorderWidth, g_backCoverBL.z + g_boxBorderWidth }, CTexCoord(w(54), h(256)) }, - { { g_backCoverTR.x, g_backCoverBL.y - g_boxBorderWidth, g_backCoverBL.z + g_boxBorderWidth }, CTexCoord(w(54), h(224)) }, - - // Face de gauche en haut - { { g_frontCoverBL.x, g_frontCoverTR.y, g_frontCoverBL.z }, CTexCoord(w(1), h(1)) }, - { { g_frontCoverBL.x, g_frontCoverTR.y + g_boxBorderWidth, g_frontCoverBL.z - g_boxBorderWidth }, CTexCoord(w(1), h(1)) }, - { { g_backCoverBL.x, g_backCoverTR.y + g_boxBorderWidth, g_backCoverBL.z + g_boxBorderWidth }, CTexCoord(w(1), h(1)) }, - { { g_backCoverBL.x, g_backCoverTR.y, g_backCoverBL.z}, CTexCoord(w(1), h(1)) }, - - // Face de gauche en bas - { { g_frontCoverBL.x, g_frontCoverBL.y - g_boxBorderWidth, g_frontCoverBL.z - g_boxBorderWidth }, CTexCoord(w(1), h(1)) }, - { { g_frontCoverBL.x, g_frontCoverBL.y, g_frontCoverBL.z }, CTexCoord(w(1), h(1)) }, - { { g_backCoverBL.x, g_backCoverBL.y, g_backCoverBL.z }, CTexCoord(w(1), h(1)) }, - { { g_backCoverBL.x, g_backCoverBL.y - g_boxBorderWidth, g_backCoverBL.z + g_boxBorderWidth }, CTexCoord(w(1), h(1)) }, -}; - -const SMeshVert g_boxMeshT[] ATTRIBUTE_ALIGN(32) = { // Triangles - // Haut devant - { { g_frontCoverTR.x, g_frontCoverTR.y, g_frontCoverBL.z }, CTexCoord(w(0), h(16)) }, - { { g_frontCoverTR.x + g_boxBorderWidth, g_frontCoverTR.y, g_frontCoverBL.z - g_boxBorderWidth }, CTexCoord(w(10), h(0)) }, - { { g_frontCoverTR.x, g_frontCoverTR.y + g_boxBorderWidth, g_frontCoverBL.z - g_boxBorderWidth }, CTexCoord(w(10), h(32)) }, - - // Haut derrière - { { g_backCoverTR.x, g_backCoverTR.y, g_backCoverBL.z }, CTexCoord(w(64), h(16)) }, - { { g_backCoverTR.x, g_backCoverTR.y + g_boxBorderWidth, g_backCoverBL.z + g_boxBorderWidth }, CTexCoord(w(54), h(32)) }, - { { g_backCoverTR.x + g_boxBorderWidth, g_backCoverTR.y, g_backCoverBL.z + g_boxBorderWidth }, CTexCoord(w(54), h(0)) }, - - // Bas devant - { { g_frontCoverTR.x, g_frontCoverBL.y, g_frontCoverBL.z }, CTexCoord(w(0), h(240)) }, - { { g_frontCoverTR.x, g_frontCoverBL.y - g_boxBorderWidth, g_frontCoverBL.z - g_boxBorderWidth }, CTexCoord(w(10), h(224)) }, - { { g_frontCoverTR.x + g_boxBorderWidth, g_frontCoverBL.y, g_frontCoverBL.z - g_boxBorderWidth }, CTexCoord(w(10), h(256)) }, - - // Bas derrière - { { g_backCoverTR.x, g_backCoverBL.y, g_backCoverBL.z }, CTexCoord(w(64), h(240)) }, - { { g_backCoverTR.x + g_boxBorderWidth, g_backCoverBL.y, g_backCoverBL.z + g_boxBorderWidth }, CTexCoord(w(54), h(256)) }, - { { g_backCoverTR.x, g_backCoverBL.y - g_boxBorderWidth, g_backCoverBL.z + g_boxBorderWidth }, CTexCoord(w(54), h(224)) } -}; - -#undef h -#undef w - -const SMeshVert g_flatCoverMesh[] ATTRIBUTE_ALIGN(32) = { - { { g_frontCoverBL.x, g_frontCoverBL.y, g_frontCoverBL.z }, CTexCoord(0.f, 1.f) }, - { { g_frontCoverTR.x, g_frontCoverBL.y, g_frontCoverBL.z }, CTexCoord(1.f, 1.f) }, - { { g_frontCoverTR.x, g_frontCoverTR.y, g_frontCoverBL.z }, CTexCoord(1.f, 0.f) }, - { { g_frontCoverBL.x, g_frontCoverTR.y, g_frontCoverBL.z }, CTexCoord(0.f, 0.f) }, -}; - -const SMeshVert g_boxBackCoverMesh[] ATTRIBUTE_ALIGN(32) = { - { { g_backCoverTR.x, g_backCoverBL.y, g_backCoverBL.z }, CTexCoord(0.f, 1.f) }, - { { g_backCoverBL.x, g_backCoverBL.y, g_backCoverBL.z }, CTexCoord(1.3f / 2.76f, 1.f) }, - { { g_backCoverBL.x, g_backCoverTR.y, g_backCoverBL.z }, CTexCoord(1.3f / 2.76f, 0.f) }, - { { g_backCoverTR.x, g_backCoverTR.y, g_backCoverBL.z }, CTexCoord(0.f, 0.f) }, - - { { g_frontCoverBL.x, g_frontCoverBL.y, g_frontCoverBL.z }, CTexCoord(1.46f / 2.76f, 1.f) }, - { { g_frontCoverBL.x, g_frontCoverTR.y, g_frontCoverBL.z }, CTexCoord(1.46f / 2.76f, 0.f) }, - { { g_backCoverBL.x, g_backCoverTR.y, g_backCoverBL.z }, CTexCoord(1.3f / 2.76f, 0.f) }, - { { g_backCoverBL.x, g_backCoverBL.y, g_backCoverBL.z }, CTexCoord(1.3f / 2.76f, 1.f) }, -}; - -const SMeshVert g_boxCoverMesh[] ATTRIBUTE_ALIGN(32) = { - { { g_frontCoverBL.x, g_frontCoverBL.y, g_frontCoverBL.z }, CTexCoord(1.46f / 2.76f, 1.f) }, - { { g_frontCoverTR.x, g_frontCoverBL.y, g_frontCoverBL.z }, CTexCoord(1.f, 1.f) }, - { { g_frontCoverTR.x, g_frontCoverTR.y, g_frontCoverBL.z }, CTexCoord(1.f, 0.f) }, - { { g_frontCoverBL.x, g_frontCoverTR.y, g_frontCoverBL.z }, CTexCoord(1.46f / 2.76f, 0.f) } -}; - -const u32 g_flatCoverMeshSize = sizeof g_flatCoverMesh / sizeof g_flatCoverMesh[0]; -const u32 g_boxMeshQSize = sizeof g_boxMeshQ / sizeof g_boxMeshQ[0]; -const u32 g_boxMeshTSize = sizeof g_boxMeshT / sizeof g_boxMeshT[0]; -const u32 g_boxCoverMeshSize = sizeof g_boxCoverMesh / sizeof g_boxCoverMesh[0]; -const u32 g_boxBackCoverMeshSize = sizeof g_boxBackCoverMesh / sizeof g_boxBackCoverMesh[0]; diff --git a/source/BoxCover/BoxMesh.hpp b/source/BoxCover/BoxMesh.hpp deleted file mode 100644 index a56cbc50..00000000 --- a/source/BoxCover/BoxMesh.hpp +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef BOXMESH_HPP_ -#define BOXMESH_HPP_ - -//Box mesh from hibern - -// Quick and dirty hardcoded DVD box mesh -// Should be replaced by a true mesh loader -// Lacks normals - -class CTexCoord -{ -public: - float x; - float y; -public: - CTexCoord(void) { x = 0.f; y = 0.f; } - CTexCoord(float px, float py) { x = px; y = py; } -}; - -struct SMeshVert -{ - guVector pos; - CTexCoord texCoord; -}; - -// Flat cover -extern const SMeshVert g_flatCoverMesh[]; -extern const u32 g_flatCoverMeshSize; - -// Box -extern const SMeshVert g_boxMeshQ[]; // Quads -extern const u32 g_boxMeshQSize; -extern const SMeshVert g_boxMeshT[]; // Triangles -extern const u32 g_boxMeshTSize; -// Box cover -extern const SMeshVert g_boxBackCoverMesh[]; -extern const u32 g_boxBackCoverMeshSize; -extern const SMeshVert g_boxCoverMesh[]; -extern const u32 g_boxCoverMeshSize; -// -extern const float g_boxCoverYCenter; -extern const float g_coverYCenter; - - -#endif diff --git a/source/Controls/DeviceHandler.cpp b/source/Controls/DeviceHandler.cpp deleted file mode 100644 index e5368026..00000000 --- a/source/Controls/DeviceHandler.cpp +++ /dev/null @@ -1,322 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include "settings/CSettings.h" -#include "usbloader/usbstorage2.h" -#include "DeviceHandler.hpp" -#include "usbloader/wbfs.h" -#include "system/IosLoader.h" - -DeviceHandler * DeviceHandler::instance = NULL; - -DeviceHandler::~DeviceHandler() -{ - UnMountAll(); -} - -DeviceHandler * DeviceHandler::Instance() -{ - if (instance == NULL) - { - instance = new DeviceHandler(); - } - return instance; -} - -void DeviceHandler::DestroyInstance() -{ - if(instance) - { - delete instance; - } - instance = NULL; -} - -bool DeviceHandler::MountAll() -{ - bool result = false; - - for(u32 i = SD; i < MAXDEVICES; i++) - { - if(Mount(i)) - result = true; - } - - return result; -} - -void DeviceHandler::UnMountAll() -{ - for(u32 i = SD; i < MAXDEVICES; i++) - UnMount(i); - - if(sd) - delete sd; - if(usb) - delete usb; - - sd = NULL; - usb = NULL; -} - -bool DeviceHandler::Mount(int dev) -{ - if(dev == SD) - return MountSD(); - - else if(dev >= USB1 && dev <= USB8) - return MountUSB(dev-USB1); - - return false; -} - -bool DeviceHandler::IsInserted(int dev) -{ - if(dev == SD) - return SD_Inserted() && sd->IsMounted(0); - - else if(dev >= USB1 && dev <= USB8) - return USB_Inserted() && usb->IsMounted(dev-USB1); - - return false; -} - -void DeviceHandler::UnMount(int dev) -{ - if(dev == SD) - UnMountSD(); - - else if(dev >= USB1 && dev <= USB8) - UnMountUSB(dev-USB1); -} - -bool DeviceHandler::MountSD() -{ - if(!sd) - sd = new PartitionHandle(&__io_wiisd); - - if(sd->GetPartitionCount() < 1) - { - delete sd; - sd = NULL; - return false; - } - - //! Mount only one SD Partition - return sd->Mount(0, DeviceName[SD], true); -} - -const DISC_INTERFACE * DeviceHandler::GetUSBInterface() -{ - if(IOS_GetVersion() < 200) - return &__io_usbstorage; - - return &__io_usbstorage2; -} - -static inline bool USBSpinUp() -{ - bool started = false; - int retries = 400; - - const DISC_INTERFACE * handle = DeviceHandler::GetUSBInterface(); - // wait 20 sec for the USB to spin up...stupid slow ass HDD - do - { - started = (handle->startup() && handle->isInserted()); - if(started) break; - usleep(50000); - } - while(--retries > 0); - - return started; -} - -bool DeviceHandler::SetUSBPort(int port) -{ - int ret = USBStorage2_SetPort(port); - - USBSpinUp(); - - return ret >= 0; -} - -void DeviceHandler::SetUSBPortFromPartition(int part) -{ - if(Settings.USBPort != 2) - return; - - PartitionHandle * usbHandle = DeviceHandler::Instance()->GetUSBHandle(); - if(!usbHandle) - return; - - if(part < usbHandle->GetPartitionCount()) - SetUSBPort(0); - else - SetUSBPort(1); -} - -bool DeviceHandler::MountUSB(int pos, bool spinup) -{ - if(spinup && !USBSpinUp()) - return false; - - if(!usb) - { - if(Settings.USBPort == 2) SetUSBPort(0); - usb = new PartitionHandle(GetUSBInterface()); - if(Settings.USBPort == 2 && IosLoader::IsHermesIOS()) - { - SetUSBPort(1); - usb->GetPort1Partitions(); - } - } - - if(usb->GetPartitionTotalCount() < 1) - { - delete usb; - usb = NULL; - return false; - } - - if(pos >= usb->GetPartitionTotalCount()) - return false; - - SetUSBPortFromPartition(pos); - - return usb->Mount(pos, DeviceName[USB1+pos]); -} - -bool DeviceHandler::MountAllUSB(bool spinup) -{ - if(spinup && !USBSpinUp()) - return false; - - if(!usb) - { - if(Settings.USBPort == 2) SetUSBPort(0); - usb = new PartitionHandle(GetUSBInterface()); - if(Settings.USBPort == 2 && IosLoader::IsHermesIOS()) - { - SetUSBPort(1); - usb->GetPort1Partitions(); - } - } - - bool result = false; - - for(int i = 0; i < usb->GetPartitionTotalCount(); i++) - { - if(MountUSB(i, false)) - result = true; - } - - if(Settings.USBPort == 2) - SetUSBPort(0); - - return result; -} - -void DeviceHandler::UnMountUSB(int pos) -{ - if(!usb) - return; - - if(pos >= usb->GetPartitionTotalCount()) - return; - - SetUSBPortFromPartition(pos); - - usb->UnMount(pos); -} - -void DeviceHandler::UnMountAllUSB() -{ - if(!usb) - return; - - for(int i = 0; i < usb->GetPartitionTotalCount(); i++) - UnMountUSB(i); - - delete usb; - usb = NULL; -} - -int DeviceHandler::PathToDriveType(const char * path) -{ - if(!path) - return -1; - - for(int i = SD; i < MAXDEVICES; i++) - { - if(strncmp(path, DeviceName[i], strlen(DeviceName[i])) == 0) - return i; - } - - return -1; -} - -const char * DeviceHandler::GetFSName(int dev) -{ - if(dev == SD && DeviceHandler::instance->sd) - { - return DeviceHandler::instance->sd->GetFSName(0); - } - else if(dev >= USB1 && dev <= USB8 && DeviceHandler::instance->usb) - { - return DeviceHandler::instance->usb->GetFSName(dev-USB1); - } - - return NULL; -} - -int DeviceHandler::GetUSBFilesystemType(int partition) -{ - if(!instance) - return -1; - - PartitionHandle * usbHandle = instance->GetUSBHandle(); - - const char * FSName = usbHandle->GetFSName(partition); - if(!FSName) return -1; - - if(strncmp(FSName, "WBFS", 4) == 0) - return PART_FS_WBFS; - else if(strncmp(FSName, "FAT", 3) == 0) - return PART_FS_FAT; - else if(strncmp(FSName, "NTFS", 4) == 0) - return PART_FS_NTFS; - else if(strncmp(FSName, "LINUX", 4) == 0) - return PART_FS_EXT; - - return -1; -} diff --git a/source/Controls/DeviceHandler.hpp b/source/Controls/DeviceHandler.hpp deleted file mode 100644 index 9e6bc18f..00000000 --- a/source/Controls/DeviceHandler.hpp +++ /dev/null @@ -1,100 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#ifndef DEVICE_HANDLER_HPP_ -#define DEVICE_HANDLER_HPP_ - -#include "PartitionHandle.h" - -enum -{ - SD = 0, - USB1, - USB2, - USB3, - USB4, - USB5, - USB6, - USB7, - USB8, - MAXDEVICES -}; - -const char DeviceName[MAXDEVICES][6] = -{ - "sd", - "usb1", - "usb2", - "usb3", - "usb4", - "usb5", - "usb6", - "usb7", - "usb8", -}; - -class DeviceHandler -{ - public: - static DeviceHandler * Instance(); - static void DestroyInstance(); - - bool MountAll(); - void UnMountAll(); - bool Mount(int dev); - bool IsInserted(int dev); - void UnMount(int dev); - - //! Individual Mounts/UnMounts... - bool MountSD(); - bool MountAllUSB(bool spinUp = true); - bool MountUSB(int part, bool spinUp = true); - bool SD_Inserted() { if(sd) return sd->IsInserted(); return false; }; - bool USB_Inserted() { if(usb) return usb->IsInserted(); return false; }; - void UnMountSD() { if(sd) delete sd; sd = NULL; }; - void UnMountUSB(int pos); - void UnMountAllUSB(); - PartitionHandle * GetSDHandle() const { return sd; }; - PartitionHandle * GetUSBHandle() const { return usb; }; - static int GetUSBFilesystemType(int part); - static int PathToDriveType(const char * path); - static const char * GetFSName(int dev); - static const char * PathToFSName(const char * path) { return GetFSName(PathToDriveType(path)); }; - static const DISC_INTERFACE * GetUSBInterface(); - static bool SetUSBPort(int port); - static void SetUSBPortFromPartition(int part); - private: - DeviceHandler() : sd(0), usb(0) { }; - ~DeviceHandler(); - - static DeviceHandler *instance; - - PartitionHandle * sd; - PartitionHandle * gca; - PartitionHandle * gcb; - PartitionHandle * usb; -}; - -#endif diff --git a/source/Controls/PartitionHandle.cpp b/source/Controls/PartitionHandle.cpp deleted file mode 100644 index 7ebd408e..00000000 --- a/source/Controls/PartitionHandle.cpp +++ /dev/null @@ -1,413 +0,0 @@ - /**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include "libs/libwbfs/libwbfs.h" -#include "utils/uncompress.h" -#include "PartitionHandle.h" - -#define PARTITION_TYPE_DOS33_EXTENDED 0x05 /* DOS 3.3+ extended partition */ -#define PARTITION_TYPE_WIN95_EXTENDED 0x0F /* Windows 95 extended partition */ - -#define CACHE 32 -#define SECTORS 64 - -static inline const char * PartFromType(int type) -{ - switch (type) - { - case 0x00: return "Unused"; - case 0x01: return "FAT12"; - case 0x04: return "FAT16"; - case 0x05: return "Extended"; - case 0x06: return "FAT16"; - case 0x07: return "NTFS"; - case 0x0b: return "FAT32"; - case 0x0c: return "FAT32"; - case 0x0e: return "FAT16"; - case 0x0f: return "Extended"; - case 0x82: return "LxSWP"; - case 0x83: return "LINUX"; - case 0x8e: return "LxLVM"; - case 0xa8: return "OSX"; - case 0xab: return "OSXBT"; - case 0xaf: return "OSXHF"; - case 0xbf: return "WBFS"; - case 0xe8: return "LUKS"; - default: return "Unknown"; - } -} - -PartitionHandle::PartitionHandle(const DISC_INTERFACE *discio) -{ - Port0Size = 0; - interface = discio; - - // Sanity check - if (!interface) - return; - - // Start the device and check that it is inserted - if (!interface->startup()) - return; - - if (!interface->isInserted()) - return; - - FindPartitions(); -} - -PartitionHandle::~PartitionHandle() -{ - UnMountAll(); - - //shutdown device - interface->shutdown(); -} - -void PartitionHandle::GetPort1Partitions() -{ - if(Port0Size != 0) - return; - - Port0Size = PartitionList.size(); - - // Start the device and check that it is inserted - if (!interface->startup()) - return; - - if (!interface->isInserted()) - return; - - FindPartitions(); -} - -bool PartitionHandle::IsMounted(int pos) -{ - if(pos < 0 || pos >= (int) MountNameList.size()) - return false; - - if(MountNameList[pos].size() == 0) - return false; - - return true; -} - -bool PartitionHandle::Mount(int pos, const char * name, bool forceFAT) -{ - if(!valid(pos)) - return false; - - if(!name) - return false; - - UnMount(pos); - - if(pos >= (int) MountNameList.size()) - MountNameList.resize(pos+1); - - MountNameList[pos] = name; - - //! Some stupid partition manager think they don't need to edit the freaken MBR. - //! So we need to check the first 64 sectors and see if some partition is there. - //! libfat does that by default so let's use it. - //! We do that only on sd not on usb. - if(forceFAT && (!GetFSName(pos) || strcmp(GetFSName(pos), "Unknown") == 0)) - { - if (fatMount(MountNameList[pos].c_str(), interface, 0, CACHE, SECTORS)) - { - extern sec_t _FAT_startSector; - AddPartition("FAT", _FAT_startSector, 0xdeadbeaf, true, 0x0c, 0); - return true; - } - } - - if(strncmp(GetFSName(pos), "FAT", 3) == 0 || strcmp(GetFSName(pos), "GUID-Entry") == 0) - { - if (fatMount(MountNameList[pos].c_str(), interface, GetLBAStart(pos), CACHE, SECTORS)) - { - if(strcmp(GetFSName(pos), "GUID-Entry") == 0) - PartitionList[pos].FSName = "FAT"; - return true; - } - } - - if(strncmp(GetFSName(pos), "NTFS", 4) == 0 || strcmp(GetFSName(pos), "GUID-Entry") == 0) - { - if(ntfsMount(MountNameList[pos].c_str(), interface, GetLBAStart(pos), CACHE, SECTORS, NTFS_SHOW_HIDDEN_FILES | NTFS_RECOVER)) - { - PartitionList[pos].FSName = "NTFS"; - return true; - } - } - - if(strncmp(GetFSName(pos), "LINUX", 5) == 0 || strcmp(GetFSName(pos), "GUID-Entry") == 0) - { - if(ext2Mount(MountNameList[pos].c_str(), interface, GetLBAStart(pos), CACHE, SECTORS, EXT2_FLAG_DEFAULT)) - { - PartitionList[pos].FSName = "LINUX"; - return true; - } - } - - MountNameList[pos].clear(); - - return false; -} - -void PartitionHandle::UnMount(int pos) -{ - if(!interface) - return; - - if(pos >= (int) MountNameList.size()) - return; - - if(MountNameList[pos].size() == 0) - return; - - char DeviceSyn[20]; - snprintf(DeviceSyn, sizeof(DeviceSyn), "%s:", MountNameList[pos].c_str()); - - //closing all open Files write back the cache - fatUnmount(DeviceSyn); - //closing all open Files write back the cache - ntfsUnmount(DeviceSyn, true); - //closing all open Files write back the cache - ext2Unmount(DeviceSyn); - //Remove name from list - MountNameList[pos].clear(); -} - -bool PartitionHandle::IsExisting(u64 lba) -{ - for(u32 i = 0; i < PartitionList.size(); ++i) - { - if(PartitionList[i].LBA_Start == lba) - return true; - } - - return false; -} - -int PartitionHandle::FindPartitions() -{ - MASTER_BOOT_RECORD *mbr = (MASTER_BOOT_RECORD *) malloc(MAX_BYTES_PER_SECTOR); - if(!mbr) return -1; - - // Read the first sector on the device - if (!interface->readSectors(0, 1, mbr)) - { - free(mbr); - return -1; - } - - // If this is the devices master boot record - if (mbr->signature != MBR_SIGNATURE) - { - free(mbr); - return -1; - } - - for (int i = 0; i < 4; i++) - { - PARTITION_RECORD * partition = (PARTITION_RECORD *) &mbr->partitions[i]; - - if(partition->type == PARTITION_TYPE_GPT) - { - int ret = CheckGPT(i); - if(ret == 0) // if it's a GPT we don't need to go on looking through the mbr anymore - return ret; - } - - if(partition->type == PARTITION_TYPE_DOS33_EXTENDED || partition->type == PARTITION_TYPE_WIN95_EXTENDED) - { - CheckEBR(i, le32(partition->lba_start)); - continue; - } - - if(le32(partition->block_count) > 0 && (!IsExisting(le32(partition->lba_start)) || Port0Size)) - { - AddPartition(PartFromType(partition->type), le32(partition->lba_start), - le32(partition->block_count), (partition->status == PARTITION_BOOTABLE), - partition->type, i); - } - } - - free(mbr); - - return 0; -} - -void PartitionHandle::CheckEBR(u8 PartNum, sec_t ebr_lba) -{ - EXTENDED_BOOT_RECORD *ebr = (EXTENDED_BOOT_RECORD *) malloc(MAX_BYTES_PER_SECTOR); - if(!ebr) return; - sec_t next_erb_lba = 0; - - do - { - // Read and validate the extended boot record - if (!interface->readSectors(ebr_lba + next_erb_lba, 1, ebr)) - { - free(ebr); - return; - } - - if (ebr->signature != EBR_SIGNATURE) - { - free(ebr); - return; - } - - if(le32(ebr->partition.block_count) > 0 && !IsExisting(ebr_lba + next_erb_lba + le32(ebr->partition.lba_start))) - { - AddPartition(PartFromType(ebr->partition.type), ebr_lba + next_erb_lba + le32(ebr->partition.lba_start), - le32(ebr->partition.block_count), (ebr->partition.status == PARTITION_BOOTABLE), - ebr->partition.type, PartNum); - } - // Get the start sector of the current partition - // and the next extended boot record in the chain - next_erb_lba = le32(ebr->next_ebr.lba_start); - } - while(next_erb_lba > 0); - - free(ebr); -} - -static const u8 TYPE_UNUSED[16] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; -static const u8 TYPE_BIOS[16] = { 0x48,0x61,0x68,0x21,0x49,0x64,0x6F,0x6E,0x74,0x4E,0x65,0x65,0x64,0x45,0x46,0x49 }; -static const u8 TYPE_LINUX_MS_BASIC_DATA[16] = { 0xA2,0xA0,0xD0,0xEB,0xE5,0xB9,0x33,0x44,0x87,0xC0,0x68,0xB6,0xB7,0x26,0x99,0xC7 }; - -int PartitionHandle::CheckGPT(u8 PartNum) -{ - GPT_HEADER *gpt_header = (GPT_HEADER *) malloc(MAX_BYTES_PER_SECTOR); - if(!gpt_header) return -1; - - // Read and validate the extended boot record - if (!interface->readSectors(1, 1, gpt_header)) - { - free(gpt_header); - return -1; - } - - if(strncmp(gpt_header->magic, "EFI PART", 8) != 0) - { - free(gpt_header); - return -1; - } - - gpt_header->part_table_lba = le64(gpt_header->part_table_lba); - gpt_header->part_entries = le32(gpt_header->part_entries); - gpt_header->part_entry_size = le32(gpt_header->part_entry_size); - gpt_header->part_entry_checksum = le32(gpt_header->part_entry_checksum); - - u8 * sector_buf = new u8[MAX_BYTES_PER_SECTOR]; - - u64 next_lba = gpt_header->part_table_lba; - - for(u32 i = 0; i < gpt_header->part_entries; ++i) - { - if (!interface->readSectors(next_lba, 1, sector_buf)) - break; - - for(u32 n = 0; n < BYTES_PER_SECTOR/gpt_header->part_entry_size; ++n, ++i) - { - GUID_PART_ENTRY * part_entry = (GUID_PART_ENTRY *) (sector_buf+gpt_header->part_entry_size*n); - - if(memcmp(part_entry->part_type_guid, TYPE_UNUSED, 16) == 0) - continue; - - if(IsExisting(le64(part_entry->part_first_lba))) - continue; - - bool bootable = (memcmp(part_entry->part_type_guid, TYPE_BIOS, 16) == 0); - - AddPartition("GUID-Entry", le64(part_entry->part_first_lba), le64(part_entry->part_last_lba), bootable, PARTITION_TYPE_GPT, PartNum); - } - - next_lba++; - } - - delete [] sector_buf; - free(gpt_header); - - return 0; -} - -void PartitionHandle::AddPartition(const char * name, u64 lba_start, u64 sec_count, bool bootable, u8 part_type, u8 part_num) -{ - char *buffer = (char *) malloc(MAX_BYTES_PER_SECTOR); - - if (!interface->readSectors(lba_start, 1, buffer)) - { - free(buffer); - return; - } - - wbfs_head_t *head = (wbfs_head_t *) buffer; - - if (head->magic == wbfs_htonl(WBFS_MAGIC)) - { - name = "WBFS"; - part_type = 0xBF; //Override partition type on WBFS - //! correct sector size in physical sectors (512 bytes per sector) - sec_count = (u64) head->n_hd_sec * (u64) (1 << head->hd_sec_sz_s) / (u64) BYTES_PER_SECTOR; - - } - else if(*((u16 *) (buffer + 0x1FE)) == 0x55AA) - { - //! Partition typ can be missleading the correct partition format. Stupid lazy ass Partition Editors. - if((memcmp(buffer + 0x36, "FAT", 3) == 0 || memcmp(buffer + 0x52, "FAT", 3) == 0) && - strncmp(PartFromType(part_type), "FAT", 3) != 0) - { - name = "FAT32"; - part_type = 0x0c; - } - if (memcmp(buffer + 0x03, "NTFS", 4) == 0) - { - name = "NTFS"; - part_type = 0x07; - } - } - - PartitionFS PartitionEntrie; - PartitionEntrie.FSName = name; - PartitionEntrie.LBA_Start = lba_start; - PartitionEntrie.SecCount = sec_count; - PartitionEntrie.Bootable = bootable; - PartitionEntrie.PartitionType = part_type; - PartitionEntrie.PartitionNum = part_num; - - PartitionList.push_back(PartitionEntrie); - - free(buffer); -} diff --git a/source/Controls/PartitionHandle.h b/source/Controls/PartitionHandle.h deleted file mode 100644 index c99787cb..00000000 --- a/source/Controls/PartitionHandle.h +++ /dev/null @@ -1,173 +0,0 @@ - /**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#ifndef PARTITION_HANDLE_H -#define PARTITION_HANDLE_H - -#include -#include -#include - -#define MAX_PARTITIONS 32 /* Maximum number of partitions that can be found */ -#define MAX_MOUNTS 10 /* Maximum number of mounts available at one time */ -#define MAX_SYMLINK_DEPTH 10 /* Maximum search depth when resolving symbolic links */ - -#define MBR_SIGNATURE 0x55AA -#define EBR_SIGNATURE MBR_SIGNATURE - -#define PARTITION_BOOTABLE 0x80 /* Bootable (active) */ -#define PARTITION_NONBOOTABLE 0x00 /* Non-bootable */ -#define PARTITION_TYPE_GPT 0xEE /* Indicates that a GPT header is available */ - -#define GUID_SYSTEM_PARTITION 0x0000000000000001LL /* System partition (disk partitioning utilities must reserve the partition as is) */ -#define GUID_READ_ONLY_PARTITION 0x0800000000000000LL /* Read-only partition */ -#define GUID_HIDDEN_PARTITION 0x2000000000000000LL /* Hidden partition */ -#define GUID_NO_AUTOMOUNT_PARTITION 0x4000000000000000LL /* Do not automount (e.g., do not assign drive letter) */ - -#define BYTES_PER_SECTOR 512 /* Default in libogc */ -#define MAX_BYTES_PER_SECTOR 4096 /* Max bytes per sector */ - -typedef struct _PARTITION_RECORD { - u8 status; /* Partition status; see above */ - u8 chs_start[3]; /* Cylinder-head-sector address to first block of partition */ - u8 type; /* Partition type; see above */ - u8 chs_end[3]; /* Cylinder-head-sector address to last block of partition */ - u32 lba_start; /* Local block address to first sector of partition */ - u32 block_count; /* Number of blocks in partition */ -} __attribute__((__packed__)) PARTITION_RECORD; - - -typedef struct _MASTER_BOOT_RECORD { - u8 code_area[446]; /* Code area; normally empty */ - PARTITION_RECORD partitions[4]; /* 4 primary partitions */ - u16 signature; /* MBR signature; 0xAA55 */ -} __attribute__((__packed__)) MASTER_BOOT_RECORD; - -typedef struct _EXTENDED_BOOT_RECORD { - u8 code_area[446]; /* Code area; normally empty */ - PARTITION_RECORD partition; /* Primary partition */ - PARTITION_RECORD next_ebr; /* Next extended boot record in the chain */ - u8 reserved[32]; /* Normally empty */ - u16 signature; /* EBR signature; 0xAA55 */ -} __attribute__((__packed__)) EXTENDED_BOOT_RECORD; - -typedef struct _GPT_HEADER -{ - char magic[8]; /* "EFI PART" */ - u32 revision; /* For version 1.0 */ - u32 header_size; /* Header size in bytes */ - u32 checksum; /* CRC32 of header (0 to header size), with this field zeroed during calculation */ - u32 reserved; /* must be 0 */ - u64 header_lba; /* Current LBA (location of this header copy) */ - u64 backup_lba; /* Backup LBA (location of the other header copy) */ - u64 first_part_lba; /* First usable LBA for partitions (primary partition table last LBA + 1) */ - u64 last_part_lba; /* Last usable LBA (secondary partition table first LBA - 1) */ - u8 disk_guid[16]; /* Disk GUID (also referred as UUID on UNIXes) */ - u64 part_table_lba; /* Partition entries starting LBA (always 2 in primary copy) */ - u32 part_entries; /* Number of partition entries */ - u32 part_entry_size; /* Size of a partition entry (usually 128) */ - u32 part_entry_checksum; /* CRC32 of partition array */ - u8 zeros[420]; -} __attribute__((__packed__)) GPT_HEADER; - -typedef struct _GUID_PART_ENTRY -{ - u8 part_type_guid[16]; /* Partition type GUID */ - u8 uniq_part_guid[16]; /* Unique partition GUID */ - u64 part_first_lba; /* First LBA (little-endian) */ - u64 part_last_lba; /* Last LBA (inclusive, usually odd) */ - u64 attribute_flags; /* GUID Attribute flags (e.g. bit 60 denotes read-only) */ - char partition_name[72]; /* Partition name (36 UTF-16LE code units) */ -} __attribute__((__packed__)) GUID_PART_ENTRY; - -typedef struct _PartitionFS -{ - const char * FSName; - u64 LBA_Start; - u64 SecCount; - bool Bootable; - u8 PartitionType; - u8 PartitionNum; -} __attribute__((__packed__)) PartitionFS; - - -class PartitionHandle -{ - public: - //! Constructor reads the MBR and all EBRs and lists up the Partitions - PartitionHandle(const DISC_INTERFACE *discio); - //! Destructor unmounts drives - ~PartitionHandle(); - //! Is Drive inserted - bool IsInserted() { if(!interface) return false; else return interface->isInserted(); }; - //! Is the partition Mounted - bool IsMounted(int pos); - //! Mount a specific Partition - bool Mount(int pos, const char * name, bool forceFAT = false); - //! UnMount a specific Partition - void UnMount(int pos); - //! UnMount all Partition - void UnMountAll() { for(u32 i = 0; i < PartitionList.size(); ++i) UnMount(i); }; - //! Get the Mountname - const char * MountName(int pos) { if(pos < 0 || pos >= (int) MountNameList.size() || !MountNameList[pos].size()) return NULL; else return MountNameList[pos].c_str(); }; - //! Get the Name of the FileSystem e.g. "FAT32" - const char * GetFSName(int pos) { if(valid(pos)) return PartitionList[pos].FSName; else return NULL; }; - //! Get the LBA where the partition is located - u32 GetLBAStart(int pos) { if(valid(pos)) return PartitionList[pos].LBA_Start; else return 0; }; - //! Get the partition size in sectors of this partition - u32 GetSecCount(int pos) { if(valid(pos)) return PartitionList[pos].SecCount; else return 0; }; - //! Check if the partition is Active or NonBootable - bool IsActive(int pos) { if(valid(pos)) return PartitionList[pos].Bootable; else return false; }; - //! Get the partition type - int GetPartitionType(int pos) { if(valid(pos)) return PartitionList[pos].PartitionType; else return -1; }; - //! Get the entrie number in MBR of this partition - int GetPartitionNum(int pos) { if(valid(pos)) return PartitionList[pos].PartitionNum; else return -1; }; - //! Get the count of found partitions - int GetPartitionCount() const { if(Port0Size) return Port0Size; else return PartitionList.size(); }; - //! Get the partition size in bytes - u64 GetSize(int pos) { if(valid(pos)) return (u64) PartitionList[pos].SecCount*BYTES_PER_SECTOR; else return 0; }; - //! Get the whole partition record struct - PartitionFS * GetPartitionRecord(int pos) { if(valid(pos)) return &PartitionList[pos]; else return NULL; }; - //! Get the disc interface of this handle - const DISC_INTERFACE * GetDiscInterface() { return interface; }; - //! Get the port 1 partitions on usb - void GetPort1Partitions(); - //! Get the count of found partitions including second port partitions on usb - int GetPartitionTotalCount() const { return PartitionList.size(); }; - protected: - bool valid(int pos) { return (pos >= 0 && pos < (int) PartitionList.size()); } - void AddPartition(const char * name, u64 lba_start, u64 sec_count, bool bootable, u8 part_type, u8 part_num); - bool IsExisting(u64 lba); - int FindPartitions(); - void CheckEBR(u8 PartNum, sec_t ebr_lba); - int CheckGPT(u8 PartNum); - - const DISC_INTERFACE *interface; - std::vector PartitionList; - std::vector MountNameList; - int Port0Size; -}; - -#endif diff --git a/source/FileOperations/DirList.cpp b/source/FileOperations/DirList.cpp deleted file mode 100644 index dee63ff3..00000000 --- a/source/FileOperations/DirList.cpp +++ /dev/null @@ -1,198 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * DirList Class - * for WiiXplorer 2010 - ***************************************************************************/ -#include -#include -#include -#include -#include -#include -#include - -#include "utils/StringTools.h" -#include "DirList.h" - -DirList::DirList(const char * path, const char *filter, u32 flags) -{ - this->LoadPath(path, filter, flags); - this->SortList(); -} - -DirList::~DirList() -{ - ClearList(); -} - -bool DirList::LoadPath(const char * folder, const char *filter, u32 flags) -{ - if(!folder) - return false; - - struct stat st; - struct dirent *dirent = NULL; - DIR *dir = NULL; - std::string folderpath = folder; - - if(folderpath[folderpath.size()-1] == '/') - folderpath.erase(folderpath.size()-1, 1); - - const char * notRoot = strchr(folderpath.c_str(), '/'); - if(!notRoot) - folderpath += '/'; - - dir = opendir(folderpath.c_str()); - if (dir == NULL) - return false; - - char * filename = new (std::nothrow) char[1024]; - if(!filename) - { - closedir(dir); - return false; - } - - while ((dirent = readdir(dir)) != 0) - { - snprintf(filename, 1024, "%s/%s", folderpath.c_str(), dirent->d_name); - - if(stat(filename, &st) != 0) - continue; - - snprintf(filename, 1024, dirent->d_name); - - if(st.st_mode & S_IFDIR) - { - if(!(flags & Dirs)) - continue; - - if(strcmp(filename,".") == 0 || strcmp(filename,"..") == 0) - continue; - - if(flags & CheckSubfolders) - { - std::string newFolder = folderpath; - if(notRoot) newFolder += '/'; - newFolder += filename; - LoadPath(newFolder.c_str(), filter, flags); - } - } - else - { - if(!(flags & Files)) - continue; - } - - if(filter) - { - char * fileext = strrchr(filename, '.'); - if(!fileext) - continue; - - if(strtokcmp(fileext, filter, ",") == 0) - AddEntrie(folderpath.c_str(), filename, st.st_size, (st.st_mode & S_IFDIR) ? true : false); - } - else - { - AddEntrie(folderpath.c_str(), filename, st.st_size, (st.st_mode & S_IFDIR) ? true : false); - } - } - closedir(dir); - delete [] filename; - - return true; -} - -void DirList::AddEntrie(const char * folderpath, const char * filename, u64 filesize, bool isDir) -{ - if(!folderpath || !filename) - return; - - int pos = FileInfo.size(); - - FileInfo.resize(pos+1); - - FileInfo[pos].FilePath = new (std::nothrow) char[strlen(folderpath)+strlen(filename)+2]; - if(FileInfo[pos].FilePath) - sprintf(FileInfo[pos].FilePath, "%s/%s", folderpath, filename); - FileInfo[pos].FileSize = filesize; - FileInfo[pos].isDir = isDir; -} - -void DirList::ClearList() -{ - for(u32 i = 0; i < FileInfo.size(); ++i) - { - if(FileInfo[i].FilePath) - delete [] FileInfo[i].FilePath; - } - - FileInfo.clear(); - std::vector().swap(FileInfo); -} - -const char * DirList::GetFilename(int ind) -{ - if (!valid(ind)) - return NULL; - - return FullpathToFilename(FileInfo[ind].FilePath); -} - -static bool SortCallback(const FileInfos & f1, const FileInfos & f2) -{ - if(f1.isDir && !(f2.isDir)) return true; - if(!(f1.isDir) && f2.isDir) return false; - - const char * Filename1 = FullpathToFilename(f1.FilePath); - const char * Filename2 = FullpathToFilename(f2.FilePath); - - if(Filename1 && !Filename2) return true; - if(!Filename1 && Filename2) return false; - - if(strcasecmp(Filename1, Filename2) > 0) - return false; - - return true; -} - -void DirList::SortList() -{ - std::sort(FileInfo.begin(), FileInfo.end(), SortCallback); -} - -int DirList::GetFileIndex(const char *filename) -{ - if(!filename) - return -1; - - for (u32 i = 0; i < FileInfo.size(); ++i) - { - if (strcasecmp(GetFilename(i), filename) == 0) - return i; - } - - return -1; -} diff --git a/source/FileOperations/DirList.h b/source/FileOperations/DirList.h deleted file mode 100644 index 5d2c6d08..00000000 --- a/source/FileOperations/DirList.h +++ /dev/null @@ -1,88 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * DirList Class - * for WiiXplorer 2010 - ***************************************************************************/ -#ifndef ___DIRLIST_H_ -#define ___DIRLIST_H_ - -#include -#include - -typedef struct -{ - char * FilePath; - u64 FileSize; - bool isDir; -} FileInfos; - -class DirList -{ - public: - //!Constructor - //!\param path Path from where to load the filelist of all files - //!\param filter A fileext that needs to be filtered - //!\param flags search/filter flags from the enum - DirList(const char * path, const char *filter = NULL, u32 flags = Files | Dirs); - //!Destructor - ~DirList(); - //! Load all the files from a directory - bool LoadPath(const char * path, const char *filter = NULL, u32 flags = Files | Dirs); - //! Get a filename of the list - //!\param list index - const char * GetFilename(int index); - //! Get the a filepath of the list - //!\param list index - const char * GetFilepath(int index) { if(!valid(index)) return NULL; return FileInfo[index].FilePath; }; - //! Get the a filesize of the list - //!\param list index - u64 GetFilesize(int index) { if(!valid(index)) return 0; return FileInfo[index].FileSize; }; - //! Is index a dir or a file - //!\param list index - bool IsDir(int index) { if(!valid(index)) return 0; return FileInfo[index].isDir; }; - //! Get the filecount of the whole list - int GetFilecount() { return FileInfo.size(); }; - //! Sort list by filepath - void SortList(); - //! Get the index of the specified filename - int GetFileIndex(const char *filename); - //! Enum for search/filter flags - enum - { - Files = 0x01, - Dirs = 0x02, - CheckSubfolders = 0x08, - }; - protected: - //!Add a list entrie - void AddEntrie(const char * folderpath, const char * filename, u64 filesize, bool isDir); - //! Clear the list - void ClearList(); - //! Check if valid pos is requested - inline bool valid(int pos) { return (pos >= 0 && pos < (int) FileInfo.size()); }; - - std::vector FileInfo; -}; - -#endif diff --git a/source/FileOperations/File.cpp b/source/FileOperations/File.cpp deleted file mode 100644 index f37d47c4..00000000 --- a/source/FileOperations/File.cpp +++ /dev/null @@ -1,142 +0,0 @@ -#include -#include "File.hpp" - -CFile::CFile() -{ - file_fd = NULL; - mem_file = NULL; - filesize = 0; - Pos = 0; -} - -CFile::CFile(const char * filepath, const char * mode) -{ - file_fd = NULL; - open(filepath, mode); -} - -CFile::CFile(const u8 * mem, int size) -{ - file_fd = NULL; - open(mem, size); -} - -CFile::~CFile() -{ - close(); -} - -int CFile::open(const char * filepath, const char * mode) -{ - close(); - - file_fd = fopen(filepath, mode); - if(!file_fd) - return -1; - - fseek(file_fd, 0, SEEK_END); - filesize = ftell(file_fd); - rewind(); - - return 0; -} - -int CFile::open(const u8 * mem, int size) -{ - close(); - - mem_file = mem; - filesize = size; - - return 0; -} - -void CFile::close() -{ - if(file_fd) - fclose(file_fd); - - file_fd = NULL; - mem_file = NULL; - filesize = 0; - Pos = 0; -} - -int CFile::read(u8 * ptr, size_t size) -{ - if(file_fd) - { - int ret = fread(ptr, 1, size, file_fd); - if(ret > 0) - Pos += ret; - return ret; - } - - int readsize = size; - - if(readsize > (long int) filesize-Pos) - readsize = filesize-Pos; - - if(readsize <= 0) - return readsize; - - if(mem_file != NULL) - { - memcpy(ptr, mem_file+Pos, readsize); - Pos += readsize; - return readsize; - } - - return -1; -} - -int CFile::write(const u8 * ptr, size_t size) -{ - if(file_fd) - { - int ret = fwrite(ptr, 1, size, file_fd); - if(ret > 0) - Pos += ret; - return ret; - } - - return -1; -} - -int CFile::seek(long int offset, int origin) -{ - int ret = 0; - - if(origin == SEEK_SET) - { - Pos = offset; - } - else if(origin == SEEK_CUR) - { - Pos += offset; - } - else if(origin == SEEK_END) - { - Pos = filesize+offset; - } - if(Pos < 0) - { - Pos = 0; - return -1; - } - - if(file_fd) - ret = fseek(file_fd, Pos, SEEK_SET); - - if(mem_file != NULL) - { - if(Pos > (long int) filesize) - { - Pos = filesize; - return -1; - } - } - - return ret; -} - diff --git a/source/FileOperations/File.hpp b/source/FileOperations/File.hpp deleted file mode 100644 index b5e1af75..00000000 --- a/source/FileOperations/File.hpp +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef FILE_HPP_ -#define FILE_HPP_ - -#include -#include - -class CFile -{ - public: - CFile(); - CFile(const char * filepath, const char * mode); - CFile(const u8 * memory, int memsize); - ~CFile(); - int open(const char * filepath, const char * mode); - int open(const u8 * memory, int memsize); - void close(); - int read(u8 * ptr, size_t size); - int write(const u8 * ptr, size_t size); - int seek(long int offset, int origin); - long int tell() { return Pos; }; - long int size() { return filesize; }; - void rewind() { seek(0, SEEK_SET); }; - protected: - FILE * file_fd; - const u8 * mem_file; - u64 filesize; - long int Pos; -}; - -#endif diff --git a/source/FileOperations/fileops.cpp b/source/FileOperations/fileops.cpp deleted file mode 100644 index 4342bef7..00000000 --- a/source/FileOperations/fileops.cpp +++ /dev/null @@ -1,423 +0,0 @@ - /*************************************************************************** - * Copyright (C) 2009 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * fileops.cpp - * File operations for the WiiXplorer - * Handling all the needed file operations - ***************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "fileops.h" - -#define BLOCKSIZE 70*1024 //70KB -#define VectorResize(List) if(List.capacity()-List.size() == 0) List.reserve(List.size()+100) - - -static bool actioncanceled = false; - -/**************************************************************************** - * CheckFile - * - * Check if file is existing - ***************************************************************************/ -extern "C" bool CheckFile(const char * filepath) -{ - if(!filepath) - return false; - - struct stat filestat; - - char dirnoslash[strlen(filepath)+2]; - snprintf(dirnoslash, sizeof(dirnoslash), "%s", filepath); - - while(dirnoslash[strlen(dirnoslash)-1] == '/') - dirnoslash[strlen(dirnoslash)-1] = '\0'; - - char * notRoot = strrchr(dirnoslash, '/'); - if(!notRoot) - { - strcat(dirnoslash, "/"); - } - - if (stat(dirnoslash, &filestat) == 0) - return true; - - return false; -} - -/**************************************************************************** - * FileSize - * - * Get filesize in bytes. u64 for files bigger than 4GB - ***************************************************************************/ -extern "C" u64 FileSize(const char * filepath) -{ - struct stat filestat; - - if (stat(filepath, &filestat) != 0) - return 0; - - return filestat.st_size; -} - -/**************************************************************************** - * LoadFileToMem - * - * Load up the file into a block of memory - ***************************************************************************/ -extern "C" int LoadFileToMem(const char *filepath, u8 **inbuffer, u64 *size) -{ - int ret = -1; - u64 filesize = FileSize(filepath); - char * filename = strrchr(filepath, '/'); - if(filename) - filename++; - - *inbuffer = NULL; - *size = 0; - - FILE *file = fopen(filepath, "rb"); - - if (file == NULL) - return -1; - - u8 *buffer = (u8 *) malloc(filesize); - if (buffer == NULL) - { - fclose(file); - return -2; - } - - u64 done = 0; - u32 blocksize = BLOCKSIZE; - - do - { - if(actioncanceled) - { - free(buffer); - fclose(file); - return -10; - } - - if(blocksize > filesize-done) - blocksize = filesize-done; - - ret = fread(buffer+done, 1, blocksize, file); - if(ret < 0) - { - free(buffer); - fclose(file); - return -3; - } - else if(ret == 0) - { - //we are done - break; - } - - done += ret; - - } - while(done < filesize); - - fclose(file); - - if (done != filesize) - { - free(buffer); - return -3; - } - - *inbuffer = buffer; - *size = filesize; - - return 1; -} - -/**************************************************************************** - * LoadFileToMemWithProgress - * - * Load up the file into a block of memory, while showing a progress dialog - ***************************************************************************/ -extern "C" int LoadFileToMemWithProgress(const char *progressText, const char *filepath, u8 **inbuffer, u64 *size) -{ - - int ret = LoadFileToMem(filepath, inbuffer, size); - - return ret; -} - -/**************************************************************************** - * CreateSubfolder - * - * Create recursive all subfolders to the given path - ***************************************************************************/ -extern "C" bool CreateSubfolder(const char * fullpath) -{ - if(!fullpath) - return false; - - bool result = false; - - char dirnoslash[strlen(fullpath)+1]; - strcpy(dirnoslash, fullpath); - - int pos = strlen(dirnoslash)-1; - while(dirnoslash[pos] == '/') - { - dirnoslash[pos] = '\0'; - pos--; - } - - if(CheckFile(dirnoslash)) - { - return true; - } - else - { - char parentpath[strlen(dirnoslash)+2]; - strcpy(parentpath, dirnoslash); - char * ptr = strrchr(parentpath, '/'); - - if(!ptr) - { - //!Device root directory (must be with '/') - strcat(parentpath, "/"); - struct stat filestat; - if (stat(parentpath, &filestat) == 0) - return true; - - return false; - } - - ptr++; - ptr[0] = '\0'; - - result = CreateSubfolder(parentpath); - } - - if(!result) - return false; - - if (mkdir(dirnoslash, 0777) == -1) - { - return false; - } - - return true; -} - -/**************************************************************************** - * CompareDevices - * - * Compare if its the devices are equal - ***************************************************************************/ -static bool CompareDevices(const char *src, const char *dest) -{ - if(!src || !dest) - return false; - - char *device1 = strchr(src, ':'); - char *device2 = strchr(dest, ':'); - - if(!device1 || !device2) - return false; - - int position1 = device1-src+1; - int position2 = device2-dest+1; - - char temp1[50]; - char temp2[50]; - - snprintf(temp1, position1, "%s", src); - snprintf(temp2, position2, "%s", dest); - - if(strcasecmp(temp1, temp2) == 0) - return true; - - return false; -} - -/**************************************************************************** - * CopyFile - * - * Copy the file from source filepath to destination filepath - ***************************************************************************/ -extern "C" int CopyFile(const char * src, const char * dest) -{ - int read = 1; - int wrote = 1; - - char * filename = strrchr(src, '/'); - if(filename) - filename++; - else - return -1; - - u64 sizesrc = FileSize(src); - - FILE * source = fopen(src, "rb"); - - if(!source) - return -2; - - u32 blksize = BLOCKSIZE; - - u8 * buffer = (u8 *) malloc(blksize); - - if(buffer == NULL){ - //no memory - fclose(source); - return -1; - } - - FILE * destination = fopen(dest, "wb"); - - if(destination == NULL) - { - free(buffer); - fclose(source); - return -3; - } - - u64 done = 0; - - do - { - if(actioncanceled) - { - fclose(source); - fclose(destination); - free(buffer); - RemoveFile((char *) dest); - return -10; - } - - if(blksize > sizesrc - done) - blksize = sizesrc - done; - - //Display progress - read = fread(buffer, 1, blksize, source); - if(read < 0) - { - fclose(source); - fclose(destination); - free(buffer); - RemoveFile((char *) dest); - return -3; - } - - wrote = fwrite(buffer, 1, read, destination); - if(wrote < 0) - { - fclose(source); - fclose(destination); - free(buffer); - RemoveFile((char *) dest); - return -3; - } - - done += wrote; - } - while (read > 0); - - free(buffer); - fclose(source); - fclose(destination); - - if(sizesrc != done) - return -4; - - return 1; -} - -/**************************************************************************** -* ClearList -* -* Clearing a vector list -****************************************************************************/ -static inline void ClearList(std::vector &List) -{ - for(u32 i = 0; i < List.size(); ++i) - { - if(List[i]) - free(List[i]); - List[i] = NULL; - } - List.clear(); - std::vector().swap(List); -} - -/**************************************************************************** - * MoveFile - * - * Move a file from srcpath to destdir - ***************************************************************************/ -extern "C" int MoveFile(const char *srcpath, char *destdir) -{ - if(CompareDevices(srcpath, destdir)) - { - if(RenameFile(srcpath, destdir)) - return 1; - else - return -1; - } - - int res = CopyFile(srcpath, destdir); - if(res < 0) - return -1; - - if(RemoveFile(srcpath)) - return 1; - - return -1; -} - -/**************************************************************************** - * RemoveFile - * - * Delete the file from a given filepath - ***************************************************************************/ -extern "C" bool RemoveFile(const char * filepath) -{ - return (remove(filepath) == 0); -} - -/**************************************************************************** - * RenameFile - * - * Rename the file from a given srcpath to a given destpath - ***************************************************************************/ -extern "C" bool RenameFile(const char * srcpath, const char * destpath) -{ - return (rename(srcpath, destpath) == 0); -} diff --git a/source/FileOperations/fileops.h b/source/FileOperations/fileops.h deleted file mode 100644 index 5df3bc75..00000000 --- a/source/FileOperations/fileops.h +++ /dev/null @@ -1,51 +0,0 @@ - /*************************************************************************** - * Copyright (C) 2009 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * fileops.h - * File operations for the WiiXplorer - * Handling all the needed file operations - ***************************************************************************/ -#ifndef _FILEOPS_H_ -#define _FILEOPS_H_ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -bool CreateSubfolder(const char * fullpath); -bool CheckFile(const char * filepath); -u64 FileSize(const char * filepath); -int LoadFileToMem(const char * filepath, u8 **buffer, u64 *size); -int LoadFileToMemWithProgress(const char *progressText, const char *filePath, u8 **buffer, u64 *size); -int CopyFile(const char * src, const char * dest); -int MoveFile(const char *srcpath, char *destdir); -bool RenameFile(const char * srcpath, const char * destpath); -bool RemoveFile(const char * filepath); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/FreeTypeGX.cpp b/source/FreeTypeGX.cpp deleted file mode 100644 index 7c6fffab..00000000 --- a/source/FreeTypeGX.cpp +++ /dev/null @@ -1,601 +0,0 @@ -/* - * FreeTypeGX is a wrapper class for libFreeType which renders a compiled - * FreeType parsable font into a GX texture for Wii homebrew development. - * Copyright (C) 2008 Armin Tamzarian - * Modified by Dimok, 2010 - * - * This file is part of FreeTypeGX. - * - * FreeTypeGX is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * FreeTypeGX is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with FreeTypeGX. If not, see . - */ - -#include "FreeTypeGX.h" -#include "utils/tools.h" - -using namespace std; - -/** - * Convert a short char string to a wide char string. - * - * This routine converts a supplied short character string into a wide character string. - * Note that it is the user's responsibility to clear the returned buffer once it is no longer needed. - * - * @param strChar Character string to be converted. - * @return Wide character representation of supplied character string. - */ - -wchar_t* charToWideChar(const char* strChar) -{ - if (!strChar) return NULL; - - wchar_t *strWChar = new (std::nothrow) wchar_t[strlen(strChar) + 1]; - if (!strWChar) return NULL; - - int bt = mbstowcs(strWChar, strChar, strlen(strChar)); - if (bt > 0) - { - strWChar[bt] = 0; - return strWChar; - } - - wchar_t *tempDest = strWChar; - while ((*tempDest++ = *strChar++)) - ; - - return strWChar; -} - -/** - * Default constructor for the FreeTypeGX class for WiiXplorer. - */ -FreeTypeGX::FreeTypeGX(const uint8_t* fontBuffer, FT_Long bufferSize) -{ - ftPointSize = 0; - - FT_Init_FreeType(&ftLibrary); - FT_New_Memory_Face(ftLibrary, (FT_Byte *) fontBuffer, bufferSize, 0, &ftFace); - - setVertexFormat(GX_VTXFMT1); - ftKerningEnabled = false; -} - -/** - * Default destructor for the FreeTypeGX class. - */ -FreeTypeGX::~FreeTypeGX() -{ - unloadFont(); - FT_Done_Face(ftFace); - FT_Done_FreeType(ftLibrary); -} - -/** - * Setup the vertex attribute formats for the glyph textures. - * - * This function sets up the vertex format for the glyph texture on the specified vertex format index. - * Note that this function should not need to be called except if the vertex formats are cleared or the specified - * vertex format index is modified. - * - * @param vertexIndex Vertex format index (GX_VTXFMT*) of the glyph textures as defined by the libogc gx.h header file. - */ -void FreeTypeGX::setVertexFormat(uint8_t vertexInd) -{ - vertexIndex = vertexInd; - GX_SetVtxAttrFmt(vertexIndex, GX_VA_POS, GX_POS_XYZ, GX_S16, 0); - GX_SetVtxAttrFmt(vertexIndex, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0); - GX_SetVtxAttrFmt(vertexIndex, GX_VA_CLR0, GX_CLR_RGBA, GX_RGBA8, 0); -} - -/** - * Clears all loaded font glyph data. - * - * This routine clears all members of the font map structure and frees all allocated memory back to the system. - */ -void FreeTypeGX::unloadFont() -{ - if (this->fontData.size() == 0) return; - - map >::iterator itr; - map::iterator itr2; - - for (itr = fontData.begin(); itr != fontData.end(); itr++) - { - for (itr2 = itr->second.begin(); itr2 != itr->second.end(); itr2++) - free(itr2->second.glyphDataTexture); - - itr->second.clear(); - } - - fontData.clear(); - ftgxAlign.clear(); -} - -/** - * Caches the given font glyph in the instance font texture buffer. - * - * This routine renders and stores the requested glyph's bitmap and relevant information into its own quickly addressible - * structure within an instance-specific map. - * - * @param charCode The requested glyph's character code. - * @return A pointer to the allocated font structure. - */ -ftgxCharData * FreeTypeGX::cacheGlyphData(wchar_t charCode, int16_t pixelSize) -{ - map >::iterator itr; - map::iterator itr2; - - itr = fontData.find(pixelSize); - if (itr != fontData.end()) - { - itr2 = itr->second.find(charCode); - - if (itr2 != itr->second.end()) - { - return &itr2->second; - } - } - - FT_UInt gIndex; - uint16_t textureWidth = 0, textureHeight = 0; - - if (ftPointSize != pixelSize) - { - ftPointSize = pixelSize; - FT_Set_Pixel_Sizes(ftFace, 0, ftPointSize); - - //!Cache ascender and decender as well - map::iterator itrAlign = ftgxAlign.find(ftPointSize); - if (itrAlign == ftgxAlign.end()) - { - ftgxAlign[ftPointSize].ascender = (int16_t) ftFace->size->metrics.ascender >> 6; - ftgxAlign[ftPointSize].descender = (int16_t) ftFace->size->metrics.descender >> 6; - ftgxAlign[ftPointSize].max = 0; - ftgxAlign[ftPointSize].min = 0; - } - } - - gIndex = FT_Get_Char_Index(ftFace, (FT_ULong) charCode); - if (gIndex != 0 && FT_Load_Glyph(ftFace, gIndex, FT_LOAD_DEFAULT | FT_LOAD_RENDER) == 0) - { - if (ftFace->glyph->format == FT_GLYPH_FORMAT_BITMAP) - { - FT_Bitmap *glyphBitmap = &ftFace->glyph->bitmap; - - textureWidth = ALIGN(glyphBitmap->width); - textureHeight = ALIGN(glyphBitmap->rows); - if(textureWidth == 0) - textureWidth = 4; - if(textureHeight == 0) - textureHeight = 4; - - fontData[pixelSize][charCode].renderOffsetX = (int16_t) ftFace->glyph->bitmap_left; - fontData[pixelSize][charCode].glyphAdvanceX = (uint16_t) (ftFace->glyph->advance.x >> 6); - fontData[pixelSize][charCode].glyphIndex = (uint32_t) gIndex; - fontData[pixelSize][charCode].textureWidth = (uint16_t) textureWidth; - fontData[pixelSize][charCode].textureHeight = (uint16_t) textureHeight; - fontData[pixelSize][charCode].renderOffsetY = (int16_t) ftFace->glyph->bitmap_top; - fontData[pixelSize][charCode].renderOffsetMax = (int16_t) ftFace->glyph->bitmap_top; - fontData[pixelSize][charCode].renderOffsetMin = (int16_t) glyphBitmap->rows - ftFace->glyph->bitmap_top; - fontData[pixelSize][charCode].glyphDataTexture = NULL; - - loadGlyphData(glyphBitmap, &fontData[pixelSize][charCode]); - - return &fontData[pixelSize][charCode]; - } - } - return NULL; -} - -/** - * Locates each character in this wrapper's configured font face and proccess them. - * - * This routine locates each character in the configured font face and renders the glyph's bitmap. - * Each bitmap and relevant information is loaded into its own quickly addressible structure within an instance-specific map. - */ -uint16_t FreeTypeGX::cacheGlyphDataComplete(int16_t pixelSize) -{ - uint32_t i = 0; - FT_UInt gIndex; - - FT_ULong charCode = FT_Get_First_Char(ftFace, &gIndex); - while (gIndex != 0) - { - if (cacheGlyphData(charCode, pixelSize) != NULL) ++i; - charCode = FT_Get_Next_Char(ftFace, charCode, &gIndex); - } - return (uint16_t) (i); -} - -/** - * Loads the rendered bitmap into the relevant structure's data buffer. - * - * This routine does a simple byte-wise copy of the glyph's rendered 8-bit grayscale bitmap into the structure's buffer. - * Each byte is converted from the bitmap's intensity value into the a uint32_t RGBA value. - * - * @param bmp A pointer to the most recently rendered glyph's bitmap. - * @param charData A pointer to an allocated ftgxCharData structure whose data represent that of the last rendered glyph. - * - * - * Optimized for RGBA8 use by Dimok. - */ -void FreeTypeGX::loadGlyphData(FT_Bitmap *bmp, ftgxCharData *charData) -{ - int length = ALIGN32(((charData->textureWidth+3)>>2)*((charData->textureHeight+3)>>2)*32*2); - - uint8_t * glyphData = (uint8_t *) memalign(32, length); - if (!glyphData) return; - - memset(glyphData, 0x00, length); - - uint8_t *src = (uint8_t *) bmp->buffer; - uint32_t offset; - - for (int imagePosY = 0; imagePosY < bmp->rows; ++imagePosY) - { - for (int imagePosX = 0; imagePosX < bmp->width; ++imagePosX) - { - offset = (((((imagePosY >> 2) * (charData->textureWidth >> 2) + (imagePosX >> 2)) << 5) + ((imagePosY & 3) << 2) + (imagePosX & 3)) << 1); - glyphData[offset] = *src; - glyphData[offset + 1] = *src; - glyphData[offset + 32] = *src; - glyphData[offset + 33] = *src; - ++src; - } - } - DCFlushRange(glyphData, length); - - charData->glyphDataTexture = glyphData; -} - -/** - * Determines the x offset of the rendered string. - * - * This routine calculates the x offset of the rendered string based off of a supplied positional format parameter. - * - * @param width Current pixel width of the string. - * @param format Positional format of the string. - */ -int16_t FreeTypeGX::getStyleOffsetWidth(uint16_t width, uint16_t format) -{ - if (format & FTGX_JUSTIFY_LEFT) - return 0; - else if (format & FTGX_JUSTIFY_CENTER) - return -(width >> 1); - else if (format & FTGX_JUSTIFY_RIGHT) return -width; - return 0; -} - -/** - * Determines the y offset of the rendered string. - * - * This routine calculates the y offset of the rendered string based off of a supplied positional format parameter. - * - * @param offset Current pixel offset data of the string. - * @param format Positional format of the string. - */ -int16_t FreeTypeGX::getStyleOffsetHeight(int16_t format, uint16_t pixelSize) -{ - map::iterator itrAlign = ftgxAlign.find(pixelSize); - if (itrAlign == ftgxAlign.end()) return 0; - - switch (format & FTGX_ALIGN_MASK) - { - case FTGX_ALIGN_TOP: - return itrAlign->second.ascender; - - case FTGX_ALIGN_MIDDLE: - default: - return (itrAlign->second.ascender + itrAlign->second.descender + 1) >> 1; - - case FTGX_ALIGN_BOTTOM: - return itrAlign->second.descender; - - case FTGX_ALIGN_BASELINE: - return 0; - - case FTGX_ALIGN_GLYPH_TOP: - return itrAlign->second.max; - - case FTGX_ALIGN_GLYPH_MIDDLE: - return (itrAlign->second.max + itrAlign->second.min + 1) >> 1; - - case FTGX_ALIGN_GLYPH_BOTTOM: - return itrAlign->second.min; - } - return 0; -} - -/** - * Processes the supplied text string and prints the results at the specified coordinates. - * - * This routine processes each character of the supplied text string, loads the relevant preprocessed bitmap buffer, - * a texture from said buffer, and loads the resultant texture into the EFB. - * - * @param x Screen X coordinate at which to output the text. - * @param y Screen Y coordinate at which to output the text. Note that this value corresponds to the text string origin and not the top or bottom of the glyphs. - * @param text NULL terminated string to output. - * @param color Optional color to apply to the text characters. If not specified default value is ftgxWhite: (GXColor){0xff, 0xff, 0xff, 0xff} - * @param textStyle Flags which specify any styling which should be applied to the rendered string. - * @return The number of characters printed. - */ - -uint16_t FreeTypeGX::drawText(int16_t x, int16_t y, int16_t z, const wchar_t *text, int16_t pixelSize, GXColor color, - uint16_t textStyle, uint16_t textWidth, uint16_t widthLimit) -{ - if (!text) return 0; - - uint16_t fullTextWidth = textWidth > 0 ? textWidth : getWidth(text, pixelSize); - uint16_t x_pos = x, printed = 0; - uint16_t x_offset = 0, y_offset = 0; - GXTexObj glyphTexture; - FT_Vector pairDelta; - - if (textStyle & FTGX_JUSTIFY_MASK) - { - x_offset = getStyleOffsetWidth(fullTextWidth, textStyle); - } - if (textStyle & FTGX_ALIGN_MASK) - { - y_offset = getStyleOffsetHeight(textStyle, pixelSize); - } - - int i = 0; - - while (text[i]) - { - if (widthLimit > 0 && (x_pos - x) > widthLimit) break; - - ftgxCharData* glyphData = cacheGlyphData(text[i], pixelSize); - - if (glyphData != NULL) - { - if (ftKerningEnabled && i > 0) - { - FT_Get_Kerning(ftFace, fontData[pixelSize][text[i - 1]].glyphIndex, glyphData->glyphIndex, - FT_KERNING_DEFAULT, &pairDelta); - x_pos += pairDelta.x >> 6; - } - - GX_InitTexObj(&glyphTexture, glyphData->glyphDataTexture, glyphData->textureWidth, - glyphData->textureHeight, GX_TF_RGBA8, GX_CLAMP, GX_CLAMP, GX_FALSE); - copyTextureToFramebuffer(&glyphTexture, glyphData->textureWidth, glyphData->textureHeight, x_pos - + glyphData->renderOffsetX + x_offset, y - glyphData->renderOffsetY + y_offset, z, color); - - x_pos += glyphData->glyphAdvanceX; - ++printed; - } - ++i; - } - - if (textStyle & FTGX_STYLE_MASK) - { - getOffset(text, pixelSize, widthLimit); - drawTextFeature(x + x_offset, y + y_offset, z, pixelSize, fullTextWidth, &ftgxAlign[pixelSize], textStyle, - color); - } - - return printed; -} - -void FreeTypeGX::drawTextFeature(int16_t x, int16_t y, int16_t z, int16_t pixelSize, uint16_t width, - ftgxDataOffset *offsetData, uint16_t format, GXColor color) -{ - uint16_t featureHeight = pixelSize >> 4 > 0 ? pixelSize >> 4 : 1; - - if (format & FTGX_STYLE_UNDERLINE) this->copyFeatureToFramebuffer(width, featureHeight, x, y + 1, z, color); - - if (format & FTGX_STYLE_STRIKE) this->copyFeatureToFramebuffer(width, featureHeight, x, y - - ((offsetData->max) >> 1), z, color); -} - -/** - * Processes the supplied string and return the width of the string in pixels. - * - * This routine processes each character of the supplied text string and calculates the width of the entire string. - * Note that if precaching of the entire font set is not enabled any uncached glyph will be cached after the call to this function. - * - * @param text NULL terminated string to calculate. - * @return The width of the text string in pixels. - */ -uint16_t FreeTypeGX::getWidth(const wchar_t *text, int16_t pixelSize) -{ - if (!text) return 0; - - uint16_t strWidth = 0; - FT_Vector pairDelta; - - int i = 0; - while (text[i]) - { - ftgxCharData* glyphData = cacheGlyphData(text[i], pixelSize); - - if (glyphData != NULL) - { - if (ftKerningEnabled && (i > 0)) - { - FT_Get_Kerning(ftFace, fontData[pixelSize][text[i - 1]].glyphIndex, glyphData->glyphIndex, - FT_KERNING_DEFAULT, &pairDelta); - strWidth += pairDelta.x >> 6; - } - - strWidth += glyphData->glyphAdvanceX; - } - ++i; - } - return strWidth; -} - -/** - * Single char width - */ -uint16_t FreeTypeGX::getCharWidth(const wchar_t wChar, int16_t pixelSize, const wchar_t prevChar) -{ - uint16_t strWidth = 0; - ftgxCharData * glyphData = cacheGlyphData(wChar, pixelSize); - - if (glyphData != NULL) - { - if (ftKerningEnabled && prevChar != 0x0000) - { - FT_Vector pairDelta; - FT_Get_Kerning(ftFace, fontData[pixelSize][prevChar].glyphIndex, glyphData->glyphIndex, FT_KERNING_DEFAULT, - &pairDelta); - strWidth += pairDelta.x >> 6; - } - strWidth += glyphData->glyphAdvanceX; - } - - return strWidth; -} - -/** - * Processes the supplied string and return the height of the string in pixels. - * - * This routine processes each character of the supplied text string and calculates the height of the entire string. - * Note that if precaching of the entire font set is not enabled any uncached glyph will be cached after the call to this function. - * - * @param text NULL terminated string to calculate. - * @return The height of the text string in pixels. - */ -uint16_t FreeTypeGX::getHeight(const wchar_t *text, int16_t pixelSize) -{ - getOffset(text, pixelSize); - - return ftgxAlign[pixelSize].max - ftgxAlign[pixelSize].min; -} - -/** - * Get the maximum offset above and minimum offset below the font origin line. - * - * This function calculates the maximum pixel height above the font origin line and the minimum - * pixel height below the font origin line and returns the values in an addressible structure. - * - * @param text NULL terminated string to calculate. - * @param offset returns the max and min values above and below the font origin line - * - */ -void FreeTypeGX::getOffset(const wchar_t *text, int16_t pixelSize, uint16_t widthLimit) -{ - if (ftgxAlign.find(pixelSize) != ftgxAlign.end()) return; - - int16_t strMax = 0, strMin = 9999; - uint16_t currWidth = 0; - - int i = 0; - - while (text[i]) - { - if (widthLimit > 0 && currWidth >= widthLimit) break; - - ftgxCharData* glyphData = cacheGlyphData(text[i], pixelSize); - - if (glyphData != NULL) - { - strMax = glyphData->renderOffsetMax > strMax ? glyphData->renderOffsetMax : strMax; - strMin = glyphData->renderOffsetMin < strMin ? glyphData->renderOffsetMin : strMin; - currWidth += glyphData->glyphAdvanceX; - } - - ++i; - } - - if (ftPointSize != pixelSize) - { - ftPointSize = pixelSize; - FT_Set_Pixel_Sizes(ftFace, 0, ftPointSize); - } - - ftgxAlign[pixelSize].ascender = ftFace->size->metrics.ascender >> 6; - ftgxAlign[pixelSize].descender = ftFace->size->metrics.descender >> 6; - ftgxAlign[pixelSize].max = strMax; - ftgxAlign[pixelSize].min = strMin; -} - -/** - * Copies the supplied texture quad to the EFB. - * - * This routine uses the in-built GX quad builder functions to define the texture bounds and location on the EFB target. - * - * @param texObj A pointer to the glyph's initialized texture object. - * @param texWidth The pixel width of the texture object. - * @param texHeight The pixel height of the texture object. - * @param screenX The screen X coordinate at which to output the rendered texture. - * @param screenY The screen Y coordinate at which to output the rendered texture. - * @param color Color to apply to the texture. - */ -void FreeTypeGX::copyTextureToFramebuffer(GXTexObj *texObj, f32 texWidth, f32 texHeight, int16_t screenX, - int16_t screenY, int16_t screenZ, GXColor color) -{ - GX_LoadTexObj(texObj, GX_TEXMAP0); - GX_InvalidateTexAll(); - - GX_SetTevOp(GX_TEVSTAGE0, GX_MODULATE); - GX_SetVtxDesc(GX_VA_TEX0, GX_DIRECT); - - GX_Begin(GX_QUADS, this->vertexIndex, 4); - GX_Position3s16(screenX, screenY, screenZ); - GX_Color4u8(color.r, color.g, color.b, color.a); - GX_TexCoord2f32(0.0f, 0.0f); - - GX_Position3s16(texWidth + screenX, screenY, screenZ); - GX_Color4u8(color.r, color.g, color.b, color.a); - GX_TexCoord2f32(1.0f, 0.0f); - - GX_Position3s16(texWidth + screenX, texHeight + screenY, screenZ); - GX_Color4u8(color.r, color.g, color.b, color.a); - GX_TexCoord2f32(1.0f, 1.0f); - - GX_Position3s16(screenX, texHeight + screenY, screenZ); - GX_Color4u8(color.r, color.g, color.b, color.a); - GX_TexCoord2f32(0.0f, 1.0f); - GX_End(); - - GX_SetTevOp(GX_TEVSTAGE0, GX_PASSCLR); - GX_SetVtxDesc(GX_VA_TEX0, GX_NONE); -} - -/** - * Creates a feature quad to the EFB. - * - * This function creates a simple quad for displaying underline or strikeout text styling. - * - * @param featureWidth The pixel width of the quad. - * @param featureHeight The pixel height of the quad. - * @param screenX The screen X coordinate at which to output the quad. - * @param screenY The screen Y coordinate at which to output the quad. - * @param color Color to apply to the texture. - */ -void FreeTypeGX::copyFeatureToFramebuffer(f32 featureWidth, f32 featureHeight, int16_t screenX, int16_t screenY, - int16_t screenZ, GXColor color) -{ - GX_SetTevOp(GX_TEVSTAGE0, GX_PASSCLR); - GX_SetVtxDesc(GX_VA_TEX0, GX_NONE); - - GX_Begin(GX_QUADS, this->vertexIndex, 4); - GX_Position3s16(screenX, screenY, screenZ); - GX_Color4u8(color.r, color.g, color.b, color.a); - - GX_Position3s16(featureWidth + screenX, screenY, screenZ); - GX_Color4u8(color.r, color.g, color.b, color.a); - - GX_Position3s16(featureWidth + screenX, featureHeight + screenY, screenZ); - GX_Color4u8(color.r, color.g, color.b, color.a); - - GX_Position3s16(screenX, featureHeight + screenY, screenZ); - GX_Color4u8(color.r, color.g, color.b, color.a); - GX_End(); - - GX_SetTevOp(GX_TEVSTAGE0, GX_PASSCLR); - GX_SetVtxDesc(GX_VA_TEX0, GX_NONE); -} diff --git a/source/FreeTypeGX.h b/source/FreeTypeGX.h deleted file mode 100644 index 7b50215d..00000000 --- a/source/FreeTypeGX.h +++ /dev/null @@ -1,149 +0,0 @@ -/* - * FreeTypeGX is a wrapper class for libFreeType which renders a compiled - * FreeType parsable font into a GX texture for Wii homebrew development. - * Copyright (C) 2008 Armin Tamzarian - * Modified by Dimok, 2010 - * - * This file is part of FreeTypeGX. - * - * FreeTypeGX is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * FreeTypeGX is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with FreeTypeGX. If not, see . - */ - -#ifndef FREETYPEGX_H_ -#define FREETYPEGX_H_ - -#include -#include -#include FT_FREETYPE_H -#include FT_BITMAP_H - -#include -#include -#include -#include - -/*! \struct ftgxCharData_ - * - * Font face character glyph relevant data structure. - */ -typedef struct ftgxCharData_ -{ - int16_t renderOffsetX; /**< Texture X axis bearing offset. */ - uint16_t glyphAdvanceX; /**< Character glyph X coordinate advance in pixels. */ - uint32_t glyphIndex; /**< Charachter glyph index in the font face. */ - - uint16_t textureWidth; /**< Texture width in pixels/bytes. */ - uint16_t textureHeight; /**< Texture glyph height in pixels/bytes. */ - - int16_t renderOffsetY; /**< Texture Y axis bearing offset. */ - int16_t renderOffsetMax; /**< Texture Y axis bearing maximum value. */ - int16_t renderOffsetMin; /**< Texture Y axis bearing minimum value. */ - - uint8_t* glyphDataTexture; /**< Glyph texture bitmap data buffer. */ -} ftgxCharData; - -/*! \struct ftgxDataOffset_ - * - * Offset structure which hold both a maximum and minimum value. - */ -typedef struct ftgxDataOffset_ -{ - int16_t ascender; /**< Maximum data offset. */ - int16_t descender; /**< Minimum data offset. */ - int16_t max; /**< Maximum data offset. */ - int16_t min; /**< Minimum data offset. */ -} ftgxDataOffset; - -typedef struct ftgxCharData_ ftgxCharData; -typedef struct ftgxDataOffset_ ftgxDataOffset; - -#define _TEXT(t) L ## t /**< Unicode helper macro. */ - -#define FTGX_NULL 0x0000 -#define FTGX_JUSTIFY_LEFT 0x0001 -#define FTGX_JUSTIFY_CENTER 0x0002 -#define FTGX_JUSTIFY_RIGHT 0x0004 -#define FTGX_JUSTIFY_MASK 0x000f - -#define FTGX_ALIGN_TOP 0x0010 -#define FTGX_ALIGN_MIDDLE 0x0020 -#define FTGX_ALIGN_BOTTOM 0x0040 -#define FTGX_ALIGN_BASELINE 0x0080 -#define FTGX_ALIGN_GLYPH_TOP 0x0100 -#define FTGX_ALIGN_GLYPH_MIDDLE 0x0200 -#define FTGX_ALIGN_GLYPH_BOTTOM 0x0400 -#define FTGX_ALIGN_MASK 0x0ff0 - -#define FTGX_STYLE_UNDERLINE 0x1000 -#define FTGX_STYLE_STRIKE 0x2000 -#define FTGX_STYLE_MASK 0xf000 - -const GXColor ftgxWhite = ( GXColor ) -{ 0xff, 0xff, 0xff, 0xff}; /**< Constant color value used only to sanitize Doxygen documentation. */ - -wchar_t* charToWideChar(const char* p); - -/*! \class FreeTypeGX - * \brief Wrapper class for the libFreeType library with GX rendering. - * \author Armin Tamzarian - * \version 0.2.4 - * - * FreeTypeGX acts as a wrapper class for the libFreeType library. It supports precaching of transformed glyph data into - * a specified texture format. Rendering of the data to the EFB is accomplished through the application of high performance - * GX texture functions resulting in high throughput of string rendering. - */ -class FreeTypeGX -{ - private: - FT_Library ftLibrary; /**< FreeType FT_Library instance. */ - FT_Face ftFace; /**< FreeType reusable FT_Face typographic object. */ - int16_t ftPointSize; /**< Current set size of the rendered font. */ - bool ftKerningEnabled; /**< Flag indicating the availability of font kerning data. */ - uint8_t vertexIndex; /**< Vertex format descriptor index. */ - std::map > fontData; /**< Map which holds the glyph data structures for the corresponding characters in one size. */ - std::map ftgxAlign; /**< Map which holds the ascender and decender for different sizes. */ - - int16_t getStyleOffsetWidth(uint16_t width, uint16_t format); - int16_t getStyleOffsetHeight(int16_t format, uint16_t pixelSize); - - void unloadFont(); - ftgxCharData *cacheGlyphData(wchar_t charCode, int16_t pixelSize); - uint16_t cacheGlyphDataComplete(int16_t pixelSize); - void loadGlyphData(FT_Bitmap *bmp, ftgxCharData *charData); - - void setDefaultMode(); - - void drawTextFeature(int16_t x, int16_t y, int16_t z, int16_t pixelSize, uint16_t width, - ftgxDataOffset *offsetData, uint16_t format, GXColor color); - void copyTextureToFramebuffer(GXTexObj *texObj, f32 texWidth, f32 texHeight, int16_t screenX, int16_t screenY, - int16_t screenZ, GXColor color); - void copyFeatureToFramebuffer(f32 featureWidth, f32 featureHeight, int16_t screenX, int16_t screenY, - int16_t screenZ, GXColor color); - - public: - FreeTypeGX(const uint8_t* fontBuffer, FT_Long bufferSize); - ~FreeTypeGX(); - - void setVertexFormat(uint8_t vertexIndex); - - uint16_t drawText(int16_t x, int16_t y, int16_t z, const wchar_t *text, int16_t pixelSize, GXColor color = - ftgxWhite, uint16_t textStyling = FTGX_NULL, uint16_t textWidth = 0, uint16_t widthLimit = 0); - - uint16_t getWidth(const wchar_t *text, int16_t pixelSize); - uint16_t getCharWidth(const wchar_t wChar, int16_t pixelSize, const wchar_t prevChar = 0x0000); - uint16_t getHeight(const wchar_t *text, int16_t pixelSize); - void getOffset(const wchar_t *text, int16_t pixelSize, uint16_t widthLimit = 0); -}; - -#endif /* FREETYPEGX_H_ */ diff --git a/source/ImageOperations/TextureConverter.c b/source/ImageOperations/TextureConverter.c deleted file mode 100644 index 40347fe3..00000000 --- a/source/ImageOperations/TextureConverter.c +++ /dev/null @@ -1,617 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * TextureConverter.cpp - * - * for WiiXplorer 2010 - ***************************************************************************/ -#include -#include -#include "TextureConverter.h" - -#define cut_bounds(x, min, max) ( (x < min) ? min : (x > max) ? max : x ) -#define ALIGN(x) (((x) + 3) & ~3) -#define ALIGN32(x) (((x) + 31) & ~31) -#define coordsRGBA8(x, y, w) (((((y >> 2) * (w >> 2) + (x >> 2)) << 5) + ((y & 3) << 2) + (x & 3)) << 1) -#define datasizeRGBA8(w, h) ALIGN32(((w+3)>>2)*((h+3)>>2)*32*2) - -#define MAXWIDTH 1024.0f -#define MAXHEIGHT 768.0f - -static u16 avg(u16 w0, u16 w1, u16 c0, u16 c1) -{ - u16 a0, a1; - u16 a, c; - - a0 = c0 >> 11; - a1 = c1 >> 11; - a = (w0*a0 + w1*a1) / (w0 + w1); - c = a << 11; - - a0 = (c0 >> 5) & 63; - a1 = (c1 >> 5) & 63; - a = (w0*a0 + w1*a1) / (w0 + w1); - c |= a << 5; - - a0 = c0 & 31; - a1 = c1 & 31; - a = (w0*a0 + w1*a1) / (w0 + w1); - c |= a; - - return c; -} - -bool I4ToGD(const u8 * buffer, u32 width, u32 height, gdImagePtr * im) -{ - u32 x, y; - u32 x1, y1; - u32 iv; - - if(!buffer) - return false; - - *im = gdImageCreateTrueColor(width, height); - if(*im == 0) - return false; - - gdImageAlphaBlending(*im, 0); - gdImageSaveAlpha(*im, 1); - - for(iv = 0, y1 = 0; y1 < height; y1 += 8) - { - for(x1 = 0; x1 < width; x1 += 8) - { - for(y = y1; y < (y1 + 8); y++) - { - for(x = x1; x < (x1 + 8); x += 2, iv++) - { - if((x >= width) || (y >= height)) - continue; - - u8 oldpixel = buffer[iv]; - u8 b = (oldpixel >> 4) * 255 / 15; - u8 g = (oldpixel >> 4) * 255 / 15; - u8 r = (oldpixel >> 4) * 255 / 15; - u8 a = gdAlphaOpaque; - - gdImageSetPixel(*im, x, y, gdTrueColorAlpha(r, g, b, a)); - - r = (oldpixel & 0xF) * 255 / 15; - g = (oldpixel & 0xF) * 255 / 15; - b = (oldpixel & 0xF) * 255 / 15; - a = gdAlphaOpaque; - - gdImageSetPixel(*im, x+1, y, gdTrueColorAlpha(r, g, b, a)); - } - } - } - } - return true; -} - -bool IA4ToGD(const u8 * buffer, u32 width, u32 height, gdImagePtr * im) -{ - u32 x, y; - u32 x1, y1; - u32 iv; - - if(!buffer) - return false; - - *im = gdImageCreateTrueColor(width, height); - if(*im == 0) - return false; - - gdImageAlphaBlending(*im, 0); - gdImageSaveAlpha(*im, 1); - - for(iv = 0, y1 = 0; y1 < height; y1 += 4) - { - for(x1 = 0; x1 < width; x1 += 8) - { - for(y = y1; y < (y1 + 4); y++) - { - for(x = x1; x < (x1 + 8); x++) - { - u8 oldpixel = *(u8*)(buffer + (iv++)); - oldpixel = ~oldpixel; - - if((x >= width) || (y >= height)) - continue; - - u8 r = ((oldpixel & 0xF) * 255) / 15; - u8 g = ((oldpixel & 0xF) * 255) / 15; - u8 b = ((oldpixel & 0xF) * 255) / 15; - u8 a = ((oldpixel >> 4) * 255) / 15; - a = 127-127*a/255; - - gdImageSetPixel(*im, x+1, y, gdTrueColorAlpha(r, g, b, a)); - } - } - } - } - return true; -} - -bool I8ToGD(const u8 * buffer, u32 width, u32 height, gdImagePtr * im) -{ - u32 x, y; - u32 x1, y1; - u32 iv; - - if(!buffer) - return false; - - *im = gdImageCreateTrueColor(width, height); - if(*im == 0) - return false; - - gdImageAlphaBlending(*im, 0); - gdImageSaveAlpha(*im, 1); - - for(iv = 0, y1 = 0; y1 < height; y1 += 4) - { - for(x1 = 0; x1 < width; x1 += 8) - { - for(y = y1; y < (y1 + 4); y++) - { - for(x = x1; x < (x1 + 8); x++) - { - u8 pixel = *(u8*)(buffer + ((iv++) * 1)); - if((x >= width) || (y >= height)) - continue; - - u8 r = pixel; - u8 g = pixel; - u8 b = pixel; - u8 a = gdAlphaOpaque; - - gdImageSetPixel(*im, x, y, gdTrueColorAlpha(r, g, b, a)); - } - } - } - } - - return true; -} - -bool IA8ToGD(const u8 * buffer, u32 width, u32 height, gdImagePtr * im) -{ - u32 x, y; - u32 x1, y1; - u32 iv; - - if(!buffer) - return false; - - *im = gdImageCreateTrueColor(width, height); - if(*im == 0) - return false; - - gdImageAlphaBlending(*im, 0); - gdImageSaveAlpha(*im, 1); - - for(iv = 0, y1 = 0; y1 < height; y1 += 4) - { - for(x1 = 0; x1 < width; x1 += 4) - { - for(y = y1; y < (y1 + 4); y++) - { - for(x = x1; x < (x1 + 4); x++) - { - u16 oldpixel = *(u16*)(buffer + ((iv++) * 2)); - - if((x >= width) || (y >= height)) - continue; - - u8 r = oldpixel >> 8; - u8 g = oldpixel >> 8; - u8 b = oldpixel >> 8; - u8 a = oldpixel & 0xFF; - a = 127-127*a/255; - - gdImageSetPixel(*im, x+1, y, gdTrueColorAlpha(r, g, b, a)); - } - } - } - } - return true; -} - -bool CMPToGD(const u8* buffer, u32 width, u32 height, gdImagePtr * im) -{ - u32 x, y; - u8 r, g, b, a; - u16 raw; - u16 c[4]; - int x0, x1, x2, y0, y1, y2, off; - int ww = (-(-(width) & -(8))); - int ix; - u32 px; - - if(!buffer) - return false; - - *im = gdImageCreateTrueColor(width, height); - if(*im == 0) - return false; - - gdImageAlphaBlending(*im, 0); - gdImageSaveAlpha(*im, 1); - - for (y = 0; y < height; y++) - { - for (x = 0; x < width; x++) - { - x0 = x & 3; - x1 = (x >> 2) & 1; - x2 = x >> 3; - y0 = y & 3; - y1 = (y >> 2) & 1; - y2 = y >> 3; - off = (8 * x1) + (16 * y1) + (32 * x2) + (4 * ww * y2); - - c[0] = *(u16*)(buffer + off); - c[1] = *(u16*)(buffer + off + 2); - if (c[0] > c[1]) { - c[2] = avg(2, 1, c[0], c[1]); - c[3] = avg(1, 2, c[0], c[1]); - } else { - c[2] = avg(1, 1, c[0], c[1]); - c[3] = 0; - } - - px = *(u32*)(buffer + off + 4); - ix = x0 + (4 * y0); - raw = c[(px >> (30 - (2 * ix))) & 3]; - - r = (raw >> 8) & 0xf8; - g = (raw >> 3) & 0xf8; - b = (raw << 3) & 0xf8; - a = gdAlphaOpaque; - - gdImageSetPixel(*im, x, y, gdTrueColorAlpha(r, g, b, a)); - } - } - - return true; -} - -bool RGB565ToGD(const u8* buffer, u32 width, u32 height, gdImagePtr * im) -{ - u32 x, y; - u32 x1, y1; - u32 iv; - - if(!buffer) - return false; - - *im = gdImageCreateTrueColor(width, height); - if(*im == 0) - return false; - - gdImageAlphaBlending(*im, 0); - gdImageSaveAlpha(*im, 1); - - for(iv = 0, y1 = 0; y1 < height; y1 += 4) - { - for(x1 = 0; x1 < width; x1 += 4) - { - for(y = y1; y < (y1 + 4); y++) - { - for(x = x1; x < (x1 + 4); x++) - { - if((x >= width) || (y >= height)) - continue; - - u16 pixel = *(u16*)(buffer + ((iv++) * 2)); - - u8 r = ((pixel >> 11) & 0x1F) << 3; - u8 g = ((pixel >> 5) & 0x3F) << 2; - u8 b = ((pixel >> 0) & 0x1F) << 3; - u8 a = gdAlphaOpaque; - - gdImageSetPixel(*im, x, y, gdTrueColorAlpha(r, g, b, a)); - } - } - } - } - return true; -} - -bool RGB565A3ToGD(const u8* buffer, u32 width, u32 height, gdImagePtr * im) -{ - u32 x, y; - u32 x1, y1; - u32 iv; - - if(!buffer) - return false; - - *im = gdImageCreateTrueColor(width, height); - if(*im == 0) - return false; - - gdImageAlphaBlending(*im, 0); - gdImageSaveAlpha(*im, 1); - - for(iv = 0, y1 = 0; y1 < height; y1 += 4) - { - for(x1 = 0; x1 < width; x1 += 4) - { - for(y = y1; y < (y1 + 4); y++) - { - for(x = x1; x < (x1 + 4); x++) - { - u16 pixel = *(u16*)(buffer + ((iv++) * 2)); - if((x >= width) || (y >= height)) - continue; - - if(pixel & (1 << 15)) - { - // RGB5 - u8 r = (((pixel >> 10) & 0x1F) * 255) / 31; - u8 g = (((pixel >> 5) & 0x1F) * 255) / 31; - u8 b = (((pixel >> 0) & 0x1F) * 255) / 31; - u8 a = gdAlphaOpaque; - - gdImageSetPixel(*im, x, y, gdTrueColorAlpha(r, g, b, a)); - } - else - { - // RGB4A3 - u8 r = (((pixel >> 12) & 0xF) * 255) / 15; - u8 g = (((pixel >> 8) & 0xF) * 255) / 15; - u8 b = (((pixel >> 4) & 0xF) * 255) / 15; - u8 a = (((pixel >> 0) & 0x7) * 64) / 7; - a = 127-127*a/255; - - gdImageSetPixel(*im, x, y, gdTrueColorAlpha(r, g, b, a)); - } - } - } - } - } - - return true; -} - -bool RGBA8ToGD(const u8* buffer, u32 width, u32 height, gdImagePtr * im) -{ - u32 x, y, offset; - u8 r, g, b, a; - - if(!buffer) - return false; - - *im = gdImageCreateTrueColor(width, height); - if(*im == 0) - return false; - - gdImageAlphaBlending(*im, 0); - gdImageSaveAlpha(*im, 1); - - for(y = 0; y < height; y++) - { - for(x = 0; x < width; x++) - { - offset = coordsRGBA8(x, y, width); - a = *(buffer+offset); - r = *(buffer+offset+1); - g = *(buffer+offset+32); - b = *(buffer+offset+33); - - a = 127-127*a/255; - - gdImageSetPixel(*im, x, y, gdTrueColorAlpha(r, g, b, a)); - } - } - - return true; -} - -bool YCbYCrToGD(const u8* buffer, u32 width, u32 height, gdImagePtr * im) -{ - u32 x, y, x1, YCbYCr; - int r, g, b; - u8 r1, g1, b1; - - if(!buffer) - return false; - - *im = gdImageCreateTrueColor(width, height); - if(*im == 0) - return false; - - gdImageAlphaBlending(*im, 0); - gdImageSaveAlpha(*im, 1); - - for(y = 0; y < height; y++) - { - for (x = 0, x1 = 0; x < (width / 2); x++, x1++) - { - YCbYCr = ((u32 *) buffer)[y*width/2+x]; - - u8 * val = (u8 *) &YCbYCr; - - r = (int) (1.371f * (val[3] - 128)); - g = (int) (- 0.698f * (val[3] - 128) - 0.336f * (val[1] - 128)); - b = (int) (1.732f * (val[1] - 128)); - - r1 = cut_bounds(val[0] + r, 0, 255); - g1 = cut_bounds(val[0] + g, 0, 255); - b1 = cut_bounds(val[0] + b, 0, 255); - - gdImageSetPixel(*im, x1, y, gdTrueColorAlpha(r1, g1, b1, gdAlphaOpaque)); - x1++; - - r1 = cut_bounds(val[2] + r, 0, 255); - g1 = cut_bounds(val[2] + g, 0, 255); - b1 = cut_bounds(val[2] + b, 0, 255); - gdImageSetPixel(*im, x1, y, gdTrueColorAlpha(r1, g1, b1, gdAlphaOpaque)); - } - } - - return true; -} - -u8 * GDImageToRGBA8(gdImagePtr * gdImg, int * w, int * h) -{ - int width = gdImageSX(*gdImg); - int height = gdImageSY(*gdImg); - float scale = 1.0f; - int retries = 100; //shouldn't need that long but to be sure - - gdImageAlphaBlending(*gdImg, 0); - gdImageSaveAlpha(*gdImg, 1); - - while(width*scale > MAXWIDTH || height*scale > MAXHEIGHT) - { - if(width*scale > MAXWIDTH) - scale = MAXWIDTH/width; - if(height*scale > MAXHEIGHT) - scale = MAXHEIGHT/height; - - retries--; - - if(!retries) - { - while(width*scale > MAXWIDTH || height*scale > MAXHEIGHT) - scale -= 0.02; - break; - } - } - - width = ALIGN((int) (width * scale)); - height = ALIGN((int) (height * scale)); - - if(width != gdImageSX(*gdImg) || height != gdImageSY(*gdImg)) - { - gdImagePtr dst = gdImageCreateTrueColor(width, height); - gdImageAlphaBlending(dst, 0); - gdImageSaveAlpha(dst, 1); - gdImageCopyResized(dst, *gdImg, 0, 0, 0, 0, width, height, gdImageSX(*gdImg), gdImageSY(*gdImg)); - - gdImageDestroy(*gdImg); - *gdImg = dst; - - width = gdImageSX(*gdImg); - height = gdImageSY(*gdImg); - } - - int len = datasizeRGBA8(width, height); - - u8 * data = (u8 *) memalign(32, len); - if(!data) - return NULL; - - u8 a; - int x, y; - u32 pixel, offset; - - for(y = 0; y < height; ++y) - { - for(x = 0; x < width; ++x) - { - pixel = gdImageGetPixel(*gdImg, x, y); - - a = 254 - 2*((u8)gdImageAlpha(*gdImg, pixel)); - if(a == 254) a++; - - offset = coordsRGBA8(x, y, width); - data[offset] = a; - data[offset+1] = (u8)gdImageRed(*gdImg, pixel); - data[offset+32] = (u8)gdImageGreen(*gdImg, pixel); - data[offset+33] = (u8)gdImageBlue(*gdImg, pixel); - } - } - - DCFlushRange(data, len); - - if(w) - *w = width; - if(h) - *h = height; - - return data; -} - -u8 * FlipRGBAImage(const u8 *src, u32 width, u32 height) -{ - u32 x, y; - - int len = datasizeRGBA8(width, height); - - u8 * data = memalign(32, len); - if(!data) - return NULL; - - for (y = 0; y < height; y++) - { - for (x = 0; x < width; x++) - { - u32 offset = coordsRGBA8(x, y, width); - u8 a = src[offset]; - u8 r = src[offset+1]; - u8 g = src[offset+32]; - u8 b = src[offset+33]; - - u32 offset2 = coordsRGBA8((width-x-1), (height-y-1), width); - data[offset2] = a; - data[offset2+1] = r; - data[offset2+32] = g; - data[offset2+33] = b; - } - } - - DCFlushRange(data, len); - - return data; -} - -u8 * RGB8ToRGBA8(const u8 *src, u32 width, u32 height) -{ - u32 x, y, offset; - - int len = datasizeRGBA8(width, height); - - u8 * dst = (u8 *) memalign(32, len); - if(!dst) - return NULL; - - for (y = 0; y < height; ++y) - { - for (x = 0; x < width; ++x) - { - offset = coordsRGBA8(x, y, width); - dst[offset] = 0xFF; - dst[offset+1] = src[(y*width+x)*3]; - dst[offset+32] = src[(y*width+x)*3+1]; - dst[offset+33] = src[(y*width+x)*3+2]; - } - } - - DCFlushRange(dst, len); - - return dst; -} diff --git a/source/ImageOperations/TextureConverter.h b/source/ImageOperations/TextureConverter.h deleted file mode 100644 index cfbac302..00000000 --- a/source/ImageOperations/TextureConverter.h +++ /dev/null @@ -1,57 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * TextureConverter.h - * - * A texture to GD image converter. - * for WiiXplorer 2010 - ***************************************************************************/ -#ifndef __TEXTURE_CONVERTER_H_ -#define __TEXTURE_CONVERTER_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include - -bool I4ToGD(const u8 * buffer, u32 width, u32 height, gdImagePtr * im); -bool IA4ToGD(const u8 * buffer, u32 width, u32 height, gdImagePtr * im); -bool I8ToGD(const u8 * buffer, u32 width, u32 height, gdImagePtr * im); -bool IA8ToGD(const u8 * buffer, u32 width, u32 height, gdImagePtr * im); -bool CMPToGD(const u8* buffer, u32 width, u32 height, gdImagePtr * im); -bool RGB565ToGD(const u8* buffer, u32 width, u32 height, gdImagePtr * im); -bool RGB565A3ToGD(const u8* buffer, u32 width, u32 height, gdImagePtr * im); -bool RGBA8ToGD(const u8* buffer, u32 width, u32 height, gdImagePtr * im); -bool YCbYCrToGD(const u8* buffer, u32 width, u32 height, gdImagePtr * im); -u8 * GDImageToRGBA8(gdImagePtr * gdImg, int * w, int * h); -u8 * FlipRGBAImage(const u8 *src, u32 width, u32 height); -u8 * RGB8ToRGBA8(const u8 *src, u32 width, u32 height); - -#ifdef __cplusplus -} -#endif - -#endif //__TEXTURE_CONVERTER_H_ diff --git a/source/ImageOperations/TplImage.cpp b/source/ImageOperations/TplImage.cpp deleted file mode 100644 index 145dd0cd..00000000 --- a/source/ImageOperations/TplImage.cpp +++ /dev/null @@ -1,244 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * TplImage.cpp - * - * for WiiXplorer 2010 - ***************************************************************************/ -#include -#include -#include -#include "FileOperations/fileops.h" -#include "TextureConverter.h" -#include "TplImage.h" - -TplImage::TplImage(const char * filepath) -{ - TPLBuffer = NULL; - TPLSize = 0; - - u8 * buffer = NULL; - u64 filesize = 0; - LoadFileToMem(filepath, &buffer, &filesize); - - if(buffer) - { - LoadImage(buffer, filesize); - free(buffer); - } -} - -TplImage::TplImage(const u8 * imgBuffer, u32 imgSize) -{ - TPLBuffer = NULL; - TPLSize = 0; - - if(imgBuffer) - { - LoadImage(imgBuffer, imgSize); - } -} - -TplImage::~TplImage() -{ - if(TPLBuffer) - free(TPLBuffer); - - Texture.clear(); - TextureHeader.clear(); - TplTextureBuffer.clear(); -} - -bool TplImage::LoadImage(const u8 * imgBuffer, u32 imgSize) -{ - if(TPLBuffer) - free(TPLBuffer); - - TPLBuffer = NULL; - TPLSize = 0; - - if(!imgBuffer) - return false; - - TPLBuffer = (u8 *) malloc(imgSize); - if(!TPLBuffer) - return false; - - TPLSize = imgSize; - - memcpy(TPLBuffer, imgBuffer, imgSize); - - return ParseTplFile(); -} - -bool TplImage::ParseTplFile() -{ - if(!TPLBuffer) - return false; - - TPLHeader = (const TPL_Header *) TPLBuffer; - - if(TPLHeader->magic != 0x0020AF30) - return false; - - if(TPLHeader->head_size != 12) - return false; - - const TPL_Texture * curTexture = (const TPL_Texture *) (TPLHeader+1); - - for(u32 i = 0; i < TPLHeader->num_textures; i++) - { - Texture.resize(i+1); - TextureHeader.resize(i+1); - TplTextureBuffer.resize(i+1); - - Texture[i] = curTexture; - - TextureHeader[i] = (const TPL_Texture_Header *) ((const u8 *) TPLBuffer+Texture[i]->text_header_offset); - - TplTextureBuffer[i] = TPLBuffer + TextureHeader[i]->offset; - - curTexture++; - } - - return true; - -} - -int TplImage::GetWidth(int pos) -{ - if(pos < 0 || pos >= (int) Texture.size()) - { - return 0; - } - - return TextureHeader[pos]->width; -} - -int TplImage::GetHeight(int pos) -{ - if(pos < 0 || pos >= (int) TextureHeader.size()) - { - return 0; - } - - return TextureHeader[pos]->height; -} - -u32 TplImage::GetFormat(int pos) -{ - if(pos < 0 || pos >= (int) TextureHeader.size()) - { - return 0; - } - - return TextureHeader[pos]->format; -} - -const u8 * TplImage::GetTextureBuffer(int pos) -{ - if(pos < 0 || pos >= (int) TplTextureBuffer.size()) - { - return 0; - } - - return TplTextureBuffer[pos]; -} - -int TplImage::GetTextureSize(int pos) -{ - int width = GetWidth(pos); - int height = GetHeight(pos); - int len = 0; - - switch(GetFormat(pos)) - { - case GX_TF_I4: - case GX_TF_CI4: - case GX_TF_CMPR: - len = ((width+7)>>3)*((height+7)>>3)*32; - break; - case GX_TF_I8: - case GX_TF_IA4: - case GX_TF_CI8: - len = ((width+7)>>3)*((height+7)>>2)*32; - break; - case GX_TF_IA8: - case GX_TF_CI14: - case GX_TF_RGB565: - case GX_TF_RGB5A3: - len = ((width+3)>>2)*((height+3)>>2)*32; - break; - case GX_TF_RGBA8: - len = ((width+3)>>2)*((height+3)>>2)*32*2; - break; - default: - len = ((width+3)>>2)*((height+3)>>2)*32*2; - break; - } - - return len; -} - -gdImagePtr TplImage::ConvertToGD(int pos) -{ - if(pos < 0 || pos >= (int) Texture.size()) - { - return 0; - } - - gdImagePtr gdImg = 0; - - switch(TextureHeader[pos]->format) - { - case GX_TF_RGB565: - RGB565ToGD(TplTextureBuffer[pos], TextureHeader[pos]->width, TextureHeader[pos]->height, &gdImg); - break; - case GX_TF_RGB5A3: - RGB565A3ToGD(TplTextureBuffer[pos], TextureHeader[pos]->width, TextureHeader[pos]->height, &gdImg); - break; - case GX_TF_RGBA8: - RGBA8ToGD(TplTextureBuffer[pos], TextureHeader[pos]->width, TextureHeader[pos]->height, &gdImg); - break; - case GX_TF_I4: - I4ToGD(TplTextureBuffer[pos], TextureHeader[pos]->width, TextureHeader[pos]->height, &gdImg); - break; - case GX_TF_I8: - I8ToGD(TplTextureBuffer[pos], TextureHeader[pos]->width, TextureHeader[pos]->height, &gdImg); - break; - case GX_TF_IA4: - IA4ToGD(TplTextureBuffer[pos], TextureHeader[pos]->width, TextureHeader[pos]->height, &gdImg); - break; - case GX_TF_IA8: - IA8ToGD(TplTextureBuffer[pos], TextureHeader[pos]->width, TextureHeader[pos]->height, &gdImg); - break; - case GX_TF_CMPR: - CMPToGD(TplTextureBuffer[pos], TextureHeader[pos]->width, TextureHeader[pos]->height, &gdImg); - break; - default: - gdImg = 0; - break; - } - - return gdImg; -} diff --git a/source/ImageOperations/TplImage.h b/source/ImageOperations/TplImage.h deleted file mode 100644 index 6f85a753..00000000 --- a/source/ImageOperations/TplImage.h +++ /dev/null @@ -1,98 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * TplImage.h - * - * for WiiXplorer 2010 - ***************************************************************************/ -#ifndef TPL_IMAGE_H_ -#define TPL_IMAGE_H_ - -#include -#include -#include - -typedef struct -{ - u32 magic; - u32 num_textures; - u32 head_size; -} TPL_Header; - -typedef struct -{ - u32 text_header_offset; - u32 text_palette_offset; -} TPL_Texture; - -typedef struct -{ - u16 height; - u16 width; - u32 format; - u32 offset; - u32 wrap_s; - u32 wrap_t; - u32 min; - u32 mag; - f32 lod_bias; - u8 edge_lod; - u8 min_lod; - u8 max_lod; - u8 unpacked; -} TPL_Texture_Header; - -typedef struct -{ - u16 num_items; - u8 unpacked; - u8 pad; - u32 format; - u32 offset; -} TPL_Palette_Header; - -class TplImage -{ - public: - TplImage(const char * filepath); - TplImage(const u8 * imgBuffer, u32 imgSize); - ~TplImage(); - bool LoadImage(const u8 * imgBuffer, u32 imgSize); - int GetWidth(int Texture); - int GetHeight(int Texture); - u32 GetFormat(int Texture); - const u8 * GetTextureBuffer(int Texture); - int GetTextureSize(int Texture); - gdImagePtr ConvertToGD(int Texture); - private: - bool ParseTplFile(); - - u8 * TPLBuffer; - u32 TPLSize; - const TPL_Header * TPLHeader; - std::vector Texture; - std::vector TextureHeader; - std::vector TplTextureBuffer; -}; - -#endif diff --git a/source/SoundOperations/AifDecoder.cpp b/source/SoundOperations/AifDecoder.cpp deleted file mode 100644 index 3fa2f2b8..00000000 --- a/source/SoundOperations/AifDecoder.cpp +++ /dev/null @@ -1,214 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#include -#include -#include "AifDecoder.hpp" - -typedef struct -{ - u32 fccCOMM; - u32 size; - u16 channels; - u8 frames[4]; - u16 bps; - u8 freq[10]; -} SAIFFCommChunk; - -typedef struct -{ - u32 fccSSND; - u32 size; - u32 offset; - u32 blockSize; -} SAIFFSSndChunk; - -// ------ -// Copyright (C) 1988-1991 Apple Computer, Inc. -#ifndef HUGE_VAL -# define HUGE_VAL HUGE -#endif - -# define UnsignedToFloat(u) (((double)((long)(u - 2147483647L - 1))) + 2147483648.0) - -static double ConvertFromIeeeExtended(const unsigned char* bytes) -{ - double f; - int expon; - unsigned long hiMant, loMant; - - expon = ((bytes[0] & 0x7F) << 8) | (bytes[1] & 0xFF); - hiMant = ((unsigned long)(bytes[2] & 0xFF) << 24) - | ((unsigned long)(bytes[3] & 0xFF) << 16) - | ((unsigned long)(bytes[4] & 0xFF) << 8) - | ((unsigned long)(bytes[5] & 0xFF)); - loMant = ((unsigned long)(bytes[6] & 0xFF) << 24) - | ((unsigned long)(bytes[7] & 0xFF) << 16) - | ((unsigned long)(bytes[8] & 0xFF) << 8) - | ((unsigned long)(bytes[9] & 0xFF)); - - if (expon == 0 && hiMant == 0 && loMant == 0) { - f = 0; - } - else { - if (expon == 0x7FFF) { - f = HUGE_VAL; - } - else { - expon -= 16383; - f = ldexp(UnsignedToFloat(hiMant), expon-=31); - f += ldexp(UnsignedToFloat(loMant), expon-=32); - } - } - - if (bytes[0] & 0x80) - return -f; - else - return f; -} - -AifDecoder::AifDecoder(const char * filepath) - : SoundDecoder(filepath) -{ - SoundType = SOUND_AIF; - - if(!file_fd) - return; - - OpenFile(); -} - -AifDecoder::AifDecoder(const u8 * snd, int len) - : SoundDecoder(snd, len) -{ - SoundType = SOUND_AIF; - - if(!file_fd) - return; - - OpenFile(); -} - -AifDecoder::~AifDecoder() -{ -} - -void AifDecoder::OpenFile() -{ - SWaveHdr Header; - file_fd->read((u8 *) &Header, sizeof(SWaveHdr)); - - if (Header.magicRIFF != 'FORM') - { - CloseFile(); - return; - } - else if(Header.magicWAVE != 'AIFF') - { - CloseFile(); - return; - } - - SWaveChunk WaveChunk; - do - { - int ret = file_fd->read((u8 *) &WaveChunk, sizeof(SWaveChunk)); - if(ret <= 0) - { - CloseFile(); - return; - } - } - while(WaveChunk.magicDATA != 'COMM'); - - DataOffset = file_fd->tell()+WaveChunk.size; - - SAIFFCommChunk CommHdr; - file_fd->seek(file_fd->tell()-sizeof(SWaveChunk), SEEK_SET); - file_fd->read((u8 *) &CommHdr, sizeof(SAIFFCommChunk)); - - if(CommHdr.fccCOMM != 'COMM') - { - CloseFile(); - return; - } - - file_fd->seek(DataOffset, SEEK_SET); - - SAIFFSSndChunk SSndChunk; - file_fd->read((u8 *) &SSndChunk, sizeof(SAIFFSSndChunk)); - - if(SSndChunk.fccSSND != 'SSND') - { - CloseFile(); - return; - } - - DataOffset += sizeof(SAIFFSSndChunk); - DataSize = SSndChunk.size-8; - SampleRate = (u32) ConvertFromIeeeExtended(CommHdr.freq); - Format = VOICE_STEREO_16BIT; - - if(CommHdr.channels == 1 && CommHdr.bps == 8) - Format = VOICE_MONO_8BIT; - else if (CommHdr.channels == 1 && CommHdr.bps == 16) - Format = VOICE_MONO_16BIT; - else if (CommHdr.channels == 2 && CommHdr.bps == 8) - Format = VOICE_STEREO_8BIT; - else if (CommHdr.channels == 2 && CommHdr.bps == 16) - Format = VOICE_STEREO_16BIT; - - Decode(); -} - -void AifDecoder::CloseFile() -{ - if(file_fd) - delete file_fd; - - file_fd = NULL; -} - -int AifDecoder::Read(u8 * buffer, int buffer_size, int pos) -{ - if(!file_fd) - return -1; - - if(CurPos >= (int) DataSize) - return 0; - - file_fd->seek(DataOffset+CurPos, SEEK_SET); - - if(buffer_size > (int) DataSize-CurPos) - buffer_size = DataSize-CurPos; - - int read = file_fd->read(buffer, buffer_size); - if(read > 0) - { - CurPos += read; - } - - return read; -} diff --git a/source/SoundOperations/AifDecoder.hpp b/source/SoundOperations/AifDecoder.hpp deleted file mode 100644 index f9c6fd91..00000000 --- a/source/SoundOperations/AifDecoder.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#ifndef AIFDECODER_HPP_ -#define AIFDECODER_HPP_ - -#include "SoundDecoder.hpp" -#include "WavDecoder.hpp" - -class AifDecoder : public SoundDecoder -{ - public: - AifDecoder(const char * filepath); - AifDecoder(const u8 * snd, int len); - ~AifDecoder(); - int GetFormat() { return Format; }; - int GetSampleRate() { return SampleRate; }; - int Read(u8 * buffer, int buffer_size, int pos); - protected: - void OpenFile(); - void CloseFile(); - u32 DataOffset; - u32 DataSize; - u32 SampleRate; - u8 Format; -}; - -#endif diff --git a/source/SoundOperations/BNSDecoder.cpp b/source/SoundOperations/BNSDecoder.cpp deleted file mode 100644 index e79a2442..00000000 --- a/source/SoundOperations/BNSDecoder.cpp +++ /dev/null @@ -1,363 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#include -#include -#include -#include -#include "BNSDecoder.hpp" - -BNSDecoder::BNSDecoder(const char * filepath) - : SoundDecoder(filepath) -{ - SoundType = SOUND_BNS; - memset(&SoundData, 0, sizeof(SoundBlock)); - - if(!file_fd) - return; - - OpenFile(); -} - -BNSDecoder::BNSDecoder(const u8 * snd, int len) - : SoundDecoder(snd, len) -{ - SoundType = SOUND_BNS; - memset(&SoundData, 0, sizeof(SoundBlock)); - - if(!file_fd) - return; - - OpenFile(); -} - -BNSDecoder::~BNSDecoder() -{ - ExitRequested = true; - while(Decoding) - usleep(100); - - if(SoundData.buffer != NULL) - free(SoundData.buffer); - - SoundData.buffer = NULL; -} - -void BNSDecoder::OpenFile() -{ - u8 * tempbuff = new (std::nothrow) u8[file_fd->size()]; - if(!tempbuff) - { - CloseFile(); - return; - } - - int done = 0; - - while(done < file_fd->size()) - { - int read = file_fd->read(tempbuff, file_fd->size()); - if(read > 0) - done += read; - else - { - CloseFile(); - return; - } - } - - SoundData = DecodefromBNS(tempbuff, done); - if(SoundData.buffer == NULL) - { - CloseFile(); - return; - } - - delete [] tempbuff; - tempbuff = NULL; - - Decode(); -} - -void BNSDecoder::CloseFile() -{ - if(file_fd) - delete file_fd; - - file_fd = NULL; -} - -int BNSDecoder::Read(u8 * buffer, int buffer_size, int pos) -{ - if(!SoundData.buffer) - return -1; - - if(SoundData.loopFlag) - { - int factor = SoundData.format == VOICE_STEREO_16BIT ? 4 : 2; - if(CurPos >= (int) SoundData.loopEnd*factor) - CurPos = SoundData.loopStart*factor; - - if(buffer_size > (int) SoundData.loopEnd*factor-CurPos) - buffer_size = SoundData.loopEnd*factor-CurPos; - } - else - { - if(CurPos >= (int) SoundData.size) - return 0; - - if(buffer_size > (int) SoundData.size-CurPos) - buffer_size = SoundData.size-CurPos; - } - - memcpy(buffer, SoundData.buffer+CurPos, buffer_size); - CurPos += buffer_size; - - return buffer_size; -} - -struct BNSHeader -{ - u32 fccBNS; - u32 magic; - u32 size; - u16 unk1; - u16 unk2; - u32 infoOffset; - u32 infoSize; - u32 dataOffset; - u32 dataSize; -} __attribute__((packed)); - -struct BNSInfo -{ - u32 fccINFO; - u32 size; - u8 codecNum; - u8 loopFlag; - u8 chanCount; - u8 zero; - u16 freq; - u8 pad1[2]; - u32 loopStart; - u32 loopEnd; - u32 offsetToChanStarts; - u8 pad2[4]; - u32 chan1StartOffset; - u32 chan2StartOffset; - u32 chan1Start; - u32 coeff1Offset; - u8 pad3[4]; - u32 chan2Start; - u32 coeff2Offset; - u8 pad4[4]; - s16 coefficients1[8][2]; - u16 chan1Gain; - u16 chan1PredictiveScale; - s16 chan1PrevSamples[2]; - u16 chan1LoopPredictiveScale; - s16 chan1LoopPrevSamples[2]; - u16 chan1LoopPadding; - s16 coefficients2[8][2]; - u16 chan2Gain; - u16 chan2PredictiveScale; - s16 chan2PrevSamples[2]; - u16 chan2LoopPredictiveScale; - s16 chan2LoopPrevSamples[2]; - u16 chan2LoopPadding; -} __attribute__((packed)); - -struct BNSData -{ - u32 fccDATA; - u32 size; - u8 data; -} __attribute__((packed)); - -struct ADPCMByte -{ - s8 sample1 : 4; - s8 sample2 : 4; -} __attribute__((packed)); - -struct BNSADPCMBlock -{ - u8 pad : 1; - u8 coeffIndex : 3; - u8 lshift : 4; - ADPCMByte samples[7]; -} __attribute__((packed)); - -struct BNSDecObj -{ - s16 prevSamples[2]; - s16 coeff[8][2]; -}; - -static void loadBNSInfo(BNSInfo &bnsInfo, const u8 *buffer) -{ - const u8 *ptr = buffer + 8; - bnsInfo = *(const BNSInfo *)buffer; - if (bnsInfo.offsetToChanStarts == 0x18 && bnsInfo.chan1StartOffset == 0x20 && bnsInfo.chan2StartOffset == 0x2C - && bnsInfo.coeff1Offset == 0x38 && bnsInfo.coeff2Offset == 0x68) - return; - bnsInfo.chan1StartOffset = *(const u32 *)(ptr + bnsInfo.offsetToChanStarts); - bnsInfo.chan1Start = *(const u32 *)(ptr + bnsInfo.chan1StartOffset); - bnsInfo.coeff1Offset = *(const u32 *)(ptr + bnsInfo.chan1StartOffset + 4); - if ((u8 *)bnsInfo.coefficients1 != ptr + bnsInfo.coeff1Offset) - memcpy(bnsInfo.coefficients1, ptr + bnsInfo.coeff1Offset, (u8 *)bnsInfo.coefficients2 - (u8 *)&bnsInfo.coefficients1); - if (bnsInfo.chanCount == 2) - { - bnsInfo.chan2StartOffset = *(const u32 *)(ptr + bnsInfo.offsetToChanStarts + 4); - bnsInfo.chan2Start = *(const u32 *)(ptr + bnsInfo.chan2StartOffset); - bnsInfo.coeff2Offset = *(const u32 *)(ptr + bnsInfo.chan2StartOffset + 4); - if ((u8 *)bnsInfo.coefficients2 != ptr + bnsInfo.coeff2Offset) - memcpy(bnsInfo.coefficients2, ptr + bnsInfo.coeff2Offset, (u8 *)bnsInfo.coefficients2 - (u8 *)&bnsInfo.coefficients1); - } -} - -static void decodeADPCMBlock(s16 *buffer, const BNSADPCMBlock &block, BNSDecObj &bnsDec) -{ - int h1 = bnsDec.prevSamples[0]; - int h2 = bnsDec.prevSamples[1]; - int c1 = bnsDec.coeff[block.coeffIndex][0]; - int c2 = bnsDec.coeff[block.coeffIndex][1]; - for (int i = 0; i < 14; ++i) - { - int nibSample = ((i & 1) == 0) ? block.samples[i / 2].sample1 : block.samples[i / 2].sample2; - int sampleDeltaHP = (nibSample << block.lshift) << 11; - int predictedSampleHP = c1 * h1 + c2 * h2; - int sampleHP = predictedSampleHP + sampleDeltaHP; - buffer[i] = std::min(std::max(-32768, (sampleHP + 1024) >> 11), 32767); - h2 = h1; - h1 = buffer[i]; - } - bnsDec.prevSamples[0] = h1; - bnsDec.prevSamples[1] = h2; -} - -static u8 * decodeBNS(u32 &size, const BNSInfo &bnsInfo, const BNSData &bnsData) -{ - static s16 smplBlock[14]; - BNSDecObj decObj; - int numBlocks = (bnsData.size - 8) / 8; - int numSamples = numBlocks * 14; - const BNSADPCMBlock *inputBuf = (const BNSADPCMBlock *)&bnsData.data; - u8 * buffer = (u8 *) malloc(numSamples * sizeof (s16)); - s16 *outputBuf; - - if (!buffer) - return buffer; - memcpy(decObj.coeff, bnsInfo.coefficients1, sizeof decObj.coeff); - memcpy(decObj.prevSamples, bnsInfo.chan1PrevSamples, sizeof decObj.prevSamples); - outputBuf = (s16 *)buffer; - if (bnsInfo.chanCount == 1) - for (int i = 0; i < numBlocks; ++i) - { - decodeADPCMBlock(smplBlock, inputBuf[i], decObj); - memcpy(outputBuf, smplBlock, sizeof smplBlock); - outputBuf += 14; - } - else - { - numBlocks /= 2; - for (int i = 0; i < numBlocks; ++i) - { - decodeADPCMBlock(smplBlock, inputBuf[i], decObj); - for (int j = 0; j < 14; ++j) - outputBuf[j * 2] = smplBlock[j]; - outputBuf += 2 * 14; - } - outputBuf = (s16 *)buffer + 1; - memcpy(decObj.coeff, bnsInfo.coefficients2, sizeof decObj.coeff); - memcpy(decObj.prevSamples, bnsInfo.chan2PrevSamples, sizeof decObj.prevSamples); - for (int i = 0; i < numBlocks; ++i) - { - decodeADPCMBlock(smplBlock, inputBuf[numBlocks + i], decObj); - for (int j = 0; j < 14; ++j) - outputBuf[j * 2] = smplBlock[j]; - outputBuf += 2 * 14; - } - } - size = numSamples * sizeof (s16); - return buffer; -} - -SoundBlock DecodefromBNS(const u8 *buffer, u32 size) -{ - SoundBlock OutBlock; - memset(&OutBlock, 0, sizeof(SoundBlock)); - - const BNSHeader &hdr = *(BNSHeader *)buffer; - if (size < sizeof hdr) - return OutBlock; - if (hdr.fccBNS != 'BNS ') - return OutBlock; - // Find info and data - BNSInfo infoChunk; - loadBNSInfo(infoChunk, buffer + hdr.infoOffset); - const BNSData &dataChunk = *(const BNSData *)(buffer + hdr.dataOffset); - // Check sizes - if (size < hdr.size || size < hdr.infoOffset + hdr.infoSize || size < hdr.dataOffset + hdr.dataSize - || hdr.infoSize < 0x60 || hdr.dataSize < sizeof dataChunk - || infoChunk.size != hdr.infoSize || dataChunk.size != hdr.dataSize) - return OutBlock; - // Check format - if (infoChunk.codecNum != 0) // Only codec i've found : 0 = ADPCM. Maybe there's also 1 and 2 for PCM 8 or 16 bits ? - return OutBlock; - u8 format = (u8)-1; - if (infoChunk.chanCount == 1 && infoChunk.codecNum == 0) - format = VOICE_MONO_16BIT; - else if (infoChunk.chanCount == 2 && infoChunk.codecNum == 0) - format = VOICE_STEREO_16BIT; - if (format == (u8)-1) - return OutBlock; - u32 freq = (u32) infoChunk.freq; - u32 length = 0; - // Copy data - if (infoChunk.codecNum == 0) - { - OutBlock.buffer = decodeBNS(length, infoChunk, dataChunk); - if (!OutBlock.buffer) - return OutBlock; - } - else - { - OutBlock.buffer = (u8*) malloc(dataChunk.size); - if (!OutBlock.buffer) - return OutBlock; - memcpy(OutBlock.buffer, &dataChunk.data, dataChunk.size); - length = dataChunk.size; - } - - OutBlock.frequency = freq; - OutBlock.format = format; - OutBlock.size = length; - OutBlock.loopStart = infoChunk.loopStart; - OutBlock.loopEnd = infoChunk.loopEnd; - OutBlock.loopFlag = infoChunk.loopFlag; - - return OutBlock; -} diff --git a/source/SoundOperations/BNSDecoder.hpp b/source/SoundOperations/BNSDecoder.hpp deleted file mode 100644 index 4c9d76c3..00000000 --- a/source/SoundOperations/BNSDecoder.hpp +++ /dev/null @@ -1,59 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#ifndef BNSDECODER_HPP_ -#define BNSDECODER_HPP_ - -#include "SoundDecoder.hpp" - -typedef struct _SoundBlock -{ - u8 * buffer; - u32 size; - u8 format; - u32 frequency; - u32 loopStart; - u32 loopEnd; - u8 loopFlag; -} SoundBlock; - -class BNSDecoder : public SoundDecoder -{ - public: - BNSDecoder(const char * filepath); - BNSDecoder(const u8 * snd, int len); - ~BNSDecoder(); - int GetFormat() { return SoundData.format; }; - int GetSampleRate() { return SoundData.frequency; }; - int Read(u8 * buffer, int buffer_size, int pos); - protected: - void OpenFile(); - void CloseFile(); - SoundBlock SoundData; -}; - -SoundBlock DecodefromBNS(const u8 *buffer, u32 size); - -#endif diff --git a/source/SoundOperations/BufferCircle.cpp b/source/SoundOperations/BufferCircle.cpp deleted file mode 100644 index a8ff1e44..00000000 --- a/source/SoundOperations/BufferCircle.cpp +++ /dev/null @@ -1,144 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#include -#include "BufferCircle.hpp" - -#define ALIGN32(x) (((x) + 31) & ~31) - -BufferCircle::BufferCircle() -{ - which = 0; - BufferBlockSize = 0; -} - -BufferCircle::~BufferCircle() -{ - FreeBuffer(); - SoundBuffer.clear(); - BufferSize.clear(); - BufferReady.clear(); -} - -void BufferCircle::SetBufferBlockSize(int size) -{ - if(size < 0) - return; - - BufferBlockSize = size; - - for(int i = 0; i < Size(); i++) - { - if(SoundBuffer[i] != NULL) - free(SoundBuffer[i]); - - SoundBuffer[i] = (u8 *) memalign(32, ALIGN32(BufferBlockSize)); - BufferSize[i] = 0; - BufferReady[i] = false; - } -} - -void BufferCircle::Resize(int size) -{ - while(size < Size()) - RemoveBuffer(Size()-1); - - int oldSize = Size(); - - SoundBuffer.resize(size); - BufferSize.resize(size); - BufferReady.resize(size); - - for(int i = oldSize; i < Size(); i++) - { - if(BufferBlockSize > 0) - SoundBuffer[i] = (u8 *) memalign(32, ALIGN32(BufferBlockSize)); - else - SoundBuffer[i] = NULL; - BufferSize[i] = 0; - BufferReady[i] = false; - } -} - -void BufferCircle::RemoveBuffer(int pos) -{ - if(!Valid(pos)) - return; - - if(SoundBuffer[pos] != NULL) - free(SoundBuffer[pos]); - - SoundBuffer.erase(SoundBuffer.begin()+pos); - BufferSize.erase(BufferSize.begin()+pos); - BufferReady.erase(BufferReady.begin()+pos); -} - -void BufferCircle::ClearBuffer() -{ - for(int i = 0; i < Size(); i++) - { - BufferSize[i] = 0; - BufferReady[i] = false; - } - which = 0; -} - -void BufferCircle::FreeBuffer() -{ - for(int i = 0; i < Size(); i++) - { - if(SoundBuffer[i] != NULL) - free(SoundBuffer[i]); - - SoundBuffer[i] = NULL; - BufferSize[i] = 0; - BufferReady[i] = false; - } -} - -void BufferCircle::LoadNext() -{ - int pos = (which+Size()-1) % Size(); - BufferReady[pos] = false; - BufferSize[pos] = 0; - - which = (which+1) % Size(); -} - -void BufferCircle::SetBufferReady(int pos, bool state) -{ - if(!Valid(pos)) - return; - - BufferReady[pos] = state; -} - -void BufferCircle::SetBufferSize(int pos, int size) -{ - if(!Valid(pos)) - return; - - BufferSize[pos] = size; -} diff --git a/source/SoundOperations/BufferCircle.hpp b/source/SoundOperations/BufferCircle.hpp deleted file mode 100644 index fcb9d6e4..00000000 --- a/source/SoundOperations/BufferCircle.hpp +++ /dev/null @@ -1,92 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#ifndef BUFFER_CIRCLE_HPP_ -#define BUFFER_CIRCLE_HPP_ - -#include -#include - -class BufferCircle -{ - public: - //!> Constructor - BufferCircle(); - //!> Destructor - ~BufferCircle(); - //!> Set circle size - void Resize(int size); - //!> Get the circle size - int Size() { return SoundBuffer.size(); }; - //!> Set/resize the buffer size - void SetBufferBlockSize(int size); - //!> Remove a buffer - void RemoveBuffer(int pos); - //!> Set all buffers clear - void ClearBuffer(); - //!> Free all buffers - void FreeBuffer(); - //!> Switch to next buffer - void LoadNext(); - //!> Get the current buffer - u8 * GetBuffer() { if(!Valid(which)) return 0; return SoundBuffer[which]; }; - //!> Get a buffer at a position - u8 * GetBuffer(int pos) { if(!Valid(pos)) return NULL; else return SoundBuffer[pos]; }; - //!> Get next buffer - u8 * GetNextBuffer() { if(Size() <= 0) return 0; else return SoundBuffer[(which+1) % Size()]; }; - //!> Get previous buffer - u8 * GetLastBuffer() { if(Size() <= 0) return 0; else return SoundBuffer[(which+Size()-1) % Size()]; }; - //!> Get current buffer size - u32 GetBufferSize() { if(!Valid(which)) return 0; else return BufferSize[which]; }; - //!> Get buffer size at position - u32 GetBufferSize(int pos) { if(!Valid(pos)) return 0; else return BufferSize[pos]; }; - //!> Get previous buffer size - u32 GetLastBufferSize() { if(Size() <= 0) return 0; else return BufferSize[(which+Size()-1) % Size()]; }; - //!> Is current buffer ready - bool IsBufferReady() { if(!Valid(which)) return false; else return BufferReady[which]; }; - //!> Is a buffer at a position ready - bool IsBufferReady(int pos) { if(!Valid(pos)) return false; else return BufferReady[pos]; }; - //!> Is next buffer ready - bool IsNextBufferReady() { if(Size() <= 0) return false; else return BufferReady[(which+1) % Size()]; }; - //!> Is last buffer ready - bool IsLastBufferReady() { if(Size() <= 0) return false; else return BufferReady[(which+Size()-1) % Size()]; }; - //!> Set a buffer at a position to a ready state - void SetBufferReady(int pos, bool st); - //!> Set the buffersize at a position - void SetBufferSize(int pos, int size); - //!> Get the current position in the circle - u16 Which() { return which; }; - protected: - //!> Check if the position is a valid position in the vector - bool Valid(int pos) { return !(pos < 0 || pos >= Size()); }; - - u16 which; - u32 BufferBlockSize; - std::vector SoundBuffer; - std::vector BufferSize; - std::vector BufferReady; -}; - -#endif diff --git a/source/SoundOperations/Mp3Decoder.cpp b/source/SoundOperations/Mp3Decoder.cpp deleted file mode 100644 index f3977029..00000000 --- a/source/SoundOperations/Mp3Decoder.cpp +++ /dev/null @@ -1,216 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#include -#include -#include -#include -#include -#include -#include "Mp3Decoder.hpp" - -Mp3Decoder::Mp3Decoder(const char * filepath) - : SoundDecoder(filepath) -{ - SoundType = SOUND_MP3; - ReadBuffer = NULL; - mad_timer_reset(&Timer); - mad_stream_init(&Stream); - mad_frame_init(&Frame); - mad_synth_init(&Synth); - - if(!file_fd) - return; - - OpenFile(); -} - -Mp3Decoder::Mp3Decoder(const u8 * snd, int len) - : SoundDecoder(snd, len) -{ - SoundType = SOUND_MP3; - ReadBuffer = NULL; - mad_timer_reset(&Timer); - mad_stream_init(&Stream); - mad_frame_init(&Frame); - mad_synth_init(&Synth); - - if(!file_fd) - return; - - OpenFile(); -} - -Mp3Decoder::~Mp3Decoder() -{ - ExitRequested = true; - while(Decoding) - usleep(100); - - mad_synth_finish(&Synth); - mad_frame_finish(&Frame); - mad_stream_finish(&Stream); - - if(ReadBuffer) - free(ReadBuffer); - ReadBuffer = NULL; -} - -void Mp3Decoder::OpenFile() -{ - GuardPtr = NULL; - ReadBuffer = (u8 *) memalign(32, SoundBlockSize*SoundBlocks); - if(!ReadBuffer) - { - if(file_fd) - delete file_fd; - file_fd = NULL; - return; - } - - u8 dummybuff[4096]; - int ret = Read(dummybuff, 4096, 0); - if(ret <= 0) - { - if(file_fd) - delete file_fd; - file_fd = NULL; - return; - } - - SampleRate = (u32) Frame.header.samplerate; - Format = ((MAD_NCHANNELS(&Frame.header) == 2) ? VOICE_STEREO_16BIT : VOICE_MONO_16BIT); - Rewind(); - Decode(); -} - -int Mp3Decoder::Rewind() -{ - mad_synth_finish(&Synth); - mad_frame_finish(&Frame); - mad_stream_finish(&Stream); - mad_timer_reset(&Timer); - mad_stream_init(&Stream); - mad_frame_init(&Frame); - mad_synth_init(&Synth); - SynthPos = 0; - GuardPtr = NULL; - - if(!file_fd) - return -1; - - return SoundDecoder::Rewind(); -} - -static inline s16 FixedToShort(mad_fixed_t Fixed) -{ - /* Clipping */ - if(Fixed>=MAD_F_ONE) - return(SHRT_MAX); - if(Fixed<=-MAD_F_ONE) - return(-SHRT_MAX); - - Fixed=Fixed>>(MAD_F_FRACBITS-15); - return((s16)Fixed); -} - -int Mp3Decoder::Read(u8 * buffer, int buffer_size, int pos) -{ - if(!file_fd) - return -1; - - if(Format == VOICE_STEREO_16BIT) - buffer_size &= ~0x0003; - else - buffer_size &= ~0x0001; - - u8 * write_pos = buffer; - u8 * write_end = buffer+buffer_size; - - while(1) - { - while(SynthPos < Synth.pcm.length) - { - if(write_pos >= write_end) - return write_pos-buffer; - - *((s16 *) write_pos) = FixedToShort(Synth.pcm.samples[0][SynthPos]); - write_pos += 2; - - if(MAD_NCHANNELS(&Frame.header) == 2) - { - *((s16 *) write_pos) = FixedToShort(Synth.pcm.samples[1][SynthPos]); - write_pos += 2; - } - SynthPos++; - } - - if(Stream.buffer == NULL || Stream.error == MAD_ERROR_BUFLEN) - { - u8 * ReadStart = ReadBuffer; - int ReadSize = SoundBlockSize*SoundBlocks; - int Remaining = 0; - - if(Stream.next_frame != NULL) - { - Remaining = Stream.bufend - Stream.next_frame; - memmove(ReadBuffer, Stream.next_frame, Remaining); - ReadStart += Remaining; - ReadSize -= Remaining; - } - - ReadSize = file_fd->read(ReadStart, ReadSize); - if(ReadSize <= 0) - { - GuardPtr = ReadStart; - memset(GuardPtr, 0, MAD_BUFFER_GUARD); - ReadSize = MAD_BUFFER_GUARD; - } - - CurPos += ReadSize; - mad_stream_buffer(&Stream, ReadBuffer, Remaining+ReadSize); - } - - if(mad_frame_decode(&Frame,&Stream)) - { - if(MAD_RECOVERABLE(Stream.error)) - { - if(Stream.error != MAD_ERROR_LOSTSYNC || !GuardPtr) - continue; - } - else - { - if(Stream.error != MAD_ERROR_BUFLEN) - return -1; - else if(Stream.error == MAD_ERROR_BUFLEN && GuardPtr) - return -1; - } - } - - mad_timer_add(&Timer,Frame.header.duration); - mad_synth_frame(&Synth,&Frame); - SynthPos = 0; - } -} diff --git a/source/SoundOperations/Mp3Decoder.hpp b/source/SoundOperations/Mp3Decoder.hpp deleted file mode 100644 index a622f1f3..00000000 --- a/source/SoundOperations/Mp3Decoder.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#include - -#include "SoundDecoder.hpp" - -class Mp3Decoder : public SoundDecoder -{ - public: - Mp3Decoder(const char * filepath); - Mp3Decoder(const u8 * sound, int len); - ~Mp3Decoder(); - int GetFormat() { return Format; }; - int GetSampleRate() { return SampleRate; }; - int Rewind(); - int Read(u8 * buffer, int buffer_size, int pos); - protected: - void OpenFile(); - struct mad_stream Stream; - struct mad_frame Frame; - struct mad_synth Synth; - mad_timer_t Timer; - u8 * GuardPtr; - u8 * ReadBuffer; - u8 Format; - u32 SampleRate; - u32 SynthPos; -}; diff --git a/source/SoundOperations/OggDecoder.cpp b/source/SoundOperations/OggDecoder.cpp deleted file mode 100644 index 904270ac..00000000 --- a/source/SoundOperations/OggDecoder.cpp +++ /dev/null @@ -1,144 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#include -#include -#include "OggDecoder.hpp" - -extern "C" int ogg_read(void * punt, int bytes, int blocks, int *f) -{ - return ((CFile *) f)->read((u8 *) punt, bytes*blocks); -} - -extern "C" int ogg_seek(int *f, ogg_int64_t offset, int mode) -{ - return ((CFile *) f)->seek((u64) offset, mode); -} - -extern "C" int ogg_close(int *f) -{ - ((CFile *) f)->close(); - return 0; -} - -extern "C" long ogg_tell(int *f) -{ - return (long) ((CFile *) f)->tell(); -} - -static ov_callbacks callbacks = { - (size_t (*)(void *, size_t, size_t, void *)) ogg_read, - (int (*)(void *, ogg_int64_t, int)) ogg_seek, - (int (*)(void *)) ogg_close, - (long (*)(void *)) ogg_tell -}; - -OggDecoder::OggDecoder(const char * filepath) - : SoundDecoder(filepath) -{ - SoundType = SOUND_OGG; - - if(!file_fd) - return; - - OpenFile(); -} - -OggDecoder::OggDecoder(const u8 * snd, int len) - : SoundDecoder(snd, len) -{ - SoundType = SOUND_OGG; - - if(!file_fd) - return; - - OpenFile(); -} - -OggDecoder::~OggDecoder() -{ - ExitRequested = true; - while(Decoding) - usleep(100); - - if(file_fd) - ov_clear(&ogg_file); -} - -void OggDecoder::OpenFile() -{ - if (ov_open_callbacks(file_fd, &ogg_file, NULL, 0, callbacks) < 0) - { - delete file_fd; - file_fd = NULL; - return; - } - - ogg_info = ov_info(&ogg_file, -1); - Decode(); -} - -int OggDecoder::GetFormat() -{ - if(!file_fd) - return VOICE_STEREO_16BIT; - - return ((ogg_info->channels == 2) ? VOICE_STEREO_16BIT : VOICE_MONO_16BIT); -} - -int OggDecoder::GetSampleRate() -{ - if(!file_fd) - return 0; - - return (int) ogg_info->rate; -} - -int OggDecoder::Rewind() -{ - if(!file_fd) - return -1; - - int ret = ov_time_seek(&ogg_file, 0); - CurPos = 0; - EndOfFile = false; - - return ret; -} - -int OggDecoder::Read(u8 * buffer, int buffer_size, int pos) -{ - if(!file_fd) - return -1; - - int bitstream = 0; - - int read = ov_read(&ogg_file, (char *) buffer, buffer_size, &bitstream); - - if(read > 0) - CurPos += read; - - return read; -} diff --git a/source/SoundOperations/OggDecoder.hpp b/source/SoundOperations/OggDecoder.hpp deleted file mode 100644 index 49de225e..00000000 --- a/source/SoundOperations/OggDecoder.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#include -#include - -#include "SoundDecoder.hpp" - -class OggDecoder : public SoundDecoder -{ - public: - OggDecoder(const char * filepath); - OggDecoder(const u8 * snd, int len); - ~OggDecoder(); - int GetFormat(); - int GetSampleRate(); - int Rewind(); - int Read(u8 * buffer, int buffer_size, int pos); - protected: - void OpenFile(); - OggVorbis_File ogg_file; - vorbis_info *ogg_info; -}; diff --git a/source/SoundOperations/SoundDecoder.cpp b/source/SoundOperations/SoundDecoder.cpp deleted file mode 100644 index f4bc6ecb..00000000 --- a/source/SoundOperations/SoundDecoder.cpp +++ /dev/null @@ -1,156 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * 3Band resampling thanks to libmad - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#include -#include -#include -#include -#include "SoundDecoder.hpp" -#include "main.h" - -SoundDecoder::SoundDecoder() -{ - file_fd = NULL; - Init(); -} - -SoundDecoder::SoundDecoder(const char * filepath) -{ - file_fd = new CFile(filepath, "rb"); - Init(); -} - -SoundDecoder::SoundDecoder(const u8 * buffer, int size) -{ - file_fd = new CFile(buffer, size); - Init(); -} - -SoundDecoder::~SoundDecoder() -{ - ExitRequested = true; - while(Decoding) - usleep(100); - - if(file_fd) - delete file_fd; - file_fd = NULL; -} - -void SoundDecoder::Init() -{ - SoundType = SOUND_RAW; - SoundBlocks = 8; - SoundBlockSize = 8192; - CurPos = 0; - Loop = false; - EndOfFile = false; - Decoding = false; - ExitRequested = false; - SoundBuffer.SetBufferBlockSize(SoundBlockSize); - SoundBuffer.Resize(SoundBlocks); -} - -int SoundDecoder::Rewind() -{ - CurPos = 0; - EndOfFile = false; - file_fd->rewind(); - - return 0; -} - -int SoundDecoder::Read(u8 * buffer, int buffer_size, int pos) -{ - int ret = file_fd->read(buffer, buffer_size); - CurPos += ret; - - return ret; -} - -void SoundDecoder::Decode() -{ - if(!file_fd || ExitRequested || EndOfFile) - return; - - u16 newWhich = SoundBuffer.Which(); - u16 i = 0; - for (i = 0; i < SoundBuffer.Size()-2; i++) - { - if(!SoundBuffer.IsBufferReady(newWhich)) - break; - - newWhich = (newWhich+1) % SoundBuffer.Size(); - } - - if(i == SoundBuffer.Size()-2) - return; - - Decoding = true; - - int done = 0; - u8 * write_buf = SoundBuffer.GetBuffer(newWhich); - if(!write_buf) - { - ExitRequested = true; - Decoding = false; - return; - } - - while(done < SoundBlockSize) - { - int ret = Read(&write_buf[done], SoundBlockSize-done, Tell()); - - if(ret <= 0) - { - if(Loop) - { - Rewind(); - continue; - } - else - { - EndOfFile = true; - break; - } - } - - done += ret; - } - - if(done > 0) - { - SoundBuffer.SetBufferSize(newWhich, done); - SoundBuffer.SetBufferReady(newWhich, true); - } - - if(!SoundBuffer.IsBufferReady((newWhich+1) % SoundBuffer.Size())) - Decode(); - - Decoding = false; -} - diff --git a/source/SoundOperations/SoundDecoder.hpp b/source/SoundOperations/SoundDecoder.hpp deleted file mode 100644 index b9e71ad4..00000000 --- a/source/SoundOperations/SoundDecoder.hpp +++ /dev/null @@ -1,89 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#ifndef SOUND_DECODER_HPP -#define SOUND_DECODER_HPP - -#include -#include -#include -#include "utils/timer.h" -#include "FileOperations/File.hpp" -#include "BufferCircle.hpp" - -enum -{ - SOUND_RAW = 0, - SOUND_MP3, - SOUND_OGG, - SOUND_WAV, - SOUND_BNS, - SOUND_AIF -}; - -class SoundDecoder -{ - public: - SoundDecoder(); - SoundDecoder(const char * filepath); - SoundDecoder(const u8 * buffer, int size); - ~SoundDecoder(); - virtual int Read(u8 * buffer, int buffer_size, int pos); - virtual int Tell() { return CurPos; }; - virtual int Seek(int pos) { CurPos = pos; return file_fd->seek(CurPos, SEEK_SET); }; - virtual int Rewind(); - virtual int GetFormat() { return VOICE_STEREO_16BIT; }; - virtual int GetSampleRate() { return 48000; }; - virtual void Decode(); - virtual u32 GetBufferSize() { return SoundBuffer.GetBufferSize(); }; - virtual u8 * GetBuffer() { return SoundBuffer.GetBuffer(); }; - virtual u8 * GetNextBuffer() { return SoundBuffer.GetNextBuffer(); }; - virtual u8 * GetLastBuffer() { return SoundBuffer.GetLastBuffer(); }; - virtual void LoadNext() { SoundBuffer.LoadNext(); }; - virtual bool IsBufferReady() { return SoundBuffer.IsBufferReady(); }; - virtual bool IsNextBufferReady() { return SoundBuffer.IsNextBufferReady(); }; - virtual bool IsLastBufferReady() { return SoundBuffer.IsLastBufferReady(); }; - virtual bool IsEOF() { return EndOfFile; }; - virtual void SetLoop(bool l) { Loop = l; }; - virtual u8 GetSoundType() { return SoundType; }; - virtual void ClearBuffer() { SoundBuffer.ClearBuffer(); }; - virtual bool IsStereo() { return (GetFormat() == VOICE_STEREO_16BIT || GetFormat() == VOICE_STEREO_8BIT); }; - virtual bool Is16Bit() { return (GetFormat() == VOICE_STEREO_16BIT || GetFormat() == VOICE_MONO_16BIT); }; - protected: - void Init(); - - CFile * file_fd; - BufferCircle SoundBuffer; - u8 SoundType; - u16 SoundBlocks; - int SoundBlockSize; - int CurPos; - bool Loop; - bool EndOfFile; - bool Decoding; - bool ExitRequested; -}; - -#endif diff --git a/source/SoundOperations/SoundHandler.cpp b/source/SoundOperations/SoundHandler.cpp deleted file mode 100644 index a4548886..00000000 --- a/source/SoundOperations/SoundHandler.cpp +++ /dev/null @@ -1,271 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#include -#include -#include "SoundHandler.hpp" -#include "Mp3Decoder.hpp" -#include "OggDecoder.hpp" -#include "WavDecoder.hpp" -#include "AifDecoder.hpp" -#include "BNSDecoder.hpp" - -SoundHandler * SoundHandler::instance = NULL; - -SoundHandler::SoundHandler() -{ - Decoding = false; - ExitRequested = false; - for(u32 i = 0; i < MAX_DECODERS; ++i) - DecoderList[i] = NULL; - - ThreadStack = (u8 *) memalign(32, 32768); - if(!ThreadStack) - return; - - LWP_CreateThread(&SoundThread, UpdateThread, this, ThreadStack, 32768, 80); -} - -SoundHandler::~SoundHandler() -{ - ExitRequested = true; - ThreadSignal(); - LWP_JoinThread(SoundThread, NULL); - SoundThread = LWP_THREAD_NULL; - if(ThreadStack) - free(ThreadStack); - - ClearDecoderList(); -} - -SoundHandler * SoundHandler::Instance() -{ - if (instance == NULL) - { - instance = new SoundHandler(); - } - return instance; -} - -void SoundHandler::DestroyInstance() -{ - if(instance) - { - delete instance; - } - instance = NULL; -} - -void SoundHandler::AddDecoder(int voice, const char * filepath) -{ - if(voice < 0 || voice >= MAX_DECODERS) - return; - - if(DecoderList[voice] != NULL) - RemoveDecoder(voice); - - DecoderList[voice] = GetSoundDecoder(filepath); -} - -void SoundHandler::AddDecoder(int voice, const u8 * snd, int len) -{ - if(voice < 0 || voice >= MAX_DECODERS) - return; - - if(DecoderList[voice] != NULL) - RemoveDecoder(voice); - - DecoderList[voice] = GetSoundDecoder(snd, len); -} - -void SoundHandler::RemoveDecoder(int voice) -{ - if(voice < 0 || voice >= MAX_DECODERS) - return; - - if(DecoderList[voice] != NULL) - { - if(DecoderList[voice]->GetSoundType() == SOUND_OGG) delete ((OggDecoder *) DecoderList[voice]); - else if(DecoderList[voice]->GetSoundType() == SOUND_MP3) delete ((Mp3Decoder *) DecoderList[voice]); - else if(DecoderList[voice]->GetSoundType() == SOUND_WAV) delete ((WavDecoder *) DecoderList[voice]); - else if(DecoderList[voice]->GetSoundType() == SOUND_AIF) delete ((AifDecoder *) DecoderList[voice]); - else if(DecoderList[voice]->GetSoundType() == SOUND_BNS) delete ((BNSDecoder *) DecoderList[voice]); - else delete DecoderList[voice]; - } - - DecoderList[voice] = NULL; -} - -void SoundHandler::ClearDecoderList() -{ - for(u32 i = 0; i < MAX_DECODERS; ++i) - RemoveDecoder(i); -} - -static inline bool CheckMP3Signature(const u8 * buffer) -{ - const char MP3_Magic[][3] = - { - {'I', 'D', '3'}, //'ID3' - {0xff, 0xfe}, //'MPEG ADTS, layer III, v1.0 [protected]', 'mp3', 'audio/mpeg'), - {0xff, 0xff}, //'MPEG ADTS, layer III, v1.0', 'mp3', 'audio/mpeg'), - {0xff, 0xfa}, //'MPEG ADTS, layer III, v1.0 [protected]', 'mp3', 'audio/mpeg'), - {0xff, 0xfb}, //'MPEG ADTS, layer III, v1.0', 'mp3', 'audio/mpeg'), - {0xff, 0xf2}, //'MPEG ADTS, layer III, v2.0 [protected]', 'mp3', 'audio/mpeg'), - {0xff, 0xf3}, //'MPEG ADTS, layer III, v2.0', 'mp3', 'audio/mpeg'), - {0xff, 0xf4}, //'MPEG ADTS, layer III, v2.0 [protected]', 'mp3', 'audio/mpeg'), - {0xff, 0xf5}, //'MPEG ADTS, layer III, v2.0', 'mp3', 'audio/mpeg'), - {0xff, 0xf6}, //'MPEG ADTS, layer III, v2.0 [protected]', 'mp3', 'audio/mpeg'), - {0xff, 0xf7}, //'MPEG ADTS, layer III, v2.0', 'mp3', 'audio/mpeg'), - {0xff, 0xe2}, //'MPEG ADTS, layer III, v2.5 [protected]', 'mp3', 'audio/mpeg'), - {0xff, 0xe3}, //'MPEG ADTS, layer III, v2.5', 'mp3', 'audio/mpeg'), - }; - - if(buffer[0] == MP3_Magic[0][0] && buffer[1] == MP3_Magic[0][1] && - buffer[2] == MP3_Magic[0][2]) - { - return true; - } - - for(int i = 1; i < 13; i++) - { - if(buffer[0] == MP3_Magic[i][0] && buffer[1] == MP3_Magic[i][1]) - return true; - } - - return false; -} - -SoundDecoder * SoundHandler::GetSoundDecoder(const char * filepath) -{ - u32 magic; - CFile f(filepath, "rb"); - if(f.size() == 0) - return NULL; - - do - { - f.read((u8 *) &magic, 1); - } - while(((u8 *) &magic)[0] == 0 && f.tell() < f.size()); - - if(f.tell() == f.size()) - return NULL; - - f.seek(f.tell()-1, SEEK_SET); - f.read((u8 *) &magic, 4); - f.close(); - - if(magic == 'OggS') - { - return new OggDecoder(filepath); - } - else if(magic == 'RIFF') - { - return new WavDecoder(filepath); - } - else if(magic == 'BNS ') - { - return new BNSDecoder(filepath); - } - else if(magic == 'FORM') - { - return new AifDecoder(filepath); - } - else if(CheckMP3Signature((u8 *) &magic) == true) - { - return new Mp3Decoder(filepath); - } - - return new SoundDecoder(filepath); -} - -SoundDecoder * SoundHandler::GetSoundDecoder(const u8 * sound, int length) -{ - const u8 * check = sound; - int counter = 0; - - while(check[0] == 0 && counter < length) - { - check++; - counter++; - } - - if(counter >= length) - return NULL; - - u32 * magic = (u32 *) check; - - if(magic[0] == 'OggS') - { - return new OggDecoder(sound, length); - } - else if(magic[0] == 'RIFF') - { - return new WavDecoder(sound, length); - } - else if(magic[0] == 'BNS ') - { - return new BNSDecoder(sound, length); - } - else if(magic[0] == 'FORM') - { - return new AifDecoder(sound, length); - } - else if(CheckMP3Signature(check) == true) - { - return new Mp3Decoder(sound, length); - } - - return new SoundDecoder(sound, length); -} - -void * SoundHandler::UpdateThread(void *arg) -{ - ((SoundHandler *) arg)->InternalSoundUpdates(); - return NULL; -} - -void SoundHandler::InternalSoundUpdates() -{ - u16 i = 0; - LWP_InitQueue(&ThreadQueue); - while (!ExitRequested) - { - LWP_ThreadSleep(ThreadQueue); - - for(i = 0; i < MAX_DECODERS; ++i) - { - if(DecoderList[i] == NULL) - continue; - - Decoding = true; - DecoderList[i]->Decode(); - } - Decoding = false; - } - LWP_CloseQueue(ThreadQueue); - ThreadQueue = LWP_TQUEUE_NULL; -} diff --git a/source/SoundOperations/SoundHandler.hpp b/source/SoundOperations/SoundHandler.hpp deleted file mode 100644 index b10953ec..00000000 --- a/source/SoundOperations/SoundHandler.hpp +++ /dev/null @@ -1,68 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#ifndef SOUNDHANDLER_H_ -#define SOUNDHANDLER_H_ - -#include -#include -#include "SoundDecoder.hpp" - -#define MAX_DECODERS 16 - -class SoundHandler -{ - public: - static SoundHandler * Instance(); - static void DestroyInstance(); - - void AddDecoder(int voice, const char * filepath); - void AddDecoder(int voice, const u8 * snd, int len); - void RemoveDecoder(int voice); - void DestroyDecoder(SoundDecoder * decoder); - - SoundDecoder * Decoder(int i) { return ((i < 0 || i >= MAX_DECODERS) ? NULL : DecoderList[i]); }; - void ThreadSignal() { LWP_ThreadSignal(ThreadQueue); }; - bool IsDecoding() { return Decoding; }; - protected: - SoundHandler(); - ~SoundHandler(); - static void * UpdateThread(void *arg); - void InternalSoundUpdates(); - void ClearDecoderList(); - SoundDecoder * GetSoundDecoder(const char * filepath); - SoundDecoder * GetSoundDecoder(const u8 * sound, int length); - - static SoundHandler * instance; - u8 * ThreadStack; - lwp_t SoundThread; - lwpq_t ThreadQueue; - bool Decoding; - bool ExitRequested; - - SoundDecoder * DecoderList[MAX_DECODERS]; -}; - -#endif diff --git a/source/SoundOperations/WavDecoder.cpp b/source/SoundOperations/WavDecoder.cpp deleted file mode 100644 index 3f37b95b..00000000 --- a/source/SoundOperations/WavDecoder.cpp +++ /dev/null @@ -1,155 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#include -#include "WavDecoder.hpp" -#include "utils/uncompress.h" - -WavDecoder::WavDecoder(const char * filepath) - : SoundDecoder(filepath) -{ - SoundType = SOUND_WAV; - SampleRate = 48000; - Format = VOICE_STEREO_16BIT; - - if(!file_fd) - return; - - OpenFile(); -} - -WavDecoder::WavDecoder(const u8 * snd, int len) - : SoundDecoder(snd, len) -{ - SoundType = SOUND_WAV; - SampleRate = 48000; - Format = VOICE_STEREO_16BIT; - - if(!file_fd) - return; - - OpenFile(); -} - -WavDecoder::~WavDecoder() -{ -} - -void WavDecoder::OpenFile() -{ - SWaveHdr Header; - SWaveFmtChunk FmtChunk; - memset(&Header, 0, sizeof(SWaveHdr)); - memset(&FmtChunk, 0, sizeof(SWaveFmtChunk)); - - file_fd->read((u8 *) &Header, sizeof(SWaveHdr)); - file_fd->read((u8 *) &FmtChunk, sizeof(SWaveFmtChunk)); - - if (Header.magicRIFF != 'RIFF') - { - CloseFile(); - return; - } - else if(Header.magicWAVE != 'WAVE') - { - CloseFile(); - return; - } - else if(FmtChunk.magicFMT != 'fmt ') - { - CloseFile(); - return; - } - - DataOffset = sizeof(SWaveHdr)+le32(FmtChunk.size)+8; - file_fd->seek(DataOffset, SEEK_SET); - SWaveChunk DataChunk; - file_fd->read((u8 *) &DataChunk, sizeof(SWaveChunk)); - - if(DataChunk.magicDATA == 'fact') - { - DataOffset += 8+le32(DataChunk.size); - file_fd->seek(DataOffset, SEEK_SET); - file_fd->read((u8 *) &DataChunk, sizeof(SWaveChunk)); - } - if(DataChunk.magicDATA != 'data') - { - CloseFile(); - return; - } - - DataOffset += 8; - DataSize = le32(DataChunk.size); - Is16Bit = (le16(FmtChunk.bps) == 16); - SampleRate = le32(FmtChunk.freq); - - if (le16(FmtChunk.channels) == 1 && le16(FmtChunk.bps) == 8 && le16(FmtChunk.alignment) <= 1) - Format = VOICE_MONO_8BIT; - else if (le16(FmtChunk.channels) == 1 && le16(FmtChunk.bps) == 16 && le16(FmtChunk.alignment) <= 2) - Format = VOICE_MONO_16BIT; - else if (le16(FmtChunk.channels) == 2 && le16(FmtChunk.bps) == 8 && le16(FmtChunk.alignment) <= 2) - Format = VOICE_STEREO_8BIT; - else if (le16(FmtChunk.channels) == 2 && le16(FmtChunk.bps) == 16 && le16(FmtChunk.alignment) <= 4) - Format = VOICE_STEREO_16BIT; - - Decode(); -} - -void WavDecoder::CloseFile() -{ - if(file_fd) - delete file_fd; - - file_fd = NULL; -} - -int WavDecoder::Read(u8 * buffer, int buffer_size, int pos) -{ - if(!file_fd) - return -1; - - if(CurPos >= (int) DataSize) - return 0; - - file_fd->seek(DataOffset+CurPos, SEEK_SET); - - if(buffer_size > (int) DataSize-CurPos) - buffer_size = DataSize-CurPos; - - int read = file_fd->read(buffer, buffer_size); - if(read > 0) - { - if (Is16Bit) - { - read &= ~0x0001; - - for (u32 i = 0; i < (u32) (read / sizeof (u16)); ++i) - ((u16 *) buffer)[i] = le16(((u16 *) buffer)[i]); - } - CurPos += read; - } - - return read; -} diff --git a/source/SoundOperations/WavDecoder.hpp b/source/SoundOperations/WavDecoder.hpp deleted file mode 100644 index 4681bf2b..00000000 --- a/source/SoundOperations/WavDecoder.hpp +++ /dev/null @@ -1,75 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#ifndef WAVDECODER_HPP_ -#define WAVDECODER_HPP_ - -#include "SoundDecoder.hpp" - -typedef struct -{ - u32 magicRIFF; - u32 size; - u32 magicWAVE; -} SWaveHdr; - -typedef struct -{ - u32 magicFMT; - u32 size; - u16 format; - u16 channels; - u32 freq; - u32 avgBps; - u16 alignment; - u16 bps; -} SWaveFmtChunk; - -typedef struct -{ - u32 magicDATA; - u32 size; -} SWaveChunk; - -class WavDecoder : public SoundDecoder -{ - public: - WavDecoder(const char * filepath); - WavDecoder(const u8 * snd, int len); - ~WavDecoder(); - int GetFormat() { return Format; }; - int GetSampleRate() { return SampleRate; }; - int Read(u8 * buffer, int buffer_size, int pos); - protected: - void OpenFile(); - void CloseFile(); - u32 DataOffset; - u32 DataSize; - u32 SampleRate; - u8 Format; - bool Is16Bit; -}; - -#endif diff --git a/source/SoundOperations/gui_bgm.cpp b/source/SoundOperations/gui_bgm.cpp deleted file mode 100644 index 3dffa875..00000000 --- a/source/SoundOperations/gui_bgm.cpp +++ /dev/null @@ -1,218 +0,0 @@ -/**************************************************************************** - * SettingsPrompts - * USB Loader GX 2009 - * - * Backgroundmusic - ***************************************************************************/ -#include -#include "themes/CTheme.h" -#include "gui_bgm.h" -#include "menu.h" - -GuiBGM::GuiBGM(const u8 *s, int l, int v) : - GuiSound(s, l, v, false, 0) -{ - currentPath = NULL; - currentPlaying = 0; - voice = 0; -} - -GuiBGM::~GuiBGM() -{ - if (currentPath) delete[] currentPath; - - ClearList(); -} - -bool GuiBGM::Load(const char *path) -{ - if (!path) - { - LoadStandard(); - return false; - } - if (strcmp(path, "") == 0) - { - LoadStandard(); - return false; - } - - if (!GuiSound::Load(path)) - { - LoadStandard(); - return false; - } - - return ParsePath(path); -} - -bool GuiBGM::LoadStandard() -{ - ClearList(); - if (currentPath) - { - delete[] currentPath; - currentPath = NULL; - } - - strcpy(Settings.ogg_path, ""); - - bool ret = GuiSound::Load(Resources::GetFile("bg_music.ogg"), Resources::GetFileSize("bg_music.ogg"), false); - - if (ret) Play(); - - return ret; -} - -bool GuiBGM::ParsePath(const char * folderpath) -{ - ClearList(); - - if (currentPath) delete[] currentPath; - - currentPath = new char[strlen(folderpath) + 1]; - sprintf(currentPath, "%s", folderpath); - - char * isdirpath = strrchr(folderpath, '.'); - if (isdirpath) - { - char * pathptr = strrchr(currentPath, '/'); - if (pathptr) - { - pathptr++; - pathptr[0] = 0; - } - } - - char * LoadedFilename = strrchr(folderpath, '/') + 1; - - char filename[1024]; - struct dirent * dirent = NULL; - - DIR * dir = opendir(currentPath); - if (dir == NULL) - { - LoadStandard(); - return false; - } - u32 counter = 0; - - while ((dirent = readdir(dir)) != 0) - { - snprintf(filename, sizeof(filename), dirent->d_name); - - char * fileext = strrchr(filename, '.'); - if (!fileext) - continue; - - if (strcasecmp(fileext, ".mp3") == 0 || strcasecmp(fileext, ".ogg") == 0 || - strcasecmp(fileext, ".wav") == 0 || strcasecmp(fileext, ".aif") == 0) - { - AddEntrie(filename); - - if (strcmp(LoadedFilename, filename) == 0) currentPlaying = counter; - - counter++; - } - - } - - closedir(dir); - - snprintf(Settings.ogg_path, sizeof(Settings.ogg_path), "%s", folderpath); - - return true; -} - -void GuiBGM::AddEntrie(const char * filename) -{ - if (!filename) return; - - char * NewEntrie = new char[strlen(filename) + 1]; - sprintf(NewEntrie, "%s", filename); - - PlayList.push_back(NewEntrie); -} - -void GuiBGM::ClearList() -{ - for (u32 i = 0; i < PlayList.size(); i++) - { - if (PlayList.at(i) != NULL) - { - delete[] PlayList.at(i); - PlayList.at(i) = NULL; - } - } - - PlayList.clear(); -} - -bool GuiBGM::PlayNext() -{ - if (!currentPath) return false; - - currentPlaying++; - if (currentPlaying >= (int) PlayList.size()) currentPlaying = 0; - - snprintf(Settings.ogg_path, sizeof(Settings.ogg_path), "%s%s", currentPath, PlayList.at(currentPlaying)); - - if (!GuiSound::Load(Settings.ogg_path)) return false; - - Play(); - - return true; -} - -bool GuiBGM::PlayPrevious() -{ - if (!currentPath) return false; - - currentPlaying--; - if (currentPlaying < 0) currentPlaying = PlayList.size() - 1; - - snprintf(Settings.ogg_path, sizeof(Settings.ogg_path), "%s%s", currentPath, PlayList.at(currentPlaying)); - - if (!GuiSound::Load(Settings.ogg_path)) return false; - - Play(); - - return true; -} - -bool GuiBGM::PlayRandom() -{ - if (!currentPath) return false; - - srand(time(NULL)); - - currentPlaying = rand() % PlayList.size(); - - //just in case - if (currentPlaying < 0) - currentPlaying = PlayList.size() - 1; - else if (currentPlaying >= (int) PlayList.size()) currentPlaying = 0; - - snprintf(Settings.ogg_path, sizeof(Settings.ogg_path), "%s%s", currentPath, PlayList.at(currentPlaying)); - - if (!GuiSound::Load(Settings.ogg_path)) return false; - - Play(); - - return true; -} - -void GuiBGM::UpdateState() -{ - if (!IsPlaying()) - { - if (loop == DIR_LOOP) - { - PlayNext(); - } - else if (loop == RANDOM_BGM) - { - PlayRandom(); - } - } -} diff --git a/source/SoundOperations/gui_bgm.h b/source/SoundOperations/gui_bgm.h deleted file mode 100644 index eb54791a..00000000 --- a/source/SoundOperations/gui_bgm.h +++ /dev/null @@ -1,40 +0,0 @@ -/**************************************************************************** - * SettingsPrompts - * USB Loader GX 2009 - * - * Backgroundmusic - ***************************************************************************/ - -#ifndef _BGM_H_ -#define _BGM_H_ - -#include -#include "gui_sound.h" - -enum -{ - ONCE = 0, LOOP, RANDOM_BGM, DIR_LOOP -}; - -class GuiBGM: public GuiSound -{ - public: - GuiBGM(const u8 *s, int l, int v); - ~GuiBGM(); - bool Load(const char *path); - bool LoadStandard(); - bool ParsePath(const char * folderpath); - bool PlayNext(); - bool PlayPrevious(); - bool PlayRandom(); - void UpdateState(); - protected: - void AddEntrie(const char * filename); - void ClearList(); - - int currentPlaying; - char * currentPath; - std::vector PlayList; -}; - -#endif diff --git a/source/SoundOperations/gui_sound.cpp b/source/SoundOperations/gui_sound.cpp deleted file mode 100644 index a9b8aa8a..00000000 --- a/source/SoundOperations/gui_sound.cpp +++ /dev/null @@ -1,380 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#include -#include "libwiigui/gui.h" -#include "utils/uncompress.h" -#include "FileOperations/fileops.h" -#include "SoundHandler.hpp" -#include "WavDecoder.hpp" - -#define MAX_SND_VOICES 16 - -static bool VoiceUsed[MAX_SND_VOICES] = -{ - true, false, false, false, false, false, - false, false, false, false, false, false, - false, false, false, false -}; - -static inline int GetFirstUnusedVoice() -{ - for(int i = 1; i < MAX_SND_VOICES; i++) - { - if(VoiceUsed[i] == false) - return i; - } - - return -1; -} - -extern "C" void SoundCallback(s32 voice) -{ - SoundDecoder * decoder = SoundHandler::Instance()->Decoder(voice); - if(!decoder) - return; - - if(decoder->IsBufferReady()) - { - if(ASND_AddVoice(voice, decoder->GetBuffer(), decoder->GetBufferSize()) == SND_OK) - { - decoder->LoadNext(); - SoundHandler::Instance()->ThreadSignal(); - } - } - else if(decoder->IsEOF()) - { - ASND_StopVoice(voice); - //if(voice == 0) - //MusicPlayer::Instance()->SetPlaybackFinished(true); //see if next music must be played - } - else - { - SoundHandler::Instance()->ThreadSignal(); - } -} - -GuiSound::GuiSound(const char * filepath) -{ - sound = NULL; - length = 0; - voice = GetFirstUnusedVoice(); - if(voice > 0) - VoiceUsed[voice] = true; - - volume = 255; - SoundEffectLength = 0; - loop = 0; - allocated = false; - Load(filepath); -} - -GuiSound::GuiSound(const u8 * snd, s32 len, int vol, bool isallocated, int v) -{ - sound = NULL; - length = 0; - if(v < 0) - voice = GetFirstUnusedVoice(); - else - voice = v; - - if(voice > 0) - VoiceUsed[voice] = true; - - volume = vol; - SoundEffectLength = 0; - loop = 0; - allocated = false; - Load(snd, len, isallocated); -} - -GuiSound::~GuiSound() -{ - FreeMemory(); - if(voice > 0) - VoiceUsed[voice] = false; -} - -void GuiSound::FreeMemory() -{ - this->Stop(); - - SoundHandler::Instance()->RemoveDecoder(voice); - - if(allocated && sound != NULL) - { - free(sound); - sound = NULL; - allocated = false; - } - - SoundEffectLength = 0; -} - -bool GuiSound::Load(const char * filepath) -{ - FreeMemory(); - - if(!filepath) - return false; - - u32 magic; - FILE * f = fopen(filepath, "rb"); - if(!f) - return false; - - fread(&magic, 1, 4, f); - fclose(f); - - if(magic == 'IMD5') - { - u8 * snd = NULL; - u64 filesize = 0; - LoadFileToMem(filepath, &snd, &filesize); - return Load(snd, filesize, true); - } - - SoundHandler::Instance()->AddDecoder(voice, filepath); - - SoundDecoder * decoder = SoundHandler::Instance()->Decoder(voice); - if(!decoder) - return false; - - if(!decoder->IsBufferReady()) - { - SoundHandler::Instance()->RemoveDecoder(voice); - return false; - } - - SetLoop(loop); - - return true; -} - -bool GuiSound::Load(const u8 * snd, s32 len, bool isallocated) -{ - FreeMemory(); - - if(!snd) - return false; - - if(!isallocated && *((u32 *) snd) == 'RIFF') - { - return LoadSoundEffect(snd, len); - } - - if(*((u32 *) snd) == 'IMD5') - { - UncompressSoundbin(snd, len, isallocated); - } - else - { - sound = (u8 *) snd; - length = len; - allocated = isallocated; - } - - SoundHandler::Instance()->AddDecoder(voice, sound, length); - - SoundDecoder * decoder = SoundHandler::Instance()->Decoder(voice); - if(!decoder) - return false; - - if(!decoder->IsBufferReady()) - { - SoundHandler::Instance()->RemoveDecoder(voice); - return false; - } - - SetLoop(loop); - - return true; -} - -bool GuiSound::LoadSoundEffect(const u8 * snd, s32 len) -{ - WavDecoder decoder(snd, len); - decoder.Rewind(); - - u32 done = 0; - sound = (u8 *) malloc(4096); - memset(sound, 0, 4096); - - while(1) - { - u8 * tmpsnd = (u8 *) realloc(sound, done+4096); - if(!tmpsnd) - { - free(sound); - sound = NULL; - return false; - } - - sound = tmpsnd; - - int read = decoder.Read(sound+done, 4096, done); - if(read <= 0) - break; - - done += read; - } - - sound = (u8 *) realloc(sound, done); - SoundEffectLength = done; - allocated = true; - - return true; -} - -void GuiSound::Play() -{ - if(SoundEffectLength > 0) - { - ASND_StopVoice(voice); - ASND_SetVoice(voice, VOICE_STEREO_16BIT, 32000, 0, sound, SoundEffectLength, volume, volume, NULL); - return; - } - - if(IsPlaying()) - return; - - if(voice < 0 || voice >= 16) - return; - - SoundDecoder * decoder = SoundHandler::Instance()->Decoder(voice); - if(!decoder) - return; - - if(decoder->IsEOF()) - { - ASND_StopVoice(voice); - decoder->ClearBuffer(); - decoder->Rewind(); - decoder->Decode(); - } - - u8 * curbuffer = decoder->GetBuffer(); - int bufsize = decoder->GetBufferSize(); - decoder->LoadNext(); - SoundHandler::Instance()->ThreadSignal(); - - ASND_SetVoice(voice, decoder->GetFormat(), decoder->GetSampleRate(), 0, curbuffer, bufsize, volume, volume, SoundCallback); -} - -void GuiSound::Stop() -{ - if(voice < 0 || voice >= 16) - return; - - ASND_StopVoice(voice); - - SoundDecoder * decoder = SoundHandler::Instance()->Decoder(voice); - if(!decoder) - return; - - decoder->ClearBuffer(); - Rewind(); - SoundHandler::Instance()->ThreadSignal(); -} - -void GuiSound::Pause() -{ - if(voice < 0 || voice >= 16) - return; - - ASND_StopVoice(voice); -} - -void GuiSound::Resume() -{ - Play(); -} - -bool GuiSound::IsPlaying() -{ - if(voice < 0 || voice >= 16) - return false; - - int result = ASND_StatusVoice(voice); - - if(result == SND_WORKING || result == SND_WAITING) - return true; - - return false; -} - -void GuiSound::SetVolume(int vol) -{ - if(voice < 0 || voice >= 16) - return; - - if(vol < 0) - return; - - volume = 255*(vol/100.0); - ASND_ChangeVolumeVoice(voice, volume, volume); -} - -void GuiSound::SetLoop(u8 l) -{ - loop = l; - - SoundDecoder * decoder = SoundHandler::Instance()->Decoder(voice); - if(!decoder) - return; - - decoder->SetLoop(l == 1); -} - -void GuiSound::Rewind() -{ - SoundDecoder * decoder = SoundHandler::Instance()->Decoder(voice); - if(!decoder) - return; - - decoder->Rewind(); -} - -void GuiSound::UncompressSoundbin(const u8 * snd, int len, bool isallocated) -{ - const u8 * file = snd+32; - if(*((u32 *) file) == 'LZ77') - { - u32 size = 0; - sound = uncompressLZ77(file, len-32, &size); - length = size; - } - else - { - length = len-32; - sound = (u8 *) malloc(length); - memcpy(sound, file, length); - } - - if(isallocated) - free((u8 *) snd); - - allocated = true; -} diff --git a/source/SoundOperations/gui_sound.h b/source/SoundOperations/gui_sound.h deleted file mode 100644 index becfa948..00000000 --- a/source/SoundOperations/gui_sound.h +++ /dev/null @@ -1,80 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#ifndef GUI_SOUND_H_ -#define GUI_SOUND_H_ - -#include - -//!Sound conversion and playback. A wrapper for other sound libraries - ASND, libmad, ltremor, etc -class GuiSound -{ - public: - //!Constructor - //!\param sound Pointer to the sound data - //!\param filesize Length of sound data - GuiSound(const char * filepath); - GuiSound(const u8 * sound, int filesize, int volume, bool allocated = false, int voice = -1); - //!Destructor - ~GuiSound(); - //!Load a file and replace the old one - virtual bool Load(const char * filepath); - //!Load a file and replace the old one - bool Load(const u8 * sound, int filesize, bool allocated = true); - //!For quick playback of the internal soundeffects - bool LoadSoundEffect(const u8 * snd, s32 len); - //!Start sound playback - void Play(); - //!Stop sound playback - void Stop(); - //!Pause sound playback - void Pause(); - //!Resume sound playback - void Resume(); - //!Checks if the sound is currently playing - //!\return true if sound is playing, false otherwise - bool IsPlaying(); - //!Rewind the music - void Rewind(); - //!Set sound volume - //!\param v Sound volume (0-100) - void SetVolume(int v); - //!\param l Loop (true to loop) - virtual void SetLoop(u8 l); - //!Special sound case for sound.bin - void UncompressSoundbin(const u8 * snd, int len, bool isallocated); - protected: - //!Stops sound and frees all memory/closes files - void FreeMemory(); - u8 * sound; //!< Pointer to the sound data - int length; //!< Length of sound data - s32 voice; //!< Currently assigned ASND voice channel - int volume; //!< Sound volume (0-100) - u8 loop; //!< Loop sound playback - u32 SoundEffectLength; //!< Check if it is an app soundeffect for faster playback - bool allocated; //!< Is the file allocated or not -}; - -#endif diff --git a/source/StartUpProcess.cpp b/source/StartUpProcess.cpp deleted file mode 100644 index 175f2e77..00000000 --- a/source/StartUpProcess.cpp +++ /dev/null @@ -1,192 +0,0 @@ -#include -#include "StartUpProcess.h" -#include "libwiigui/gui.h" -#include "video.h" -#include "audio.h" -#include "input.h" -#include "themes/CTheme.h" -#include "gecko.h" -#include "Controls/DeviceHandler.hpp" -#include "wad/nandtitle.h" -#include "system/IosLoader.h" -#include "settings/CSettings.h" -#include "settings/CGameSettings.h" -#include "settings/CGameStatistics.h" -#include "usbloader/usbstorage2.h" -#include "sys.h" - -StartUpProcess::StartUpProcess() -{ - //! Load default font for the next text outputs - Theme::LoadFont(""); - - background = new GuiImage(screenwidth, screenheight, (GXColor) {0, 0, 0, 255}); - - GXImageData = Resources::GetImageData("gxlogo.png"); - GXImage = new GuiImage(GXImageData); - GXImage->SetAlignment(ALIGN_CENTER, ALIGN_MIDDLE); - GXImage->SetPosition(screenwidth/2, screenheight/2-50); - - titleTxt = new GuiText("Loading...", 24, (GXColor) {255, 255, 255, 255}); - titleTxt->SetAlignment(ALIGN_CENTER, ALIGN_MIDDLE); - titleTxt->SetPosition(screenwidth/2, screenheight/2+30); - - messageTxt = new GuiText(" ", 22, (GXColor) {255, 255, 255, 255}); - messageTxt->SetAlignment(ALIGN_CENTER, ALIGN_MIDDLE); - messageTxt->SetPosition(screenwidth/2, screenheight/2+60); -} - -StartUpProcess::~StartUpProcess() -{ - delete background; - delete GXImageData; - delete GXImage; - delete titleTxt; - delete messageTxt; -} - -void StartUpProcess::TextFade(int direction) -{ - if(direction > 0) - { - for(int i = 0; i < 255; i += direction) - { - messageTxt->SetAlpha(i); - Draw(); - } - messageTxt->SetAlpha(255); - Draw(); - } - else if(direction < 0) - { - for(int i = 255; i > 0; i += direction) - { - messageTxt->SetAlpha(i); - Draw(); - } - messageTxt->SetAlpha(0); - Draw(); - } -} - -void StartUpProcess::SetTextf(const char * format, ...) -{ - char * tmp = NULL; - va_list va; - va_start(va, format); - if((vasprintf(&tmp, format, va) >= 0) && tmp) - { - TextFade(-40); - gprintf(tmp); - messageTxt->SetText(tmp); - TextFade(40); - } - va_end(va); - - if(tmp) - free(tmp); -} - -bool StartUpProcess::USBSpinUp() -{ - bool started = false; - int retries = 400; - const DISC_INTERFACE * handle = DeviceHandler::GetUSBInterface(); - - // wait 10 sec for the USB to spin up...stupid slow ass HDD - do - { - started = (handle->startup() && handle->isInserted()); - usleep(50000); - - if(retries < 400 && retries % 20 == 0) - { - messageTxt->SetTextf("Waiting for HDD: %i sec left\n", retries/20); - Draw(); - } - } - while(!started && --retries > 0); - - return started; -} - -bool StartUpProcess::Run() -{ - StartUpProcess Process; - - return Process.Execute(); -} - -bool StartUpProcess::Execute() -{ - SetTextf("Start up\n"); - - if(IosLoader::LoadAppCios() < 0) - { - SetTextf("Failed loading any cIOS. USB Loader GX requires at least cIOS 222, 249 or 250. Exiting...\n"); - sleep(5); - Sys_BackToLoader(); - } - - SetTextf("Initialize sd card\n"); - DeviceHandler::Instance()->MountSD(); - - SetTextf("Initialize usb device\n"); - USBSpinUp(); - DeviceHandler::Instance()->MountAllUSB(false); - - SetTextf("Loading config files"); - gprintf("\tLoading config...%s\n", Settings.Load() ? "done" : "failed"); - gprintf("\tLoading language...%s\n", Settings.LoadLanguage(Settings.language_path, CONSOLE_DEFAULT) ? "done" : "failed"); - gprintf("\tLoading game settings...%s\n", GameSettings.Load(Settings.ConfigPath) ? "done" : "failed"); - gprintf("\tLoading game statistics...%s\n", GameStatistics.Load(Settings.ConfigPath) ? "done" : "failed"); - - if(Settings.cios != IOS_GetVersion()) - { - SetTextf("Loading cIOS %i\n", Settings.cios); - - DeviceHandler::DestroyInstance(); - - // Loading now the cios setup in the settings - IosLoader::LoadAppCios(); - - SetTextf("Loaded cIOS %i R%i\n", IOS_GetVersion(), IOS_GetRevision()); - - DeviceHandler::Instance()->MountSD(); - USBSpinUp(); - DeviceHandler::Instance()->MountAllUSB(false); - } - - if(!IosLoader::IsHermesIOS()) - { - Settings.USBPort = 0; - } - else if(Settings.USBPort == 1) - { - SetTextf("Changing USB Port to %i\n", Settings.USBPort); - DeviceHandler::Instance()->UnMountAllUSB(); - DeviceHandler::SetUSBPort(Settings.USBPort); - DeviceHandler::Instance()->MountAllUSB(); - } - - gprintf("\tLoading font...%s\n", Theme::LoadFont(Settings.theme_path) ? "done" : "failed (using default)"); - gprintf("\tLoading theme...%s\n", Theme::Load(Settings.theme) ? "done" : "failed (using default)"); - - //! Init the rest of the System - Sys_Init(); - SetupPads(); - InitAudio(); - setlocale(LC_CTYPE, "C-UTF-8"); - setlocale(LC_MESSAGES, "C-UTF-8"); - - return true; -} - -void StartUpProcess::Draw() -{ - background->Draw(); - GXImage->Draw(); - titleTxt->Draw(); - messageTxt->Draw(); - Menu_Render(); -} diff --git a/source/StartUpProcess.h b/source/StartUpProcess.h deleted file mode 100644 index d785ee66..00000000 --- a/source/StartUpProcess.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef STARTUPPROCESS_H_ -#define STARTUPPROCESS_H_ - -#include "libwiigui/gui.h" - -class StartUpProcess -{ - public: - static bool Run(); - private: - StartUpProcess(); - ~StartUpProcess(); - bool Execute(); - bool USBSpinUp(); - void TextFade(int direction); - void SetTextf(const char * format, ...); - void Draw(); - - GuiImageData * GXImageData; - GuiImage * background; - GuiImage * GXImage; - GuiText * titleTxt; - GuiText * messageTxt; -}; - -#endif diff --git a/source/ZipFile.cpp b/source/ZipFile.cpp deleted file mode 100644 index e1a7be12..00000000 --- a/source/ZipFile.cpp +++ /dev/null @@ -1,184 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2009 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * ZipFile.cpp - * - * ZipFile Class - * for Wii-FileXplorer 2009 - * - * STILL UNCOMPLETE AND UNDER CONSTRUCTION - ***************************************************************************/ -#include -#include -#include -#include -#include - -#include "prompts/ProgressWindow.h" -#include "FileOperations/fileops.h" -#include "ZipFile.h" -#include "language/gettext.h" - -ZipFile::ZipFile(const char *filepath) -{ - File = unzOpen(filepath); - if (File) this->LoadList(); -} - -ZipFile::~ZipFile() -{ - unzClose(File); -} - -bool ZipFile::LoadList() -{ - return true; -} - -bool ZipFile::FindFile(const char *file) -{ - if (!File) return false; - - char filename[MAXPATHLEN]; - - int ret = unzGoToFirstFile(File); - if (ret != UNZ_OK) return false; - - do - { - if(unzGetCurrentFileInfo(File, &cur_file_info, filename, sizeof(filename), NULL, 0, NULL, 0) != UNZ_OK) - continue; - - const char *realfilename = strrchr(filename, '/'); - if(!realfilename || strlen(realfilename) == 0) - realfilename = filename; - - if(strcasecmp(realfilename, file) == 0) - return true; - } - while(unzGoToNextFile(File) == UNZ_OK); - - return false; -} - -bool ZipFile::FindFilePart(const char *partfilename, std::string &realname) -{ - if (!File) return false; - - char filename[MAXPATHLEN]; - - int ret = unzGoToFirstFile(File); - if (ret != UNZ_OK) return false; - - do - { - if(unzGetCurrentFileInfo(File, &cur_file_info, filename, sizeof(filename), NULL, 0, NULL, 0) != UNZ_OK) - continue; - - if(strcasestr(filename, partfilename) != 0) - { - realname = filename; - return true; - } - } - while(unzGoToNextFile(File) == UNZ_OK); - - return false; -} - -bool ZipFile::ExtractAll(const char *dest) -{ - if (!File) return false; - - bool Stop = false; - - u32 blocksize = 1024 * 50; - u8 *buffer = new u8[blocksize]; - - if (!buffer) return false; - - char writepath[MAXPATHLEN]; - char filename[MAXPATHLEN]; - memset(filename, 0, sizeof(filename)); - - int ret = unzGoToFirstFile(File); - if (ret != UNZ_OK) Stop = true; - - while (!Stop) - { - if (unzGetCurrentFileInfo(File, &cur_file_info, filename, sizeof(filename), NULL, 0, NULL, 0) != UNZ_OK) Stop - = true; - - if (!Stop && filename[strlen(filename) - 1] != '/') - { - u32 uncompressed_size = cur_file_info.uncompressed_size; - - u32 done = 0; - char *pointer = NULL; - - ret = unzOpenCurrentFile(File); - - snprintf(writepath, sizeof(writepath), "%s/%s", dest, filename); - - pointer = strrchr(writepath, '/'); - int position = pointer - writepath + 2; - - char temppath[strlen(writepath)]; - snprintf(temppath, position, "%s", writepath); - - CreateSubfolder(temppath); - - if (ret == UNZ_OK) - { - FILE *pfile = fopen(writepath, "wb"); - - do - { - ShowProgress(tr( "Extracting files..." ), 0, pointer + 1, done, uncompressed_size, true); - - if (uncompressed_size - done < blocksize) blocksize = uncompressed_size - done; - - ret = unzReadCurrentFile(File, buffer, blocksize); - - if (ret == 0) break; - - fwrite(buffer, 1, blocksize, pfile); - - done += ret; - - } while (done < uncompressed_size); - - fclose(pfile); - unzCloseCurrentFile(File); - } - } - if (unzGoToNextFile(File) != UNZ_OK) Stop = true; - } - - delete[] buffer; - buffer = NULL; - - ProgressStop(); - - return true; -} diff --git a/source/ZipFile.h b/source/ZipFile.h deleted file mode 100644 index 5e61c079..00000000 --- a/source/ZipFile.h +++ /dev/null @@ -1,63 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2009 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * ZipFile.cpp - * - * for Wii-FileXplorer 2009 - ***************************************************************************/ -#ifndef _ZIPFILE_H_ -#define _ZIPFILE_H_ - -#include -#include - -typedef struct -{ - u64 offset; // ZipFile offset - u64 length; // uncompressed file length in 64 bits for sizes higher than 4GB - bool isdir; // 0 - file, 1 - directory - char filename[256]; // full filename -} FileStructure; - -class ZipFile -{ - public: - //!Constructor - ZipFile(const char *filepath); - //!Destructor - ~ZipFile(); - //!Extract all files from a zip file to a directory - //!\param dest Destination path to where to extract - bool ExtractAll(const char *dest); - //!Find a file inside the zip and return if it is existent or not - bool FindFile(const char *filename); - //!Only needed a part of a filename to find the real one - bool FindFilePart(const char *partfilename, std::string &realname); - protected: - bool LoadList(); - unzFile File; - unz_file_info cur_file_info; - FileStructure *FileList; -}; - -#endif diff --git a/source/audio.cpp b/source/audio.cpp deleted file mode 100644 index e1e3acae..00000000 --- a/source/audio.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/**************************************************************************** - * libwiigui Template - * Tantric 2009 - * - * audio.cpp - * Audio support - ***************************************************************************/ - -#include -#include -#include - -/**************************************************************************** - * InitAudio - * - * Initializes the Wii's audio subsystem - ***************************************************************************/ -void InitAudio() -{ - AUDIO_Init(NULL); - ASND_Init(); - ASND_Pause(0); -} - -/**************************************************************************** - * ShutdownAudio - * - * Shuts down audio subsystem. Useful to avoid unpleasant sounds if a - * crash occurs during shutdown. - ***************************************************************************/ -void ShutdownAudio() -{ - ASND_Pause(1); - ASND_End(); -} diff --git a/source/audio.h b/source/audio.h deleted file mode 100644 index 6efdf6d5..00000000 --- a/source/audio.h +++ /dev/null @@ -1,15 +0,0 @@ -/**************************************************************************** - * libwiigui Template - * Tantric 2009 - * - * audio.h - * Audio support - ***************************************************************************/ - -#ifndef _AUDIO_H_ -#define _AUDIO_H_ - -void InitAudio(); -void ShutdownAudio(); - -#endif diff --git a/source/banner/OpeningBNR.cpp b/source/banner/OpeningBNR.cpp deleted file mode 100644 index f9eefb62..00000000 --- a/source/banner/OpeningBNR.cpp +++ /dev/null @@ -1,159 +0,0 @@ -#include -#include -#include "usbloader/disc.h" -#include "usbloader/wbfs.h" -#include "utils/uncompress.h" -#include "OpeningBNR.hpp" - -typedef struct _IMD5Header -{ - u32 fcc; - u32 filesize; - u8 zeroes[8]; - u8 crypto[16]; -} __attribute__((packed)) IMD5Header; - -typedef struct _U8Header -{ - u32 fcc; - u32 rootNodeOffset; - u32 headerSize; - u32 dataOffset; - u8 zeroes[16]; -} __attribute__((packed)) U8Header; - -typedef struct _U8Entry -{ - struct - { - u32 fileType :8; - u32 nameOffset :24; - }; - u32 fileOffset; - union - { - u32 fileLength; - u32 numEntries; - }; -} __attribute__( ( packed ) ) U8Entry; - - -static inline const char * u8Filename(const U8Entry *fst, int i) -{ - return (char *) (fst + fst[0].numEntries) + fst[i].nameOffset; -} - -BNRInstance * BNRInstance::instance = NULL; - -OpeningBNR::OpeningBNR() - : imetHdr(0) -{ - memset(gameID, 0, sizeof(gameID)); -} - -OpeningBNR::~OpeningBNR() -{ - if(imetHdr) - free(imetHdr); -} - -bool OpeningBNR::Load(const u8 * discid) -{ - if(!discid) - return false; - - if(memcmp(gameID, discid, 6) == 0) - return true; - - if(imetHdr) - free(imetHdr); - imetHdr = NULL; - snprintf(gameID, sizeof(gameID), (const char *) discid); - - wbfs_disc_t *disc = WBFS_OpenDisc((u8 *) gameID); - if (!disc) - return false; - - wiidisc_t *wdisc = wd_open_disc((int(*)(void *, u32, u32, void *)) wbfs_disc_read, disc); - if (!wdisc) - { - WBFS_CloseDisc(disc); - return false; - } - - imetHdr = (IMETHeader*) wd_extract_file(wdisc, ALL_PARTITIONS, (char *) "opening.bnr"); - - wd_close_disc(wdisc); - WBFS_CloseDisc(disc); - - if(!imetHdr) - return false; - - if (imetHdr->fcc != 'IMET') - { - free(imetHdr); - imetHdr = NULL; - return false; - } - - return true; -} - -const u16 * OpeningBNR::GetIMETTitle(int lang) -{ - if(!imetHdr || lang < 0 || lang >= 10) - return NULL; - - if(imetHdr->names[lang][0] == 0) - lang = CONF_LANG_ENGLISH; - - return imetHdr->names[lang]; -} - -const u8 * OpeningBNR::GetBannerSound(u32 * size) -{ - if(!imetHdr) - return NULL; - - const U8Header *bnrArcHdr = (U8Header *) (imetHdr + 1); - const U8Entry *fst = (const U8Entry *) (((const u8 *) bnrArcHdr) + bnrArcHdr->rootNodeOffset); - - u32 i; - for (i = 1; i < fst[0].numEntries; ++i) - if (fst[i].fileType == 0 && strcasecmp(u8Filename(fst, i), "sound.bin") == 0) break; - - if (i >= fst[0].numEntries) - { - return NULL; - } - - const u8 *sound_bin = ((const u8 *) bnrArcHdr) + fst[i].fileOffset; - if (((IMD5Header *) sound_bin)->fcc != 'IMD5') - { - return NULL; - } - const u8 *soundChunk = sound_bin + sizeof(IMD5Header); - u32 soundChunkSize = fst[i].fileLength - sizeof(IMD5Header); - - if (*((u32*) soundChunk) == 'LZ77') - { - u32 uncSize = 0; - u8 * uncompressed_data = uncompressLZ77(soundChunk, soundChunkSize, &uncSize); - if (!uncompressed_data) - { - return NULL; - } - if (size) *size = uncSize; - - return uncompressed_data; - } - - u8 *out = (u8 *) malloc(soundChunkSize); - if (out) - { - memcpy(out, soundChunk, soundChunkSize); - if (size) *size = soundChunkSize; - } - - return out; -} diff --git a/source/banner/OpeningBNR.hpp b/source/banner/OpeningBNR.hpp deleted file mode 100644 index 2ec69a22..00000000 --- a/source/banner/OpeningBNR.hpp +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef OPENING_BNR_HPP_ -#define OPENING_BNR_HPP_ - -#include - -typedef struct _IMETHeader -{ - u8 zeroes[64]; - u32 fcc; - u8 unk[8]; - u32 iconSize; - u32 bannerSize; - u32 soundSize; - u32 flag1; - u16 names[10][42]; // 10 languages (thanks dkosmari for the info) - u16 zeroes_2[7*42]; // padding for 7 more languages (thanks dkosmari for the info) - u8 crypto[16]; -} __attribute__((packed)) IMETHeader; - -class OpeningBNR -{ - public: - OpeningBNR(); - ~OpeningBNR(); - bool Load(const u8 * gameID); - const u16 * GetIMETTitle(int lang); - const u16 * GetIMETTitle(const u8 * gameID, int lang) { Load(gameID); return GetIMETTitle(lang); }; - const u8 * GetBannerSound(u32 * size); - const u8 * GetBannerSound(const u8 * gameID, u32 * size) { Load(gameID); return GetBannerSound(size); }; - private: - IMETHeader *imetHdr; - char gameID[7]; -}; - -class BNRInstance : public OpeningBNR -{ - public: - static BNRInstance * Instance() { if(!instance) instance = new BNRInstance; return instance; }; - static void DestroyInstance() { delete instance; instance = NULL; }; - private: - BNRInstance() { }; - ~BNRInstance() { }; - static BNRInstance * instance; -}; - -#endif diff --git a/source/cheats/cheatmenu.cpp b/source/cheats/cheatmenu.cpp deleted file mode 100644 index 28e824e9..00000000 --- a/source/cheats/cheatmenu.cpp +++ /dev/null @@ -1,165 +0,0 @@ -#include -#include - -#include -#include "libwiigui/gui.h" -#include "libwiigui/gui_customoptionbrowser.h" -#include "prompts/PromptWindows.h" -#include "language/gettext.h" -#include "themes/CTheme.h" -#include "FileOperations/fileops.h" -#include "menu.h" -#include "sys.h" -#include "gct.h" - -/**************************************************************************** - * CheatMenu - ***************************************************************************/ -int CheatMenu(const char * gameID) -{ - int choice = 0; - bool exit = false; - int ret = 1; - - GuiImageData btnOutline(Resources::GetFile("button_dialogue_box.png"), Resources::GetFileSize("button_dialogue_box.png")); - GuiImageData settingsbg(Resources::GetFile("settings_background.png"), Resources::GetFileSize("settings_background.png")); - GuiImage settingsbackground(&settingsbg); - - GuiTrigger trigA; - trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - GuiTrigger trigB; - trigB.SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B); - - GuiText backBtnTxt(tr( "Back" ), 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - backBtnTxt.SetMaxWidth(btnOutline.GetWidth() - 30); - GuiImage backBtnImg(&btnOutline); - GuiButton backBtn(&backBtnImg, &backBtnImg, 2, 3, -140, 400, &trigA, NULL, btnSoundClick2, 1); - backBtn.SetLabel(&backBtnTxt); - backBtn.SetTrigger(&trigB); - - GuiText createBtnTxt(tr( "Create" ), 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - createBtnTxt.SetMaxWidth(btnOutline.GetWidth() - 30); - GuiImage createBtnImg(&btnOutline); - GuiButton createBtn(&createBtnImg, &createBtnImg, 2, 3, 160, 400, &trigA, NULL, btnSoundClick2, 1); - createBtn.SetLabel(&createBtnTxt); - - char txtfilename[55]; - snprintf(txtfilename, sizeof(txtfilename), "%s%s.txt", Settings.TxtCheatcodespath, gameID); - - GCTCheats c; - int check = c.openTxtfile(txtfilename); - - int download = 0; - - switch (check) - { - case -1: - WindowPrompt(tr( "Error" ), tr( "Cheatfile is blank" ), tr( "OK" )); - break; - case 0: - download = WindowPrompt(tr( "Error" ), tr( "No Cheatfile found" ), tr( "Download Now" ), tr( "Cancel" )); - if (download == 1) - { - download = CodeDownload(gameID); - if (download < 0 || c.openTxtfile(txtfilename) != 1) break; - } - else break; - case 1: - int cntcheats = c.getCnt(); - OptionList cheatslst; - GuiCustomOptionBrowser chtBrowser(400, 280, &cheatslst, "bg_options_settings.png"); - chtBrowser.SetPosition(0, 90); - chtBrowser.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - chtBrowser.SetClickable(true); - - GuiText titleTxt(c.getGameName().c_str(), 28, ( GXColor ) {0, 0, 0, 255}); - titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - titleTxt.SetMaxWidth(350, SCROLL_HORIZONTAL); - titleTxt.SetPosition(12, 40); - - for (int i = 0; i < cntcheats; i++) - { - cheatslst.SetValue(i, "%s", c.getCheatName(i).c_str()); - cheatslst.SetName(i, "OFF"); - } - - HaltGui(); - GuiWindow w(screenwidth, screenheight); - w.Append(&settingsbackground); - w.Append(&titleTxt); - w.Append(&backBtn); - w.Append(&createBtn); - w.Append(&chtBrowser); - mainWindow->SetState(STATE_DISABLED); - mainWindow->ChangeFocus(&w); - mainWindow->Append(&w); - ResumeGui(); - - while (!exit) - { - VIDEO_WaitVSync(); - - ret = chtBrowser.GetClickedOption(); - if (ret != -1) - { - const char *strCheck = cheatslst.GetName(ret); - if (strncmp(strCheck, "ON", 2) == 0) - { - cheatslst.SetName(ret, "%s", "OFF"); - } - else if (strncmp(strCheck, "OFF", 3) == 0) - { - cheatslst.SetName(ret, "%s", "ON"); - } - } - - if (createBtn.GetState() == STATE_CLICKED) - { - createBtn.ResetState(); - if (cntcheats > 0) - { - int selectednrs[30]; - int x = 0; - for (int i = 0; i < cntcheats; i++) - { - const char *strCheck = cheatslst.GetName(i); - if (strncmp(strCheck, "ON", 2) == 0) - { - selectednrs[x] = i; - x++; - } - } - if (x == 0) - { - WindowPrompt(tr( "Error" ), tr( "No cheats were selected" ), tr( "OK" )); - } - else - { - CreateSubfolder(Settings.Cheatcodespath); - string chtpath = Settings.Cheatcodespath; - string gctfname = chtpath + c.getGameID() + ".gct"; - c.createGCT(selectednrs, x, gctfname.c_str()); - WindowPrompt(tr( "GCT File created" ), NULL, tr( "OK" )); - exit = true; - break; - } - } - else WindowPrompt(tr( "Error" ), tr( "Could not create GCT file" ), tr( "OK" )); - } - - if (backBtn.GetState() == STATE_CLICKED) - { - backBtn.ResetState(); - exit = true; - break; - } - } - HaltGui(); - mainWindow->SetState(STATE_DEFAULT); - mainWindow->Remove(&w); - ResumeGui(); - break; - } - - return choice; -} diff --git a/source/cheats/cheatmenu.h b/source/cheats/cheatmenu.h deleted file mode 100644 index d087d9c6..00000000 --- a/source/cheats/cheatmenu.h +++ /dev/null @@ -1,13 +0,0 @@ -/**************************************************************************** - * Cheat Menu - * USB Loader GX 2009 - * - * cheatmenu.h - ***************************************************************************/ - -#ifndef _CHEATMENU_H_ -#define _CHEATMENU_H_ - -int CheatMenu(const char * gameID); - -#endif diff --git a/source/cheats/gct.cpp b/source/cheats/gct.cpp deleted file mode 100644 index b2a71f20..00000000 --- a/source/cheats/gct.cpp +++ /dev/null @@ -1,280 +0,0 @@ -/* - * gct.h - * Class to handle Ocarina TXT Cheatfiles - * nIxx - */ - -#include -#include -#include -#include -#include "gct.h" - -#define ERRORRANGE "Error: CheatNr out of range" - -GCTCheats::GCTCheats(void) -{ - iCntCheats = 0; -} - -GCTCheats::~GCTCheats(void) -{ - - string sGameID = ""; - string sGameTitle = ""; - /*string sCheatName[MAXCHEATS]; - string sCheats[MAXCHEATS]; - string sCheatComment[MAXCHEATS];*/ -} - -int GCTCheats::getCnt() -{ - return iCntCheats; -} - -string GCTCheats::getGameName(void) -{ - return sGameTitle; -} - -string GCTCheats::getGameID(void) -{ - return sGameID; -} - -string GCTCheats::getCheat(int nr) -{ - if (nr <= (iCntCheats - 1)) - { - return sCheats[nr]; - } - else - { - return ERRORRANGE; - } -} - -string GCTCheats::getCheatName(int nr) -{ - if (nr <= (iCntCheats - 1)) - { - return sCheatName[nr]; - } - else - { - return ERRORRANGE; - } -} - -string GCTCheats::getCheatComment(int nr) -{ - if (nr <= (iCntCheats - 1)) - { - return sCheatComment[nr]; - } - else - { - return ERRORRANGE; - } -} - -int GCTCheats::createGCT(int nr, const char * filename) -{ - - if (nr == 0) return 0; - - ofstream filestr; - filestr.open(filename); - - if (filestr.fail()) return 0; - - //Header and Footer - char header[] = { 0x00, 0xd0, 0xc0, 0xde, 0x00, 0xd0, 0xc0, 0xde }; - char footer[] = { 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - - string buf = getCheat(nr); - filestr.write(header, sizeof(header)); - - int x = 0; - long int li; - int len = buf.size(); - - while (x < len) - { - string temp = buf.substr(x, 2); - li = strtol(temp.c_str(), NULL, 16); - temp = li; - filestr.write(temp.c_str(), 1); - x += 2; - } - filestr.write(footer, sizeof(footer)); - - filestr.close(); - return 1; -} - -int GCTCheats::createGCT(const char * chtbuffer, const char * filename) -{ - - ofstream filestr; - filestr.open(filename); - - if (filestr.fail()) return 0; - - //Header and Footer - char header[] = { 0x00, 0xd0, 0xc0, 0xde, 0x00, 0xd0, 0xc0, 0xde }; - char footer[] = { 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - - string buf = chtbuffer; - filestr.write(header, sizeof(header)); - - int x = 0; - long int li; - int len = buf.size(); - - while (x < len) - { - string temp = buf.substr(x, 2); - li = strtol(temp.c_str(), NULL, 16); - temp = li; - filestr.write(temp.c_str(), 1); - x += 2; - } - - filestr.write(footer, sizeof(footer)); - - filestr.close(); - - return 1; -} - -int GCTCheats::createGCT(int nr[], int cnt, const char * filename) -{ - - if (cnt == 0) return 0; - - ofstream filestr; - filestr.open(filename); - - if (filestr.fail()) return 0; - - //Header and Footer - char header[] = { 0x00, 0xd0, 0xc0, 0xde, 0x00, 0xd0, 0xc0, 0xde }; - char footer[] = { 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - - filestr.write(header, sizeof(header)); - - int c = 0; - while (c != cnt) - { - int actnr = nr[c]; - string buf = getCheat(actnr); - long int li; - int len = buf.size(); - int x = 0; - - while (x < len) - { - string temp = buf.substr(x, 2); - li = strtol(temp.c_str(), NULL, 16); - temp = li; - filestr.write(temp.c_str(), 1); - x += 2; - } - c++; - } - - filestr.write(footer, sizeof(footer)); - filestr.close(); - return 1; -} - -int GCTCheats::openTxtfile(const char * filename) -{ - ifstream filestr; - int i = 0; - string str; - filestr.open(filename); - - if (filestr.fail()) return 0; - - filestr.seekg(0, ios_base::end); - int size = filestr.tellg(); - if (size <= 0) return -1; - filestr.seekg(0, ios_base::beg); - - getline(filestr, sGameID); - if (sGameID[sGameID.length() - 1] == '\r') sGameID.erase(sGameID.length() - 1); - - getline(filestr, sGameTitle); - if (sGameTitle[sGameTitle.length() - 1] == '\r') sGameTitle.erase(sGameTitle.length() - 1); - - getline(filestr, sCheatName[i]); // skip first line if file uses CRLF - if (!sGameTitle[sGameTitle.length() - 1] == '\r') filestr.seekg(0, ios_base::beg); - - while (!filestr.eof()) - { - getline(filestr, sCheatName[i]); // '\n' delimiter by default - if (sCheatName[i][sCheatName[i].length() - 1] == '\r') sCheatName[i].erase(sCheatName[i].length() - 1); - - string cheatdata; - bool emptyline = false; - - do - { - getline(filestr, str); - if (str[str.length() - 1] == '\r') str.erase(str.length() - 1); - - if (str == "" || str[0] == '\r' || str[0] == '\n') - { - emptyline = true; - break; - } - - if (IsCode(str)) - { - // remove any garbage (comment) after code - while (str.size() > 17) - { - str.erase(str.length() - 1); - } - cheatdata.append(str); - size_t found = cheatdata.find(' '); - cheatdata.replace(found, 1, ""); - } - else - { - //printf("%i",str.size()); - sCheatComment[i] = str; - } - if (filestr.eof()) break; - - } while (!emptyline); - - sCheats[i] = cheatdata; - i++; - if (i == MAXCHEATS) break; - } - iCntCheats = i; - filestr.close(); - return 1; -} - -bool GCTCheats::IsCode(const std::string& str) -{ - if (str[8] == ' ' && str.size() >= 17) - { - // accept strings longer than 17 in case there is a comment on the same line as the code - char part1[9]; - char part2[9]; - snprintf(part1, sizeof(part1), "%c%c%c%c%c%c%c%c", str[0], str[1], str[2], str[3], str[4], str[5], str[6], - str[7]); - snprintf(part2, sizeof(part2), "%c%c%c%c%c%c%c%c", str[9], str[10], str[11], str[12], str[13], str[14], - str[15], str[16]); - if ((strtok(part1, "0123456789ABCDEFabcdef") == NULL) && (strtok(part2, "0123456789ABCDEFabcdef") == NULL)) - { - return true; - } - } - return false; -} diff --git a/source/cheats/gct.h b/source/cheats/gct.h deleted file mode 100644 index d7f0ad20..00000000 --- a/source/cheats/gct.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * gct.h - * Class to handle Ocarina TXT Cheatfiles - * - */ - -#ifndef _GCT_H -#define _GCT_H - -#include - -#define MAXCHEATS 300 - -using namespace std; - -//!Handles Ocarina TXT Cheatfiles -class GCTCheats -{ - private: - string sGameID; - string sGameTitle; - string sCheatName[MAXCHEATS]; - string sCheats[MAXCHEATS]; - string sCheatComment[MAXCHEATS]; - int iCntCheats; - - public: - //!Constructor - GCTCheats(void); - //!Destructor - ~GCTCheats(void); - //!Open txt file with cheats - //!\param filename name of TXT file - //!\return error code - int openTxtfile(const char * filename); - //!Creates GCT file for one cheat - //!\param nr selected Cheat Numbers - //!\param filename name of GCT file - //!\return error code - int createGCT(int nr, const char * filename); - //!Creates GCT file from a buffer - //!\param chtbuffer buffer that holds the cheat data - //!\param filename name of GCT file - //!\return error code - int createGCT(const char * chtbuffer, const char * filename); - //!Creates GCT file - //!\param nr[] array of selected Cheat Numbers - //!\param cnt size of array - //!\param filename name of GCT file - //!\return error code - int createGCT(int nr[], int cnt, const char * filename); - //!Gets Count cheats - //!\return Count cheats - int getCnt(); - //!Gets Game Name - //!\return Game Name - string getGameName(void); - //!Gets GameID - //!\return GameID - string getGameID(void); - //!Gets cheat data - //!\return cheat data - string getCheat(int nr); - //!Gets Cheat Name - //!\return Cheat Name - string getCheatName(int nr); - //!Gets Cheat Comment - //!\return Cheat Comment - string getCheatComment(int nr); - //!Check if string is a code - //!\return true/false - bool IsCode(const std::string& s); -}; - -#endif /* _GCT_H */ diff --git a/source/filelist.h b/source/filelist.h deleted file mode 100644 index dd364ad0..00000000 --- a/source/filelist.h +++ /dev/null @@ -1,538 +0,0 @@ -/**************************************************************************** - * libwiigui Template - * Tantric 2009 - * - * imagelist.h - * Contains a list of all of the files in the images, fonts, sounds folders - ***************************************************************************/ - -#ifndef _FILELIST_H_ -#define _FILELIST_H_ - -#include - -extern const u8 font_ttf[]; -extern const u32 font_ttf_size; - -extern const u8 clock_ttf[]; -extern const u32 clock_ttf_size; - -extern const u8 closebutton_png[]; -extern const u32 closebutton_png_size; - -extern const u8 gxlogo_png[]; -extern const u32 gxlogo_png_size; - -extern const u8 sdcard_png[]; -extern const u32 sdcard_png_size; - -extern const u8 sdcard_over_png[]; -extern const u32 sdcard_over_png_size; - -extern const u8 Wifi_btn_png[]; -extern const u32 Wifi_btn_png_size; - -extern const u8 Channel_btn_png[]; -extern const u32 Channel_btn_png_size; - -extern const u8 wiimote_png[]; -extern const u32 wiimote_png_size; - -extern const u8 bg_music_ogg[]; -extern const u32 bg_music_ogg_size; - -extern const u8 credits_music_ogg[]; -extern const u32 credits_music_ogg_size; - -extern const u8 gameinfo1_png[]; -extern const u32 gameinfo1_png_size; - -extern const u8 gameinfo2_png[]; -extern const u32 gameinfo2_png_size; - -extern const u8 gameinfo1a_png[]; -extern const u32 gameinfo1a_png_size; - -extern const u8 gameinfo2a_png[]; -extern const u32 gameinfo2a_png_size; - -extern const u8 menuin_ogg[]; -extern const u32 menuin_ogg_size; - -extern const u8 menuout_ogg[]; -extern const u32 menuout_ogg_size; - -extern const u8 success_ogg[]; -extern const u32 success_ogg_size; - -extern const u8 credits_button_png[]; -extern const u32 credits_button_png_size; - -extern const u8 credits_button_over_png[]; -extern const u32 credits_button_over_png_size; - -extern const u8 button_over_wav[]; -extern const u32 button_over_wav_size; - -extern const u8 button_click_wav[]; -extern const u32 button_click_wav_size; - -extern const u8 button_click2_wav[]; -extern const u32 button_click2_wav_size; - -extern const u8 tooltip_left_png[]; -extern const u32 tooltip_left_png_size; - -extern const u8 tooltip_tile_png[]; -extern const u32 tooltip_tile_png_size; - -extern const u8 tooltip_right_png[]; -extern const u32 tooltip_right_png_size; - -extern const u8 startgame_arrow_left_png[]; -extern const u32 startgame_arrow_left_png_size; - -extern const u8 startgame_arrow_right_png[]; -extern const u32 startgame_arrow_right_png_size; - -extern const u8 credits_bg_png[]; -extern const u32 credits_bg_png_size; - -extern const u8 little_star_png[]; -extern const u32 little_star_png_size; - -extern const u8 background_png[]; -extern const u32 background_png_size; - -extern const u8 wbackground_png[]; -extern const u32 wbackground_png_size; - -extern const u8 bg_options_settings_png[]; -extern const u32 bg_options_settings_png_size; - -extern const u8 settings_background_png[]; -extern const u32 settings_background_png_size; - -extern const u8 bg_browser_png[]; -extern const u32 bg_browser_png_size; - -extern const u8 icon_folder_png[]; -extern const u32 icon_folder_png_size; - -extern const u8 bg_browser_selection_png[]; -extern const u32 bg_browser_selection_png_size; - -extern const u8 addressbar_textbox_png[]; -extern const u32 addressbar_textbox_png_size; - -extern const u8 browser_png[]; -extern const u32 browser_png_size; - -extern const u8 browser_over_png[]; -extern const u32 browser_over_png_size; - -extern const u8 nocover_png[]; -extern const u32 nocover_png_size; - -extern const u8 nocoverFlat_png[]; -extern const u32 nocoverFlat_png_size; - -extern const u8 nodisc_png[]; -extern const u32 nodisc_png_size; - -extern const u8 theme_dialogue_box_png[]; -extern const u32 theme_dialogue_box_png_size; - -extern const u8 button_install_png[]; -extern const u32 button_install_png_size; - -extern const u8 button_install_over_png[]; -extern const u32 button_install_over_png_size; - -extern const u8 dialogue_box_startgame_png[]; -extern const u32 dialogue_box_startgame_png_size; - -extern const u8 wdialogue_box_startgame_png[]; -extern const u32 wdialogue_box_startgame_png_size; - -extern const u8 button_dialogue_box_png[]; -extern const u32 button_dialogue_box_png_size; - -extern const u8 keyboard_textbox_png[]; -extern const u32 keyboard_textbox_png_size; - -extern const u8 keyboard_key_png[]; -extern const u32 keyboard_key_png_size; - -extern const u8 keyboard_key_over_png[]; -extern const u32 keyboard_key_over_png_size; - -extern const u8 keyboard_mediumkey_over_png[]; -extern const u32 keyboard_mediumkey_over_png_size; - -extern const u8 keyboard_largekey_over_png[]; -extern const u32 keyboard_largekey_over_png_size; - -extern const u8 keyboard_backspace_over_png[]; -extern const u32 keyboard_backspace_over_png_size; - -extern const u8 keyboard_clear_over_png[]; -extern const u32 keyboard_clear_over_png_size; - -extern const u8 menu_button_png[]; -extern const u32 menu_button_png_size; - -extern const u8 menu_button_over_png[]; -extern const u32 menu_button_over_png_size; - -extern const u8 settings_button_png[]; -extern const u32 settings_button_png_size; - -extern const u8 settings_button_over_png[]; -extern const u32 settings_button_over_png_size; - -extern const u8 wiimote_poweroff_png[]; -extern const u32 wiimote_poweroff_png_size; - -extern const u8 dialogue_box_png[]; -extern const u32 dialogue_box_png_size; - -extern const u8 theme_box_png[]; -extern const u32 theme_box_png_size; - -extern const u8 wiimote_poweroff_over_png[]; -extern const u32 wiimote_poweroff_over_png_size; - -extern const u8 bg_options_png[]; -extern const u32 bg_options_png_size; - -extern const u8 bg_options_entry_png[]; -extern const u32 bg_options_entry_png_size; - -extern const u8 scrollbar_png[]; -extern const u32 scrollbar_png_size; - -extern const u8 scrollbar_arrowup_png[]; -extern const u32 scrollbar_arrowup_png_size; - -extern const u8 scrollbar_arrowdown_png[]; -extern const u32 scrollbar_arrowdown_png_size; - -extern const u8 scrollbar_box_png[]; -extern const u32 scrollbar_box_png_size; - -extern const u8 progressbar_png[]; -extern const u32 progressbar_png_size; - -extern const u8 progressbar_empty_png[]; -extern const u32 progressbar_empty_png_size; - -extern const u8 progressbar_outline_png[]; -extern const u32 progressbar_outline_png_size; - -extern const u8 player1_point_png[]; -extern const u32 player1_point_png_size; - -extern const u8 player2_point_png[]; -extern const u32 player2_point_png_size; - -extern const u8 player3_point_png[]; -extern const u32 player3_point_png_size; - -extern const u8 player4_point_png[]; -extern const u32 player4_point_png_size; - -extern const u8 rplayer1_point_png[]; -extern const u32 rplayer1_point_png_size; - -extern const u8 rplayer2_point_png[]; -extern const u32 rplayer2_point_png_size; - -extern const u8 rplayer3_point_png[]; -extern const u32 rplayer3_point_png_size; - -extern const u8 rplayer4_point_png[]; -extern const u32 rplayer4_point_png_size; - -extern const u8 battery_png[]; -extern const u32 battery_png_size; - -extern const u8 battery_bar_png[]; -extern const u32 battery_bar_png_size; - -extern const u8 battery_white_png[]; -extern const u32 battery_white_png_size; - -extern const u8 battery_bar_white_png[]; -extern const u32 battery_bar_white_png_size; - -extern const u8 battery_red_png[]; -extern const u32 battery_red_png_size; - -extern const u8 battery_bar_red_png[]; -extern const u32 battery_bar_red_png_size; - -extern const u8 exit_top_png[]; -extern const u32 exit_top_png_size; - -extern const u8 exit_top_over_png[]; -extern const u32 exit_top_over_png_size; - -extern const u8 exit_bottom_png[]; -extern const u32 exit_bottom_png_size; - -extern const u8 exit_bottom_over_png[]; -extern const u32 exit_bottom_over_png_size; - -extern const u8 exit_button_png[]; -extern const u32 exit_button_png_size; - -extern const u8 favorite_png[]; -extern const u32 favorite_png_size; - -extern const u8 not_favorite_png[]; -extern const u32 not_favorite_png_size; - -extern const u8 favIcon_png[]; -extern const u32 favIcon_png_size; - -extern const u8 favIcon_gray_png[]; -extern const u32 favIcon_gray_png_size; - -extern const u8 searchIcon_png[]; -extern const u32 searchIcon_png_size; - -extern const u8 searchIcon_gray_png[]; -extern const u32 searchIcon_gray_png_size; - -extern const u8 abcIcon_png[]; -extern const u32 abcIcon_png_size; - -extern const u8 abcIcon_gray_png[]; -extern const u32 abcIcon_gray_png_size; - -extern const u8 rankIcon_png[]; -extern const u32 rankIcon_png_size; - -extern const u8 rankIcon_gray_png[]; -extern const u32 rankIcon_gray_png_size; - -extern const u8 playCountIcon_png[]; -extern const u32 playCountIcon_png_size; - -extern const u8 playCountIcon_gray_png[]; -extern const u32 playCountIcon_gray_png_size; - -extern const u8 arrangeList_png[]; -extern const u32 arrangeList_png_size; - -extern const u8 arrangeList_gray_png[]; -extern const u32 arrangeList_gray_png_size; - -extern const u8 arrangeGrid_png[]; -extern const u32 arrangeGrid_png_size; - -extern const u8 arrangeGrid_gray_png[]; -extern const u32 arrangeGrid_gray_png_size; - -extern const u8 arrangeCarousel_png[]; -extern const u32 arrangeCarousel_png_size; - -extern const u8 arrangeCarousel_gray_png[]; -extern const u32 arrangeCarousel_gray_png_size; - -extern const u8 settings_title_png[]; -extern const u32 settings_title_png_size; - -extern const u8 settings_title_over_png[]; -extern const u32 settings_title_over_png_size; - -extern const u8 pageindicator_png[]; -extern const u32 pageindicator_png_size; - -extern const u8 Wiimote1_png[]; -extern const u32 Wiimote1_png_size; - -extern const u8 Wiimote2_png[]; -extern const u32 Wiimote2_png_size; - -extern const u8 Wiimote4_png[]; -extern const u32 Wiimote4_png_size; - -extern const u8 wifi1_png[]; -extern const u32 wifi1_png_size; - -extern const u8 wifi2_png[]; -extern const u32 wifi2_png_size; - -extern const u8 wifi3_png[]; -extern const u32 wifi3_png_size; - -extern const u8 wifi4_png[]; -extern const u32 wifi4_png_size; - -extern const u8 wifi8_png[]; -extern const u32 wifi8_png_size; - -extern const u8 wifi12_png[]; -extern const u32 wifi12_png_size; - -extern const u8 wifi16_png[]; -extern const u32 wifi16_png_size; - -extern const u8 wifi32_png[]; -extern const u32 wifi32_png_size; - -extern const u8 norating_png[]; -extern const u32 norating_png_size; - -extern const u8 guitar_png[]; -extern const u32 guitar_png_size; -extern const u8 guitarR_png[]; -extern const u32 guitarR_png_size; - -extern const u8 microphone_png[]; -extern const u32 microphone_png_size; -extern const u8 microphoneR_png[]; -extern const u32 microphoneR_png_size; - -extern const u8 gcncontroller_png[]; -extern const u32 gcncontroller_png_size; -extern const u8 gcncontrollerR_png[]; -extern const u32 gcncontrollerR_png_size; - -extern const u8 classiccontroller_png[]; -extern const u32 classiccontroller_png_size; -extern const u8 classiccontrollerR_png[]; -extern const u32 classiccontrollerR_png_size; - -extern const u8 nunchuk_png[]; -extern const u32 nunchuk_png_size; -extern const u8 nunchukR_png[]; -extern const u32 nunchukR_png_size; - -extern const u8 dancepad_png[]; -extern const u32 dancepad_png_size; -extern const u8 dancepadR_png[]; -extern const u32 dancepadR_png_size; - -extern const u8 balanceboard_png[]; -extern const u32 balanceboard_png_size; -extern const u8 balanceboardR_png[]; -extern const u32 balanceboardR_png_size; - -extern const u8 drums_png[]; -extern const u32 drums_png_size; -extern const u8 drumsR_png[]; -extern const u32 drumsR_png_size; - -extern const u8 motionplus_png[]; -extern const u32 motionplus_png_size; -extern const u8 motionplusR_png[]; -extern const u32 motionplusR_png_size; - -extern const u8 wheel_png[]; -extern const u32 wheel_png_size; -extern const u8 wheelR_png[]; -extern const u32 wheelR_png_size; - -extern const u8 zapper_png[]; -extern const u32 zapper_png_size; -extern const u8 zapperR_png[]; -extern const u32 zapperR_png_size; - -extern const u8 wiispeak_png[]; -extern const u32 wiispeak_png_size; -extern const u8 wiispeakR_png[]; -extern const u32 wiispeakR_png_size; - -extern const u8 nintendods_png[]; -extern const u32 nintendods_png_size; -extern const u8 nintendodsR_png[]; -extern const u32 nintendodsR_png_size; - -extern const u8 esrb_ec_png[]; -extern const u32 esrb_ec_png_size; - -extern const u8 esrb_e_png[]; -extern const u32 esrb_e_png_size; - -extern const u8 esrb_eten_png[]; -extern const u32 esrb_eten_png_size; - -extern const u8 esrb_t_png[]; -extern const u32 esrb_t_png_size; - -extern const u8 esrb_m_png[]; -extern const u32 esrb_m_png_size; - -extern const u8 esrb_ao_png[]; -extern const u32 esrb_ao_png_size; - -extern const u8 cero_a_png[]; -extern const u32 cero_a_png_size; - -extern const u8 cero_b_png[]; -extern const u32 cero_b_png_size; - -extern const u8 cero_c_png[]; -extern const u32 cero_c_png_size; - -extern const u8 cero_d_png[]; -extern const u32 cero_d_png_size; - -extern const u8 cero_z_png[]; -extern const u32 cero_z_png_size; - -extern const u8 pegi_3_png[]; -extern const u32 pegi_3_png_size; - -extern const u8 pegi_7_png[]; -extern const u32 pegi_7_png_size; - -extern const u8 pegi_12_png[]; -extern const u32 pegi_12_png_size; - -extern const u8 pegi_16_png[]; -extern const u32 pegi_16_png_size; - -extern const u8 pegi_18_png[]; -extern const u32 pegi_18_png_size; - -extern const u8 usbport_png[]; -extern const u32 usbport_png_size; - -extern const u8 dvd_png[]; -extern const u32 dvd_png_size; - -extern const u8 dvd_gray_png[]; -extern const u32 dvd_gray_png_size; - -extern const u8 new_png[]; -extern const u32 new_png_size; - -extern const u8 lock_png[]; -extern const u32 lock_png_size; - -extern const u8 lock_gray_png[]; -extern const u32 lock_gray_png_size; - -extern const u8 unlock_png[]; -extern const u32 unlock_png_size; - -extern const u8 unlock_gray_png[]; -extern const u32 unlock_gray_png_size; - -extern const u8 boxBorder_png[]; -extern const u32 boxBorder_png_size; - -extern const u8 nocoverFull_png[]; -extern const u32 nocoverFull_png_size; - -extern const u8 playersSort_png[]; -extern const u32 playersSort_png_size; - -extern const u8 stub_bin[]; -extern const u32 stub_bin_size; - -#endif diff --git a/source/fonts/clock.ttf b/source/fonts/clock.ttf deleted file mode 100644 index 5a252b2b..00000000 Binary files a/source/fonts/clock.ttf and /dev/null differ diff --git a/source/fonts/font.ttf b/source/fonts/font.ttf deleted file mode 100644 index 01ce5816..00000000 Binary files a/source/fonts/font.ttf and /dev/null differ diff --git a/source/gecko.c b/source/gecko.c deleted file mode 100644 index b086cda1..00000000 --- a/source/gecko.c +++ /dev/null @@ -1,119 +0,0 @@ -#include -#include -#include -#include -#include - -/* init-globals */ -static bool geckoinit = false; - -#ifndef NO_DEBUG -#include - -void gprintf(const char *format, ...) -{ - if (!geckoinit) - return; - - char * tmp = NULL; - va_list va; - va_start(va, format); - if((vasprintf(&tmp, format, va) >= 0) && tmp) - { - usb_sendbuffer(1, tmp, strlen(tmp)); - } - va_end(va); - - if(tmp) - free(tmp); -} - -bool InitGecko() -{ - u32 geckoattached = usb_isgeckoalive(EXI_CHANNEL_1); - if (geckoattached) - { - usb_flush(EXI_CHANNEL_1); - geckoinit = true; - return true; - } - - return false; -} - -char ascii(char s) -{ - if (s < 0x20) return '.'; - if (s > 0x7E) return '.'; - return s; -} - -void hexdump(void *d, int len) -{ - u8 *data; - int i, off; - data = (u8*) d; - - gprintf("\n 0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF"); - gprintf("\n==== =============================================== ================\n"); - - for (off = 0; off < len; off += 16) - { - gprintf("%04x ", off); - for (i = 0; i < 16; i++) - if ((i + off) >= len) - gprintf(" "); - else gprintf("%02x ", data[off + i]); - - gprintf(" "); - for (i = 0; i < 16; i++) - if ((i + off) >= len) - gprintf(" "); - else gprintf("%c", ascii(data[off + i])); - gprintf("\n"); - } -} - -static ssize_t __out_write(struct _reent *r, int fd, const char *ptr, size_t len) -{ - if(geckoinit && ptr) - usb_sendbuffer(1, ptr, len); - - return len; -} - -static const devoptab_t gecko_out = { - "stdout", // device name - 0, // size of file structure - NULL, // device open - NULL, // device close - __out_write,// device write - NULL, // device read - NULL, // device seek - NULL, // device fstat - NULL, // device stat - NULL, // device link - NULL, // device unlink - NULL, // device chdir - NULL, // device rename - NULL, // device mkdir - 0, // dirStateSize - NULL, // device diropen_r - NULL, // device dirreset_r - NULL, // device dirnext_r - NULL, // device dirclose_r - NULL, // device statvfs_r - NULL, // device ftruncate_r - NULL, // device fsync_r - NULL, // device deviceData - NULL, // device chmod_r - NULL, // device fchmod_r -}; - -void USBGeckoOutput() -{ - devoptab_list[STD_OUT] = &gecko_out; - devoptab_list[STD_ERR] = &gecko_out; -} - -#endif /* NO_DEBUG */ diff --git a/source/gecko.h b/source/gecko.h deleted file mode 100644 index 029257cb..00000000 --- a/source/gecko.h +++ /dev/null @@ -1,29 +0,0 @@ - -#ifndef _GECKO_H_ -#define _GECKO_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - - char ascii(char s); - -#ifndef NO_DEBUG - //use this just like printf(); - void gprintf(const char *str, ...); - bool InitGecko(); - void hexdump(void *d, int len); - void USBGeckoOutput(); -#else -#define gprintf(...) -#define InitGecko() false -#define hexdump( x, y ) -#endif /* NO_DEBUG */ - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/source/homebrewboot/BootHomebrew.cpp b/source/homebrewboot/BootHomebrew.cpp deleted file mode 100644 index 6750a5fa..00000000 --- a/source/homebrewboot/BootHomebrew.cpp +++ /dev/null @@ -1,170 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "Controls/DeviceHandler.hpp" -#include "../lstub.h" -#include "../sys.h" -#include "../gecko.h" - -#include "dolloader.h" - -static u8 *homebrewbuffer = (u8 *) 0x92000000; -static u32 homebrewsize = 0; -static std::vector Arguments; - -extern const u8 app_booter_dol[]; -extern const u32 app_booter_dol_size; - -void AddBootArgument(const char * argv) -{ - std::string arg(argv); - Arguments.push_back(arg); -} - -int CopyHomebrewMemory(u8 *temp, u32 pos, u32 len) -{ - homebrewsize += len; - memcpy((homebrewbuffer) + pos, temp, len); - - return 1; -} - -void FreeHomebrewBuffer() -{ - homebrewbuffer = (u8 *) 0x92000000; - homebrewsize = 0; - - Arguments.clear(); -} - -static int SetupARGV(struct __argv * args) -{ - if (!args) return -1; - - bzero(args, sizeof(struct __argv)); - args->argvMagic = ARGV_MAGIC; - - u32 stringlength = 1; - - /** Append Arguments **/ - for (u32 i = 0; i < Arguments.size(); i++) - { - stringlength += Arguments[i].size() + 1; - } - - args->length = stringlength; - args->commandLine = (char*) malloc(args->length); - - if (!args->commandLine) return -1; - - u32 argc = 0; - u32 position = 0; - - /** Append Arguments **/ - for (u32 i = 0; i < Arguments.size(); i++) - { - strcpy(&args->commandLine[position], Arguments[i].c_str()); - position += Arguments[i].size() + 1; - argc++; - } - - args->argc = argc; - - args->commandLine[args->length - 1] = '\0'; - args->argv = &args->commandLine; - args->endARGV = args->argv + 1; - - Arguments.clear(); - - return 0; -} - -static int RunAppbooter() -{ - if (homebrewsize == 0) return -1; - - ExitApp(); - - struct __argv args; - SetupARGV(&args); - - u32 cpu_isr; - - entrypoint entry = (entrypoint) load_dol((void*) app_booter_dol, &args); - - if (!entry) - { - FreeHomebrewBuffer(); - return -1; - } - - u64 currentStub = getStubDest(); - loadStub(); - - if (Set_Stub_Split(0x00010001, "UNEO") < 0) - { - if (Set_Stub_Split(0x00010001, "ULNR") < 0) - { - if (!currentStub) currentStub = 0x100000002ULL; - - Set_Stub(currentStub); - } - } - - SYS_ResetSystem(SYS_SHUTDOWN, 0, 0); - _CPU_ISR_Disable( cpu_isr ); - __exception_closeall(); - entry(); - _CPU_ISR_Restore( cpu_isr ); - - return 0; -} - -int BootHomebrew(const char * filepath) -{ - void *buffer = NULL; - u32 filesize = 0; - - FILE *file = fopen(filepath, "rb"); - - if (!file) return -1; - - fseek(file, 0, SEEK_END); - filesize = ftell(file); - rewind(file); - - buffer = malloc(filesize); - - if (fread(buffer, 1, filesize, file) != filesize) - { - fclose(file); - free(buffer); - DeviceHandler::DestroyInstance(); - Sys_BackToLoader(); - } - - fclose(file); - - CopyHomebrewMemory((u8*) buffer, 0, filesize); - - if (buffer) - { - free(buffer); - buffer = NULL; - } - - AddBootArgument(filepath); - return RunAppbooter(); -} - -int BootHomebrewFromMem() -{ - return RunAppbooter(); -} diff --git a/source/homebrewboot/BootHomebrew.h b/source/homebrewboot/BootHomebrew.h deleted file mode 100644 index f68c67f7..00000000 --- a/source/homebrewboot/BootHomebrew.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _BOOTHOMEBREW_H_ -#define _BOOTHOMEBREW_H_ - -int BootHomebrew(const char * filepath); -int BootHomebrewFromMem(); -int CopyHomebrewMemory(u8 *temp, u32 pos, u32 len); -void AddBootArgument(const char * arg); -void FreeHomebrewBuffer(); - -#endif diff --git a/source/homebrewboot/HomebrewBrowse.cpp b/source/homebrewboot/HomebrewBrowse.cpp deleted file mode 100644 index f9bfb947..00000000 --- a/source/homebrewboot/HomebrewBrowse.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include "HomebrewBrowser.hpp" - -/**************************************************************************** - * MenuHomebrewBrowse - ***************************************************************************/ -int MenuHomebrewBrowse() -{ - HomebrewBrowser * Menu = new HomebrewBrowser(); - mainWindow->Append(Menu); - - Menu->ShowMenu(); - - int returnMenu = MENU_NONE; - - while((returnMenu = Menu->MainLoop()) == MENU_NONE); - - delete Menu; - - return returnMenu; -} diff --git a/source/homebrewboot/HomebrewBrowse.h b/source/homebrewboot/HomebrewBrowse.h deleted file mode 100644 index f1605bb3..00000000 --- a/source/homebrewboot/HomebrewBrowse.h +++ /dev/null @@ -1,16 +0,0 @@ -/**************************************************************************** - * HomebrewBrowse - * USB Loader GX 2009 - * - * Homebrew launcher for USB Loader GX - * - * homebrewbrowse.h - ***************************************************************************/ - -#ifndef _HOMEBREWBROWSE_H_ -#define _HOMEBREWBROWSE_H_ - -int roundup(float number); -int MenuHomebrewBrowse(); - -#endif diff --git a/source/homebrewboot/HomebrewBrowser.cpp b/source/homebrewboot/HomebrewBrowser.cpp deleted file mode 100644 index 43262cde..00000000 --- a/source/homebrewboot/HomebrewBrowser.cpp +++ /dev/null @@ -1,391 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include "HomebrewBrowser.hpp" -#include "themes/CTheme.h" -#include "prompts/PromptWindows.h" -#include "language/gettext.h" -#include "network/networkops.h" -#include "utils/minizip/miniunz.h" -#include "usbloader/utils.h" -#include "prompts/TitleBrowser.h" -#include "homebrewboot/BootHomebrew.h" -#include "prompts/ProgressWindow.h" -#include "wstring.hpp" -#include "HomebrewXML.h" - -extern u32 infilesize; -extern u32 uncfilesize; -extern char wiiloadVersion[2]; -extern int connection; - -HomebrewBrowser::HomebrewBrowser() - : FlyingButtonsMenu(tr( "Homebrew Launcher" )) -{ - HomebrewList = new HomebrewFiles(Settings.homebrewapps_path); - - if (IsNetworkInit()) - ResumeNetworkWait(); - - wifiNotSet = true; - wifiImgData = Resources::GetImageData("Wifi_btn.png"); - wifiToolTip = new GuiTooltip(" "); - wifiImg = new GuiImage(wifiImgData); - wifiBtn = new GuiButton(wifiImgData->GetWidth(), wifiImgData->GetHeight()); - wifiBtn->SetImage(wifiImg); - wifiBtn->SetPosition(300, 400); - wifiBtn->SetSoundOver(btnSoundOver); - wifiBtn->SetSoundClick(btnSoundClick); - wifiBtn->SetEffectGrow(); - wifiBtn->SetAlpha(80); - wifiBtn->SetTrigger(trigA); - Append(wifiBtn); - - channelImgData = Resources::GetImageData("Channel_btn.png"); - channelBtnImg = new GuiImage(channelImgData); - channelBtnImg->SetWidescreen(Settings.widescreen); - channelBtn = new GuiButton(channelBtnImg->GetWidth(), channelBtnImg->GetHeight()); - channelBtn->SetPosition(240, 400); - channelBtn->SetImage(channelBtnImg); - channelBtn->SetSoundOver(btnSoundOver); - channelBtn->SetSoundClick(btnSoundClick2); - channelBtn->SetEffectGrow(); - channelBtn->SetTrigger(trigA); - if (Settings.godmode || !(Settings.ParentalBlocks & BLOCK_TITLE_LAUNCHER_MENU)) - Append(channelBtn); - - MainButtonDesc.resize(HomebrewList->GetFilecount()); - MainButtonDescOver.resize(HomebrewList->GetFilecount()); - - for(u32 i = 0; i < 4; ++i) - { - IconImgData[i] = NULL; - IconImg[i] = NULL; - } - - for(int i = 0; i < HomebrewList->GetFilecount(); ++i) - { - MainButtonDesc[i] = new GuiText((char *) NULL, 18, (GXColor) {0, 0, 0, 255}); - MainButtonDesc[i]->SetMaxWidth(MainButtonImgData->GetWidth() - 150, DOTTED); - MainButtonDesc[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - MainButtonDesc[i]->SetPosition(148, 15); - - MainButtonDescOver[i] = new GuiText((char *) NULL, 18, (GXColor) {0, 0, 0, 255}); - MainButtonDescOver[i]->SetMaxWidth(MainButtonImgData->GetWidth() - 150, SCROLL_HORIZONTAL); - MainButtonDescOver[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - MainButtonDescOver[i]->SetPosition(148, 15); - } - - SetupMainButtons(); -} - -HomebrewBrowser::~HomebrewBrowser() -{ - HaltGui(); - delete HomebrewList; - - Remove(wifiBtn); - delete wifiImgData; - delete wifiImg; - delete wifiToolTip; - delete wifiBtn; - - Remove(channelBtn); - delete channelImgData; - delete channelBtnImg; - delete channelBtn; - - for(u32 i = 0; i < MainButtonDesc.size(); ++i) - { - delete MainButtonDesc[i]; - delete MainButtonDescOver[i]; - MainButton[i]->SetLabel(NULL, 1); - MainButton[i]->SetLabelOver(NULL, 1); - } - - if (IsNetworkInit()) - HaltNetworkThread(); -} - -void HomebrewBrowser::AddMainButtons() -{ - HaltGui(); - - for(u32 i = 0; i < 4; ++i) - { - if(IconImgData[i]) - delete IconImgData[i]; - if(IconImg[i]) - delete IconImg[i]; - IconImgData[i] = NULL; - IconImg[i] = NULL; - } - - for(u32 i = 0; i < MainButton.size(); ++i) - MainButton[i]->SetIcon(NULL); - - char iconpath[200]; - int FirstItem = currentPage*DISPLAY_BUTTONS; - - for(int i = FirstItem, n = 0; i < (int) MainButton.size() && i < FirstItem+DISPLAY_BUTTONS; ++i, ++n) - { - snprintf(iconpath, sizeof(iconpath), "%sicon.png", HomebrewList->GetFilepath(i)); - IconImgData[n] = new GuiImageData(iconpath); - IconImg[n] = new GuiImage(IconImgData[n]); - IconImg[n]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - IconImg[n]->SetPosition(12, 0); - IconImg[n]->SetScale(0.95); - MainButton[i]->SetIcon(IconImg[n]); - } - - FlyingButtonsMenu::AddMainButtons(); -} - -void HomebrewBrowser::SetupMainButtons() -{ - HomebrewXML MetaXML; - char metapath[200]; - - for(int i = 0; i < HomebrewList->GetFilecount(); ++i) - { - const char * HomebrewName = NULL; - snprintf(metapath, sizeof(metapath), "%smeta.xml", HomebrewList->GetFilepath(i)); - - if (MetaXML.LoadHomebrewXMLData(metapath) > 0) - { - HomebrewName = MetaXML.GetName(); - MainButtonDesc[i]->SetText(MetaXML.GetShortDescription()); - MainButtonDescOver[i]->SetText(MetaXML.GetShortDescription()); - } - else - { - const char * shortpath = strrchr(HomebrewList->GetFilename(i), '/'); - if(shortpath) - { - snprintf(metapath, sizeof(metapath), "%s/%s", shortpath, HomebrewList->GetFilename(i)); - HomebrewName = metapath; - } - else - HomebrewName = HomebrewList->GetFilename(i); - MainButtonDesc[i]->SetText(" "); - MainButtonDescOver[i]->SetText(" "); - } - - SetMainButton(i, HomebrewName, MainButtonImgData, MainButtonImgOverData); - - MainButtonTxt[i]->SetFontSize(18); - MainButtonTxt[i]->SetMaxWidth(MainButtonImgData->GetWidth() - 150, DOTTED); - MainButtonTxt[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - MainButtonTxt[i]->SetPosition(148, -12); - MainButton[i]->SetLabel(MainButtonDesc[i], 1); - MainButton[i]->SetLabelOver(MainButtonDescOver[i], 1); - } -} - -int HomebrewBrowser::MainLoop() -{ - if (IsNetworkInit() && wifiNotSet) - { - wifiToolTip->SetText(GetNetworkIP()); - wifiBtn->SetAlpha(255); - wifiBtn->SetToolTip(wifiToolTip, 0, -50, 0, 5); - wifiNotSet = false; - } - - if(wifiBtn->GetState() == STATE_CLICKED) - { - ResumeNetworkWait(); - wifiBtn->ResetState(); - } - else if(channelBtn->GetState() == STATE_CLICKED) - { - SetState(STATE_DISABLED); - TitleBrowser(); - SetState(STATE_DEFAULT); - channelBtn->ResetState(); - } - else if (infilesize > 0) - { - int menu = ReceiveFile(); - if(menu != MENU_NONE) - return menu; - CloseConnection(); - ResumeNetworkWait(); - } - - return FlyingButtonsMenu::MainLoop(); -} - -//! Callback for MainButton clicked -void HomebrewBrowser::MainButtonClicked(int button) -{ - HomebrewXML MetaXML; - char metapath[200]; - snprintf(metapath, sizeof(metapath), "%smeta.xml", HomebrewList->GetFilepath(button)); - MetaXML.LoadHomebrewXMLData(metapath); - - u64 filesize = HomebrewList->GetFilesize(button); - - wString HomebrewName(MainButtonTxt[button]->GetText()); - - int choice = HBCWindowPrompt(HomebrewName.toUTF8().c_str(), MetaXML.GetCoder(), MetaXML.GetVersion(), - MetaXML.GetReleasedate(), MetaXML.GetLongDescription(), IconImgData[button % 4], filesize); - - if (choice == 1) - { - char homebrewpath[200]; - snprintf(homebrewpath, sizeof(homebrewpath), "%s%s", HomebrewList->GetFilepath(button), HomebrewList->GetFilename(button)); - BootHomebrew(homebrewpath); - } -} - -int HomebrewBrowser::ReceiveFile() -{ - char filesizetxt[50]; - char temp[50]; - u32 filesize = 0; - - if (infilesize < MB_SIZE) - snprintf(filesizetxt, sizeof(filesizetxt), tr( "Incoming file %0.2fKB" ), infilesize / KB_SIZE); - else snprintf(filesizetxt, sizeof(filesizetxt), tr( "Incoming file %0.2fMB" ), infilesize / MB_SIZE); - - snprintf(temp, sizeof(temp), tr( "Load file from: %s ?" ), GetIncommingIP()); - - int choice = WindowPrompt(filesizetxt, temp, tr( "OK" ), tr( "Cancel" )); - - if (choice == 0) - return MENU_NONE; - - u32 read = 0; - int len = NETWORKBLOCKSIZE; - filesize = infilesize; - u8 * buffer = (u8 *) malloc(infilesize); - if(!buffer) - { - WindowPrompt(tr( "Not enough memory." ), 0, tr( "OK" )); - return MENU_NONE; - } - - bool error = false; - while (read < infilesize) - { - ShowProgress(tr( "Receiving file from:" ), GetIncommingIP(), NULL, read, infilesize, true); - - if (infilesize - read < (u32) len) - len = infilesize - read; - else len = NETWORKBLOCKSIZE; - - int result = network_read(connection, buffer+read, len); - - if (result < 0) - { - WindowPrompt(tr( "Error while transfering data." ), 0, tr( "OK" )); - free(buffer); - return MENU_NONE; - } - if (!result) - { - break; - } - - read += result; - } - - char filename[101]; - network_read(connection, (u8*) &filename, 100); - - // Do we need to unzip this thing? - if (wiiloadVersion[0] > 0 || wiiloadVersion[1] > 4) - { - // We need to unzip... - if (buffer[0] == 'P' && buffer[1] == 'K' && buffer[2] == 0x03 && buffer[3] == 0x04) - { - // It's a zip file, unzip to the apps directory - // Zip archive, ask for permission to install the zip - char zippath[255]; - sprintf(zippath, "%s%s", Settings.homebrewapps_path, filename); - - FILE *fp = fopen(zippath, "wb"); - if (!fp) - { - WindowPrompt(tr( "Error writing the data." ), 0, tr( "OK" )); - return MENU_NONE; - } - - fwrite(buffer, 1, infilesize, fp); - fclose(fp); - - free(buffer); - buffer = NULL; - - // Now unzip the zip file... - unzFile uf = unzOpen(zippath); - if (uf == NULL) - { - WindowPrompt(tr( "Error while opening the zip." ), 0, tr( "OK" )); - return MENU_NONE; - } - - extractZip(uf, 0, 1, 0, Settings.homebrewapps_path); - unzCloseCurrentFile(uf); - - remove(zippath); - - WindowPrompt(tr( "Success:" ), - tr( "Uploaded ZIP file installed to homebrew directory." ), tr( "OK" )); - - // Reload this menu here... - return MENU_HOMEBREWBROWSE; - } - else if (uncfilesize != 0) // if uncfilesize == 0, it's not compressed - { - // It's compressed, uncompress - u8 *unc = (u8 *) malloc(uncfilesize); - uLongf f = uncfilesize; - error = uncompress(unc, &f, buffer, infilesize) != Z_OK; - uncfilesize = f; - filesize = uncfilesize; - - free(buffer); - buffer = unc; - } - } - - CopyHomebrewMemory(buffer, 0, filesize); - free(buffer); - - ProgressStop(); - - if (error || read != infilesize || strcasestr(filename, ".dol") || strcasestr(filename, ".elf")) - { - WindowPrompt(tr( "Error:" ), tr( "No data could be read." ), tr( "OK" )); - FreeHomebrewBuffer(); - return MENU_NONE; - } - - CloseConnection(); - - AddBootArgument(filename); - - return BootHomebrewFromMem(); -} diff --git a/source/homebrewboot/HomebrewBrowser.hpp b/source/homebrewboot/HomebrewBrowser.hpp deleted file mode 100644 index 7f622d0b..00000000 --- a/source/homebrewboot/HomebrewBrowser.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#ifndef HOMEBREWBROWSER_HPP_ -#define HOMEBREWBROWSER_HPP_ - -#include "settings/menus/FlyingButtonsMenu.hpp" -#include "HomebrewFiles.h" - -#define DISPLAY_BUTTONS 4 - -class HomebrewBrowser : public FlyingButtonsMenu -{ - public: - HomebrewBrowser(); - ~HomebrewBrowser(); - virtual int MainLoop(); - protected: - void MainButtonClicked(int index); - int ReceiveFile(); - virtual void CreateSettingsMenu(int index) { MainButtonClicked(index); }; - virtual void DeleteSettingsMenu() { }; - virtual void SetupMainButtons(); - virtual void AddMainButtons(); - - HomebrewFiles * HomebrewList; - GuiImageData * IconImgData[DISPLAY_BUTTONS]; - GuiImage * IconImg[DISPLAY_BUTTONS]; - std::vector MainButtonDesc; - std::vector MainButtonDescOver; - - bool wifiNotSet; - GuiTooltip * wifiToolTip; - GuiImageData * wifiImgData; - GuiImage * wifiImg; - GuiButton * wifiBtn; - - GuiImageData * channelImgData; - GuiImage * channelBtnImg; - GuiButton * channelBtn; -}; - -#endif diff --git a/source/homebrewboot/HomebrewFiles.cpp b/source/homebrewboot/HomebrewFiles.cpp deleted file mode 100644 index 49cc593d..00000000 --- a/source/homebrewboot/HomebrewFiles.cpp +++ /dev/null @@ -1,136 +0,0 @@ -/**************************************************************************** - * HomebrewFiles Class - * for USB Loader GX - ***************************************************************************/ -#include -#include -#include -#include - -#include "HomebrewFiles.h" - -HomebrewFiles::HomebrewFiles(const char * path) -{ - filecount = 0; - - FileInfo = (FileInfos *) malloc(sizeof(FileInfos)); - if (!FileInfo) - { - return; - } - - memset(&FileInfo[filecount], 0, sizeof(FileInfos)); - - this->LoadPath(path); - this->SortList(); -} - -HomebrewFiles::~HomebrewFiles() -{ - if (FileInfo) - { - free(FileInfo); - FileInfo = NULL; - } -} - -bool HomebrewFiles::LoadPath(const char * folderpath) -{ - struct stat st; - DIR *dir = NULL; - struct dirent *dirent = NULL; - char filename[1024]; - - dir = opendir(folderpath); - if (dir == NULL) - { - return false; - } - - while ((dirent = readdir(dir)) != 0) - { - snprintf(filename, 1024, "%s/%s", folderpath, dirent->d_name); - - if(stat(filename, &st) != 0) - continue; - - snprintf(filename, 1024, dirent->d_name); - - if ((st.st_mode & S_IFDIR) != 0) - { - if (strcmp(filename, ".") != 0 && strcmp(filename, "..") != 0) - { - char currentname[200]; - snprintf(currentname, sizeof(currentname), "%s%s/", folderpath, filename); - this->LoadPath(currentname); - } - } - else - { - char temp[5]; - for (int i = 0; i < 5; i++) - { - temp[i] = filename[strlen(filename) - 4 + i]; - } - - if ((strncasecmp(temp, ".dol", 4) == 0 || strncasecmp(temp, ".elf", 4) == 0) && filecount < MAXHOMEBREWS - && filename[0] != '.') - { - - FileInfo = (FileInfos *) realloc(FileInfo, (filecount + 1) * sizeof(FileInfos)); - - if (!FileInfo) - { - free(FileInfo); - FileInfo = NULL; - filecount = 0; - closedir(dir); - return false; - } - - memset(&(FileInfo[filecount]), 0, sizeof(FileInfo)); - - strlcpy(FileInfo[filecount].FilePath, folderpath, sizeof(FileInfo[filecount].FilePath)); - strlcpy(FileInfo[filecount].FileName, filename, sizeof(FileInfo[filecount].FileName)); - FileInfo[filecount].FileSize = st.st_size; - filecount++; - } - } - } - closedir(dir); - - return true; -} - -char * HomebrewFiles::GetFilename(int ind) -{ - if (ind > filecount) - return NULL; - else return FileInfo[ind].FileName; -} - -char * HomebrewFiles::GetFilepath(int ind) -{ - if (ind > filecount) - return NULL; - else return FileInfo[ind].FilePath; -} - -unsigned int HomebrewFiles::GetFilesize(int ind) -{ - if (ind > filecount || !filecount || !FileInfo) - return 0; - else return FileInfo[ind].FileSize; -} - -static int ListCompare(const void *a, const void *b) -{ - FileInfos *ab = (FileInfos*) a; - FileInfos *bb = (FileInfos*) b; - - return stricmp((char *) ab->FilePath, (char *) bb->FilePath); -} -void HomebrewFiles::SortList() -{ - qsort(FileInfo, filecount, sizeof(FileInfos), ListCompare); -} diff --git a/source/homebrewboot/HomebrewFiles.h b/source/homebrewboot/HomebrewFiles.h deleted file mode 100644 index d2bcb259..00000000 --- a/source/homebrewboot/HomebrewFiles.h +++ /dev/null @@ -1,46 +0,0 @@ -/**************************************************************************** - * HomebrewFiles Class - * for USB Loader GX - ***************************************************************************/ -#ifndef ___HOMEBREWFILES_H_ -#define ___HOMEBREWFILES_H_ - -#define MAXHOMEBREWS 500 - -typedef struct -{ - char FileName[100]; - char FilePath[150]; - unsigned int FileSize; -} FileInfos; - -class HomebrewFiles -{ - public: - //!Constructor - //!\param path Path where to check for homebrew files - HomebrewFiles(const char * path); - //!Destructor - ~HomebrewFiles(); - //! Load the dol/elf list of a path - //!\param path Path where to check for homebrew files - bool LoadPath(const char * path); - //! Get the a filename of the list - //!\param list index - char * GetFilename(int index); - //! Get the a filepath of the list - //!\param list index - char * GetFilepath(int index); - //! Get the a filesize of the list - //!\param list index - unsigned int GetFilesize(int index); - //! Get the filecount of the whole list - int GetFilecount() { return filecount; }; - //! Sort list by filepath - void SortList(); - protected: - int filecount; - FileInfos *FileInfo; -}; - -#endif diff --git a/source/homebrewboot/HomebrewXML.cpp b/source/homebrewboot/HomebrewXML.cpp deleted file mode 100644 index 34b19cc3..00000000 --- a/source/homebrewboot/HomebrewXML.cpp +++ /dev/null @@ -1,127 +0,0 @@ -/**************************************************************************** - * HomebrewXML Class - * for USB Loader GX - ***************************************************************************/ -#include -#include -#include -#include -#include "FileOperations/fileops.h" -#include "xml/xml.h" - -#include "HomebrewXML.h" - -#define ENTRIE_SIZE 8192 - -/* qparam filename Filepath of the XML file */ -int HomebrewXML::LoadHomebrewXMLData(const char* filename) -{ - Name.clear(); - Coder.clear(); - Version.clear(); - ShortDescription.clear(); - LongDescription.clear(); - Releasedate.clear(); - - /* Load XML file */ - u8 * xmlbuffer = NULL; - u64 size = 0; - LoadFileToMem(filename, &xmlbuffer, &size); - - if(!xmlbuffer) - return -1; - - mxml_node_t * nodetree = mxmlLoadString(NULL, (const char *) xmlbuffer, MXML_OPAQUE_CALLBACK); - - if (!nodetree) - return -2; - - mxml_node_t * node = mxmlFindElement(nodetree, nodetree, "app", NULL, NULL, MXML_DESCEND_FIRST); - if (!node) - return -5; - - char * Entrie = new char[ENTRIE_SIZE]; - - Entrie[0] = '\0'; - GetTextFromNode(node, nodetree, (char*) "name", NULL, NULL, MXML_DESCEND, Entrie, ENTRIE_SIZE); - Name = Entrie; - - Entrie[0] = '\0'; - GetTextFromNode(node, nodetree, (char*) "coder", NULL, NULL, MXML_DESCEND, Entrie, ENTRIE_SIZE); - Coder = Entrie; - - Entrie[0] = '\0'; - GetTextFromNode(node, nodetree, (char*) "version", NULL, NULL, MXML_DESCEND, Entrie, ENTRIE_SIZE); - Version = Entrie; - - Entrie[0] = '\0'; - GetTextFromNode(node, nodetree, (char*) "short_description", NULL, NULL, MXML_DESCEND, Entrie, ENTRIE_SIZE); - ShortDescription = Entrie; - - Entrie[0] = '\0'; - GetTextFromNode(node, nodetree, (char*) "long_description", NULL, NULL, MXML_DESCEND, Entrie, ENTRIE_SIZE); - LongDescription = Entrie; - - Entrie[0] = '\0'; - GetTextFromNode(node, nodetree, (char*) "release_date", NULL, NULL, MXML_DESCEND, Entrie, ENTRIE_SIZE); - - int len = (strlen(Entrie) - 6); //length of the date string without the 200000 at the end - if (len == 8) - snprintf(Entrie, ENTRIE_SIZE, "%c%c/%c%c/%c%c%c%c", Entrie[4], Entrie[5], Entrie[6], Entrie[7], Entrie[0], - Entrie[1], Entrie[2], Entrie[3]); - else if (len == 6) - snprintf(Entrie, ENTRIE_SIZE, "%c%c/%c%c%c%c", Entrie[4], Entrie[5], Entrie[0], Entrie[1], Entrie[2], Entrie[3]); - else snprintf(Entrie, ENTRIE_SIZE, "%s", Entrie); - - Releasedate = Entrie; - - delete[] Entrie; - - mxmlDelete(node); - mxmlDelete(nodetree); - free(xmlbuffer); - - return 1; -} - -/* Get name */ -const char * HomebrewXML::GetName() const -{ - return Name.c_str(); -} - -/* Set Name */ -void HomebrewXML::SetName(char * newName) -{ - Name = newName; -} - -/* Get coder */ -const char * HomebrewXML::GetCoder() const -{ - return Coder.c_str(); -} - -/* Get version */ -const char * HomebrewXML::GetVersion() const -{ - return Version.c_str(); -} - -/* Get releasedate */ -const char * HomebrewXML::GetReleasedate() const -{ - return Releasedate.c_str(); -} - -/* Get shortdescription */ -const char * HomebrewXML::GetShortDescription() const -{ - return ShortDescription.c_str(); -} - -/* Get longdescription */ -const char * HomebrewXML::GetLongDescription() const -{ - return LongDescription.c_str(); -} diff --git a/source/homebrewboot/HomebrewXML.h b/source/homebrewboot/HomebrewXML.h deleted file mode 100644 index 6032fd02..00000000 --- a/source/homebrewboot/HomebrewXML.h +++ /dev/null @@ -1,35 +0,0 @@ -/**************************************************************************** - * HomebrewXML Class - * for USB Loader GX - ***************************************************************************/ -#ifndef ___HOMEBREWXML_H_ -#define ___HOMEBREWXML_H_ - -#include - -class HomebrewXML -{ - public: - HomebrewXML() { }; - HomebrewXML(const char* filename) { LoadHomebrewXMLData(filename); }; - - int LoadHomebrewXMLData(const char* filename); - - const char * GetName() const; - void SetName(char * newName); - const char * GetCoder() const; - const char * GetVersion() const; - const char * GetReleasedate() const; - const char * GetShortDescription() const; - const char * GetLongDescription() const; - - protected: - std::string Name; - std::string Coder; - std::string Version; - std::string Releasedate; - std::string ShortDescription; - std::string LongDescription; -}; - -#endif diff --git a/source/homebrewboot/dolloader.c b/source/homebrewboot/dolloader.c deleted file mode 100644 index d957f7e8..00000000 --- a/source/homebrewboot/dolloader.c +++ /dev/null @@ -1,64 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -#include "dolloader.h" - -typedef struct _dolheader { - u32 text_pos[7]; - u32 data_pos[11]; - u32 text_start[7]; - u32 data_start[11]; - u32 text_size[7]; - u32 data_size[11]; - u32 bss_start; - u32 bss_size; - u32 entry_point; -} dolheader; - -u32 load_dol(const void *dolstart, struct __argv *argv) -{ - u32 i; - dolheader *dolfile; - - if (dolstart) - { - dolfile = (dolheader *) dolstart; - for (i = 0; i < 7; i++) - { - if ((!dolfile->text_size[i]) || (dolfile->text_start[i] < 0x100)) - continue; - - memmove((void *) dolfile->text_start[i], dolstart - + dolfile->text_pos[i], dolfile->text_size[i]); - - DCFlushRange ((void *) dolfile->text_start[i], dolfile->text_size[i]); - ICInvalidateRange((void *) dolfile->text_start[i], dolfile->text_size[i]); - } - - for (i = 0; i < 11; i++) - { - if ((!dolfile->data_size[i]) || (dolfile->data_start[i] < 0x100)) - continue; - - memmove((void *) dolfile->data_start[i], dolstart - + dolfile->data_pos[i], dolfile->data_size[i]); - - DCFlushRange((void *) dolfile->data_start[i], - dolfile->data_size[i]); - } - - if (argv && argv->argvMagic == ARGV_MAGIC) - { - void *new_argv = (void *) (dolfile->entry_point + 8); - memmove(new_argv, argv, sizeof(*argv)); - DCFlushRange(new_argv, sizeof(*argv)); - } - return dolfile->entry_point; - } - return 0; -} diff --git a/source/homebrewboot/dolloader.h b/source/homebrewboot/dolloader.h deleted file mode 100644 index af644414..00000000 --- a/source/homebrewboot/dolloader.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef _DOLLOADER_H_ -#define _DOLLOADER_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -extern void __exception_closeall(); -typedef void (*entrypoint) (void); - -u32 load_dol(const void *dolstart, struct __argv *argv); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/images/Channel_btn.png b/source/images/Channel_btn.png deleted file mode 100644 index dc46e47e..00000000 Binary files a/source/images/Channel_btn.png and /dev/null differ diff --git a/source/images/Wifi_btn.png b/source/images/Wifi_btn.png deleted file mode 100644 index 24411088..00000000 Binary files a/source/images/Wifi_btn.png and /dev/null differ diff --git a/source/images/Wiimote1.png b/source/images/Wiimote1.png deleted file mode 100644 index 173ab5ee..00000000 Binary files a/source/images/Wiimote1.png and /dev/null differ diff --git a/source/images/Wiimote2.png b/source/images/Wiimote2.png deleted file mode 100644 index 3a7462ea..00000000 Binary files a/source/images/Wiimote2.png and /dev/null differ diff --git a/source/images/Wiimote3.png b/source/images/Wiimote3.png deleted file mode 100644 index bea80557..00000000 Binary files a/source/images/Wiimote3.png and /dev/null differ diff --git a/source/images/Wiimote4.png b/source/images/Wiimote4.png deleted file mode 100644 index 582cb50e..00000000 Binary files a/source/images/Wiimote4.png and /dev/null differ diff --git a/source/images/abcIcon.png b/source/images/abcIcon.png deleted file mode 100644 index 19b39e01..00000000 Binary files a/source/images/abcIcon.png and /dev/null differ diff --git a/source/images/addressbar_textbox.png b/source/images/addressbar_textbox.png deleted file mode 100644 index 77007f5b..00000000 Binary files a/source/images/addressbar_textbox.png and /dev/null differ diff --git a/source/images/arrangeCarousel.png b/source/images/arrangeCarousel.png deleted file mode 100644 index b8162cff..00000000 Binary files a/source/images/arrangeCarousel.png and /dev/null differ diff --git a/source/images/arrangeCarousel_gray.png b/source/images/arrangeCarousel_gray.png deleted file mode 100644 index c7955d54..00000000 Binary files a/source/images/arrangeCarousel_gray.png and /dev/null differ diff --git a/source/images/arrangeGrid.png b/source/images/arrangeGrid.png deleted file mode 100644 index 1b1be841..00000000 Binary files a/source/images/arrangeGrid.png and /dev/null differ diff --git a/source/images/arrangeGrid_gray.png b/source/images/arrangeGrid_gray.png deleted file mode 100644 index f8e066d3..00000000 Binary files a/source/images/arrangeGrid_gray.png and /dev/null differ diff --git a/source/images/arrangeList.png b/source/images/arrangeList.png deleted file mode 100644 index 9a116087..00000000 Binary files a/source/images/arrangeList.png and /dev/null differ diff --git a/source/images/arrangeList_gray.png b/source/images/arrangeList_gray.png deleted file mode 100644 index 59c6410b..00000000 Binary files a/source/images/arrangeList_gray.png and /dev/null differ diff --git a/source/images/background.png b/source/images/background.png deleted file mode 100644 index 1a482c7c..00000000 Binary files a/source/images/background.png and /dev/null differ diff --git a/source/images/balanceboard.png b/source/images/balanceboard.png deleted file mode 100644 index d713380b..00000000 Binary files a/source/images/balanceboard.png and /dev/null differ diff --git a/source/images/balanceboardR.png b/source/images/balanceboardR.png deleted file mode 100644 index ee2de742..00000000 Binary files a/source/images/balanceboardR.png and /dev/null differ diff --git a/source/images/battery.png b/source/images/battery.png deleted file mode 100644 index 9a4c9afb..00000000 Binary files a/source/images/battery.png and /dev/null differ diff --git a/source/images/battery_bar.png b/source/images/battery_bar.png deleted file mode 100644 index 3aff7411..00000000 Binary files a/source/images/battery_bar.png and /dev/null differ diff --git a/source/images/battery_bar_red.png b/source/images/battery_bar_red.png deleted file mode 100644 index bc09b4c3..00000000 Binary files a/source/images/battery_bar_red.png and /dev/null differ diff --git a/source/images/battery_bar_white.png b/source/images/battery_bar_white.png deleted file mode 100644 index 528b3405..00000000 Binary files a/source/images/battery_bar_white.png and /dev/null differ diff --git a/source/images/battery_red.png b/source/images/battery_red.png deleted file mode 100644 index 458b7364..00000000 Binary files a/source/images/battery_red.png and /dev/null differ diff --git a/source/images/battery_white.png b/source/images/battery_white.png deleted file mode 100644 index a2812c5a..00000000 Binary files a/source/images/battery_white.png and /dev/null differ diff --git a/source/images/bg_browser.png b/source/images/bg_browser.png deleted file mode 100644 index a2c03f38..00000000 Binary files a/source/images/bg_browser.png and /dev/null differ diff --git a/source/images/bg_browser_selection.png b/source/images/bg_browser_selection.png deleted file mode 100644 index 2bdc02db..00000000 Binary files a/source/images/bg_browser_selection.png and /dev/null differ diff --git a/source/images/bg_options.png b/source/images/bg_options.png deleted file mode 100644 index 389cfa1d..00000000 Binary files a/source/images/bg_options.png and /dev/null differ diff --git a/source/images/bg_options_entry.png b/source/images/bg_options_entry.png deleted file mode 100644 index db4e2472..00000000 Binary files a/source/images/bg_options_entry.png and /dev/null differ diff --git a/source/images/bg_options_settings.png b/source/images/bg_options_settings.png deleted file mode 100644 index 49ca299a..00000000 Binary files a/source/images/bg_options_settings.png and /dev/null differ diff --git a/source/images/boxBorder.png b/source/images/boxBorder.png deleted file mode 100644 index 9a4bc8a0..00000000 Binary files a/source/images/boxBorder.png and /dev/null differ diff --git a/source/images/browser.png b/source/images/browser.png deleted file mode 100644 index f6400cd5..00000000 Binary files a/source/images/browser.png and /dev/null differ diff --git a/source/images/browser_over.png b/source/images/browser_over.png deleted file mode 100644 index 59b15471..00000000 Binary files a/source/images/browser_over.png and /dev/null differ diff --git a/source/images/button_dialogue_box.png b/source/images/button_dialogue_box.png deleted file mode 100644 index 23d2b2e6..00000000 Binary files a/source/images/button_dialogue_box.png and /dev/null differ diff --git a/source/images/button_install.png b/source/images/button_install.png deleted file mode 100644 index 69737337..00000000 Binary files a/source/images/button_install.png and /dev/null differ diff --git a/source/images/button_install_over.png b/source/images/button_install_over.png deleted file mode 100644 index 9ffc0f55..00000000 Binary files a/source/images/button_install_over.png and /dev/null differ diff --git a/source/images/cero_a.png b/source/images/cero_a.png deleted file mode 100644 index 31d989fa..00000000 Binary files a/source/images/cero_a.png and /dev/null differ diff --git a/source/images/cero_b.png b/source/images/cero_b.png deleted file mode 100644 index 3358e0aa..00000000 Binary files a/source/images/cero_b.png and /dev/null differ diff --git a/source/images/cero_c.png b/source/images/cero_c.png deleted file mode 100644 index b0248697..00000000 Binary files a/source/images/cero_c.png and /dev/null differ diff --git a/source/images/cero_d.png b/source/images/cero_d.png deleted file mode 100644 index 6eb1b4b3..00000000 Binary files a/source/images/cero_d.png and /dev/null differ diff --git a/source/images/cero_z.png b/source/images/cero_z.png deleted file mode 100644 index 6b5a48cd..00000000 Binary files a/source/images/cero_z.png and /dev/null differ diff --git a/source/images/classiccontroller.png b/source/images/classiccontroller.png deleted file mode 100644 index 92f81dfe..00000000 Binary files a/source/images/classiccontroller.png and /dev/null differ diff --git a/source/images/classiccontrollerR.png b/source/images/classiccontrollerR.png deleted file mode 100644 index e3d051d0..00000000 Binary files a/source/images/classiccontrollerR.png and /dev/null differ diff --git a/source/images/closebutton.png b/source/images/closebutton.png deleted file mode 100644 index b2100d98..00000000 Binary files a/source/images/closebutton.png and /dev/null differ diff --git a/source/images/credits_bg.png b/source/images/credits_bg.png deleted file mode 100644 index 3ce92fd3..00000000 Binary files a/source/images/credits_bg.png and /dev/null differ diff --git a/source/images/credits_button.png b/source/images/credits_button.png deleted file mode 100644 index 510df769..00000000 Binary files a/source/images/credits_button.png and /dev/null differ diff --git a/source/images/credits_button_over.png b/source/images/credits_button_over.png deleted file mode 100644 index 92bb0b79..00000000 Binary files a/source/images/credits_button_over.png and /dev/null differ diff --git a/source/images/dancepad.png b/source/images/dancepad.png deleted file mode 100644 index 55191440..00000000 Binary files a/source/images/dancepad.png and /dev/null differ diff --git a/source/images/dancepadR.png b/source/images/dancepadR.png deleted file mode 100644 index 1b3ae1ce..00000000 Binary files a/source/images/dancepadR.png and /dev/null differ diff --git a/source/images/dialogue_box.png b/source/images/dialogue_box.png deleted file mode 100644 index d16b96cc..00000000 Binary files a/source/images/dialogue_box.png and /dev/null differ diff --git a/source/images/dialogue_box_startgame.png b/source/images/dialogue_box_startgame.png deleted file mode 100644 index bd684298..00000000 Binary files a/source/images/dialogue_box_startgame.png and /dev/null differ diff --git a/source/images/drums.png b/source/images/drums.png deleted file mode 100644 index ee2e000b..00000000 Binary files a/source/images/drums.png and /dev/null differ diff --git a/source/images/drumsR.png b/source/images/drumsR.png deleted file mode 100644 index 01836925..00000000 Binary files a/source/images/drumsR.png and /dev/null differ diff --git a/source/images/dvd.png b/source/images/dvd.png deleted file mode 100644 index 43d71b52..00000000 Binary files a/source/images/dvd.png and /dev/null differ diff --git a/source/images/dvd_gray.png b/source/images/dvd_gray.png deleted file mode 100644 index 84cdeb1b..00000000 Binary files a/source/images/dvd_gray.png and /dev/null differ diff --git a/source/images/esrb_ao.png b/source/images/esrb_ao.png deleted file mode 100644 index 5004a5ce..00000000 Binary files a/source/images/esrb_ao.png and /dev/null differ diff --git a/source/images/esrb_e.png b/source/images/esrb_e.png deleted file mode 100644 index a13af0ca..00000000 Binary files a/source/images/esrb_e.png and /dev/null differ diff --git a/source/images/esrb_ec.png b/source/images/esrb_ec.png deleted file mode 100644 index 3d15720b..00000000 Binary files a/source/images/esrb_ec.png and /dev/null differ diff --git a/source/images/esrb_eten.png b/source/images/esrb_eten.png deleted file mode 100644 index 4defe777..00000000 Binary files a/source/images/esrb_eten.png and /dev/null differ diff --git a/source/images/esrb_m.png b/source/images/esrb_m.png deleted file mode 100644 index a5d29daf..00000000 Binary files a/source/images/esrb_m.png and /dev/null differ diff --git a/source/images/esrb_t.png b/source/images/esrb_t.png deleted file mode 100644 index b9549ba2..00000000 Binary files a/source/images/esrb_t.png and /dev/null differ diff --git a/source/images/exit_bottom.png b/source/images/exit_bottom.png deleted file mode 100644 index 5f957415..00000000 Binary files a/source/images/exit_bottom.png and /dev/null differ diff --git a/source/images/exit_bottom_over.png b/source/images/exit_bottom_over.png deleted file mode 100644 index 38992823..00000000 Binary files a/source/images/exit_bottom_over.png and /dev/null differ diff --git a/source/images/exit_button.png b/source/images/exit_button.png deleted file mode 100644 index 1c9fb09b..00000000 Binary files a/source/images/exit_button.png and /dev/null differ diff --git a/source/images/exit_top.png b/source/images/exit_top.png deleted file mode 100644 index 759264fc..00000000 Binary files a/source/images/exit_top.png and /dev/null differ diff --git a/source/images/exit_top_over.png b/source/images/exit_top_over.png deleted file mode 100644 index 4f60dbcd..00000000 Binary files a/source/images/exit_top_over.png and /dev/null differ diff --git a/source/images/favIcon.png b/source/images/favIcon.png deleted file mode 100644 index 1b1314b9..00000000 Binary files a/source/images/favIcon.png and /dev/null differ diff --git a/source/images/favIcon_gray.png b/source/images/favIcon_gray.png deleted file mode 100644 index cf28a899..00000000 Binary files a/source/images/favIcon_gray.png and /dev/null differ diff --git a/source/images/favorite.png b/source/images/favorite.png deleted file mode 100644 index b8eeefe7..00000000 Binary files a/source/images/favorite.png and /dev/null differ diff --git a/source/images/gameinfo1.png b/source/images/gameinfo1.png deleted file mode 100644 index 7dbfea60..00000000 Binary files a/source/images/gameinfo1.png and /dev/null differ diff --git a/source/images/gameinfo1a.png b/source/images/gameinfo1a.png deleted file mode 100644 index 528824dd..00000000 Binary files a/source/images/gameinfo1a.png and /dev/null differ diff --git a/source/images/gameinfo2.png b/source/images/gameinfo2.png deleted file mode 100644 index 35ac092f..00000000 Binary files a/source/images/gameinfo2.png and /dev/null differ diff --git a/source/images/gameinfo2a.png b/source/images/gameinfo2a.png deleted file mode 100644 index 3a81238f..00000000 Binary files a/source/images/gameinfo2a.png and /dev/null differ diff --git a/source/images/gcncontroller.png b/source/images/gcncontroller.png deleted file mode 100644 index 244bb56b..00000000 Binary files a/source/images/gcncontroller.png and /dev/null differ diff --git a/source/images/gcncontrollerR.png b/source/images/gcncontrollerR.png deleted file mode 100644 index b8213715..00000000 Binary files a/source/images/gcncontrollerR.png and /dev/null differ diff --git a/source/images/guitar.png b/source/images/guitar.png deleted file mode 100644 index cbb9a836..00000000 Binary files a/source/images/guitar.png and /dev/null differ diff --git a/source/images/guitarR.png b/source/images/guitarR.png deleted file mode 100644 index 7d763b5f..00000000 Binary files a/source/images/guitarR.png and /dev/null differ diff --git a/source/images/gxlogo.png b/source/images/gxlogo.png deleted file mode 100644 index dadd5cb6..00000000 Binary files a/source/images/gxlogo.png and /dev/null differ diff --git a/source/images/icon_folder.png b/source/images/icon_folder.png deleted file mode 100644 index 269b5ca8..00000000 Binary files a/source/images/icon_folder.png and /dev/null differ diff --git a/source/images/keyboard_backspace_over.png b/source/images/keyboard_backspace_over.png deleted file mode 100644 index 419a2e6c..00000000 Binary files a/source/images/keyboard_backspace_over.png and /dev/null differ diff --git a/source/images/keyboard_clear_over.png b/source/images/keyboard_clear_over.png deleted file mode 100644 index 11fbb962..00000000 Binary files a/source/images/keyboard_clear_over.png and /dev/null differ diff --git a/source/images/keyboard_key.png b/source/images/keyboard_key.png deleted file mode 100644 index 50061ba9..00000000 Binary files a/source/images/keyboard_key.png and /dev/null differ diff --git a/source/images/keyboard_key_over.png b/source/images/keyboard_key_over.png deleted file mode 100644 index 15e352db..00000000 Binary files a/source/images/keyboard_key_over.png and /dev/null differ diff --git a/source/images/keyboard_largekey_over.png b/source/images/keyboard_largekey_over.png deleted file mode 100644 index bac10741..00000000 Binary files a/source/images/keyboard_largekey_over.png and /dev/null differ diff --git a/source/images/keyboard_mediumkey_over.png b/source/images/keyboard_mediumkey_over.png deleted file mode 100644 index f2c821cb..00000000 Binary files a/source/images/keyboard_mediumkey_over.png and /dev/null differ diff --git a/source/images/keyboard_textbox.png b/source/images/keyboard_textbox.png deleted file mode 100644 index caeef7ee..00000000 Binary files a/source/images/keyboard_textbox.png and /dev/null differ diff --git a/source/images/little_star.png b/source/images/little_star.png deleted file mode 100644 index de0da22c..00000000 Binary files a/source/images/little_star.png and /dev/null differ diff --git a/source/images/lock.png b/source/images/lock.png deleted file mode 100644 index fc613766..00000000 Binary files a/source/images/lock.png and /dev/null differ diff --git a/source/images/lock_gray.png b/source/images/lock_gray.png deleted file mode 100644 index 72db0075..00000000 Binary files a/source/images/lock_gray.png and /dev/null differ diff --git a/source/images/menu_button.png b/source/images/menu_button.png deleted file mode 100644 index 008ae4a5..00000000 Binary files a/source/images/menu_button.png and /dev/null differ diff --git a/source/images/menu_button_over.png b/source/images/menu_button_over.png deleted file mode 100644 index 4f0780e7..00000000 Binary files a/source/images/menu_button_over.png and /dev/null differ diff --git a/source/images/microphone.png b/source/images/microphone.png deleted file mode 100644 index d1e6b641..00000000 Binary files a/source/images/microphone.png and /dev/null differ diff --git a/source/images/microphoneR.png b/source/images/microphoneR.png deleted file mode 100644 index 892f8339..00000000 Binary files a/source/images/microphoneR.png and /dev/null differ diff --git a/source/images/motionplus.png b/source/images/motionplus.png deleted file mode 100644 index c3e34505..00000000 Binary files a/source/images/motionplus.png and /dev/null differ diff --git a/source/images/motionplusR.png b/source/images/motionplusR.png deleted file mode 100644 index 98576248..00000000 Binary files a/source/images/motionplusR.png and /dev/null differ diff --git a/source/images/new.png b/source/images/new.png deleted file mode 100644 index 167cce95..00000000 Binary files a/source/images/new.png and /dev/null differ diff --git a/source/images/nintendods.png b/source/images/nintendods.png deleted file mode 100644 index c22cf42a..00000000 Binary files a/source/images/nintendods.png and /dev/null differ diff --git a/source/images/nintendodsR.png b/source/images/nintendodsR.png deleted file mode 100644 index 0cad10c7..00000000 Binary files a/source/images/nintendodsR.png and /dev/null differ diff --git a/source/images/nocover.png b/source/images/nocover.png deleted file mode 100644 index 4be4143a..00000000 Binary files a/source/images/nocover.png and /dev/null differ diff --git a/source/images/nocoverFlat.png b/source/images/nocoverFlat.png deleted file mode 100644 index d44936a6..00000000 Binary files a/source/images/nocoverFlat.png and /dev/null differ diff --git a/source/images/nocoverFull.png b/source/images/nocoverFull.png deleted file mode 100644 index a4511152..00000000 Binary files a/source/images/nocoverFull.png and /dev/null differ diff --git a/source/images/nodisc.png b/source/images/nodisc.png deleted file mode 100644 index 6bb61a7e..00000000 Binary files a/source/images/nodisc.png and /dev/null differ diff --git a/source/images/norating.png b/source/images/norating.png deleted file mode 100644 index 2b5248ee..00000000 Binary files a/source/images/norating.png and /dev/null differ diff --git a/source/images/not_favorite.png b/source/images/not_favorite.png deleted file mode 100644 index c9bd9df0..00000000 Binary files a/source/images/not_favorite.png and /dev/null differ diff --git a/source/images/nunchuk.png b/source/images/nunchuk.png deleted file mode 100644 index 1187cd65..00000000 Binary files a/source/images/nunchuk.png and /dev/null differ diff --git a/source/images/nunchukR.png b/source/images/nunchukR.png deleted file mode 100644 index 8e079079..00000000 Binary files a/source/images/nunchukR.png and /dev/null differ diff --git a/source/images/pageindicator.png b/source/images/pageindicator.png deleted file mode 100644 index 28b0f8ee..00000000 Binary files a/source/images/pageindicator.png and /dev/null differ diff --git a/source/images/pegi_12.png b/source/images/pegi_12.png deleted file mode 100644 index 5d199493..00000000 Binary files a/source/images/pegi_12.png and /dev/null differ diff --git a/source/images/pegi_16.png b/source/images/pegi_16.png deleted file mode 100644 index 039e4761..00000000 Binary files a/source/images/pegi_16.png and /dev/null differ diff --git a/source/images/pegi_18.png b/source/images/pegi_18.png deleted file mode 100644 index 102102e5..00000000 Binary files a/source/images/pegi_18.png and /dev/null differ diff --git a/source/images/pegi_3.png b/source/images/pegi_3.png deleted file mode 100644 index 34c423f4..00000000 Binary files a/source/images/pegi_3.png and /dev/null differ diff --git a/source/images/pegi_7.png b/source/images/pegi_7.png deleted file mode 100644 index b81e7514..00000000 Binary files a/source/images/pegi_7.png and /dev/null differ diff --git a/source/images/playCountIcon.png b/source/images/playCountIcon.png deleted file mode 100644 index 14609fac..00000000 Binary files a/source/images/playCountIcon.png and /dev/null differ diff --git a/source/images/player1_point.png b/source/images/player1_point.png deleted file mode 100644 index c06c08c7..00000000 Binary files a/source/images/player1_point.png and /dev/null differ diff --git a/source/images/player2_point.png b/source/images/player2_point.png deleted file mode 100644 index 6e952d24..00000000 Binary files a/source/images/player2_point.png and /dev/null differ diff --git a/source/images/player3_point.png b/source/images/player3_point.png deleted file mode 100644 index 704f84e0..00000000 Binary files a/source/images/player3_point.png and /dev/null differ diff --git a/source/images/player4_point.png b/source/images/player4_point.png deleted file mode 100644 index dd8f1ad3..00000000 Binary files a/source/images/player4_point.png and /dev/null differ diff --git a/source/images/playersSort.png b/source/images/playersSort.png deleted file mode 100644 index b74b98a2..00000000 Binary files a/source/images/playersSort.png and /dev/null differ diff --git a/source/images/progressbar.png b/source/images/progressbar.png deleted file mode 100644 index 747f6a4d..00000000 Binary files a/source/images/progressbar.png and /dev/null differ diff --git a/source/images/progressbar_empty.png b/source/images/progressbar_empty.png deleted file mode 100644 index e72f0c43..00000000 Binary files a/source/images/progressbar_empty.png and /dev/null differ diff --git a/source/images/progressbar_outline.png b/source/images/progressbar_outline.png deleted file mode 100644 index 6b665457..00000000 Binary files a/source/images/progressbar_outline.png and /dev/null differ diff --git a/source/images/rankIcon.png b/source/images/rankIcon.png deleted file mode 100644 index 7616dd99..00000000 Binary files a/source/images/rankIcon.png and /dev/null differ diff --git a/source/images/rplayer1_point.png b/source/images/rplayer1_point.png deleted file mode 100644 index eabd11bb..00000000 Binary files a/source/images/rplayer1_point.png and /dev/null differ diff --git a/source/images/rplayer2_point.png b/source/images/rplayer2_point.png deleted file mode 100644 index f12a5c50..00000000 Binary files a/source/images/rplayer2_point.png and /dev/null differ diff --git a/source/images/rplayer3_point.png b/source/images/rplayer3_point.png deleted file mode 100644 index d67c019c..00000000 Binary files a/source/images/rplayer3_point.png and /dev/null differ diff --git a/source/images/rplayer4_point.png b/source/images/rplayer4_point.png deleted file mode 100644 index d63ccd77..00000000 Binary files a/source/images/rplayer4_point.png and /dev/null differ diff --git a/source/images/scrollbar.png b/source/images/scrollbar.png deleted file mode 100644 index 032074db..00000000 Binary files a/source/images/scrollbar.png and /dev/null differ diff --git a/source/images/scrollbar_arrowdown.png b/source/images/scrollbar_arrowdown.png deleted file mode 100644 index ebd748c6..00000000 Binary files a/source/images/scrollbar_arrowdown.png and /dev/null differ diff --git a/source/images/scrollbar_arrowup.png b/source/images/scrollbar_arrowup.png deleted file mode 100644 index 6cef2fa0..00000000 Binary files a/source/images/scrollbar_arrowup.png and /dev/null differ diff --git a/source/images/scrollbar_box.png b/source/images/scrollbar_box.png deleted file mode 100644 index 9b568f3e..00000000 Binary files a/source/images/scrollbar_box.png and /dev/null differ diff --git a/source/images/sdcard.png b/source/images/sdcard.png deleted file mode 100644 index b3b247d9..00000000 Binary files a/source/images/sdcard.png and /dev/null differ diff --git a/source/images/sdcard_over.png b/source/images/sdcard_over.png deleted file mode 100644 index 636d3afd..00000000 Binary files a/source/images/sdcard_over.png and /dev/null differ diff --git a/source/images/searchIcon.png b/source/images/searchIcon.png deleted file mode 100644 index 2885af56..00000000 Binary files a/source/images/searchIcon.png and /dev/null differ diff --git a/source/images/searchIcon_gray.png b/source/images/searchIcon_gray.png deleted file mode 100644 index 6396ca65..00000000 Binary files a/source/images/searchIcon_gray.png and /dev/null differ diff --git a/source/images/settings_background.png b/source/images/settings_background.png deleted file mode 100644 index 02ed90db..00000000 Binary files a/source/images/settings_background.png and /dev/null differ diff --git a/source/images/settings_button.png b/source/images/settings_button.png deleted file mode 100644 index 77ce4d3f..00000000 Binary files a/source/images/settings_button.png and /dev/null differ diff --git a/source/images/settings_button_over.png b/source/images/settings_button_over.png deleted file mode 100644 index 0dba63d3..00000000 Binary files a/source/images/settings_button_over.png and /dev/null differ diff --git a/source/images/settings_title.png b/source/images/settings_title.png deleted file mode 100644 index 48de5083..00000000 Binary files a/source/images/settings_title.png and /dev/null differ diff --git a/source/images/settings_title_over.png b/source/images/settings_title_over.png deleted file mode 100644 index 2111ad28..00000000 Binary files a/source/images/settings_title_over.png and /dev/null differ diff --git a/source/images/startgame_arrow_left.png b/source/images/startgame_arrow_left.png deleted file mode 100644 index 4ed6e29e..00000000 Binary files a/source/images/startgame_arrow_left.png and /dev/null differ diff --git a/source/images/startgame_arrow_right.png b/source/images/startgame_arrow_right.png deleted file mode 100644 index 0ed3d0fa..00000000 Binary files a/source/images/startgame_arrow_right.png and /dev/null differ diff --git a/source/images/theme_box.png b/source/images/theme_box.png deleted file mode 100644 index 174b7b52..00000000 Binary files a/source/images/theme_box.png and /dev/null differ diff --git a/source/images/theme_dialogue_box.png b/source/images/theme_dialogue_box.png deleted file mode 100644 index 389cfa1d..00000000 Binary files a/source/images/theme_dialogue_box.png and /dev/null differ diff --git a/source/images/tooltip_left.png b/source/images/tooltip_left.png deleted file mode 100644 index b1114ee1..00000000 Binary files a/source/images/tooltip_left.png and /dev/null differ diff --git a/source/images/tooltip_right.png b/source/images/tooltip_right.png deleted file mode 100644 index 86bd7ed5..00000000 Binary files a/source/images/tooltip_right.png and /dev/null differ diff --git a/source/images/tooltip_tile.png b/source/images/tooltip_tile.png deleted file mode 100644 index 9b68e2f7..00000000 Binary files a/source/images/tooltip_tile.png and /dev/null differ diff --git a/source/images/unlock.png b/source/images/unlock.png deleted file mode 100644 index 241f1b37..00000000 Binary files a/source/images/unlock.png and /dev/null differ diff --git a/source/images/unlock_gray.png b/source/images/unlock_gray.png deleted file mode 100644 index 8f6c90ea..00000000 Binary files a/source/images/unlock_gray.png and /dev/null differ diff --git a/source/images/usbport.png b/source/images/usbport.png deleted file mode 100644 index 78de06a8..00000000 Binary files a/source/images/usbport.png and /dev/null differ diff --git a/source/images/wbackground.png b/source/images/wbackground.png deleted file mode 100644 index 4035f47b..00000000 Binary files a/source/images/wbackground.png and /dev/null differ diff --git a/source/images/wdialogue_box_startgame.png b/source/images/wdialogue_box_startgame.png deleted file mode 100644 index 033814d8..00000000 Binary files a/source/images/wdialogue_box_startgame.png and /dev/null differ diff --git a/source/images/wheel.png b/source/images/wheel.png deleted file mode 100644 index e4e85fc8..00000000 Binary files a/source/images/wheel.png and /dev/null differ diff --git a/source/images/wheelR.png b/source/images/wheelR.png deleted file mode 100644 index b777b12d..00000000 Binary files a/source/images/wheelR.png and /dev/null differ diff --git a/source/images/wifi1.png b/source/images/wifi1.png deleted file mode 100644 index 8190f676..00000000 Binary files a/source/images/wifi1.png and /dev/null differ diff --git a/source/images/wifi12.png b/source/images/wifi12.png deleted file mode 100644 index 455f2e12..00000000 Binary files a/source/images/wifi12.png and /dev/null differ diff --git a/source/images/wifi16.png b/source/images/wifi16.png deleted file mode 100644 index 7f73c2c1..00000000 Binary files a/source/images/wifi16.png and /dev/null differ diff --git a/source/images/wifi2.png b/source/images/wifi2.png deleted file mode 100644 index 07dd889b..00000000 Binary files a/source/images/wifi2.png and /dev/null differ diff --git a/source/images/wifi3.png b/source/images/wifi3.png deleted file mode 100644 index 67204d8a..00000000 Binary files a/source/images/wifi3.png and /dev/null differ diff --git a/source/images/wifi32.png b/source/images/wifi32.png deleted file mode 100644 index 5fb2eba8..00000000 Binary files a/source/images/wifi32.png and /dev/null differ diff --git a/source/images/wifi4.png b/source/images/wifi4.png deleted file mode 100644 index 725219c6..00000000 Binary files a/source/images/wifi4.png and /dev/null differ diff --git a/source/images/wifi8.png b/source/images/wifi8.png deleted file mode 100644 index 13502a11..00000000 Binary files a/source/images/wifi8.png and /dev/null differ diff --git a/source/images/wiimote.png b/source/images/wiimote.png deleted file mode 100644 index a868c218..00000000 Binary files a/source/images/wiimote.png and /dev/null differ diff --git a/source/images/wiimote_poweroff.png b/source/images/wiimote_poweroff.png deleted file mode 100644 index 81f34462..00000000 Binary files a/source/images/wiimote_poweroff.png and /dev/null differ diff --git a/source/images/wiimote_poweroff_over.png b/source/images/wiimote_poweroff_over.png deleted file mode 100644 index 037dd7fe..00000000 Binary files a/source/images/wiimote_poweroff_over.png and /dev/null differ diff --git a/source/images/wiispeak.png b/source/images/wiispeak.png deleted file mode 100644 index 24a8e250..00000000 Binary files a/source/images/wiispeak.png and /dev/null differ diff --git a/source/images/wiispeakR.png b/source/images/wiispeakR.png deleted file mode 100644 index 272eb49a..00000000 Binary files a/source/images/wiispeakR.png and /dev/null differ diff --git a/source/images/zapper.png b/source/images/zapper.png deleted file mode 100644 index 2a6ac6e8..00000000 Binary files a/source/images/zapper.png and /dev/null differ diff --git a/source/images/zapperR.png b/source/images/zapperR.png deleted file mode 100644 index 504f802a..00000000 Binary files a/source/images/zapperR.png and /dev/null differ diff --git a/source/input.cpp b/source/input.cpp deleted file mode 100644 index 2d91ba91..00000000 --- a/source/input.cpp +++ /dev/null @@ -1,205 +0,0 @@ -/**************************************************************************** - * libwiigui Template - * Tantric 2009 - * - * input.cpp - * Wii/GameCube controller management - ***************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "menu.h" -#include "video.h" -#include "input.h" -#include "libwiigui/gui.h" -#include "sys.h" - -int rumbleRequest[4] = { 0, 0, 0, 0 }; -GuiTrigger userInput[4]; -static int rumbleCount[4] = { 0, 0, 0, 0 }; - -/**************************************************************************** - * UpdatePads - * - * called by postRetraceCallback in InitGCVideo - scans gcpad and wpad - ***************************************************************************/ -void UpdatePads() -{ - WPAD_ScanPads(); - PAD_ScanPads(); - - for (int i = 3; i >= 0; i--) - { - memcpy(&userInput[i].wpad, WPAD_Data(i), sizeof(WPADData)); - userInput[i].chan = i; - userInput[i].pad.btns_d = PAD_ButtonsDown(i); - userInput[i].pad.btns_u = PAD_ButtonsUp(i); - userInput[i].pad.btns_h = PAD_ButtonsHeld(i); - userInput[i].pad.stickX = PAD_StickX(i); - userInput[i].pad.stickY = PAD_StickY(i); - userInput[i].pad.substickX = PAD_SubStickX(i); - userInput[i].pad.substickY = PAD_SubStickY(i); - userInput[i].pad.triggerL = PAD_TriggerL(i); - userInput[i].pad.triggerR = PAD_TriggerR(i); - - if (Settings.rumble == ON) DoRumble(i); - - if(userInput[i].wpad.exp.type == WPAD_EXP_NUNCHUK) - { - if(userInput[i].wpad.btns_h & WPAD_NUNCHUK_BUTTON_Z && userInput[i].wpad.btns_d & WPAD_NUNCHUK_BUTTON_C) - ScreenShot(); - } - } -} - -/**************************************************************************** - * SetWPADTimeout - ***************************************************************************/ -void SetWPADTimeout() -{ - switch (Settings.screensaver) - { - case 0: - WPAD_SetIdleTimeout(0xFFFFFF); - break; - case 1: - WPAD_SetIdleTimeout(180); - break; - case 2: - WPAD_SetIdleTimeout(300); - break; - case 3: - WPAD_SetIdleTimeout(600); - break; - case 4: - WPAD_SetIdleTimeout(1200); - break; - case 5: - WPAD_SetIdleTimeout(1800); - break; - case 6: - WPAD_SetIdleTimeout(3600); - break; - default: - break; - } -} - -/**************************************************************************** - * SetupPads - * - * Sets up userInput triggers for use - ***************************************************************************/ -void SetupPads() -{ - PAD_Init(); - WPAD_Init(); - - // read wiimote accelerometer and IR data - WPAD_SetDataFormat(WPAD_CHAN_ALL, WPAD_FMT_BTNS_ACC_IR); - WPAD_SetVRes(WPAD_CHAN_ALL, screenwidth, screenheight); - - for (int i = 0; i < 4; i++) - { - userInput[i].chan = i; - } - - SetWPADTimeout(); -} - -/**************************************************************************** - * ShutoffRumble - ***************************************************************************/ - -void ShutoffRumble() -{ - for (int i = 0; i < 4; i++) - { - WPAD_Rumble(i, 0); - rumbleCount[i] = 0; - } -} - -/**************************************************************************** - * DoRumble - ***************************************************************************/ - -void DoRumble(int i) -{ - if (rumbleRequest[i] && rumbleCount[i] < 3) - { - WPAD_Rumble(i, 1); // rumble on - rumbleCount[i]++; - } - else if (rumbleRequest[i]) - { - rumbleCount[i] = 20; - rumbleRequest[i] = 0; - } - else - { - if (rumbleCount[i]) rumbleCount[i]--; - WPAD_Rumble(i, 0); // rumble off - } -} - -/**************************************************************************** - * WPAD_Stick - * - * Get X/Y value from Wii Joystick (classic, nunchuk) input - ***************************************************************************/ - -s8 WPAD_Stick(u8 chan, u8 right, int axis) -{ - float mag = 0.0; - float ang = 0.0; - WPADData *data = WPAD_Data(chan); - - switch (data->exp.type) - { - case WPAD_EXP_NUNCHUK: - case WPAD_EXP_GUITARHERO3: - if (right == 0) - { - mag = data->exp.nunchuk.js.mag; - ang = data->exp.nunchuk.js.ang; - } - break; - - case WPAD_EXP_CLASSIC: - if (right == 0) - { - mag = data->exp.classic.ljs.mag; - ang = data->exp.classic.ljs.ang; - } - else - { - mag = data->exp.classic.rjs.mag; - ang = data->exp.classic.rjs.ang; - } - break; - - default: - break; - } - - /* calculate x/y value (angle need to be converted into radian) */ - if (mag > 1.0) - mag = 1.0; - else if (mag < -1.0) mag = -1.0; - double val; - - if (axis == 0) // x-axis - val = mag * sin((PI * ang) / 180.0f); - else // y-axis - val = mag * cos((PI * ang) / 180.0f); - - return (s8) (val * 128.0f); -} diff --git a/source/input.h b/source/input.h deleted file mode 100644 index 5b48e5a3..00000000 --- a/source/input.h +++ /dev/null @@ -1,26 +0,0 @@ -/**************************************************************************** - * libwiigui Template - * Tantric 2009 - * - * input.h - * Wii/GameCube controller management - ***************************************************************************/ - -#ifndef _INPUT_H_ -#define _INPUT_H_ - -#include -#include - -#define PI 3.14159265f -#define PADCAL 50 - -extern int rumbleRequest[4]; - -void SetupPads(); -void UpdatePads(); -void ShutoffRumble(); -void DoRumble(int i); -void SetWPADTimeout(); - -#endif diff --git a/source/language/UpdateLanguage.cpp b/source/language/UpdateLanguage.cpp deleted file mode 100644 index 289bc563..00000000 --- a/source/language/UpdateLanguage.cpp +++ /dev/null @@ -1,140 +0,0 @@ -/**************************************************************************** - * languagefile updater - * for USB Loader GX *giantpune* - ***************************************************************************/ -#include -#include -#include -#include - -#include "UpdateLanguage.h" -#include "gettext.h" -#include "FileOperations/fileops.h" -#include "FileOperations/DirList.h" -#include "menu.h" -#include "network/networkops.h" -#include "network/http.h" -#include "network/URL_List.h" -#include "prompts/ProgressWindow.h" -#include "utils/ShowError.h" -#include "gecko.h" - -static const char * LanguageFilesURL = "http://usbloader-gui.googlecode.com/svn/trunk/Languages/"; - -int DownloadAllLanguageFiles() -{ - if(!CreateSubfolder(Settings.languagefiles_path)) - { - ShowError(tr("Could not create path: %s"), Settings.languagefiles_path); - return -1; - } - - if(!IsNetworkInit()) - { - ShowError(tr("Network is not initiated.")); - return -2; - } - char fullURL[300]; - - URL_List LinkList(LanguageFilesURL); - int listsize = LinkList.GetURLCount(); - int files_downloaded = 0; - - ShowProgress(tr("Updating Language Files:"), 0, 0, 0, listsize, false, true); - - for (int i = 0; i < listsize; i++) - { - const char * filename = strrchr(LinkList.GetURL(i), '/'); - if(filename) filename++; - else filename = LinkList.GetURL(i); - - if(!filename) - continue; - - const char * FileExt = strrchr(filename, '.'); - if (!FileExt || strcasecmp(FileExt, ".lang") != 0) - continue; - - gprintf("%s\n", filename); - - ShowProgress(tr("Updating Language Files:"), 0, filename, i, listsize, false, true); - - snprintf(fullURL, sizeof(fullURL), "%s%s", LanguageFilesURL, filename); - - struct block file = downloadfile(fullURL); - if (file.data) - { - char filepath[300]; - snprintf(filepath, sizeof(filepath), "%s/%s", Settings.languagefiles_path, filename); - FILE * pfile = fopen(filepath, "wb"); - if(pfile) - { - fwrite(file.data, 1, file.size, pfile); - fclose(pfile); - files_downloaded++; - } - free(file.data); - } - } - - ProgressStop(); - - return files_downloaded; -} - -int UpdateLanguageFiles() -{ - if(!CreateSubfolder(Settings.languagefiles_path)) - { - ShowError(tr("Could not create path: %s"), Settings.languagefiles_path); - return -1; - } - - if(!IsNetworkInit()) - { - ShowError(tr("Network is not initiated.")); - return -2; - } - - DirList Dir(Settings.languagefiles_path, ".lang"); - - //give up now if we didn't find any - if (Dir.GetFilecount() == 0) return -2; - - char savepath[150]; - char codeurl[200]; - - //we assume that the network will already be init by another function - // ( that has gui eletents in it because this one doesn't) - int done = 0; - - //build the URL, save path, and download each file and save it - for(int i = 0; i < Dir.GetFilecount(); ++i) - { - snprintf(codeurl, sizeof(codeurl), "%s%s", LanguageFilesURL, Dir.GetFilename(i)); - snprintf(savepath, sizeof(savepath), "%s/%s", Settings.languagefiles_path, Dir.GetFilename(i)); - - struct block file = downloadfile(codeurl); - - ShowProgress(tr("Updating Language Files:"), 0, Dir.GetFilename(i), i, Dir.GetFilecount(), false, true); - - if (file.data != NULL) - { - FILE * pfile; - pfile = fopen(savepath, "wb"); - if (pfile != NULL) - { - fwrite(file.data, 1, file.size, pfile); - fclose(pfile); - done++; - } - free(file.data); - } - } - - ProgressStop(); - - // return the number of files we updated - return done; -} - diff --git a/source/language/UpdateLanguage.h b/source/language/UpdateLanguage.h deleted file mode 100644 index 6e80e34a..00000000 --- a/source/language/UpdateLanguage.h +++ /dev/null @@ -1,19 +0,0 @@ -/**************************************************************************** - * language update - * for USB Loader GX *giantpune* - ***************************************************************************/ -#ifndef ___UPDATELANGUAGE_H_ -#define ___UPDATELANGUAGE_H_ - -#define MAXLANGUAGEFILES 50 - -//! Checks the language path for files ending in .lang and updates them (up to MAXLANGUAGEFILES) -//! This function expects that the network is already init before it is called - -//! returns the number of files successfully updated -//! returns -2 if it can't find any .lang files in the path -//! return -1 if there is no network connection -int UpdateLanguageFiles(); -int DownloadAllLanguageFiles(); - -#endif diff --git a/source/language/gettext.c b/source/language/gettext.c deleted file mode 100644 index 2487a2ad..00000000 --- a/source/language/gettext.c +++ /dev/null @@ -1,241 +0,0 @@ -#include -#include -#include -#include -#include "gettext.h" - -typedef struct _MSG -{ - u32 id; - char* msgstr; - struct _MSG *next; -} MSG; -static MSG *baseMSG = 0; - -#define HASHWORDBITS 32 - -/* Defines the so called `hashpjw' function by P.J. Weinberger - [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, - 1986, 1987 Bell Telephone Laboratories, Inc.] */ -static inline u32 hash_string(const char *str_param) -{ - u32 hval, g; - const char *str = str_param; - - /* Compute the hash value for the given string. */ - hval = 0; - while (*str != '\0') - { - hval <<= 4; - hval += (u8) *str++; - g = hval & ((u32) 0xf << (HASHWORDBITS - 4)); - if (g != 0) - { - hval ^= g >> (HASHWORDBITS - 8); - hval ^= g; - } - } - return hval; -} - -/* Expand some escape sequences found in the argument string. */ -static char * -expand_escape(const char *str) -{ - char *retval, *rp; - const char *cp = str; - - retval = (char *) malloc(strlen(str) + 1); - if (retval == NULL) return NULL; - rp = retval; - - while (cp[0] != '\0' && cp[0] != '\\') - *rp++ = *cp++; - if (cp[0] == '\0') goto terminate; - do - { - - /* Here cp[0] == '\\'. */ - switch (*++cp) - { - case '\"': /* " */ - *rp++ = '\"'; - ++cp; - break; - case 'a': /* alert */ - *rp++ = '\a'; - ++cp; - break; - case 'b': /* backspace */ - *rp++ = '\b'; - ++cp; - break; - case 'f': /* form feed */ - *rp++ = '\f'; - ++cp; - break; - case 'n': /* new line */ - *rp++ = '\n'; - ++cp; - break; - case 'r': /* carriage return */ - *rp++ = '\r'; - ++cp; - break; - case 't': /* horizontal tab */ - *rp++ = '\t'; - ++cp; - break; - case 'v': /* vertical tab */ - *rp++ = '\v'; - ++cp; - break; - case '\\': - *rp = '\\'; - ++cp; - break; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - { - int ch = *cp++ - '0'; - - if (*cp >= '0' && *cp <= '7') - { - ch *= 8; - ch += *cp++ - '0'; - - if (*cp >= '0' && *cp <= '7') - { - ch *= 8; - ch += *cp++ - '0'; - } - } - *rp = ch; - } - break; - default: - *rp = '\\'; - break; - } - - while (cp[0] != '\0' && cp[0] != '\\') - *rp++ = *cp++; - } while (cp[0] != '\0'); - - /* Terminate string. */ - terminate: *rp = '\0'; - return retval; -} - -static MSG *findMSG(u32 id) -{ - MSG *msg; - for (msg = baseMSG; msg; msg = msg->next) - { - if (msg->id == id) return msg; - } - return NULL; -} - -static MSG *setMSG(const char *msgid, const char *msgstr) -{ - u32 id = hash_string(msgid); - MSG *msg = findMSG(id); - if (!msg) - { - msg = (MSG *) malloc(sizeof(MSG)); - msg->id = id; - msg->msgstr = NULL; - msg->next = baseMSG; - baseMSG = msg; - } - if (msg) - { - if (msgstr) - { - if (msg->msgstr) free(msg->msgstr); - //msg->msgstr = strdup(msgstr); - msg->msgstr = expand_escape(msgstr); - } - return msg; - } - return NULL; -} -void gettextCleanUp(void) -{ - while (baseMSG) - { - MSG *nextMsg = baseMSG->next; - free(baseMSG->msgstr); - free(baseMSG); - baseMSG = nextMsg; - } -} - -bool gettextLoadLanguage(const char* langFile) -{ - FILE *f; - char line[512]; - char *lastID = NULL; - - gettextCleanUp(); - f = fopen(langFile, "r"); - if (!f) return false; - - while (fgets(line, sizeof(line), f)) - { - // lines starting with # are comments - if (line[0] == '#') - continue; - else if (strncmp(line, "msgid \"", 7) == 0) - { - char *msgid, *end; - if (lastID) - { - free(lastID); - lastID = NULL; - } - msgid = &line[7]; - end = strrchr(msgid, '"'); - if (end && end - msgid > 1) - { - *end = 0; - lastID = strdup(msgid); - } - } - else if (strncmp(line, "msgstr \"", 8) == 0) - { - char *msgstr, *end; - - if (lastID == NULL) continue; - - msgstr = &line[8]; - end = strrchr(msgstr, '"'); - if (end && end - msgstr > 1) - { - *end = 0; - setMSG(lastID, msgstr); - } - free(lastID); - lastID = NULL; - } - - } - - fclose(f); - return true; -} -const char *gettext(const char *msgid) -{ - if(!msgid) return NULL; - MSG *msg = findMSG(hash_string(msgid)); - if (msg && msg->msgstr) return msg->msgstr; - return msgid; -} - diff --git a/source/language/gettext.h b/source/language/gettext.h deleted file mode 100644 index 25140c7a..00000000 --- a/source/language/gettext.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef _GETTEXT_H_ -#define _GETTEXT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - - bool gettextLoadLanguage(const char* langFile); - void gettextCleanUp(void); - /* - * input msg = a text in ASCII - * output = the translated msg in utf-8 - */ - const char *gettext(const char *msg); -#define tr(s) gettext(s) -#define trNOOP(s) (s) - -#ifdef __cplusplus -} -#endif - -#endif /* _GETTEXT_H_ */ diff --git a/source/libs/libext2fs/ext2_frag.h b/source/libs/libext2fs/ext2_frag.h deleted file mode 100644 index 50732777..00000000 --- a/source/libs/libext2fs/ext2_frag.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef EXT2_FRAG_H_ -#define EXT2_FRAG_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -typedef int (*_ext2_frag_append_t)(void *ff, u32 offset, u32 sector, u32 count); - -int _EXT2_get_fragments(const char *in_path, _ext2_frag_append_t append_fragment, void *callback_data); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/libs/libext2fs/libcustomext2fs.a b/source/libs/libext2fs/libcustomext2fs.a deleted file mode 100644 index 14ae3518..00000000 Binary files a/source/libs/libext2fs/libcustomext2fs.a and /dev/null differ diff --git a/source/libs/libfat/fatfile_frag.h b/source/libs/libfat/fatfile_frag.h deleted file mode 100644 index 3af9b32e..00000000 --- a/source/libs/libfat/fatfile_frag.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef FAT_FRAG_H_ -#define FAT_FRAG_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -typedef int (*_fat_frag_append_t)(void *ff, u32 offset, u32 sector, u32 count); - -int _FAT_get_fragments (const char *path, _fat_frag_append_t append_fragment, void *callback_data); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/libs/libfat/libcustomfat.a b/source/libs/libfat/libcustomfat.a deleted file mode 100644 index 99806871..00000000 Binary files a/source/libs/libfat/libcustomfat.a and /dev/null differ diff --git a/source/libs/libntfs/libcustomntfs.a b/source/libs/libntfs/libcustomntfs.a deleted file mode 100644 index 60038c8c..00000000 Binary files a/source/libs/libntfs/libcustomntfs.a and /dev/null differ diff --git a/source/libs/libntfs/ntfsfile_frag.h b/source/libs/libntfs/ntfsfile_frag.h deleted file mode 100644 index 889abb1a..00000000 --- a/source/libs/libntfs/ntfsfile_frag.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef NTFS_FRAG_H_ -#define NTFS_FRAG_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -typedef int (*_ntfs_frag_append_t)(void *ff, u32 offset, u32 sector, u32 count); -int _NTFS_get_fragments (const char *path, _ntfs_frag_append_t append_fragment, void *callback_data); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/libs/libwbfs/libwbfs.c b/source/libs/libwbfs/libwbfs.c deleted file mode 100644 index bdfa4535..00000000 --- a/source/libs/libwbfs/libwbfs.c +++ /dev/null @@ -1,806 +0,0 @@ -// Copyright 2009 Kwiirk -// Licensed under the terms of the GNU GPL, version 2 -// http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt - -// Modified by oggzee - -#include "libwbfs.h" - -#define likely(x) __builtin_expect(!!(x), 1) -#define unlikely(x) __builtin_expect(!!(x), 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))) - -wbfs_t wbfs_iso_file; - -static int force_mode = 0; - -void wbfs_set_force_mode(int force) -{ - force_mode = force; -} - -static u8 size_to_shift(u32 size) -{ - u8 ret = 0; - while (size) - { - ret++; - size >>= 1; - } - return ret - 1; -} -#define read_le32_unaligned(x) ((x)[0]|((x)[1]<<8)|((x)[2]<<16)|((x)[3]<<24)) - -wbfs_t*wbfs_open_hd(rw_sector_callback_t read_hdsector, rw_sector_callback_t write_hdsector, void *callback_data, - int hd_sector_size, int num_hd_sector __attribute( ( unused ) ), int reset) -{ - int i = num_hd_sector, ret; - u8 *ptr, *tmp_buffer = wbfs_ioalloc( hd_sector_size ); - u8 part_table[16 * 4]; - ret = read_hdsector(callback_data, 0, 1, tmp_buffer); - if (ret) return 0; - //find wbfs partition - wbfs_memcpy( part_table, tmp_buffer + 0x1be, 16*4 ); - ptr = part_table; - for (i = 0; i < 4; i++, ptr += 16) - { - u32 part_lba = read_le32_unaligned( ptr + 0x8 ); - wbfs_head_t *head = (wbfs_head_t *) tmp_buffer; - ret = read_hdsector(callback_data, part_lba, 1, tmp_buffer); - // verify there is the magic. - if (head->magic == wbfs_htonl( WBFS_MAGIC )) - { - wbfs_t*p = wbfs_open_partition(read_hdsector, write_hdsector, callback_data, hd_sector_size, 0, part_lba, - reset); - wbfs_iofree( tmp_buffer ); - return p; - } - } - wbfs_iofree( tmp_buffer ); - if (reset)// XXX make a empty hd partition.. - { - } - return 0; -} -wbfs_t*wbfs_open_partition(rw_sector_callback_t read_hdsector, rw_sector_callback_t write_hdsector, - void *callback_data, int hd_sector_size, int num_hd_sector, u32 part_lba, int reset) -{ - wbfs_t *p = wbfs_malloc( sizeof( wbfs_t ) ); - - wbfs_head_t *head = wbfs_ioalloc( hd_sector_size ? hd_sector_size : 512 ); - - //constants, but put here for consistancy - p->wii_sec_sz = 0x8000; - p->wii_sec_sz_s = size_to_shift(0x8000); - p->n_wii_sec = (num_hd_sector / 0x8000) * hd_sector_size; - p->n_wii_sec_per_disc = 143432 * 2;//support for double layers discs.. - p->head = head; - p->part_lba = part_lba; - // init the partition - if (reset) - { - u8 sz_s; - wbfs_memset( head, 0, hd_sector_size ); - head->magic = wbfs_htonl( WBFS_MAGIC ); - head->hd_sec_sz_s = size_to_shift(hd_sector_size); - head->n_hd_sec = wbfs_htonl( num_hd_sector ); - // choose minimum wblk_sz that fits this partition size - for (sz_s = 6; sz_s < 11; sz_s++) - { - // ensure that wbfs_sec_sz is big enough to address every blocks using 16 bits - if (p->n_wii_sec < ((1U << 16) * (1 << sz_s))) break; - } - head->wbfs_sec_sz_s = sz_s + p->wii_sec_sz_s; - } - else read_hdsector(callback_data, p->part_lba, 1, head); - if (head->magic != wbfs_htonl( WBFS_MAGIC )) - ERROR( "bad magic" ); - if (!force_mode && hd_sector_size && head->hd_sec_sz_s != size_to_shift(hd_sector_size)) - ERROR( "hd sector size doesn't match" ); - if (!force_mode && num_hd_sector && head->n_hd_sec != (u32) wbfs_htonl( num_hd_sector )) - ERROR( "hd num sector doesn't match" ); - p->hd_sec_sz = 1 << head->hd_sec_sz_s; - p->hd_sec_sz_s = head->hd_sec_sz_s; - p->n_hd_sec = wbfs_ntohl( head->n_hd_sec ); - - p->n_wii_sec = (p->n_hd_sec / p->wii_sec_sz) * (p->hd_sec_sz); - - p->wbfs_sec_sz_s = head->wbfs_sec_sz_s; - p->wbfs_sec_sz = 1 << p->wbfs_sec_sz_s; - p->n_wbfs_sec = p->n_wii_sec >> (p->wbfs_sec_sz_s - p->wii_sec_sz_s); - p->n_wbfs_sec_per_disc = p->n_wii_sec_per_disc >> (p->wbfs_sec_sz_s - p->wii_sec_sz_s); - p->disc_info_sz = ALIGN_LBA( sizeof( wbfs_disc_info_t ) + p->n_wbfs_sec_per_disc * 2 ); - - //printf("hd_sector_size %X wii_sector size %X wbfs sector_size %X\n",p->hd_sec_sz,p->wii_sec_sz,p->wbfs_sec_sz); - p->read_hdsector = read_hdsector; - p->write_hdsector = write_hdsector; - p->callback_data = callback_data; - - p->freeblks_lba = (p->wbfs_sec_sz - p->n_wbfs_sec / 8) >> p->hd_sec_sz_s; - - if (!reset) - p->freeblks = 0; // will alloc and read only if needed - else - { - // init with all free blocks - p->freeblks = wbfs_ioalloc( ALIGN_LBA( p->n_wbfs_sec / 8 ) ); - wbfs_memset( p->freeblks, 0xff, p->n_wbfs_sec / 8 ); - } - p->max_disc = (p->freeblks_lba - 1) / (p->disc_info_sz >> p->hd_sec_sz_s); - if (p->max_disc > p->hd_sec_sz - sizeof(wbfs_head_t)) p->max_disc = p->hd_sec_sz - sizeof(wbfs_head_t); - - p->tmp_buffer = wbfs_ioalloc( p->hd_sec_sz ); - p->n_disc_open = 0; - return p; - error: wbfs_free( p ); - wbfs_iofree( head ); - return 0; - -} - -void wbfs_sync(wbfs_t*p) -{ - // copy back descriptors - if (p->write_hdsector) - { - p->write_hdsector(p->callback_data, p->part_lba + 0, 1, p->head); - - if (p->freeblks) p->write_hdsector(p->callback_data, p->part_lba + p->freeblks_lba, - ALIGN_LBA( p->n_wbfs_sec / 8 ) >> p->hd_sec_sz_s, p->freeblks); - } -} - -void wbfs_close(wbfs_t*p) -{ - wbfs_sync(p); - - if (p->n_disc_open) - ERROR( "trying to close wbfs while discs still open" ); - - wbfs_iofree( p->head ); - wbfs_iofree( p->tmp_buffer ); - if (p->freeblks) wbfs_iofree( p->freeblks ); - - wbfs_free( p ); - - error: return; -} - -wbfs_disc_t *wbfs_open_disc(wbfs_t* p, u8 *discid) -{ - u32 i; - int disc_info_sz_lba = p->disc_info_sz >> p->hd_sec_sz_s; - wbfs_disc_t *d = 0; - for (i = 0; i < p->max_disc; i++) - { - if (p->head->disc_table[i]) - { - p->read_hdsector(p->callback_data, p->part_lba + 1 + i * disc_info_sz_lba, 1, p->tmp_buffer); - if (wbfs_memcmp( discid, p->tmp_buffer, 6 ) == 0) - { - d = wbfs_malloc( sizeof( *d ) ); - if (!d) - ERROR( "allocating memory" ); - d->p = p; - d->i = i; - d->header = wbfs_ioalloc( p->disc_info_sz ); - if (!d->header) - ERROR( "allocating memory" ); - p->read_hdsector(p->callback_data, p->part_lba + 1 + i * disc_info_sz_lba, disc_info_sz_lba, d->header); - p->n_disc_open++; - // for(i=0;in_wbfs_sec_per_disc;i++) - // printf("%d,",wbfs_ntohs(d->header->wlba_table[i])); - return d; - } - } - } - return 0; - error: if (d) wbfs_iofree( d ); - return 0; - -} -void wbfs_close_disc(wbfs_disc_t*d) -{ - d->p->n_disc_open--; - wbfs_iofree( d->header ); - wbfs_free( d ); -} -// 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) -{ - if (d->p == &wbfs_iso_file) - { - return wbfs_iso_file_read(d, offset, data, len); - } - - wbfs_t *p = d->p; - u16 wlba = offset >> (p->wbfs_sec_sz_s - 2); - u32 iwlba_shift = p->wbfs_sec_sz_s - p->hd_sec_sz_s; - u32 lba_mask = (p->wbfs_sec_sz - 1) >> (p->hd_sec_sz_s); - u32 lba = (offset >> (p->hd_sec_sz_s - 2)) & lba_mask; - u32 off = offset & ((p->hd_sec_sz >> 2) - 1); - u16 iwlba = wbfs_ntohs( d->header->wlba_table[wlba] ); - u32 len_copied; - int err = 0; - u8 *ptr = data; - if (unlikely( iwlba == 0 )) return 1; - if (unlikely( off )) - { - off *= 4; - err = p->read_hdsector(p->callback_data, p->part_lba + (iwlba << iwlba_shift) + lba, 1, p->tmp_buffer); - if (err) return err; - len_copied = p->hd_sec_sz - off; - if (likely( len < len_copied )) len_copied = len; - wbfs_memcpy( ptr, p->tmp_buffer + off, len_copied ); - len -= len_copied; - ptr += len_copied; - lba++; - if (unlikely( lba > lba_mask && len )) - { - lba = 0; - iwlba = wbfs_ntohs( d->header->wlba_table[++wlba] ); - if (unlikely( iwlba == 0 )) return 1; - } - } - while (likely( len >= p->hd_sec_sz )) - { - u32 nlb = len >> (p->hd_sec_sz_s); - - if (unlikely( lba + nlb > p->wbfs_sec_sz )) // dont cross wbfs sectors.. - nlb = p->wbfs_sec_sz - lba; - err = p->read_hdsector(p->callback_data, p->part_lba + (iwlba << iwlba_shift) + lba, nlb, ptr); - if (err) return err; - len -= nlb << p->hd_sec_sz_s; - ptr += nlb << p->hd_sec_sz_s; - lba += nlb; - if (unlikely( lba > lba_mask && len )) - { - lba = 0; - iwlba = wbfs_ntohs( d->header->wlba_table[++wlba] ); - if (unlikely( iwlba == 0 )) return 1; - } - } - if (unlikely( len )) - { - err = p->read_hdsector(p->callback_data, p->part_lba + (iwlba << iwlba_shift) + lba, 1, p->tmp_buffer); - if (err) return err; - wbfs_memcpy( ptr, p->tmp_buffer, len ); - } - return 0; -} - -// disc listing -u32 wbfs_count_discs(wbfs_t*p) -{ - u32 i, count = 0; - for (i = 0; i < p->max_disc; i++) - if (p->head->disc_table[i]) count++; - return count; - -} - -u32 wbfs_sector_used(wbfs_t *p, wbfs_disc_info_t *di) -{ - u32 tot_blk = 0, j; - for (j = 0; j < p->n_wbfs_sec_per_disc; j++) - if (wbfs_ntohs( di->wlba_table[j] )) tot_blk++; - return tot_blk; -} - -u32 wbfs_get_disc_info(wbfs_t*p, u32 index, u8 *header, int header_size, u32 *size)//size in 32 bit -{ - u32 i, count = 0; - if (!p) return 1; - int disc_info_sz_lba = p->disc_info_sz >> p->hd_sec_sz_s; - - for (i = 0; i < p->max_disc; i++) - if (p->head->disc_table[i]) - { - if (count++ == index) - { - p->read_hdsector(p->callback_data, p->part_lba + 1 + i * disc_info_sz_lba, 1, p->tmp_buffer); - if (header_size > (int) p->hd_sec_sz) header_size = p->hd_sec_sz; - u32 magic = wbfs_ntohl( *( u32* )( p->tmp_buffer + 24 ) ); - if (magic != 0x5D1C9EA3) - { - p->head->disc_table[i] = 0; - return 1; - } - memcpy(header, p->tmp_buffer, header_size); - if (size) - { - u8 *header = wbfs_ioalloc( p->disc_info_sz ); - p->read_hdsector(p->callback_data, p->part_lba + 1 + i * disc_info_sz_lba, disc_info_sz_lba, header); - u32 sec_used = wbfs_sector_used(p, (wbfs_disc_info_t *) header); - wbfs_iofree( header ); - *size = sec_used << (p->wbfs_sec_sz_s - 2); - } - return 0; - } - } - return 1; -} - -static void load_freeblocks(wbfs_t*p) -{ - if (p->freeblks) return; - // XXX should handle malloc error.. - p->freeblks = wbfs_ioalloc( ALIGN_LBA( p->n_wbfs_sec / 8 ) ); - p->read_hdsector(p->callback_data, p->part_lba + p->freeblks_lba, ALIGN_LBA( p->n_wbfs_sec / 8 ) >> p->hd_sec_sz_s, - p->freeblks); - -} -u32 wbfs_count_usedblocks(wbfs_t*p) -{ - u32 i, j, count = 0; - load_freeblocks(p); - for (i = 0; i < p->n_wbfs_sec / (8 * 4); i++) - { - u32 v = wbfs_ntohl( p->freeblks[i] ); - if (v == ~0U) - count += 32; - else if (v != 0) for (j = 0; j < 32; j++) - if (v & (1 << j)) count++; - } - return count; -} - -// write access - - -//static -int block_used(u8 *used, u32 i, u32 wblk_sz) -{ - u32 k; - i *= wblk_sz; - for (k = 0; k < wblk_sz; k++) - if (i + k < 143432 * 2 && used[i + k]) return 1; - return 0; -} - -static u32 alloc_block(wbfs_t*p) -{ - u32 i, j; - for (i = 0; i < p->n_wbfs_sec / (8 * 4); i++) - { - u32 v = wbfs_ntohl( p->freeblks[i] ); - if (v != 0) - { - for (j = 0; j < 32; j++) - if (v & (1 << j)) - { - p->freeblks[i] = wbfs_htonl( v & ~( 1 << j ) ); - return (i * 32) + j + 1; - } - } - } - return ~0; -} -static void free_block(wbfs_t *p, int bl) -{ - int i = (bl - 1) / (32); - int j = (bl - 1) & 31; - u32 v = wbfs_ntohl( p->freeblks[i] ); - p->freeblks[i] = wbfs_htonl( v | 1 << j ); -} - -s32 wbfs_add_disc(wbfs_t*p, read_wiidisc_callback_t read_src_wii_disc, void *callback_data, - progress_callback_t spinner, partition_selector_t sel, int copy_1_1) -{ - int i, discn; - u32 tot, cur; - u32 wii_sec_per_wbfs_sect = 1 << (p->wbfs_sec_sz_s - p->wii_sec_sz_s); - wiidisc_t *d = 0; - u8 *used = 0; - wbfs_disc_info_t *info = 0; - u8* copy_buffer = 0; - int retval = -1; - int num_wbfs_sect_to_copy; - u32 last_used; - used = wbfs_malloc( p->n_wii_sec_per_disc ); - - if (!used) - ERROR( "unable to alloc memory" ); - // copy_1_1 needs disk usage for layers detection - //if(!copy_1_1) - { - d = wd_open_disc(read_src_wii_disc, callback_data); - if (!d) - ERROR( "unable to open wii disc" ); - wd_build_disc_usage(d, sel, used); - wd_close_disc(d); - d = 0; - } - - for (i = 0; i < p->max_disc; i++)// find a free slot. - if (p->head->disc_table[i] == 0) break; - if (i == p->max_disc) - ERROR( "no space left on device (table full)" ); - p->head->disc_table[i] = 1; - discn = i; - load_freeblocks(p); - - // build disc info - info = wbfs_ioalloc( p->disc_info_sz ); - read_src_wii_disc(callback_data, 0, 0x100, info->disc_header_copy); - - copy_buffer = wbfs_ioalloc( p->wii_sec_sz ); - if (!copy_buffer) - ERROR( "alloc memory" ); - tot = 0; - cur = 0; - num_wbfs_sect_to_copy = p->n_wbfs_sec_per_disc; - // count total number of sectors to write - last_used = 0; - for (i = 0; i < num_wbfs_sect_to_copy; i++) - { - if (block_used(used, i, wii_sec_per_wbfs_sect)) - { - tot += wii_sec_per_wbfs_sect; - last_used = i; - } - } - if (copy_1_1) - { - // detect single or dual layer - if ((last_used + 1) > (p->n_wbfs_sec_per_disc / 2)) - { - // dual layer - num_wbfs_sect_to_copy = p->n_wbfs_sec_per_disc; - } - else - { - // single layer - num_wbfs_sect_to_copy = p->n_wbfs_sec_per_disc / 2; - } - tot = num_wbfs_sect_to_copy * wii_sec_per_wbfs_sect; - } - /* - // num of hd sectors to copy could be specified directly - if (copy_1_1 > 1) { - u32 hd_sec_per_wii_sec = p->wii_sec_sz / p->hd_sec_sz; - num_wbfs_sect_to_copy = copy_1_1 / hd_sec_per_wii_sec / wii_sec_per_wbfs_sect; - tot = num_wbfs_sect_to_copy * wii_sec_per_wbfs_sect; - }*/ - int ret = 0; - if (spinner) spinner(0, tot); - for (i = 0; i < num_wbfs_sect_to_copy; i++) - { - u16 bl = 0; - if (copy_1_1 || block_used(used, i, wii_sec_per_wbfs_sect)) - { - u16 j; - - bl = alloc_block(p); - if (bl == 0xffff) - ERROR( "no space left on device (disc full)" ); - for (j = 0; j < wii_sec_per_wbfs_sect; j++) - { - u32 offset = (i * (p->wbfs_sec_sz >> 2)) + (j * (p->wii_sec_sz >> 2)); - - ret = read_src_wii_disc(callback_data, offset, p->wii_sec_sz, copy_buffer); - if (ret) - { - if (copy_1_1 && i > p->n_wbfs_sec_per_disc / 2) - { - // end of dual layer data - if (j > 0) - { - info->wlba_table[i] = wbfs_htons( bl ); - } - spinner(tot, tot); - break; - } - //ERROR("read error"); - printf("\rWARNING: read (%u) error (%d)\n", offset, ret); - } - - //fix the partition table - if (offset == (0x40000 >> 2)) wd_fix_partition_table(d, sel, copy_buffer); - p->write_hdsector(p->callback_data, p->part_lba + bl * (p->wbfs_sec_sz / p->hd_sec_sz) + j - * (p->wii_sec_sz / p->hd_sec_sz), p->wii_sec_sz / p->hd_sec_sz, copy_buffer); - cur++; - if (spinner) spinner(cur, tot); - } - } - if (ret) break; - info->wlba_table[i] = wbfs_htons( bl ); - wbfs_sync(p); - } - // write disc info - int disc_info_sz_lba = p->disc_info_sz >> p->hd_sec_sz_s; - p->write_hdsector(p->callback_data, p->part_lba + 1 + discn * disc_info_sz_lba, disc_info_sz_lba, info); - wbfs_sync(p); - retval = 0; - error: if (d) wd_close_disc(d); - if (used) wbfs_free( used ); - if (info) wbfs_iofree( info ); - if (copy_buffer) wbfs_iofree( copy_buffer ); - // init with all free blocks - - return retval; -} - -u32 wbfs_rm_disc(wbfs_t*p, u8* discid) -{ - wbfs_disc_t *d = wbfs_open_disc(p, discid); - int i; - int discn = 0; - int disc_info_sz_lba = p->disc_info_sz >> p->hd_sec_sz_s; - if (!d) return 1; - load_freeblocks(p); - discn = d->i; - for (i = 0; i < p->n_wbfs_sec_per_disc; i++) - { - u32 iwlba = wbfs_ntohs( d->header->wlba_table[i] ); - if (iwlba) free_block(p, iwlba); - } - memset(d->header, 0, p->disc_info_sz); - p->write_hdsector(p->callback_data, p->part_lba + 1 + discn * disc_info_sz_lba, disc_info_sz_lba, d->header); - p->head->disc_table[discn] = 0; - wbfs_close_disc(d); - wbfs_sync(p); - return 0; -} - -u32 wbfs_ren_disc(wbfs_t*p, u8* discid, u8* newname) -{ - wbfs_disc_t *d = wbfs_open_disc(p, discid); - int disc_info_sz_lba = p->disc_info_sz >> p->hd_sec_sz_s; - - if (!d) return 1; - - memset(d->header->disc_header_copy + 0x20, 0, 0x40); - strncpy((char *) d->header->disc_header_copy + 0x20, (char *) newname, 0x39); - - p->write_hdsector(p->callback_data, p->part_lba + 1 + d->i * disc_info_sz_lba, disc_info_sz_lba, d->header); - wbfs_close_disc(d); - return 0; -} - -u32 wbfs_rID_disc(wbfs_t*p, u8* discid, u8* newID) -{ - wbfs_disc_t *d = wbfs_open_disc(p, discid); - int disc_info_sz_lba = p->disc_info_sz >> p->hd_sec_sz_s; - - if (!d) return 1; - - memset(d->header->disc_header_copy, 0, 0x10); - strncpy((char *) d->header->disc_header_copy, (char *) newID, 0x9); - - p->write_hdsector(p->callback_data, p->part_lba + 1 + d->i * disc_info_sz_lba, disc_info_sz_lba, d->header); - wbfs_close_disc(d); - return 0; -} - -// trim the file-system to its minimum size -u32 wbfs_trim(wbfs_t*p) -{ - u32 maxbl; - load_freeblocks(p); - maxbl = alloc_block(p); - p->n_hd_sec = maxbl << (p->wbfs_sec_sz_s - p->hd_sec_sz_s); - p->head->n_hd_sec = wbfs_htonl( p->n_hd_sec ); - // make all block full - memset(p->freeblks, 0, p->n_wbfs_sec / 8); - wbfs_sync(p); - // os layer will truncate the file. - return maxbl; -} - -// data extraction -u32 wbfs_extract_disc(wbfs_disc_t*d, rw_sector_callback_t write_dst_wii_sector, void *callback_data, - progress_callback_t spinner) -{ - wbfs_t *p = d->p; - u8* copy_buffer = 0; - int i; - int src_wbs_nlb = p->wbfs_sec_sz / p->hd_sec_sz; - int dst_wbs_nlb = p->wbfs_sec_sz / p->wii_sec_sz; - copy_buffer = wbfs_ioalloc( p->wbfs_sec_sz ); - if (!copy_buffer) - ERROR( "alloc memory" ); - - for (i = 0; i < p->n_wbfs_sec_per_disc; i++) - { - u32 iwlba = wbfs_ntohs( d->header->wlba_table[i] ); - if (iwlba) - { - - if (spinner) spinner(i, p->n_wbfs_sec_per_disc); - p->read_hdsector(p->callback_data, p->part_lba + iwlba * src_wbs_nlb, src_wbs_nlb, copy_buffer); - write_dst_wii_sector(callback_data, i * dst_wbs_nlb, dst_wbs_nlb, copy_buffer); - } - } - wbfs_iofree( copy_buffer ); - return 0; - error: return 1; -} - -u64 wbfs_estimate_disc(wbfs_t *p, read_wiidisc_callback_t read_src_wii_disc, void *callback_data, partition_selector_t sel) -{ - u8 *b; - int i; - u32 tot; - u32 wii_sec_per_wbfs_sect = 1 << (p->wbfs_sec_sz_s - p->wii_sec_sz_s); - wiidisc_t *d = 0; - u8 *used = 0; - wbfs_disc_info_t *info = 0; - - tot = 0; - - used = wbfs_malloc( p->n_wii_sec_per_disc ); - if (!used) - { - ERROR( "unable to alloc memory" ); - } - - d = wd_open_disc(read_src_wii_disc, callback_data); - if (!d) - { - ERROR( "unable to open wii disc" ); - } - - wd_build_disc_usage(d, sel, used); - wd_close_disc(d); - d = 0; - - info = wbfs_ioalloc( p->disc_info_sz ); - b = (u8 *) info; - read_src_wii_disc(callback_data, 0, 0x100, info->disc_header_copy); - - for (i = 0; i < p->n_wbfs_sec_per_disc; i++) - { - if (block_used(used, i, wii_sec_per_wbfs_sect)) - { - tot++; - } - } - - error: - if (d) wd_close_disc(d); - if (used) wbfs_free( used ); - if (info) wbfs_iofree( info ); - - return (u64) tot * (u64) p->wbfs_sec_sz; -} - -u32 wbfs_size_disc(wbfs_t*p, read_wiidisc_callback_t read_src_wii_disc, void *callback_data, partition_selector_t sel, - u32 *comp_size, u32 *real_size) -{ - int i; - u32 tot = 0, last = 0; - u32 wii_sec_per_wbfs_sect = 1 << (p->wbfs_sec_sz_s - p->wii_sec_sz_s); - wiidisc_t *d = 0; - u8 *used = 0; - used = wbfs_malloc( p->n_wii_sec_per_disc ); - if (!used) - ERROR( "unable to alloc memory" ); - d = wd_open_disc(read_src_wii_disc, callback_data); - if (!d) - ERROR( "unable to open wii disc" ); - wd_build_disc_usage(d, sel, used); - wd_close_disc(d); - d = 0; - - // count total number to write for spinner - for (i = 0; i < p->n_wbfs_sec_per_disc; i++) - { - if (block_used(used, i, wii_sec_per_wbfs_sect)) - { - tot += wii_sec_per_wbfs_sect; - last = i * wii_sec_per_wbfs_sect; - } - } - - error: if (d) wd_close_disc(d); - if (used) wbfs_free( used ); - - *comp_size = tot; - *real_size = last; - - return 0; -} - -// 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, u8 *data, u32 len) - -// offset points 32bit words, count counts bytes -//int (*read_wiidisc_callback_t)(void*fp,u32 offset,u32 count,void*iobuf); - -// connect wiidisc to wbfs_disc -int read_wiidisc_wbfsdisc(void*fp, u32 offset, u32 count, void*iobuf) -{ - return wbfs_disc_read((wbfs_disc_t*) fp, offset, count, iobuf); -} - -int wbfs_extract_file(wbfs_disc_t*d, char *path, void **data) -{ - wiidisc_t *wd = 0; - int ret = 0; - - wd = wd_open_disc(read_wiidisc_wbfsdisc, d); - if (!wd) - { - ERROR( "opening wbfs disc" ); - return -1; - } - wd->extracted_size = 0; - *data = wd_extract_file(wd, ONLY_GAME_PARTITION, path); - ret = wd->extracted_size; - if (!*data) - { - //ERROR("file not found"); - ret = -1; - } - wd_close_disc(wd); - error: return ret; -} - -int wbfs_get_fragments(wbfs_disc_t *d, _frag_append_t append_fragment, void *callback_data) -{ - if (!d) return -1; - - //! Use here real physical HDD sector size - extern u32 hdd_sector_size; - wbfs_t *p = d->p; - int src_wbs_nlb = p->wbfs_sec_sz / hdd_sector_size; - 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 -#include - -// 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 = d->i; - 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 != (int) len) return -2; - return 0; -} - -u32 wbfs_disc_sector_used(wbfs_disc_t *d) -{ - if(!d) return 0; - - if (d->p == &wbfs_iso_file) - { - int fd = d->i; - struct stat st; - if (fstat(fd, &st) == -1) return 0; - return (st.st_size >> 9); - } - - return wbfs_sector_used(d->p, d->header); -} - diff --git a/source/libs/libwbfs/libwbfs.h b/source/libs/libwbfs/libwbfs.h deleted file mode 100644 index 1b0e9877..00000000 --- a/source/libs/libwbfs/libwbfs.h +++ /dev/null @@ -1,234 +0,0 @@ -// Modified by oggzee - -#ifndef LIBWBFS_H -#define LIBWBFS_H - -#include "libwbfs_os.h" // this file is provided by the project wanting to compile libwbfs -#include "wiidisc.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - enum - { - WBFS_DEVICE_USB = 1, /* USB device */ - WBFS_DEVICE_SDHC - /* SDHC device */ - }; - - typedef u32 be32_t; - typedef u16 be16_t; - - typedef struct wbfs_head - { - be32_t magic; - // parameters copied in the partition for easy dumping, and bug reports - be32_t n_hd_sec; // total number of hd_sec in this partition - u8 hd_sec_sz_s; // sector size in this partition - u8 wbfs_sec_sz_s; // size of a wbfs sec - u8 padding3[2]; - u8 disc_table[0]; // size depends on hd sector size - }__attribute( ( packed ) ) wbfs_head_t; - - typedef struct wbfs_disc_info - { - u8 disc_header_copy[0x100]; - be16_t wlba_table[0]; - } wbfs_disc_info_t; - - // WBFS first wbfs_sector structure: - // - // ----------- - // | wbfs_head | (hd_sec_sz) - // ----------- - // | | - // | disc_info | - // | | - // ----------- - // | | - // | disc_info | - // | | - // ----------- - // | | - // | ... | - // | | - // ----------- - // | | - // | disc_info | - // | | - // ----------- - // | | - // |freeblk_tbl| - // | | - // ----------- - // - - // callback definition. Return 1 on fatal error (callback is supposed to make retries until no hopes..) - typedef int (*rw_sector_callback_t)(void*fp, u32 lba, u32 count, void*iobuf); - typedef void (*progress_callback_t)(s64 status, s64 total); - - typedef struct wbfs_s - { - wbfs_head_t *head; - - /* hdsectors, the size of the sector provided by the hosting hard drive */ - u32 hd_sec_sz; - u8 hd_sec_sz_s; // the power of two of the last number - u32 n_hd_sec; // the number of hd sector in the wbfs partition - - /* standard wii sector (0x8000 bytes) */ - u32 wii_sec_sz; - u8 wii_sec_sz_s; - u32 n_wii_sec; - u32 n_wii_sec_per_disc; - - /* The size of a wbfs sector */ - u32 wbfs_sec_sz; - u32 wbfs_sec_sz_s; - u16 n_wbfs_sec; // this must fit in 16 bit! - u16 n_wbfs_sec_per_disc; // size of the lookup table - - u32 part_lba; - /* virtual methods to read write the partition */ - rw_sector_callback_t read_hdsector; - rw_sector_callback_t write_hdsector; - void *callback_data; - - u16 max_disc; - u32 freeblks_lba; - u32 *freeblks; - u16 disc_info_sz; - - u8 *tmp_buffer; // pre-allocated buffer for unaligned read - - u32 n_disc_open; - - } wbfs_t; - - typedef struct wbfs_disc_s - { - wbfs_t *p; - wbfs_disc_info_t *header; // pointer to wii header - int i; // disc index in the wbfs header (disc_table) - } wbfs_disc_t; - -#define WBFS_MAGIC (('W'<<24)|('B'<<16)|('F'<<8)|('S')) - - /*! @brief open a MSDOS partitionned harddrive. This tries to find a wbfs partition into the harddrive - @param read_hdsector,write_hdsector: accessors to a harddrive - @hd_sector_size: size of the hd sector. Can be set to zero if the partition in already initialized - @num_hd_sector: number of sectors in this disc. Can be set to zero if the partition in already initialized - @reset: not implemented, This will format the whole harddrive with one wbfs partition that fits the whole disk. - calls wbfs_error() to have textual meaning of errors - @return NULL in case of error - */ - wbfs_t*wbfs_open_hd(rw_sector_callback_t read_hdsector, rw_sector_callback_t write_hdsector, void *callback_data, - int hd_sector_size, int num_hd_sector, int reset); - - /*! @brief open a wbfs partition - @param read_hdsector,write_hdsector: accessors to the partition - @hd_sector_size: size of the hd sector. Can be set to zero if the partition in already initialized - @num_hd_sector: number of sectors in this partition. Can be set to zero if the partition in already initialized - @partition_lba: The partitio offset if you provided accessors to the whole disc. - @reset: initialize the partition with an empty wbfs. - calls wbfs_error() to have textual meaning of errors - @return NULL in case of error - */ - wbfs_t*wbfs_open_partition(rw_sector_callback_t read_hdsector, rw_sector_callback_t write_hdsector, - void *callback_data, int hd_sector_size, int num_hd_sector, u32 partition_lba, int reset); - - /*! @brief close a wbfs partition, and sync the metadatas to the disc */ - void wbfs_close(wbfs_t*); - - /*! @brief open a disc inside a wbfs partition use a 6 char discid+vendorid - @return NULL if discid is not present - */ - wbfs_disc_t *wbfs_open_disc(wbfs_t* p, u8 *diskid); - - /*! @brief close a already open disc inside a wbfs partition */ - void wbfs_close_disc(wbfs_disc_t*d); - - u32 wbfs_sector_used(wbfs_t *p, wbfs_disc_info_t *di); - - /*! @brief accessor to the wii disc - @param d: a pointer to already open disc - @param offset: an offset inside the disc, *points 32bit words*, allowing to access 16GB data - @param len: The length of the data to fetch, 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); - - /*! @return the number of discs inside the partition */ - u32 wbfs_count_discs(wbfs_t*p); - /*! get the disc info of ith disc inside the partition. It correspond to the first 0x100 bytes of the wiidvd - http://www.wiibrew.org/wiki/Wiidisc#Header - @param i: index of the disc inside the partition - @param header: pointer to 0x100 bytes to write the header - @size: optional pointer to a 32bit word that will get the size in 32bit words of the DVD taken on the partition. - */ - u32 wbfs_get_disc_info(wbfs_t*p, u32 i, u8 *header, int header_size, u32 *size); - - /*! get the number of used block of the partition. - to be multiplied by p->wbfs_sec_sz (use 64bit multiplication) to have the number in bytes - */ - u32 wbfs_count_usedblocks(wbfs_t*p); - - /******************* write access ******************/ - - /*! add a wii dvd inside the partition - @param read_src_wii_disc: a callback to access the wii dvd. offsets are in 32bit, len in bytes! - @callback_data: private data passed to the callback - @spinner: a pointer to a function that is regulary called to update a progress bar. - @sel: selects which partitions to copy. - @copy_1_1: makes a 1:1 copy, whenever a game would not use the wii disc format, and some data is hidden outside the filesystem. - */ - s32 wbfs_add_disc(wbfs_t*p, read_wiidisc_callback_t read_src_wii_disc, void *callback_data, - progress_callback_t spinner, partition_selector_t sel, int copy_1_1); - - /*! remove a wiidvd inside a partition */ - u32 wbfs_rm_disc(wbfs_t*p, u8* discid); - - /*! rename a game */ - u32 wbfs_ren_disc(wbfs_t*p, u8* discid, u8* newname); - - /* change ID of a game*/ - u32 wbfs_rID_disc(wbfs_t*p, u8* discid, u8* newID); - /*! trim the file-system to its minimum size - This allows to use wbfs as a wiidisc container - */ - u32 wbfs_trim(wbfs_t*p); - - /*! extract a disc from the wbfs, unused sectors are just untouched, allowing descent filesystem to only really usefull space to store the disc. - Even if the filesize is 4.7GB, the disc usage will be less. - */ - u32 wbfs_extract_disc(wbfs_disc_t*d, rw_sector_callback_t write_dst_wii_sector, void *callback_data, - progress_callback_t spinner); - - /*! extract a file from the wii disc filesystem. - E.G. Allows to extract the opening.bnr to install a game as a system menu channel - */ - int wbfs_extract_file(wbfs_disc_t*d, char *path, void **data); - - // remove some sanity checks - void wbfs_set_force_mode(int force); - - u64 wbfs_estimate_disc(wbfs_t *p, read_wiidisc_callback_t read_src_wii_disc, void *callback_data, - partition_selector_t sel); - // compressed and real size - u32 wbfs_size_disc(wbfs_t*p, read_wiidisc_callback_t read_src_wii_disc, void *callback_data, - partition_selector_t sel, 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); - int wbfs_iso_file_read(wbfs_disc_t*d, u32 offset, u8 *data, u32 len); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/source/libs/libwbfs/libwbfs_os.h b/source/libs/libwbfs/libwbfs_os.h deleted file mode 100644 index 773a5d29..00000000 --- a/source/libs/libwbfs/libwbfs_os.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef LIBWBFS_GLUE_H -#define LIBWBFS_GLUE_H - -#include -#include "memory/mem2.h" - -#define debug_printf(fmt, ...); - -#include -#define wbfs_fatal(x) do { printf("\nwbfs panic: %s\n\n",x); return; } while(0) -#define wbfs_error(x) do { printf("\nwbfs error: %s\n\n",x); } while(0) - -#include -#include - -#define wbfs_malloc(x) MEM2_alloc(x) -#define wbfs_free(x) free(x) -#define wbfs_ioalloc(x) MEM2_alloc(((x) + 31) & ~31) -#define wbfs_iofree(x) free(x) -#define wbfs_be16(x) (*((u16*)(x))) -#define wbfs_be32(x) (*((u32*)(x))) -#define wbfs_ntohl(x) (x) -#define wbfs_htonl(x) (x) -#define wbfs_ntohs(x) (x) -#define wbfs_htons(x) (x) - -#include - -#define wbfs_memcmp(x,y,z) memcmp(x,y,z) -#define wbfs_memcpy(x,y,z) memcpy(x,y,z) -#define wbfs_memset(x,y,z) memset(x,y,z) - -#endif diff --git a/source/libs/libwbfs/rijndael.c b/source/libs/libwbfs/rijndael.c deleted file mode 100644 index 473023d9..00000000 --- a/source/libs/libwbfs/rijndael.c +++ /dev/null @@ -1,432 +0,0 @@ -/* Rijndael Block Cipher - rijndael.c - - Written by Mike Scott 21st April 1999 - mike@compapp.dcu.ie - - Permission for free direct or derivative use is granted subject - to compliance with any conditions that the originators of the - algorithm place on its exploitation. - - */ - -#include -#include - -#define u8 unsigned char /* 8 bits */ -#define u32 unsigned long /* 32 bits */ -#define u64 unsigned long long - -/* rotates x one bit to the left */ - -#define ROTL(x) (((x)>>7)|((x)<<1)) - -/* Rotates 32-bit word left by 1, 2 or 3 byte */ - -#define ROTL8(x) (((x)<<8)|((x)>>24)) -#define ROTL16(x) (((x)<<16)|((x)>>16)) -#define ROTL24(x) (((x)<<24)|((x)>>8)) - -/* Fixed Data */ - -static u8 InCo[4] = { 0xB, 0xD, 0x9, 0xE }; /* Inverse Coefficients */ - -static u8 fbsub[256]; -static u8 rbsub[256]; -static u8 ptab[256], ltab[256]; -static u32 ftable[256]; -static u32 rtable[256]; -static u32 rco[30]; - -/* Parameter-dependent data */ - -int Nk, Nb, Nr; -u8 fi[24], ri[24]; -u32 fkey[120]; -u32 rkey[120]; - -static u32 pack(u8 *b) -{ /* pack bytes into a 32-bit Word */ - return ((u32 ) b[3] << 24) | ((u32 ) b[2] << 16) | ((u32 ) b[1] << 8) | (u32 ) b[0]; -} - -static void unpack(u32 a, u8 *b) -{ /* unpack bytes from a word */ - b[0] = (u8 ) a; - b[1] = (u8 ) (a >> 8); - b[2] = (u8 ) (a >> 16); - b[3] = (u8 ) (a >> 24); -} - -static u8 xtime(u8 a) -{ - u8 b; - if (a & 0x80) - b = 0x1B; - else b = 0; - a <<= 1; - a ^= b; - return a; -} - -static u8 bmul(u8 x, u8 y) -{ /* x.y= AntiLog(Log(x) + Log(y)) */ - if (x && y) - return ptab[(ltab[x] + ltab[y]) % 255]; - else return 0; -} - -static u32 SubByte(u32 a) -{ - u8 b[4]; - unpack(a, b); - b[0] = fbsub[b[0]]; - b[1] = fbsub[b[1]]; - b[2] = fbsub[b[2]]; - b[3] = fbsub[b[3]]; - return pack(b); -} - -static u8 product(u32 x, u32 y) -{ /* dot product of two 4-byte arrays */ - u8 xb[4], yb[4]; - unpack(x, xb); - unpack(y, yb); - return bmul(xb[0], yb[0]) ^ bmul(xb[1], yb[1]) ^ bmul(xb[2], yb[2]) ^ bmul(xb[3], yb[3]); -} - -static u32 InvMixCol(u32 x) -{ /* matrix Multiplication */ - u32 y, m; - u8 b[4]; - - m = pack(InCo); - b[3] = product(m, x); - m = ROTL24( m ); - b[2] = product(m, x); - m = ROTL24( m ); - b[1] = product(m, x); - m = ROTL24( m ); - b[0] = product(m, x); - y = pack(b); - return y; -} - -u8 ByteSub(u8 x) -{ - u8 y = ptab[255 - ltab[x]]; /* multiplicative inverse */ - x = y; - x = ROTL( x ); - y ^= x; - x = ROTL( x ); - y ^= x; - x = ROTL( x ); - y ^= x; - x = ROTL( x ); - y ^= x; - y ^= 0x63; - return y; -} - -void gentables(void) -{ /* generate tables */ - int i; - u8 y, b[4]; - - /* use 3 as primitive root to generate power and log tables */ - - ltab[0] = 0; - ptab[0] = 1; - ltab[1] = 0; - ptab[1] = 3; - ltab[3] = 1; - for (i = 2; i < 256; i++) - { - ptab[i] = ptab[i - 1] ^ xtime(ptab[i - 1]); - ltab[ptab[i]] = i; - } - - /* affine transformation:- each bit is xored with itself shifted one bit */ - - fbsub[0] = 0x63; - rbsub[0x63] = 0; - for (i = 1; i < 256; i++) - { - y = ByteSub((u8 ) i); - fbsub[i] = y; - rbsub[y] = i; - } - - for (i = 0, y = 1; i < 30; i++) - { - rco[i] = y; - y = xtime(y); - } - - /* calculate forward and reverse tables */ - for (i = 0; i < 256; i++) - { - y = fbsub[i]; - b[3] = y ^ xtime(y); - b[2] = y; - b[1] = y; - b[0] = xtime(y); - ftable[i] = pack(b); - - y = rbsub[i]; - b[3] = bmul(InCo[0], y); - b[2] = bmul(InCo[1], y); - b[1] = bmul(InCo[2], y); - b[0] = bmul(InCo[3], y); - rtable[i] = pack(b); - } -} - -void gkey(int nb, int nk, char *key) -{ /* blocksize=32*nb bits. Key=32*nk bits */ - /* currently nb,bk = 4, 6 or 8 */ - /* key comes as 4*Nk bytes */ - /* Key Scheduler. Create expanded encryption key */ - int i, j, k, m, N; - int C1, C2, C3; - u32 CipherKey[8]; - - Nb = nb; - Nk = nk; - - /* Nr is number of rounds */ - if (Nb >= Nk) - Nr = 6 + Nb; - else Nr = 6 + Nk; - - C1 = 1; - if (Nb < 8) - { - C2 = 2; - C3 = 3; - } - else - { - C2 = 3; - C3 = 4; - } - - /* pre-calculate forward and reverse increments */ - for (m = j = 0; j < nb; j++, m += 3) - { - fi[m] = (j + C1) % nb; - fi[m + 1] = (j + C2) % nb; - fi[m + 2] = (j + C3) % nb; - ri[m] = (nb + j - C1) % nb; - ri[m + 1] = (nb + j - C2) % nb; - ri[m + 2] = (nb + j - C3) % nb; - } - - N = Nb * (Nr + 1); - - for (i = j = 0; i < Nk; i++, j += 4) - { - CipherKey[i] = pack((u8 *) &key[j]); - } - for (i = 0; i < Nk; i++) - fkey[i] = CipherKey[i]; - for (j = Nk, k = 0; j < N; j += Nk, k++) - { - fkey[j] = fkey[j - Nk] ^ SubByte(ROTL24( fkey[j-1] )) ^ rco[k]; - if (Nk <= 6) - { - for (i = 1; i < Nk && (i + j) < N; i++) - fkey[i + j] = fkey[i + j - Nk] ^ fkey[i + j - 1]; - } - else - { - for (i = 1; i < 4 && (i + j) < N; i++) - fkey[i + j] = fkey[i + j - Nk] ^ fkey[i + j - 1]; - if ((j + 4) < N) fkey[j + 4] = fkey[j + 4 - Nk] ^ SubByte(fkey[j + 3]); - for (i = 5; i < Nk && (i + j) < N; i++) - fkey[i + j] = fkey[i + j - Nk] ^ fkey[i + j - 1]; - } - - } - - /* now for the expanded decrypt key in reverse order */ - - for (j = 0; j < Nb; j++) - rkey[j + N - Nb] = fkey[j]; - for (i = Nb; i < N - Nb; i += Nb) - { - k = N - Nb - i; - for (j = 0; j < Nb; j++) - rkey[k + j] = InvMixCol(fkey[i + j]); - } - for (j = N - Nb; j < N; j++) - rkey[j - N + Nb] = fkey[j]; -} - -/* There is an obvious time/space trade-off possible here. * - * Instead of just one ftable[], I could have 4, the other * - * 3 pre-rotated to save the ROTL8, ROTL16 and ROTL24 overhead */ - -void encrypt(char *buff) -{ - int i, j, k, m; - u32 a[8], b[8], *x, *y, *t; - - for (i = j = 0; i < Nb; i++, j += 4) - { - a[i] = pack((u8 *) &buff[j]); - a[i] ^= fkey[i]; - } - k = Nb; - x = a; - y = b; - - /* State alternates between a and b */ - for (i = 1; i < Nr; i++) - { /* Nr is number of rounds. May be odd. */ - - /* if Nb is fixed - unroll this next - loop and hard-code in the values of fi[] */ - - for (m = j = 0; j < Nb; j++, m += 3) - { /* deal with each 32-bit element of the State */ - /* This is the time-critical bit */ - y[j] = fkey[k++] ^ ftable[(u8 ) x[j]] ^ ROTL8( ftable[( u8 )( x[fi[m]] >> 8 )] ) - ^ ROTL16( ftable[( u8 )( x[fi[m+1]] >> 16 )] ) ^ ROTL24( ftable[x[fi[m+2]] >> 24] ); - } - t = x; - x = y; - y = t; /* swap pointers */ - } - - /* Last Round - unroll if possible */ - for (m = j = 0; j < Nb; j++, m += 3) - { - y[j] = fkey[k++] ^ (u32 ) fbsub[(u8 ) x[j]] ^ ROTL8( ( u32 )fbsub[( u8 )( x[fi[m]] >> 8 )] ) - ^ ROTL16( ( u32 )fbsub[( u8 )( x[fi[m+1]] >> 16 )] ) ^ ROTL24( ( u32 )fbsub[x[fi[m+2]] >> 24] ); - } - for (i = j = 0; i < Nb; i++, j += 4) - { - unpack(y[i], (u8 *) &buff[j]); - x[i] = y[i] = 0; /* clean up stack */ - } - return; -} - -void decrypt(char *buff) -{ - int i, j, k, m; - u32 a[8], b[8], *x, *y, *t; - - for (i = j = 0; i < Nb; i++, j += 4) - { - a[i] = pack((u8 *) &buff[j]); - a[i] ^= rkey[i]; - } - k = Nb; - x = a; - y = b; - - /* State alternates between a and b */ - for (i = 1; i < Nr; i++) - { /* Nr is number of rounds. May be odd. */ - - /* if Nb is fixed - unroll this next - loop and hard-code in the values of ri[] */ - - for (m = j = 0; j < Nb; j++, m += 3) - { /* This is the time-critical bit */ - y[j] = rkey[k++] ^ rtable[(u8 ) x[j]] ^ ROTL8( rtable[( u8 )( x[ri[m]] >> 8 )] ) - ^ ROTL16( rtable[( u8 )( x[ri[m+1]] >> 16 )] ) ^ ROTL24( rtable[x[ri[m+2]] >> 24] ); - } - t = x; - x = y; - y = t; /* swap pointers */ - } - - /* Last Round - unroll if possible */ - for (m = j = 0; j < Nb; j++, m += 3) - { - y[j] = rkey[k++] ^ (u32 ) rbsub[(u8 ) x[j]] ^ ROTL8( ( u32 )rbsub[( u8 )( x[ri[m]] >> 8 )] ) - ^ ROTL16( ( u32 )rbsub[( u8 )( x[ri[m+1]] >> 16 )] ) ^ ROTL24( ( u32 )rbsub[x[ri[m+2]] >> 24] ); - } - for (i = j = 0; i < Nb; i++, j += 4) - { - unpack(y[i], (u8 *) &buff[j]); - x[i] = y[i] = 0; /* clean up stack */ - } - return; -} - -void aes_set_key(u8 *key) -{ - gentables(); - gkey(4, 4, (char*) key); -} - -// CBC mode decryption -void aes_decrypt(u8 *iv, u8 *inbuf, u8 *outbuf, unsigned long long len) -{ - u8 block[16]; - unsigned int blockno = 0, i; - - //printf("aes_decrypt(%p, %p, %p, %lld)\n", iv, inbuf, outbuf, len); - - for (blockno = 0; blockno <= (len / sizeof(block)); blockno++) - { - unsigned int fraction; - if (blockno == (len / sizeof(block))) // last block - { - fraction = len % sizeof(block); - if (fraction == 0) break; - memset(block, 0, sizeof(block)); - } - else fraction = 16; - - // debug_printf("block %d: fraction = %d\n", blockno, fraction); - memcpy(block, inbuf + blockno * sizeof(block), fraction); - decrypt((char*) block); - u8 *ctext_ptr; - if (blockno == 0) - ctext_ptr = iv; - else ctext_ptr = inbuf + (blockno - 1) * sizeof(block); - - for (i = 0; i < fraction; i++) - outbuf[blockno * sizeof(block) + i] = ctext_ptr[i] ^ block[i]; - // debug_printf("Block %d output: ", blockno); - // hexdump(outbuf + blockno*sizeof(block), 16); - } -} - -// CBC mode encryption -void aes_encrypt(u8 *iv, u8 *inbuf, u8 *outbuf, unsigned long long len) -{ - u8 block[16]; - unsigned int blockno = 0, i; - - // debug_printf("aes_decrypt(%p, %p, %p, %lld)\n", iv, inbuf, outbuf, len); - - for (blockno = 0; blockno <= (len / sizeof(block)); blockno++) - { - unsigned int fraction; - if (blockno == (len / sizeof(block))) // last block - { - fraction = len % sizeof(block); - if (fraction == 0) break; - memset(block, 0, sizeof(block)); - } - else fraction = 16; - - // debug_printf("block %d: fraction = %d\n", blockno, fraction); - memcpy(block, inbuf + blockno * sizeof(block), fraction); - - for (i = 0; i < fraction; i++) - block[i] = inbuf[blockno * sizeof(block) + i] ^ iv[i]; - - encrypt((char*) block); - memcpy(iv, block, sizeof(block)); - memcpy(outbuf + blockno * sizeof(block), block, sizeof(block)); - // debug_printf("Block %d output: ", blockno); - // hexdump(outbuf + blockno*sizeof(block), 16); - } -} - diff --git a/source/libs/libwbfs/wiidisc.c b/source/libs/libwbfs/wiidisc.c deleted file mode 100644 index 74dd4768..00000000 --- a/source/libs/libwbfs/wiidisc.c +++ /dev/null @@ -1,378 +0,0 @@ -// Copyright 2009 Kwiirk based on negentig.c: -// Copyright 2007,2008 Segher Boessenkool -// Licensed under the terms of the GNU GPL, version 2 -// http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt - -#include "wiidisc.h" - -void aes_set_key(u8 *key); -void aes_decrypt(u8 *iv, u8 *inbuf, u8 *outbuf, unsigned long long len); -static u8 get_fst = 0; - -static void _decrypt_title_key(u8 *tik, u8 *title_key) -{ - u8 common_key[16] = { 0xeb, 0xe4, 0x2a, 0x22, 0x5e, 0x85, 0x93, 0xe4, 0x48, 0xd9, 0xc5, 0x45, 0x73, 0x81, 0xaa, - 0xf7 }; - ; - u8 iv[16]; - - wbfs_memset( iv, 0, sizeof iv ); - wbfs_memcpy( iv, tik + 0x01dc, 8 ); - aes_set_key(common_key); - //_aes_cbc_dec(common_key, iv, tik + 0x01bf, 16, title_key); - aes_decrypt(iv, tik + 0x01bf, title_key, 16); -} -static u32 _be32(const u8 *p) -{ - return (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]; -} - -static void disc_read(wiidisc_t *d, u32 offset, u8 *data, u32 len) -{ - if (data) - { - int ret = 0; - if (len == 0) return; - ret = d->read(d->fp, offset, len, data); - if (ret) - wbfs_fatal( "error reading disc" ); - } - if (d->sector_usage_table) - { - u32 blockno = offset >> 13; - do - { - d->sector_usage_table[blockno] = 1; - blockno += 1; - if (len > 0x8000) len -= 0x8000; - } while (len > 0x8000); - } -} - -static void partition_raw_read(wiidisc_t *d, u32 offset, u8 *data, u32 len) -{ - disc_read(d, d->partition_raw_offset + offset, data, len); -} - -static void partition_read_block(wiidisc_t *d, u32 blockno, u8 *block) -{ - u8*raw = d->tmp_buffer; - u8 iv[16]; - u32 offset; - if (d->sector_usage_table) d->sector_usage_table[d->partition_block + blockno] = 1; - offset = d->partition_data_offset + ((0x8000 >> 2) * blockno); - partition_raw_read(d, offset, raw, 0x8000); - - // decrypt data - memcpy(iv, raw + 0x3d0, 16); - aes_set_key(d->disc_key); - aes_decrypt(iv, raw + 0x400, block, 0x7c00); -} - -static void partition_read(wiidisc_t *d, u32 offset, u8 *data, u32 len, int fake) -{ - u8 *block = d->tmp_buffer2; - u32 offset_in_block; - u32 len_in_block; - if (fake && d->sector_usage_table == 0) return; - - while (len) - { - offset_in_block = offset % (0x7c00 >> 2); - len_in_block = 0x7c00 - (offset_in_block << 2); - if (len_in_block > len) len_in_block = len; - if (!fake) - { - partition_read_block(d, offset / (0x7c00 >> 2), block); - wbfs_memcpy( data, block + ( offset_in_block << 2 ), len_in_block ); - } - else d->sector_usage_table[d->partition_block + (offset / (0x7c00 >> 2))] = 1; - data += len_in_block; - offset += len_in_block >> 2; - len -= len_in_block; - } -} - -static u32 do_fst(wiidisc_t *d, u8 *fst, const char *names, u32 i) -{ - u32 offset; - u32 size; - const char *name; - u32 j; - - name = names + (_be32(fst + 12 * i) & 0x00ffffff); - size = _be32(fst + 12 * i + 8); - - if (i == 0) - { - for (j = 1; j < size && !d->extracted_buffer;) - { - j = do_fst(d, fst, names, j); - } - return size; - } - //printf("name %s\n",name); - - if (fst[12 * i]) - { - - for (j = i + 1; j < size && !d->extracted_buffer;) - j = do_fst(d, fst, names, j); - - return size; - } - else - { - offset = _be32(fst + 12 * i + 4); - if (d->extract_pathname && strcasecmp(name, d->extract_pathname) == 0) - { - d->extracted_buffer = wbfs_ioalloc( size ); - d->extracted_size = size; - partition_read(d, offset, d->extracted_buffer, size, 0); - } - else partition_read(d, offset, 0, size, 1); - return i + 1; - } -} - -static void do_files(wiidisc_t*d) -{ - u8 *b = wbfs_ioalloc( 0x480 ); // XXX: determine actual header size - u32 dol_offset; - u32 fst_offset; - u32 fst_size; - u32 apl_offset; - u32 apl_size; - u8 *apl_header = wbfs_ioalloc( 0x20 ); - u8 *fst; - u32 n_files; - partition_read(d, 0, b, 0x480, 0); - - dol_offset = _be32(b + 0x0420); - fst_offset = _be32(b + 0x0424); - fst_size = _be32(b + 0x0428) << 2; - - apl_offset = 0x2440 >> 2; - partition_read(d, apl_offset, apl_header, 0x20, 0); - apl_size = 0x20 + _be32(apl_header + 0x14) + _be32(apl_header + 0x18); - // fake read dol and partition - if (apl_size) partition_read(d, apl_offset, 0, apl_size, 1); - partition_read(d, dol_offset, 0, (fst_offset - dol_offset) << 2, 1); - - if (fst_size) - { - fst = wbfs_ioalloc( fst_size ); - if (fst == 0) - wbfs_fatal( "malloc fst" ); - partition_read(d, fst_offset, fst, fst_size, 0); - n_files = _be32(fst + 8); - - if(get_fst && !d->extracted_buffer) - { - d->extracted_buffer = wbfs_ioalloc(fst_size); - memcpy(d->extracted_buffer, fst, fst_size); - } - - if (d->extract_pathname && *d->extract_pathname == 0) - { - // if empty pathname requested return fst - d->extracted_buffer = fst; - d->extracted_size = fst_size; - d->extract_pathname = NULL; - // skip do_fst if only fst requested - n_files = 0; - } - - if (12 * n_files <= fst_size) - { - if (n_files > 1) do_fst(d, fst, (char *) fst + 12 * n_files, 0); - } - - if (fst != d->extracted_buffer) wbfs_iofree( fst ); - } - wbfs_iofree( b ); - wbfs_iofree( apl_header ); -} - -static void do_partition(wiidisc_t*d) -{ - u8 *tik = wbfs_ioalloc( 0x2a4 ); - u8 *b = wbfs_ioalloc( 0x1c ); - u64 tmd_offset; - u32 tmd_size; - u8 *tmd; - u64 cert_offset; - u32 cert_size; - u8 *cert; - u64 h3_offset; - - // read ticket, and read some offsets and sizes - partition_raw_read(d, 0, tik, 0x2a4); - partition_raw_read(d, 0x2a4 >> 2, b, 0x1c); - - tmd_size = _be32(b); - tmd_offset = _be32(b + 4); - cert_size = _be32(b + 8); - cert_offset = _be32(b + 0x0c); - h3_offset = _be32(b + 0x10); - d->partition_data_offset = _be32(b + 0x14); - d->partition_block = (d->partition_raw_offset + d->partition_data_offset) >> 13; - tmd = wbfs_ioalloc( tmd_size ); - if (tmd == 0) - wbfs_fatal( "malloc tmd" ); - partition_raw_read(d, tmd_offset, tmd, tmd_size); - - cert = wbfs_ioalloc( cert_size ); - if (cert == 0) - wbfs_fatal( "malloc cert" ); - partition_raw_read(d, cert_offset, cert, cert_size); - - _decrypt_title_key(tik, d->disc_key); - - partition_raw_read(d, h3_offset, 0, 0x18000); - wbfs_iofree( b ); - wbfs_iofree( tik ); - wbfs_iofree( cert ); - wbfs_iofree( tmd ); - - do_files(d); - -} -static int test_parition_skip(u32 partition_type, partition_selector_t part_sel) -{ - switch (part_sel) - { - case ALL_PARTITIONS: - return 0; - case REMOVE_UPDATE_PARTITION: - return (partition_type == 1); - case ONLY_GAME_PARTITION: - return (partition_type != 0); - default: - return (partition_type != part_sel); - } -} -static void do_disc(wiidisc_t*d) -{ - u8 *b = wbfs_ioalloc( 0x100 ); - u64 partition_offset[32]; // XXX: don't know the real maximum - u64 partition_type[32]; // XXX: don't know the real maximum - u32 n_partitions; - u32 magic; - u32 i; - disc_read(d, 0, b, 0x100); - magic = _be32(b + 24); - if (magic != 0x5D1C9EA3) - { - wbfs_iofree( b ); - wbfs_error( "not a wii disc" ); - return; - } - disc_read(d, 0x40000 >> 2, b, 0x100); - n_partitions = _be32(b); - disc_read(d, _be32(b + 4), b, 0x100); - for (i = 0; i < n_partitions; i++) - { - partition_offset[i] = _be32(b + 8 * i); - partition_type[i] = _be32(b + 8 * i + 4); - } - for (i = 0; i < n_partitions; i++) - { - d->partition_raw_offset = partition_offset[i]; - if (!test_parition_skip(partition_type[i], d->part_sel)) do_partition(d); - } - wbfs_iofree( b ); -} - -wiidisc_t *wd_open_disc(read_wiidisc_callback_t read, void*fp) -{ - wiidisc_t *d = wbfs_malloc( sizeof( wiidisc_t ) ); - if (!d) return 0; - wbfs_memset( d, 0, sizeof( wiidisc_t ) ); - d->read = read; - d->fp = fp; - d->part_sel = ALL_PARTITIONS; - d->tmp_buffer = wbfs_ioalloc( 0x8000 ); - d->tmp_buffer2 = wbfs_malloc( 0x8000 ); - - return d; -} -void wd_close_disc(wiidisc_t *d) -{ - wbfs_iofree( d->tmp_buffer ); - wbfs_free( d->tmp_buffer2 ); - wbfs_free( d ); -} -// returns a buffer allocated with wbfs_ioalloc() or NULL if not found of alloc error -// XXX pathname not implemented. files are extracted by their name. -// first file found with that name is returned. -u8 * wd_extract_file(wiidisc_t *d, partition_selector_t partition_type, char *pathname) -{ - u8 *retval = 0; - d->extract_pathname = pathname; - d->extracted_buffer = 0; - d->part_sel = partition_type; - do_disc(d); - d->extract_pathname = 0; - d->part_sel = ALL_PARTITIONS; - retval = d->extracted_buffer; - d->extracted_buffer = 0; - return retval; -} - -u8 * wd_get_fst(wiidisc_t *d, partition_selector_t partition_type) -{ - get_fst = 1; - u8 *retval = 0; - d->extract_pathname = 0; - d->extracted_buffer = 0; - d->part_sel = partition_type; - do_disc(d); - d->extract_pathname = 0; - d->part_sel = ALL_PARTITIONS; - retval = d->extracted_buffer; - d->extracted_buffer = 0; - get_fst = 0; - return retval; -} - -void wd_build_disc_usage(wiidisc_t *d, partition_selector_t selector, u8* usage_table) -{ - d->sector_usage_table = usage_table; - wbfs_memset( usage_table, 0, 143432*2 ); - d->part_sel = selector; - do_disc(d); - d->part_sel = ALL_PARTITIONS; - d->sector_usage_table = 0; -} - -void wd_fix_partition_table(wiidisc_t *d, partition_selector_t selector, u8* partition_table) -{ - u8 *b = partition_table; - u32 partition_offset; - u32 partition_type; - u32 n_partitions, i, j; - u32 *b32; - if (selector == ALL_PARTITIONS) return; - n_partitions = _be32(b); - if (_be32(b + 4) - (0x40000 >> 2) > 0x50) - wbfs_fatal( "cannot modify this partition table. Please report the bug." ); - - b += (_be32(b + 4) - (0x40000 >> 2)) * 4; - j = 0; - for (i = 0; i < n_partitions; i++) - { - partition_offset = _be32(b + 8 * i); - partition_type = _be32(b + 8 * i + 4); - if (!test_parition_skip(partition_type, selector)) - { - b32 = (u32*) (b + 8 * j); - b32[0] = wbfs_htonl( partition_offset ); - b32[1] = wbfs_htonl( partition_type ); - j++; - } - } - b32 = (u32*) (partition_table); - *b32 = wbfs_htonl( j ); -} - diff --git a/source/libs/libwbfs/wiidisc.h b/source/libs/libwbfs/wiidisc.h deleted file mode 100644 index c2bb0636..00000000 --- a/source/libs/libwbfs/wiidisc.h +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef WIIDISC_H -#define WIIDISC_H -#include -#include "libwbfs_os.h" // this file is provided by the project wanting to compile libwbfs and wiidisc -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ -#if 0 //removes extra automatic indentation by editors -} -#endif - // callback definition. Return 1 on fatal error (callback is supposed to make retries until no hopes..) - // offset points 32bit words, count counts bytes - typedef int (*read_wiidisc_callback_t)(void*fp, u32 offset, u32 count, void*iobuf); - - typedef enum - { - UPDATE_PARTITION_TYPE = 0, GAME_PARTITION_TYPE, OTHER_PARTITION_TYPE, - // value in between selects partition types of that value - ALL_PARTITIONS = 0xffffffff - 3, - REMOVE_UPDATE_PARTITION, // keeps game + channel installers - ONLY_GAME_PARTITION, - } partition_selector_t; - - typedef struct wiidisc_s - { - read_wiidisc_callback_t read; - void *fp; - u8 *sector_usage_table; - - // everything points 32bit words. - u32 disc_raw_offset; - u32 partition_raw_offset; - u32 partition_data_offset; - u32 partition_data_size; - u32 partition_block; - - u8 *tmp_buffer; - u8 *tmp_buffer2; - u8 disc_key[16]; - int dont_decrypt; - - partition_selector_t part_sel; - - char *extract_pathname; - u8 *extracted_buffer; - int extracted_size; - } wiidisc_t; - - wiidisc_t *wd_open_disc(read_wiidisc_callback_t read, void*fp); - void wd_close_disc(wiidisc_t *); - // returns a buffer allocated with wbfs_ioalloc() or NULL if not found of alloc error - u8 * wd_extract_file(wiidisc_t *d, partition_selector_t partition_type, char *pathname); - - void wd_build_disc_usage(wiidisc_t *d, partition_selector_t selector, u8* usage_table); - - // effectively remove not copied partition from the partition table. - void wd_fix_partition_table(wiidisc_t *d, partition_selector_t selector, u8* partition_table); - u8 * wd_get_fst(wiidisc_t *d, partition_selector_t partition_type); - -#if 0 -{ -#endif -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/source/libwiigui/LoadCoverImage.cpp b/source/libwiigui/LoadCoverImage.cpp deleted file mode 100644 index 7b39eb9e..00000000 --- a/source/libwiigui/LoadCoverImage.cpp +++ /dev/null @@ -1,65 +0,0 @@ -#include "libwiigui/gui.h" -#include "usbloader/disc.h" -#include "FileOperations/fileops.h" -#include "settings/CSettings.h" -#include "themes/CTheme.h" - -/**************************************************************************** - * LoadCoverImage - ***************************************************************************/ -GuiImageData *LoadCoverImage(struct discHdr *header, bool Prefere3D, bool noCover) -{ - if (!header) return NULL; - GuiImageData *Cover = NULL; - char ID3[4]; - char IDfull[7]; - char Path[255]; - bool flag = Prefere3D; - - snprintf(ID3, sizeof(ID3), "%s", (char *) header->id); - snprintf(IDfull, sizeof(IDfull), "%s", (char *) header->id); - - for (int i = 0; i < 2; ++i) - { - char *coverPath = flag ? Settings.covers_path : Settings.covers2d_path; - flag = !flag; - //Load full id image - snprintf(Path, sizeof(Path), "%s%s.png", coverPath, IDfull); - - if(!CheckFile(Path)) - { - snprintf(Path, sizeof(Path), "%s%s.png", coverPath, ID3); - if(!CheckFile(Path)) - continue; - } - - delete Cover; - Cover = new (std::nothrow) GuiImageData(Path); - //Load short id image - if (!Cover || !Cover->GetImage()) - { - snprintf(Path, sizeof(Path), "%s%s.png", coverPath, ID3); - delete Cover; - Cover = new (std::nothrow) GuiImageData(Path); - } - if (Cover && Cover->GetImage()) break; - } - //Load no image - if (noCover && (!Cover || !Cover->GetImage())) - { - flag = Prefere3D; - for (int i = 0; i < 2; ++i) - { - delete Cover; - Cover = Resources::GetImageData(flag ? "nocover.png" : "nocoverFlat.png"); - if (Cover && Cover->GetImage()) break; - flag = !flag; - } - } - if (Cover && !Cover->GetImage()) - { - delete Cover; - Cover = NULL; - } - return Cover; -} diff --git a/source/libwiigui/LoadCoverImage.h b/source/libwiigui/LoadCoverImage.h deleted file mode 100644 index dae4283c..00000000 --- a/source/libwiigui/LoadCoverImage.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef LOADCOVERIMAGE_H_ -#define LOADCOVERIMAGE_H_ - -GuiImageData *LoadCoverImage(struct discHdr *header, bool Prefere3D = true, bool noCover = true); - -#endif diff --git a/source/libwiigui/OptionList.cpp b/source/libwiigui/OptionList.cpp deleted file mode 100644 index 0afaece1..00000000 --- a/source/libwiigui/OptionList.cpp +++ /dev/null @@ -1,135 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#include -#include -#include -#include -#include -#include "OptionList.hpp" - -OptionList::OptionList() -{ -} - -OptionList::~OptionList() -{ - ClearList(); -} - -void OptionList::SetName(int i, const char *format, ...) -{ - if(i < (int) name.size()) - name[i].clear(); - - if(!format) - return; - - char *tmp=0; - va_list va; - va_start(va, format); - if((vasprintf(&tmp, format, va)>=0) && tmp) - { - if(i >= (int) name.size()) - { - Resize(i+1); - } - - name[i].assign(tmp); - - listChanged = true; - } - va_end(va); - - if(tmp) - free(tmp); -} - -void OptionList::SetValue(int i, const char *format, ...) -{ - if(i < (int) value.size()) - value[i].clear(); - - char *tmp=0; - va_list va; - va_start(va, format); - if((vasprintf(&tmp, format, va)>=0) && tmp) - { - if(i >= (int) value.size()) - { - Resize(i+1); - } - - value[i].assign(tmp); - - listChanged = true; - } - va_end(va); - - if(tmp) - free(tmp); -} - -const char * OptionList::GetName(int i) -{ - if(i < 0 || i >= (int) name.size()) - return NULL; - - return name.at(i).c_str(); -} - -const char * OptionList::GetValue(int i) -{ - if(i < 0 || i >= (int) value.size()) - return NULL; - - return value.at(i).c_str(); -} - -void OptionList::Resize(int size) -{ - name.resize(size); - value.resize(size); - listChanged = true; -} - -void OptionList::RemoveOption(int i) -{ - if(i < 0 || i >= (int) name.size()) - return; - - name.erase(name.begin()+i); - value.erase(value.begin()+i); - listChanged = true; -} - -void OptionList::ClearList() -{ - name.clear(); - value.clear(); - std::vector().swap(name); - std::vector().swap(value); - listChanged = true; -} diff --git a/source/libwiigui/OptionList.hpp b/source/libwiigui/OptionList.hpp deleted file mode 100644 index 7e47fda7..00000000 --- a/source/libwiigui/OptionList.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#ifndef OPTIONLIST_HPP_ -#define OPTIONLIST_HPP_ - -#include -#include - -class OptionList -{ - public: - OptionList(); - ~OptionList(); - void SetName(int i, const char *format, ...) __attribute__((format (printf, 3, 4))); - void SetValue(int i, const char *format, ...) __attribute__((format (printf, 3, 4))); - const char * GetName(int i); - const char * GetValue(int i); - void Resize(int size); - int GetLength() { return name.size(); } - bool IsChanged() { bool ret = listChanged; listChanged = false; return ret;} - void RemoveOption(int i); - void ClearList(); - private: - std::vector name; - std::vector value; - bool listChanged; -}; - -#endif - diff --git a/source/libwiigui/Text.cpp b/source/libwiigui/Text.cpp deleted file mode 100644 index 31e1df09..00000000 --- a/source/libwiigui/Text.cpp +++ /dev/null @@ -1,331 +0,0 @@ -#include "Text.hpp" - -Text::Text(const char * t, int s, GXColor c) : - GuiText(t, s, c) -{ - maxWidth = 400; - linestodraw = 9; - curLineStart = 0; - FirstLineOffset = 0; - wText = NULL; - - if (!text) return; - - wText = new (std::nothrow) wString(text); - if (!wText) - { - return; - } - - if (wText->size() == 0) - { - wText->push_back(L' '); - wText->push_back(0); - } - - textWidth = (font ? font : fontSystem)->getWidth(wText->data(), currentSize); - delete[] text; - text = NULL; - - SetMaxWidth(maxWidth); -} - -Text::Text(const wchar_t * t, int s, GXColor c) : - GuiText((wchar_t *) NULL, s, c) -{ - maxWidth = 400; - linestodraw = 9; - curLineStart = 0; - FirstLineOffset = 0; - wText = NULL; - - if (!t) return; - - wText = new (std::nothrow) wString(t); - if (!wText) - { - return; - } - - if (wText->size() == 0) - { - wText->push_back(L' '); - wText->push_back(0); - } - - textWidth = (font ? font : fontSystem)->getWidth(wText->data(), currentSize); - - SetMaxWidth(maxWidth); -} - -Text::~Text() -{ - if (wText) delete wText; - wText = NULL; - - TextLines.clear(); - ClearDynamicText(); -} - -void Text::SetText(const char * t) -{ - wchar_t * tmp = charToWideChar(t); - if (!tmp) return; - - if (wText) delete wText; - - wText = new (std::nothrow) wString(tmp); - if (!wText) - { - return; - } - - if (wText->size() == 0) - { - wText->push_back(L' '); - wText->push_back(0); - } - - textWidth = (font ? font : fontSystem)->getWidth(wText->data(), currentSize); - - delete[] tmp; - - ClearDynamicText(); - CalcLineOffsets(); -} - -void Text::SetText(const wchar_t * t) -{ - if (!t) return; - - if (wText) delete wText; - - wText = new wString(t); - textWidth = (font ? font : fontSystem)->getWidth(wText->data(), currentSize); - CalcLineOffsets(); -} - -void Text::SetMaxWidth(int w) -{ - maxWidth = w; - curLineStart = 0; - Refresh(); -} - -void Text::SetTextLine(int line) -{ - if (line < 0) - line = 0; - else if (line > (int) TextLines.size() - 1) line = TextLines.size() - 1; - - curLineStart = line; - - FillRows(); - - while ((int) textDyn.size() < linestodraw && curLineStart > 0) - { - PreviousLine(); - } -} - -void Text::SetTextPos(int pos) -{ - if (!wText) return; - - int diff = 10000; - - for (u32 i = 0; i < TextLines.size(); i++) - { - int curDiff = abs(TextLines[i].LineOffset - pos); - if (curDiff < diff) - { - diff = curDiff; - curLineStart = i; - } - } - - FillRows(); - - while ((int) textDyn.size() < linestodraw && curLineStart > 0) - { - PreviousLine(); - } -} - -const wchar_t * Text::GetText() -{ - return wText->c_str(); -} - -std::string Text::GetUTF8String(void) const -{ - return wText->toUTF8(); -} - -int Text::GetLineOffset(int ind) -{ - if (TextLines.size() == 0) return 0; - - if (ind < 0) return TextLines[0].LineOffset; - - if (ind >= (int) TextLines.size() - 1) return TextLines[TextLines.size() - 1].LineOffset; - - return TextLines[ind].LineOffset; -} - -const wchar_t * Text::GetTextLine(int ind) -{ - if (filling || textDyn.size() == 0) return NULL; - - if (ind < 0) return textDyn[0]; - - if (ind >= (int) textDyn.size()) return textDyn[textDyn.size() - 1]; - - return textDyn[ind]; -} - -void Text::Refresh() -{ - CalcLineOffsets(); - FillRows(); -} - -void Text::NextLine() -{ - if (!wText || (curLineStart + 1 > ((int) TextLines.size() - linestodraw))) return; - - ++curLineStart; - - FillRows(); -} - -void Text::PreviousLine() -{ - if (!wText || curLineStart - 1 < 0) return; - - --curLineStart; - - FillRows(); -} - -void Text::FillRows() -{ - if (!wText) return; - - filling = true; - - ClearDynamicText(); - - for (int i = 0; i < linestodraw && i < (int) TextLines.size(); i++) - { - if (i >= (int) textDyn.size()) - { - textDyn.resize(i + 1); - textDyn[i] = new wchar_t[maxWidth]; - } - int offset = TextLines[curLineStart + i].LineOffset; - int count = TextLines[curLineStart + i].CharCount + 1; - - for (int n = 0; n < count && offset + n < (int) wText->size(); n++) - textDyn[i][n] = wText->at(offset + n); - - textDyn[i][count] = 0; - } - - filling = false; - - return; -} - -void Text::CalcLineOffsets() -{ - if (!wText) return; - - TextLines.clear(); - - TextLine TmpLine; - TmpLine.CharCount = 0; - TmpLine.LineOffset = 0; - TmpLine.width = 0; - - const wchar_t * origTxt = wText->c_str(); - int ch = 0; - int lastSpace = -1; - int lastSpaceIndex = -1; - int currWidth = 0; - int i = 0; - - while (origTxt[ch]) - { - currWidth += fontSystem->getCharWidth(origTxt[ch], currentSize, ch > 0 ? origTxt[ch - 1] : 0x0000); - - if (currWidth >= maxWidth) - { - if (lastSpace > 0) - { - ch = lastSpace; - } - TmpLine.CharCount = ch - TmpLine.LineOffset; - TmpLine.width = currWidth; - TextLines.push_back(TmpLine); - currWidth = 0; - lastSpace = -1; - i = -1; - TmpLine.LineOffset = ch + 1; - } - else if (origTxt[ch] == '\n') - { - TmpLine.CharCount = ch - TmpLine.LineOffset; - TmpLine.width = currWidth; - TextLines.push_back(TmpLine); - currWidth = 0; - lastSpace = -1; - i = -1; - TmpLine.LineOffset = ch + 1; - } - else if (origTxt[ch] == ' ') - { - lastSpace = ch; - lastSpaceIndex = i; - } - - ch++; - i++; - } - - TmpLine.CharCount = ch - TmpLine.LineOffset; - TmpLine.width = currWidth; - - if (TmpLine.CharCount-1 > 0) - { - TmpLine.CharCount -= 1; - TextLines.push_back(TmpLine); - } -} - -void Text::Draw() -{ - if (textDyn.size() == 0) return; - - if (!this->IsVisible()) return; - - GXColor c = color; - c.a = this->GetAlpha(); - - int newSize = size * GetScale(); - - if (newSize != currentSize) - { - currentSize = newSize; - - if (wText) textWidth = (font ? font : fontSystem)->getWidth(wText->data(), currentSize); - } - - u16 lineheight = newSize + 6; - - for (u32 i = 0; i < textDyn.size(); i++) - { - if (!filling) (font ? font : fontSystem)->drawText(this->GetLeft(), this->GetTop() + i * lineheight, 0, - textDyn[i], currentSize, c, style, 0, maxWidth); - } -} diff --git a/source/libwiigui/Text.hpp b/source/libwiigui/Text.hpp deleted file mode 100644 index 6c171d82..00000000 --- a/source/libwiigui/Text.hpp +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef _TEXT_HPP_ -#define _TEXT_HPP_ - -#include "libwiigui/gui.h" -#include "wstring.hpp" - -typedef struct -{ - int LineOffset; - int CharCount; - int width; -} TextLine; - -class Text: public GuiText -{ - public: - //!Constructor - //!\param t Text - //!\param s Font size - //!\param c Font color - Text(const char * t, int s, GXColor c); - Text(const wchar_t * t, int s, GXColor c); - ~Text(); - //!Sets the text of the GuiText element - //!\param t Text - void SetText(const char * t); - void SetText(const wchar_t * t); - //!Set the max texwidth - void SetMaxWidth(int width); - //!Go to next line - void NextLine(); - //!Go to previous line - void PreviousLine(); - //!Refresh the rows to draw - void Refresh(); - //!Set the text line - void SetTextLine(int line); - //!Set to the char pos in text - void SetTextPos(int pos); - //!Refresh the rows to draw - int GetCurrPos() { return curLineStart; }; - //!Get the count of loaded lines - int GetLinesCount() { return textDyn.size(); }; - //!Get the total count of lines - int GetTotalLinesCount() { return TextLines.size(); }; - //!Get the original full Text - const wchar_t * GetText(); - //!Get the original full Text as wString - wString * GetwString() { return wText; }; - //!Get the original Text as a UTF-8 text - std::string GetUTF8String() const; - //!Get a Textline - const wchar_t * GetTextLine(int ind); - //!Get the offset in the text of a drawn Line - int GetLineOffset(int ind); - //!Constantly called to draw the text - void Draw(); - protected: - void CalcLineOffsets(); - void FillRows(); - - wString * wText; - std::vector TextLines; - int curLineStart; - int FirstLineOffset; - bool filling; -}; - -#endif diff --git a/source/libwiigui/gui.h b/source/libwiigui/gui.h deleted file mode 100644 index 1643f2e8..00000000 --- a/source/libwiigui/gui.h +++ /dev/null @@ -1,1090 +0,0 @@ -/*!\mainpage libwiigui Documentation - * - * \section Introduction - * libwiigui is a GUI library for the Wii, created to help structure the - * design of a complicated GUI interface, and to enable an author to create - * a sophisticated, feature-rich GUI. It was originally conceived and written - * after I started to design a GUI for Snes9x GX, and found libwiisprite and - * GRRLIB inadequate for the purpose. It uses GX for drawing, and makes use - * of PNGU for displaying images and FreeTypeGX for text. It was designed to - * be flexible and is easy to modify - don't be afraid to change the way it - * works or expand it to suit your GUI's purposes! If you do, and you think - * your changes might benefit others, please share them so they might be - * added to the project! - * - * \section Quickstart - * Start from the supplied template example. For more advanced uses, see the - * source code for Snes9x GX, FCE Ultra GX, and Visual Boy Advance GX. - - * \section Contact - * If you have any suggestions for the library or documentation, or want to - * contribute, please visit the libwiigui website: - - * http://code.google.com/p/libwiigui/ - * \section Credits - * This library was wholly designed and written by Tantric. Thanks to the - * authors of PNGU and FreeTypeGX, of which this library makes use. Thanks - * also to the authors of GRRLIB and libwiisprite for laying the foundations. - * - */ - -#ifndef LIBWIIGUI_H -#define LIBWIIGUI_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "gui_imagedata.h" -#include "FreeTypeGX.h" -#include "video.h" -#include "input.h" -#include "OptionList.hpp" -#include "SoundOperations/gui_sound.h" -#include "SoundOperations/gui_bgm.h" - -//! Frequently used variables -extern FreeTypeGX *fontSystem; -extern GuiSound *btnSoundClick; -extern GuiSound *btnSoundClick2; -extern GuiSound *btnSoundOver; -extern GuiBGM *bgMusic; - -#define SCROLL_INITIAL_DELAY 20 -#define SCROLL_LOOP_DELAY 3 -#define PAGESIZE 9 -#define FILEBROWSERSIZE 8 -#define MAX_OPTIONS 170 - -typedef void (*UpdateCallback)(void * e); - -enum -{ - ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTRE, ALIGN_TOP, ALIGN_BOTTOM, ALIGN_MIDDLE -}; -#define ALIGN_CENTER ALIGN_CENTRE -enum -{ - STATE_DEFAULT, STATE_SELECTED, STATE_CLICKED, STATE_HELD, STATE_DISABLED -}; - -enum -{ - IMAGE_TEXTURE, IMAGE_COLOR, IMAGE_DATA, IMAGE_COPY -}; - -enum -{ - TRIGGER_SIMPLE, TRIGGER_HELD, TRIGGER_BUTTON_ONLY, TRIGGER_BUTTON_ONLY_IN_FOCUS -}; - -enum -{ - WRAP, DOTTED, SCROLL_HORIZONTAL, SCROLL_NONE -}; - -typedef struct _paddata -{ - u16 btns_d; - u16 btns_u; - u16 btns_h; - s8 stickX; - s8 stickY; - s8 substickX; - s8 substickY; - u8 triggerL; - u8 triggerR; -} PADData; - -#define EFFECT_SLIDE_TOP 1 -#define EFFECT_SLIDE_BOTTOM 2 -#define EFFECT_SLIDE_RIGHT 4 -#define EFFECT_SLIDE_LEFT 8 -#define EFFECT_SLIDE_IN 16 -#define EFFECT_SLIDE_OUT 32 -#define EFFECT_FADE 64 -#define EFFECT_SCALE 128 -#define EFFECT_COLOR_TRANSITION 256 -#define EFFECT_PULSE 512 -#define EFFECT_ROCK_VERTICLE 1024 -#define EFFECT_GOROUND 2048 - -//!Menu input trigger management. Determine if action is neccessary based on input data by comparing controller input data to a specific trigger element. -class GuiTrigger -{ - public: - //!Constructor - GuiTrigger(); - //!Destructor - ~GuiTrigger(); - //!Sets a simple trigger. Requires: element is selected, and trigger button is pressed - //!\param ch Controller channel number - //!\param wiibtns Wii controller trigger button(s) - classic controller buttons are considered separately - //!\param gcbtns GameCube controller trigger button(s) - void SetSimpleTrigger(s32 ch, u32 wiibtns, u16 gcbtns); - //!Sets a held trigger. Requires: element is selected, and trigger button is pressed - //!\param ch Controller channel number - //!\param wiibtns Wii controller trigger button(s) - classic controller buttons are considered separately - //!\param gcbtns GameCube controller trigger button(s) - void SetHeldTrigger(s32 ch, u32 wiibtns, u16 gcbtns); - //!Sets a button-only trigger. Requires: Trigger button is pressed - //!\param ch Controller channel number - //!\param wiibtns Wii controller trigger button(s) - classic controller buttons are considered separately - //!\param gcbtns GameCube controller trigger button(s) - void SetButtonOnlyTrigger(s32 ch, u32 wiibtns, u16 gcbtns); - //!Sets a button-only trigger. Requires: trigger button is pressed and parent window of element is in focus - //!\param ch Controller channel number - //!\param wiibtns Wii controller trigger button(s) - classic controller buttons are considered separately - //!\param gcbtns GameCube controller trigger button(s) - void SetButtonOnlyInFocusTrigger(s32 ch, u32 wiibtns, u16 gcbtns); - //!Get X/Y value from Wii Joystick (classic, nunchuk) input - //!\param right Controller stick (left = 0, right = 1) - //!\param axis Controller stick axis (x-axis = 0, y-axis = 1) - //!\return Stick value - s8 WPAD_Stick(u8 right, int axis); - //!Move menu selection left (via pad/joystick). Allows scroll delay and button overriding - //!\return true if selection should be moved left, false otherwise - bool Left(); - //!Move menu selection right (via pad/joystick). Allows scroll delay and button overriding - //!\return true if selection should be moved right, false otherwise - bool Right(); - //!Move menu selection up (via pad/joystick). Allows scroll delay and button overriding - //!\return true if selection should be moved up, false otherwise - bool Up(); - //!Move menu selection down (via pad/joystick). Allows scroll delay and button overriding - //!\return true if selection should be moved down, false otherwise - bool Down(); - - u8 type; //!< trigger type (TRIGGER_SIMPLE, TRIGGER_HELD, TRIGGER_BUTTON_ONLY, TRIGGER_BUTTON_ONLY_IN_FOCUS) - s32 chan; //!< Trigger controller channel (0-3, -1 for all) - WPADData wpad; //!< Wii controller trigger data - PADData pad; //!< GameCube controller trigger data -}; - -extern GuiTrigger userInput[4]; - -//!Primary GUI class. Most other classes inherit from this class. -class GuiElement -{ - public: - //!Constructor - GuiElement(); - //!Destructor - ~GuiElement(); - //!Set the element's parent - //!\param e Pointer to parent element - void SetParent(GuiElement * e); - //!Gets the element's parent - //!\return Pointer to parent element - GuiElement * GetParent(); - //!Gets the current leftmost coordinate of the element - //!Considers horizontal alignment, x offset, width, and parent element's GetLeft() / GetWidth() values - //!\return left coordinate - int GetLeft(); - //!Gets the current topmost coordinate of the element - //!Considers vertical alignment, y offset, height, and parent element's GetTop() / GetHeight() values - //!\return top coordinate - int GetTop(); - //!Sets the minimum y offset of the element - //!\param y Y offset - void SetMinY(int y); - //!Gets the minimum y offset of the element - //!\return Minimum Y offset - int GetMinY(); - //!Sets the maximum y offset of the element - //!\param y Y offset - void SetMaxY(int y); - //!Gets the maximum y offset of the element - //!\return Maximum Y offset - int GetMaxY(); - //!Sets the minimum x offset of the element - //!\param x X offset - void SetMinX(int x); - //!Gets the minimum x offset of the element - //!\return Minimum X offset - int GetMinX(); - //!Sets the maximum x offset of the element - //!\param x X offset - void SetMaxX(int x); - //!Gets the maximum x offset of the element - //!\return Maximum X offset - int GetMaxX(); - //!Gets the current width of the element. Does not currently consider the scale - //!\return width - int GetWidth(); - //!Gets the height of the element. Does not currently consider the scale - //!\return height - int GetHeight(); - //!Sets the size (width/height) of the element - //!\param w Width of element - //!\param h Height of element - void SetSize(int w, int h); - //!Checks whether or not the element is visible - //!\return true if visible, false otherwise - bool IsVisible(); - //!Checks whether or not the element is selectable - //!\return true if selectable, false otherwise - bool IsSelectable(); - //!Checks whether or not the element is clickable - //!\return true if clickable, false otherwise - bool IsClickable(); - //!Checks whether or not the element is holdable - //!\return true if holdable, false otherwise - bool IsHoldable(); - //!Sets whether or not the element is selectable - //!\param s Selectable - void SetSelectable(bool s); - //!Sets whether or not the element is clickable - //!\param c Clickable - void SetClickable(bool c); - //!Sets whether or not the element is holdable - //!\param c Holdable - void SetHoldable(bool d); - //!Gets the element's current state - //!\return state - int GetState(); - //!Gets the controller channel that last changed the element's state - //!\return Channel number (0-3, -1 = no channel) - int GetStateChan(); - //!Sets the element's alpha value - //!\param a alpha value - void SetAlpha(int a); - //!Gets the element's alpha value - //!Considers alpha, alphaDyn, and the parent element's GetAlpha() value - //!\return alpha - int GetAlpha(); - //!Gets the element's AngleDyn value - //!\return alpha - float GetAngleDyn(); - //!Sets the element's scale - //!\param s scale (1 is 100%) - void SetScale(float s); - //!Gets the element's current scale - //!Considers scale, scaleDyn, and the parent element's GetScale() value - virtual float GetScale(); - //!Set a new GuiTrigger for the element - //!\param t Pointer to GuiTrigger - void SetTrigger(GuiTrigger * t); - //!\overload - //!\param i Index of trigger array to set - //!\param t Pointer to GuiTrigger - void SetTrigger(u8 i, GuiTrigger * t); - //!Remove GuiTrigger for the element - //!\param i Index of trigger array to set - void RemoveTrigger(u8 i); - //!Checks whether rumble was requested by the element - //!\return true is rumble was requested, false otherwise - bool Rumble(); - //!Sets whether or not the element is requesting a rumble event - //!\param r true if requesting rumble, false if not - void SetRumble(bool r); - //!Set an effect for the element - //!\param e Effect to enable - //!\param a Amount of the effect (usage varies on effect) - //!\param t Target amount of the effect (usage varies on effect) - void SetEffect(int e, int a, int t = 0); - //!This SetEffect is for EFFECT_GOROUND only - //!\param e Effect to enable - //!\param speed is for Circlespeed - //!\param circles Circleamount in degree ike 180 for 1/2 circle or 720 for 2 circles - //!\param r Circle Radius in pixel - //!\param startdegree Degree where to start circling - //!\param anglespeedset Set the speed of Angle rotating make 1 for same speed as Circlespeed - //! or 0.5 for half the speed of the circlingspeed. Turn Anglecircling off by 0 to this param. - //!\param center_x x co-ordinate of the center of circle. - //!\param center_y y co-ordinate of the center of circle. - void SetEffect(int e, int speed, f32 circles, int r, f32 startdegree, f32 anglespeedset, int center_x, - int center_y); - //!Gets the frequency from the above effect - //!\return element frequency - float GetFrequency(); - //!Sets an effect to be enabled on wiimote cursor over - //!\param e Effect to enable - //!\param a Amount of the effect (usage varies on effect) - //!\param t Target amount of the effect (usage varies on effect) - void SetEffectOnOver(int e, int a, int t = 0); - //!Shortcut to SetEffectOnOver(EFFECT_SCALE, 4, 110) - void SetEffectGrow(); - //!Stops the current element effect - void StopEffect(); - //!Gets the current element effects - //!\return element effects - int GetEffect(); - //!Gets the current element on over effects - //!\return element on over effects - int GetEffectOnOver(); - //!Checks whether the specified coordinates are within the element's boundaries - //!\param x X coordinate - //!\param y Y coordinate - //!\return true if contained within, false otherwise - bool IsInside(int x, int y); - //!Sets the element's position - //!\param x X coordinate - //!\param y Y coordinate - void SetPosition(int x, int y, int z = 0); - //!Updates the element's effects (dynamic values) - //!Called by Draw(), used for animation purposes - void UpdateEffects(); - //!Sets a function to called after after Update() - //!Callback function can be used to response to changes in the state of the element, and/or update the element's attributes - void SetUpdateCallback(UpdateCallback u); - //!Checks whether the element is in focus - //!\return true if element is in focus, false otherwise - int IsFocused(); - //!Sets the element's visibility - //!\param v Visibility (true = visible) - virtual void SetVisible(bool v); - //!Sets the element's focus - //!\param f Focus (true = in focus) - virtual void SetFocus(int f); - //!Sets the element's state - //!\param s State (STATE_DEFAULT, STATE_SELECTED, STATE_CLICKED, STATE_DISABLED) - //!\param c Controller channel (0-3, -1 = none) - virtual void SetState(int s, int c = -1); - //!Resets the element's state to STATE_DEFAULT - virtual void ResetState(); - //!Gets whether or not the element is in STATE_SELECTED - //!\return true if selected, false otherwise - virtual int GetSelected(); - //!Sets the element's alignment respective to its parent element - //!\param hor Horizontal alignment (ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTRE) - //!\param vert Vertical alignment (ALIGN_TOP, ALIGN_BOTTOM, ALIGN_MIDDLE) - virtual void SetAlignment(int hor, int vert); - //!Called constantly to allow the element to respond to the current input data - //!\param t Pointer to a GuiTrigger, containing the current input data from PAD/WPAD - virtual void Update(GuiTrigger * t); - //!Called constantly to redraw the element - virtual void Draw(); - virtual void DrawTooltip(); - protected: - void Lock(); - void Unlock(); - // static mutex_t mutex; - static mutex_t _lock_mutex; - lwp_t _lock_thread; - u16 _lock_count; - lwpq_t _lock_queue; - friend class SimpleLock; - - //int position2; //! B Scrollbariable - bool visible; //!< Visibility of the element. If false, Draw() is skipped - int focus; //!< Element focus (-1 = focus disabled, 0 = not focused, 1 = focused) - int dontsetfocus; //! _elements; //!< Contains all elements within the GuiWindow -}; - -//!Display, manage, and manipulate images in the GUI -class GuiImage: public GuiElement -{ - public: - //!Constructor - GuiImage(); - //!\overload - //!\param img Pointer to GuiImageData element - GuiImage(GuiImageData * img); - //!\overload - //!Sets up a new image from the image data specified - //!\param img - //!\param w Image width - //!\param h Image height - GuiImage(u8 * img, int w, int h); - //!\overload - //!Creates an image filled with the specified color - //!\param w Image width - //!\param h Image height - //!\param c Image color - GuiImage(int w, int h, GXColor c); - //! Copy Constructor - GuiImage(GuiImage &srcimage); - GuiImage(GuiImage *srcimage); - //! = operator for copying images - GuiImage &operator=(GuiImage &srcimage); - //!Destructor - ~GuiImage(); - //!Sets the image rotation angle for drawing - //!\param a Angle (in degrees) - void SetAngle(float a); - //!Gets the image rotation angle for drawing - float GetAngle(); - //!Sets the number of times to draw the image horizontally - //!\param t Number of times to draw the image - void SetTile(int t); - // true set horizontal scale to 0.8 //added - void SetWidescreen(bool w); - //!Constantly called to draw the image - void Draw(); - //!Gets the image data - //!\return pointer to image data - u8 * GetImage(); - //!Sets up a new image using the GuiImageData object specified - //!\param img Pointer to GuiImageData object - void SetImage(GuiImageData * img); - //!\overload - //!\param img Pointer to image data - //!\param w Width - //!\param h Height - void SetImage(u8 * img, int w, int h); - //!Gets the pixel color at the specified coordinates of the image - //!\param x X coordinate - //!\param y Y coordinate - GXColor GetPixel(int x, int y); - //!Sets the pixel color at the specified coordinates of the image - //!\param x X coordinate - //!\param y Y coordinate - //!\param color Pixel color - void SetPixel(int x, int y, GXColor color); - //!Sets the image to grayscale - void SetGrayscale(void); - //!Set/disable the use of parentelement angle (default true) - void SetParentAngle(bool a); - //!Directly modifies the image data to create a color-striped effect - //!Alters the RGB values by the specified amount - //!\param s Amount to increment/decrement the RGB values in the image - void ColorStripe(int s); - //!Sets a stripe effect on the image, overlaying alpha blended rectangles - //!Does not alter the image data - //!\param s Alpha amount to draw over the image - void SetStripe(int s); - s32 z; - void SetSkew(int XX1, int YY1, int XX2, int YY2, int XX3, int YY3, int XX4, int YY4); - void SetSkew(int *skew /* int skew[8] */); - int xx1; - int yy1; - int xx2; - int yy2; - int xx3; - int yy3; - int xx4; - int yy4; - int rxx1; - int ryy1; - int rxx2; - int ryy2; - int rxx3; - int ryy3; - int rxx4; - int ryy4; - protected: - int imgType; //!< Type of image data (IMAGE_TEXTURE, IMAGE_COLOR, IMAGE_DATA) - u8 * image; //!< Poiner to image data. May be shared with GuiImageData data - f32 imageangle; //!< Angle to draw the image - int tile; //!< Number of times to draw (tile) the image horizontally - int stripe; //!< Alpha value (0-255) to apply a stripe effect to the texture - short widescreen; //added - bool parentangle; -}; -//!Display, manage, and manipulate text in the GUI -class GuiText: public GuiElement -{ - public: - //!Constructor - //!\param t Text - //!\param s Font size - //!\param c Font color - GuiText(const char * t, int s, GXColor c); - //!\overload - //!\param t Text - //!\param s Font size - //!\param c Font color - GuiText(const wchar_t * t, int s, GXColor c); - //!\overload - //!\Assumes SetPresets() has been called to setup preferred text attributes - //!\param t Text - GuiText(const char * t); - //!Destructor - ~GuiText(); - //!Sets the text of the GuiText element - //!\param t Text - virtual void SetText(const char * t); - virtual void SetText(const wchar_t * t); - virtual void SetTextf(const char *format, ...) __attribute__( ( format( printf, 2, 3 ) ) ); - //!Sets up preset values to be used by GuiText(t) - //!Useful when printing multiple text elements, all with the same attributes set - //!\param sz Font size - //!\param c Font color - //!\param w Maximum width of texture image (for text wrapping) - //!\param wrap Wrapmode when w>0 - //!\param s Font style - //!\param h Text alignment (horizontal) - //!\param v Text alignment (vertical) - static void SetPresets(int sz, GXColor c, int w, u16 s, int h, int v); - //!Sets the font size - //!\param s Font size - void SetFontSize(int s); - //!Sets the maximum width of the drawn texture image - //!If the text exceeds this, it is wrapped to the next line - //!\param w Maximum width - //!\param m WrapMode - void SetMaxWidth(int w = 0, int m = WRAP); - //!Sets the font color - //!\param c Font color - void SetColor(GXColor c); - //!Sets the FreeTypeGX style attributes - //!\param s Style attributes - //!\param m Style-Mask attributes - void SetStyle(u16 s); - //!Sets the text alignment - //!\param hor Horizontal alignment (ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTRE) - //!\param vert Vertical alignment (ALIGN_TOP, ALIGN_BOTTOM, ALIGN_MIDDLE) - void SetAlignment(int hor, int vert); - //!Set PassChar - void SetPassChar(wchar_t p); - //!Sets the font - //!\param f Font - void SetFont(FreeTypeGX *f); - //!Get the original text as char - virtual const wchar_t * GetText(); - //!Get the Horizontal Size of Text - int GetTextWidth(); - int GetTextWidth(int ind); - //!Get the max textwidth - int GetTextMaxWidth(); - //!Gets the total line number - virtual int GetLinesCount() - { - return 1; - } - ; - //!Get fontsize - int GetFontSize() - { - return size; - } - ; - //!Set max lines to draw - void SetLinesToDraw(int l); - void SetWidescreen(bool b) - { - widescreen = b; - } - ; - //!Get current Textline (for position calculation) - const wchar_t * GetDynText(int ind = 0); - virtual const wchar_t * GetTextLine(int ind) - { - return GetDynText(ind); - } - ; - //!Change the font - //!\param font bufferblock - //!\param font filesize - bool SetFont(const u8 *font, const u32 filesize); - //!Constantly called to draw the text - void Draw(); - protected: - //!Clear the dynamic text - void ClearDynamicText(); - //!Create a dynamic dotted text if the text is too long - void MakeDottedText(); - //!Scroll the text once - void ScrollText(); - //!Wrap the text to several lines - void WrapText(); - - wchar_t *text; - std::vector textDyn; - int wrapMode; //!< Wrapping toggle - int textScrollPos; //!< Current starting index of text string for scrolling - int textScrollInitialDelay; //!< Delay to wait before starting to scroll - int textScrollDelay; //!< Scrolling speed - int size; //!< Font size - int maxWidth; //!< Maximum width of the generated text object (for text wrapping) - u16 style; //!< FreeTypeGX style attributes - GXColor color; //!< Font color - FreeTypeGX *font; - int textWidth; - int currentSize; - int linestodraw; - wchar_t passChar; - bool widescreen; -}; - -//!Display, manage, and manipulate tooltips in the GUI. -class GuiTooltip: public GuiElement -{ - public: - //!Constructor - //!\param t Text - GuiTooltip(const char *t, int Alpha = 255); - - //!Destructor - ~ GuiTooltip(); - - //!Gets the element's current scale - //!Considers scale, scaleDyn, and the parent element's GetScale() value - float GetScale(); - //!Sets the text of the GuiTooltip element - //!\param t Text - void SetText(const char * t); - void SetWidescreen(bool w); // timely a dummy - //!Constantly called to draw the GuiButton - void Draw(); - - protected: - GuiImageData * tooltipLeft; - GuiImageData * tooltipTile; - GuiImageData * tooltipRight; - GuiImage * leftImage; //!< Tooltip left-image - GuiImage * tileImage; //!< Tooltip tile-image - GuiImage * rightImage; //!< Tooltip right-image - GuiText *text; -}; - -//!Display, manage, and manipulate buttons in the GUI. Buttons can have images, icons, text, and sound set (all of which are optional) -class GuiButton: public GuiElement -{ - public: - //!Constructor - //!\param w Width - //!\param h Height - GuiButton(int w, int h); - //!\param img is the button GuiImage. it uses the height & width of this image for the button - //!\param imgOver is the button's over GuiImage - //!\param hor is horizontal alingment of the button - //!\param vert is verticle alignment of the button - //!\param x is xposition of the button - //!\param y is yposition of the button - //!\param trig is a GuiTrigger to assign to this button - //!\param sndOver is a GuiSound used for soundOnOver for this button - //!\param sndClick is a GuiSound used for clickSound of this button - //!\param grow sets effect grow for this button. 1 for yes ;0 for no - GuiButton(GuiImage* img, GuiImage* imgOver, int hor, int vert, int x, int y, GuiTrigger* trig, - GuiSound* sndOver, GuiSound* sndClick, u8 grow); - //!\param same as all the parameters for the above button plus the following - //!\param tt is a GuiTooltip assigned to this button - //!\param ttx and tty are the xPOS and yPOS for this tooltip in relationship to the button - //!\param h_align and v_align are horizontal and verticle alignment for the tooltip in relationship to the button - GuiButton(GuiImage* img, GuiImage* imgOver, int hor, int vert, int x, int y, GuiTrigger* trig, - GuiSound* sndOver, GuiSound* sndClick, u8 grow, GuiTooltip* tt, int ttx, int tty, int h_align, - int v_align); - //!Destructor - ~GuiButton(); - //!Sets the button's image - //!\param i Pointer to GuiImage object - void SetImage(GuiImage* i); - //!Sets the button's image on over - //!\param i Pointer to GuiImage object - void SetImageOver(GuiImage* i); - //!Sets the button's image on hold - //!\param i Pointer to GuiImage object - void SetAngle(float a); - void SetImageHold(GuiImage* i); - //!Sets the button's image on click - //!\param i Pointer to GuiImage object - void SetImageClick(GuiImage* i); - //!Sets the button's icon - //!\param i Pointer to GuiImage object - void SetIcon(GuiImage* i); - //!Sets the button's icon on over - //!\param i Pointer to GuiImage object - void SetIconOver(GuiImage* i); - //!Sets the button's icon on hold - //!\param i Pointer to GuiImage object - void SetIconHold(GuiImage* i); - //!Sets the button's icon on click - //!\param i Pointer to GuiImage object - void SetIconClick(GuiImage* i); - //!Sets the button's label - //!\param t Pointer to GuiText object - //!\param n Index of label to set (optional, default is 0) - void SetLabel(GuiText* t, int n = 0); - //!Sets the button's label on over (eg: different colored text) - //!\param t Pointer to GuiText object - //!\param n Index of label to set (optional, default is 0) - void SetLabelOver(GuiText* t, int n = 0); - //!Sets the button's label on hold - //!\param t Pointer to GuiText object - //!\param n Index of label to set (optional, default is 0) - void SetLabelHold(GuiText* t, int n = 0); - //!Sets the button's label on click - //!\param t Pointer to GuiText object - //!\param n Index of label to set (optional, default is 0) - void SetLabelClick(GuiText* t, int n = 0); - //!Sets the sound to play on over - //!\param s Pointer to GuiSound object - void SetSoundOver(GuiSound * s); - //!Sets the sound to play on hold - //!\param s Pointer to GuiSound object - void SetSoundHold(GuiSound * s); - //!Sets the sound to play on click - //!\param s Pointer to GuiSound object - void SetSoundClick(GuiSound * s); - //!\param reset the soundover to NULL - void RemoveSoundOver(); - //!\param reset the soundclick to NULL - void RemoveSoundClick(); - //!Constantly called to draw the GuiButtons ToolTip - //!Sets the button's Tooltip on over - //!\param tt Pointer to GuiElement object, x & y Positioning, h & v Align - void SetToolTip(GuiTooltip* tt, int x, int y, int h = ALIGN_RIGHT, int v = ALIGN_TOP); - - void RemoveToolTip(); - //!Constantly called to draw the GuiButton - void Draw(); - void DrawTooltip(); - //!Constantly called to allow the GuiButton to respond to updated input data - //!\param t Pointer to a GuiTrigger, containing the current input data from PAD/WPAD - void Update(GuiTrigger * t); - //!Deactivate/Activate pointing on Games while B scrolling - void ScrollIsOn(int f); - void SetSkew(int XX1, int YY1, int XX2, int YY2, int XX3, int YY3, int XX4, int YY4); - void SetSkew(int *skew /* int skew[8] */); - protected: - GuiImage * image; //!< Button image (default) - GuiImage * imageOver; //!< Button image for STATE_SELECTED - GuiImage * imageHold; //!< Button image for STATE_HELD - GuiImage * imageClick; //!< Button image for STATE_CLICKED - GuiImage * icon; //!< Button icon (drawn after button image) - GuiImage * iconOver; //!< Button icon for STATE_SELECTED - GuiImage * iconHold; //!< Button icon for STATE_HELD - GuiImage * iconClick; //!< Button icon for STATE_CLICKED - GuiTooltip *toolTip; - time_t time1, time2;//!< Tooltip timeconstants - GuiText * label[3]; //!< Label(s) to display (default) - GuiText * labelOver[3]; //!< Label(s) to display for STATE_SELECTED - GuiText * labelHold[3]; //!< Label(s) to display for STATE_HELD - GuiText * labelClick[3]; //!< Label(s) to display for STATE_CLICKED - GuiSound * soundOver; //!< Sound to play for STATE_SELECTED - GuiSound * soundHold; //!< Sound to play for STATE_HELD - GuiSound * soundClick; //!< Sound to play for STATE_CLICKED -}; - -typedef struct _keytype -{ - char ch, chShift, chalt, chalt2; -} Key; - -//!On-screen keyboard -class GuiKeyboard: public GuiWindow -{ - public: - GuiKeyboard(char * t, u32 m, int min, int lang); - ~GuiKeyboard(); - void Update(GuiTrigger * t); - char kbtextstr[256]; - protected: - u32 kbtextmaxlen; - Key keys[4][11]; - int shift; - int caps; - int alt; - int alt2; - GuiText * kbText; - GuiImage * keyTextboxImg; - GuiText * keyCapsText; - GuiImage * keyCapsImg; - GuiImage * keyCapsOverImg; - GuiButton * keyCaps; - GuiText * keyAltText; - GuiImage * keyAltImg; - GuiImage * keyAltOverImg; - GuiButton * keyAlt; - GuiText * keyAlt2Text; - GuiImage * keyAlt2Img; - GuiImage * keyAlt2OverImg; - GuiButton * keyAlt2; - GuiText * keyShiftText; - GuiImage * keyShiftImg; - GuiImage * keyShiftOverImg; - GuiButton * keyShift; - GuiText * keyBackText; - GuiImage * keyBackImg; - GuiImage * keyBackOverImg; - GuiButton * keyBack; - GuiText * keyClearText; - GuiImage * keyClearImg; - GuiImage * keyClearOverImg; - GuiButton * keyClear; - GuiImage * keySpaceImg; - GuiImage * keySpaceOverImg; - GuiButton * keySpace; - GuiButton * keyBtn[4][11]; - GuiImage * keyImg[4][11]; - GuiImage * keyImgOver[4][11]; - GuiText * keyTxt[4][11]; - GuiImageData * keyTextbox; - GuiImageData * key; - GuiImageData * keyOver; - GuiImageData * keyMedium; - GuiImageData * keyLarge; - GuiTrigger * trigA; - GuiTrigger * trigB; -}; - -//!On-screen keyboard -class GuiNumpad: public GuiWindow -{ - public: - GuiNumpad(char * t, u32 max); - ~GuiNumpad(); - void Update(GuiTrigger * t); - char kbtextstr[256]; - protected: - u32 kbtextmaxlen; - char keys[11]; - GuiText * kbText; - GuiImage * keyTextboxImg; - - GuiText * keyBackText; - GuiImage * keyBackImg; - GuiImage * keyBackOverImg; - GuiButton * keyBack; - GuiText * keyClearText; - GuiImage * keyClearImg; - GuiImage * keyClearOverImg; - GuiButton * keyClear; - GuiButton * keyBtn[11]; - GuiImage * keyImg[11]; - GuiImage * keyImgOver[11]; - GuiText * keyTxt[11]; - GuiImageData * keyTextbox; - GuiImageData * keyMedium; - GuiTrigger * trigA; - GuiTrigger * trigB; -}; - -//!Display a list of menu options -class GuiOptionBrowser: public GuiElement -{ - public: - GuiOptionBrowser(int w, int h, OptionList * l, const char *imagebg, int scrollbar); - GuiOptionBrowser(int w, int h, OptionList * l, const char *imagebg, int scrollbar, int start); - ~GuiOptionBrowser(); - void SetCol2Position(int x); - int FindMenuItem(int c, int d); - int GetClickedOption(); - int GetSelectedOption(); - void ResetState(); - void SetFocus(int f); - void Draw(); - void TriggerUpdate(); - void Update(GuiTrigger * t); - GuiText * optionVal[PAGESIZE]; - protected: - int selectedItem; - int listOffset; - bool listChanged; - OptionList * options; - int optionIndex[PAGESIZE]; - GuiButton * optionBtn[PAGESIZE]; - GuiText * optionTxt[PAGESIZE]; - GuiImage * optionBg[PAGESIZE]; - - GuiButton * arrowUpBtn; - GuiButton * arrowDownBtn; - GuiButton * scrollbarBoxBtn; - - GuiImage * bgOptionsImg; - GuiImage * bgOptionsOverImg; - GuiImage * scrollbarImg; - GuiImage * arrowDownImg; - GuiImage * arrowDownOverImg; - GuiImage * arrowUpImg; - GuiImage * arrowUpOverImg; - GuiImage * scrollbarBoxImg; - GuiImage * scrollbarBoxOverImg; - - GuiImageData * bgOptions; - GuiImageData * bgOptionsOver; - GuiImageData * bgOptionsEntry; - GuiImageData * scrollbar; - GuiImageData * arrowDown; - GuiImageData * arrowDownOver; - GuiImageData * arrowUp; - GuiImageData * arrowUpOver; - GuiImageData * scrollbarBox; - GuiImageData * scrollbarBoxOver; - - GuiTrigger * trigA; - GuiTrigger * trigB; - GuiTrigger * trigHeldA; -}; - -//!Display a list of files -class GuiFileBrowser: public GuiElement -{ - public: - GuiFileBrowser(int w, int h); - ~GuiFileBrowser(); - void DisableTriggerUpdate(bool set); - void ResetState(); - void SetFocus(int f); - void Draw(); - void TriggerUpdate(); - void Update(GuiTrigger * t); - GuiButton * fileList[PAGESIZE]; - protected: - int selectedItem; - bool listChanged; - bool triggerdisabled; - - GuiText * fileListText[PAGESIZE]; - GuiText * fileListTextOver[PAGESIZE]; - GuiImage * fileListBg[PAGESIZE]; - //GuiImage * fileListArchives[PAGESIZE]; - //GuiImage * fileListDefault[PAGESIZE]; - GuiImage * fileListFolder[PAGESIZE]; - //GuiImage * fileListGFX[PAGESIZE]; - //GuiImage * fileListPLS[PAGESIZE]; - //GuiImage * fileListSFX[PAGESIZE]; - //GuiImage * fileListTXT[PAGESIZE]; - //GuiImage * fileListXML[PAGESIZE]; - - GuiButton * arrowUpBtn; - GuiButton * arrowDownBtn; - GuiButton * scrollbarBoxBtn; - - GuiImage * bgFileSelectionImg; - GuiImage * scrollbarImg; - GuiImage * arrowDownImg; - GuiImage * arrowUpImg; - GuiImage * scrollbarBoxImg; - - GuiImageData * bgFileSelection; - GuiImageData * bgFileSelectionEntry; - //GuiImageData * fileArchives; - //GuiImageData * fileDefault; - GuiImageData * fileFolder; - //GuiImageData * fileGFX; - //GuiImageData * filePLS; - //GuiImageData * fileSFX; - //GuiImageData * fileTXT; - //GuiImageData * fileXML; - GuiImageData * scrollbar; - GuiImageData * arrowDown; - GuiImageData * arrowUp; - GuiImageData * scrollbarBox; - - GuiTrigger * trigA; - GuiTrigger * trigHeldA; -}; - -#endif diff --git a/source/libwiigui/gui_box.cpp b/source/libwiigui/gui_box.cpp deleted file mode 100644 index 4f7f3f3e..00000000 --- a/source/libwiigui/gui_box.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include "gui_box.hpp" - -void GuiBox::Draw() -{ - u32 n = filled ? 4 : 5; - f32 x = GetLeft(); - f32 y = GetTop(); - f32 x2 = x + width; - f32 y2 = y + height; - guVector v[] = { { x, y, 0.0f }, { x2, y, 0.0f }, { x2, y2, 0.0f }, { x, y2, 0.0f }, { x, y, 0.0f } }; - - GX_Begin(filled ? GX_TRIANGLEFAN : GX_LINESTRIP, GX_VTXFMT0, n); - for (u32 i = 0; i < n; i++) - { - GX_Position3f32(v[i].x, v[i].y, v[i].z); - GX_Color4u8(color[i].r, color[i].g, color[i].b, color[i].a); - } - GX_End(); -} diff --git a/source/libwiigui/gui_box.hpp b/source/libwiigui/gui_box.hpp deleted file mode 100644 index 858afc91..00000000 --- a/source/libwiigui/gui_box.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#ifndef GUIBOX_HPP_ -#define GUIBOX_HPP_ - -#include "libwiigui/gui.h" - -class GuiBox : public GuiElement -{ - public: - GuiBox() : filled(true) { SetColor((GXColor) {255, 255, 255, 255}); } - GuiBox(int w, int h) : filled(true) { width = w; height = h; SetColor((GXColor) {255, 255, 255, 255}); } - //! Set one color for the whole square - void SetColor(const GXColor c) { LOCK(this); for(int i = 0; i < 4; ++i) color[i] = c; } - //! Set Color for each corner having a nice fluent flow into the color of the other corners - //! 0 = up/left, 1 = up/right, 2 = buttom/left, 3 = buttom/right - void SetColor(int i, const GXColor c) { LOCK(this); if(i < 4) color[i] = c; } - void SetSize(int w, int h) { LOCK(this); width = w; height = h; } - void SetFilled(bool f) { LOCK(this); filled = f; } - void Draw(); - protected: - GXColor color[4]; - bool filled; -}; - -#endif diff --git a/source/libwiigui/gui_button.cpp b/source/libwiigui/gui_button.cpp deleted file mode 100644 index 2d4ade53..00000000 --- a/source/libwiigui/gui_button.cpp +++ /dev/null @@ -1,511 +0,0 @@ -/**************************************************************************** - * libwiigui - * - * Tantric 2009 - * - * gui_button.cpp - * - * GUI class definitions - ***************************************************************************/ - -#include "gui.h" - -static int scrollison; - -/** - * Constructor for the GuiButton class. - */ - -GuiButton::GuiButton(int w, int h) -{ - width = w; - height = h; - image = NULL; - imageOver = NULL; - imageHold = NULL; - imageClick = NULL; - icon = NULL; - iconOver = NULL; - iconHold = NULL; - iconClick = NULL; - toolTip = NULL; - - for (int i = 0; i < 3; i++) - { - label[i] = NULL; - labelOver[i] = NULL; - labelHold[i] = NULL; - labelClick[i] = NULL; - } - - soundOver = NULL; - soundHold = NULL; - soundClick = NULL; - selectable = true; - holdable = false; - clickable = true; - - time1 = time2 = 0; -} - -GuiButton::GuiButton(GuiImage* img, GuiImage* imgOver, int hor, int vert, int x, int y, GuiTrigger* trig, - GuiSound* sndOver, GuiSound* sndClick, u8 grow) -{ - width = img ? img->GetWidth() : 0; - height = img ? img->GetHeight() : 0; - image = img; - if(image) image->SetParent(this); - imageOver = imgOver; - if (imageOver) imageOver->SetParent(this); - imageHold = NULL; - imageClick = NULL; - icon = NULL; - iconOver = NULL; - iconHold = NULL; - iconClick = NULL; - toolTip = NULL; - alignmentHor = hor; - alignmentVert = vert; - xoffset = x; - yoffset = y; - trigger[0] = trig; - - for (int i = 0; i < 3; i++) - { - label[i] = NULL; - labelOver[i] = NULL; - labelHold[i] = NULL; - labelClick[i] = NULL; - } - - soundOver = sndOver; - soundHold = NULL; - soundClick = sndClick; - selectable = true; - holdable = false; - clickable = true; - - if (grow == 1) - { - effectsOver |= EFFECT_SCALE; - effectAmountOver = 4; - effectTargetOver = 110; - } - time1 = time2 = 0; -} - -GuiButton::GuiButton(GuiImage* img, GuiImage* imgOver, int hor, int vert, int x, int y, GuiTrigger* trig, - GuiSound* sndOver, GuiSound* sndClick, u8 grow, GuiTooltip* tt, int ttx, int tty, int h_align, int v_align) -{ - width = img ? img->GetWidth() : 0; - height = img ? img->GetHeight() : 0; - image = img; - if(image) image->SetParent(this); - imageOver = imgOver; - if (imageOver) imageOver->SetParent(this); - imageHold = NULL; - imageClick = NULL; - icon = NULL; - iconOver = NULL; - iconHold = NULL; - iconClick = NULL; - toolTip = NULL; - alignmentHor = hor; - alignmentVert = vert; - xoffset = x; - yoffset = y; - trigger[0] = trig; - - for (int i = 0; i < 3; i++) - { - label[i] = NULL; - labelOver[i] = NULL; - labelHold[i] = NULL; - labelClick[i] = NULL; - } - - soundOver = sndOver; - soundHold = NULL; - soundClick = sndClick; - selectable = true; - holdable = false; - clickable = true; - - if (grow == 1) - { - effectsOver |= EFFECT_SCALE; - effectAmountOver = 4; - effectTargetOver = 110; - } - - toolTip = tt; - if(toolTip) - { - toolTip->SetParent(this); - toolTip->SetAlignment(h_align, v_align); - toolTip->SetPosition(ttx, tty); - } - - time1 = time2 = 0; -} - -/** - * Destructor for the GuiButton class. - */ -GuiButton::~GuiButton() -{ -} - -void GuiButton::SetImage(GuiImage* img) -{ - LOCK( this ); - image = img; - if (img) img->SetParent(this); -} -void GuiButton::SetImageOver(GuiImage* img) -{ - LOCK( this ); - imageOver = img; - if (img) img->SetParent(this); -} -void GuiButton::SetImageHold(GuiImage* img) -{ - LOCK( this ); - imageHold = img; - if (img) img->SetParent(this); -} -void GuiButton::SetImageClick(GuiImage* img) -{ - LOCK( this ); - imageClick = img; - if (img) img->SetParent(this); -} -void GuiButton::SetIcon(GuiImage* img) -{ - LOCK( this ); - icon = img; - if (img) img->SetParent(this); -} -void GuiButton::SetIconOver(GuiImage* img) -{ - LOCK( this ); - iconOver = img; - if (img) img->SetParent(this); -} -void GuiButton::SetIconHold(GuiImage* img) -{ - LOCK( this ); - iconHold = img; - if (img) img->SetParent(this); -} -void GuiButton::SetIconClick(GuiImage* img) -{ - LOCK( this ); - iconClick = img; - if (img) img->SetParent(this); -} -void GuiButton::SetLabel(GuiText* txt, int n) -{ - LOCK( this ); - label[n] = txt; - if (txt) txt->SetParent(this); -} -void GuiButton::SetLabelOver(GuiText* txt, int n) -{ - LOCK( this ); - labelOver[n] = txt; - if (txt) txt->SetParent(this); -} -void GuiButton::SetLabelHold(GuiText* txt, int n) -{ - LOCK( this ); - labelHold[n] = txt; - if (txt) txt->SetParent(this); -} -void GuiButton::SetLabelClick(GuiText* txt, int n) -{ - LOCK( this ); - labelClick[n] = txt; - if (txt) txt->SetParent(this); -} -void GuiButton::SetSoundOver(GuiSound * snd) -{ - LOCK( this ); - soundOver = snd; -} -void GuiButton::SetSoundHold(GuiSound * snd) -{ - LOCK( this ); - soundHold = snd; -} -void GuiButton::SetSoundClick(GuiSound * snd) -{ - LOCK( this ); - soundClick = snd; -} - -void GuiButton::SetToolTip(GuiTooltip* tt, int x, int y, int h_align, int v_align) -{ - LOCK( this ); - if (tt) - { - toolTip = tt; - toolTip->SetParent(this); - toolTip->SetAlignment(h_align, v_align); - toolTip->SetPosition(x, y); - - } -} - -void GuiButton::RemoveToolTip() -{ - LOCK( this ); - toolTip = NULL; -} - -void GuiButton::RemoveSoundOver() -{ - LOCK( this ); - soundOver = NULL; -} -void GuiButton::RemoveSoundClick() -{ - LOCK( this ); - soundClick = NULL; -} -void GuiButton::SetSkew(int XX1, int YY1, int XX2, int YY2, int XX3, int YY3, int XX4, int YY4) -{ - if (image) - { - image->xx1 = XX1; - image->yy1 = YY1; - image->xx2 = XX2; - image->yy2 = YY2; - image->xx3 = XX3; - image->yy3 = YY3; - image->xx4 = XX4; - image->yy4 = YY4; - } -} - -void GuiButton::SetSkew(int *skew) -{ - if (image) image->SetSkew(skew); -} - -/** - * Draw the button on screen - */ -void GuiButton::Draw() -{ - LOCK( this ); - if (!this->IsVisible()) return; - - // draw image - if ((state == STATE_SELECTED || state == STATE_HELD) && imageOver) - imageOver->Draw(); - else if (image) image->Draw(); - // draw icon - if ((state == STATE_SELECTED || state == STATE_HELD) && iconOver) - iconOver->Draw(); - else if (icon) icon->Draw(); - // draw text - for (int i = 0; i < 3; i++) - { - if ((state == STATE_SELECTED || state == STATE_HELD) && labelOver[i]) - labelOver[i]->Draw(); - else if (label[i]) label[i]->Draw(); - } - - this->UpdateEffects(); -} -void GuiButton::DrawTooltip() -{ - LOCK( this ); - if (this->IsVisible() && state == STATE_SELECTED && toolTip) - { - if (time2 == 0) - { - time(&time1); - time2 = time1; - } - if (time1 != 0) // timer luft - time(&time1); - - if (time1 == 0 || difftime(time1, time2) >= 2) - { - if (time1 != 0) // timer gerade abgelaufen - toolTip->SetEffect(EFFECT_FADE, 20); - time1 = 0; - toolTip->Draw(); - return; - } - } - else - { - if (time2 != 0 && time1 == 0) // timer abgelaufen, gerade DESELECT - if (toolTip) toolTip->SetEffect(EFFECT_FADE, -20); - time2 = 0; - } - if (toolTip && toolTip->GetEffect()) toolTip->Draw(); -} -void GuiButton::ScrollIsOn(int f) -{ - LOCK( this ); - scrollison = f; -} -void GuiButton::Update(GuiTrigger * t) -{ - LOCK( this ); - if (!this->IsVisible() || state == STATE_CLICKED || state == STATE_DISABLED || !t) - return; - else if (parentElement && parentElement->GetState() == STATE_DISABLED) return; - -#ifdef HW_RVL - // cursor - if ( t->wpad.ir.valid ) - { - if ( this->IsInside( t->wpad.ir.x, t->wpad.ir.y ) ) - { - if ( state == STATE_DEFAULT ) // we weren't on the button before! - - { - if ( scrollison == 0 ) - { - this->SetState( STATE_SELECTED, t->chan ); - } - - if ( this->Rumble() && scrollison == 0 ) - rumbleRequest[t->chan] = 1; - - if ( soundOver && scrollison == 0 ) - soundOver->Play(); - - if ( effectsOver && !effects && scrollison == 0 ) - { - // initiate effects - effects = effectsOver; - effectAmount = effectAmountOver; - effectTarget = effectTargetOver; - } - } - } - else - { - if ( state == STATE_SELECTED && ( stateChan == t->chan || stateChan == -1 ) ) - this->ResetState(); - - if ( effectTarget == effectTargetOver && effectAmount == effectAmountOver ) - { - // initiate effects (in reverse) - effects = effectsOver; - effectAmount = -effectAmountOver; - effectTarget = 100; - } - } - } -#else - - if (state == STATE_SELECTED && (stateChan == t->chan || stateChan == -1)) this->ResetState(); - - if (effectTarget == effectTargetOver && effectAmount == effectAmountOver) - { - // initiate effects (in reverse) - effects = effectsOver; - effectAmount = -effectAmountOver; - effectTarget = 100; - } - -#endif - - // button triggers - if (this->IsClickable() && scrollison == 0) - { - s32 wm_btns, wm_btns_trig, cc_btns, cc_btns_trig; - for (int i = 0; i < 6; i++) - { - if (trigger[i] && (trigger[i]->chan == -1 || trigger[i]->chan == t->chan)) - { - // higher 16 bits only (wiimote) - wm_btns = t->wpad.btns_d << 16; - wm_btns_trig = trigger[i]->wpad.btns_d << 16; - - // lower 16 bits only (classic controller) - cc_btns = t->wpad.btns_d >> 16; - cc_btns_trig = trigger[i]->wpad.btns_d >> 16; - - if (((t->wpad.btns_d > 0 && wm_btns == wm_btns_trig) || (cc_btns == cc_btns_trig && t->wpad.exp.type - == EXP_CLASSIC)) || (t->pad.btns_d == trigger[i]->pad.btns_d && t->pad.btns_d > 0)) - { - if (t->chan == stateChan || stateChan == -1) - { - if (state == STATE_SELECTED) - { - this->SetState(STATE_CLICKED, t->chan); - - if (soundClick) soundClick->Play(); - } - else if (trigger[i]->type == TRIGGER_BUTTON_ONLY) - { - this->SetState(STATE_CLICKED, t->chan); - if (soundClick) soundClick->Play(); - } - else if (trigger[i]->type == TRIGGER_BUTTON_ONLY_IN_FOCUS && parentElement->IsFocused()) - { - this->SetState(STATE_CLICKED, t->chan); - if (soundClick) soundClick->Play(); - } - } - } - } - } - } - - if (this->IsHoldable()) - { - bool held = false; - s32 wm_btns, wm_btns_h, wm_btns_trig, cc_btns, cc_btns_h, cc_btns_trig; - - for (int i = 0; i < 6; i++) - { - if (trigger[i] && (trigger[i]->chan == -1 || trigger[i]->chan == t->chan)) - { - // higher 16 bits only (wiimote) - wm_btns = t->wpad.btns_d << 16; - wm_btns_h = t->wpad.btns_h << 16; - wm_btns_trig = trigger[i]->wpad.btns_h << 16; - - // lower 16 bits only (classic controller) - cc_btns = t->wpad.btns_d >> 16; - cc_btns_h = t->wpad.btns_h >> 16; - cc_btns_trig = trigger[i]->wpad.btns_h >> 16; - - if (((t->wpad.btns_d > 0 && wm_btns == wm_btns_trig) || (cc_btns == cc_btns_trig && t->wpad.exp.type - == EXP_CLASSIC)) || (t->pad.btns_d == trigger[i]->pad.btns_h && t->pad.btns_d > 0)) - { - if (trigger[i]->type == TRIGGER_HELD && state == STATE_SELECTED && (t->chan == stateChan - || stateChan == -1)) this->SetState(STATE_CLICKED, t->chan); - } - - if (((t->wpad.btns_h > 0 && wm_btns_h == wm_btns_trig) || (cc_btns_h == cc_btns_trig - && t->wpad.exp.type == EXP_CLASSIC)) || (t->pad.btns_h == trigger[i]->pad.btns_h - && t->pad.btns_h > 0)) - { - if (trigger[i]->type == TRIGGER_HELD) held = true; - } - - if (!held && state == STATE_HELD && stateChan == t->chan) - { - this->ResetState(); - } - else if (held && state == STATE_CLICKED && stateChan == t->chan) - { - this->SetState(STATE_HELD, t->chan); - } - } - } - } - - if (updateCB) updateCB(this); -} - diff --git a/source/libwiigui/gui_checkbox.cpp b/source/libwiigui/gui_checkbox.cpp deleted file mode 100644 index f3ad018c..00000000 --- a/source/libwiigui/gui_checkbox.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include "gui_checkbox.hpp" - -#define WHITEBOX_RED_SIZE 4 - -GuiCheckbox::GuiCheckbox() - : GuiButton(30, 30), Checked(false) -{ - Cross.SetParent(this); - Blackbox.SetParent(this); - Whitebox.SetParent(this); - Cross.SetColor((GXColor) {0, 0, 0, 255}); - Blackbox.SetColor((GXColor) {0, 0, 0, 255}); - Whitebox.SetColor((GXColor) {255, 255, 255, 255}); - - SetSize(30, 30); -} - -GuiCheckbox::GuiCheckbox(int w, int h) - : GuiButton(w, h), Checked(false) -{ - Cross.SetParent(this); - Blackbox.SetParent(this); - Whitebox.SetParent(this); - Cross.SetColor((GXColor) {0, 0, 0, 255}); - Blackbox.SetColor((GXColor) {0, 0, 0, 255}); - Whitebox.SetColor((GXColor) {255, 255, 255, 255}); - - SetSize(w, h); -} - -void GuiCheckbox::SetSize(int w, int h) -{ - width = w; - height = h; - Cross.SetSize(w-WHITEBOX_RED_SIZE, h-WHITEBOX_RED_SIZE); - Cross.SetPosition(WHITEBOX_RED_SIZE/2, WHITEBOX_RED_SIZE/2); - Blackbox.SetSize(w, h); - Whitebox.SetSize(w-WHITEBOX_RED_SIZE, h-WHITEBOX_RED_SIZE); - Whitebox.SetPosition(WHITEBOX_RED_SIZE/2, WHITEBOX_RED_SIZE/2); -} - -void GuiCheckbox::SetTransparent(bool b) -{ - Blackbox.SetFilled(b); - Whitebox.SetFilled(b); -} - -void GuiCheckbox::SetState(int s, int c) -{ - if(s == STATE_CLICKED) - Checked = !Checked; - else - GuiButton::SetState(s, c); -} - -void GuiCheckbox::Draw() -{ - GuiButton::Draw(); - Blackbox.Draw(); - Whitebox.Draw(); - if(Checked) - Cross.Draw(); -} diff --git a/source/libwiigui/gui_checkbox.hpp b/source/libwiigui/gui_checkbox.hpp deleted file mode 100644 index f44bb575..00000000 --- a/source/libwiigui/gui_checkbox.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#ifndef GUICHECKBOX_HPP_ -#define GUICHECKBOX_HPP_ - -#include "libwiigui/gui.h" -#include "libwiigui/gui_box.hpp" -#include "libwiigui/gui_cross.hpp" - -class GuiCheckbox : public GuiButton -{ - public: - GuiCheckbox(); - GuiCheckbox(int w, int h); - void SetTransparent(bool b); - void SetSize(int w, int h); - void SetChecked(bool c) { LOCK(this); Checked = c; } - bool IsChecked() const { return Checked; } - virtual void SetState(int s, int c = -1); - virtual void Draw(); - protected: - GuiCross Cross; - GuiBox Blackbox; - GuiBox Whitebox; - bool Checked; - -}; - -#endif diff --git a/source/libwiigui/gui_circle.cpp b/source/libwiigui/gui_circle.cpp deleted file mode 100644 index 631d77c2..00000000 --- a/source/libwiigui/gui_circle.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include "gui_circle.hpp" - -GuiCircle::GuiCircle() - : radius(100.0f), filled(true), accuracy(36) -{ - - color = (GXColor) {0, 0, 0, 255}; - SetLinewidth(1.0f); -} - -GuiCircle::GuiCircle(float r) - : radius(r), filled(true), accuracy(36) -{ - color = (GXColor) {0, 0, 0, 255}; - SetLinewidth(1.0f); -} - -void GuiCircle::SetLinewidth(float s) -{ - LOCK(this); - Linewidth = s; - GX_SetLineWidth((u8) (s*6.0f), 0); -} - -void GuiCircle::Draw() -{ - int loopAmount = filled ? accuracy : accuracy+1; - - GX_Begin(filled ? GX_TRIANGLEFAN : GX_LINESTRIP, GX_VTXFMT0, loopAmount); - for(int i = 0; i < loopAmount; ++i) - { - f32 rad = (f32) i / (f32) accuracy * 360.0f; - f32 x = cos(DegToRad(rad)) * radius + GetLeft(); - f32 y = sin(DegToRad(rad)) * radius + GetTop(); - - GX_Position3f32(x, y, 0.0f); - GX_Color4u8(color.r, color.g, color.b, color.a); - } - GX_End(); -} diff --git a/source/libwiigui/gui_circle.hpp b/source/libwiigui/gui_circle.hpp deleted file mode 100644 index eada84e6..00000000 --- a/source/libwiigui/gui_circle.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#ifndef GUICIRCLE_HPP_ -#define GUICIRCLE_HPP_ - -#include "libwiigui/gui.h" - -class GuiCircle : public GuiElement -{ - public: - GuiCircle(); - GuiCircle(float radius); - void SetRadius(float r) { LOCK(this); radius = r; } - void SetInnerRadius(float r) { SetLinewidth((radius-r)*2.0f); } - void SetColor(const GXColor c) { LOCK(this); color = c; } - void SetAccuracy(int a) { LOCK(this); accuracy = a; } - void SetFilled(bool f) { LOCK(this); filled = f; } - void SetLinewidth(float s); - void Draw(); - protected: - GXColor color; - float radius; - float Linewidth; - bool filled; - int accuracy; -}; - -#endif diff --git a/source/libwiigui/gui_cross.cpp b/source/libwiigui/gui_cross.cpp deleted file mode 100644 index 93feab20..00000000 --- a/source/libwiigui/gui_cross.cpp +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include "gui_cross.hpp" - -void GuiCross::Draw() -{ - f32 x1 = GetLeft(); - f32 x2 = x1 + width; - f32 y1 = GetTop(); - f32 y2 = y1 + height; - - GX_Begin(GX_LINES, GX_VTXFMT0, 4); - GX_Position3f32(x1, y1, 0.0f); - GX_Color4u8(color.r, color.g, color.b, color.a); - GX_Position3f32(x2, y2, 0.0f); - GX_Color4u8(color.r, color.g, color.b, color.a); - GX_Position3f32(x2, y1, 0.0f); - GX_Color4u8(color.r, color.g, color.b, color.a); - GX_Position3f32(x1, y2, 0.0f); - GX_Color4u8(color.r, color.g, color.b, color.a); - GX_End(); -} diff --git a/source/libwiigui/gui_cross.hpp b/source/libwiigui/gui_cross.hpp deleted file mode 100644 index 83ada4c1..00000000 --- a/source/libwiigui/gui_cross.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#ifndef GUICROSS_HPP_ -#define GUICROSS_HPP_ - -#include "libwiigui/gui.h" - -class GuiCross : public GuiElement -{ - public: - GuiCross() : Linewidth(2.0f) { color = (GXColor) {0, 0, 0, 255}; GX_SetLineWidth((u8) (Linewidth*6.0f), 0); } - //! Max line width is 42.5 pixel - void SetLinewidth(float w) { LOCK(this); Linewidth = w; GX_SetLineWidth((u8) (Linewidth*6.0f), 0); } - void SetColor(const GXColor c) { LOCK(this); color = c; } - void SetSize(int w, int h) { LOCK(this); width = w; height = h; } - void Draw(); - protected: - GXColor color; - float Linewidth; -}; - -#endif diff --git a/source/libwiigui/gui_customoptionbrowser.cpp b/source/libwiigui/gui_customoptionbrowser.cpp deleted file mode 100644 index 3cbb8d80..00000000 --- a/source/libwiigui/gui_customoptionbrowser.cpp +++ /dev/null @@ -1,531 +0,0 @@ -/**************************************************************************** - * libwiigui - * - * gui_customoptionbrowser.cpp - * - * GUI class definitions - ***************************************************************************/ - -#include "gui.h" -#include "../wpad.h" -#include "../main.h" -#include "../gecko.h" -#include "../settings/CSettings.h" -#include "gui_customoptionbrowser.h" -#include "themes/CTheme.h" -#include "utils/tools.h" -#include "menu.h" - -#include - -#define GAMESELECTSIZE 30 - -/** - * Constructor for the GuiCustomOptionBrowser class. - */ -GuiCustomOptionBrowser::GuiCustomOptionBrowser(int w, int h, OptionList * l, const char * custombg) -{ - width = w; - height = h; - options = l; - selectable = true; - selectedItem = 0; - focus = 1; // allow focus - coL2 = 50; - scrollbaron = false; - listOffset = 0; - - trigA = new GuiTrigger; - trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - trigHeldA = new GuiTrigger; - trigHeldA->SetHeldTrigger(-1, WPAD_BUTTON_A, PAD_BUTTON_A); - - bgOptions = Resources::GetImageData(custombg); - - bgOptionsImg = new GuiImage(bgOptions); - bgOptionsImg->SetParent(this); - bgOptionsImg->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - - bgOptionsEntry = Resources::GetImageData("bg_options_entry.png"); - - scrollbar = Resources::GetImageData("scrollbar.png"); - scrollbarImg = new GuiImage(scrollbar); - scrollbarImg->SetParent(this); - scrollbarImg->SetAlignment(ALIGN_RIGHT, ALIGN_TOP); - scrollbarImg->SetPosition(0, 4); - - arrowDown = Resources::GetImageData("scrollbar_arrowdown.png"); - arrowDownImg = new GuiImage(arrowDown); - arrowDownOver = Resources::GetImageData("scrollbar_arrowdown.png"); - arrowDownOverImg = new GuiImage(arrowDownOver); - arrowUp = Resources::GetImageData("scrollbar_arrowup.png"); - arrowUpImg = new GuiImage(arrowUp); - arrowUpOver = Resources::GetImageData("scrollbar_arrowup.png"); - arrowUpOverImg = new GuiImage(arrowUpOver); - scrollbarBox = Resources::GetImageData("scrollbar_box.png"); - scrollbarBoxImg = new GuiImage(scrollbarBox); - scrollbarBoxOver = Resources::GetImageData("scrollbar_box.png"); - scrollbarBoxOverImg = new GuiImage(scrollbarBoxOver); - - arrowUpBtn = new GuiButton(arrowUpImg->GetWidth(), arrowUpImg->GetHeight()); - arrowUpBtn->SetParent(this); - arrowUpBtn->SetImage(arrowUpImg); - arrowUpBtn->SetImageOver(arrowUpOverImg); - arrowUpBtn->SetImageHold(arrowUpOverImg); - arrowUpBtn->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - arrowUpBtn->SetPosition(width / 2 - 18 + 7, -18); - arrowUpBtn->SetSelectable(false); - arrowUpBtn->SetTrigger(trigA); - arrowUpBtn->SetEffectOnOver(EFFECT_SCALE, 50, 130); - arrowUpBtn->SetSoundClick(btnSoundClick); - - arrowDownBtn = new GuiButton(arrowDownImg->GetWidth(), arrowDownImg->GetHeight()); - arrowDownBtn->SetParent(this); - arrowDownBtn->SetImage(arrowDownImg); - arrowDownBtn->SetImageOver(arrowDownOverImg); - arrowDownBtn->SetImageHold(arrowDownOverImg); - arrowDownBtn->SetAlignment(ALIGN_CENTRE, ALIGN_BOTTOM); - arrowDownBtn->SetPosition(width / 2 - 18 + 7, 18); - arrowDownBtn->SetSelectable(false); - arrowDownBtn->SetTrigger(trigA); - arrowDownBtn->SetEffectOnOver(EFFECT_SCALE, 50, 130); - arrowDownBtn->SetSoundClick(btnSoundClick); - - scrollbarBoxBtn = new GuiButton(scrollbarBoxImg->GetWidth(), scrollbarBoxImg->GetHeight()); - scrollbarBoxBtn->SetParent(this); - scrollbarBoxBtn->SetImage(scrollbarBoxImg); - scrollbarBoxBtn->SetImageOver(scrollbarBoxOverImg); - scrollbarBoxBtn->SetImageHold(scrollbarBoxOverImg); - scrollbarBoxBtn->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - scrollbarBoxBtn->SetSelectable(false); - scrollbarBoxBtn->SetEffectOnOver(EFFECT_SCALE, 50, 120); - scrollbarBoxBtn->SetMinY(0); - scrollbarBoxBtn->SetMaxY(height - 30); - scrollbarBoxBtn->SetHoldable(true); - scrollbarBoxBtn->SetTrigger(trigHeldA); - - for (int i = 0; i < PAGESIZE; i++) - { - optionTxt[i] = new GuiText((wchar_t *) NULL, 20, thColor("r=0 g=0 b=0 a=255 - settings text color")); - optionTxt[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - optionTxt[i]->SetPosition(24, 0); - optionTxt[i]->SetMaxWidth(bgOptionsImg->GetWidth() - (coL2 + 24), DOTTED); - - optionBg[i] = new GuiImage(bgOptionsEntry); - - optionVal[i] = new GuiText((wchar_t *) NULL, 20, thColor("r=0 g=0 b=0 a=255 - settings text color")); - optionVal[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - - optionValOver[i] = new GuiText((wchar_t *) NULL, 20, thColor("r=0 g=0 b=0 a=255 - settings text color")); - optionValOver[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - - optionBtn[i] = new GuiButton(width - 28, GAMESELECTSIZE); - optionBtn[i]->SetParent(this); - optionBtn[i]->SetLabel(optionTxt[i], 0); - optionBtn[i]->SetLabel(optionVal[i], 1); - optionBtn[i]->SetLabelOver(optionValOver[i], 1); - optionBtn[i]->SetImageOver(optionBg[i]); - optionBtn[i]->SetPosition(10, GAMESELECTSIZE * i + 4); - optionBtn[i]->SetRumble(false); - optionBtn[i]->SetTrigger(trigA); - optionBtn[i]->SetSoundClick(btnSoundClick); - } -} - -/** - * Destructor for the GuiCustomOptionBrowser class. - */ -GuiCustomOptionBrowser::~GuiCustomOptionBrowser() -{ - delete arrowUpBtn; - delete arrowDownBtn; - delete scrollbarBoxBtn; - delete scrollbarImg; - delete arrowDownImg; - delete arrowDownOverImg; - delete arrowUpImg; - delete arrowUpOverImg; - delete scrollbarBoxImg; - delete scrollbarBoxOverImg; - delete scrollbar; - delete arrowDown; - delete arrowDownOver; - delete arrowUp; - delete arrowUpOver; - delete scrollbarBox; - delete scrollbarBoxOver; - - delete bgOptionsImg; - delete bgOptions; - delete bgOptionsEntry; - - delete trigA; - delete trigHeldA; - - for (int i = 0; i < PAGESIZE; i++) - { - delete optionTxt[i]; - delete optionVal[i]; - delete optionValOver[i]; - delete optionBg[i]; - delete optionBtn[i]; - } -} - -void GuiCustomOptionBrowser::SetFocus(int f) -{ - focus = f; - - for (int i = 0; i < PAGESIZE; i++) - optionBtn[i]->ResetState(); - - if (f == 1) optionBtn[selectedItem]->SetState(STATE_SELECTED); -} - -void GuiCustomOptionBrowser::ResetState() -{ - if (state != STATE_DISABLED) - { - state = STATE_DEFAULT; - stateChan = -1; - } - - for (int i = 0; i < PAGESIZE; i++) - { - optionBtn[i]->ResetState(); - } -} - -int GuiCustomOptionBrowser::GetClickedOption() -{ - for (int i = 0; i < PAGESIZE; i++) - { - if (optionBtn[i]->GetState() == STATE_CLICKED) - { - optionBtn[i]->SetState(STATE_SELECTED); - return optionIndex[i]; - } - } - - return -1; -} - -int GuiCustomOptionBrowser::GetSelectedOption() -{ - for (int i = 0; i < PAGESIZE; i++) - { - if (optionBtn[i]->GetState() == STATE_SELECTED) - { - return optionIndex[i]; - } - } - return -1; -} - -void GuiCustomOptionBrowser::SetClickable(bool enable) -{ - for (int i = 0; i < PAGESIZE; i++) - { - optionBtn[i]->SetClickable(enable); - } -} - -void GuiCustomOptionBrowser::SetOffset(int optionnumber) -{ - listOffset = optionnumber; - selectedItem = optionnumber; -} - -/**************************************************************************** - * FindMenuItem - * - * Help function to find the next visible menu item on the list - ***************************************************************************/ - -int GuiCustomOptionBrowser::FindMenuItem(int currentItem, int direction) -{ - int nextItem = currentItem + direction; - - if (nextItem < 0 || nextItem >= options->GetLength()) return -1; - - if (strlen(options->GetName(nextItem)) > 0) - return nextItem; - - return FindMenuItem(nextItem, direction); -} - -/** - * Draw the button on screen - */ -void GuiCustomOptionBrowser::Draw() -{ - if (!this->IsVisible()) return; - - bgOptionsImg->Draw(); - - int next = listOffset; - - for (int i = 0; i < PAGESIZE; i++) - { - if (next >= 0) - { - optionBtn[i]->Draw(); - next = this->FindMenuItem(next, 1); - } - else break; - } - - if (PAGESIZE < options->GetLength()) - { - scrollbarImg->Draw(); - arrowUpBtn->Draw(); - arrowDownBtn->Draw(); - scrollbarBoxBtn->Draw(); - } - this->UpdateEffects(); -} - -void GuiCustomOptionBrowser::UpdateListEntries() -{ - LOCK(this); - scrollbaron = options->GetLength() > PAGESIZE; - if (listOffset < 0) listOffset = this->FindMenuItem(-1, 1); - int next = listOffset; - - int maxNameWidth = 0; - for (int i = 0; i < PAGESIZE; i++) - { - if (next >= 0) - { - if (optionBtn[i]->GetState() == STATE_DISABLED) - { - optionBtn[i]->SetVisible(true); - optionBtn[i]->SetState(STATE_DEFAULT); - } - - optionTxt[i]->SetText(options->GetName(next)); - if (maxNameWidth < optionTxt[i]->GetTextWidth()) maxNameWidth = optionTxt[i]->GetTextWidth(); - optionVal[i]->SetText(options->GetValue(next)); - optionValOver[i]->SetText(options->GetValue(next)); - - optionIndex[i] = next; - next = this->FindMenuItem(next, 1); - } - else - { - optionBtn[i]->SetVisible(false); - optionBtn[i]->SetState(STATE_DISABLED); - } - } - - if (coL2 < (24 + maxNameWidth + 16)) - coL2 = 24 + maxNameWidth + 16; - - for (int i = 0; i < PAGESIZE; i++) - { - if (optionBtn[i]->GetState() != STATE_DISABLED) - { - optionVal[i]->SetPosition(coL2, 0); - optionVal[i]->SetMaxWidth(bgOptionsImg->GetWidth() - (coL2 + 24), DOTTED); - - optionValOver[i]->SetPosition(coL2, 0); - optionValOver[i]->SetMaxWidth(bgOptionsImg->GetWidth() - (coL2 + 24), SCROLL_HORIZONTAL); - } - } -} - -void GuiCustomOptionBrowser::Update(GuiTrigger * t) -{ - if (state == STATE_DISABLED || !t) return; - - int next, prev, length = options->GetLength(); - int old_listOffset = listOffset; - - if (scrollbaron) - { - // update the location of the scroll box based on the position in the option list - arrowUpBtn->Update(t); - arrowDownBtn->Update(t); - scrollbarBoxBtn->Update(t); - } - - if(options->IsChanged()) - UpdateListEntries(); - - next = listOffset; - - if (!(t->wpad.btns_h & WPAD_BUTTON_UP || t->wpad.btns_h & WPAD_BUTTON_DOWN || - t->wpad.btns_h & WPAD_CLASSIC_BUTTON_UP || t->wpad.btns_h & WPAD_CLASSIC_BUTTON_DOWN || - t->pad.btns_h & PAD_BUTTON_UP || t->pad.btns_h & PAD_BUTTON_DOWN)) - { - for (int i = 0; i < PAGESIZE; i++) - { - if (next >= 0) next = this->FindMenuItem(next, 1); - - if (focus) - { - if (i != selectedItem && optionBtn[i]->GetState() == STATE_SELECTED) - { - optionBtn[i]->ResetState(); - } - else if (i == selectedItem && optionBtn[i]->GetState() == STATE_DEFAULT) - { - optionBtn[selectedItem]->SetState(STATE_SELECTED); - } - } - - optionBtn[i]->Update(t); - - if (optionBtn[i]->GetState() == STATE_SELECTED) - { - selectedItem = i; - } - } - } - - // pad/joystick navigation - if (!focus) return; // skip navigation - - if (t->Down()) - { - next = this->FindMenuItem(optionIndex[selectedItem], 1); - - if (next >= 0) - { - if (selectedItem == PAGESIZE - 1) - { - // move list down by 1 - listOffset = this->FindMenuItem(listOffset, 1); - } - else if (optionBtn[selectedItem + 1]->IsVisible()) - { - optionBtn[selectedItem]->ResetState(); - optionBtn[selectedItem + 1]->SetState(STATE_SELECTED, t->chan); - selectedItem++; - } - } - } - else if (t->Up()) - { - prev = this->FindMenuItem(optionIndex[selectedItem], -1); - - if (prev >= 0) - { - if (selectedItem == 0) - { - // move list up by 1 - listOffset = prev; - } - else - { - optionBtn[selectedItem]->ResetState(); - optionBtn[selectedItem - 1]->SetState(STATE_SELECTED, t->chan); - selectedItem--; - } - } - } - - if (!scrollbaron) - return; - - if (arrowDownBtn->GetState() == STATE_CLICKED || arrowDownBtn->GetState() == STATE_HELD) - { - next = this->FindMenuItem(optionIndex[selectedItem], 1); - - if (next >= 0) - { - if (selectedItem == PAGESIZE - 1) - { - // move list down by 1 - listOffset = this->FindMenuItem(listOffset, 1); - } - else if (optionBtn[selectedItem + 1]->IsVisible()) - { - optionBtn[selectedItem]->ResetState(); - optionBtn[selectedItem + 1]->SetState(STATE_SELECTED, t->chan); - selectedItem++; - } - scrollbarBoxBtn->Draw(); - usleep(35000); - } - if (!(t->wpad.btns_h & WPAD_BUTTON_A || t->wpad.btns_h & WPAD_CLASSIC_BUTTON_A || - t->pad.btns_h & PAD_BUTTON_A)) - { - arrowDownBtn->ResetState(); - } - } - else if (arrowUpBtn->GetState() == STATE_CLICKED || arrowUpBtn->GetState() == STATE_HELD) - { - prev = this->FindMenuItem(optionIndex[selectedItem], -1); - - if (prev >= 0) - { - if (selectedItem == 0) - { - // move list up by 1 - listOffset = prev; - } - else - { - optionBtn[selectedItem]->ResetState(); - optionBtn[selectedItem - 1]->SetState(STATE_SELECTED, t->chan); - selectedItem--; - } - scrollbarBoxBtn->Draw(); - usleep(35000); - } - if (!(t->wpad.btns_h & WPAD_BUTTON_A || t->wpad.btns_h & WPAD_CLASSIC_BUTTON_A || - t->pad.btns_h & PAD_BUTTON_A)) - { - arrowUpBtn->ResetState(); - } - } - - if (scrollbarBoxBtn->GetState() == STATE_HELD && scrollbarBoxBtn->GetStateChan() == t->chan && t->wpad.ir.valid - && options->GetLength() > PAGESIZE) - { - scrollbarBoxBtn->SetPosition(width / 2 - 18 + 7, 0); - - int position = t->wpad.ir.y - scrollbarBoxBtn->GetHeight()/2 - scrollbarBoxBtn->GetTop(); - position = cut_bounds(position, 0, 237); - - listOffset = (int) (((float) position / 237.0f)*length); - selectedItem = (int) (((float) listOffset / (float) length)*(PAGESIZE-1)); - - if (listOffset <= 0) - { - listOffset = 0; - selectedItem = 0; - } - else if (listOffset + PAGESIZE >= length) - { - listOffset = length - PAGESIZE; - } - } - int positionbar = 237 * (listOffset + selectedItem) / length; - - if (positionbar > 216) positionbar = 216; - scrollbarBoxBtn->SetPosition(width / 2 - 18 + 7, positionbar + 8); - - if (t->Right()) - { - if (listOffset < length && length > PAGESIZE) - { - listOffset = listOffset + PAGESIZE; - if (listOffset + PAGESIZE >= length) listOffset = length - PAGESIZE; - } - } - else if (t->Left()) - { - if (listOffset > 0) - { - listOffset = listOffset - PAGESIZE; - if (listOffset < 0) listOffset = 0; - } - } - - if (old_listOffset != listOffset) - UpdateListEntries(); - - if (updateCB) updateCB(this); -} diff --git a/source/libwiigui/gui_customoptionbrowser.h b/source/libwiigui/gui_customoptionbrowser.h deleted file mode 100644 index 9291b2fa..00000000 --- a/source/libwiigui/gui_customoptionbrowser.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef GUI_CUSTOMBROWSER_H_ -#define GUI_CUSTOMBROWSER_H_ - -#include "gui.h" -#include - -//!Display a list of menu options -class GuiCustomOptionBrowser: public GuiElement -{ - public: - GuiCustomOptionBrowser(int w, int h, OptionList * l, const char * background); - ~GuiCustomOptionBrowser(); - int FindMenuItem(int c, int d); - int GetClickedOption(); - int GetSelectedOption(); - void SetClickable(bool enable); - void SetOffset(int optionnumber); - void ResetState(); - void SetFocus(int f); - void Draw(); - void Update(GuiTrigger * t); - protected: - void UpdateListEntries(); - int selectedItem; - int listOffset; - int coL2; - bool scrollbaron; - - OptionList * options; - int optionIndex[PAGESIZE]; - GuiButton * optionBtn[PAGESIZE]; - GuiText * optionTxt[PAGESIZE]; - GuiText * optionVal[PAGESIZE]; - GuiText * optionValOver[PAGESIZE]; - GuiImage * optionBg[PAGESIZE]; - - GuiButton * arrowUpBtn; - GuiButton * arrowDownBtn; - GuiButton * scrollbarBoxBtn; - - GuiImage * bgOptionsImg; - GuiImage * scrollbarImg; - GuiImage * arrowDownImg; - GuiImage * arrowDownOverImg; - GuiImage * arrowUpImg; - GuiImage * arrowUpOverImg; - GuiImage * scrollbarBoxImg; - GuiImage * scrollbarBoxOverImg; - - GuiImageData * bgOptions; - GuiImageData * bgOptionsEntry; - GuiImageData * scrollbar; - GuiImageData * arrowDown; - GuiImageData * arrowDownOver; - GuiImageData * arrowUp; - GuiImageData * arrowUpOver; - GuiImageData * scrollbarBox; - GuiImageData * scrollbarBoxOver; - - GuiTrigger * trigA; - GuiTrigger * trigHeldA; -}; - -#endif diff --git a/source/libwiigui/gui_diskcover.cpp b/source/libwiigui/gui_diskcover.cpp deleted file mode 100644 index bf11bd18..00000000 --- a/source/libwiigui/gui_diskcover.cpp +++ /dev/null @@ -1,79 +0,0 @@ -#include "gui_diskcover.h" - -GuiDiskCover::GuiDiskCover() -{ - deg_beta = 0.0; - eff_step = 0; - // spin_angle = 0; - spin_speedup = 1.0; - spin_up = false; -} -GuiDiskCover::GuiDiskCover(GuiImageData *Disk) : - GuiImage(Disk) -{ - deg_beta = 0.0; - eff_step = 0; - // spin_angle = 0; - spin_speedup = 1.0; - spin_up = false; -} -GuiDiskCover::~GuiDiskCover() -{ -} - -void GuiDiskCover::SetBeta(f32 beta) -{ - deg_beta = beta; -} -void GuiDiskCover::SetBetaRotateEffect(f32 beta, u16 step) -{ - eff_beta = beta / (f32) step; - eff_step = step; -} -bool GuiDiskCover::GetBetaRotateEffect() -{ - return eff_step != 0; -} - -void GuiDiskCover::SetSpin(bool Up) -{ - spin_up = Up; -} - -void Menu_DrawDiskCover(f32 xpos, f32 ypos, f32 zpos, u16 width, u16 height, u16 distance, u8 data[], f32 deg_alpha, - f32 deg_beta, f32 scaleX, f32 scaleY, u8 alpha, bool shadow); -void Menu_DrawDiskCoverShadow(f32 xpos, f32 ypos, f32 zpos, u16 width, u16 height, u16 distance, u8 data[], - f32 deg_alpha, f32 deg_beta, f32 scaleX, f32 scaleY, u8 alpha, bool shadow); - -void GuiDiskCover::Draw() -{ - LOCK( this ); - if (!image || !this->IsVisible()) return; - float currScale = this->GetScale(); - // Menu_DrawDiskCoverShadow(this->GetLeft(), this->GetTop(), 190, width, height, 40, image, imageangle, deg_beta, widescreen ? currScale*0.8 : currScale, currScale, this->GetAlpha(), true); - Menu_DrawDiskCover(this->GetLeft(), this->GetTop(), 50, width, height, 55, image, imageangle, deg_beta, - widescreen ? currScale * 0.8 : currScale, currScale, 64, true); - Menu_DrawDiskCover(this->GetLeft(), this->GetTop(), 50, width, height, 55, image, imageangle, deg_beta, - widescreen ? currScale * 0.8 : currScale, currScale, this->GetAlpha(), false); - - if (eff_step) - { - deg_beta += eff_beta; - eff_step--; - } - GuiImage::imageangle += spin_speedup; - while (GuiImage::imageangle >= 360.0) - GuiImage::imageangle -= 360.0; - - if (spin_up) - { - if (spin_speedup < 11) // speed up - spin_speedup += 0.20; - } - else - { - if (spin_speedup > 1) spin_speedup -= 0.05; //slow down - } - - this->UpdateEffects(); -} diff --git a/source/libwiigui/gui_diskcover.h b/source/libwiigui/gui_diskcover.h deleted file mode 100644 index 5f91ac03..00000000 --- a/source/libwiigui/gui_diskcover.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef _GUIDISCCOVER_H_ -#define _GUIDISCCOVER_H_ - -#include "gui.h" - -class GuiDiskCover: public GuiImage -{ - public: - GuiDiskCover(); - GuiDiskCover(GuiImageData * img); - ~GuiDiskCover(); - void SetBeta(f32 beta); - void SetBetaRotateEffect(f32 beta, u16 Step); - bool GetBetaRotateEffect(); - - void SetSpin(bool Up); - void Draw(); - private: - f32 deg_beta; - f32 eff_beta; - u16 eff_step; - - // f32 spin_angle; - f32 spin_speedup; - bool spin_up; -}; - -#endif /* _GUIDISCCOVER_H_ */ diff --git a/source/libwiigui/gui_element.cpp b/source/libwiigui/gui_element.cpp deleted file mode 100644 index 8c31bc6b..00000000 --- a/source/libwiigui/gui_element.cpp +++ /dev/null @@ -1,820 +0,0 @@ -/**************************************************************************** - * libwiigui - * - * Tantric 2009 - * - * gui_element.cpp - * - * GUI class definitions - ***************************************************************************/ - -#include "gui.h" - -/** - * Constructor for the Object class. - */ -//mutex_t GuiElement::mutex = LWP_MUTEX_NULL; -mutex_t GuiElement::_lock_mutex = LWP_MUTEX_NULL; -GuiElement::GuiElement() -{ - xoffset = 0; - yoffset = 0; - zoffset = 0; - xmin = 0; - xmax = 0; - ymin = 0; - ymax = 0; - width = 0; - height = 0; - alpha = 255; - scale = 1; - state = STATE_DEFAULT; - stateChan = -1; - trigger[0] = NULL; - trigger[1] = NULL; - trigger[2] = NULL; - trigger[3] = NULL; - trigger[4] = NULL; - trigger[5] = NULL; - parentElement = NULL; - rumble = true; - selectable = false; - clickable = false; - holdable = false; - visible = true; - focus = -1; // cannot be focused - updateCB = NULL; - yoffsetDyn = 0; - xoffsetDyn = 0; - yoffsetDynFloat = 0; - alphaDyn = -1; - scaleDyn = 1; - effects = 0; - effectAmount = 0; - effectTarget = 0; - effectsOver = 0; - effectAmountOver = 0; - effectTargetOver = 0; - frequency = 0.0f; - changervar = 0; - degree = -90.0f; - circleamount = 360.0f; - Radius = 150; - angleDyn = 0.0f; - anglespeed = 0.0f; - - // default alignment - align to top left - alignmentVert = ALIGN_TOP; - alignmentHor = ALIGN_LEFT; - // if(mutex == LWP_MUTEX_NULL) LWP_MutexInit(&mutex, true); - if (_lock_mutex == LWP_MUTEX_NULL) LWP_MutexInit(&_lock_mutex, true); - _lock_thread = LWP_THREAD_NULL; - _lock_count = 0; - _lock_queue = LWP_TQUEUE_NULL; - -} - -/** - * Destructor for the GuiElement class. - */ -GuiElement::~GuiElement() -{ - // LWP_MutexDestroy(mutex); -} - -void GuiElement::SetParent(GuiElement * e) -{ - LOCK( this ); - parentElement = e; -} - -GuiElement * GuiElement::GetParent() -{ - return parentElement; -} -/** - * Get the left position of the GuiElement. - * @see SetLeft() - * @return Left position in pixel. - */ -int GuiElement::GetLeft() -{ - int x = 0; - int pWidth = 0; - int pLeft = 0; - - if (parentElement) - { - pWidth = parentElement->GetWidth(); - pLeft = parentElement->GetLeft(); - } - - if (effects & (EFFECT_SLIDE_IN | EFFECT_SLIDE_OUT | EFFECT_GOROUND | EFFECT_ROCK_VERTICLE)) pLeft += xoffsetDyn; - - switch (alignmentHor) - { - case ALIGN_LEFT: - x = pLeft; - break; - case ALIGN_CENTRE: - x = pLeft + (pWidth / 2) - (width / 2); - break; - case ALIGN_RIGHT: - x = pLeft + pWidth - width; - break; - } - return x + xoffset; -} - -/** - * Get the top position of the GuiElement. - * @see SetTop() - * @return Top position in pixel. - */ -int GuiElement::GetTop() -{ - int y = 0; - int pHeight = 0; - int pTop = 0; - - if (parentElement) - { - pHeight = parentElement->GetHeight(); - pTop = parentElement->GetTop(); - } - - if (effects & (EFFECT_SLIDE_IN | EFFECT_SLIDE_OUT | EFFECT_GOROUND | EFFECT_ROCK_VERTICLE)) pTop += yoffsetDyn; - - switch (alignmentVert) - { - case ALIGN_TOP: - y = pTop; - break; - case ALIGN_MIDDLE: - y = pTop + (pHeight / 2) - (height / 2); - break; - case ALIGN_BOTTOM: - y = pTop + pHeight - height; - break; - } - return y + yoffset; -} - -void GuiElement::SetMinX(int x) -{ - LOCK( this ); - xmin = x; -} - -int GuiElement::GetMinX() -{ - return xmin; -} - -void GuiElement::SetMaxX(int x) -{ - LOCK( this ); - xmax = x; -} - -int GuiElement::GetMaxX() -{ - return xmax; -} - -void GuiElement::SetMinY(int y) -{ - LOCK( this ); - ymin = y; -} - -int GuiElement::GetMinY() -{ - return ymin; -} - -void GuiElement::SetMaxY(int y) -{ - LOCK( this ); - ymax = y; -} - -int GuiElement::GetMaxY() -{ - return ymax; -} - -/** - * Get the width of the GuiElement. - * @see SetWidth() - * @return Width of the GuiElement. - */ -int GuiElement::GetWidth() -{ - return width; -} - -/** - * Get the height of the GuiElement. - * @see SetHeight() - * @return Height of the GuiElement. - */ -int GuiElement::GetHeight() -{ - return height; -} - -/** - * Set the width and height of the GuiElement. - * @param[in] Width Width in pixel. - * @param[in] Height Height in pixel. - * @see SetWidth() - * @see SetHeight() - */ -void GuiElement::SetSize(int w, int h) -{ - LOCK( this ); - - width = w; - height = h; -} - -/** - * Get visible. - * @see SetVisible() - * @return true if visible, false otherwise. - */ -bool GuiElement::IsVisible() -{ - return visible; -} - -/** - * Set visible. - * @param[in] Visible Set to true to show GuiElement. - * @see IsVisible() - */ -void GuiElement::SetVisible(bool v) -{ - LOCK( this ); - visible = v; -} - -void GuiElement::SetAlpha(int a) -{ - LOCK( this ); - alpha = a; -} - -int GuiElement::GetAlpha() -{ - int a; - - if (alphaDyn >= 0) - a = alphaDyn; - else a = alpha; - - if (parentElement) a *= parentElement->GetAlpha() / 255.0; - - return a; -} - -float GuiElement::GetAngleDyn() -{ - float a = 0.0; - - if (angleDyn) a = angleDyn; - - if (parentElement && !angleDyn) a = parentElement->GetAngleDyn(); - - return a; -} - -void GuiElement::SetScale(float s) -{ - LOCK( this ); - scale = s; -} - -float GuiElement::GetScale() -{ - float s = scale * scaleDyn; - - if (parentElement) s *= parentElement->GetScale(); - - return s; -} - -int GuiElement::GetState() -{ - return state; -} - -int GuiElement::GetStateChan() -{ - return stateChan; -} - -void GuiElement::SetState(int s, int c) -{ - LOCK( this ); - state = s; - stateChan = c; -} - -void GuiElement::ResetState() -{ - LOCK( this ); - if (state != STATE_DISABLED) - { - state = STATE_DEFAULT; - stateChan = -1; - } -} - -void GuiElement::SetClickable(bool c) -{ - LOCK( this ); - clickable = c; -} - -void GuiElement::SetSelectable(bool s) -{ - LOCK( this ); - selectable = s; -} - -void GuiElement::SetHoldable(bool d) -{ - LOCK( this ); - holdable = d; -} - -bool GuiElement::IsSelectable() -{ - if (state == STATE_DISABLED || state == STATE_CLICKED) - return false; - else return selectable; -} - -bool GuiElement::IsClickable() -{ - if (state == STATE_DISABLED || state == STATE_CLICKED || state == STATE_HELD) - return false; - else return clickable; -} - -bool GuiElement::IsHoldable() -{ - if (state == STATE_DISABLED) - return false; - else return holdable; -} - -void GuiElement::SetFocus(int f) -{ - LOCK( this ); - focus = f; -} - -int GuiElement::IsFocused() -{ - return focus; -} - -void GuiElement::SetTrigger(GuiTrigger * t) -{ - LOCK( this ); - if (!trigger[0]) - trigger[0] = t; - else if (!trigger[1]) - trigger[1] = t; - else if (!trigger[2]) - trigger[2] = t; - else if (!trigger[3]) - trigger[3] = t; - else if (!trigger[4]) - trigger[4] = t; - else if (!trigger[5]) - trigger[5] = t; - else // both were assigned, so we'll just overwrite the first one - trigger[0] = t; -} - -void GuiElement::SetTrigger(u8 i, GuiTrigger * t) -{ - LOCK( this ); - trigger[i] = t; -} - -void GuiElement::RemoveTrigger(u8 i) -{ - LOCK( this ); - trigger[i] = NULL; -} - -bool GuiElement::Rumble() -{ - return rumble; -} - -void GuiElement::SetRumble(bool r) -{ - LOCK( this ); - rumble = r; -} - -int GuiElement::GetEffect() -{ - LOCK( this ); - return effects; -} - -int GuiElement::GetEffectOnOver() -{ - LOCK( this ); - return effectsOver; -} - -float GuiElement::GetFrequency() -{ - LOCK( this ); - return frequency; -} - -void GuiElement::SetEffect(int eff, int speed, f32 circles, int r, f32 startdegree, f32 anglespeedset, int center_x, - int center_y) -{ - - if (eff & EFFECT_GOROUND) - { - xoffsetDyn = 0; //!position of circle in x - yoffsetDyn = 0; //!position of circle in y - Radius = r; //!radius of the circle - degree = startdegree; //!for example -90 () to start at top of circle - circleamount = circles; //!circleamoutn in degrees for example 360 for 1 circle - angleDyn = 0.0f; //!this is used by the code to calc the angle - anglespeed = anglespeedset; //!This is anglespeed depending on circle speed 1 is same speed and 0.5 half speed - temp_xoffset = center_x; //!position of center in x - temp_yoffset = center_y; //!position of center in y - } - effects |= eff; - effectAmount = speed; //!Circlespeed -} - -void GuiElement::SetEffect(int eff, int amount, int target) -{ - LOCK( this ); - if (eff & EFFECT_SLIDE_IN) - { - // these calculations overcompensate a little - if (eff & EFFECT_SLIDE_TOP) - yoffsetDyn = -screenheight; - else if (eff & EFFECT_SLIDE_LEFT) - xoffsetDyn = -screenwidth; - else if (eff & EFFECT_SLIDE_BOTTOM) - yoffsetDyn = screenheight; - else if (eff & EFFECT_SLIDE_RIGHT) xoffsetDyn = screenwidth; - } - - if (eff & EFFECT_FADE && amount > 0) - { - alphaDyn = 0; - } - else if (eff & EFFECT_FADE && amount < 0) - { - alphaDyn = alpha; - - } - else if (eff & EFFECT_ROCK_VERTICLE) - { - changervar = 0; - yoffsetDyn = 0; - yoffsetDynFloat = 0.0; - } - - effects |= eff; - effectAmount = amount; - effectTarget = target; -} - -void GuiElement::SetEffectOnOver(int eff, int amount, int target) -{ - LOCK( this ); - effectsOver |= eff; - effectAmountOver = amount; - effectTargetOver = target; -} - -void GuiElement::SetEffectGrow() -{ - SetEffectOnOver(EFFECT_SCALE, 4, 110); -} - -void GuiElement::StopEffect() -{ - xoffsetDyn = 0; - yoffsetDyn = 0; - effects = 0; - effectsOver = 0; - effectAmount = 0; - effectAmountOver = 0; - effectTarget = 0; - effectTargetOver = 0; - scaleDyn = 1; - frequency = 0.0f; - changervar = 0; - //angleDyn = 0.0f; - anglespeed = 0.0f; -} - -void GuiElement::UpdateEffects() -{ - LOCK( this ); - - if (effects & (EFFECT_SLIDE_IN | EFFECT_SLIDE_OUT | EFFECT_GOROUND)) - { - if (effects & EFFECT_SLIDE_IN) - { - if (effects & EFFECT_SLIDE_LEFT) - { - xoffsetDyn += effectAmount; - - if (xoffsetDyn >= 0) - { - xoffsetDyn = 0; - effects = 0; - } - } - else if (effects & EFFECT_SLIDE_RIGHT) - { - xoffsetDyn -= effectAmount; - - if (xoffsetDyn <= 0) - { - xoffsetDyn = 0; - effects = 0; - } - } - else if (effects & EFFECT_SLIDE_TOP) - { - yoffsetDyn += effectAmount; - - if (yoffsetDyn >= 0) - { - yoffsetDyn = 0; - effects = 0; - } - } - else if (effects & EFFECT_SLIDE_BOTTOM) - { - yoffsetDyn -= effectAmount; - - if (yoffsetDyn <= 0) - { - yoffsetDyn = 0; - effects = 0; - } - } - } - else - { - if (effects & EFFECT_SLIDE_LEFT) - { - xoffsetDyn -= effectAmount; - - if (xoffsetDyn <= -screenwidth) effects = 0; // shut off effect - } - else if (effects & EFFECT_SLIDE_RIGHT) - { - xoffsetDyn += effectAmount; - - if (xoffsetDyn >= screenwidth) effects = 0; // shut off effect - } - else if (effects & EFFECT_SLIDE_TOP) - { - yoffsetDyn -= effectAmount; - - if (yoffsetDyn <= -screenheight) effects = 0; // shut off effect - } - else if (effects & EFFECT_SLIDE_BOTTOM) - { - yoffsetDyn += effectAmount; - - if (yoffsetDyn >= screenheight) effects = 0; // shut off effect - } - } - } - - if (effects & EFFECT_GOROUND) - { - //!< check out gui.h for info - xoffset = temp_xoffset; - yoffset = temp_yoffset; - if (fabs(frequency) < circleamount) - { - angleDyn = (frequency + degree + 90.0f) * anglespeed; - xoffsetDyn = (int) lround(((f32) Radius) * cos((frequency + degree) * PI / 180.0f)); - yoffsetDyn = (int) lround(((f32) Radius) * sin((frequency + degree) * PI / 180.0f)); - frequency += ((f32) effectAmount) * 0.01f; - } - else - { - f32 temp_frequency = ((effectAmount < 0) ? -1.0f : 1.0f) * circleamount; - angleDyn = (temp_frequency + degree + 90.0f) * anglespeed; - xoffsetDyn = (int) lround(((f32) Radius) * cos((temp_frequency + degree) * PI / 180.0f)); - yoffsetDyn = (int) lround(((f32) Radius) * sin((temp_frequency + degree) * PI / 180.0f)); - xoffset += xoffsetDyn; - yoffset += yoffsetDyn; - effects ^= EFFECT_GOROUND; - frequency = 0.0f; - } - } - - if (effects & EFFECT_ROCK_VERTICLE) - { - //move up to 10pixel above 0 - if (changervar == 0 && yoffsetDynFloat < 11.0) - { - yoffsetDynFloat += (effectAmount * 0.01); - } - else if (yoffsetDynFloat > 10.0) - { - changervar = 1; - } - //move down till 10pixel under 0 - if (changervar == 1 && yoffsetDynFloat > -11.0) - { - yoffsetDynFloat -= (effectAmount * 0.01); - } - else if (yoffsetDynFloat < -10.0) - { - changervar = 0; - } - yoffsetDyn = (int) (yoffsetDynFloat); - } - - if (effects & EFFECT_FADE) - { - alphaDyn += effectAmount; - - if (effectAmount < 0 && alphaDyn <= 0) - { - alphaDyn = 0; - effects = 0; // shut off effect - } - else if (effectAmount > 0 && alphaDyn >= alpha) - { - alphaDyn = alpha; - effects = 0; // shut off effect - } - } - if (effects & EFFECT_SCALE) - { - scaleDyn += effectAmount / 100.0; - - if ((effectAmount < 0 && scaleDyn <= effectTarget / 100.0) || (effectAmount > 0 && scaleDyn >= effectTarget - / 100.0)) - { - scaleDyn = effectTarget / 100.0; - effects = 0; // shut off effect - } - } - if (effects & EFFECT_PULSE) - { - int percent = 10; //go down from target by this - - if ((scaleDyn <= (effectTarget * 0.01)) && (!changervar)) - { - scaleDyn += (effectAmount * 0.001); - } - else if (scaleDyn > (effectTarget * 0.01)) - { - changervar = 1; - } - if ((scaleDyn >= ((effectTarget - percent) * 0.01)) && (changervar)) - { - scaleDyn -= (effectAmount * 0.001); - } - else if (scaleDyn < ((effectTarget - percent) * 0.01)) - { - changervar = 0; - } - } -} - -void GuiElement::Update(GuiTrigger * t) -{ - LOCK( this ); - if (updateCB) updateCB(this); -} - -void GuiElement::SetUpdateCallback(UpdateCallback u) -{ - LOCK( this ); - updateCB = u; -} - -void GuiElement::SetPosition(int xoff, int yoff, int zoff) -{ - LOCK( this ); - xoffset = xoff; - yoffset = yoff; - zoffset = zoff; -} - -void GuiElement::SetAlignment(int hor, int vert) -{ - LOCK( this ); - alignmentHor = hor; - alignmentVert = vert; -} - -int GuiElement::GetSelected() -{ - return -1; -} - -/** - * Draw an element on screen. - */ -void GuiElement::Draw() -{ -} - -/** - * Draw Tooltips on screen. - */ -void GuiElement::DrawTooltip() -{ -} - -/** - * Check if a position is inside the GuiElement. - * @param[in] x X position in pixel. - * @param[in] y Y position in pixel. - */ -bool GuiElement::IsInside(int x, int y) -{ - if (x > this->GetLeft() && x < (this->GetLeft() + width) && y > this->GetTop() && y < (this->GetTop() + height)) return true; - return false; -} -void GuiElement::Lock() -{ - // LWP_MutexLock(mutex); - for (;;) // loop while element is locked by self - { - LWP_MutexLock(_lock_mutex); - - if (_lock_thread == LWP_THREAD_NULL) // element is not locked - { - _lock_thread = LWP_GetSelf(); // mark as locked - _lock_count = 1; // set count of lock to 1 - LWP_MutexUnlock(_lock_mutex); - return; - } - else if (_lock_thread == LWP_GetSelf()) // thread is locked by my self - { - _lock_count++; // inc count of locks; - LWP_MutexUnlock(_lock_mutex); - return; - } - else // otherwise the element is locked by an other thread - { - if (_lock_queue == LWP_TQUEUE_NULL) // no queue - meens it is the first access to the locked element - LWP_InitQueue(&_lock_queue); // init queue - LWP_MutexUnlock(_lock_mutex); - LWP_ThreadSleep(_lock_queue); // and sleep - // try lock again; - } - } -} -void GuiElement::Unlock() -{ - // LWP_MutexUnlock(mutex); - LWP_MutexLock(_lock_mutex); - // only the thread was locked this element, can call unlock - if (_lock_thread == LWP_GetSelf()) // but we check it here safe is safe - { - if (--_lock_count == 0) // dec count of locks and check if it last lock; - { - _lock_thread = LWP_THREAD_NULL; // mark as unlocked - if (_lock_queue != LWP_TQUEUE_NULL) // has a queue - { - LWP_CloseQueue(_lock_queue); // close the queue and wake all waited threads - _lock_queue = LWP_TQUEUE_NULL; - } - } - } - LWP_MutexUnlock(_lock_mutex); -} - -SimpleLock::SimpleLock(GuiElement *e) : - element(e) -{ - element->Lock(); -} -SimpleLock::~SimpleLock() -{ - element->Unlock(); -} diff --git a/source/libwiigui/gui_filebrowser.cpp b/source/libwiigui/gui_filebrowser.cpp deleted file mode 100644 index d2a5e07c..00000000 --- a/source/libwiigui/gui_filebrowser.cpp +++ /dev/null @@ -1,456 +0,0 @@ -/**************************************************************************** - * libwiigui - * - * Tantric 2009 - * - * gui_filebrowser.cpp - * - * GUI class definitions - ***************************************************************************/ - -#include "gui.h" -#include "prompts/filebrowser.h" -#include "settings/CSettings.h" -#include "themes/CTheme.h" - -/** - * Constructor for the GuiFileBrowser class. - */ -GuiFileBrowser::GuiFileBrowser(int w, int h) -{ - width = w; - height = h; - selectedItem = 0; - selectable = true; - listChanged = true; // trigger an initial list update - triggerdisabled = false; // trigger disable - focus = 0; // allow focus - - trigA = new GuiTrigger; - trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - - trigHeldA = new GuiTrigger; - trigHeldA->SetHeldTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - - bgFileSelection = new GuiImageData(Resources::GetFile("bg_browser.png"), Resources::GetFileSize("bg_browser.png")); - bgFileSelectionImg = new GuiImage(bgFileSelection); - bgFileSelectionImg->SetParent(this); - bgFileSelectionImg->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - - bgFileSelectionEntry = Resources::GetImageData("bg_browser_selection.png"); - - fileFolder = Resources::GetImageData("icon_folder.png"); - - scrollbar = Resources::GetImageData("scrollbar.png"); - scrollbarImg = new GuiImage(scrollbar); - scrollbarImg->SetParent(this); - scrollbarImg->SetAlignment(ALIGN_RIGHT, ALIGN_TOP); - scrollbarImg->SetPosition(0, 2); - scrollbarImg->SetSkew(0, 0, 0, 0, 0, -30, 0, -30); - - arrowDown = Resources::GetImageData("scrollbar_arrowdown.png"); - arrowDownImg = new GuiImage(arrowDown); - arrowUp = Resources::GetImageData("scrollbar_arrowup.png"); - arrowUpImg = new GuiImage(arrowUp); - scrollbarBox = Resources::GetImageData("scrollbar_box.png"); - scrollbarBoxImg = new GuiImage(scrollbarBox); - - arrowUpBtn = new GuiButton(arrowUpImg->GetWidth(), arrowUpImg->GetHeight()); - arrowUpBtn->SetParent(this); - arrowUpBtn->SetImage(arrowUpImg); - arrowUpBtn->SetAlignment(ALIGN_RIGHT, ALIGN_TOP); - arrowUpBtn->SetPosition(12, -12); - arrowUpBtn->SetSelectable(false); - arrowUpBtn->SetClickable(false); - arrowUpBtn->SetHoldable(true); - arrowUpBtn->SetTrigger(trigHeldA); - arrowUpBtn->SetSoundOver(btnSoundOver); - arrowUpBtn->SetSoundClick(btnSoundClick); - - arrowDownBtn = new GuiButton(arrowDownImg->GetWidth(), arrowDownImg->GetHeight()); - arrowDownBtn->SetParent(this); - arrowDownBtn->SetImage(arrowDownImg); - arrowDownBtn->SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM); - arrowDownBtn->SetPosition(12, 12); - arrowDownBtn->SetSelectable(false); - arrowDownBtn->SetClickable(false); - arrowDownBtn->SetHoldable(true); - arrowDownBtn->SetTrigger(trigHeldA); - arrowDownBtn->SetSoundOver(btnSoundOver); - arrowDownBtn->SetSoundClick(btnSoundClick); - - scrollbarBoxBtn = new GuiButton(scrollbarBoxImg->GetWidth(), scrollbarBoxImg->GetHeight()); - scrollbarBoxBtn->SetParent(this); - scrollbarBoxBtn->SetImage(scrollbarBoxImg); - scrollbarBoxBtn->SetAlignment(ALIGN_RIGHT, ALIGN_TOP); - scrollbarBoxBtn->SetPosition(-10, 0); - scrollbarBoxBtn->SetMinY(-10); - scrollbarBoxBtn->SetMaxY(156); - scrollbarBoxBtn->SetSelectable(false); - scrollbarBoxBtn->SetClickable(false); - scrollbarBoxBtn->SetHoldable(true); - scrollbarBoxBtn->SetTrigger(trigHeldA); - - for (int i = 0; i < FILEBROWSERSIZE; i++) - { - fileListText[i] = new GuiText((char *) NULL, 20, ( GXColor ) - { 0, 0, 0, 0xff}); - fileListText[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - fileListText[i]->SetPosition(5, 0); - fileListText[i]->SetMaxWidth(bgFileSelectionImg->GetWidth() - (arrowDownImg->GetWidth() + 20), DOTTED); - - fileListTextOver[i] = new GuiText((char *) NULL, 20, ( GXColor ) - { 0, 0, 0, 0xff}); - fileListTextOver[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - fileListTextOver[i]->SetPosition(5, 0); - fileListTextOver[i]->SetMaxWidth(bgFileSelectionImg->GetWidth() - (arrowDownImg->GetWidth() + 20), - SCROLL_HORIZONTAL); - - fileListBg[i] = new GuiImage(bgFileSelectionEntry); - //fileListArchives[i] = new GuiImage(fileArchives); - //fileListDefault[i] = new GuiImage(fileDefault); - fileListFolder[i] = new GuiImage(fileFolder); - //fileListGFX[i] = new GuiImage(fileGFX); - //fileListPLS[i] = new GuiImage(filePLS); - //fileListSFX[i] = new GuiImage(fileSFX); - //fileListTXT[i] = new GuiImage(fileTXT); - //fileListXML[i] = new GuiImage(fileXML); - fileList[i] = new GuiButton(350, 30); - fileList[i]->SetParent(this); - fileList[i]->SetLabel(fileListText[i]); - fileList[i]->SetLabelOver(fileListTextOver[i]); - fileList[i]->SetImageOver(fileListBg[i]); - fileList[i]->SetPosition(2, 30 * i + 3); - fileList[i]->SetTrigger(trigA); - fileList[i]->SetRumble(false); - fileList[i]->SetSoundClick(btnSoundClick); - } -} - -/** - * Destructor for the GuiFileBrowser class. - */ -GuiFileBrowser::~GuiFileBrowser() -{ - delete arrowUpBtn; - delete arrowDownBtn; - delete scrollbarBoxBtn; - - delete bgFileSelectionImg; - delete scrollbarImg; - delete arrowDownImg; - delete arrowUpImg; - delete scrollbarBoxImg; - - delete bgFileSelection; - delete bgFileSelectionEntry; - //delete fileArchives; - //delete fileDefault; - delete fileFolder; - //delete fileGFX; - //delete filePLS; - //delete fileSFX; - //delete fileTXT; - //delete fileXML; - delete scrollbar; - delete arrowDown; - delete arrowUp; - delete scrollbarBox; - - delete trigHeldA; - delete trigA; - - for (int i = 0; i < FILEBROWSERSIZE; i++) - { - delete fileListText[i]; - delete fileListTextOver[i]; - delete fileList[i]; - delete fileListBg[i]; - //delete fileListArchives[i]; - //delete fileListDefault[i]; - delete fileListFolder[i]; - //delete fileListGFX[i]; - //delete fileListPLS[i]; - //delete fileListSFX[i]; - //delete fileListTXT[i]; - //delete fileListXML[i]; - } -} - -void GuiFileBrowser::SetFocus(int f) -{ - LOCK( this ); - focus = f; - - for (int i = 0; i < FILEBROWSERSIZE; i++) - fileList[i]->ResetState(); - - if (f == 1) fileList[selectedItem]->SetState(STATE_SELECTED); -} - -void GuiFileBrowser::DisableTriggerUpdate(bool set) -{ - LOCK( this ); - triggerdisabled = set; -} - -void GuiFileBrowser::ResetState() -{ - LOCK( this ); - state = STATE_DEFAULT; - stateChan = -1; - selectedItem = 0; - - for (int i = 0; i < FILEBROWSERSIZE; i++) - { - fileList[i]->ResetState(); - } -} - -void GuiFileBrowser::TriggerUpdate() -{ - LOCK( this ); - listChanged = true; -} - -/** - * Draw the button on screen - */ -void GuiFileBrowser::Draw() -{ - LOCK( this ); - if (!this->IsVisible()) return; - - bgFileSelectionImg->Draw(); - - for (int i = 0; i < FILEBROWSERSIZE; i++) - { - fileList[i]->Draw(); - } - - scrollbarImg->Draw(); - arrowUpBtn->Draw(); - arrowDownBtn->Draw(); - scrollbarBoxBtn->Draw(); - - this->UpdateEffects(); -} - -void GuiFileBrowser::Update(GuiTrigger * t) -{ - LOCK( this ); - if (state == STATE_DISABLED || !t || triggerdisabled) return; - - int position = 0; - int positionWiimote = 0; - - arrowUpBtn->Update(t); - arrowDownBtn->Update(t); - scrollbarBoxBtn->Update(t); - - // move the file listing to respond to wiimote cursor movement - if (scrollbarBoxBtn->GetState() == STATE_HELD && scrollbarBoxBtn->GetStateChan() == t->chan && t->wpad.ir.valid - && browser->browserList.size() > FILEBROWSERSIZE) - { - scrollbarBoxBtn->SetPosition(20, -10); - positionWiimote = t->wpad.ir.y - 60 - scrollbarBoxBtn->GetTop(); - - if (positionWiimote < scrollbarBoxBtn->GetMinY()) - positionWiimote = scrollbarBoxBtn->GetMinY(); - else if (positionWiimote > scrollbarBoxBtn->GetMaxY()) positionWiimote = scrollbarBoxBtn->GetMaxY(); - - browser->pageIndex = (positionWiimote * browser->browserList.size()) / 136.0 - selectedItem; - - if (browser->pageIndex <= 0) - { - browser->pageIndex = 0; - } - else if (browser->pageIndex + FILEBROWSERSIZE >= (int) browser->browserList.size()) - { - browser->pageIndex = browser->browserList.size() - FILEBROWSERSIZE; - } - listChanged = true; - focus = false; - - } - - if (arrowDownBtn->GetState() == STATE_HELD && arrowDownBtn->GetStateChan() == t->chan) - { - t->wpad.btns_h |= WPAD_BUTTON_DOWN; - if (!this->IsFocused()) ((GuiWindow *) this->GetParent())->ChangeFocus(this); - - } - else if (arrowUpBtn->GetState() == STATE_HELD && arrowUpBtn->GetStateChan() == t->chan) - { - t->wpad.btns_h |= WPAD_BUTTON_UP; - if (!this->IsFocused()) ((GuiWindow *) this->GetParent())->ChangeFocus(this); - - } - - /* // pad/joystick navigation - if(!focus) - { - goto endNavigation; // skip navigation - listChanged = false; - } - */ - if (t->Right()) - { - if (browser->pageIndex < (int) browser->browserList.size() && browser->browserList.size() > FILEBROWSERSIZE) - { - browser->pageIndex += FILEBROWSERSIZE; - if (browser->pageIndex + FILEBROWSERSIZE >= (int) browser->browserList.size()) browser->pageIndex - = browser->browserList.size() - FILEBROWSERSIZE; - listChanged = true; - } - } - else if (t->Left()) - { - if (browser->pageIndex > 0) - { - browser->pageIndex -= FILEBROWSERSIZE; - if (browser->pageIndex < 0) browser->pageIndex = 0; - listChanged = true; - } - } - else if (t->Down()) - { - if (browser->pageIndex + selectedItem + 1 < (int) browser->browserList.size()) - { - if (selectedItem == FILEBROWSERSIZE - 1) - { - // move list down by 1 - browser->pageIndex++; - listChanged = true; - } - else if (fileList[selectedItem + 1]->IsVisible()) - { - fileList[selectedItem]->ResetState(); - fileList[++selectedItem]->SetState(STATE_SELECTED, t->chan); - } - } - } - else if (t->Up()) - { - if (selectedItem == 0 && browser->pageIndex + selectedItem > 0) - { - // move list up by 1 - browser->pageIndex--; - listChanged = true; - } - else if (selectedItem > 0) - { - fileList[selectedItem]->ResetState(); - fileList[--selectedItem]->SetState(STATE_SELECTED, t->chan); - } - } - - //endNavigation: - - for (int i = 0; i < FILEBROWSERSIZE; i++) - { - if (listChanged) - { - bool haveselected = false; - if (browser->pageIndex + i < (int) browser->browserList.size()) - { - if (fileList[i]->GetState() == STATE_DISABLED) fileList[i]->SetState(STATE_DEFAULT); - - if (fileList[i]->GetState() == STATE_SELECTED) haveselected = true; - - fileList[i]->SetVisible(true); - - fileListText[i]->SetText(browser->browserList[browser->pageIndex + i].displayname); - fileListTextOver[i]->SetText(browser->browserList[browser->pageIndex + i].displayname); - - if (browser->browserList[browser->pageIndex + i].isdir) // directory - { - fileList[i]->SetIcon(fileListFolder[i]); - fileListText[i]->SetPosition(30, 0); - fileListTextOver[i]->SetPosition(30, 0); - } - else - { - /* - char *fileext = strrchr(browserList[browser.pageIndex+i].displayname, '.'); - fileListText[i]->SetPosition(32,0); - fileListTextOver[i]->SetPosition(32,0); - if(fileext) - { - if(!strcasecmp(fileext, ".png") || !strcasecmp(fileext, ".jpg") || !strcasecmp(fileext, ".jpeg") || - !strcasecmp(fileext, ".gif") || !strcasecmp(fileext, ".tga") || !strcasecmp(fileext, ".tpl") || - !strcasecmp(fileext, ".bmp")) { - fileList[i]->SetIcon(fileListGFX[i]); - } else if(!strcasecmp(fileext, ".mp3") || !strcasecmp(fileext, ".ogg") || !strcasecmp(fileext, ".flac") || - !strcasecmp(fileext, ".mpc") || !strcasecmp(fileext, ".m4a") || !strcasecmp(fileext, ".wav")) { - fileList[i]->SetIcon(fileListSFX[i]); - } else if(!strcasecmp(fileext, ".pls") || !strcasecmp(fileext, ".m3u")) { - fileList[i]->SetIcon(fileListPLS[i]); - } else if(!strcasecmp(fileext, ".txt")) { - fileList[i]->SetIcon(fileListTXT[i]); - } else if(!strcasecmp(fileext, ".xml")) { - fileList[i]->SetIcon(fileListXML[i]); - } else if(!strcasecmp(fileext, ".rar") || !strcasecmp(fileext, ".zip") || - !strcasecmp(fileext, ".gz") || !strcasecmp(fileext, ".7z")) { - fileList[i]->SetIcon(fileListArchives[i]); - } else { - fileList[i]->SetIcon(fileListDefault[i]); - } - } else { - fileList[i]->SetIcon(fileListDefault[i]); - } - */ - fileList[i]->SetIcon(NULL); - fileListText[i]->SetPosition(10, 0); - fileListTextOver[i]->SetPosition(10, 0); - } - } - else - { - fileList[i]->SetVisible(false); - fileList[i]->SetState(STATE_DISABLED); - } - if (!haveselected && browser->pageIndex < (int) browser->browserList.size()) fileList[i]->SetState( - STATE_SELECTED, t->chan); - - } - - if (i != selectedItem && fileList[i]->GetState() == STATE_SELECTED) - fileList[i]->ResetState(); - else if (focus && i == selectedItem && fileList[i]->GetState() == STATE_DEFAULT) fileList[selectedItem]->SetState( - STATE_SELECTED, t->chan); - - int currChan = t->chan; - - if (t->wpad.ir.valid && !fileList[i]->IsInside(t->wpad.ir.x, t->wpad.ir.y)) t->chan = -1; - - fileList[i]->Update(t); - t->chan = currChan; - - if (fileList[i]->GetState() == STATE_SELECTED) - { - selectedItem = i; - } - } - - // update the location of the scroll box based on the position in the file list - if (positionWiimote > 0) - { - position = positionWiimote; // follow wiimote cursor - } - else - { - position = 136 * (browser->pageIndex + FILEBROWSERSIZE / 2.0) / (browser->browserList.size() * 1.0); - - if (browser->pageIndex / (FILEBROWSERSIZE / 2.0) < 1) - position = -10; - else if ((browser->pageIndex + FILEBROWSERSIZE) / (FILEBROWSERSIZE * 1.0) >= (browser->browserList.size()) - / (FILEBROWSERSIZE * 1.0)) position = 156; - } - - scrollbarBoxBtn->SetPosition(12, position + 26); - - listChanged = false; - - if (updateCB) updateCB(this); -} diff --git a/source/libwiigui/gui_gamebrowser.cpp b/source/libwiigui/gui_gamebrowser.cpp deleted file mode 100644 index 95112b71..00000000 --- a/source/libwiigui/gui_gamebrowser.cpp +++ /dev/null @@ -1,619 +0,0 @@ -/**************************************************************************** - * libwiigui - * - * gui_gamebrowser.cpp - * - * GUI class definitions - ***************************************************************************/ - -#include "gui.h" -#include "../wpad.h" - -#include -#include "gui_gamebrowser.h" -#include "../settings/CSettings.h" -#include "../main.h" -#include "settings/newtitles.h" -#include "settings/GameTitles.h" -#include "usbloader/GameList.h" -#include "themes/CTheme.h" -#include "menu.h" - -#include -#include - -#define GAMESELECTSIZE 30 -int txtscroll = 0; -/** - * Constructor for the GuiGameBrowser class. - */ -GuiGameBrowser::GuiGameBrowser(int w, int h, int selectedGame) -{ - width = w; - height = h; - pagesize = thInt("9 - game list browser page size"); - scrollbaron = (gameList.size() > pagesize) ? 1 : 0; - selectable = true; - listOffset = selectedGame - (selectedGame % pagesize); - selectedItem = selectedGame - listOffset; - focus = 1; // allow focus - - trigA = new GuiTrigger; - trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - trigHeldA = new GuiTrigger; - trigHeldA->SetHeldTrigger(-1, WPAD_BUTTON_A, PAD_BUTTON_A); - - bgGames = Resources::GetImageData("bg_options.png"); - newGames = Resources::GetImageData("new.png"); - - bgGameImg = new GuiImage(bgGames); - bgGameImg->SetParent(this); - bgGameImg->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - - maxTextWidth = bgGameImg->GetWidth() - 24 - 4; - - bgGamesEntry = Resources::GetImageData("bg_options_entry.png"); - - scrollbar = Resources::GetImageData("scrollbar.png"); - scrollbarImg = new GuiImage(scrollbar); - scrollbarImg->SetParent(this); - scrollbarImg->SetAlignment(ALIGN_RIGHT, ALIGN_TOP); - scrollbarImg->SetPosition(0, 4); - - maxTextWidth -= scrollbarImg->GetWidth() + 4; - - arrowDown = Resources::GetImageData("scrollbar_arrowdown.png"); - arrowDownImg = new GuiImage(arrowDown); - arrowDownOver = Resources::GetImageData("scrollbar_arrowdown.png"); - arrowDownOverImg = new GuiImage(arrowDownOver); - arrowUp = Resources::GetImageData("scrollbar_arrowup.png"); - arrowUpImg = new GuiImage(arrowUp); - arrowUpOver = Resources::GetImageData("scrollbar_arrowup.png"); - arrowUpOverImg = new GuiImage(arrowUpOver); - scrollbarBox = Resources::GetImageData("scrollbar_box.png"); - scrollbarBoxImg = new GuiImage(scrollbarBox); - scrollbarBoxOver = Resources::GetImageData("scrollbar_box.png"); - scrollbarBoxOverImg = new GuiImage(scrollbarBoxOver); - - arrowUpBtn = new GuiButton(arrowUpImg->GetWidth(), arrowUpImg->GetHeight()); - arrowUpBtn->SetParent(this); - arrowUpBtn->SetImage(arrowUpImg); - arrowUpBtn->SetImageOver(arrowUpOverImg); - arrowUpBtn->SetImageHold(arrowUpOverImg); - arrowUpBtn->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - arrowUpBtn->SetPosition(width / 2 - 18 + 7, -18); - arrowUpBtn->SetSelectable(false); - arrowUpBtn->SetTrigger(trigA); - arrowUpBtn->SetEffectOnOver(EFFECT_SCALE, 50, 130); - arrowUpBtn->SetSoundClick(btnSoundClick); - - arrowDownBtn = new GuiButton(arrowDownImg->GetWidth(), arrowDownImg->GetHeight()); - arrowDownBtn->SetParent(this); - arrowDownBtn->SetImage(arrowDownImg); - arrowDownBtn->SetImageOver(arrowDownOverImg); - arrowDownBtn->SetImageHold(arrowDownOverImg); - arrowDownBtn->SetAlignment(ALIGN_CENTRE, ALIGN_BOTTOM); - arrowDownBtn->SetPosition(width / 2 - 18 + 7, 18); - arrowDownBtn->SetSelectable(false); - arrowDownBtn->SetTrigger(trigA); - arrowDownBtn->SetEffectOnOver(EFFECT_SCALE, 50, 130); - arrowDownBtn->SetSoundClick(btnSoundClick); - - scrollbarBoxBtn = new GuiButton(scrollbarBoxImg->GetWidth(), scrollbarBoxImg->GetHeight()); - scrollbarBoxBtn->SetParent(this); - scrollbarBoxBtn->SetImage(scrollbarBoxImg); - scrollbarBoxBtn->SetImageOver(scrollbarBoxOverImg); - scrollbarBoxBtn->SetImageHold(scrollbarBoxOverImg); - scrollbarBoxBtn->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - scrollbarBoxBtn->SetSelectable(false); - scrollbarBoxBtn->SetEffectOnOver(EFFECT_SCALE, 50, 120); - scrollbarBoxBtn->SetMinY(0); - scrollbarBoxBtn->SetMaxY(height - 30); - scrollbarBoxBtn->SetHoldable(true); - scrollbarBoxBtn->SetTrigger(trigHeldA); - - gameIndex = new int[pagesize]; - game = new GuiButton *[pagesize]; - gameTxt = new GuiText *[pagesize]; - gameTxtOver = new GuiText *[pagesize]; - gameBg = new GuiImage *[pagesize]; - newImg = new GuiImage *[pagesize]; - - for (int i = 0; i < pagesize; i++) - { - gameTxt[i] = new GuiText(GameTitles.GetTitle(gameList[i]), 20, thColor("r=0 g=0 b=0 a=255 - game browser list text color")); - gameTxt[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - gameTxt[i]->SetPosition(24, 0); - gameTxt[i]->SetMaxWidth(maxTextWidth, DOTTED); - - gameTxtOver[i] = new GuiText(GameTitles.GetTitle(gameList[i]), 20, thColor("r=0 g=0 b=0 a=255 - game browser list text color over")); - gameTxtOver[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - gameTxtOver[i]->SetPosition(24, 0); - gameTxtOver[i]->SetMaxWidth(maxTextWidth, SCROLL_HORIZONTAL); - - gameBg[i] = new GuiImage(bgGamesEntry); - - newImg[i] = new GuiImage(newGames); - newImg[i]->SetAlignment(ALIGN_RIGHT, ALIGN_MIDDLE); - newImg[i]->SetVisible(false); - - game[i] = new GuiButton(width - 28, GAMESELECTSIZE); - game[i]->SetParent(this); - game[i]->SetLabel(gameTxt[i]); - game[i]->SetLabelOver(gameTxtOver[i]); - game[i]->SetIcon(newImg[i]); - game[i]->SetImageOver(gameBg[i]); - game[i]->SetPosition(5, GAMESELECTSIZE * i + 4); - game[i]->SetRumble(false); - game[i]->SetTrigger(trigA); - game[i]->SetSoundClick(btnSoundClick); - - gameIndex[i] = i; - } - UpdateListEntries(); -} - -/** - * Destructor for the GuiGameBrowser class. - */ -GuiGameBrowser::~GuiGameBrowser() -{ - delete arrowUpBtn; - delete arrowDownBtn; - delete scrollbarBoxBtn; - delete scrollbarImg; - delete arrowDownImg; - delete arrowDownOverImg; - delete arrowUpImg; - delete arrowUpOverImg; - delete scrollbarBoxImg; - delete scrollbarBoxOverImg; - delete scrollbar; - delete arrowDown; - delete arrowDownOver; - delete arrowUp; - delete arrowUpOver; - delete scrollbarBox; - delete scrollbarBoxOver; - delete bgGameImg; - delete bgGames; - delete bgGamesEntry; - delete newGames; - - delete trigA; - delete trigHeldA; - - for (int i = 0; i < pagesize; i++) - { - delete gameTxt[i]; - delete gameTxtOver[i]; - delete gameBg[i]; - delete game[i]; - delete newImg[i]; - } - delete[] gameIndex; - delete[] game; - delete[] gameTxt; - delete[] gameTxtOver; - delete[] gameBg; -} - -void GuiGameBrowser::SetFocus(int f) -{ - LOCK( this ); - if (!gameList.size()) return; - - focus = f; - - for (int i = 0; i < pagesize; i++) - game[i]->ResetState(); - - if (f == 1) game[selectedItem]->SetState(STATE_SELECTED); -} - -void GuiGameBrowser::ResetState() -{ - LOCK( this ); - if (state != STATE_DISABLED) - { - state = STATE_DEFAULT; - stateChan = -1; - } - - for (int i = 0; i < pagesize; i++) - { - game[i]->ResetState(); - } -} - -int GuiGameBrowser::GetOffset() -{ - return listOffset; -} -int GuiGameBrowser::GetClickedOption() -{ - int found = -1; - for (int i = 0; i < pagesize; i++) - { - if (game[i]->GetState() == STATE_CLICKED) - { - game[i]->SetState(STATE_SELECTED); - found = gameIndex[i]; - break; - } - } - return found; -} - -int GuiGameBrowser::GetSelectedOption() -{ - int found = -1; - for (int i = 0; i < pagesize; i++) - { - if (game[i]->GetState() == STATE_SELECTED) - { - game[i]->SetState(STATE_SELECTED); - found = gameIndex[i]; - break; - } - } - return found; -} - -/**************************************************************************** - * FindMenuItem - * - * Help function to find the next visible menu item on the list - ***************************************************************************/ - -int GuiGameBrowser::FindMenuItem(int currentItem, int direction) -{ - int nextItem = currentItem + direction; - - if (nextItem < 0 || nextItem >= gameList.size()) return -1; - - if (strlen(GameTitles.GetTitle(gameList[nextItem])) > 0) - return nextItem; - - return FindMenuItem(nextItem, direction); -} - -/** - * Draw the button on screen - */ -void GuiGameBrowser::Draw() -{ - LOCK( this ); - if (!this->IsVisible() || !gameList.size()) return; - - bgGameImg->Draw(); - - int next = listOffset; - - for (int i = 0; i < pagesize; i++) - { - if (next >= 0) - { - game[i]->Draw(); - next = this->FindMenuItem(next, 1); - } - else break; - } - - if (scrollbaron == 1) - { - scrollbarImg->Draw(); - arrowUpBtn->Draw(); - arrowDownBtn->Draw(); - scrollbarBoxBtn->Draw(); - } - this->UpdateEffects(); -} - -void GuiGameBrowser::UpdateListEntries() -{ - int next = listOffset; - for (int i = 0; i < pagesize; i++) - { - if (next >= 0) - { - if (game[i]->GetState() == STATE_DISABLED) - { - game[i]->SetVisible(true); - game[i]->SetState(STATE_DEFAULT); - } - gameTxt[i]->SetText(GameTitles.GetTitle(gameList[next])); - gameTxt[i]->SetPosition(24, 0); - gameTxtOver[i]->SetText(GameTitles.GetTitle(gameList[next])); - gameTxtOver[i]->SetPosition(24, 0); - - if (Settings.marknewtitles) - { - bool isNew = NewTitles::Instance()->IsNew(gameList[next]->id); - if (isNew) - { - gameTxt[i]->SetMaxWidth(maxTextWidth - (newGames->GetWidth() + 1), DOTTED); - gameTxtOver[i]->SetMaxWidth(maxTextWidth - (newGames->GetWidth() + 1), SCROLL_HORIZONTAL); - } - else - { - gameTxt[i]->SetMaxWidth(maxTextWidth, DOTTED); - gameTxtOver[i]->SetMaxWidth(maxTextWidth, SCROLL_HORIZONTAL); - } - newImg[i]->SetVisible(isNew); - } - - gameIndex[i] = next; - next = this->FindMenuItem(next, 1); - } - else - { - game[i]->SetVisible(false); - game[i]->SetState(STATE_DISABLED); - } - } -} - -void GuiGameBrowser::Update(GuiTrigger * t) -{ - LOCK( this ); - if (state == STATE_DISABLED || !t || !gameList.size()) return; - - int next, prev; - int old_listOffset = listOffset; - static int position2; - // scrolldelay affects how fast the list scrolls - // when the arrows are clicked - float scrolldelay = 3.5; - - if (scrollbaron == 1) - { - // update the location of the scroll box based on the position in the option list - arrowUpBtn->Update(t); - arrowDownBtn->Update(t); - scrollbarBoxBtn->Update(t); - } - - next = listOffset; - - u32 buttonshold = ButtonsHold(); - - if (buttonshold != WPAD_BUTTON_UP && buttonshold != WPAD_BUTTON_DOWN) - { - - for (int i = 0; i < pagesize; i++) - { - if (next >= 0) next = this->FindMenuItem(next, 1); - - if (focus) - { - if (i != selectedItem && game[i]->GetState() == STATE_SELECTED) - game[i]->ResetState(); - else if (i == selectedItem && game[i]->GetState() == STATE_DEFAULT) game[selectedItem]->SetState( - STATE_SELECTED, t->chan); - } - - game[i]->Update(t); - - if (game[i]->GetState() == STATE_SELECTED) - { - selectedItem = i; - } - } - } - - // pad and joystick navigation - if (!focus || !gameList.size()) return; // skip navigation - - if (scrollbaron == 1) - { - - if (t->Down() || arrowDownBtn->GetState() == STATE_CLICKED || arrowDownBtn->GetState() == STATE_HELD) //down - { - - next = this->FindMenuItem(gameIndex[selectedItem], 1); - - if (next >= 0) - { - if (selectedItem == pagesize - 1) - { - // move list down by 1 - listOffset = this->FindMenuItem(listOffset, 1); - } - else if (game[selectedItem + 1]->IsVisible()) - { - game[selectedItem]->ResetState(); - game[selectedItem + 1]->SetState(STATE_SELECTED, t->chan); - selectedItem++; - } - // scrollbarBoxBtn->Draw(); - usleep(10000 * scrolldelay); - } - if (!(ButtonsHold() & WPAD_BUTTON_A)) arrowDownBtn->ResetState(); - } - else if (t->Up() || arrowUpBtn->GetState() == STATE_CLICKED || arrowUpBtn->GetState() == STATE_HELD) //up - { - prev = this->FindMenuItem(gameIndex[selectedItem], -1); - - if (prev >= 0) - { - if (selectedItem == 0) - { - // move list up by 1 - listOffset = prev; - } - else - { - game[selectedItem]->ResetState(); - game[selectedItem - 1]->SetState(STATE_SELECTED, t->chan); - selectedItem--; - } - // scrollbarBoxBtn->Draw(); - usleep(10000 * scrolldelay); - } - if (!(ButtonsHold() & WPAD_BUTTON_A)) arrowUpBtn->ResetState(); - } - int position1 = t->wpad.ir.y; - - if (position2 == 0 && position1 > 0) - { - position2 = position1; - } - - if ((buttonshold & WPAD_BUTTON_B) && position1 > 0) - { - scrollbarBoxBtn->ScrollIsOn(1); - if (position2 > position1) - { - - prev = this->FindMenuItem(gameIndex[selectedItem], -1); - - if (prev >= 0) - { - if (selectedItem == 0) - { - // move list up by 1 - listOffset = prev; - } - else - { - game[selectedItem]->ResetState(); - game[selectedItem - 1]->SetState(STATE_SELECTED, t->chan); - selectedItem--; - } - // scrollbarBoxBtn->Draw(); - usleep(10000 * scrolldelay); - } - } - else if (position2 < position1) - { - next = this->FindMenuItem(gameIndex[selectedItem], 1); - - if (next >= 0) - { - if (selectedItem == pagesize - 1) - { - // move list down by 1 - listOffset = this->FindMenuItem(listOffset, 1); - } - else if (game[selectedItem + 1]->IsVisible()) - { - game[selectedItem]->ResetState(); - game[selectedItem + 1]->SetState(STATE_SELECTED, t->chan); - selectedItem++; - } - // scrollbarBoxBtn->Draw(); - usleep(10000 * scrolldelay); - } - } - - } - else if (!(buttonshold & WPAD_BUTTON_B)) - { - scrollbarBoxBtn->ScrollIsOn(0); - position2 = 0; - } - - if (scrollbarBoxBtn->GetState() == STATE_HELD && scrollbarBoxBtn->GetStateChan() == t->chan && t->wpad.ir.valid - && gameList.size() > pagesize) - { - // allow dragging of scrollbar box - scrollbarBoxBtn->SetPosition(width / 2 - 18 + 7, 0); - int position = t->wpad.ir.y - 32 - scrollbarBoxBtn->GetTop(); - - listOffset = (position * gameList.size()) / (25.2 * pagesize) - selectedItem; - - if (listOffset <= 0) - { - listOffset = 0; - selectedItem = 0; - } - else if (listOffset + pagesize >= gameList.size()) - { - listOffset = gameList.size() - pagesize; - selectedItem = pagesize - 1; - } - - } - int positionbar = (25.2 * pagesize) * (listOffset + selectedItem) / gameList.size(); - - if (positionbar > (24 * pagesize)) positionbar = (24 * pagesize); - scrollbarBoxBtn->SetPosition(width / 2 - 18 + 7, positionbar + 8); - - if (t->Right()) //skip pagesize # of games if right is pressed - { - if (listOffset < gameList.size() && gameList.size() > pagesize) - { - listOffset = listOffset + pagesize; - if (listOffset + pagesize >= gameList.size()) listOffset = gameList.size() - pagesize; - } - } - else if (t->Left()) - { - if (listOffset > 0) - { - listOffset = listOffset - pagesize; - if (listOffset < 0) listOffset = 0; - } - } - - } - else - { - if (t->Down()) //if there isn't a scrollbar and down is pressed - { - next = this->FindMenuItem(gameIndex[selectedItem], 1); - - if (next >= 0) - { - if (selectedItem == pagesize - 1) - { - // move list down by 1 - listOffset = this->FindMenuItem(listOffset, 1); - } - else if (game[selectedItem + 1]->IsVisible()) - { - game[selectedItem]->ResetState(); - game[selectedItem + 1]->SetState(STATE_SELECTED, t->chan); - selectedItem++; - } - } - } - else if (t->Up()) //up - { - prev = this->FindMenuItem(gameIndex[selectedItem], -1); - - if (prev >= 0) - { - if (selectedItem == 0) - { - // move list up by 1 - listOffset = prev; - } - else - { - game[selectedItem]->ResetState(); - game[selectedItem - 1]->SetState(STATE_SELECTED, t->chan); - selectedItem--; - } - } - } - } - - if (old_listOffset != listOffset) UpdateListEntries(); - - if (updateCB) updateCB(this); -} - -void GuiGameBrowser::Reload() -{ - LOCK( this ); - scrollbaron = (gameList.size() > pagesize) ? 1 : 0; - selectedItem = 0; - listOffset = 0; - focus = 1; - UpdateListEntries(); - - for (int i = 0; i < pagesize; i++) - game[i]->ResetState(); -} diff --git a/source/libwiigui/gui_gamebrowser.h b/source/libwiigui/gui_gamebrowser.h deleted file mode 100644 index f685033a..00000000 --- a/source/libwiigui/gui_gamebrowser.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef _GUIGAMEBROWSER_H_ -#define _GUIGAMEBROWSER_H_ - -#include "gui.h" -#include "../usbloader/disc.h" - -class GuiGameBrowser: public GuiElement -{ - public: - GuiGameBrowser(int w, int h, int selectedGame = 0); - ~GuiGameBrowser(); - int FindMenuItem(int c, int d); - int GetClickedOption(); - int GetSelectedOption(); - void ResetState(); - void SetFocus(int f); - void Draw(); - void Update(GuiTrigger * t); - int GetOffset(); - void Reload(); - //GuiText * optionVal[PAGESIZE]; - protected: - void UpdateListEntries(); - int selectedItem; - int listOffset; - int scrollbaron; - int pagesize; - int maxTextWidth; - - int * gameIndex; - GuiButton ** game; - GuiText ** gameTxt; - GuiText ** gameTxtOver; - GuiImage ** gameBg; - GuiImage ** newImg; - - GuiButton * arrowUpBtn; - GuiButton * arrowDownBtn; - GuiButton * scrollbarBoxBtn; - - GuiImage * bgGameImg; - GuiImage * scrollbarImg; - GuiImage * arrowDownImg; - GuiImage * arrowDownOverImg; - GuiImage * arrowUpImg; - GuiImage * arrowUpOverImg; - GuiImage * scrollbarBoxImg; - GuiImage * scrollbarBoxOverImg; - - GuiImageData * bgGames; - GuiImageData * bgGamesEntry; - GuiImageData * newGames; - GuiImageData * scrollbar; - GuiImageData * arrowDown; - GuiImageData * arrowDownOver; - GuiImageData * arrowUp; - GuiImageData * arrowUpOver; - GuiImageData * scrollbarBox; - GuiImageData * scrollbarBoxOver; - - GuiTrigger * trigA; - GuiTrigger * trigHeldA; -}; -#endif diff --git a/source/libwiigui/gui_gamecarousel.cpp b/source/libwiigui/gui_gamecarousel.cpp deleted file mode 100644 index 1b895812..00000000 --- a/source/libwiigui/gui_gamecarousel.cpp +++ /dev/null @@ -1,434 +0,0 @@ -/**************************************************************************** - * libwiigui - * - * gui_gamecarousel.cpp - * - * GUI class definitions - ***************************************************************************/ - -#include "gui.h" -#include "wpad.h" -#include "menu.h" - -#include -#include "gui_image_async.h" -#include "gui_gamecarousel.h" -#include "usbloader/GameList.h" -#include "settings/GameTitles.h" -#include "settings/CSettings.h" -#include "libwiigui/LoadCoverImage.h" -#include "themes/CTheme.h" -#include "main.h" - -#include -#include -#include - -#define SCALE 0.8f -#define DEG_OFFSET 7 -#define RADIUS 780 -#define IN_SPEED 175 -#define SHIFT_SPEED 75 -#define SPEED_STEP 4 -#define SPEED_LIMIT 250 - -static inline int OFFSETLIMIT(int Offset, int gameCnt) -{ - while (Offset < 0) - Offset += gameCnt; - return Offset % gameCnt; -} -#define GetGameIndex(pageEntry, listOffset, gameCnt) OFFSETLIMIT(listOffset+pageEntry, gameCnt) -static GuiImageData *GameCarouselLoadCoverImage(void * Arg) -{ - return LoadCoverImage((struct discHdr *) Arg, true, false); -} -/** - * Constructor for the GuiGameCarousel class. - */ -GuiGameCarousel::GuiGameCarousel(int w, int h, const char *themePath, int selectedGame) : - noCover(Resources::GetFile("nocover.png"), Resources::GetFileSize("nocover.png")) -{ - width = w; - height = h; - pagesize = (gameList.size() < 11) ? gameList.size() : 11; - listOffset = (selectedGame >= 0 && selectedGame < gameList.size()) ? selectedGame : 0; - selectable = true; - selectedItem = -1; - focus = 1; // allow focus - clickedItem = -1; - - speed = 0; - - trigA = new GuiTrigger; - trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - trigL = new GuiTrigger; - trigL->SetButtonOnlyTrigger(-1, WPAD_BUTTON_LEFT | WPAD_CLASSIC_BUTTON_LEFT, PAD_BUTTON_LEFT); - trigR = new GuiTrigger; - trigR->SetButtonOnlyTrigger(-1, WPAD_BUTTON_RIGHT | WPAD_CLASSIC_BUTTON_RIGHT, PAD_BUTTON_RIGHT); - trigPlus = new GuiTrigger; - trigPlus->SetButtonOnlyTrigger(-1, WPAD_BUTTON_PLUS | WPAD_CLASSIC_BUTTON_PLUS, 0); - trigMinus = new GuiTrigger; - trigMinus->SetButtonOnlyTrigger(-1, WPAD_BUTTON_MINUS | WPAD_CLASSIC_BUTTON_MINUS, 0); - - imgLeft = Resources::GetImageData("startgame_arrow_left.png"); - imgRight = Resources::GetImageData("startgame_arrow_right.png"); - - btnLeftImg = new GuiImage(imgLeft); - if (Settings.wsprompt == ON) btnLeftImg->SetWidescreen(Settings.widescreen); - btnLeft = new GuiButton(imgLeft->GetWidth(), imgLeft->GetHeight()); - btnLeft->SetAlignment(thAlign("left - carousel layout left arrow align hor"), thAlign("top - carousel layout left arrow align ver")); - btnLeft->SetPosition(thInt("20 - carousel layout left arrow pos x"), thInt("65 - carousel layout left arrow pos y")); - btnLeft->SetParent(this); - btnLeft->SetImage(btnLeftImg); - btnLeft->SetSoundOver(btnSoundOver); - btnLeft->SetTrigger(trigA); - btnLeft->SetTrigger(trigL); - btnLeft->SetTrigger(trigMinus); - btnLeft->SetEffectGrow(); - - btnRightImg = new GuiImage(imgRight); - if (Settings.wsprompt == ON) btnRightImg->SetWidescreen(Settings.widescreen); - btnRight = new GuiButton(imgRight->GetWidth(), imgRight->GetHeight()); - btnRight->SetParent(this); - btnRight->SetAlignment(thAlign("right - carousel layout right arrow align hor"), thAlign("top - carousel layout right arrow align ver")); - btnRight->SetPosition(thInt("-20 - carousel layout right arrow pos x"), thInt("65 - carousel layout right arrow pos y")); - btnRight->SetImage(btnRightImg); - btnRight->SetSoundOver(btnSoundOver); - btnRight->SetTrigger(trigA); - btnRight->SetTrigger(trigR); - btnRight->SetTrigger(trigPlus); - btnRight->SetEffectGrow(); - - gamename = new GuiText(" ", 18, thColor("r=55 g=190 b=237 a=255 - carousel game name text color")); - gamename->SetParent(this); - gamename->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - gamename->SetPosition(0, 330); - gamename->SetMaxWidth(280, DOTTED); - - gameIndex = new int[pagesize]; - game.resize(pagesize); - coverImg.resize(pagesize); - - for (int i = 0; i < pagesize; i++) - { - //------------------------ - // Index - //------------------------ - gameIndex[i] = GetGameIndex( i, listOffset, gameList.size() ); - - //------------------------ - // Image - //------------------------ - coverImg[i] = new (std::nothrow) GuiImageAsync(GameCarouselLoadCoverImage, gameList[gameIndex[i]], - sizeof(struct discHdr), &noCover); - if (coverImg[i]) coverImg[i]->SetWidescreen(Settings.widescreen); - - //------------------------ - // GameButton - //------------------------ - - game[i] = new GuiButton(122, 244); - game[i]->SetParent(this); - game[i]->SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - game[i]->SetPosition(0, 740); - game[i]->SetImage(coverImg[i]); - game[i]->SetScale(SCALE); - game[i]->SetRumble(false); - game[i]->SetTrigger(trigA); - game[i]->SetSoundClick(btnSoundClick); - game[i]->SetClickable(true); - game[i]->SetEffect(EFFECT_GOROUND, IN_SPEED, 90 - (pagesize - 2 * i - 1) * DEG_OFFSET / 2, RADIUS, 180, 1, 0, - RADIUS); - } -} - -/** - * Destructor for the GuiGameCarousel class. - */ -GuiGameCarousel::~GuiGameCarousel() -{ - delete imgRight; - delete imgLeft; - delete btnLeftImg; - delete btnRightImg; - delete btnRight; - delete btnLeft; - - delete trigA; - delete trigL; - delete trigR; - delete trigPlus; - delete trigMinus; - delete gamename; - - GuiImageAsync::ClearQueue(); - - for (u32 i = 0; i < game.size(); ++i) - delete coverImg[i]; - for (u32 i = 0; i < game.size(); ++i) - delete game[i]; - - delete[] gameIndex; - -} - -void GuiGameCarousel::SetFocus(int f) -{ - LOCK( this ); - if (!gameList.size()) return; - - focus = f; - - for (int i = 0; i < pagesize; i++) - game[i]->ResetState(); - - if (f == 1 && selectedItem >= 0) game[selectedItem]->SetState(STATE_SELECTED); -} - -void GuiGameCarousel::ResetState() -{ - LOCK( this ); - if (state != STATE_DISABLED) - { - state = STATE_DEFAULT; - stateChan = -1; - } - - for (int i = 0; i < pagesize; i++) - { - game[i]->ResetState(); - } -} - -int GuiGameCarousel::GetOffset() -{ - LOCK( this ); - return listOffset; -} - -int GuiGameCarousel::GetClickedOption() -{ - LOCK( this ); - int found = -1; - if (clickedItem >= 0) - { - game[clickedItem]->SetState(STATE_SELECTED); - found = gameIndex[clickedItem]; - clickedItem = -1; - } - return found; -} - -int GuiGameCarousel::GetSelectedOption() -{ - LOCK( this ); - int found = -1; - for (int i = 0; i < pagesize; i++) - { - if (game[i]->GetState() == STATE_SELECTED) - { - game[i]->SetState(STATE_SELECTED); - found = gameIndex[i]; - break; - } - } - return found; -} - -/** - * Draw the button on screen - */ -void GuiGameCarousel::Draw() -{ - LOCK( this ); - if (!this->IsVisible() || !gameList.size()) return; - - for (int i = 0; i < pagesize; i++) - game[i]->Draw(); - - gamename->Draw(); - - if (gameList.size() > 6) - { - btnRight->Draw(); - btnLeft->Draw(); - } - - //!Draw tooltip after the Images to have it on top - if (focus && Settings.tooltips == ON) for (int i = 0; i < pagesize; i++) - game[i]->DrawTooltip(); - - this->UpdateEffects(); -} - -void GuiGameCarousel::Update(GuiTrigger * t) -{ - LOCK( this ); - if (state == STATE_DISABLED || !t || !gameList.size() || !pagesize) return; - - btnRight->Update(t); - btnLeft->Update(t); - - if (game[0]->GetEffect() & EFFECT_GOROUND || game[pagesize - 1]->GetEffect() & EFFECT_GOROUND) - { - return; // skip when rotate - } - - // find selected + clicked - int selectedItem_old = selectedItem; - selectedItem = -1; - clickedItem = -1; - for (int i = pagesize - 1; i >= 0; i--) - { - game[i]->Update(t); - if (game[i]->GetState() == STATE_SELECTED) - { - selectedItem = i; - } - if (game[i]->GetState() == STATE_CLICKED) - { - clickedItem = i; - } - - } - - /// OnOver-Effect + GameText + Tooltop - if (selectedItem_old != selectedItem) - { - if (selectedItem >= 0) - { - game[selectedItem]->SetEffect(EFFECT_SCALE, 1, 130); - gamename->SetText(GameTitles.GetTitle(gameList[gameIndex[selectedItem]])); - } - else gamename->SetText((char*) NULL); - if (selectedItem_old >= 0) game[selectedItem_old]->SetEffect(EFFECT_SCALE, -1, 100); - } - // navigation - if (focus && gameList.size() > 6) - { - - int newspeed = 0; - // Left/Right Navigation - if (btnLeft->GetState() == STATE_CLICKED) - { - WPAD_ScanPads(); - u16 buttons = 0; - for (int i = 0; i < 4; i++) - buttons |= WPAD_ButtonsHeld(i); - if (!((buttons & WPAD_BUTTON_A) || (buttons & WPAD_BUTTON_MINUS) || t->Left())) - { - btnLeft->ResetState(); - return; - } - - if (Settings.xflip == XFLIP_SYSMENU || Settings.xflip == XFLIP_YES || Settings.xflip == XFLIP_DISK3D) - newspeed = SHIFT_SPEED; - else newspeed = -SHIFT_SPEED; - } - else if (btnRight->GetState() == STATE_CLICKED) - { - WPAD_ScanPads(); - u16 buttons = 0; - for (int i = 0; i < 4; i++) - buttons |= WPAD_ButtonsHeld(i); - if (!((buttons & WPAD_BUTTON_A) || (buttons & WPAD_BUTTON_PLUS) || t->Right())) - { - btnRight->ResetState(); - return; - } - if (Settings.xflip == XFLIP_SYSMENU || Settings.xflip == XFLIP_YES || Settings.xflip == XFLIP_DISK3D) - newspeed = -SHIFT_SPEED; - else newspeed = SHIFT_SPEED; - } - if (newspeed) - { - if (speed == 0) - speed = newspeed; - else if (speed > 0) - { - if ((speed += SPEED_STEP) > SPEED_LIMIT) speed = SPEED_LIMIT; - } - else - { - if ((speed -= SPEED_STEP) < -SPEED_LIMIT) speed = -SPEED_LIMIT; - } - } - else speed = 0; - - if (speed > 0) // rotate right - { - GuiButton *tmpButton; - listOffset = OFFSETLIMIT(listOffset - 1, gameList.size()); // set the new listOffset - // Save right Button + TollTip and destroy right Image + Image-Data - delete coverImg[pagesize - 1]; - coverImg[pagesize - 1] = NULL; - game[pagesize - 1]->SetImage(NULL); - tmpButton = game[pagesize - 1]; - - // Move all Page-Entries one step right - for (int i = pagesize - 1; i >= 1; i--) - { - coverImg[i] = coverImg[i - 1]; - game[i] = game[i - 1]; - gameIndex[i] = gameIndex[i - 1]; - } - // set saved Button & gameIndex to right - gameIndex[0] = listOffset; - coverImg[0] = new GuiImageAsync(GameCarouselLoadCoverImage, gameList[gameIndex[0]], sizeof(struct discHdr), - &noCover); - coverImg[0] ->SetWidescreen(Settings.widescreen); - - game[0] = tmpButton; - game[0] ->SetImage(coverImg[0]); - - for (int i = 0; i < pagesize; i++) - { - game[i]->StopEffect(); - game[i]->ResetState(); - game[i]->SetEffect(EFFECT_GOROUND, speed, DEG_OFFSET, RADIUS, 270 - (pagesize - 2 * i + 1) * DEG_OFFSET - / 2, 1, 0, RADIUS); - game[i]->UpdateEffects(); // rotate one step for liquid scrolling - } - } - else if (speed < 0) // rotate left - { - GuiButton *tmpButton; - listOffset = OFFSETLIMIT(listOffset + 1, gameList.size()); // set the new listOffset - // Save left Button + TollTip and destroy left Image + Image-Data - delete coverImg[0]; - coverImg[0] = NULL; - game[0]->SetImage(NULL); - tmpButton = game[0]; - - // Move all Page-Entries one step left - for (int i = 0; i < (pagesize - 1); i++) - { - coverImg[i] = coverImg[i + 1]; - game[i] = game[i + 1]; - gameIndex[i] = gameIndex[i + 1]; - } - // set saved Button & gameIndex to right - int ii = pagesize - 1; - gameIndex[ii] = OFFSETLIMIT(listOffset + ii, gameList.size()); - coverImg[ii] = new GuiImageAsync(GameCarouselLoadCoverImage, gameList[gameIndex[ii]], - sizeof(struct discHdr), &noCover); - coverImg[ii] ->SetWidescreen(Settings.widescreen); - - game[ii] = tmpButton; - game[ii] ->SetImage(coverImg[ii]); - - for (int i = 0; i < pagesize; i++) - { - game[i]->StopEffect(); - game[i]->ResetState(); - game[i]->SetEffect(EFFECT_GOROUND, speed, DEG_OFFSET, RADIUS, 270 - (pagesize - 2 * i - 3) * DEG_OFFSET - / 2, 1, 0, RADIUS); - game[i]->UpdateEffects(); // rotate one step for liquid scrolling - } - } - - } - if (updateCB) updateCB(this); -} - diff --git a/source/libwiigui/gui_gamecarousel.h b/source/libwiigui/gui_gamecarousel.h deleted file mode 100644 index dc245e93..00000000 --- a/source/libwiigui/gui_gamecarousel.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef _GUIGAMECAROUSEL_H_ -#define _GUIGAMECAROUSEL_H_ - -#include -#include "gui.h" -#include "usbloader/disc.h" -class GuiImageAsync; -class GuiGameCarousel: public GuiElement -{ - public: - GuiGameCarousel(int w, int h, const char *themePath, int selectedGame = 0); - ~GuiGameCarousel(); - int FindMenuItem(int c, int d); - int GetClickedOption(); - int GetSelectedOption(); - void ResetState(); - void SetFocus(int f); - void Draw(); - void Update(GuiTrigger * t); - int GetOffset(); - void Reload(); - //GuiText * optionVal[PAGESIZE]; - protected: - GuiImageData noCover; - int selectedItem; - int listOffset; - int scrollbaron; - int pagesize; - int speed; - int clickedItem; - - int * gameIndex; - std::vector game; - std::vector coverImg; - - GuiText * gamename; - - GuiButton * btnRight; - GuiButton * btnLeft; - - GuiImage * btnLeftImg; - GuiImage * btnRightImg; - - GuiImageData * imgLeft; - GuiImageData * imgRight; - - GuiTrigger * trigA; - GuiTrigger * trigL; - GuiTrigger * trigR; - GuiTrigger * trigPlus; - GuiTrigger * trigMinus; -}; -#endif diff --git a/source/libwiigui/gui_gamegrid.cpp b/source/libwiigui/gui_gamegrid.cpp deleted file mode 100644 index a8ae0605..00000000 --- a/source/libwiigui/gui_gamegrid.cpp +++ /dev/null @@ -1,836 +0,0 @@ -/**************************************************************************** - * libwiigui - * - * gui_gameGrid.cpp - * - * GUI class definitions - ***************************************************************************/ - -#include "gui.h" -#include "wpad.h" - -#include -#include "gui_gamegrid.h" -#include "gui_image_async.h" -#include "libwiigui/LoadCoverImage.h" -#include "usbloader/GameList.h" -#include "settings/GameTitles.h" -#include "settings/CSettings.h" -#include "themes/CTheme.h" -#include "prompts/PromptWindows.h" -#include "language/gettext.h" -#include "menu.h" - -#include -#include -#include - -//#define SCALE 0.8f -//#define DEG_OFFSET 7 -#define RADIUS 780 -//#define IN_SPEED 175 -//#define SHIFT_SPEED 100 -//#define SPEED_STEP 4 -//#define SAFETY 320 -#define goSteps 10 -#include "../main.h" - -extern const int vol; - -static int Skew1[7][8] = { { -14, -66, 14, -34, 14, 34, -14, 66 }, { -10, -44, 10, -26, 10, 26, -10, 44 }, { -6, -22, - 6, -14, 6, 14, -6, 22 }, { 0, -11, 0, -11, 0, 11, 0, 11 }, { -6, -14, 6, -22, 6, 22, -6, 14 }, { -10, -26, 10, - -44, 10, 44, -10, 26 }, { -14, -34, 14, -66, 14, 66, -14, 34 } }; -static int Pos1[7][2][2] = { -// {{16:9 x,y},{ 4:3 x,y}} - { { -230, 74 }, { -320, 74 } }, { { -70, 74 }, { -130, 74 } }, { { 88, 74 }, { 60, 74 } }, { { 239, 74 }, { - 239, 74 } }, { { 390, 74 }, { 420, 74 } }, { { 550, 74 }, { 612, 74 } }, { { 710, 74 }, { 772, 74 } } }; -static int Skew2[18][8] = { { -5, -49, 5, -27, 5, 0, -5, 0 }, { -5, 0, 5, 0, 5, 27, -5, 49 }, - -{ -5, -49, 5, -27, 5, 0, -5, 0 }, { -5, 0, 5, 0, 5, 27, -5, 49 }, - -{ -4, -22, 4, -14, 4, 0, -4, 0 }, { -4, 0, 4, 0, 4, 14, -4, 22 }, - -{ 0, -9, 0, -5, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 5, 0, 9 }, - -{ 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0 }, - -{ 0, -5, 0, -9, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 9, 0, 5 }, - -{ -4, -14, 4, -22, 4, 0, -4, 0 }, { -4, 0, 4, 0, 4, 22, -4, 14 }, - -{ -5, -27, 5, -49, 5, 0, -5, 0 }, { -5, 0, 5, 0, 5, 49, -5, 27 }, - -{ -5, -27, 5, -49, 5, 0, -5, 0 }, { -5, 0, 5, 0, 5, 49, -5, 27 } }; -static int Pos2[18][2][2] = { -// {{16:9 x,y},{ 4:3 x,y}} - { { -91, 50 }, { -166, 50 } }, { { -91, 193 }, { -166, 193 } }, - - { { 3, 50 }, { -54, 50 } }, { { 3, 193 }, { -54, 193 } }, - - { { 97, 50 }, { 58, 50 } }, { { 97, 193 }, { 58, 193 } }, - - { { 187, 50 }, { 166, 50 } }, { { 187, 193 }, { 166, 193 } }, - - { { 272, 50 }, { 272, 50 } }, { { 272, 193 }, { 272, 193 } }, - - { { 358, 50 }, { 378, 50 } }, { { 358, 193 }, { 378, 193 } }, - - { { 449, 50 }, { 487, 50 } }, { { 449, 193 }, { 487, 193 } }, - - { { 545, 50 }, { 599, 50 } }, { { 545, 193 }, { 599, 193 } }, - - { { 641, 50 }, { 700, 50 } }, { { 641, 193 }, { 700, 193 } } }; -static int Skew3[45][8] = { { -38, -110, 15, -42, 15, 65, -38, 32 }, { -38, -75, 15, -48, 15, 45, -38, 72 }, { -38, - -52, 15, -70, 15, 27, -38, 100 }, - -{ -38, -110, 15, -42, 15, 65, -38, 32 }, { -38, -75, 15, -48, 15, 45, -38, 72 }, - { -38, -52, 15, -70, 15, 27, -38, 100 }, - - { -38, -70, 15, -24, 15, 40, -38, 27 }, { -38, -50, 15, -35, 15, 40, -38, 50 }, { -38, -34, 15, -47, 15, 24, - -38, 58 }, - - { -27, -55, 19, -22, 19, 30, -27, 22 }, { -27, -40, 19, -30, 19, 30, -27, 40 }, { -27, -20, 19, -30, 19, 20, - -27, 50 }, - - { -19, -28, 0, -17, 0, 15, -19, 10 }, { -19, -30, 0, -20, 0, 12, -19, 30 }, - { -19, -15, 0, -20, 0, 10, -19, 24 }, - - { -10, -20, 3, -13, 3, 14, -10, 10 }, { -10, -20, 3, -18, 3, 18, -10, 20 }, - { -10, -10, 3, -10, 3, 0, -10, 10 }, - - { -10, -15, 3, -12, 3, 13, -10, 13 }, - { -10, -17, 3, -10, 3, 10, -10, 17 }, - { -10, -10, 3, -15, 3, 10, -10, 10 }, - - { -10, -10, 3, -10, 3, 14, -10, 14 }, - { -10, -10, 3, -10, 3, 10, -10, 10 },//middle - { -10, -10, 3, -10, 3, 10, -10, 10 }, - - { -14, -10, 4, -20, 3, 10, -14, 10 }, { -14, -10, 4, -17, 3, 17, -14, 10 }, - { -14, -10, 4, -10, 3, 10, -14, 10 }, - - { -10, -13, 3, -20, 3, 14, -10, 10 }, { -10, -18, 3, -20, 3, 20, -10, 18 }, - { -10, -10, 3, -10, 3, 20, -10, 5 }, - - { -19, -17, 0, -28, 0, 10, -19, 15 }, { -19, -20, 0, -30, 0, 30, -19, 12 }, - { -19, -20, 0, -15, 0, 30, -19, 10 }, - - { -27, -22, 19, -55, 19, 22, -27, 30 }, { -27, -30, 19, -40, 19, 40, -27, 30 }, { -27, -30, 19, -20, 19, 55, - -27, 20 }, - - { -38, -24, 15, -70, 15, 27, -38, 40 }, { -38, -35, 15, -50, 15, 50, -38, 40 }, { -38, -47, 15, -34, 15, 58, - -38, 24 }, - - { -38, -42, 15, -110, 15, 32, -38, 60 }, { -38, -48, 15, -75, 15, 70, -38, 45 }, { -38, -70, 15, -52, 15, 100, - -38, 27 }, - - { -38, -42, 15, -110, 15, 32, -38, 60 }, { -38, -48, 15, -75, 15, 70, -38, 45 }, { -38, -70, 15, -52, 15, 100, - -38, 27 } }; -static int Pos3[45][2][2] = { -// {{16:9 x,y},{ 4:3 x,y}} - { { -42, 49 }, { -91, 49 } }, { { -42, 153 }, { -91, 153 } }, { { -42, 261 }, { -91, 261 } }, - - { { 13, 58 }, { -29, 58 } }, { { 13, 153 }, { -29, 153 } }, { { 13, 250 }, { -29, 250 } }, - - { { 68, 67 }, { 33, 67 } }, { { 68, 153 }, { 33, 153 } }, { { 68, 239 }, { 33, 239 } }, - - { { 120, 74 }, { 92, 74 } }, { { 120, 153 }, { 92, 153 } }, { { 120, 232 }, { 92, 232 } }, - - { { 170, 78 }, { 149, 78 } }, { { 170, 153 }, { 149, 153 } }, { { 170, 228 }, { 149, 228 } }, - - { { 214, 80 }, { 200, 80 } }, { { 214, 153 }, { 200, 153 } }, { { 214, 226 }, { 200, 226 } }, - - { { 258, 81 }, { 251, 81 } }, { { 258, 153 }, { 251, 153 } }, { { 258, 224 }, { 251, 224 } }, - - { { 302, 81 }, { 302, 81 } }, { { 302, 153 }, { 302, 153 } }, { { 302, 223 }, { 302, 223 } }, - - { { 346, 81 }, { 353, 81 } }, { { 346, 153 }, { 353, 153 } }, { { 346, 223 }, { 353, 223 } }, - - { { 390, 80 }, { 404, 80 } }, { { 390, 153 }, { 404, 153 } }, { { 390, 225 }, { 404, 225 } }, - - { { 434, 77 }, { 457, 77 } }, { { 434, 153 }, { 457, 153 } }, { { 434, 227 }, { 457, 227 } }, - - { { 484, 73 }, { 512, 73 } }, { { 484, 153 }, { 512, 153 } }, { { 484, 231 }, { 512, 231 } }, - - { { 537, 67 }, { 572, 67 } }, { { 537, 153 }, { 572, 153 } }, { { 537, 239 }, { 572, 239 } }, - - { { 591, 58 }, { 633, 58 } }, { { 591, 153 }, { 633, 153 } }, { { 591, 250 }, { 633, 250 } }, - - { { 660, 58 }, { 660, 58 } }, { { 660, 153 }, { 660, 153 } }, { { 660, 250 }, { 660, 250 } } - -}; -#define VALUE4ROWS(rows, val1, val2, val3) (rows==3 ? val3 : (rows==2 ? val2 : val1)) -#define ROWS2PAGESIZE(rows) (rows==3 ? 45 : (rows==2 ? 18 : 7)) -static inline int OFFSETLIMIT(int Offset, int rows, int gameCnt) -{ - gameCnt += (rows - (gameCnt % rows)) % rows; // add count of skiped Entries at end if List - while (Offset > gameCnt) - Offset -= gameCnt; - while (Offset < 0) - Offset += gameCnt; - return Offset; -} - -// Help-Function to Calc GameIndex -static int GetGameIndex(int pageEntry, int rows, int listOffset, int gameCnt) -{ - int skip = (rows - (gameCnt % rows)) % rows; // count of skiped Entries at end if List - int pagesize = ROWS2PAGESIZE( rows ); - - if (gameCnt < (pagesize - 2 * rows)) - { - int listStart = (pagesize - gameCnt) >> 1; // align list on the center - listStart = listStart - (listStart % rows); // align listStart to the top row - if (pageEntry < listStart || pageEntry >= listStart + gameCnt) return -1; - return pageEntry - listStart; - } - else - { - listOffset = listOffset - (listOffset % rows); // align listOffset to the top row - listOffset = listOffset - 2 * rows; // align listOffset to the left full visible column - if (listOffset < 0) listOffset += gameCnt + skip; // set the correct Offset - pageEntry = (listOffset + pageEntry) % (gameCnt + skip); // get offset of pageEntry - if (pageEntry >= gameCnt) return -1; - return pageEntry; - } -} -static GuiImageData *GameGridLoadCoverImage(void * Arg) -{ - return LoadCoverImage((struct discHdr *) Arg, false, false); -} -/** - * Constructor for the GuiGamegrid class. - */ -GuiGameGrid::GuiGameGrid(int w, int h, const char *themePath, int selectedGame) : - noCover(Resources::GetFile("nocoverFlat.png"), Resources::GetFileSize("nocoverFlat.png")) -{ - width = w; - height = h; - theme_posX = thInt("0 - game grid layout pos x"); - theme_posY = thInt("20 - game grid layout pos y"); - - selectable = true; - focus = 1; // allow focus - - trigA = new GuiTrigger; - trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - trigL = new GuiTrigger; - trigL->SetButtonOnlyTrigger(-1, WPAD_BUTTON_LEFT | WPAD_CLASSIC_BUTTON_LEFT, PAD_BUTTON_LEFT); - trigR = new GuiTrigger; - trigR->SetButtonOnlyTrigger(-1, WPAD_BUTTON_RIGHT | WPAD_CLASSIC_BUTTON_RIGHT, PAD_BUTTON_RIGHT); - trig1 = new GuiTrigger; - trig1->SetButtonOnlyTrigger(-1, WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_X, PAD_BUTTON_X); - trig2 = new GuiTrigger; - trig2->SetButtonOnlyTrigger(-1, WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_Y, PAD_BUTTON_Y); - trigPlus = new GuiTrigger; - trigPlus->SetButtonOnlyTrigger(-1, WPAD_BUTTON_PLUS | WPAD_CLASSIC_BUTTON_PLUS, 0); - trigMinus = new GuiTrigger; - trigMinus->SetButtonOnlyTrigger(-1, WPAD_BUTTON_MINUS | WPAD_CLASSIC_BUTTON_MINUS, 0); - - int btnHeight = (int) lround(sqrt(RADIUS * RADIUS - 90000) - RADIUS - 50); - - // Button Left - btnLeft = new GuiButton(0, 0); - btnLeft->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - btnLeft->SetPosition(20, btnHeight); - btnLeft->SetParent(this); - btnLeft->SetSoundOver(btnSoundOver); - btnLeft->SetTrigger(trigL); - btnLeft->SetTrigger(trigMinus); - - // Button Right - btnRight = new GuiButton(0, 0); - btnRight->SetParent(this); - btnRight->SetAlignment(ALIGN_RIGHT, ALIGN_MIDDLE); - btnRight->SetPosition(-20, btnHeight); - btnRight->SetSoundOver(btnSoundOver); - btnRight->SetTrigger(trigR); - btnRight->SetTrigger(trigPlus); - - // Button RowUp - btnRowUp = new GuiButton(0, 0); - btnRowUp->SetParent(this); - btnRowUp->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - btnRowUp->SetPosition(0, 0); - btnRowUp->SetTrigger(trig2); - - // Button RowDown - btnRowDown = new GuiButton(0, 0); - btnRowDown->SetParent(this); - btnRowDown->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - btnRowDown->SetPosition(0, 0); - btnRowDown->SetTrigger(trig1); - - // Page-Stuff - gameIndex = NULL; - - Reload(Settings.gridRows, 0); -} - -/** - * Destructor for the GuiGameGrid class. - */ -GuiGameGrid::~GuiGameGrid() -{ - - delete btnRight; - delete btnLeft; - delete btnRowUp; - delete btnRowDown; - - delete trigA; - delete trigL; - delete trigR; - delete trigPlus; - delete trigMinus; - delete trig1; - delete trig2; - - GuiImageAsync::ClearQueue(); - - for (u32 i = 0; i < game.size(); ++i) - delete game[i]; - - for (u32 i = 0; i < coverImg.size(); ++i) - delete coverImg[i]; - - for (u32 i = 0; i < titleTT.size(); ++i) - delete titleTT[i]; - - if(gameIndex) - delete [] gameIndex; - game.clear(); - coverImg.clear(); - titleTT.clear(); -} - -void GuiGameGrid::SetFocus(int f) -{ - LOCK( this ); - if (!gameList.size()) return; - - focus = f; - - for (int i = 0; i < pagesize; i++) - game[i]->ResetState(); - - if (f == 1 && selectedItem >= 0) game[selectedItem]->SetState(STATE_SELECTED); -} - -void GuiGameGrid::ResetState() -{ - LOCK( this ); - if (state != STATE_DISABLED) - { - state = STATE_DEFAULT; - stateChan = -1; - } - - for (int i = 0; i < pagesize; i++) - { - game[i]->ResetState(); - } -} - -int GuiGameGrid::GetOffset() -{ - LOCK( this ); - return listOffset; -} - -int GuiGameGrid::GetClickedOption() -{ - LOCK( this ); - int found = -1; - if (clickedItem >= 0) - { - game[clickedItem]->SetState(STATE_SELECTED); - found = gameIndex[clickedItem]; - clickedItem = -1; - } - return found; -} - -int GuiGameGrid::GetSelectedOption() -{ - LOCK( this ); - int found = -1; - for (int i = 0; i < pagesize; i++) - { - if (game[i]->GetState() == STATE_SELECTED) - { - game[i]->SetState(STATE_SELECTED); - found = gameIndex[i]; - break; - } - } - return found; -} - -/** - * Draw the button on screen - */ -void GuiGameGrid::Draw() -{ - LOCK( this ); - if (!this->IsVisible() || !gameList.size()) return; - - if (goLeft > 0) - { - goLeft--; - int wsi = Settings.widescreen ? 0 : 1; - float f2 = ((float) goLeft) / goSteps; - float f1 = 1.0 - f2; - int (*Pos)[2][2] = VALUE4ROWS( rows, Pos1, Pos2, Pos3 ); - int (*Skew)[8] = VALUE4ROWS( rows, Skew1, Skew2, Skew3 ); - - for (int i = 0; i < pagesize - rows; i++) - { - game[i]->SetPosition(Pos[i][wsi][0] * f1 + Pos[i + rows][wsi][0] * f2 + theme_posX, Pos[i][wsi][1] - * f1 + Pos[i + rows][wsi][1] * f2 + theme_posY); - - game[i]->SetSkew(Skew[i][0] * f1 + Skew[i + rows][0] * f2, Skew[i][1] * f1 + Skew[i + rows][1] * f2, - Skew[i][2] * f1 + Skew[i + rows][2] * f2, Skew[i][3] * f1 + Skew[i + rows][3] * f2, Skew[i][4] * f1 - + Skew[i + rows][4] * f2, Skew[i][5] * f1 + Skew[i + rows][5] * f2, Skew[i][6] * f1 - + Skew[i + rows][6] * f2, Skew[i][7] * f1 + Skew[i + rows][7] * f2); - } - } - else if (goRight > 0) - { - goRight--; - int wsi = Settings.widescreen ? 0 : 1; - float f2 = ((float) goRight) / goSteps; - float f1 = 1.0 - f2; - int (*Pos)[2][2] = VALUE4ROWS( rows, Pos1, Pos2, Pos3 ); - int (*Skew)[8] = VALUE4ROWS( rows, Skew1, Skew2, Skew3 ); - for (int i = rows; i < pagesize; i++) - { - game[i]->SetPosition(Pos[i][wsi][0] * f1 + Pos[i - rows][wsi][0] * f2 + theme_posX, Pos[i][wsi][1] - * f1 + Pos[i - rows][wsi][1] * f2 + theme_posY); - - game[i]->SetSkew(Skew[i][0] * f1 + Skew[i - rows][0] * f2, Skew[i][1] * f1 + Skew[i - rows][1] * f2, - Skew[i][2] * f1 + Skew[i - rows][2] * f2, Skew[i][3] * f1 + Skew[i - rows][3] * f2, Skew[i][4] * f1 - + Skew[i - rows][4] * f2, Skew[i][5] * f1 + Skew[i - rows][5] * f2, Skew[i][6] * f1 - + Skew[i - rows][6] * f2, Skew[i][7] * f1 + Skew[i - rows][7] * f2); - } - } - - for (int i = 0; i < pagesize; i++) - game[i]->Draw(); - if (gameList.size() > pagesize - 2 * rows) - { - btnRight->Draw(); - btnLeft->Draw(); - } - - btnRowUp->Draw(); - btnRowDown->Draw(); - - if (focus && Settings.tooltips == ON) for (int i = 0; i < pagesize; i++) - game[i]->DrawTooltip(); - - this->UpdateEffects(); -} - -/** - * Change the number of rows - */ -void GuiGameGrid::ChangeRows(int n) -{ - if (n != rows) Reload(n, -1); -} - -void GuiGameGrid::Update(GuiTrigger * t) -{ - LOCK( this ); - if (state == STATE_DISABLED || !t || !gameList.size()) return; - - if (!(game[0]->GetEffect() || game[0]->GetEffectOnOver())) - { - for (int i = 0; i < pagesize; i++) - game[i]->SetEffectGrow(); - } - - btnRight->Update(t); - btnLeft->Update(t); - btnRowUp->Update(t); - btnRowDown->Update(t); - - selectedItem = -1; - clickedItem = -1; - for (int i = 0; i < pagesize; i++) - { - game[i]->Update(t); - if (game[i]->GetState() == STATE_SELECTED) - { - selectedItem = i; - } - if (game[i]->GetState() == STATE_CLICKED) - { - clickedItem = i; - } - - } - // navigation - if (focus && gameList.size() >= (pagesize - 2 * rows) && goLeft == 0 && goRight == 0) - { - // Left/Right Navigation - - if (btnLeft->GetState() == STATE_CLICKED) - { - u32 buttons = t->wpad.btns_h; - if (!((buttons & WPAD_BUTTON_A) || (buttons & WPAD_BUTTON_MINUS) || t->Left())) - { - btnLeft->ResetState(); - return; - } - - if (Settings.xflip == XFLIP_SYSMENU || Settings.xflip == XFLIP_YES || Settings.xflip == XFLIP_DISK3D) - goRight = goSteps; - else goLeft = goSteps; - } - else if (btnRight->GetState() == STATE_CLICKED) - { - u32 buttons = t->wpad.btns_h; - if (!((buttons & WPAD_BUTTON_A) || (buttons & WPAD_BUTTON_PLUS) || t->Right())) - { - btnRight->ResetState(); - return; - } - if (Settings.xflip == XFLIP_SYSMENU || Settings.xflip == XFLIP_YES || Settings.xflip == XFLIP_DISK3D) - goLeft = goSteps; - else goRight = goSteps; - } - - if (goLeft == goSteps) - { - GuiButton *tmpButton[rows]; - GuiTooltip *tmpTooltip[rows]; - listOffset = OFFSETLIMIT(listOffset + rows, rows, gameList.size()); // set the new listOffset - // Save left Tooltip & Button and destroy left Image + Image-Data - for (int i = 0; i < rows; i++) - { - delete coverImg[i]; - coverImg[i] = NULL; - game[i]->SetImage(NULL); - tmpTooltip[i] = titleTT[i]; - tmpButton[i] = game[i]; - } - // Move all Page-Entries one step left - for (int i = 0; i < (pagesize - rows); i++) - { - titleTT[i] = titleTT[i + rows]; - coverImg[i] = coverImg[i + rows]; - game[i] = game[i + rows]; - gameIndex[i] = gameIndex[i + rows]; - } - // set saved Tooltip, Button & gameIndex to right - int wsi = Settings.widescreen ? 0 : 1; - int (*Pos)[2][2] = VALUE4ROWS( rows, Pos1, Pos2, Pos3 ); - int (*Skew)[8] = VALUE4ROWS( rows, Skew1, Skew2, Skew3 ); - - for (int i = 0; i < rows; i++) - { - int ii = i + pagesize - rows; - gameIndex[ii] = GetGameIndex(ii, rows, listOffset, gameList.size()); - titleTT[ii] = tmpTooltip[i]; - coverImg[ii] = NULL; - if (gameIndex[ii] != -1) - { - coverImg[ii] = new GuiImageAsync(GameGridLoadCoverImage, gameList[gameIndex[ii]], - sizeof(struct discHdr), &noCover); - if (coverImg[ii]) - { - coverImg[ii] ->SetWidescreen(Settings.widescreen); - coverImg[ii] ->SetScale(VALUE4ROWS( rows, 1.0, 0.6, 0.26 )); - coverImg[ii] ->SetPosition(0, VALUE4ROWS( rows, 0, -50, -80 )); - } - titleTT[ii] ->SetText(GameTitles.GetTitle(gameList[gameIndex[ii]])); - } - else - { - titleTT[ii] ->SetText(NULL); - } - - game[ii] = tmpButton[i]; - game[ii] ->SetImage(coverImg[ii]); - game[ii] ->SetPosition(Pos[ii][wsi][0], Pos[ii][wsi][1]); - game[ii] ->SetSkew(&Skew[ii][0]); - game[ii] ->RemoveToolTip(); - if (gameIndex[ii] != -1) - { - game[ii] ->SetClickable(true); - game[ii] ->SetVisible(true); - } - else - { - game[ii] ->SetVisible(false); - game[ii] ->SetClickable(false); - game[ii] ->RemoveSoundOver(); - } - } - // Set Tooltip-Position - int ttoffset_x = Settings.widescreen ? VALUE4ROWS( rows, 70, 35, 0 ) : VALUE4ROWS( rows, 150, 55, 25 ); - int ttoffset_y = -VALUE4ROWS( rows, 224, 133, 68 ) / 4; - for (int i = 0; i < pagesize; i++) - { - switch ((i * 3) / pagesize) - { - case 0: - game[i]->SetToolTip(titleTT[i], ttoffset_x, ttoffset_y, ALIGN_LEFT, ALIGN_MIDDLE); - break; - case 1: - game[i]->SetToolTip(titleTT[i], 0, ttoffset_y, ALIGN_CENTRE, ALIGN_MIDDLE); - break; - case 2: - game[i]->SetToolTip(titleTT[i], -ttoffset_x, ttoffset_y, ALIGN_RIGHT, ALIGN_MIDDLE); - break; - default: - break; - } - } - } - else if (goRight == goSteps) - { - GuiButton *tmpButton[rows]; - GuiTooltip *tmpTooltip[rows]; - listOffset = OFFSETLIMIT(listOffset - rows, rows, gameList.size()); // set the new listOffset - // Save right Button & Tooltip and destroy right Image-Data - for (int i = 0; i < rows; i++) - { - int ii = i + pagesize - rows; - delete coverImg[ii]; - coverImg[ii] = NULL; - game[ii]->SetImage(NULL); - tmpTooltip[i] = titleTT[ii]; - tmpButton[i] = game[ii]; - } - // Move all Page-Entries one step right - for (int i = pagesize - 1; i >= rows; i--) - { - titleTT[i] = titleTT[i - rows]; - coverImg[i] = coverImg[i - rows]; - game[i] = game[i - rows]; - gameIndex[i] = gameIndex[i - rows]; - } - // set saved Image, Button & gameIndex to left - int wsi = Settings.widescreen ? 0 : 1; - int (*Pos)[2][2] = VALUE4ROWS( rows, Pos1, Pos2, Pos3 ); - int (*Skew)[8] = VALUE4ROWS( rows, Skew1, Skew2, Skew3 ); - - for (int i = 0; i < rows; i++) - { - gameIndex[i] = GetGameIndex(i, rows, listOffset, gameList.size()); - titleTT[i] = tmpTooltip[i]; - coverImg[i] = NULL; - if (gameIndex[i] != -1) - { - coverImg[i] = new GuiImageAsync(GameGridLoadCoverImage, gameList[gameIndex[i]], - sizeof(struct discHdr), &noCover); - if (coverImg[i]) - { - coverImg[i] ->SetWidescreen(Settings.widescreen); - coverImg[i] ->SetScale(VALUE4ROWS( rows, 1.0, 0.6, 0.26 )); - coverImg[i] ->SetPosition(0, VALUE4ROWS( rows, 0, -50, -80 )); - } - titleTT[i] ->SetText(GameTitles.GetTitle(gameList[gameIndex[i]])); - } - else - { - titleTT[i] ->SetText(NULL); - } - game[i] = tmpButton[i]; - game[i] ->SetImage(coverImg[i]); - game[i] ->SetPosition(Pos[i][wsi][0], Pos[i][wsi][1]); - game[i] ->SetSkew(&Skew[i][0]); - game[i] ->RemoveToolTip(); - if (gameIndex[i] != -1) - { - game[i] ->SetClickable(true); - game[i] ->SetVisible(true); - } - else - { - game[i] ->SetVisible(false); - game[i] ->SetClickable(false); - game[i] ->RemoveSoundOver(); - } - } - // Set Tooltip-Position - int ttoffset_x = Settings.widescreen ? VALUE4ROWS( rows, 70, 35, 0 ) : VALUE4ROWS( rows, 150, 55, 25 ); - int ttoffset_y = -VALUE4ROWS( rows, 224, 133, 68 ) / 4; - for (int i = 0; i < pagesize; i++) - { - switch ((i * 3) / pagesize) - { - case 0: - game[i]->SetToolTip(titleTT[i], ttoffset_x, ttoffset_y, ALIGN_LEFT, ALIGN_MIDDLE); - break; - case 1: - game[i]->SetToolTip(titleTT[i], 0, ttoffset_y, ALIGN_CENTRE, ALIGN_MIDDLE); - break; - case 2: - game[i]->SetToolTip(titleTT[i], -ttoffset_x, ttoffset_y, ALIGN_RIGHT, ALIGN_MIDDLE); - break; - default: - break; - } - } - } - } - - if ((btnRowUp->GetState() == STATE_CLICKED)) - { - if ((rows == 1) && (gameList.size() >= 18)) - this->ChangeRows(2); - else if ((rows == 2) && (gameList.size() >= 45)) this->ChangeRows(3); - btnRowUp->ResetState(); - return; - } - - if ((btnRowDown->GetState() == STATE_CLICKED)) - { - if (rows == 3) - this->ChangeRows(2); - else if (rows == 2) this->ChangeRows(1); - btnRowDown->ResetState(); - return; - } - - if (updateCB) updateCB(this); -} - -void GuiGameGrid::Reload(int Rows, int ListOffset) -{ - LOCK( this ); - - //Prevent to wait before all images are loaded before we can delete them - GuiImageAsync::ClearQueue(); - - // CleanUp - for (u32 i = 0; i < game.size(); ++i) - delete game[i]; - - for (u32 i = 0; i < coverImg.size(); ++i) - delete coverImg[i]; - - for (u32 i = 0; i < titleTT.size(); ++i) - delete titleTT[i]; - - if(gameIndex) - delete [] gameIndex; - game.clear(); - coverImg.clear(); - titleTT.clear(); - - goLeft = 0; - goRight = 0; - - rows = Rows > 3 ? 3 : (Rows < 1 ? 1 : Rows); - if ((gameList.size() < 45) && (rows == 3)) rows = 2; - if ((gameList.size() < 18) && (rows == 2)) rows = 1; - - if (ListOffset >= 0) // if ListOffset < 0 then no change - listOffset = ListOffset; - listOffset = OFFSETLIMIT(listOffset, rows, gameList.size()); - - selectedItem = -1; - clickedItem = -1; - - pagesize = ROWS2PAGESIZE( rows ); - - // Page-Stuff - gameIndex = new int[pagesize]; - titleTT.resize(pagesize); - coverImg.resize(pagesize); - game.resize(pagesize); - - int wsi = Settings.widescreen ? 0 : 1; - int (*Pos)[2][2] = VALUE4ROWS( rows, Pos1, Pos2, Pos3 ); - int (*Skew)[8] = VALUE4ROWS( rows, Skew1, Skew2, Skew3 ); - - int ttoffset_x = Settings.widescreen ? VALUE4ROWS( rows, 70, 35, 0 ) : VALUE4ROWS( rows, 150, 55, 25 ); - int ttoffset_y = -VALUE4ROWS( rows, 224, 133, 68 ) / 4; - - for (int i = 0; i < pagesize; i++) - { - //------------------------ - // Index - //------------------------ - gameIndex[i] = GetGameIndex(i, rows, listOffset, gameList.size()); - - //------------------------ - // Tooltip - //------------------------ - if (gameIndex[i] != -1) - titleTT[i] = new GuiTooltip(GameTitles.GetTitle(gameList[gameIndex[i]]), thInt("255 - tooltip alpha")); - else - titleTT[i] = new GuiTooltip(NULL, thInt("255 - tooltip alpha")); - - //------------------------ - // ImageData - //------------------------ - // if( gameIndex[i] != -1 ) - // cover[i] = LoadCoverImage(&gameList[gameIndex[i]], false /*bool Prefere3D*/); - // else - // cover[i] = new GuiImageData(NULL); - - //------------------------ - // Image - //------------------------ - coverImg[i] = NULL; - if (gameIndex[i] != -1) - { - coverImg[i] = new GuiImageAsync(GameGridLoadCoverImage, gameList[gameIndex[i]], sizeof(struct discHdr), &noCover); - if (coverImg[i]) - { - coverImg[i]->SetWidescreen(Settings.widescreen); - // if ( rows == 2 ) coverImg[i]->SetScale(.6); //these are the numbers for 2 rows - // else if ( rows == 3 ) coverImg[i]->SetScale(.26); //these are the numbers for 3 rows - coverImg[i]->SetScale(VALUE4ROWS( rows, 1.0, 0.6, 0.26 )); - coverImg[i]->SetPosition(0, VALUE4ROWS( rows, 0, -50, -80 )); - } - } - - //------------------------ - // GameButton - //------------------------ - game[i] = new GuiButton(VALUE4ROWS( rows, 160, 75, 35 ), VALUE4ROWS( rows, 224, 133, 68 )); - game[i]->SetParent(this); - game[i]->SetImage(coverImg[i]); - game[i]->SetAlignment(ALIGN_TOP, ALIGN_LEFT); - game[i]->SetPosition(Pos[i][wsi][0] + theme_posX, Pos[i][wsi][1] + theme_posY); - game[i]->SetSkew(&Skew[i][0]); - game[i]->SetTrigger(trigA); - game[i]->SetSoundOver(btnSoundOver); - game[i]->SetSoundClick(btnSoundClick); - game[i]->SetRumble(false); - switch ((i * 3) / pagesize) - { - case 0: - game[i]->SetToolTip(titleTT[i], ttoffset_x, ttoffset_y, ALIGN_LEFT, ALIGN_MIDDLE); - break; - case 1: - game[i]->SetToolTip(titleTT[i], 0, ttoffset_y, ALIGN_CENTRE, ALIGN_MIDDLE); - break; - case 2: - game[i]->SetToolTip(titleTT[i], -ttoffset_x, ttoffset_y, ALIGN_RIGHT, ALIGN_MIDDLE); - break; - default: - break; - } - if (gameIndex[i] >= 0) - { - game[i]->SetClickable(true); - game[i]->SetVisible(true); - } - else - { - game[i]->SetVisible(false); - game[i]->SetClickable(false); - // game[i]->RemoveSoundOver(); - } - } - Settings.gridRows = rows; -} - diff --git a/source/libwiigui/gui_gamegrid.h b/source/libwiigui/gui_gamegrid.h deleted file mode 100644 index e44d7f92..00000000 --- a/source/libwiigui/gui_gamegrid.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef _GUIGAMEGRID_H_ -#define _GUIGAMEGRID_H_ - -#include -#include "gui.h" -#include "usbloader/disc.h" - -class GuiImageAsync; -class GuiGameGrid: public GuiElement -{ - public: - GuiGameGrid(int w, int h, const char *themePath, int selectedGame = 0); - ~GuiGameGrid(); - int FindMenuItem(int c, int d); - int GetClickedOption(); - int GetSelectedOption(); - void ResetState(); - void SetFocus(int f); - void Draw(); - void Update(GuiTrigger * t); - int GetOffset(); - void Reload(int Rows, int ListOffset); - void ChangeRows(int n); - protected: - GuiImageData noCover; - int selectedItem; - int listOffset; - int pagesize; - int clickedItem; - int rows; - int goLeft; - int goRight; - int theme_posX; - int theme_posY; - - int * gameIndex; - std::vector game; - std::vector titleTT; - std::vector coverImg; - - GuiButton * btnRight; - GuiButton * btnLeft; - GuiButton * btnRowUp; - GuiButton * btnRowDown; - - GuiImage * btnLeftImg; - GuiImage * btnRightImg; - - GuiImageData * imgLeft; - GuiImageData * imgRight; - - GuiTrigger * trigA; - GuiTrigger * trigL; - GuiTrigger * trigR; - GuiTrigger * trigPlus; - GuiTrigger * trigMinus; - GuiTrigger * trig1; - GuiTrigger * trig2; -}; -#endif diff --git a/source/libwiigui/gui_image.cpp b/source/libwiigui/gui_image.cpp deleted file mode 100644 index 964d6b7d..00000000 --- a/source/libwiigui/gui_image.cpp +++ /dev/null @@ -1,460 +0,0 @@ -/**************************************************************************** - * libwiigui - * - * Tantric 2009 - * - * gui_image.cpp - * - * GUI class definitions - ***************************************************************************/ - -#include "gui.h" -/** - * Constructor for the GuiImage class. - */ -GuiImage::GuiImage() -{ - image = NULL; - width = 0; - height = 0; - imageangle = 0; - tile = -1; - stripe = 0; - widescreen = 0; - xx1 = 0; - yy1 = 0; - xx2 = 0; - yy2 = 0; - xx3 = 0; - yy3 = 0; - xx4 = 0; - yy4 = 0; - imgType = IMAGE_DATA; -} - -GuiImage::GuiImage(GuiImageData * img) -{ - if (img) - { - image = img->GetImage(); - width = img->GetWidth(); - height = img->GetHeight(); - } - else - { - image = NULL; - width = 0; - height = 0; - } - imageangle = 0; - tile = -1; - stripe = 0; - widescreen = 0; - parentangle = true; - xx1 = 0; - yy1 = 0; - xx2 = 0; - yy2 = 0; - xx3 = 0; - yy3 = 0; - xx4 = 0; - yy4 = 0; - imgType = IMAGE_DATA; -} - -GuiImage::GuiImage(u8 * img, int w, int h) -{ - image = img; - width = w; - height = h; - imageangle = 0; - tile = -1; - stripe = 0; - widescreen = 0; - parentangle = true; - xx1 = 0; - yy1 = 0; - xx2 = 0; - yy2 = 0; - xx3 = 0; - yy3 = 0; - xx4 = 0; - yy4 = 0; - imgType = IMAGE_TEXTURE; -} - -GuiImage::GuiImage(int w, int h, GXColor c) -{ - image = (u8 *) memalign(32, w * h * 4); - width = w; - height = h; - imageangle = 0; - tile = -1; - stripe = 0; - widescreen = 0; - parentangle = true; - xx1 = 0; - yy1 = 0; - xx2 = 0; - yy2 = 0; - xx3 = 0; - yy3 = 0; - xx4 = 0; - yy4 = 0; - imgType = IMAGE_COLOR; - - if (!image) return; - - int x, y; - - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - this->SetPixel(x, y, c); - } - } - int len = w * h * 4; - if (len % 32) len += (32 - len % 32); - DCFlushRange(image, len); -} - -GuiImage::GuiImage(GuiImage &srcimage) : - GuiElement() -{ - width = srcimage.GetWidth(); - height = srcimage.GetHeight(); - int len = width * height * 4; - if (len % 32) len += (32 - len % 32); - image = (u8 *) memalign(32, len); - memcpy(image, srcimage.GetImage(), len); - DCFlushRange(image, len); - imageangle = srcimage.GetAngle(); - tile = -1; - stripe = 0; - widescreen = 0; - parentangle = true; - xx1 = 0; - yy1 = 0; - xx2 = 0; - yy2 = 0; - xx3 = 0; - yy3 = 0; - xx4 = 0; - yy4 = 0; - imgType = IMAGE_COPY; -} - -GuiImage::GuiImage(GuiImage *srcimage) : - GuiElement() -{ - width = srcimage->GetWidth(); - height = srcimage->GetHeight(); - int len = width * height * 4; - if (len % 32) len += (32 - len % 32); - image = (u8 *) memalign(32, len); - memcpy(image, srcimage->GetImage(), len); - DCFlushRange(image, len); - imageangle = srcimage->GetAngle(); - tile = -1; - stripe = 0; - widescreen = 0; - parentangle = true; - xx1 = 0; - yy1 = 0; - xx2 = 0; - yy2 = 0; - xx3 = 0; - yy3 = 0; - xx4 = 0; - yy4 = 0; - imgType = IMAGE_COPY; -} - -GuiImage &GuiImage::operator=(GuiImage & srcimage) -{ - if ((imgType == IMAGE_COLOR || imgType == IMAGE_COPY) && image) - { - free(image); - image = NULL; - } - - width = srcimage.GetWidth(); - height = srcimage.GetHeight(); - int len = width * height * 4; - if (len % 32) len += (32 - len % 32); - image = (u8 *) memalign(32, len); - memcpy(image, srcimage.GetImage(), len); - DCFlushRange(image, len); - imageangle = srcimage.GetAngle(); - tile = -1; - stripe = 0; - widescreen = 0; - parentangle = true; - xx1 = 0; - yy1 = 0; - xx2 = 0; - yy2 = 0; - xx3 = 0; - yy3 = 0; - xx4 = 0; - yy4 = 0; - imgType = IMAGE_COPY; - return *this; -} - -/** - * Destructor for the GuiImage class. - */ -GuiImage::~GuiImage() -{ - if ((imgType == IMAGE_COLOR || imgType == IMAGE_COPY) && image) - { - free(image); - image = NULL; - } -} - -u8 * GuiImage::GetImage() -{ - return image; -} - -void GuiImage::SetImage(GuiImageData * img) -{ - LOCK( this ); - if ((imgType == IMAGE_COLOR || imgType == IMAGE_COPY) && image) - { - free(image); - image = NULL; - } - - image = NULL; - width = 0; - height = 0; - imgType = IMAGE_DATA; - - if(img) - { - image = img->GetImage(); - width = img->GetWidth(); - height = img->GetHeight(); - } -} - -void GuiImage::SetImage(u8 * img, int w, int h) -{ - LOCK( this ); - if ((imgType == IMAGE_COLOR || imgType == IMAGE_COPY) && image) - { - free(image); - image = NULL; - } - image = img; - width = w; - height = h; - imgType = IMAGE_TEXTURE; -} - -void GuiImage::SetAngle(float a) -{ - LOCK( this ); - imageangle = a; -} -float GuiImage::GetAngle() -{ - return imageangle; -} - -void GuiImage::SetTile(int t) -{ - LOCK( this ); - tile = t; -} - -void GuiImage::SetWidescreen(bool w) -{ - LOCK( this ); - widescreen = w; -} -void GuiImage::SetParentAngle(bool a) -{ - LOCK( this ); - parentangle = a; -} - -GXColor GuiImage::GetPixel(int x, int y) -{ - if (!image || this->GetWidth() <= 0 || x < 0 || y < 0) return ( GXColor ) - { 0, 0, 0, 0}; - - u32 offset = (((y >> 2) << 4) * this->GetWidth()) + ((x >> 2) << 6) + (((y % 4 << 2) + x % 4) << 1); - GXColor color; - color.a = *(image + offset); - color.r = *(image + offset + 1); - color.g = *(image + offset + 32); - color.b = *(image + offset + 33); - return color; -} - -void GuiImage::SetPixel(int x, int y, GXColor color) -{ - LOCK( this ); - if (!image || this->GetWidth() <= 0 || x < 0 || y < 0) return; - - u32 offset = (((y >> 2) << 4) * this->GetWidth()) + ((x >> 2) << 6) + (((y % 4 << 2) + x % 4) << 1); - *(image + offset) = color.a; - *(image + offset + 1) = color.r; - *(image + offset + 32) = color.g; - *(image + offset + 33) = color.b; -} - -void GuiImage::SetGrayscale(void) -{ - LOCK( this ); - GXColor color; - u32 offset, gray; - - for (int x = 0; x < width; x++) - { - for (int y = 0; y < height; y++) - { - offset = (((y >> 2) << 4) * width) + ((x >> 2) << 6) + (((y % 4 << 2) + x % 4) << 1); - color.r = *(image + offset + 1); - color.g = *(image + offset + 32); - color.b = *(image + offset + 33); - - gray = (77 * color.r + 150 * color.g + 28 * color.b) / 255; - - *(image + offset + 1) = gray; - *(image + offset + 32) = gray; - *(image + offset + 33) = gray; - } - } - - int len = width * height * 4; - if (len % 32) len += (32 - len % 32); - DCFlushRange(image, len); -} - -void GuiImage::SetStripe(int s) -{ - LOCK( this ); - stripe = s; -} - -void GuiImage::SetSkew(int XX1, int YY1, int XX2, int YY2, int XX3, int YY3, int XX4, int YY4) -{ - - xx1 = XX1; - yy1 = YY1; - xx2 = XX2; - yy2 = YY2; - xx3 = XX3; - yy3 = YY3; - xx4 = XX4; - yy4 = YY4; -} -void GuiImage::SetSkew(int *skew) -{ - - xx1 = *skew++; - yy1 = *skew++; - xx2 = *skew++; - yy2 = *skew++; - xx3 = *skew++; - yy3 = *skew++; - xx4 = *skew++; - yy4 = *skew; -} - -void GuiImage::ColorStripe(int shift) -{ - LOCK( this ); - int x, y; - GXColor color; - int alt = 0; - - for (y = 0; y < this->GetHeight(); y++) - { - if (y % 3 == 0) alt ^= 1; - - for (x = 0; x < this->GetWidth(); x++) - { - color = GetPixel(x, y); - - if (alt) - { - if (color.r < 255 - shift) - color.r += shift; - else color.r = 255; - if (color.g < 255 - shift) - color.g += shift; - else color.g = 255; - if (color.b < 255 - shift) - color.b += shift; - else color.b = 255; - - color.a = 255; - } - else - { - if (color.r > shift) - color.r -= shift; - else color.r = 0; - if (color.g > shift) - color.g -= shift; - else color.g = 0; - if (color.b > shift) - color.b -= shift; - else color.b = 0; - - color.a = 255; - } - SetPixel(x, y, color); - } - } - - int len = width * height * 4; - if (len % 32) len += (32 - len % 32); - DCFlushRange(image, len); -} - -/** - * Draw the button on screen - */ - -void GuiImage::Draw() -{ - LOCK( this ); - if (!image || !this->IsVisible() || tile == 0) return; - - float currScale = this->GetScale(); - int currLeft = this->GetLeft(); - - float currAngleDyn = this->GetAngleDyn(); - - if (currAngleDyn && parentangle) imageangle = currAngleDyn; - - if (tile > 0) - { - for (int i = 0; i < tile; i++) - Menu_DrawImg(currLeft + width * i, this->GetTop(), zoffset, width, height, image, imageangle, - widescreen ? currScale * 0.80 : currScale, currScale, this->GetAlpha(), xx1, yy1, xx2, yy2, xx3, - yy3, xx4, yy4); - } - else - { - // temporary (maybe), used to correct offset for scaled images - if (scale != 1) currLeft = currLeft - width / 2 + (width * scale) / 2; - - Menu_DrawImg(currLeft, this->GetTop(), zoffset, width, height, image, imageangle, widescreen ? currScale * 0.80 - : currScale, currScale, this->GetAlpha(), xx1, yy1, xx2, yy2, xx3, yy3, xx4, yy4); - } - - if (stripe > 0) for (int y = 0; y < this->GetHeight(); y += 6) - Menu_DrawRectangle(currLeft, this->GetTop() + y, this->GetWidth(), 3, ( GXColor ) - { 0, 0, 0, stripe}, 1); - - this->UpdateEffects(); -} diff --git a/source/libwiigui/gui_image_async.cpp b/source/libwiigui/gui_image_async.cpp deleted file mode 100644 index a2ad15ad..00000000 --- a/source/libwiigui/gui_image_async.cpp +++ /dev/null @@ -1,149 +0,0 @@ -/**************************************************************************** - * USB Loader GX - * - * gui_imagea_sync.cpp - ***************************************************************************/ -#include -#include "gui_image_async.h" - -std::vector GuiImageAsync::List; -lwp_t GuiImageAsync::Thread = LWP_THREAD_NULL; -mutex_t GuiImageAsync::ListLock = LWP_THREAD_NULL; -GuiImageAsync * GuiImageAsync::InUse = NULL; -u32 GuiImageAsync::ThreadCount = 0; -bool GuiImageAsync::ThreadSleep = true; -bool GuiImageAsync::CloseThread = false; - -static inline void * memdup(const void* src, size_t len) -{ - if(!src) return NULL; - - void *dst = malloc(len); - if (dst) memcpy(dst, src, len); - return dst; -} - -static GuiImageData * StdImageLoaderCallback(void *arg) -{ - return new GuiImageData((char *) arg); -} - -GuiImageAsync::GuiImageAsync(const char *Filename, GuiImageData * PreloadImg) : - GuiImage(PreloadImg), imgData(NULL), callback(StdImageLoaderCallback), arg(strdup(Filename)) -{ - ThreadInit(); - ThreadAddImage(this); -} - -GuiImageAsync::GuiImageAsync(ImageLoaderCallback Callback, const void * Arg, int ArgLen, GuiImageData * PreloadImg) : - GuiImage(PreloadImg), imgData(NULL), callback(Callback), arg(memdup(Arg, ArgLen)) -{ - ThreadInit(); - ThreadAddImage(this); -} - -GuiImageAsync::~GuiImageAsync() -{ - ThreadRemoveImage(this); - ThreadExit(); - while(InUse == this) usleep(100); - if (imgData) delete imgData; - if (arg) free(arg); -} - -void GuiImageAsync::ThreadAddImage(GuiImageAsync *Image) -{ - LWP_MutexLock(ListLock); - List.push_back(Image); - LWP_MutexUnlock(ListLock); - ThreadSleep = false; - LWP_ResumeThread(Thread); -} - -void GuiImageAsync::ThreadRemoveImage(GuiImageAsync *Image) -{ - for(u32 i = 0; i < List.size(); ++i) - { - if(List[i] == Image) - { - LWP_MutexLock(ListLock); - List.erase(List.begin()+i); - LWP_MutexUnlock(ListLock); - break; - } - } -} - -void GuiImageAsync::ClearQueue() -{ - LWP_MutexLock(ListLock); - List.clear(); - LWP_MutexUnlock(ListLock); -} - -void * GuiImageAsync::GuiImageAsyncThread(void *arg) -{ - while(!CloseThread) - { - if(ThreadSleep) - LWP_SuspendThread(Thread); - - while(!List.empty() && !CloseThread) - { - LWP_MutexLock(ListLock); - InUse = List.front(); - List.erase(List.begin()); - LWP_MutexUnlock(ListLock); - - if (!InUse) - continue; - - InUse->imgData = InUse->callback(InUse->arg); - - if (InUse->imgData && InUse->imgData->GetImage()) - { - InUse->width = InUse->imgData->GetWidth(); - InUse->height = InUse->imgData->GetHeight(); - InUse->image = InUse->imgData->GetImage(); - } - - InUse = NULL; - } - - ThreadSleep = true; - } - - return NULL; -} - -u32 GuiImageAsync::ThreadInit() -{ - if (Thread == LWP_THREAD_NULL) - { - LWP_MutexInit(&ListLock, false); - LWP_CreateThread(&Thread, GuiImageAsyncThread, NULL, NULL, 32768, 80); - } - return ++ThreadCount; -} - -u32 GuiImageAsync::ThreadExit() -{ - //! We don't need to always shutdown and startup the thread, especially - //! since this is a nested startup/shutdown from the gui thread. - //! It's fine with being put to suspended only. - /* - if (--ThreadCount == 0) - { - CloseThread = true; - LWP_ResumeThread(Thread); - LWP_JoinThread(Thread, NULL); - LWP_MutexUnlock(ListLock); - LWP_MutexDestroy(ListLock); - Thread = LWP_THREAD_NULL; - ListLock = LWP_MUTEX_NULL; - ListLock = LWP_MUTEX_NULL; - } - */ - return --ThreadCount; -} - diff --git a/source/libwiigui/gui_image_async.h b/source/libwiigui/gui_image_async.h deleted file mode 100644 index 3f440b4a..00000000 --- a/source/libwiigui/gui_image_async.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef _GUIIMAGEASYNC_H_ -#define _GUIIMAGEASYNC_H_ - -#include -#include "libwiigui/gui.h" - -typedef GuiImageData * (*ImageLoaderCallback)(void *arg); - -class GuiImageAsync: public GuiImage -{ - public: - GuiImageAsync(const char *Filename, GuiImageData * PreloadImg); - GuiImageAsync(ImageLoaderCallback Callback, const void *Arg, int ArgLen, GuiImageData * PreloadImg); - ~GuiImageAsync(); - - static void ClearQueue(); - private: - GuiImageData *imgData; - ImageLoaderCallback callback; - void *arg; - - static void * GuiImageAsyncThread(void *arg); - static void ThreadAddImage(GuiImageAsync* Image); - static void ThreadRemoveImage(GuiImageAsync* Image); - static u32 ThreadInit(); - static u32 ThreadExit(); - - static std::vector List; - static lwp_t Thread; - static mutex_t ListLock; - static GuiImageAsync * InUse; - static u32 ThreadCount; - static bool ThreadSleep; - static bool CloseThread; -}; - -#endif /*_GUIIMAGEASYNC_H_*/ diff --git a/source/libwiigui/gui_imagedata.cpp b/source/libwiigui/gui_imagedata.cpp deleted file mode 100644 index f902b9b1..00000000 --- a/source/libwiigui/gui_imagedata.cpp +++ /dev/null @@ -1,195 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#include "gui.h" -#include "ImageOperations/TextureConverter.h" -#include "ImageOperations/TplImage.h" -#include "FileOperations/fileops.h" -#include "utils/ResourceManager.h" - -#define ALIGN32(x) (((x) + 31) & ~31) - -/** - * Constructor for the GuiImageData class. - */ -GuiImageData::GuiImageData(const char * filepath) -{ - data = NULL; - width = 0; - height = 0; - format = GX_TF_RGBA8; - - u8 *buffer = NULL; - u64 size = 0; - - if(LoadFileToMem(filepath, &buffer, &size) < 0) - return; - - LoadImage(buffer, size); - - if(buffer) - free(buffer); -} - -GuiImageData::GuiImageData(const u8 * img, int imgSize, bool cache) -{ - data = NULL; - width = 0; - height = 0; - format = GX_TF_RGBA8; - - if(cache) - { - ImageData * Image = ResourceManager::GetImageData(img); - if(Image != NULL && Image->data != NULL) - { - data = Image->data; - width = Image->width; - height = Image->height; - format = Image->format; - return; - } - } - - LoadImage(img, imgSize); - - if(data && cache) - { - ImageData NewImage; - NewImage.data = data; - NewImage.width = width; - NewImage.height = height; - NewImage.format = format; - ResourceManager::AddImageData(img, NewImage); - } -} - -/** - * Destructor for the GuiImageData class. - */ -GuiImageData::~GuiImageData() -{ - if(data) - ResourceManager::Remove(data); -} - -void GuiImageData::LoadImage(const u8 * img, int imgSize) -{ - if(!img) - return; - - else if (imgSize < 8) - { - return; - } - else if (img[0] == 0x89 && img[1] == 'P' && img[2] == 'N' && img[3] == 'G') - { - // IMAGE_PNG - LoadPNG(img, imgSize); - } - else if (img[0] == 0xFF && img[1] == 0xD8) - { - // IMAGE_JPEG - LoadJpeg(img, imgSize); - } - else if (img[0] == 'B' && img[1] == 'M') - { - // IMAGE_BMP - LoadBMP(img, imgSize); - } - else if (img[0] == 'G' && img[1] == 'I' && img[2] == 'F') - { - // IMAGE_GIF - LoadGIF(img, imgSize); - } - else if (img[0] == 0x00 && img[1] == 0x20 && img[2] == 0xAF && img[3] == 0x30) - { - // IMAGE_TPL - LoadTPL(img, imgSize); - } -} - -void GuiImageData::LoadPNG(const u8 *img, int imgSize) -{ - gdImagePtr gdImg = gdImageCreateFromPngPtr(imgSize, (u8*) img); - if(gdImg == 0) - return; - - data = GDImageToRGBA8(&gdImg, &width, &height); - gdImageDestroy(gdImg); -} - -void GuiImageData::LoadJpeg(const u8 *img, int imgSize) -{ - gdImagePtr gdImg = gdImageCreateFromJpegPtr(imgSize, (u8*) img); - if(gdImg == 0) - return; - - data = GDImageToRGBA8(&gdImg, &width, &height); - gdImageDestroy(gdImg); -} - -void GuiImageData::LoadGIF(const u8 *img, int imgSize) -{ - gdImagePtr gdImg = gdImageCreateFromGifPtr(imgSize, (u8*) img); - if(gdImg == 0) - return; - - data = GDImageToRGBA8(&gdImg, &width, &height); - gdImageDestroy(gdImg); -} - -void GuiImageData::LoadBMP(const u8 *img, int imgSize) -{ - gdImagePtr gdImg = gdImageCreateFromBmpPtr(imgSize, (u8*) img); - if(gdImg == 0) - return; - - data = GDImageToRGBA8(&gdImg, &width, &height); - gdImageDestroy(gdImg); -} - -void GuiImageData::LoadTPL(const u8 *img, int imgSize) -{ - TplImage TplFile(img, imgSize); - - width = TplFile.GetWidth(0); - height = TplFile.GetHeight(0); - format = (u8) TplFile.GetFormat(0); - - const u8 * ImgPtr = TplFile.GetTextureBuffer(0); - - if(ImgPtr) - { - int len = ALIGN32(TplFile.GetTextureSize(0)); - - data = (u8 *) memalign(32, len); - if(!data) - return; - - memcpy(data, ImgPtr, len); - DCFlushRange(data, len); - } -} diff --git a/source/libwiigui/gui_imagedata.h b/source/libwiigui/gui_imagedata.h deleted file mode 100644 index b263ce53..00000000 --- a/source/libwiigui/gui_imagedata.h +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#ifndef GUI_IMAGEDATA_H_ -#define GUI_IMAGEDATA_H_ - -#include -#include - -class GuiImageData -{ - public: - //!Constructor - //!\param img Image data - //!\param imgSize The image size - //!\param cache True if the resource manager should cache that address - GuiImageData(const u8 * img, int imgSize, bool cache = true); - //!Overload - GuiImageData(const char * filepath); - //!Destructor - ~GuiImageData(); - //!Gets a pointer to the image data - //!\return pointer to image data - u8 * GetImage() { return data; }; - //!Gets the image width - //!\return image width - int GetWidth() { return width; }; - //!Gets the image height - //!\return image height - int GetHeight() { return height; }; - //!Gets the texture format - u8 GetTextureFormat() { return format; }; - protected: - void LoadImage(const u8 * img, int imgSize); - void LoadPNG(const u8 *img, int imgSize); - void LoadBMP(const u8 *img, int imgSize); - void LoadJpeg(const u8 *img, int imgSize); - void LoadGIF(const u8 *img, int imgSize); - void LoadTPL(const u8 *img, int imgSize); - - u8 * data; //!< Image data - int height; //!< Height of image - int width; //!< Width of image - u8 format; //!< Texture format -}; - -#endif diff --git a/source/libwiigui/gui_keyboard.cpp b/source/libwiigui/gui_keyboard.cpp deleted file mode 100644 index 8f3c5fc5..00000000 --- a/source/libwiigui/gui_keyboard.cpp +++ /dev/null @@ -1,608 +0,0 @@ -/**************************************************************************** - * libwiigui - * - * Tantric 2009 - * - * gui_keyboard.cpp - * - * GUI class definitions - ***************************************************************************/ - -#include "gui.h" -#include "../main.h" -#include "../settings/CSettings.h" -#include -#include -#include "themes/CTheme.h" -#include "menu.h" -/** - * Constructor for the GuiKeyboard class. - */ -unsigned int m; -//const Key thekeys; -GuiKeyboard::GuiKeyboard(char * t, u32 max, int min, int lang) -{ - width = 540; - height = 400; - shift = 0; - caps = 0; - alt = 0; - alt2 = 0; - m = min; - int mode = lang; - selectable = true; - focus = 0; // allow focus - alignmentHor = ALIGN_CENTRE; - alignmentVert = ALIGN_MIDDLE; - kbtextmaxlen = max > sizeof(kbtextstr) ? sizeof(kbtextstr) : max; // limit max up to sizeof(kbtextstr) - // strlcpy(kbtextstr, t, kbtextmaxlen); - strncpy(kbtextstr, t, kbtextmaxlen); // strncpy is needed to fill the rest with \0 - kbtextstr[sizeof(kbtextstr) - 1] = 0; // terminate with \0 - //QWERTY// - if (mode == 0) - { - Key thekeys[4][11] = { - { - { '1', '!', '\0', '\0' }, - { '2', '@', '\0', '\0' }, - { '3', '#', '\0', '\0' }, - { '4', '$', '\0', '\0' }, - { '5', '%', '\0', '\0' }, - { '6', '^', '\0', '\0' }, - { '7', '&', '\0', '\0' }, - { '8', '*', '\0', '\0' }, - { '9', '(', '\0', '\0' }, - { '0', ')', '\0', '\0' }, - { '\0', '\0', '\0', '\0' } - }, - { - { 'q', 'Q', '\0', '\0' }, - { 'w', 'W', '\0', '\0' }, - { 'e', 'E', '\0', '\0' }, - { 'r', 'R', '\0', '\0' }, - { 't', 'T', '\0', '\0' }, - { 'y', 'Y', '\0', '\0' }, - { 'u', 'U', '\0', '\0' }, - { 'i', 'I', '\0', '\0' }, - { 'o', 'O', '\0', '\0' }, - { 'p', 'P', '\0', '\0' }, - { '-', '_', '\0', '\0' } - }, - { - { 'a', 'A', '\0', '\0' }, - { 's', 'S', '\0', '\0' }, - { 'd', 'D', '\0', '\0' }, - { 'f', 'F', '\0', '\0' }, - { 'g', 'G', '\0', '\0' }, - { 'h', 'H', '\0', '\0' }, - { 'j', 'J', '\0', '\0' }, - { 'k', 'K', '\0', '\0' }, - { 'l', 'L', '\0', '\0' }, - { ':', ';', '\0', '\0' }, - { '\'', '"', '\0', '\0' } - }, - { - { 'z', 'Z', '\0', '\0' }, - { 'x', 'X', '\0', '\0' }, - { 'c', 'C', '\0', '\0' }, - { 'v', 'V', '\0', '\0' }, - { 'b', 'B', '\0', '\0' }, - { 'n', 'N', '\0', '\0' }, - { 'm', 'M', '\0', '\0' }, - { ',', '<', '\0', '\0' }, - { '.', '>', '\0', '\0' }, - { '/', '?', '\0', '\0' }, - { '\0', '\0', '\0', '\0' } - } - }; - - memcpy(keys, thekeys, sizeof(thekeys)); - } - //DVORAK// - if (mode == 1) - { - Key thekeys[4][11] = { - { - { '1', '!', '\0', '\0' }, - { '2', '@', '\0', '\0' }, - { '3', '#', '\0', '\0' }, - { '4', '$', '\0', '\0' }, - { '5', '%', '\0', '\0' }, - { '6', '^', '\0', '\0' }, - { '7', '&', '\0', '\0' }, - { '8', '*', '\0', '\0' }, - { '9', '(', '\0', '\0' }, - { '0', ')', '\0', '\0' }, - { '\0', '\0', '\0', '\0' } - }, - { - { '\'', '"', '\0', '\0' }, - { ',', '<', '\0', '\0' }, - { '.', '>', '\0', '\0' }, - { 'p', 'P', '\0', '\0' }, - { 'y', 'Y', '\0', '\0' }, - { 'f', 'F', '\0', '\0' }, - { 'g', 'G', '\0', '\0' }, - { 'c', 'C', '\0', '\0' }, - { 'r', 'R', '\0', '\0' }, - { 'l', 'L', '\0', '\0' }, - { '/', '?', '\0', '\0' } - }, - { - { 'a', 'A', 'm', '\0' }, - { 'o', 'O', 'm', '\0' }, - { 'e', 'E', 'm', '\0' }, - { 'u', 'U', 'm', '\0' }, - { 'i', 'I', 'm', '\0' }, - { 'd', 'D', 'm', '\0' }, - { 'h', 'H', 'm', '\0' }, - { 't', 'T', 'm', '\0' }, - { 'n', 'N', 'm', '\0' }, - { 's', 'S', 'm', '\0' }, - { '-', '_', 'm', '\0' } - }, - { - { ';', ':', '\0', '\0' }, - { 'q', 'Q', '\0', '\0' }, - { 'j', 'J', '\0', '\0' }, - { 'k', 'K', '\0', '\0' }, - { 'x', 'X', '\0', '\0' }, - { 'b', 'B', '\0', '\0' }, - { 'm', 'M', '\0', '\0' }, - { 'w', 'W', '\0', '\0' }, - { 'v', 'V', '\0', '\0' }, - { 'z', 'Z', '\0', '\0' }, - { '\0', '\0', '\0', '\0' } - } - }; - memcpy(keys, thekeys, sizeof(thekeys)); - } - //QWETRZ// - if (mode == 2) - { - Key thekeys[4][11] = { { { '1', '!', '^', '' }, { '2', '"', '', '' }, { '3', '#', '', '' }, { '4', '$', - '', '' }, { '5', '%', '', '' }, { '6', '&', '', '' }, { '7', '/', '', '' }, { '8', '(', '[', - '' }, { '9', ')', ']', '' }, { '0', '=', '', '' }, { '', '?', '\'', '' } }, { { 'q', 'Q', '@', - '' }, { 'w', 'W', '\0', '' }, { 'e', 'E', '', '' }, { 'r', 'R', '\0', '' }, - { 't', 'T', '\0', '' }, { 'z', 'Z', '\0', '' }, { 'u', 'U', '\0', '' }, { 'i', 'I', '\0', '' }, { - 'o', 'O', '\0', '' }, { 'p', 'P', '\0', '' }, { '', '', '\0', '' } }, { { 'a', 'A', '\0', - '' }, { 's', 'S', '\0', '' }, { 'd', 'D', '\0', '' }, { 'f', 'F', '\0', '' }, - { 'g', 'G', '\0', '' }, { 'h', 'H', '\0', '' }, { 'j', 'J', '\0', '' }, { 'k', 'K', '\0', '' }, { - 'l', 'L', '\0', '' }, { '', '', '\0', '' }, { '', '', '\0', '' } }, { { '<', '>', '|', - '' }, { 'y', 'Y', '\0', '' }, { 'x', 'X', '\0', '' }, { 'c', 'C', '', '' }, - { 'v', 'V', '', '' }, { 'b', 'B', '\0', '' }, { 'n', 'N', '\0', '' }, { 'm', 'M', '', '' }, { - ',', ';', '\0', '' }, { '.', ':', '\0', '\0' }, { '-', '_', '\0', '\0' } } }; - memcpy(keys, thekeys, sizeof(thekeys)); - } - //AZERTY// - if (mode == 3) - { - Key thekeys[4][11] = { { { '1', '&', '', '' }, { '2', '~', '', '' }, { '3', '"', '#', '' }, { '4', '`', - '', '' }, { '5', '(', '[', '' }, { '6', '-', '|', '' }, { '7', '', '', '' }, { '8', '_', '\'', - '' }, { '9', '+', '^', '' }, { '0', '=', '@', '' }, { '', ')', ']', '' } }, { - { 'a', 'A', '', '' }, { 'z', 'Z', '', '' }, { 'e', 'E', '', '' }, { 'r', 'R', '', '' }, { 't', - 'T', '', '' }, { 'y', 'Y', '', '' }, { 'u', 'U', '', '' }, { 'i', 'I', '', '' }, { 'o', - 'O', '', '' }, { 'p', 'P', '', '' }, { '$', '', '', '' } }, { { 'q', 'Q', '', '' }, { - 's', 'S', '', '' }, { 'd', 'D', '\0', '' }, { 'f', 'F', '', '' }, { 'g', 'G', '\0', '' }, { 'h', - 'H', '\0', '' }, { 'j', 'J', '\0', '' }, { 'k', 'K', '\0', '' }, { 'l', 'L', '\0', '' }, { 'm', - 'M', '\0', '' }, { '*', '%', '', '' } }, { { '<', '>', '\0', '' }, { 'w', 'W', '\0', '' }, { 'x', - 'X', '\0', '' }, { 'c', 'C', '', '' }, { 'v', 'V', '', '' }, { 'b', 'B', '', '' }, { 'n', 'N', - '\0', '' }, { '?', ',', '?', '' }, { '.', ';', '.', '' }, { '/', ':', '/', '' }, { '', '!', '!', - '' } } }; - memcpy(keys, thekeys, sizeof(thekeys)); - } - //QWERTY 2// - if (mode == 4) - { - Key thekeys[4][11] = { { { '1', '!', '|', '' }, { '2', '"', '@', '' }, { '3', '', '#', '' }, { '4', '$', - '', '' }, { '5', '%', '~', '' }, { '6', '&', '', '' }, { '7', '/', '\'', '' }, { '8', '(', '[', - '' }, { '9', ')', ']', '' }, { '0', '=', '', '' }, { '', '?', '', '' } }, { { 'q', 'Q', '\0', - '' }, { 'w', 'W', '\0', '' }, { 'e', 'E', '', '' }, { 'r', 'R', '', '' }, { 't', 'T', '', '' }, - { 'y', 'Y', '', '' }, { 'u', 'U', '', '' }, { 'i', 'I', '', '' }, { 'o', 'O', '', '' }, { 'p', - 'P', '', '' }, { '+', '*', '\0', '' } }, { { 'a', 'A', '^', '' }, { 's', 'S', '', '' }, { - 'd', 'D', '', '' }, { 'f', 'F', '', '' }, { 'g', 'G', '', '' }, { 'h', 'H', '', '' }, { 'j', - 'J', '', '' }, { 'k', 'K', '', '' }, { 'l', 'L', '', '\0' }, { '', '', '+', '\0' }, { '', '', - '', '\0' } }, { { '<', '>', '\0', '' }, { 'z', 'Z', '\0', '' }, { 'x', 'X', '\0', '' }, { 'c', 'C', - '', '' }, { 'v', 'V', '\0', '' }, { 'b', 'B', '', '' }, { 'n', 'N', '\0', '' }, { 'm', 'M', '\0', - '' }, { ',', ';', '\0', '' }, { '.', ':', '\0', '\0' }, { '-', '_', '\0', '\0' } } }; - memcpy(keys, thekeys, sizeof(thekeys)); - } - - keyTextbox = Resources::GetImageData("keyboard_textbox.png"); - keyTextboxImg = new GuiImage(keyTextbox); - keyTextboxImg->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - keyTextboxImg->SetPosition(0, 40);//(0,0); - this->Append(keyTextboxImg); - - kbText = new GuiText(kbtextstr, 20, ( GXColor ) - { 0, 0, 0, 0xff}); - kbText->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - kbText->SetPosition(0, 53);//(0, 13); - this->Append(kbText); - - key = Resources::GetImageData("keyboard_key.png"); - keyOver = Resources::GetImageData("keyboard_key_over.png"); - keyMedium = Resources::GetImageData("keyboard_mediumkey_over.png"); - keyLarge = Resources::GetImageData("keyboard_largekey_over.png"); - - trigA = new GuiTrigger; - trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - trigB = new GuiTrigger; - trigB->SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B); - - int eurocheck = 0; - if (mode > 1) - { - eurocheck = -20; - } - - keyBackImg = new GuiImage(keyMedium); - keyBackOverImg = new GuiImage(keyMedium); - if (mode == 3) - { - keyBackText = new GuiText("Retour", 20, ( GXColor ) - { 0, 0, 0, 0xff}); - } - else - { - keyBackText = new GuiText("Back", 20, ( GXColor ) - { 0, 0, 0, 0xff}); - } - //keyBack = new GuiButton(keyMedium->GetWidth(), keyMedium->GetHeight()); - keyBack = new GuiButton(keyBackImg, keyBackOverImg, 0, 3, 11 * 42 + 40 + eurocheck, 0 * 42 + 120, trigA, - btnSoundOver, btnSoundClick, 1); - //keyBack->SetImage(keyBackImg); - //keyBack->SetImageOver(keyBackOverImg); - keyBack->SetLabel(keyBackText); - //keyBack->SetSoundOver(btnSoundOver); - //keyBack->SetSoundClick(btnSoundClick); - //keyBack->SetTrigger(trigA); - keyBack->SetTrigger(trigB); - if (mode > 1) - { - keyBack->SetPosition(11 * 42 + 40 + eurocheck, 0 * 42 + 120); - } - else - { - keyBack->SetPosition(10 * 42 + 40 + eurocheck, 0 * 42 + 120); - }//(10*42+40, 0*42+80); - //keyBack->SetEffectGrow(); - this->Append(keyBack); - - keyClearImg = new GuiImage(keyMedium); - keyClearOverImg = new GuiImage(keyMedium); - if (mode == 3) - { - keyClearText = new GuiText("Effacer", 20, ( GXColor ) - { 0, 0, 0, 0xff}); - } - else - { - keyClearText = new GuiText("Clear", 20, ( GXColor ) - { 0, 0, 0, 0xff}); - } - keyClear = new GuiButton(keyClearImg, keyClearOverImg, 0, 3, (10 * 42 + 40) + eurocheck, 4 * 42 + 120, trigA, - btnSoundOver, btnSoundClick, 1); - //keyClear = new GuiButton(keyMedium->GetWidth(), keyMedium->GetHeight()); - //keyClear->SetImage(keyClearImg); - //keyClear->SetImageOver(keyClearOverImg); - keyClear->SetLabel(keyClearText); - //keyClear->SetSoundOver(btnSoundOver); - //keyClear->SetSoundClick(btnSoundClick); - //keyClear->SetTrigger(trigA); - //keyClear->SetPosition((10*42+40)+eurocheck, 4*42+120);//(10*42+40, 0*42+80); - //keyClear->SetEffectGrow(); - this->Append(keyClear); - - keyAltImg = new GuiImage(keyMedium); - keyAltOverImg = new GuiImage(keyMedium); - keyAltText = new GuiText("Alt Gr", 20, ( GXColor ) - { 0, 0, 0, 0xff}); - keyAlt = new GuiButton(keyAltImg, keyAltOverImg, 0, 3, 84 + eurocheck, 4 * 42 + 120, trigA, btnSoundOver, - btnSoundClick, 1); - //keyAlt = new GuiButton(keyMedium->GetWidth(), keyMedium->GetHeight()); - //keyAlt->SetImage(keyAltImg); - //keyAlt->SetImageOver(keyAltOverImg); - keyAlt->SetLabel(keyAltText); - //keyAlt->SetSoundOver(btnSoundOver); - //keyAlt->SetSoundClick(btnSoundClick); - //keyAlt->SetTrigger(trigA); - //keyAlt->SetPosition(84+eurocheck, 4*42+120);//(10*42+40, 4*42+120); - //keyAlt->SetEffectGrow(); - if (mode > 1) - { - this->Append(keyAlt); - } - - keyAlt2Img = new GuiImage(keyMedium); - keyAlt2OverImg = new GuiImage(keyMedium); - keyAlt2Text = new GuiText("Accent", 20, ( GXColor ) - { 0, 0, 0, 0xff}); - keyAlt2 = new GuiButton(keyAlt2Img, keyAlt2OverImg, 0, 3, (8 * 42 + 40) + eurocheck, 4 * 42 + 120, trigA, - btnSoundOver, btnSoundClick, 1); - //keyAlt2 = new GuiButton(keyMedium->GetWidth(), keyMedium->GetHeight()); - //keyAlt2->SetImage(keyAlt2Img); - //keyAlt2->SetImageOver(keyAlt2OverImg); - keyAlt2->SetLabel(keyAlt2Text); - //keyAlt2->SetSoundOver(btnSoundOver); - //keyAlt2->SetSoundClick(btnSoundClick); - //keyAlt2->SetTrigger(trigA); - //keyAlt2->SetPosition((8*42+40)+eurocheck, 4*42+120);//(10*42+40, 4*42+120); - //keyAlt2->SetEffectGrow(); - if (mode > 1) - { - this->Append(keyAlt2); - } - - keyCapsImg = new GuiImage(keyMedium); - keyCapsOverImg = new GuiImage(keyMedium); - keyCapsText = new GuiText("Caps", 20, ( GXColor ) - { 0, 0, 0, 0xff}); - keyCaps = new GuiButton(keyCapsImg, keyCapsOverImg, 0, 3, 0 + eurocheck, 2 * 42 + 120, trigA, btnSoundOver, - btnSoundClick, 1); - //keyCaps = new GuiButton(keyMedium->GetWidth(), keyMedium->GetHeight()); - //keyCaps->SetImage(keyCapsImg); - //keyCaps->SetImageOver(keyCapsOverImg); - keyCaps->SetLabel(keyCapsText); - //keyCaps->SetSoundOver(btnSoundOver); - //keyCaps->SetSoundClick(btnSoundClick); - //keyCaps->SetTrigger(trigA); - //keyCaps->SetPosition(0+eurocheck, 2*42+120);//(0, 2*42+80); - //keyCaps->SetEffectGrow(); - this->Append(keyCaps); - - keyShiftImg = new GuiImage(keyMedium); - keyShiftOverImg = new GuiImage(keyMedium); - keyShiftText = new GuiText("Shift", 20, ( GXColor ) - { 0, 0, 0, 0xff}); - keyShift = new GuiButton(keyShiftImg, keyShiftOverImg, 0, 3, 21 + eurocheck, 3 * 42 + 120, trigA, btnSoundOver, - btnSoundClick, 1); - //keyShift = new GuiButton(keyMedium->GetWidth(), keyMedium->GetHeight()); - //keyShift->SetImage(keyShiftImg); - //keyShift->SetImageOver(keyShiftOverImg); - keyShift->SetLabel(keyShiftText); - //keyShift->SetSoundOver(btnSoundOver); - //keyShift->SetSoundClick(btnSoundClick); - //keyShift->SetTrigger(trigA); - //keyShift->SetPosition(21+eurocheck, 3*42+120);//(21, 3*42+80); - //keyShift->SetEffectGrow(); - this->Append(keyShift); - - keySpaceImg = new GuiImage(keyLarge); - keySpaceOverImg = new GuiImage(keyLarge); - keySpace = new GuiButton(keySpaceImg, keySpaceOverImg, 2, 3, 0 + eurocheck, 4 * 42 + 120, trigA, btnSoundOver, - btnSoundClick, 1); - //keySpace = new GuiButton(keyLarge->GetWidth(), keyLarge->GetHeight()); - //keySpace->SetImage(keySpaceImg); - //keySpace->SetImageOver(keySpaceOverImg); - //keySpace->SetSoundOver(btnSoundOver); - //keySpace->SetSoundClick(btnSoundClick); - //keySpace->SetTrigger(trigA); - //keySpace->SetPosition(0+eurocheck, 4*42+120);//(0, 4*42+80); - //keySpace->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - //keySpace->SetEffectGrow(); - this->Append(keySpace); - - char txt[2] = { 0, 0 }; - for (int i = 0; i < 4; i++) - { - for (int j = 0; j < 11; j++) - { - if (keys[i][j].ch != '\0') - { - keyImg[i][j] = new GuiImage(key); - keyImgOver[i][j] = new GuiImage(keyOver); - txt[0] = keys[i][j].ch; - keyTxt[i][j] = new GuiText(txt, 20, ( GXColor ) - { 0, 0, 0, 0xff}); - keyTxt[i][j]->SetAlignment(ALIGN_CENTRE, ALIGN_BOTTOM); - keyTxt[i][j]->SetPosition(0, -10); - keyBtn[i][j] = new GuiButton(keyImg[i][j], keyImgOver[i][j], 0, 3, (j * 42 + 21 * i + 40) + eurocheck, - i * 42 + 120, trigA, btnSoundOver, btnSoundClick, 1); - //keyBtn[i][j] = new GuiButton(key->GetWidth(), key->GetHeight()); - //keyBtn[i][j]->SetImage(keyImg[i][j]); - //keyBtn[i][j]->SetImageOver(keyImgOver[i][j]); - //keyBtn[i][j]->SetSoundOver(btnSoundOver); - //keyBtn[i][j]->SetSoundClick(btnSoundClick); - //keyBtn[i][j]->SetTrigger(trigA); - keyBtn[i][j]->SetLabel(keyTxt[i][j]); - //keyBtn[i][j]->SetPosition((j*42+21*i+40)+eurocheck, i*42+120);//SetPosition(j*42+21*i+40, i*42+80); - //keyBtn[i][j]->SetEffectGrow(); - this->Append(keyBtn[i][j]); - } - } - } -} - -/** - * Destructor for the GuiKeyboard class. - */ -GuiKeyboard::~GuiKeyboard() -{ - delete kbText; - delete keyTextbox; - delete keyTextboxImg; - delete keyCapsText; - delete keyCapsImg; - delete keyCapsOverImg; - delete keyCaps; - delete keyShiftText; - delete keyShiftImg; - delete keyShiftOverImg; - delete keyShift; - if (keyAlt) - { - delete keyAlt; - } - if (keyAlt2) - { - delete keyAlt2; - } - delete keyBackText; - delete keyBackImg; - delete keyBackOverImg; - delete keyBack; - delete keySpaceImg; - delete keySpaceOverImg; - delete keySpace; - delete key; - delete keyOver; - delete keyMedium; - delete keyLarge; - delete trigA; - delete trigB; - - for (int i = 0; i < 4; i++) - { - for (int j = 0; j < 11; j++) - { - if (keys[i][j].ch != '\0') - { - delete keyImg[i][j]; - delete keyImgOver[i][j]; - delete keyTxt[i][j]; - delete keyBtn[i][j]; - } - } - } -} - -void GuiKeyboard::Update(GuiTrigger * t) -{ - LOCK( this ); - if (_elements.size() == 0 || (state == STATE_DISABLED && parentElement)) return; - - for (u8 i = 0; i < _elements.size(); i++) - { - try - { - _elements.at(i)->Update(t); - } - catch (const std::exception& e) - { - } - } - - bool changedShiftKey = false; - - if (keySpace->GetState() == STATE_CLICKED) - { - if (strlen(kbtextstr) < kbtextmaxlen - 1) // -1 --> kbtextmaxlen means with terminating '\0' - { - kbtextstr[strlen(kbtextstr)] = ' '; - kbText->SetText(kbtextstr); - } - keySpace->SetState(STATE_SELECTED, t->chan); - } - else if (keyBack->GetState() == STATE_CLICKED) - { - if (strlen(kbtextstr) > (m)) - { - kbtextstr[strlen(kbtextstr) - 1] = 0; - kbText->SetText(kbtextstr); - } - keyBack->SetState(STATE_SELECTED, t->chan); - } - else if (keyClear->GetState() == STATE_CLICKED) - { - while (strlen(kbtextstr) > (m)) - { - kbtextstr[strlen(kbtextstr) - 1] = 0; - kbText->SetText(kbtextstr); - } - keyClear->SetState(STATE_SELECTED, t->chan); - } - else if (keyShift->GetState() == STATE_CLICKED) - { - changedShiftKey = true; - shift ^= 1; - if (alt) alt ^= 1; - if (alt2) alt2 ^= 1; - keyShift->SetState(STATE_SELECTED, t->chan); - } - else if (keyAlt->GetState() == STATE_CLICKED) - { - changedShiftKey = true; - alt ^= 1; - if (shift) shift ^= 1; - if (alt2) alt2 ^= 1; - keyAlt->SetState(STATE_SELECTED, t->chan); - } - else if (keyAlt2->GetState() == STATE_CLICKED) - { - changedShiftKey = true; - alt2 ^= 1; - if (shift) shift ^= 1; - if (alt) alt ^= 1; - keyAlt2->SetState(STATE_SELECTED, t->chan); - } - else if (keyCaps->GetState() == STATE_CLICKED) - { - changedShiftKey = true; - caps ^= 1; - keyCaps->SetState(STATE_SELECTED, t->chan); - } - - bool update = false; - - char txt[2] = { 0, 0 }; - - do - { - update = false; - for (int i = 0; i < 4; i++) - { - for (int j = 0; j < 11; j++) - { - if (keys[i][j].ch != '\0') - { - if (shift || caps) - txt[0] = keys[i][j].chShift; - else if (alt) - txt[0] = keys[i][j].chalt; - else if (alt2) - txt[0] = keys[i][j].chalt2; - else txt[0] = keys[i][j].ch; - - if (changedShiftKey) // change text only if needed - keyTxt[i][j]->SetText(txt); - - if (keyBtn[i][j]->GetState() == STATE_CLICKED) - { - if (strlen(kbtextstr) < kbtextmaxlen - 1) // -1 --> kbtextmaxlen means with term. '\0' - { - kbtextstr[strlen(kbtextstr)] = txt[0]; - kbText->SetText(kbtextstr); - } - keyBtn[i][j]->SetState(STATE_SELECTED, t->chan); - - if (shift || alt || alt2) - { - if (shift) shift ^= 1; - if (alt) alt ^= 1; - if (alt2) alt2 ^= 1; - update = true; - changedShiftKey = true; - } - } - } - } - } - } while (update); - - kbText->SetPosition(0, 53); - - this->ToggleFocus(t); - - if (focus) // only send actions to this window if it's in focus - { - // pad/joystick navigation - if (t->Right()) - this->MoveSelectionHor(1); - else if (t->Left()) - this->MoveSelectionHor(-1); - else if (t->Down()) - this->MoveSelectionVert(1); - else if (t->Up()) this->MoveSelectionVert(-1); - } -} diff --git a/source/libwiigui/gui_numpad.cpp b/source/libwiigui/gui_numpad.cpp deleted file mode 100644 index 726b3aaa..00000000 --- a/source/libwiigui/gui_numpad.cpp +++ /dev/null @@ -1,195 +0,0 @@ -/**************************************************************************** - * USB Loader GX - * - * r-win 2009 - * - * gui_numpad.cpp - * - * GUI class definitions - ***************************************************************************/ - -#include "gui.h" -#include "../main.h" -#include "../settings/CSettings.h" -#include -#include -/** - * Constructor for the GuiNumpad class. - */ - -GuiNumpad::GuiNumpad(char * t, u32 max) -{ - width = 400; - height = 370; - selectable = true; - focus = 0; // allow focus - alignmentHor = ALIGN_CENTRE; - alignmentVert = ALIGN_MIDDLE; - kbtextmaxlen = max > sizeof(kbtextstr) ? sizeof(kbtextstr) : max; // limit max up to sizeof(kbtextstr) - // strlcpy(kbtextstr, t, kbtextmaxlen); - strncpy(kbtextstr, t, kbtextmaxlen); // strncpy is needed to fill the rest with \0 - kbtextstr[sizeof(kbtextstr) - 1] = 0; // terminate with \0 - - char thekeys[11] = { '1', '2', '3', '4', '5', '6', '7', '8', '9', '\0', '0' }; - memcpy(keys, thekeys, sizeof(thekeys)); - - keyTextbox = new GuiImageData("keyboard_textbox.png"); - keyTextboxImg = new GuiImage(keyTextbox); - keyTextboxImg->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - keyTextboxImg->SetPosition(0, 40);//(0,0); - this->Append(keyTextboxImg); - - kbText = new GuiText(kbtextstr, 20, ( GXColor ) - { 0, 0, 0, 0xff}); - kbText->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - kbText->SetPosition(0, 53);//(0, 13); - kbText->SetPassChar('*'); - this->Append(kbText); - - keyMedium = new GuiImageData("keyboard_mediumkey_over.png"); - - trigA = new GuiTrigger; - trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - trigB = new GuiTrigger; - trigB->SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B); - - keyBackImg = new GuiImage(keyMedium); - keyBackOverImg = new GuiImage(keyMedium); - keyBackText = new GuiText("Back", 20, ( GXColor ) - { 0, 0, 0, 0xff}); - - keyBack = new GuiButton(keyBackImg, keyBackOverImg, ALIGN_CENTRE, ALIGN_MIDDLE, 90, 80, trigA, btnSoundOver, btnSoundClick, 1); - keyBack->SetLabel(keyBackText); - keyBack->SetTrigger(trigB); - this->Append(keyBack); - - keyClearImg = new GuiImage(keyMedium); - keyClearOverImg = new GuiImage(keyMedium); - keyClearText = new GuiText("Clear", 20, ( GXColor ) - { 0, 0, 0, 0xff}); - keyClear = new GuiButton(keyClearImg, keyClearOverImg, ALIGN_CENTRE, ALIGN_MIDDLE, -90, 80, trigA, btnSoundOver, btnSoundClick, 1); - keyClear->SetLabel(keyClearText); - this->Append(keyClear); - - char txt[2] = { 0, 0 }; - for (int i = 0; i < 11; i++) - { - if (keys[i] != '\0') - { - int col = i % 3; - int row = i / 3; - - keyImg[i] = new GuiImage(keyMedium); - keyImgOver[i] = new GuiImage(keyMedium); - txt[0] = keys[i]; - keyTxt[i] = new GuiText(txt, 20, ( GXColor ) - { 0, 0, 0, 0xff}); - keyTxt[i]->SetAlignment(ALIGN_CENTRE, ALIGN_BOTTOM); - keyTxt[i]->SetPosition(0, -10); - keyBtn[i] = new GuiButton(keyImg[i], keyImgOver[i], ALIGN_CENTRE, ALIGN_MIDDLE, -90 + 90 * col, -70 + 50 - * row, trigA, btnSoundOver, btnSoundClick, 1); - keyBtn[i]->SetLabel(keyTxt[i]); - - this->Append(keyBtn[i]); - } - } -} - -/** - * Destructor for the GuiKeyboard class. - */ -GuiNumpad::~GuiNumpad() -{ - delete kbText; - delete keyTextbox; - delete keyTextboxImg; - delete keyBackText; - delete keyBackImg; - delete keyBackOverImg; - delete keyBack; - delete keyClear; - delete keyClearImg; - delete keyClearOverImg; - delete keyClearText; - delete keyMedium; - delete trigA; - delete trigB; - - for (int i = 0; i < 11; i++) - { - if (keys[i] != '\0') - { - delete keyImg[i]; - delete keyImgOver[i]; - delete keyTxt[i]; - delete keyBtn[i]; - } - } -} - -void GuiNumpad::Update(GuiTrigger * t) -{ - LOCK( this ); - if (_elements.size() == 0 || (state == STATE_DISABLED && parentElement)) return; - - for (u8 i = 0; i < _elements.size(); i++) - { - try - { - _elements.at(i)->Update(t); - } - catch (const std::exception& e) - { - } - } - - if (keyBack->GetState() == STATE_CLICKED) - { - if (strlen(kbtextstr) > 0) - { - kbtextstr[strlen(kbtextstr) - 1] = 0; - kbText->SetText(kbtextstr); - } - keyBack->SetState(STATE_SELECTED, t->chan); - } - else if (keyClear->GetState() == STATE_CLICKED) - { - memset(kbtextstr, 0, sizeof(kbtextstr)); - kbText->SetText(kbtextstr); - keyClear->SetState(STATE_SELECTED, t->chan); - } - - char txt[2] = { 0, 0 }; - for (int i = 0; i < 11; i++) - { - if (keys[i] != '\0') - { - if (keyBtn[i]->GetState() == STATE_CLICKED) - { - txt[0] = keys[i]; - if (strlen(kbtextstr) < kbtextmaxlen - 1) // -1 --> kbtextmaxlen means with term. '\0' - { - kbtextstr[strlen(kbtextstr)] = txt[0]; - kbText->SetText(kbtextstr); - } - keyBtn[i]->SetState(STATE_SELECTED, t->chan); - } - } - } - - kbText->SetPosition(0, 53); - - this->ToggleFocus(t); - - if (focus) // only send actions to this window if it's in focus - { - // pad/joystick navigation - if (t->Right()) - this->MoveSelectionHor(1); - else if (t->Left()) - this->MoveSelectionHor(-1); - else if (t->Down()) - this->MoveSelectionVert(1); - else if (t->Up()) this->MoveSelectionVert(-1); - } -} diff --git a/source/libwiigui/gui_optionbrowser.cpp b/source/libwiigui/gui_optionbrowser.cpp deleted file mode 100644 index 32086efb..00000000 --- a/source/libwiigui/gui_optionbrowser.cpp +++ /dev/null @@ -1,666 +0,0 @@ -/**************************************************************************** - * libwiigui - * - * Tantric 2009 - * - * gui_optionbrowser.cpp - * - * GUI class definitions - ***************************************************************************/ - -#include "gui.h" -#include "../wpad.h" -#include "settings/CSettings.h" -#include "themes/CTheme.h" - -#include - -#define GAMESELECTSIZE 30 - -static int scrollbaron = 0, startat = 0, loaded = 0; -/** - * Constructor for the GuiOptionBrowser class. - */ -GuiOptionBrowser::GuiOptionBrowser(int w, int h, OptionList * l, const char *imagebg, int scrollon) -{ - width = w; - height = h; - options = l; - scrollbaron = scrollon; - selectable = true; - listOffset = this->FindMenuItem(-1, 1); - listChanged = true; // trigger an initial list update - selectedItem = 0; - focus = 1; // allow focus - - trigA = new GuiTrigger; - trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - trigHeldA = new GuiTrigger; - trigHeldA->SetHeldTrigger(-1, WPAD_BUTTON_A, PAD_BUTTON_A); - - bgOptions = Resources::GetImageData(imagebg); - bgOptionsImg = new GuiImage(bgOptions); - bgOptionsImg->SetParent(this); - bgOptionsImg->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - - bgOptionsEntry = Resources::GetImageData("bg_options_entry.png"); - if (scrollbaron == 1) - { - scrollbar = Resources::GetImageData("scrollbar.png"); - scrollbarImg = new GuiImage(scrollbar); - scrollbarImg->SetParent(this); - scrollbarImg->SetAlignment(ALIGN_RIGHT, ALIGN_TOP); - scrollbarImg->SetPosition(0, 4); - - arrowDown = Resources::GetImageData("scrollbar_arrowdown.png"); - arrowDownImg = new GuiImage(arrowDown); - arrowDownOver = Resources::GetImageData("scrollbar_arrowdown.png"); - arrowDownOverImg = new GuiImage(arrowDownOver); - arrowUp = Resources::GetImageData("scrollbar_arrowup.png"); - arrowUpImg = new GuiImage(arrowUp); - arrowUpOver = Resources::GetImageData("scrollbar_arrowup.png"); - arrowUpOverImg = new GuiImage(arrowUpOver); - scrollbarBox = Resources::GetImageData("scrollbar_box.png"); - scrollbarBoxImg = new GuiImage(scrollbarBox); - scrollbarBoxOver = Resources::GetImageData("scrollbar_box.png"); - scrollbarBoxOverImg = new GuiImage(scrollbarBoxOver); - - arrowUpBtn = new GuiButton(arrowUpImg->GetWidth(), arrowUpImg->GetHeight()); - arrowUpBtn->SetParent(this); - arrowUpBtn->SetImage(arrowUpImg); - arrowUpBtn->SetImageOver(arrowUpOverImg); - arrowUpBtn->SetImageHold(arrowUpOverImg); - arrowUpBtn->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - arrowUpBtn->SetPosition(width / 2 - 18 + 7, -18); - arrowUpBtn->SetSelectable(false); - arrowUpBtn->SetTrigger(trigA); - arrowUpBtn->SetEffectOnOver(EFFECT_SCALE, 50, 130); - arrowUpBtn->SetSoundClick(btnSoundClick); - - arrowDownBtn = new GuiButton(arrowDownImg->GetWidth(), arrowDownImg->GetHeight()); - arrowDownBtn->SetParent(this); - arrowDownBtn->SetImage(arrowDownImg); - arrowDownBtn->SetImageOver(arrowDownOverImg); - arrowDownBtn->SetImageHold(arrowDownOverImg); - arrowDownBtn->SetAlignment(ALIGN_CENTRE, ALIGN_BOTTOM); - arrowDownBtn->SetPosition(width / 2 - 18 + 7, 18); - arrowDownBtn->SetSelectable(false); - arrowDownBtn->SetTrigger(trigA); - arrowDownBtn->SetEffectOnOver(EFFECT_SCALE, 50, 130); - arrowDownBtn->SetSoundClick(btnSoundClick); - - scrollbarBoxBtn = new GuiButton(scrollbarBoxImg->GetWidth(), scrollbarBoxImg->GetHeight()); - scrollbarBoxBtn->SetParent(this); - scrollbarBoxBtn->SetImage(scrollbarBoxImg); - scrollbarBoxBtn->SetImageOver(scrollbarBoxOverImg); - scrollbarBoxBtn->SetImageHold(scrollbarBoxOverImg); - scrollbarBoxBtn->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - scrollbarBoxBtn->SetSelectable(false); - scrollbarBoxBtn->SetEffectOnOver(EFFECT_SCALE, 50, 120); - scrollbarBoxBtn->SetMinY(0); - scrollbarBoxBtn->SetMaxY(height); - scrollbarBoxBtn->SetHoldable(true); - scrollbarBoxBtn->SetTrigger(trigHeldA); - } - - // optionBg = new GuiImage(bgOptionsEntry); - for (int i = 0; i < PAGESIZE; i++) - { - optionTxt[i] = new GuiText((char *) NULL, 20, ( GXColor ) - { 0, 0, 0, 0xff}); - optionTxt[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - optionTxt[i]->SetPosition(24, 0); - - optionBg[i] = new GuiImage(bgOptionsEntry); - - optionVal[i] = new GuiText((char *) NULL, 20, ( GXColor ) - { 0, 0, 0, 0xff}); - optionVal[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - optionVal[i]->SetPosition(250, 0); - - optionBtn[i] = new GuiButton(width - 28, GAMESELECTSIZE); - optionBtn[i]->SetParent(this); - optionBtn[i]->SetLabel(optionTxt[i], 0); - optionBtn[i]->SetLabel(optionVal[i], 1); - optionBtn[i]->SetImageOver(optionBg[i]); - optionBtn[i]->SetPosition(5, GAMESELECTSIZE * i + 4); - optionBtn[i]->SetRumble(false); - optionBtn[i]->SetTrigger(trigA); - optionBtn[i]->SetSoundClick(btnSoundClick); - } -} - -/** - * Constructor for the GuiOptionBrowser class. - */ -GuiOptionBrowser::GuiOptionBrowser(int w, int h, OptionList * l, const char *imagebg, int scrollon, int start) -{ - width = w; - height = h; - options = l; - startat = start; - loaded = 0; - scrollbaron = scrollon; - selectable = true; - listOffset = this->FindMenuItem(-1, 1); - selectedItem = 0; - focus = 1; // allow focus - - trigA = new GuiTrigger; - trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - trigHeldA = new GuiTrigger; - trigHeldA->SetHeldTrigger(-1, WPAD_BUTTON_A, PAD_BUTTON_A); - - bgOptions = Resources::GetImageData(imagebg); - - bgOptionsImg = new GuiImage(bgOptions); - bgOptionsImg->SetParent(this); - bgOptionsImg->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - - bgOptionsEntry = Resources::GetImageData("bg_options_entry.png"); - if (scrollbaron == 1) - { - scrollbar = Resources::GetImageData("scrollbar.png"); - scrollbarImg = new GuiImage(scrollbar); - scrollbarImg->SetParent(this); - scrollbarImg->SetAlignment(ALIGN_RIGHT, ALIGN_TOP); - scrollbarImg->SetPosition(0, 4); - - arrowDown = Resources::GetImageData("scrollbar_arrowdown.png"); - arrowDownImg = new GuiImage(arrowDown); - arrowDownOver = Resources::GetImageData("scrollbar_arrowdown.png"); - arrowDownOverImg = new GuiImage(arrowDownOver); - arrowUp = Resources::GetImageData("scrollbar_arrowup.png"); - arrowUpImg = new GuiImage(arrowUp); - arrowUpOver = Resources::GetImageData("scrollbar_arrowup.png"); - arrowUpOverImg = new GuiImage(arrowUpOver); - scrollbarBox = Resources::GetImageData("scrollbar_box.png"); - scrollbarBoxImg = new GuiImage(scrollbarBox); - scrollbarBoxOver = Resources::GetImageData("scrollbar_box.png"); - scrollbarBoxOverImg = new GuiImage(scrollbarBoxOver); - - arrowUpBtn = new GuiButton(arrowUpImg->GetWidth(), arrowUpImg->GetHeight()); - arrowUpBtn->SetParent(this); - arrowUpBtn->SetImage(arrowUpImg); - arrowUpBtn->SetImageOver(arrowUpOverImg); - arrowUpBtn->SetImageHold(arrowUpOverImg); - arrowUpBtn->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - arrowUpBtn->SetPosition(width / 2 - 18 + 7, -18); - arrowUpBtn->SetSelectable(false); - arrowUpBtn->SetTrigger(trigA); - arrowUpBtn->SetEffectOnOver(EFFECT_SCALE, 50, 130); - arrowUpBtn->SetSoundClick(btnSoundClick); - - arrowDownBtn = new GuiButton(arrowDownImg->GetWidth(), arrowDownImg->GetHeight()); - arrowDownBtn->SetParent(this); - arrowDownBtn->SetImage(arrowDownImg); - arrowDownBtn->SetImageOver(arrowDownOverImg); - arrowDownBtn->SetImageHold(arrowDownOverImg); - arrowDownBtn->SetAlignment(ALIGN_CENTRE, ALIGN_BOTTOM); - arrowDownBtn->SetPosition(width / 2 - 18 + 7, 18); - arrowDownBtn->SetSelectable(false); - arrowDownBtn->SetTrigger(trigA); - arrowDownBtn->SetEffectOnOver(EFFECT_SCALE, 50, 130); - arrowDownBtn->SetSoundClick(btnSoundClick); - - scrollbarBoxBtn = new GuiButton(scrollbarBoxImg->GetWidth(), scrollbarBoxImg->GetHeight()); - scrollbarBoxBtn->SetParent(this); - scrollbarBoxBtn->SetImage(scrollbarBoxImg); - scrollbarBoxBtn->SetImageOver(scrollbarBoxOverImg); - scrollbarBoxBtn->SetImageHold(scrollbarBoxOverImg); - scrollbarBoxBtn->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - scrollbarBoxBtn->SetSelectable(false); - scrollbarBoxBtn->SetEffectOnOver(EFFECT_SCALE, 50, 120); - scrollbarBoxBtn->SetMinY(0); - scrollbarBoxBtn->SetMaxY(height - 30); - scrollbarBoxBtn->SetHoldable(true); - scrollbarBoxBtn->SetTrigger(trigHeldA); - } - - // optionBg = new GuiImage(bgOptionsEntry); - for (int i = 0; i < PAGESIZE; i++) - { - optionTxt[i] = new GuiText(options->GetName(i), 20, ( GXColor ) {0, 0, 0, 0xff}); - optionTxt[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - optionTxt[i]->SetPosition(24, 0); - - optionBg[i] = new GuiImage(bgOptionsEntry); - - optionVal[i] = new GuiText((char *) NULL, 20, ( GXColor ) - { 0, 0, 0, 0xff}); - optionVal[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - optionVal[i]->SetPosition(250, 0); - - optionBtn[i] = new GuiButton(width - 28, GAMESELECTSIZE); - optionBtn[i]->SetParent(this); - optionBtn[i]->SetLabel(optionTxt[i], 0); - optionBtn[i]->SetLabel(optionVal[i], 1); - optionBtn[i]->SetImageOver(optionBg[i]); - optionBtn[i]->SetPosition(5, GAMESELECTSIZE * i + 4); - optionBtn[i]->SetTrigger(trigA); - optionBtn[i]->SetSoundClick(btnSoundClick); - } -} - -/** - * Destructor for the GuiOptionBrowser class. - */ -GuiOptionBrowser::~GuiOptionBrowser() -{ - if (scrollbaron == 1) - { - delete arrowUpBtn; - delete arrowDownBtn; - delete scrollbarBoxBtn; - delete scrollbarImg; - delete arrowDownImg; - delete arrowDownOverImg; - delete arrowUpImg; - delete arrowUpOverImg; - delete scrollbarBoxImg; - delete scrollbarBoxOverImg; - delete scrollbar; - delete arrowDown; - delete arrowDownOver; - delete arrowUp; - delete arrowUpOver; - delete scrollbarBox; - delete scrollbarBoxOver; - } - delete bgOptionsImg; - delete bgOptions; - delete bgOptionsEntry; - loaded = 0; - - delete trigA; - - // delete optionBg; - for (int i = 0; i < PAGESIZE; i++) - { - delete optionTxt[i]; - delete optionVal[i]; - delete optionBg[i]; - delete optionBtn[i]; - } -} - -void GuiOptionBrowser::SetCol2Position(int x) -{ - LOCK( this ); - for (int i = 0; i < PAGESIZE; i++) - optionVal[i]->SetPosition(x, 0); -} - -void GuiOptionBrowser::SetFocus(int f) -{ - LOCK( this ); - focus = f; - - for (int i = 0; i < PAGESIZE; i++) - optionBtn[i]->ResetState(); - - if (f == 1) optionBtn[selectedItem]->SetState(STATE_SELECTED); -} - -void GuiOptionBrowser::ResetState() -{ - LOCK( this ); - if (state != STATE_DISABLED) - { - state = STATE_DEFAULT; - stateChan = -1; - } - - for (int i = 0; i < PAGESIZE; i++) - { - optionBtn[i]->ResetState(); - } -} - -int GuiOptionBrowser::GetClickedOption() -{ - int found = -1; - for (int i = 0; i < PAGESIZE; i++) - { - if (optionBtn[i]->GetState() == STATE_CLICKED) - { - optionBtn[i]->SetState(STATE_SELECTED); - found = optionIndex[i]; - break; - } - } - return found; -} - -int GuiOptionBrowser::GetSelectedOption() -{ - int found = -1; - for (int i = 0; i < PAGESIZE; i++) - { - if (optionBtn[i]->GetState() == STATE_SELECTED) - { - optionBtn[i]->SetState(STATE_SELECTED); - found = optionIndex[i]; - break; - } - } - return found; -} - -/**************************************************************************** - * FindMenuItem - * - * Help function to find the next visible menu item on the list - ***************************************************************************/ - -int GuiOptionBrowser::FindMenuItem(int currentItem, int direction) -{ - int nextItem = currentItem + direction; - - if (nextItem < 0 || nextItem >= options->GetLength()) return -1; - - if (options->GetName(nextItem) && strlen(options->GetName(nextItem)) > 0) - return nextItem; - else - return FindMenuItem(nextItem, direction); -} - -/** - * Draw the button on screen - */ -void GuiOptionBrowser::Draw() -{ - LOCK( this ); - if (!this->IsVisible()) return; - - bgOptionsImg->Draw(); - - int next = listOffset; - - for (int i = 0; i < PAGESIZE; i++) - { - if (next >= 0) - { - optionBtn[i]->Draw(); - next = this->FindMenuItem(next, 1); - } - else break; - } - - if (scrollbaron == 1) - { - scrollbarImg->Draw(); - arrowUpBtn->Draw(); - arrowDownBtn->Draw(); - scrollbarBoxBtn->Draw(); - } - this->UpdateEffects(); -} - -void GuiOptionBrowser::TriggerUpdate() -{ - listChanged = true; -} - -void GuiOptionBrowser::Update(GuiTrigger * t) -{ - LOCK( this ); - int next, prev, lang = options->GetLength(); - - //go to the last game selected - if ((loaded == 0) && (startat > 0)) - { - - if (startat > (lang - 9)) - { - listOffset = (lang - 9); - selectedItem = startat; - optionBtn[selectedItem]->SetState(STATE_SELECTED, t->chan); - } - else if (startat < 9) - { - selectedItem = startat; - optionBtn[selectedItem]->SetState(STATE_SELECTED, t->chan); - } - else if(startat < PAGESIZE) - { - listOffset = (startat - 4); - selectedItem = startat; - optionBtn[selectedItem]->SetState(STATE_SELECTED, t->chan); - } - this->SetFocus(1); - loaded = 1; - } - - if (state == STATE_DISABLED || !t) return; - - // scrolldelay affects how fast the list scrolls - // when the arrows are clicked - float scrolldelay = 3.5; - - if (scrollbaron == 1) - { - // update the location of the scroll box based on the position in the option list - - - arrowUpBtn->Update(t); - arrowDownBtn->Update(t); - scrollbarBoxBtn->Update(t); - } - next = listOffset; - - if (listChanged) - { - for (int i = 0; i < PAGESIZE; i++) - { - if (next >= 0) - { - if (optionBtn[i]->GetState() == STATE_DISABLED) - { - optionBtn[i]->SetVisible(true); - optionBtn[i]->SetState(STATE_DEFAULT); - } - - optionTxt[i]->SetText(options->GetName(next)); - optionVal[i]->SetText(options->GetValue(next)); - optionIndex[i] = next; - next = this->FindMenuItem(next, 1); - } - else - { - optionBtn[i]->SetVisible(false); - optionBtn[i]->SetState(STATE_DISABLED); - } - } - } - for (int i = 0; i < PAGESIZE; i++) - { - if (focus) - { - if (i != selectedItem && optionBtn[i]->GetState() == STATE_SELECTED) - optionBtn[i]->ResetState(); - else if (i == selectedItem && optionBtn[i]->GetState() == STATE_DEFAULT) optionBtn[selectedItem]->SetState( - STATE_SELECTED, t->chan); - } - - optionBtn[i]->Update(t); - - if (optionBtn[i]->GetState() == STATE_SELECTED) - { - selectedItem = i; - } - } - - // pad/joystick navigation - if (!focus) return; // skip navigation - - if (scrollbaron == 1) - { - - if (t->Down() || arrowDownBtn->GetState() == STATE_CLICKED || ////////////////////////////////////////////down - arrowDownBtn->GetState() == STATE_HELD) - { - - next = this->FindMenuItem(optionIndex[selectedItem], 1); - - if (next >= 0) - { - if (selectedItem == PAGESIZE - 1) - { - // move list down by 1 - listOffset = this->FindMenuItem(listOffset, 1); - } - else if (optionBtn[selectedItem + 1]->IsVisible()) - { - optionBtn[selectedItem]->ResetState(); - optionBtn[selectedItem + 1]->SetState(STATE_SELECTED, t->chan); - selectedItem++; - } - scrollbarBoxBtn->Draw(); - usleep(10000 * scrolldelay); - - } - WPAD_ScanPads(); - u8 cnt, buttons = 0; - /* Get pressed buttons */ - for (cnt = 0; cnt < 4; cnt++) - buttons |= WPAD_ButtonsHeld(cnt); - if (buttons == WPAD_BUTTON_A) - { - - } - else - { - arrowDownBtn->ResetState(); - - } - - } - else if (t->Up() || arrowUpBtn->GetState() == STATE_CLICKED || ////////////////////////////////////////////up - arrowUpBtn->GetState() == STATE_HELD) - { - prev = this->FindMenuItem(optionIndex[selectedItem], -1); - - if (prev >= 0) - { - if (selectedItem == 0) - { - // move list up by 1 - listOffset = prev; - } - else - { - optionBtn[selectedItem]->ResetState(); - optionBtn[selectedItem - 1]->SetState(STATE_SELECTED, t->chan); - selectedItem--; - } - scrollbarBoxBtn->Draw(); - usleep(10000 * scrolldelay); - - } - WPAD_ScanPads(); - u8 cnt, buttons = 0; - /* Get pressed buttons */ - for (cnt = 0; cnt < 4; cnt++) - buttons |= WPAD_ButtonsHeld(cnt); - if (buttons == WPAD_BUTTON_A) - { - - } - else - { - arrowUpBtn->ResetState(); - - } - } - - if (scrollbarBoxBtn->GetState() == STATE_HELD && scrollbarBoxBtn->GetStateChan() == t->chan && t->wpad.ir.valid - && options->GetLength() > PAGESIZE) - { - scrollbarBoxBtn->SetPosition(width / 2 - 18 + 7, 0); - int position = t->wpad.ir.y - 50 - scrollbarBoxBtn->GetTop(); - - listOffset = (position * lang) / 180 - selectedItem; - - if (listOffset <= 0) - { - listOffset = 0; - selectedItem = 0; - } - else if (listOffset + PAGESIZE >= lang) - { - listOffset = lang - PAGESIZE; - selectedItem = PAGESIZE - 1; - } - - } - int positionbar = 237 * (listOffset + selectedItem) / lang; - - if (positionbar > 216) positionbar = 216; - scrollbarBoxBtn->SetPosition(width / 2 - 18 + 7, positionbar + 8); - - if (t->Right()) - { - if (listOffset < lang && lang > PAGESIZE) - { - listOffset = listOffset + PAGESIZE; - if (listOffset + PAGESIZE >= lang) listOffset = lang - PAGESIZE; - } - } - else if (t->Left()) - { - if (listOffset > 0) - { - listOffset = listOffset - PAGESIZE; - if (listOffset < 0) listOffset = 0; - } - } - - } - else - { - - if (t->Down()) - { - next = this->FindMenuItem(optionIndex[selectedItem], 1); - - if (next >= 0) - { - if (selectedItem == PAGESIZE - 1) - { - // move list down by 1 - listOffset = this->FindMenuItem(listOffset, 1); - listChanged = true; - } - else if (optionBtn[selectedItem + 1]->IsVisible()) - { - optionBtn[selectedItem]->ResetState(); - optionBtn[selectedItem + 1]->SetState(STATE_SELECTED, t->chan); - selectedItem++; - } - } - } - else if (t->Up()) - { - prev = this->FindMenuItem(optionIndex[selectedItem], -1); - - if (prev >= 0) - { - if (selectedItem == 0) - { - // move list up by 1 - listOffset = prev; - listChanged = true; - } - else - { - optionBtn[selectedItem]->ResetState(); - optionBtn[selectedItem - 1]->SetState(STATE_SELECTED, t->chan); - selectedItem--; - } - } - } - } - - if (updateCB) updateCB(this); -} diff --git a/source/libwiigui/gui_searchbar.cpp b/source/libwiigui/gui_searchbar.cpp deleted file mode 100644 index 96dca82b..00000000 --- a/source/libwiigui/gui_searchbar.cpp +++ /dev/null @@ -1,163 +0,0 @@ -#include "gui.h" -#include "gui_searchbar.h" - -#include "../wpad.h" -#include "../main.h" -#include "../settings/CSettings.h" -#include "../themes/CTheme.h" -#include "../usbloader/GameList.h" - -extern GuiWindow * mainWindow; - -class cSearchButton -{ - public: - cSearchButton(wchar_t *Char, GuiImageData *keyImageData, GuiImageData *keyOverImageData, int x, int y, - GuiTrigger* trig, GuiSound* sndOver, GuiSound* sndClick) : - wchar(*Char), image(keyImageData), imageOver(keyOverImageData), text((char *) NULL, 20, ( GXColor ) - { 0, 0, 0, 0xff}), button(&image, &imageOver, ALIGN_LEFT, ALIGN_TOP, x, y, trig, sndOver, sndClick, 1) - { - text.SetText(Char); - button.SetLabel(&text); - } - wchar_t wchar; - GuiImage image; - GuiImage imageOver; - GuiText text; - GuiButton button; - private: - -}; - -GuiSearchBar::GuiSearchBar(const wchar_t *SearchChars) : - inSide(0), text((char *) NULL, 22, ( GXColor ) - { 0, 0, 0, 255}), buttons(0), - keyImageData(Resources::GetFile("keyboard_key.png"), Resources::GetFileSize("keyboard_key.png")), - keyOverImageData(Resources::GetFile("keyboard_key_over.png"), Resources::GetFileSize("keyboard_key_over.png")) -{ - trig.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - - cnt = wcslen(SearchChars); - buttons = new cSearchButton*[cnt]; - - wchar_t charstr[2] = { 0, 0 }; - int lines = (cnt + 9) / 10; - int buttonsPerLine = (cnt + lines - 1) / lines; - width = 10 + buttonsPerLine * 42 + 10; - int x_start = 10, x = 0, y_start = 10 + 42, y = 0; - if (width < 200) - { - x_start += (200 - width) >> 1; - width = 200; - } - for (int i = 0; i < cnt; i++, x++) - { - if (x >= buttonsPerLine) x = 0; - if (x == 0) y++; - charstr[0] = SearchChars[i]; - buttons[i] = new cSearchButton(charstr, &keyImageData, &keyOverImageData, x_start + x * 42, y_start - 42 + y - * 42, &trig, btnSoundOver, btnSoundClick); - this->Append(&(buttons[i]->button)); - } - height = 10 + 42 + y * 42 + 10; - - text.SetText(gameList.GetCurrentFilter()); - text.SetPosition(10, 15); - text.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - text.SetWidescreen(Settings.widescreen); - text.SetMaxWidth(width - (10 + 2 * 42 + 10), SCROLL_HORIZONTAL); - this->Append(&text); - - imgBacspaceBtn = Resources::GetImageData("keyboard_backspace_over.png"); - BacspaceBtnImg_Over = new GuiImage(imgBacspaceBtn); - BacspaceBtnImg = new GuiImage(BacspaceBtnImg_Over); - BacspaceBtnImg->SetGrayscale(); - BacspaceBtn = new GuiButton(BacspaceBtnImg, BacspaceBtnImg_Over, ALIGN_RIGHT, ALIGN_TOP, -52, 10, &trig, btnSoundOver, btnSoundClick, 1); - this->Append(BacspaceBtn); - - imgClearBtn = Resources::GetImageData("keyboard_clear_over.png"); - ClearBtnImg_Over = new GuiImage(imgClearBtn); - ClearBtnImg = new GuiImage(ClearBtnImg_Over); - ClearBtnImg->SetGrayscale(); - ClearBtn = new GuiButton(ClearBtnImg, ClearBtnImg_Over, ALIGN_RIGHT, ALIGN_TOP, -10, 10, &trig, btnSoundOver, btnSoundClick, 1); - this->Append(ClearBtn); - - // SetPosition(100,100); - -} -GuiSearchBar::~GuiSearchBar() -{ - if (buttons) - { - for (int i = 0; i < cnt; i++) - delete buttons[i]; - delete[] buttons; - } - delete ClearBtn; - delete ClearBtnImg; - delete ClearBtnImg_Over; - delete imgClearBtn; - - delete BacspaceBtn; - delete BacspaceBtnImg; - delete BacspaceBtnImg_Over; - delete imgBacspaceBtn; - if (inSide) mainWindow->SetState(STATE_DEFAULT); -} -void GuiSearchBar::Draw() -{ - Menu_DrawRectangle(this->GetLeft(), this->GetTop(), width, height, ( GXColor ) - { 0, 0, 0, 0xa0}, 1); - Menu_DrawRectangle(this->GetLeft() + 10, this->GetTop() + 15, width - (10 + 2 * 42 + 10), 22, ( GXColor ) - { 255, 255, 255, 255}, 1); - GuiWindow::Draw(); -} -void GuiSearchBar::Update(GuiTrigger * t) -{ - LOCK( this ); - if (_elements.size() == 0 || (state == STATE_DISABLED && parentElement)) return; - // cursor - if (t->wpad.ir.valid && state != STATE_DISABLED) - { - if (this->IsInside(t->wpad.ir.x, t->wpad.ir.y)) - { - if (inSide == 0) - { - mainWindow->SetState(STATE_DISABLED); - this->SetState(STATE_DEFAULT); - } - inSide |= 1 << t->chan; - } - else if (inSide) - { - inSide &= ~(1 << t->chan); - if (inSide == 0) mainWindow->SetState(STATE_DEFAULT); - } - } - GuiWindow::Update(t); -} -wchar_t GuiSearchBar::GetClicked() -{ - if (buttons) - { - for (int i = 0; i < cnt; i++) - { - if (buttons[i]->button.GetState() == STATE_CLICKED) - { - buttons[i]->button.ResetState(); - return buttons[i]->wchar; - } - } - } - if (BacspaceBtn->GetState() == STATE_CLICKED) return 8; - if (ClearBtn->GetState() == STATE_CLICKED) return 7; - - return 0; -} - -/* - private: - SearchButtons *buttons; - }*/ - diff --git a/source/libwiigui/gui_searchbar.h b/source/libwiigui/gui_searchbar.h deleted file mode 100644 index 32d953f8..00000000 --- a/source/libwiigui/gui_searchbar.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef GUI_SEARCHBAR_H_ -#define GUI_SEARCHBAR_H_ -#include "gui.h" - -class cSearchButton; - -class GuiSearchBar: public GuiWindow -{ - public: - GuiSearchBar(const wchar_t *SearchChars); - ~GuiSearchBar(); - void Draw(); - void Update(GuiTrigger * t); - wchar_t GetClicked(); - private: - u16 inSide; - - GuiText text; - - GuiImageData* imgBacspaceBtn; - GuiImage* BacspaceBtnImg; - GuiImage* BacspaceBtnImg_Over; - GuiButton* BacspaceBtn; - - GuiImageData* imgClearBtn; - GuiImage* ClearBtnImg; - GuiImage* ClearBtnImg_Over; - GuiButton* ClearBtn; - - cSearchButton **buttons; - int cnt; - GuiImageData keyImageData; - GuiImageData keyOverImageData; - GuiTrigger trig; - -}; - -#endif \ No newline at end of file diff --git a/source/libwiigui/gui_text.cpp b/source/libwiigui/gui_text.cpp deleted file mode 100644 index bd3bbcdf..00000000 --- a/source/libwiigui/gui_text.cpp +++ /dev/null @@ -1,576 +0,0 @@ -/**************************************************************************** - * libwiigui - * - * Tantric 2009 - * - * gui_text.cpp - * - * GUI class definitions - ***************************************************************************/ - -#include "gui.h" -#include "wstring.hpp" - -#define MAX_LINES_TO_DRAW 9 - -static int presetSize = 18; -static int presetMaxWidth = 0; -static int presetAlignmentHor = 0; -static int presetAlignmentVert = 0; -static u16 presetStyle = 0; -static GXColor presetColor = ( GXColor ) -{ 255, 255, 255, 255}; - -#define TEXT_SCROLL_DELAY 5 -#define TEXT_SCROLL_INITIAL_DELAY 8 - -/** - * Constructor for the GuiText class. - */ - -GuiText::GuiText(const char * t, int s, GXColor c) -{ - text = NULL; - size = s; - currentSize = size; - color = c; - alpha = c.a; - style = FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE; - maxWidth = 0; - wrapMode = 0; - passChar = 0; - font = NULL; - linestodraw = MAX_LINES_TO_DRAW; - textScrollPos = 0; - textScrollInitialDelay = TEXT_SCROLL_INITIAL_DELAY; - textScrollDelay = TEXT_SCROLL_DELAY; - - alignmentHor = ALIGN_CENTRE; - alignmentVert = ALIGN_MIDDLE; - - if (t) - { - text = charToWideChar(t); - if (!text) return; - - textWidth = fontSystem->getWidth(text, currentSize); - } -} - -GuiText::GuiText(const wchar_t * t, int s, GXColor c) -{ - text = NULL; - size = s; - currentSize = size; - color = c; - alpha = c.a; - style = FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE; - maxWidth = 0; - wrapMode = 0; - passChar = 0; - font = NULL; - linestodraw = MAX_LINES_TO_DRAW; - textScrollPos = 0; - textScrollInitialDelay = TEXT_SCROLL_INITIAL_DELAY; - textScrollDelay = TEXT_SCROLL_DELAY; - - alignmentHor = ALIGN_CENTRE; - alignmentVert = ALIGN_MIDDLE; - - if (t) - { - text = new (std::nothrow) wchar_t[wcslen(t) + 1]; - if (!text) return; - - wcscpy(text, t); - - textWidth = fontSystem->getWidth(text, currentSize); - } -} - -/** - * Constructor for the GuiText class, uses presets - */ -GuiText::GuiText(const char * t) -{ - text = NULL; - size = presetSize; - currentSize = size; - color = presetColor; - alpha = presetColor.a; - style = presetStyle; - maxWidth = presetMaxWidth; - wrapMode = 0; - passChar = 0; - font = NULL; - linestodraw = MAX_LINES_TO_DRAW; - textScrollPos = 0; - textScrollInitialDelay = TEXT_SCROLL_INITIAL_DELAY; - textScrollDelay = TEXT_SCROLL_DELAY; - - alignmentHor = presetAlignmentHor; - alignmentVert = presetAlignmentVert; - - if (t) - { - text = charToWideChar(t); - if (!text) return; - - textWidth = fontSystem->getWidth(text, currentSize); - } -} - -/** - * Destructor for the GuiText class. - */ -GuiText::~GuiText() -{ - if (text) delete[] text; - text = NULL; - - if (font) - { - delete font; - font = NULL; - } - - ClearDynamicText(); -} - -void GuiText::SetText(const char * t) -{ - LOCK( this ); - - if (text) delete[] text; - text = NULL; - - ClearDynamicText(); - - textScrollPos = 0; - textScrollInitialDelay = TEXT_SCROLL_INITIAL_DELAY; - - if (t) - { - text = charToWideChar(t); - if (!text) return; - - if (passChar != 0) - { - for (u8 i = 0; i < wcslen(text); i++) - text[i] = passChar; - } - - textWidth = fontSystem->getWidth(text, currentSize); - } -} - -void GuiText::SetTextf(const char *format, ...) -{ - if (!format) SetText((char *) NULL); - - char *tmp = 0; - va_list va; - va_start( va, format ); - if ((vasprintf(&tmp, format, va) >= 0) && tmp) - { - SetText(tmp); - } - va_end( va ); - - if (tmp) free(tmp); -} - -void GuiText::SetText(const wchar_t * t) -{ - LOCK( this ); - - if (text) delete[] text; - text = NULL; - - ClearDynamicText(); - - textScrollPos = 0; - textScrollInitialDelay = TEXT_SCROLL_INITIAL_DELAY; - - if (t) - { - text = new (std::nothrow) wchar_t[wcslen(t) + 1]; - if (!text) return; - - wcscpy(text, t); - - if (passChar != 0) - { - for (u8 i = 0; i < wcslen(text); i++) - text[i] = passChar; - } - - textWidth = fontSystem->getWidth(text, currentSize); - } -} - -void GuiText::ClearDynamicText() -{ - for (u32 i = 0; i < textDyn.size(); i++) - { - if (textDyn[i]) delete[] textDyn[i]; - } - textDyn.clear(); -} - -void GuiText::SetPresets(int sz, GXColor c, int w, u16 s, int h, int v) -{ - presetSize = sz; - presetColor = c; - presetStyle = s; - presetMaxWidth = w; - presetAlignmentHor = h; - presetAlignmentVert = v; -} - -void GuiText::SetFontSize(int s) -{ - LOCK( this ); - - size = s; -} - -void GuiText::SetMaxWidth(int width, int w) -{ - LOCK( this ); - - maxWidth = width; - wrapMode = w; - - if (w == SCROLL_HORIZONTAL) - { - textScrollPos = 0; - textScrollInitialDelay = TEXT_SCROLL_INITIAL_DELAY; - textScrollDelay = TEXT_SCROLL_DELAY; - } - - ClearDynamicText(); -} - -void GuiText::SetPassChar(wchar_t p) -{ - LOCK( this ); - passChar = p; -} - -void GuiText::SetColor(GXColor c) -{ - LOCK( this ); - color = c; - alpha = c.a; -} - -void GuiText::SetStyle(u16 s) -{ - LOCK( this ); - style = s; -} - -void GuiText::SetAlignment(int hor, int vert) -{ - LOCK( this ); - style = 0; - - switch (hor) - { - case ALIGN_LEFT: - style |= FTGX_JUSTIFY_LEFT; - break; - case ALIGN_RIGHT: - style |= FTGX_JUSTIFY_RIGHT; - break; - default: - style |= FTGX_JUSTIFY_CENTER; - break; - } - switch (vert) - { - case ALIGN_TOP: - style |= FTGX_ALIGN_TOP; - break; - case ALIGN_BOTTOM: - style |= FTGX_ALIGN_BOTTOM; - break; - default: - style |= FTGX_ALIGN_MIDDLE; - break; - } - - alignmentHor = hor; - alignmentVert = vert; -} - -void GuiText::SetLinesToDraw(int l) -{ - linestodraw = l; -} - -int GuiText::GetTextWidth() -{ - if (!text) return 0; - - return fontSystem->getWidth(text, currentSize); -} - -int GuiText::GetTextWidth(int ind) -{ - if (ind < 0 || ind >= (int) textDyn.size()) return this->GetTextWidth(); - - return fontSystem->getWidth(textDyn[ind], currentSize); -} - -int GuiText::GetTextMaxWidth() -{ - return maxWidth; -} - -const wchar_t * GuiText::GetDynText(int ind) -{ - if (ind < 0 || ind >= (int) textDyn.size()) return text; - - return textDyn[ind]; -} - -const wchar_t * GuiText::GetText() -{ - return text; -} - -/** - * Change font - */ -bool GuiText::SetFont(const u8 *fontbuffer, const u32 filesize) -{ - if (!fontbuffer || !filesize) return false; - LOCK( this ); - if (font) - { - delete font; - font = NULL; - } - font = new FreeTypeGX(fontbuffer, filesize); - textWidth = font->getWidth(text, currentSize); - - return true; -} - -void GuiText::MakeDottedText() -{ - int pos = textDyn.size(); - textDyn.resize(pos + 1); - - int i = 0, currentWidth = 0; - textDyn[pos] = new wchar_t[maxWidth]; - - while (text[i]) - { - currentWidth += (font ? font : fontSystem)->getCharWidth(text[i], currentSize, i > 0 ? text[i - 1] : 0x0000); - if (currentWidth >= maxWidth) - { - if (i > 3) - { - textDyn[pos][i - 3] = '.'; - textDyn[pos][i - 2] = '.'; - textDyn[pos][i - 1] = '.'; - } - break; - } - - textDyn[pos][i] = text[i]; - - i++; - } - textDyn[pos][i] = 0; -} - -void GuiText::ScrollText() -{ - if (textDyn.size() == 0) - { - int pos = textDyn.size(); - int i = 0, currentWidth = 0; - textDyn.resize(pos + 1); - - textDyn[pos] = new wchar_t[maxWidth]; - - while (text[i] && currentWidth < maxWidth-40) - { - textDyn[pos][i] = text[i]; - - currentWidth += (font ? font : fontSystem)->getCharWidth(text[i], currentSize, i > 0 ? text[i - 1] : 0x0000); - - ++i; - } - textDyn[pos][i] = 0; - - return; - } - - if (frameCount % textScrollDelay != 0) - { - return; - } - - if (textScrollInitialDelay) - { - --textScrollInitialDelay; - return; - } - - int strlen = wcslen(text); - - ++textScrollPos; - if (textScrollPos > strlen) - { - textScrollPos = 0; - textScrollInitialDelay = TEXT_SCROLL_INITIAL_DELAY; - } - - int ch = textScrollPos; - int pos = textDyn.size() - 1; - - if (textDyn[pos]) delete[] textDyn[pos]; - - textDyn[pos] = new wchar_t[maxWidth]; - - int i = 0, currentWidth = 0; - - while (currentWidth < maxWidth-40) - { - if (ch > strlen - 1) - { - textDyn[pos][i++] = ' '; - textDyn[pos][i++] = ' '; - textDyn[pos][i++] = ' '; - ch = 0; - } - - textDyn[pos][i] = text[ch]; - ++ch; - ++i; - - currentWidth += (font ? font : fontSystem)->getCharWidth(text[ch], currentSize, ch > 0 ? text[ch - 1] : 0x0000); - } - textDyn[pos][i] = 0; -} - -void GuiText::WrapText() -{ - if (textDyn.size() > 0) return; - - int i = 0; - int ch = 0; - int linenum = 0; - int lastSpace = -1; - int lastSpaceIndex = -1; - int currentWidth = 0; - - while (text[ch] && linenum < linestodraw) - { - if (linenum >= (int) textDyn.size()) - { - textDyn.resize(linenum + 1); - textDyn[linenum] = new wchar_t[maxWidth]; - } - - textDyn[linenum][i] = text[ch]; - textDyn[linenum][i + 1] = 0; - - currentWidth += (font ? font : fontSystem)->getCharWidth(text[ch], currentSize, ch > 0 ? text[ch - 1] : 0x0000); - - if (currentWidth >= maxWidth) - { - if (lastSpace >= 0) - { - textDyn[linenum][lastSpaceIndex] = 0; // discard space, and everything after - ch = lastSpace; // go backwards to the last space - lastSpace = -1; // we have used this space - lastSpaceIndex = -1; - } - - if (linenum + 1 == linestodraw && text[ch + 1] != 0x0000) - { - textDyn[linenum][i - 2] = '.'; - textDyn[linenum][i - 1] = '.'; - textDyn[linenum][i] = '.'; - textDyn[linenum][i + 1] = 0; - } - - currentWidth = 0; - ++linenum; - i = -1; - } - if (text[ch] == ' ' && i >= 0) - { - lastSpace = ch; - lastSpaceIndex = i; - } - ++ch; - ++i; - } -} - -/** - * Draw the text on screen - */ -void GuiText::Draw() -{ - if (!text) return; - - if (!IsVisible()) return; - - GXColor c = color; - c.a = GetAlpha(); - - int newSize = size * GetScale(); - - if (newSize != currentSize) - { - currentSize = newSize; - - if (text) textWidth = (font ? font : fontSystem)->getWidth(text, currentSize); - } - - if (maxWidth > 0 && maxWidth <= textWidth) - { - if (wrapMode == DOTTED) // text dotted - { - if (textDyn.size() == 0) MakeDottedText(); - - if (textDyn.size() > 0) (font ? font : fontSystem)->drawText(this->GetLeft(), this->GetTop(), 0, - textDyn[textDyn.size() - 1], currentSize, c, style); - } - - else if (wrapMode == SCROLL_HORIZONTAL) - { - ScrollText(); - - if (textDyn.size() > 0) (font ? font : fontSystem)->drawText(this->GetLeft(), this->GetTop(), 0, - textDyn[textDyn.size() - 1], currentSize, c, style); - } - else if (wrapMode == WRAP) - { - int lineheight = currentSize + 6; - int voffset = 0; - if (alignmentVert == ALIGN_MIDDLE) voffset = -(lineheight * textDyn.size()) / 2 + lineheight / 2; - - if (textDyn.size() == 0) WrapText(); - - for (u32 i = 0; i < textDyn.size(); i++) - { - (font ? font : fontSystem)->drawText(this->GetLeft(), this->GetTop() + voffset + i * lineheight, 0, - textDyn[i], currentSize, c, style); - } - } - } - else - { - (font ? font : fontSystem)->drawText(this->GetLeft(), this->GetTop(), 0, text, currentSize, c, style, textWidth); - } - this->UpdateEffects(); -} diff --git a/source/libwiigui/gui_tooltip.cpp b/source/libwiigui/gui_tooltip.cpp deleted file mode 100644 index 76729258..00000000 --- a/source/libwiigui/gui_tooltip.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/**************************************************************************** - * libwiigui - * - * Tantric 2009 - * - * gui_tooltip.cpp - * - * GUI class definitions - ***************************************************************************/ - -#include "gui.h" -#include "themes/CTheme.h" -/** - * Constructor for the GuiTooltip class. - */ -GuiTooltip::GuiTooltip(const char *t, int Alpha/*=255*/) -{ - tooltipLeft = Resources::GetImageData("tooltip_left.png"); - tooltipTile = Resources::GetImageData("tooltip_tile.png"); - tooltipRight = Resources::GetImageData("tooltip_right.png"); - leftImage = new GuiImage(tooltipLeft); - tileImage = new GuiImage(tooltipTile); - rightImage = new GuiImage(tooltipRight); - text = NULL; - height = leftImage->GetHeight(); - leftImage->SetParent(this); - tileImage->SetParent(this); - rightImage->SetParent(this); - leftImage->SetParentAngle(false); - tileImage->SetParentAngle(false); - rightImage->SetParentAngle(false); - SetText(t); - SetAlpha(Alpha); -} - -/* - * Destructor for the GuiTooltip class. - */ -GuiTooltip::~GuiTooltip() -{ - if (text) delete text; - - delete tooltipLeft; - delete tooltipTile; - delete tooltipRight; - delete leftImage; - delete tileImage; - delete rightImage; -} - -float GuiTooltip::GetScale() -{ - float s = scale * scaleDyn; - - return s; -} - -/* !Sets the text of the GuiTooltip element - * !\param t Text - */ -void GuiTooltip::SetText(const char * t) -{ - LOCK( this ); - if (text) - { - delete text; - text = NULL; - } - int tile_cnt = 0; - if (t && (text = new GuiText(t, 22, ( GXColor ) - { 0, 0, 0, 255}))) - { - text->SetParent(this); - tile_cnt = (text->GetTextWidth() - 12) / tileImage->GetWidth(); - if (tile_cnt < 0) tile_cnt = 0; - } - tileImage->SetPosition(leftImage->GetWidth(), 0); - tileImage->SetTile(tile_cnt); - rightImage->SetPosition(leftImage->GetWidth() + tile_cnt * tileImage->GetWidth(), 0); - width = leftImage->GetWidth() + tile_cnt * tileImage->GetWidth() + rightImage->GetWidth(); -} - -void GuiTooltip::SetWidescreen(bool ) -{ -} -/* - * Draw the Tooltip on screen - */ -void GuiTooltip::Draw() -{ - LOCK( this ); - if (!this->IsVisible()) return; - - leftImage->Draw(); - tileImage->Draw(); - rightImage->Draw(); - if (text) text->Draw(); - - this->UpdateEffects(); -} diff --git a/source/libwiigui/gui_trigger.cpp b/source/libwiigui/gui_trigger.cpp deleted file mode 100644 index 352204ab..00000000 --- a/source/libwiigui/gui_trigger.cpp +++ /dev/null @@ -1,247 +0,0 @@ -/**************************************************************************** - * libwiigui - * - * Tantric 2009 - * - * gui_trigger.cpp - * - * GUI class definitions - ***************************************************************************/ - -#include "gui.h" - -static int scrollDelay = 0; - -/** - * Constructor for the GuiTrigger class. - */ -GuiTrigger::GuiTrigger() -{ - chan = -1; - memset(&wpad, 0, sizeof(WPADData)); - memset(&pad, 0, sizeof(PADData)); -} - -/** - * Destructor for the GuiTrigger class. - */ -GuiTrigger::~GuiTrigger() -{ -} - -/** - * Sets a simple trigger. Requires: - * - Element is selected - * - Trigger button is pressed - */ -void GuiTrigger::SetSimpleTrigger(s32 ch, u32 wiibtns, u16 gcbtns) -{ - type = TRIGGER_SIMPLE; - chan = ch; - wpad.btns_d = wiibtns; - pad.btns_d = gcbtns; -} - -/** - * Sets a held trigger. Requires: - * - Element is selected - * - Trigger button is pressed and held - */ -void GuiTrigger::SetHeldTrigger(s32 ch, u32 wiibtns, u16 gcbtns) -{ - type = TRIGGER_HELD; - chan = ch; - wpad.btns_h = wiibtns; - pad.btns_h = gcbtns; -} - -/** - * Sets a button trigger. Requires: - * - Trigger button is pressed - */ -void GuiTrigger::SetButtonOnlyTrigger(s32 ch, u32 wiibtns, u16 gcbtns) -{ - type = TRIGGER_BUTTON_ONLY; - chan = ch; - wpad.btns_d = wiibtns; - pad.btns_d = gcbtns; -} - -/** - * Sets a button trigger. Requires: - * - Trigger button is pressed - * - Parent window is in focus - */ -void GuiTrigger::SetButtonOnlyInFocusTrigger(s32 ch, u32 wiibtns, u16 gcbtns) -{ - type = TRIGGER_BUTTON_ONLY_IN_FOCUS; - chan = ch; - wpad.btns_d = wiibtns; - pad.btns_d = gcbtns; -} - -/**************************************************************************** - * WPAD_Stick - * - * Get X/Y value from Wii Joystick (classic, nunchuk) input - ***************************************************************************/ - -s8 GuiTrigger::WPAD_Stick(u8 right, int axis) -{ -#ifdef HW_RVL - - float mag = 0.0; - float ang = 0.0; - - switch ( wpad.exp.type ) - { - case WPAD_EXP_NUNCHUK: - case WPAD_EXP_GUITARHERO3: - if ( right == 0 ) - { - mag = wpad.exp.nunchuk.js.mag; - ang = wpad.exp.nunchuk.js.ang; - } - break; - - case WPAD_EXP_CLASSIC: - if ( right == 0 ) - { - mag = wpad.exp.classic.ljs.mag; - ang = wpad.exp.classic.ljs.ang; - } - else - { - mag = wpad.exp.classic.rjs.mag; - ang = wpad.exp.classic.rjs.ang; - } - break; - - default: - break; - } - - /* calculate x/y value (angle need to be converted into radian) */ - if ( mag > 1.0 ) mag = 1.0; - else if ( mag < -1.0 ) mag = -1.0; - double val; - - if ( axis == 0 ) // x-axis - val = mag * sin( ( PI * ang ) / 180.0f ); - else // y-axis - val = mag * cos( ( PI * ang ) / 180.0f ); - - return ( s8 )( val * 128.0f ); - -#else - return 0; -#endif -} - -bool GuiTrigger::Left() -{ - u32 wiibtn = WPAD_BUTTON_LEFT; - if(wpad.exp.type == WPAD_EXP_CLASSIC) - wiibtn = WPAD_CLASSIC_BUTTON_LEFT; - - if ((wpad.btns_d | wpad.btns_h) & wiibtn || (pad.btns_d | pad.btns_h) - & PAD_BUTTON_LEFT || pad.stickX < -PADCAL || WPAD_Stick(0, 0) < -PADCAL) - { - if (wpad.btns_d & wiibtn || pad.btns_d & PAD_BUTTON_LEFT) - { - scrollDelay = SCROLL_INITIAL_DELAY; // reset scroll delay. - return true; - } - else if (scrollDelay == 0) - { - scrollDelay = SCROLL_LOOP_DELAY; - return true; - } - else - { - if (scrollDelay > 0) scrollDelay--; - } - } - return false; -} - -bool GuiTrigger::Right() -{ - u32 wiibtn = WPAD_BUTTON_RIGHT; - if(wpad.exp.type == WPAD_EXP_CLASSIC) - wiibtn = WPAD_CLASSIC_BUTTON_RIGHT; - - if ((wpad.btns_d | wpad.btns_h) & wiibtn || (pad.btns_d | pad.btns_h) - & PAD_BUTTON_RIGHT || pad.stickX > PADCAL || WPAD_Stick(0, 0) > PADCAL) - { - if (wpad.btns_d & wiibtn || pad.btns_d & PAD_BUTTON_RIGHT) - { - scrollDelay = SCROLL_INITIAL_DELAY; // reset scroll delay. - return true; - } - else if (scrollDelay == 0) - { - scrollDelay = SCROLL_LOOP_DELAY; - return true; - } - else - { - if (scrollDelay > 0) scrollDelay--; - } - } - return false; -} - -bool GuiTrigger::Up() -{ - u32 wiibtn = WPAD_BUTTON_UP; - if(wpad.exp.type == WPAD_EXP_CLASSIC) - wiibtn = WPAD_CLASSIC_BUTTON_UP; - - if ((wpad.btns_d | wpad.btns_h) & wiibtn || (pad.btns_d | pad.btns_h) & PAD_BUTTON_UP - || pad.stickY > PADCAL || WPAD_Stick(0, 1) > PADCAL) - { - if (wpad.btns_d & wiibtn || pad.btns_d & PAD_BUTTON_UP) - { - scrollDelay = SCROLL_INITIAL_DELAY; // reset scroll delay. - return true; - } - else if (scrollDelay == 0) - { - scrollDelay = SCROLL_LOOP_DELAY; - return true; - } - else - { - if (scrollDelay > 0) scrollDelay--; - } - } - return false; -} - -bool GuiTrigger::Down() -{ - u32 wiibtn = WPAD_BUTTON_DOWN; - if(wpad.exp.type == WPAD_EXP_CLASSIC) - wiibtn = WPAD_CLASSIC_BUTTON_DOWN; - - if ((wpad.btns_d | wpad.btns_h) & wiibtn || (pad.btns_d | pad.btns_h) - & PAD_BUTTON_DOWN || pad.stickY < -PADCAL || WPAD_Stick(0, 1) < -PADCAL) - { - if (wpad.btns_d & wiibtn || pad.btns_d & PAD_BUTTON_DOWN) - { - scrollDelay = SCROLL_INITIAL_DELAY; // reset scroll delay. - return true; - } - else if (scrollDelay == 0) - { - scrollDelay = SCROLL_LOOP_DELAY; - return true; - } - else - { - if (scrollDelay > 0) scrollDelay--; - } - } - return false; -} diff --git a/source/libwiigui/gui_window.cpp b/source/libwiigui/gui_window.cpp deleted file mode 100644 index d536386b..00000000 --- a/source/libwiigui/gui_window.cpp +++ /dev/null @@ -1,451 +0,0 @@ -/**************************************************************************** - * libwiigui - * - * Tantric 2009 - * - * gui_window.cpp - * - * GUI class definitions - ***************************************************************************/ - -#include "gui.h" - -GuiWindow::GuiWindow() -{ - width = 0; - height = 0; - focus = 0; // allow focus -} - -GuiWindow::GuiWindow(int w, int h) -{ - width = w; - height = h; - focus = 0; // allow focus -} - -GuiWindow::~GuiWindow() -{ -} - -void GuiWindow::Append(GuiElement* e) -{ - LOCK( this ); - if (e == NULL) return; - - Remove(e); - _elements.push_back(e); - e->SetParent(this); -} - -void GuiWindow::Insert(GuiElement* e, u32 index) -{ - LOCK( this ); - if (e == NULL || index > (_elements.size() - 1)) return; - - Remove(e); - _elements.insert(_elements.begin() + index, e); - e->SetParent(this); -} - -void GuiWindow::Remove(GuiElement* e) -{ - LOCK( this ); - if (e == NULL) return; - - for (u8 i = 0; i < _elements.size(); i++) - { - if (e == _elements.at(i)) - { - _elements.erase(_elements.begin() + i); - break; - } - } -} - -void GuiWindow::RemoveAll() -{ - LOCK( this ); - _elements.clear(); -} - -GuiElement* GuiWindow::GetGuiElementAt(u32 index) const -{ - if (index >= _elements.size()) return NULL; - return _elements.at(index); -} - -u32 GuiWindow::GetSize() -{ - return _elements.size(); -} - -void GuiWindow::Draw() -{ - LOCK( this ); - if (_elements.size() == 0 || !this->IsVisible()) return; - - for (u8 i = 0; i < _elements.size(); i++) - { - try - { - _elements.at(i)->Draw(); - } - catch (const std::exception& e) - { - } - } - - this->UpdateEffects(); - - if (parentElement && state == STATE_DISABLED) - //Menu_DrawRectangle(0,0,screenwidth,screenheight,(GXColor){0xbe, 0xca, 0xd5, 0x70},1); - Menu_DrawRectangle(0, 0, screenwidth, screenheight, ( GXColor ) - { 0, 0, 0, 0x70}, 1); -} -void GuiWindow::DrawTooltip() -{ - LOCK( this ); - if (_elements.size() == 0 || !this->IsVisible()) return; - - for (u8 i = 0; i < _elements.size(); i++) - { - try - { - _elements.at(i)->DrawTooltip(); - } - catch (const std::exception& e) - { - } - } -} -void GuiWindow::ResetState() -{ - LOCK( this ); - if (state != STATE_DISABLED) state = STATE_DEFAULT; - - for (u8 i = 0; i < _elements.size(); i++) - { - try - { - _elements.at(i)->ResetState(); - } - catch (const std::exception& e) - { - } - } -} - -void GuiWindow::SetState(int s) -{ - LOCK( this ); - state = s; - - for (u8 i = 0; i < _elements.size(); i++) - { - try - { - _elements.at(i)->SetState(s); - } - catch (const std::exception& e) - { - } - } -} - -void GuiWindow::SetVisible(bool v) -{ - LOCK( this ); - visible = v; - - for (u8 i = 0; i < _elements.size(); i++) - { - try - { - _elements.at(i)->SetVisible(v); - } - catch (const std::exception& e) - { - } - } -} - -void GuiWindow::SetFocus(int f) -{ - LOCK( this ); - focus = f; - - if (f == 1) - this->MoveSelectionVert(1); - else this->ResetState(); -} - -void GuiWindow::ChangeFocus(GuiElement* e) -{ - LOCK( this ); - if (parentElement) return; // this is only intended for the main window - - for (u8 i = 0; i < _elements.size(); i++) - { - if (e == _elements.at(i)) - _elements.at(i)->SetFocus(1); - else if (_elements.at(i)->IsFocused() == 1) _elements.at(i)->SetFocus(0); - } -} - -void GuiWindow::ToggleFocus(GuiTrigger * t) -{ - LOCK( this ); - if (parentElement) return; // this is only intended for the main window - - int found = -1; - int newfocus = -1; - u8 i; - - // look for currently in focus element - for (i = 0; i < _elements.size(); i++) - { - try - { - if (_elements.at(i)->IsFocused() == 1) - { - found = i; - break; - } - } - catch (const std::exception& e) - { - } - } - - // element with focus not found, try to give focus - if (found == -1) - { - for (i = 0; i < _elements.size(); i++) - { - try - { - if (_elements.at(i)->IsFocused() == 0 && _elements.at(i)->GetState() != STATE_DISABLED) // focus is possible (but not set) - { - _elements.at(i)->SetFocus(1); // give this element focus - break; - } - } - catch (const std::exception& e) - { - } - } - } - // change focus - else if (t->wpad.btns_d & (WPAD_BUTTON_1 | WPAD_BUTTON_1 | WPAD_CLASSIC_BUTTON_PLUS) || t->pad.btns_d - & PAD_BUTTON_B) - { - for (i = found; i < _elements.size(); i++) - { - try - { - if (_elements.at(i)->IsFocused() == 0 && _elements.at(i)->GetState() != STATE_DISABLED) // focus is possible (but not set) - { - newfocus = i; - _elements.at(i)->SetFocus(1); // give this element focus - _elements.at(found)->SetFocus(0); // disable focus on other element - break; - } - } - catch (const std::exception& e) - { - } - } - - if (newfocus == -1) - { - for (i = 0; i < found; i++) - { - try - { - if (_elements.at(i)->IsFocused() == 0 && _elements.at(i)->GetState() != STATE_DISABLED) // focus is possible (but not set) - { - _elements.at(i)->SetFocus(1); // give this element focus - _elements.at(found)->SetFocus(0); // disable focus on other element - break; - } - } - catch (const std::exception& e) - { - } - } - } - } -} - -int GuiWindow::GetSelected() -{ - // find selected element - int found = -1; - for (u8 i = 0; i < _elements.size(); i++) - { - try - { - if (_elements.at(i)->GetState() == STATE_SELECTED) - { - found = i; - break; - } - } - catch (const std::exception& e) - { - } - } - return found; -} - -// set element to left/right as selected -// there's probably a more clever way to do this, but this way works -void GuiWindow::MoveSelectionHor(int dir) -{ - LOCK( this ); - int found = -1; - u16 left = 0; - u16 top = 0; - u8 i = 0; - - int selected = this->GetSelected(); - - if (selected >= 0) - { - left = _elements.at(selected)->GetLeft(); - top = _elements.at(selected)->GetTop(); - } - - // look for a button on the same row, to the left/right - for (i = 0; i < _elements.size(); i++) - { - try - { - if (_elements.at(i)->IsSelectable()) - { - if (_elements.at(i)->GetLeft() * dir > left * dir && _elements.at(i)->GetTop() == top) - { - if (found == -1) - found = i; - else if (_elements.at(i)->GetLeft() * dir < _elements.at(found)->GetLeft() * dir) found = i; // this is a better match - } - } - } - catch (const std::exception& e) - { - } - } - if (found >= 0) goto matchfound; - - // match still not found, let's try the first button in the next row - for (i = 0; i < _elements.size(); i++) - { - try - { - if (_elements.at(i)->IsSelectable()) - { - if (_elements.at(i)->GetTop() * dir > top * dir) - { - if (found == -1) - found = i; - else if (_elements.at(i)->GetTop() * dir < _elements.at(found)->GetTop() * dir) - found = i; // this is a better match - else if (_elements.at(i)->GetTop() * dir == _elements.at(found)->GetTop() * dir - && _elements.at(i)->GetLeft() * dir < _elements.at(found)->GetLeft() * dir) found = i; // this is a better match - } - } - } - catch (const std::exception& e) - { - } - } - - // match found - matchfound: if (found >= 0) - { - _elements.at(found)->SetState(STATE_SELECTED); - if (selected >= 0) _elements.at(selected)->ResetState(); - } -} - -void GuiWindow::MoveSelectionVert(int dir) -{ - LOCK( this ); - int found = -1; - u16 left = 0; - u16 top = 0; - u8 i = 0; - - int selected = this->GetSelected(); - - if (selected >= 0) - { - left = _elements.at(selected)->GetLeft(); - top = _elements.at(selected)->GetTop(); - } - - // look for a button above/below, with the least horizontal difference - for (i = 0; i < _elements.size(); i++) - { - try - { - if (_elements.at(i)->IsSelectable()) - { - if (_elements.at(i)->GetTop() * dir > top * dir) - { - if (found == -1) - found = i; - else if (_elements.at(i)->GetTop() * dir < _elements.at(found)->GetTop() * dir) - found = i; // this is a better match - else if (_elements.at(i)->GetTop() * dir == _elements.at(found)->GetTop() * dir && abs( - _elements.at(i)->GetLeft() - left) < abs(_elements.at(found)->GetLeft() - left)) found = i; - } - } - } - catch (const std::exception& e) - { - } - } - if (found >= 0) goto matchfound; - - // match found - matchfound: if (found >= 0) - { - _elements.at(found)->SetState(STATE_SELECTED); - if (selected >= 0) _elements.at(selected)->ResetState(); - } -} - -void GuiWindow::Update(GuiTrigger * t) -{ - LOCK( this ); - if (_elements.size() == 0 || (state == STATE_DISABLED && parentElement)) return; - - for (u8 i = 0; i < _elements.size(); i++) - { - try - { - _elements.at(i)->Update(t); - } - catch (const std::exception& e) - { - } - } - - this->ToggleFocus(t); - - if (focus) // only send actions to this window if it's in focus - { - // pad/joystick navigation - if (t->Right()) - this->MoveSelectionHor(1); - else if (t->Left()) - this->MoveSelectionHor(-1); - else if (t->Down()) - this->MoveSelectionVert(1); - else if (t->Up()) this->MoveSelectionVert(-1); - } - - if (updateCB) updateCB(this); -} diff --git a/source/lstub.cpp b/source/lstub.cpp deleted file mode 100644 index 5047e27f..00000000 --- a/source/lstub.cpp +++ /dev/null @@ -1,100 +0,0 @@ -//functions for manipulating the HBC stub by giantpune - -#include -#include -#include -#include - -#include "lstub.h" -#include "filelist.h" -#include "gecko.h" - -#include "wad/nandtitle.h" - -static char* determineStubTIDLocation() -{ - u32 *stubID = (u32*) 0x80001818; - - //HBC stub 1.0.6 and lower, and stub.bin - if (stubID[0] == 0x480004c1 && stubID[1] == 0x480004f5) - return (char *) 0x800024C6; - - //HBC stub changed @ version 1.0.7. this file was last updated for HBC 1.0.8 - else if (stubID[0] == 0x48000859 && stubID[1] == 0x4800088d) return (char *) 0x8000286A; - - //hexdump( stubID, 0x20 ); - return NULL; - -} - -s32 Set_Stub(u64 reqID) -{ - if (NandTitles.IndexOf(reqID) < 0) return WII_EINSTALL; - - char *stub = determineStubTIDLocation(); - if (!stub) return -68; - - stub[0] = TITLE_7( reqID ); - stub[1] = TITLE_6( reqID ); - stub[8] = TITLE_5( reqID ); - stub[9] = TITLE_4( reqID ); - stub[4] = TITLE_3( reqID ); - stub[5] = TITLE_2( reqID ); - stub[12] = TITLE_1( reqID ); - stub[13] = ((u8) (reqID)); - - DCFlushRange(stub, 0x10); - - return 1; - -} - -s32 Set_Stub_Split(u32 type, const char* reqID) -{ - char tmp[4]; - u32 lower; - sprintf(tmp, "%c%c%c%c", reqID[0], reqID[1], reqID[2], reqID[3]); - memcpy(&lower, tmp, 4); - u64 reqID64 = TITLE_ID( type, lower ); - return Set_Stub(reqID64); - -} - -void loadStub() -{ - char *stubLoc = (char *) 0x80001800; - memcpy(stubLoc, stub_bin, stub_bin_size); - DCFlushRange(stubLoc, stub_bin_size); -} - -u64 getStubDest() -{ - if (!hbcStubAvailable()) return 0; - - char ret[8]; - u64 retu = 0; - - char *stub = determineStubTIDLocation(); - if (!stub) return 0; - - ret[0] = stub[0]; - ret[1] = stub[1]; - ret[2] = stub[8]; - ret[3] = stub[9]; - ret[4] = stub[4]; - ret[5] = stub[5]; - ret[6] = stub[12]; - ret[7] = stub[13]; - - memcpy(&retu, ret, 8); - - return retu; -} - -u8 hbcStubAvailable() -{ - char * sig = (char *) 0x80001804; - return (sig[0] == 'S' && sig[1] == 'T' && sig[2] == 'U' && sig[3] == 'B' && sig[4] == 'H' && sig[5] == 'A' - && sig[6] == 'X' && sig[7] == 'X') ? 1 : 0; -} - diff --git a/source/lstub.h b/source/lstub.h deleted file mode 100644 index 978d563f..00000000 --- a/source/lstub.h +++ /dev/null @@ -1,29 +0,0 @@ -//small group of functions to manipulate the HBC stub -//brought to you by giantpune - -#ifndef _LSTUB_H_ -#define _LSTUB_H_ - -//to set the "return to" stub for a certain ID -//!reqID is the Requested ID to return to -//!returns WII_EINTERNAL if it cant get the list of installed titles with ES functions -//!retuns -69 if the ID is not installed -//!1 if successful -s32 Set_Stub(u64 reqID); - -//!same as the above function, but expects a type and 4 char channel ID -s32 Set_Stub_Split(u32 type, const char* reqID); - -//load the default HBC stub into memory. as long as nothing writes to the 0x80001800 -// +0xDC7 memory block it will stay there. by default it has 0x00010001/JODI. -void loadStub(); - -//get whatever ID the stub is set to load -//!returns 0 if no stub is loaded into memory (must be the HBC stub at 0x800018000) -//!otherwise returns the ID set to return to -u64 getStubDest(); - -//returns 0 or 1 depending on wether the stub is available -u8 hbcStubAvailable(); - -#endif diff --git a/source/main.cpp b/source/main.cpp deleted file mode 100644 index 1833965d..00000000 --- a/source/main.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** - * USB Loader GX Team - * - * Main loadup of the application - * - * libwiigui - * Tantric 2009 - ***************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "video.h" -#include "themes/CTheme.h" -#include "menu/menus.h" -#include "main.h" -#include "Controls/DeviceHandler.hpp" -#include "settings/CSettings.h" -#include "memory/mem2.h" -#include "wad/nandtitle.h" -#include "system/IosLoader.h" -#include "usbloader/MountGamePartition.h" -#include "usbloader/GameBooter.hpp" -#include "StartUpProcess.h" -#include "sys.h" - -extern "C" -{ - extern s32 MagicPatches(s32); - void __exception_setreload(int t); -} - -static int QuickGameBoot(const char * gameID) -{ - DeviceHandler::Instance()->MountAll(); - Settings.Load(); - - MountGamePartition(false); - return GameBooter::BootGame(gameID); -} - -int main(int argc, char *argv[]) -{ - MEM2_init(48); - __exception_setreload(20); - MagicPatches(1); - InitVideo(); - InitGecko(); - USBGeckoOutput(); - NandTitles.Get(); - setlocale(LC_ALL, "en.UTF-8"); - - if(argc > 1 && argv[1]) - return QuickGameBoot(argv[1]); - - StartUpProcess::Run(); - - MainMenu(MENU_DISCLIST); - return 0; -} diff --git a/source/main.h b/source/main.h deleted file mode 100644 index f545ca60..00000000 --- a/source/main.h +++ /dev/null @@ -1,16 +0,0 @@ -/**************************************************************************** - * libwiigui Template - * Tantric 2009 - * - * demo.h - ***************************************************************************/ - -#ifndef _MAIN_H_ -#define _MAIN_H_ - -#include "FreeTypeGX.h" - -void DefaultSettings(); -extern FreeTypeGX *fontSystem; - -#endif diff --git a/source/memory/mem2.cpp b/source/memory/mem2.cpp deleted file mode 100644 index 7f7361c7..00000000 --- a/source/memory/mem2.cpp +++ /dev/null @@ -1,191 +0,0 @@ - -#include "mem2.h" -#include "mem2alloc.hpp" - -#include -#include - -#define MEM2_PRIORITY_SIZE 2097152 //2MB - -// Forbid the use of MEM2 through malloc -u32 MALLOC_MEM2 = 0; - -static CMEM2Alloc g_mem2gp; - -static bool g_bigGoesToMem2 = false; - -extern "C" -{ - -void MEM2_takeBigOnes(bool b) -{ - g_bigGoesToMem2 = b; -} - -void MEM2_init(unsigned int mem2Size) -{ - g_mem2gp.init(mem2Size); -} - -void MEM2_cleanup(void) -{ - g_mem2gp.cleanup(); -} - -void *MEM2_alloc(unsigned int s) -{ - return g_mem2gp.allocate(s); -} - -void MEM2_free(void *p) -{ - g_mem2gp.release(p); -} - -void *MEM2_realloc(void *p, unsigned int s) -{ - return g_mem2gp.reallocate(p, s); -} - -unsigned int MEM2_usableSize(void *p) -{ - return CMEM2Alloc::usableSize(p); -} - -unsigned int MEM2_freesize() -{ - return g_mem2gp.FreeSize(); -} - -extern __typeof(malloc) __real_malloc; -extern __typeof(calloc) __real_calloc; -extern __typeof(realloc) __real_realloc; -extern __typeof(memalign) __real_memalign; -extern __typeof(free) __real_free; -extern __typeof(malloc_usable_size) __real_malloc_usable_size; - -void *__wrap_malloc(size_t size) -{ - void *p; - if (g_bigGoesToMem2 && size > MEM2_PRIORITY_SIZE) - { - p = MEM2_alloc(size); - if (p != 0) { - return p; - } - return __real_malloc(size); - } - p = __real_malloc(size); - if (p != 0) { - return p; - } - return MEM2_alloc(size); -} - -void *__wrap_calloc(size_t n, size_t size) -{ - void *p; - if (g_bigGoesToMem2 && size > MEM2_PRIORITY_SIZE) - { - p = MEM2_alloc(n * size); - if (p != 0) - { - memset(p, 0, n * size); - return p; - } - return __real_calloc(n, size); - } - p = __real_calloc(n, size); - if (p != 0) { - return p; - } - p = MEM2_alloc(n * size); - if (p != 0) { - memset(p, 0, n * size); - } - return p; -} - -void *__wrap_memalign(size_t a, size_t size) -{ - void *p; - if (g_bigGoesToMem2 && size > MEM2_PRIORITY_SIZE) - { - if (a <= 32 && 32 % a == 0) - { - p = MEM2_alloc(size); - if (p != 0) { - return p; - } - } - return __real_memalign(a, size); - } - p = __real_memalign(a, size); - if (p != 0 || a > 32 || 32 % a != 0) { - return p; - } - - return MEM2_alloc(size); -} - -void __wrap_free(void *p) -{ - if(!p) - return; - - if (((u32)p & 0x10000000) != 0) - { - MEM2_free(p); - } - else - { - __real_free(p); - } -} - -void *__wrap_realloc(void *p, size_t size) -{ - void *n; - // ptr from mem2 - if (((u32)p & 0x10000000) != 0 || (p == 0 && g_bigGoesToMem2 && size > MEM2_PRIORITY_SIZE)) - { - n = MEM2_realloc(p, size); - if (n != 0) { - return n; - } - n = __real_malloc(size); - if (n == 0) { - return 0; - } - if (p != 0) - { - memcpy(n, p, MEM2_usableSize(p) < size ? MEM2_usableSize(p) : size); - MEM2_free(p); - } - return n; - } - // ptr from malloc - n = __real_realloc(p, size); - if (n != 0) { - return n; - } - n = MEM2_alloc(size); - if (n == 0) { - return 0; - } - if (p != 0) - { - memcpy(n, p, __real_malloc_usable_size(p) < size ? __real_malloc_usable_size(p) : size); - __real_free(p); - } - return n; -} - -size_t __wrap_malloc_usable_size(void *p) -{ - if (((u32)p & 0x10000000) != 0) - return MEM2_usableSize(p); - return __real_malloc_usable_size(p); -} - -} ///extern "C" diff --git a/source/memory/mem2.h b/source/memory/mem2.h deleted file mode 100644 index b8659631..00000000 --- a/source/memory/mem2.h +++ /dev/null @@ -1,24 +0,0 @@ -// 2 MEM2 allocators, one for general purpose, one for covers -// Aligned and padded to 32 bytes, as required by many functions - -#ifndef __MEM2_H_ -#define __MEM2_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -void MEM2_init(unsigned int mem2Size); -void MEM2_cleanup(void); -void MEM2_takeBigOnes(bool b); -void *MEM2_alloc(unsigned int s); -void *MEM2_realloc(void *p, unsigned int s); -void MEM2_free(void *p); -unsigned int MEM2_usableSize(void *p); -unsigned int MEM2_freesize(); - -#ifdef __cplusplus -} -#endif - -#endif // !defined(__MEM2_H_) diff --git a/source/memory/mem2alloc.cpp b/source/memory/mem2alloc.cpp deleted file mode 100644 index 50209ee2..00000000 --- a/source/memory/mem2alloc.cpp +++ /dev/null @@ -1,238 +0,0 @@ - -#include "mem2alloc.hpp" - -#include -#include -#include - - -class LockMutex -{ - mutex_t &m_mutex; -public: - LockMutex(mutex_t &m) : m_mutex(m) { LWP_MutexLock(m_mutex); } - ~LockMutex(void) { LWP_MutexUnlock(m_mutex); } -}; - -void CMEM2Alloc::init(unsigned int size) -{ - m_baseAddress = (SBlock *) (((u32)SYS_GetArena2Lo() + 31) & ~31); - m_endAddress = (SBlock *) ((char *)m_baseAddress + std::min(size * 0x100000, SYS_GetArena2Size() & ~31)); - if (m_endAddress > (SBlock *) 0x93300000) //rest is reserved for usb/usb2/network and other stuff... (0xE0000 bytes) - m_endAddress = (SBlock *) 0x93300000; - SYS_SetArena2Lo(m_endAddress); - LWP_MutexInit(&m_mutex, 0); -} - -void CMEM2Alloc::init(void *addr, void *end) -{ - m_baseAddress = (SBlock *)(((u32)addr + 31) & ~31); - m_endAddress = (SBlock *)((u32)end & ~31); - LWP_MutexInit(&m_mutex, 0); -} - -void CMEM2Alloc::cleanup(void) -{ - LWP_MutexDestroy(m_mutex); - m_mutex = 0; - m_first = 0; - // Try to release the range we took through SYS functions - if (SYS_GetArena2Lo() == m_endAddress) - SYS_SetArena2Lo(m_baseAddress); - m_baseAddress = 0; - m_endAddress = 0; -} - -void CMEM2Alloc::clear(void) -{ - m_first = 0; - memset(m_baseAddress, 0, (u8 *)m_endAddress - (u8 *)m_endAddress); -} - -unsigned int CMEM2Alloc::usableSize(void *p) -{ - return p == 0 ? 0 : ((SBlock *)p - 1)->s * sizeof (SBlock); -} - -void *CMEM2Alloc::allocate(unsigned int s) -{ - if (s == 0) - s = 1; - // - LockMutex lock(m_mutex); - // - s = (s - 1) / sizeof (SBlock) + 1; - // First block - if (m_first == 0) - { - if (m_baseAddress + s + 1 >= m_endAddress) - return 0; - m_first = m_baseAddress; - m_first->next = 0; - m_first->prev = 0; - m_first->s = s; - m_first->f = false; - return (void *)(m_first + 1); - } - // Search for a free block - SBlock *i; - SBlock *j; - for (i = m_first; i != 0; i = i->next) - { - if (i->f && i->s >= s) - break; - j = i; - } - // Create a new block - if (i == 0) - { - i = j + j->s + 1; - if (i + s + 1 >= m_endAddress) - return 0; - j->next = i; - i->prev = j; - i->next = 0; - i->s = s; - i->f = false; - return (void *)(i + 1); - } - // Reuse a free block - i->f = false; - // Split it - if (i->s > s + 1) - { - j = i + s + 1; - j->f = true; - j->s = i->s - s - 1; - i->s = s; - j->next = i->next; - j->prev = i; - i->next = j; - if (j->next != 0) - j->next->prev = j; - } - return (void *)(i + 1); -} - -void CMEM2Alloc::release(void *p) -{ - if (p == 0) - return; - - LockMutex lock(m_mutex); - SBlock *i = (SBlock *)p - 1; - i->f = true; - - // If there are no other blocks following yet, - // set the remaining size to free size. - Dimok - if(i->next == 0) - i->s = m_endAddress - i - 1; - - // Merge with previous block - if (i->prev != 0 && i->prev->f) - { - i = i->prev; - i->s += i->next->s + 1; - i->next = i->next->next; - if (i->next != 0) - i->next->prev = i; - } - // Merge with next block - if (i->next != 0 && i->next->f) - { - i->s += i->next->s + 1; - i->next = i->next->next; - if (i->next != 0) - i->next->prev = i; - } -} - -void *CMEM2Alloc::reallocate(void *p, unsigned int s) -{ - SBlock *i; - SBlock *j; - void *n; - - if (s == 0) - s = 1; - if (p == 0) - return allocate(s); - - i = (SBlock *)p - 1; - s = (s - 1) / sizeof (SBlock) + 1; - { - LockMutex lock(m_mutex); - - //out of memory /* Dimok */ - if (i + s + 1 >= m_endAddress) - { - return 0; - } - - // Last block - if (i->next == 0 && i + s + 1 < m_endAddress) - { - i->s = s; - return p; - } - // Size <= current size + next block - if (i->next != 0 && i->s < s && i->next->f && i->s + i->next->s + 1 >= s) - { - // Merge - i->s += i->next->s + 1; - i->next = i->next->next; - if (i->next != 0) - i->next->prev = i; - } - // Size <= current size - if (i->s >= s) - { - // Split - if (i->s > s + 1) - { - j = i + s + 1; - j->f = true; - j->s = i->s - s - 1; - i->s = s; - j->next = i->next; - j->prev = i; - i->next = j; - if (j->next != 0) - j->next->prev = j; - } - return p; - } - } - // Size > current size - n = allocate(s * sizeof (SBlock)); - if (n == 0) - return 0; - memcpy(n, p, i->s * sizeof (SBlock)); - release(p); - return n; -} - -unsigned int CMEM2Alloc::FreeSize() -{ - LockMutex lock(m_mutex); - - if (m_first == 0) - return (const char *) m_endAddress - (const char *) m_baseAddress; - - SBlock *i; - unsigned int size = 0; - - for(i = m_first; i != 0; i = i->next) - { - if(i->f && i->next != 0) - size += i->s; - - else if(i->f && i->next == 0) - size += m_endAddress - i - 1; - - else if(!i->f && i->next == 0) - size += m_endAddress - i - i->s - 1; - } - - return size*sizeof(SBlock); -} diff --git a/source/memory/mem2alloc.hpp b/source/memory/mem2alloc.hpp deleted file mode 100644 index e66f524a..00000000 --- a/source/memory/mem2alloc.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// MEM2 allocator -// Made as a class so i can have 2 sections, one being dedicated to the covers - -#ifndef __MEM2ALLOC_HPP -#define __MEM2ALLOC_HPP - -#include - -class CMEM2Alloc -{ -public: - void *allocate(unsigned int s); - void release(void *p); - void *reallocate(void *p, unsigned int s); - void init(unsigned int size); - void init(void *addr, void *end); - void cleanup(void); - void clear(void); - static unsigned int usableSize(void *p); - void forceEndAddress(void *newAddr) { m_endAddress = (SBlock *)newAddr; } - void *getEndAddress(void) const { return m_endAddress; } - void info(void *&address, unsigned int &size) const { address = m_baseAddress; size = (const char *)m_endAddress - (const char *)m_baseAddress; } - unsigned int FreeSize(); - // - CMEM2Alloc(void) : m_baseAddress(0), m_endAddress(0), m_first(0), m_mutex(0) { } -private: - struct SBlock - { - unsigned int s; - SBlock *next; - SBlock *prev; - bool f; - } __attribute__((aligned(32))); - SBlock *m_baseAddress; - SBlock *m_endAddress; - SBlock *m_first; - mutex_t m_mutex; -private: - CMEM2Alloc(const CMEM2Alloc &); -}; - -#endif // !defined(__MEM2ALLOC_HPP) diff --git a/source/memory/memory.h b/source/memory/memory.h deleted file mode 100644 index 84250b91..00000000 --- a/source/memory/memory.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef __MEMORY_H_ -#define __MEMORY_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#define Disc_ID ((u32*) 0x80000000) -#define Disc_Region ((u32*) 0x80000003) -#define Disc_Magic ((u32*) 0x80000018) -#define Sys_Magic ((u32*) 0x80000020) -#define Version ((u32*) 0x80000024) -#define Mem_Size ((u32*) 0x80000028) -#define Board_Model ((u32*) 0x8000002C) -#define Arena_L ((u32*) 0x80000030) -#define Arena_H ((u32*) 0x80000034) -#define FST ((u32*) 0x80000038) -#define Max_FST ((u32*) 0x8000003C) -#define Assembler ((u32*) 0x80000060) -#define Video_Mode ((u32*) 0x800000CC) -#define Dev_Debugger ((u32*) 0x800000EC) -#define Simulated_Mem ((u32*) 0x800000F0) -#define BI2 ((u32*) 0x800000F4) -#define Bus_Speed ((u32*) 0x800000F8) -#define CPU_Speed ((u32*) 0x800000FC) -#define Online_Check ((u32*) 0x80003180) -#define GameID_Address ((u32*) 0x80003184) - -#define allocate_memory(size) memalign(32, (size+31)&(~31)) - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/menu.cpp b/source/menu.cpp deleted file mode 100644 index 14b66473..00000000 --- a/source/menu.cpp +++ /dev/null @@ -1,241 +0,0 @@ -/**************************************************************************** - * USB Loader GX Team - * - * libwiigui Template - * by Tantric 2009 - * - * menu.cpp - * Menu flow routines - handles all menu logic - ***************************************************************************/ -#include - -#include "libwiigui/gui.h" -#include "homebrewboot/BootHomebrew.h" -#include "homebrewboot/HomebrewBrowse.h" -#include "prompts/ProgressWindow.h" -#include "menu/GameBrowseMenu.hpp" -#include "menu/menus.h" -#include "mload/mload.h" -#include "mload/mload_modules.h" -#include "network/networkops.h" -#include "patches/patchcode.h" -#include "settings/Settings.h" -#include "settings/CGameSettings.h" -#include "themes/CTheme.h" -#include "themes/ThemeMenu.h" -#include "themes/ThemeDownloader.h" -#include "usbloader/disc.h" -#include "usbloader/GameList.h" -#include "usbloader/MountGamePartition.h" -#include "mload/mload_modules.h" -#include "xml/xml.h" -#include "audio.h" -#include "gecko.h" -#include "menu.h" -#include "sys.h" -#include "wpad.h" -#include "settings/newtitles.h" -#include "patches/fst.h" -#include "usbloader/frag.h" -#include "usbloader/wbfs.h" -#include "wad/nandtitle.h" - -/*** Variables that are also used extern ***/ -GuiWindow * mainWindow = NULL; -GuiImageData * pointer[4]; -GuiImage * bgImg = NULL; -GuiImageData * background = NULL; -GuiBGM * bgMusic = NULL; -GuiSound *btnSoundClick = NULL; -GuiSound *btnSoundClick2 = NULL; -GuiSound *btnSoundOver = NULL; - -int currentMenu = 0; -u8 mountMethod = 0; - -static lwp_t guithread = LWP_THREAD_NULL; -static bool guiHalt = true; -static bool ExitRequested = false; - -/**************************************************************************** - * ResumeGui - * - * Signals the GUI thread to start, and resumes the thread. This is called - * after finishing the removal/insertion of new elements, and after initial - * GUI setup. - ***************************************************************************/ -void ResumeGui() -{ - guiHalt = false; - LWP_ResumeThread(guithread); -} - -/**************************************************************************** - * HaltGui - * - * Signals the GUI thread to stop, and waits for GUI thread to stop - * This is necessary whenever removing/inserting new elements into the GUI. - * This eliminates the possibility that the GUI is in the middle of accessing - * an element that is being changed. - ***************************************************************************/ -void HaltGui() -{ - if (guiHalt) return; - guiHalt = true; - - // wait for thread to finish - while (!LWP_ThreadIsSuspended(guithread)) - usleep(100); -} - -/**************************************************************************** - * UpdateGUI - * - * Primary thread to allow GUI to respond to state changes, and draws GUI - ***************************************************************************/ -static void * UpdateGUI(void *arg) -{ - int i; - - while (!ExitRequested) - { - if (guiHalt) - { - LWP_SuspendThread(guithread); - continue; - } - - mainWindow->Draw(); - if (Settings.tooltips == ON && Theme::ShowTooltips && mainWindow->GetState() != STATE_DISABLED) mainWindow->DrawTooltip(); - - for (i = 3; i >= 0; i--) - { - if (userInput[i].wpad.ir.valid) - { - Menu_DrawImg(userInput[i].wpad.ir.x - 48, userInput[i].wpad.ir.y - 48, 200.0, 96, 96, - pointer[i]->GetImage(), userInput[i].wpad.ir.angle, Settings.widescreen ? 0.8 : 1, 1, 255, 0, - 0, 0, 0, 0, 0, 0, 0); - } - } - - Menu_Render(); - - UpdatePads(); - - for (i = 0; i < 4; i++) - mainWindow->Update(&userInput[i]); - - if (bgMusic) bgMusic->UpdateState(); - } - - for (i = 5; i < 255; i += 10) - { - mainWindow->Draw(); - Menu_DrawRectangle(0, 0, screenwidth, screenheight, (GXColor) {0, 0, 0, i}, 1); - Menu_Render(); - } - - mainWindow->RemoveAll(); - ShutoffRumble(); - - return NULL; -} - -/**************************************************************************** - * InitGUIThread - * - * Startup GUI threads - ***************************************************************************/ -void InitGUIThreads() -{ - ExitRequested = false; - - if(guithread == LWP_THREAD_NULL) - LWP_CreateThread(&guithread, UpdateGUI, NULL, NULL, 65536, LWP_PRIO_HIGHEST); -} - -void ExitGUIThreads() -{ - ExitRequested = true; - - if(guithread != LWP_THREAD_NULL) - { - ResumeGui(); - LWP_JoinThread(guithread, NULL); - guithread = LWP_THREAD_NULL; - } -} - -/**************************************************************************** - * MainMenu - ***************************************************************************/ -int MainMenu(int menu) -{ - currentMenu = menu; - - InitGUIThreads(); - - InitProgressThread(); - InitNetworkThread(); - - if (Settings.autonetwork) - ResumeNetworkThread(); - - btnSoundClick = new GuiSound(Resources::GetFile("button_click.wav"), Resources::GetFileSize("button_click.wav"), Settings.sfxvolume); - btnSoundClick2 = new GuiSound(Resources::GetFile("button_click2.wav"), Resources::GetFileSize("button_click2.wav"), Settings.sfxvolume); - btnSoundOver = new GuiSound(Resources::GetFile("button_over.wav"), Resources::GetFileSize("button_over.wav"), Settings.sfxvolume); - - pointer[0] = Resources::GetImageData("player1_point.png"); - pointer[1] = Resources::GetImageData("player2_point.png"); - pointer[2] = Resources::GetImageData("player3_point.png"); - pointer[3] = Resources::GetImageData("player4_point.png"); - - mainWindow = new GuiWindow(screenwidth, screenheight); - - background = Resources::GetImageData(Settings.widescreen ? "wbackground.png" : "background.png"); - - bgImg = new GuiImage(background); - mainWindow->Append(bgImg); - - ResumeGui(); - - bgMusic = new GuiBGM(Resources::GetFile("bg_music.ogg"), Resources::GetFileSize("bg_music.ogg"), Settings.volume); - bgMusic->SetLoop(Settings.musicloopmode); //loop music - bgMusic->Load(Settings.ogg_path); - bgMusic->Play(); - - MountGamePartition(); - - while (currentMenu != MENU_EXIT) - { - bgMusic->SetVolume(Settings.volume); - - switch (currentMenu) - { - case MENU_INSTALL: - currentMenu = MenuInstall(); - break; - case MENU_SETTINGS: - currentMenu = MenuSettings(); - break; - case MENU_THEMEMENU: - currentMenu = ThemeMenu::Run(); - break; - case MENU_THEMEDOWNLOADER: - currentMenu = ThemeDownloader::Run(); - break; - case MENU_HOMEBREWBROWSE: - currentMenu = MenuHomebrewBrowse(); - break; - case MENU_DISCLIST: - default: // unrecognized menu - currentMenu = GameBrowseMenu::Execute(); - break; - } - } - - //! THIS SHOULD NEVER HAPPEN ANYMORE - ExitApp(); - - return -1; -} diff --git a/source/menu.h b/source/menu.h deleted file mode 100644 index f535941f..00000000 --- a/source/menu.h +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** - * libwiigui Template - * Tantric 2009 - * - * menu.h - * Menu flow routines - handles all menu logic - ***************************************************************************/ - -#ifndef _MENU_H_ -#define _MENU_H_ - -#include -#include "libwiigui/gui.h" -#include "settings/CSettings.h" -#include "main.h" - -void InitGUIThreads(void); -void ExitGUIThreads(void); - -int MainMenu(int menuitem); - -enum -{ - MENU_EXIT = -1, - MENU_NONE, - MENU_SETTINGS, - MENU_DISCLIST, - MENU_INSTALL, - MENU_GAME_SETTINGS, - MENU_HOMEBREWBROWSE, - BOOTHOMEBREW, - MENU_THEMEDOWNLOADER, - MENU_THEMEMENU, -}; - -void ResumeGui(); -void HaltGui(); - -extern GuiImageData *pointer[4]; -extern GuiImageData *background; -extern GuiImage *bgImg; -extern GuiWindow *mainWindow; -extern GuiText *GameRegionTxt; -extern GuiText *GameIDTxt; -extern GuiImageData *cover; -extern GuiImage *coverImg; -extern FreeTypeGX *fontSystem; - -#endif diff --git a/source/menu/GameBrowseMenu.cpp b/source/menu/GameBrowseMenu.cpp deleted file mode 100644 index f3998998..00000000 --- a/source/menu/GameBrowseMenu.cpp +++ /dev/null @@ -1,1434 +0,0 @@ -#include -#include "GameBrowseMenu.hpp" -#include "Controls/DeviceHandler.hpp" -#include "libwiigui/LoadCoverImage.h" -#include "prompts/PromptWindows.h" -#include "prompts/gameinfo.h" -#include "prompts/DiscBrowser.h" -#include "prompts/GameWindow.hpp" -#include "themes/CTheme.h" -#include "language/gettext.h" -#include "usbloader/wbfs.h" -#include "usbloader/wdvd.h" -#include "usbloader/GameList.h" -#include "usbloader/AlternateDOLOffsets.h" -#include "usbloader/GameBooter.hpp" -#include "network/networkops.h" -#include "network/update.h" -#include "network/ImageDownloader.h" -#include "FileOperations/fileops.h" -#include "settings/Settings.h" -#include "settings/CSettings.h" -#include "settings/CGameStatistics.h" -#include "settings/CGameSettings.h" -#include "settings/GameTitles.h" -#include "utils/StringTools.h" -#include "utils/rockout.h" -#include "utils/ShowError.h" -#include "utils/tools.h" -#include "utils/PasswordCheck.h" -#include "WDMMenu.hpp" -#include "gecko.h" -#include "menus.h" -#include "wpad.h" -#include "sys.h" - -extern int load_from_fs; -extern u8 mountMethod; -extern bool updateavailable; -extern struct discHdr *dvdheader; -extern int cntMissFiles; - -static int lastSelectedGame = 0; -static bool WiiMoteInitiated = false; -static bool Exiting = false; - -GameBrowseMenu::GameBrowseMenu() - : GuiWindow(screenwidth, screenheight) -{ - returnMenu = MENU_NONE; - gameSelectedOld = -1; - lastrawtime = 0; - Exiting = false; - show_searchwindow = false; - gameBrowser = NULL; - gameGrid = NULL; - gameCarousel = NULL; - searchBar = NULL; - gameCover = NULL; - gameCoverImg = NULL; - GameIDTxt = NULL; - GameRegionTxt = NULL; - WDVD_GetCoverStatus(&DiscDriveCoverOld); - wString oldFilter(gameList.GetCurrentFilter()); - gameList.FilterList(oldFilter.c_str()); - HDDSizeCallback.SetCallback(this, &GameBrowseMenu::UpdateFreeSpace); - - btnInstall = Resources::GetImageData("button_install.png"); - btnInstallOver = Resources::GetImageData("button_install_over.png"); - btnSettings = Resources::GetImageData("settings_button.png"); - btnSettingsOver = Resources::GetImageData("settings_button_over.png"); - btnpwroff = Resources::GetImageData("wiimote_poweroff.png"); - btnpwroffOver = Resources::GetImageData("wiimote_poweroff_over.png"); - btnhome = Resources::GetImageData("menu_button.png"); - btnhomeOver = Resources::GetImageData("menu_button_over.png"); - btnsdcardOver = Resources::GetImageData("sdcard_over.png"); - btnsdcard = Resources::GetImageData("sdcard.png"); - - imgfavIcon = Resources::GetImageData("favIcon.png"); - imgfavIcon_gray = Resources::GetImageData("favIcon_gray.png"); - imgsearchIcon = Resources::GetImageData("searchIcon.png"); - imgsearchIcon_gray = Resources::GetImageData("searchIcon_gray.png"); - imgabcIcon = Resources::GetImageData("abcIcon.png"); - imgrankIcon = Resources::GetImageData("rankIcon.png"); - imgplayCountIcon = Resources::GetImageData("playCountIcon.png"); - imgplayersSortIcon = Resources::GetImageData("playersSort.png"); - imgarrangeGrid = Resources::GetImageData("arrangeGrid.png"); - imgarrangeGrid_gray = Resources::GetImageData("arrangeGrid_gray.png"); - imgarrangeList = Resources::GetImageData("arrangeList.png"); - imgarrangeList_gray = Resources::GetImageData("arrangeList_gray.png"); - imgarrangeCarousel = Resources::GetImageData("arrangeCarousel.png"); - imgarrangeCarousel_gray = Resources::GetImageData("arrangeCarousel_gray.png"); - imgdvd = Resources::GetImageData("dvd.png"); - imgdvd_gray = Resources::GetImageData("dvd_gray.png"); - imgLock = Resources::GetImageData("lock.png"); - imgLock_gray = Resources::GetImageData("lock_gray.png"); - imgUnlock = Resources::GetImageData("unlock.png"); - imgUnlock_gray = Resources::GetImageData("unlock_gray.png"); - - homebrewImgData = Resources::GetImageData("browser.png"); - homebrewImgDataOver = Resources::GetImageData("browser_over.png"); - - trigA = new GuiTrigger; - trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - trigHome = new GuiTrigger; - trigHome->SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, PAD_BUTTON_START); - trig2 = new GuiTrigger; - trig2->SetButtonOnlyTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_X, 0); - trig1 = new GuiTrigger; - trig1->SetButtonOnlyTrigger(-1, WPAD_BUTTON_1 | WPAD_CLASSIC_BUTTON_Y, 0); - - usedSpaceTxt = new GuiText(" ", 18, thColor("r=55 g=190 b=237 a=255 - hdd info color")); - usedSpaceTxt->SetAlignment(thAlign("center - hdd info align hor"), thAlign("top - hdd info align ver")); - usedSpaceTxt->SetPosition(thInt("0 - hdd info pos x"), thInt("400 - hdd info pos y")); - - gamecntTxt = new GuiText((char *) NULL, 18, thColor("r=55 g=190 b=237 a=255 - game count color")); - gamecntBtn = new GuiButton(100, 18); - gamecntBtn->SetAlignment(thAlign("center - game count align hor"), thAlign("top - game count align ver")); - gamecntBtn->SetPosition(thInt("0 - game count pos x"), thInt("420 - game count pos y")); - gamecntBtn->SetLabel(gamecntTxt); - gamecntBtn->SetEffectGrow(); - gamecntBtn->SetTrigger(trigA); - - installBtnTT = new GuiTooltip(tr( "Install a game" )); - if (Settings.wsprompt) installBtnTT->SetWidescreen(Settings.widescreen); - installBtnTT->SetAlpha(thInt("255 - tooltip alpha")); - installBtnImg = new GuiImage(btnInstall); - installBtnImgOver = new GuiImage(btnInstallOver); - installBtnImg->SetWidescreen(Settings.widescreen); - installBtnImgOver->SetWidescreen(Settings.widescreen); - - installBtn = new GuiButton(installBtnImg, installBtnImgOver, ALIGN_LEFT, ALIGN_TOP, - thInt("16 - install btn pos x"), thInt("355 - install btn pos y"), - trigA, btnSoundOver, btnSoundClick2, 1, installBtnTT, 24, -30, 0, 5); - - settingsBtnTT = new GuiTooltip(tr( "Settings" )); - if (Settings.wsprompt) settingsBtnTT->SetWidescreen(Settings.widescreen); - settingsBtnTT->SetAlpha(thInt("255 - tooltip alpha")); - settingsBtnImg = new GuiImage(btnSettings); - settingsBtnImg->SetWidescreen(Settings.widescreen); - settingsBtnImgOver = new GuiImage(btnSettingsOver); - settingsBtnImgOver->SetWidescreen(Settings.widescreen); - settingsBtn = new GuiButton(settingsBtnImg, settingsBtnImgOver, 0, 3, - thInt("64 - settings btn pos x"), thInt("371 - settings btn pos y"), - trigA, btnSoundOver, btnSoundClick2, 1, settingsBtnTT, 65, -30, 0, 5); - - homeBtnTT = new GuiTooltip(tr( "Back to HBC or Wii Menu" )); - if (Settings.wsprompt) homeBtnTT->SetWidescreen(Settings.widescreen); - settingsBtnTT->SetAlpha(thInt("255 - tooltip alpha")); - homeBtnImg = new GuiImage(btnhome); - homeBtnImg->SetWidescreen(Settings.widescreen); - homeBtnImgOver = new GuiImage(btnhomeOver); - homeBtnImgOver->SetWidescreen(Settings.widescreen); - homeBtn = new GuiButton(homeBtnImg, homeBtnImgOver, 0, 3, - thInt("489 - home menu btn pos x"), thInt("371 - home menu btn pos y"), - trigA, btnSoundOver, btnSoundClick2, 1, homeBtnTT, 15, -30, 1, 5); - homeBtn->RemoveSoundClick(); - homeBtn->SetTrigger(trigHome); - - poweroffBtnTT = new GuiTooltip(tr( "Power off the Wii" )); - if (Settings.wsprompt) poweroffBtnTT->SetWidescreen(Settings.widescreen); - poweroffBtnTT->SetAlpha(thInt("255 - tooltip alpha")); - poweroffBtnImg = new GuiImage(btnpwroff); - poweroffBtnImgOver = new GuiImage(btnpwroffOver); - poweroffBtnImg->SetWidescreen(Settings.widescreen); - poweroffBtnImgOver->SetWidescreen(Settings.widescreen); - poweroffBtn = new GuiButton(poweroffBtnImg, poweroffBtnImgOver, 0, 3, - thInt("576 - power off btn pos x"), thInt("355 - power off btn pos y"), - trigA, btnSoundOver, btnSoundClick2, 1, poweroffBtnTT, -10, -30, 1, 5); - - sdcardBtnTT = new GuiTooltip(tr( "Reload SD" )); - if (Settings.wsprompt) sdcardBtnTT->SetWidescreen(Settings.widescreen); - sdcardBtnTT->SetAlpha(thInt("255 - tooltip alpha")); - sdcardImg = new GuiImage(btnsdcard); - sdcardImgOver = new GuiImage(btnsdcardOver); - sdcardImg->SetWidescreen(Settings.widescreen); - sdcardImgOver->SetWidescreen(Settings.widescreen); - sdcardBtn = new GuiButton(sdcardImg, sdcardImgOver, 0, 3, - thInt("160 - sd card btn pos x"), thInt("395 - sd card btn pos y"), - trigA, btnSoundOver, btnSoundClick2, 1, sdcardBtnTT, 15, -30, 0, 5); - - gameInfo = new GuiButton(0, 0); - gameInfo->SetTrigger(trig2); - gameInfo->SetSoundClick(btnSoundClick2); - - favoriteBtnTT = new GuiTooltip(tr( "Display favorites only" )); - if (Settings.wsprompt) favoriteBtnTT->SetWidescreen(Settings.widescreen); - favoriteBtnTT->SetAlpha(thInt("255 - tooltip alpha")); - favoriteBtnImg = new GuiImage(imgfavIcon); - favoriteBtnImg->SetWidescreen(Settings.widescreen); - favoriteBtnImg_g = new GuiImage(imgfavIcon_gray); - favoriteBtnImg_g->SetWidescreen(Settings.widescreen); - favoriteBtn = new GuiButton(favoriteBtnImg_g, favoriteBtnImg_g, ALIGN_LEFT, ALIGN_TOP, - 0, 0, - trigA, btnSoundOver, btnSoundClick2, 1, favoriteBtnTT, -15, 52, 0, 3); - - searchBtnTT = new GuiTooltip(tr( "Set Search-Filter" )); - if (Settings.wsprompt) searchBtnTT->SetWidescreen(Settings.widescreen); - searchBtnTT->SetAlpha(thInt("255 - tooltip alpha")); - searchBtnImg = new GuiImage(imgsearchIcon); - searchBtnImg->SetWidescreen(Settings.widescreen); - searchBtnImg_g = new GuiImage(imgsearchIcon_gray); - searchBtnImg_g->SetWidescreen(Settings.widescreen); - searchBtn = new GuiButton(searchBtnImg_g, searchBtnImg_g, ALIGN_LEFT, ALIGN_TOP, - 0, 0, - trigA, btnSoundOver, btnSoundClick2, 1, searchBtnTT, -15, 52, 0, 3); - - sortBtnTT = new GuiTooltip(" "); - if (Settings.wsprompt) sortBtnTT->SetWidescreen(Settings.widescreen); - sortBtnTT->SetAlpha(thInt("255 - tooltip alpha")); - - sortBtnImg = new GuiImage(imgabcIcon); - sortBtnImg->SetWidescreen(Settings.widescreen); - sortBtn = new GuiButton(sortBtnImg, sortBtnImg, ALIGN_LEFT, ALIGN_TOP, 0, 0, trigA, btnSoundOver, btnSoundClick2, 1, sortBtnTT, -15, 52, 0, 3); - - listBtnTT = new GuiTooltip(tr( "Display as a list" )); - if (Settings.wsprompt) listBtnTT->SetWidescreen(Settings.widescreen); - listBtnTT->SetAlpha(thInt("255 - tooltip alpha")); - listBtnImg = new GuiImage(imgarrangeList); - listBtnImg->SetWidescreen(Settings.widescreen); - listBtnImg_g = new GuiImage(imgarrangeList_gray); - listBtnImg_g->SetWidescreen(Settings.widescreen); - listBtn = new GuiButton(listBtnImg_g, listBtnImg_g, ALIGN_LEFT, ALIGN_TOP, 0, 0, trigA, btnSoundOver, btnSoundClick2, 1, listBtnTT, 15, 52, 1, 3); - - gridBtnTT = new GuiTooltip(tr( "Display as a grid" )); - if (Settings.wsprompt) gridBtnTT->SetWidescreen(Settings.widescreen); - gridBtnTT->SetAlpha(thInt("255 - tooltip alpha")); - gridBtnImg = new GuiImage(imgarrangeGrid); - gridBtnImg->SetWidescreen(Settings.widescreen); - gridBtnImg_g = new GuiImage(imgarrangeGrid_gray); - gridBtnImg_g->SetWidescreen(Settings.widescreen); - gridBtn = new GuiButton(gridBtnImg_g, gridBtnImg_g, ALIGN_LEFT, ALIGN_TOP, 0, 0, trigA, btnSoundOver, btnSoundClick2, 1, gridBtnTT, 15, 52, 1, 3); - - carouselBtnTT = new GuiTooltip(tr( "Display as a carousel" )); - if (Settings.wsprompt) carouselBtnTT->SetWidescreen(Settings.widescreen); - carouselBtnTT->SetAlpha(thInt("255 - tooltip alpha")); - carouselBtnImg = new GuiImage(imgarrangeCarousel); - carouselBtnImg->SetWidescreen(Settings.widescreen); - carouselBtnImg_g = new GuiImage(imgarrangeCarousel_gray); - carouselBtnImg_g->SetWidescreen(Settings.widescreen); - carouselBtn = new GuiButton(carouselBtnImg_g, carouselBtnImg_g, ALIGN_LEFT, ALIGN_TOP, 0, 0, trigA, btnSoundOver, btnSoundClick2, 1, carouselBtnTT, 15, 52, 1, 3); - - lockBtnTT = new GuiTooltip(NULL); - if (Settings.wsprompt) lockBtnTT->SetWidescreen(Settings.widescreen); - lockBtnTT->SetAlpha(thInt("255 - tooltip alpha")); - lockBtnImg = new GuiImage(imgLock); - lockBtnImg->SetWidescreen(Settings.widescreen); - lockBtnImg_g = new GuiImage(imgLock_gray); - lockBtnImg_g->SetWidescreen(Settings.widescreen); - lockBtn = new GuiButton(lockBtnImg_g, lockBtnImg_g, ALIGN_LEFT, ALIGN_TOP, 0, 0, trigA, btnSoundOver, btnSoundClick2, 1, lockBtnTT, 15, 52, 1, 3); - - unlockBtnImg = new GuiImage(imgUnlock); - unlockBtnImg->SetWidescreen(Settings.widescreen); - unlockBtnImg_g = new GuiImage(imgUnlock_gray); - unlockBtnImg_g->SetWidescreen(Settings.widescreen); - - dvdBtnTT = new GuiTooltip(tr( "Mount DVD drive" )); - if (Settings.wsprompt) dvdBtnTT->SetWidescreen(Settings.widescreen); - dvdBtnTT->SetAlpha(thInt("255 - tooltip alpha")); - dvdBtnImg = new GuiImage(imgdvd); - dvdBtnImg->SetWidescreen(Settings.widescreen); - dvdBtnImg_g = new GuiImage(imgdvd_gray); - dvdBtnImg_g->SetWidescreen(Settings.widescreen); - dvdBtn = new GuiButton(dvdBtnImg_g, dvdBtnImg_g, ALIGN_LEFT, ALIGN_TOP, 0, 0, - trigA, btnSoundOver, btnSoundClick2, 1, dvdBtnTT, 15, 52, 1, 3); - - homebrewBtnTT = new GuiTooltip(tr( "Homebrew Launcher" )); - if (Settings.wsprompt) homebrewBtnTT->SetWidescreen(Settings.widescreen); - homebrewBtnTT->SetAlpha(thInt("255 - tooltip alpha")); - homebrewImg = new GuiImage(homebrewImgData); - homebrewImgOver = new GuiImage(homebrewImgDataOver); - homebrewImg->SetWidescreen(Settings.widescreen); - homebrewImgOver->SetWidescreen(Settings.widescreen); - homebrewBtn = new GuiButton(homebrewImg, homebrewImgOver, ALIGN_LEFT, ALIGN_TOP, thInt("410 - HBC btn pos x"), thInt("405 - HBC btn pos y"), - trigA, btnSoundOver, btnSoundClick2, 1, homebrewBtnTT, 15, -30, 1, 5); - //Downloading Covers - DownloadBtnTT = new GuiTooltip(tr( "Click to Download Covers" )); - if (Settings.wsprompt) DownloadBtnTT->SetWidescreen(Settings.widescreen); - DownloadBtnTT->SetAlpha(thInt("255 - tooltip alpha")); - DownloadBtn = new GuiButton (0, 0); - DownloadBtn->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - DownloadBtn->SetPosition(thInt("26 - cover/download btn pos x"), thInt("58 - cover/download btn pos y")); - DownloadBtn->SetSoundOver(btnSoundOver); - DownloadBtn->SetTrigger(0, trigA); - DownloadBtn->SetTrigger(1, trig1); - DownloadBtn->SetToolTip(DownloadBtnTT, 205, -30); - - gameCoverImg = new GuiImage(); - gameCoverImg->SetPosition(thInt("26 - cover/download btn pos x"), thInt("58 - cover/download btn pos y")); - gameCoverImg->SetWidescreen(Settings.widescreen); - - IDBtnTT = new GuiTooltip(tr( "Click to change game ID" )); - if (Settings.wsprompt) IDBtnTT->SetWidescreen(Settings.widescreen); - IDBtnTT->SetAlpha(thInt("255 - tooltip alpha")); - idBtn = new GuiButton(60, 23); - idBtn->SetPosition(thInt("68 - gameID btn pos x"), thInt("305 - gameID btn pos y")); - idBtn->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - idBtn->SetSoundOver(btnSoundOver); - idBtn->SetTrigger(0, trigA); - idBtn->SetToolTip(IDBtnTT, 205, -30); - - GXColor clockColor = thColor("r=138 g=138 b=138 a=240 - clock color"); - clockTimeBack = new GuiText("88:88", 40, (GXColor) {clockColor.r, clockColor.g, clockColor.b, clockColor.a / 6}); - clockTimeBack->SetAlignment(thAlign("left - clock align hor"), thAlign("top - clock align ver")); - clockTimeBack->SetPosition(thInt("275 - clock pos x"), thInt("335 - clock pos y")); - clockTimeBack->SetFont(Resources::GetFile("clock.ttf"), Resources::GetFileSize("clock.ttf")); - - clockTime = new GuiText("", 40, clockColor); - clockTime->SetAlignment(thAlign("left - clock align hor"), thAlign("top - clock align ver")); - clockTime->SetPosition(thInt("275 - clock pos x"), thInt("335 - clock pos y")); - clockTime->SetFont(Resources::GetFile("clock.ttf"), Resources::GetFileSize("clock.ttf")); - - ToolBar.push_back(favoriteBtn); - ToolBar.push_back(searchBtn); - ToolBar.push_back(sortBtn); - ToolBar.push_back(listBtn); - ToolBar.push_back(gridBtn); - ToolBar.push_back(carouselBtn); - ToolBar.push_back(lockBtn); - ToolBar.push_back(dvdBtn); - SetUpdateCallback(UpdateCallback); - - ReloadBrowser(); -} - -GameBrowseMenu::~GameBrowseMenu() -{ - Exiting = true; - ResumeGui(); - - SetEffect(EFFECT_FADE, -20); - while(parentElement && this->GetEffect() > 0) usleep(100); - - HaltGui(); - if(parentElement) - ((GuiWindow *) parentElement)->Remove(this); - - RemoveAll(); - - delete btnInstall; - delete btnInstallOver; - delete btnSettings; - delete btnSettingsOver; - delete btnpwroff; - delete btnpwroffOver; - delete btnhome; - delete btnhomeOver; - delete btnsdcardOver; - delete btnsdcard; - delete imgfavIcon; - delete imgfavIcon_gray; - delete imgsearchIcon; - delete imgsearchIcon_gray; - delete imgabcIcon; - delete imgrankIcon; - delete imgplayCountIcon; - delete imgplayersSortIcon; - delete imgarrangeGrid; - delete imgarrangeGrid_gray; - delete imgarrangeCarousel; - delete imgarrangeCarousel_gray; - delete imgarrangeList; - delete imgarrangeList_gray; - delete imgdvd; - delete imgdvd_gray; - delete imgLock; - delete imgLock_gray; - delete imgUnlock; - delete imgUnlock_gray; - delete homebrewImgData; - delete homebrewImgDataOver; - delete gameCover; - - delete trigA; - delete trigHome; - delete trig1; - delete trig2; - - delete installBtnImg; - delete installBtnImgOver; - delete settingsBtnImg; - delete settingsBtnImgOver; - delete homeBtnImg; - delete homeBtnImgOver; - delete poweroffBtnImg; - delete poweroffBtnImgOver; - delete sdcardImg; - delete sdcardImgOver; - delete favoriteBtnImg; - delete favoriteBtnImg_g; - delete searchBtnImg; - delete searchBtnImg_g; - delete sortBtnImg; - delete listBtnImg; - delete listBtnImg_g; - delete gridBtnImg; - delete gridBtnImg_g; - delete carouselBtnImg; - delete carouselBtnImg_g; - delete lockBtnImg; - delete lockBtnImg_g; - delete unlockBtnImg; - delete unlockBtnImg_g; - delete dvdBtnImg; - delete dvdBtnImg_g; - delete homebrewImg; - delete homebrewImgOver; - delete gameCoverImg; - - delete GameIDTxt; - delete GameRegionTxt; - delete usedSpaceTxt; - delete gamecntTxt; - delete clockTimeBack; - delete clockTime; - - delete gamecntBtn; - delete installBtn; - delete settingsBtn; - delete homeBtn; - delete poweroffBtn; - delete sdcardBtn; - delete gameInfo; - delete favoriteBtn; - delete searchBtn; - delete sortBtn; - delete listBtn; - delete gridBtn; - delete carouselBtn; - delete lockBtn; - delete dvdBtn; - delete homebrewBtn; - delete DownloadBtn; - delete idBtn; - - delete installBtnTT; - delete settingsBtnTT; - delete homeBtnTT; - delete poweroffBtnTT; - delete sdcardBtnTT; - delete favoriteBtnTT; - delete searchBtnTT; - delete sortBtnTT; - delete listBtnTT; - delete gridBtnTT; - delete carouselBtnTT; - delete lockBtnTT; - delete dvdBtnTT; - delete homebrewBtnTT; - delete DownloadBtnTT; - delete IDBtnTT; - - lastSelectedGame = cut_bounds(GetSelectedGame(), 0, gameList.size()-1); - - delete gameBrowser; - delete gameGrid; - delete gameCarousel; - mainWindow->Remove(searchBar); - delete searchBar; - - ResumeGui(); -} - -int GameBrowseMenu::Execute() -{ - int retMenu = MENU_NONE; - - GameBrowseMenu * Menu = new GameBrowseMenu(); - mainWindow->Append(Menu); - - if(Settings.ShowFreeSpace) - { - ThreadedTask::Instance()->AddCallback(&Menu->HDDSizeCallback); - ThreadedTask::Instance()->Execute(); - } - - while(retMenu == MENU_NONE) - { - usleep(100); - - if (shutdown) - Sys_Shutdown(); - if (reset) - Sys_Reboot(); - - retMenu = Menu->MainLoop(); - } - - delete Menu; - - return retMenu; -} - -void GameBrowseMenu::ReloadBrowser() -{ - ResumeGui(); - - SetEffect(EFFECT_FADE, -40); - while(parentElement && this->GetEffect() > 0) usleep(100); - - HaltGui(); - RemoveAll(); - mainWindow->Remove(searchBar); - - gamecntTxt->SetText(fmt("%s: %i", tr( "Games" ), gameList.size())); - - const char * sortTTText = NULL; - GuiImageData * sortImgData = NULL; - - if(Settings.GameSort & SORT_RANKING) - { - sortTTText = tr( "Sort by rank" ); - sortImgData = imgrankIcon; - } - else if(Settings.GameSort & SORT_PLAYCOUNT) - { - sortTTText = tr( "Sort order by most played"); - sortImgData = imgplayCountIcon; - } - else if(Settings.GameSort & SORT_PLAYERS) - { - sortTTText = tr( "Sort by number of players"); - sortImgData = imgplayersSortIcon; - } - else - { - sortTTText = tr("Sort alphabetically"); - sortImgData = imgabcIcon; - } - - sortBtnTT->SetText(sortTTText); - sortBtnImg->SetImage(sortImgData); - - if(DiscDriveCoverOld & 0x02) - dvdBtn->SetImage(dvdBtnImg); - else - dvdBtn->SetImage(dvdBtnImg_g); - - if (Settings.GameSort & SORT_FAVORITE) - { - favoriteBtn->SetImage(favoriteBtnImg); - favoriteBtn->SetImageOver(favoriteBtnImg); - } - else - { - favoriteBtn->SetImage(favoriteBtnImg_g); - favoriteBtn->SetImageOver(favoriteBtnImg_g); - } - - if (*gameList.GetCurrentFilter()) - { - if (!show_searchwindow) searchBtn->SetEffect(EFFECT_PULSE, 10, 105); - searchBtn->SetImage(searchBtnImg); - searchBtn->SetImageOver(searchBtnImg); - } - else if(!show_searchwindow) - { - searchBtn->SetImage(searchBtnImg_g); - searchBtn->SetImageOver(searchBtnImg_g); - } - - if (Settings.godmode) - { - GuiImage * unlockImage = strcmp(Settings.unlockCode, "") == 0 ? unlockBtnImg_g : unlockBtnImg; - lockBtn->SetImage(unlockImage); - lockBtn->SetImageOver(unlockImage); - lockBtnTT->SetText(tr( "Lock USB Loader GX" )); - } - else - { - lockBtn->SetImage(lockBtnImg); - lockBtn->SetImageOver(lockBtnImg); - lockBtnTT->SetText(tr( "Unlock USB Loader GX" )); - } - - if(GetSelectedGame() >= 0) - lastSelectedGame = cut_bounds(GetSelectedGame(), 0, gameList.size()-1); - else - lastSelectedGame = cut_bounds(lastSelectedGame, 0, gameList.size()-1); - - delete gameBrowser; - delete gameGrid; - delete gameCarousel; - delete searchBar; - gameBrowser = NULL; - gameGrid = NULL; - gameCarousel = NULL; - searchBar = NULL; - - if (Settings.gameDisplay == LIST_MODE) - { - Append(gameCoverImg); - DownloadBtn->SetSize(160, 224); - listBtn->SetImage(listBtnImg); - listBtn->SetImageOver(listBtnImg); - gridBtn->SetImage(gridBtnImg_g); - gridBtn->SetImageOver(gridBtnImg_g); - carouselBtn->SetImage(carouselBtnImg_g); - carouselBtn->SetImageOver(carouselBtnImg_g); - - favoriteBtn->SetPosition(Settings.widescreen ? thInt("288 - list layout favorite btn pos x widescreen") : thInt("260 - list layout favorite btn pos x"), - thInt("13 - list layout favorite btn pos y")); - searchBtn->SetPosition(Settings.widescreen ? thInt("320 - list layout search btn pos x widescreen") : thInt("300 - list layout search btn pos x"), - thInt("13 - list layout search btn pos y")); - sortBtn->SetPosition(Settings.widescreen ? thInt("352 - list layout abc/sort btn pos x widescreen") : thInt("340 - list layout abc/sort btn pos x"), - thInt("13 - list layout abc/sort btn pos y")); - listBtn->SetPosition(Settings.widescreen ? thInt("384 - list layout list btn pos x widescreen") : thInt("380 - list layout list btn pos x"), - thInt("13 - list layout list btn pos y")); - gridBtn->SetPosition(Settings.widescreen ? thInt("416 - list layout grid btn pos x widescreen") : thInt("420 - list layout grid btn pos x"), - thInt("13 - list layout grid btn pos y")); - carouselBtn->SetPosition(Settings.widescreen ? thInt("448 - list layout carousel btn pos x widescreen") : thInt("460 - list layout carousel btn pos x"), - thInt("13 - list layout carousel btn pos y")); - lockBtn->SetPosition(Settings.widescreen ? thInt("480 - list layout lock btn pos x widescreen") : thInt("500 - list layout lock btn pos x"), - thInt("13 - list layout lock btn pos y")); - dvdBtn->SetPosition(Settings.widescreen ? thInt("512 - list layout dvd btn pos x widescreen") : thInt("540 - list layout dvd btn pos x"), - thInt("13 - list layout dvd btn pos y")); - - gameBrowser = new GuiGameBrowser(thInt("396 - game list layout width"), thInt("280 - game list layout height"), lastSelectedGame); - gameBrowser->SetPosition(thInt("200 - game list layout pos x"), thInt("49 - game list layout pos y")); - gameBrowser->SetAlignment(ALIGN_LEFT, ALIGN_CENTRE); - } - else if (Settings.gameDisplay == GRID_MODE) - { - DownloadBtn->SetSize(0, 0); - UpdateGameInfoText(NULL); - gridBtn->SetImage(gridBtnImg); - gridBtn->SetImageOver(gridBtnImg); - listBtn->SetImage(listBtnImg_g); - listBtn->SetImageOver(listBtnImg_g); - carouselBtn->SetImage(carouselBtnImg_g); - carouselBtn->SetImageOver(carouselBtnImg_g); - - favoriteBtn->SetPosition(Settings.widescreen ? thInt("224 - grid layout favorite btn pos x widescreen") : thInt("200 - grid layout favorite btn pos x"), - thInt("13 - grid layout favorite btn pos y")); - searchBtn->SetPosition(Settings.widescreen ? thInt("256 - grid layout search btn pos x widescreen") : thInt("240 - grid layout search btn pos x"), - thInt("13 - grid layout search btn pos y")); - sortBtn->SetPosition(Settings.widescreen ? thInt("288 - grid layout abc/sort btn pos x widescreen") : thInt("280 - grid layout abc/sort btn pos x"), - thInt("13 - grid layout abc/sort btn pos y")); - listBtn->SetPosition(Settings.widescreen ? thInt("320 - grid layout list btn pos x widescreen") : thInt("320 - grid layout list btn pos x"), - thInt("13 - grid layout list btn pos y")); - gridBtn->SetPosition(Settings.widescreen ? thInt("352 - grid layout grid btn pos x widescreen") : thInt("360 - grid layout grid btn pos x"), - thInt("13 - grid layout grid btn pos y")); - carouselBtn->SetPosition(Settings.widescreen ? thInt("384 - grid layout carousel btn pos x widescreen") : thInt("400 - grid layout carousel btn pos x"), - thInt("13 - grid layout carousel btn pos y")); - lockBtn->SetPosition(Settings.widescreen ? thInt("416 - grid layout lock btn pos x widescreen") : thInt("440 - grid layout lock btn pos x"), - thInt("13 - grid layout lock btn pos y")); - dvdBtn->SetPosition(Settings.widescreen ? thInt("448 - grid layout dvd btn pos x widescreen") : thInt("480 - grid layout dvd btn pos x"), - thInt("13 - grid layout dvd btn pos y")); - - gameGrid = new GuiGameGrid(thInt("640 - game grid layout width"), thInt("400 - game grid layout height"), Settings.theme_path, lastSelectedGame); - gameGrid->SetPosition(thInt("0 - game grid layout pos x"), thInt("20 - game grid layout pos y")); - gameGrid->SetAlignment(ALIGN_LEFT, ALIGN_CENTRE); - } - else if (Settings.gameDisplay == CAROUSEL_MODE) - { - DownloadBtn->SetSize(0, 0); - UpdateGameInfoText(NULL); - carouselBtn->SetImage(carouselBtnImg); - carouselBtn->SetImageOver(carouselBtnImg); - listBtn->SetImage(listBtnImg_g); - listBtn->SetImageOver(listBtnImg_g); - gridBtn->SetImage(gridBtnImg_g); - gridBtn->SetImageOver(gridBtnImg_g); - - favoriteBtn->SetPosition(Settings.widescreen ? thInt("224 - carousel layout favorite btn pos x widescreen") : thInt("200 - carousel layout favorite btn pos x"), - thInt("13 - carousel layout favorite btn pos y")); - searchBtn->SetPosition(Settings.widescreen ? thInt("256 - carousel layout search btn pos x widescreen") : thInt("240 - carousel layout search btn pos x"), - thInt("13 - carousel layout search btn pos y")); - sortBtn->SetPosition(Settings.widescreen ? thInt("288 - carousel layout abc/sort btn pos x widescreen") : thInt("280 - carousel layout abc/sort btn pos x"), - thInt("13 - carousel layout abc/sort btn pos y")); - listBtn->SetPosition(Settings.widescreen ? thInt("320 - carousel layout list btn pos x widescreen") : thInt("320 - carousel layout list btn pos x"), - thInt("13 - carousel layout list btn pos y")); - gridBtn->SetPosition(Settings.widescreen ? thInt("352 - carousel layout grid btn pos x widescreen") : thInt("360 - carousel layout grid btn pos x"), - thInt("13 - carousel layout grid btn pos y")); - carouselBtn->SetPosition(Settings.widescreen ? thInt("384 - carousel layout carousel btn pos x widescreen") : thInt("400 - carousel layout carousel btn pos x"), - thInt("13 - carousel layout carousel btn pos y")); - lockBtn->SetPosition(Settings.widescreen ? thInt("416 - carousel layout lock btn pos x widescreen") : thInt("440 - carousel layout lock btn pos x"), - thInt("13 - carousel layout lock btn pos y")); - dvdBtn->SetPosition(Settings.widescreen ? thInt("448 - carousel layout dvd btn pos x widescreen") : thInt("480 - carousel layout dvd btn pos x"), - thInt("13 - carousel layout dvd btn pos y")); - - gameCarousel = new GuiGameCarousel(thInt("640 - game carousel layout width"), thInt("400 - game carousel layout height"), Settings.theme_path, lastSelectedGame); - gameCarousel->SetPosition(thInt("0 - game carousel layout pos x"), thInt("-20 - game carousel layout pos y")); - gameCarousel->SetAlignment(ALIGN_LEFT, ALIGN_CENTRE); - } - - - if (thInt("1 - show hdd info: 1 for on and 0 for off") == 1) //force show hdd info - Append(usedSpaceTxt); - if (thInt("1 - show game count: 1 for on and 0 for off") == 1) //force show game cnt info - Append(gamecntBtn); - Append(sdcardBtn); - Append(poweroffBtn); - Append(gameInfo); - Append(homeBtn); - Append(settingsBtn); - - if (Settings.godmode || !(Settings.ParentalBlocks & BLOCK_HBC_MENU)) - Append(homebrewBtn); - - if (Settings.godmode || !(Settings.ParentalBlocks & BLOCK_GAME_INSTALL)) - Append(installBtn); - - if (Settings.godmode || !(Settings.ParentalBlocks & BLOCK_COVER_DOWNLOADS)) - Append(DownloadBtn); - - if (Settings.godmode || !(Settings.ParentalBlocks & BLOCK_GAMEID_CHANGE)) - Append(idBtn); - - Append(favoriteBtn); - Append(searchBtn); - Append(sortBtn); - Append(listBtn); - Append(gridBtn); - Append(carouselBtn); - Append(lockBtn); - Append(dvdBtn); - - if ((Settings.hddinfo == CLOCK_HR12) || (Settings.hddinfo == CLOCK_HR24)) - { - Append(clockTimeBack); - Append(clockTime); - } - - if (gameBrowser) - Append(gameBrowser); - - else if (gameGrid) - Append(gameGrid); - - else if (gameCarousel) - Append(gameCarousel); - - if (show_searchwindow) - { - searchBar = new GuiSearchBar(gameList.GetAvailableSearchChars()); - mainWindow->Append(searchBar); - } - - SetEffect(EFFECT_FADE, 40); - ResumeGui(); - - while(parentElement && this->GetEffect() > 0) usleep(100); -} - -int GameBrowseMenu::MainLoop() -{ - UpdateClock(); - CheckDiscSlotUpdate(); - - if (updateavailable == true) - { - gprintf("\tUpdate Available\n"); - SetState(STATE_DISABLED); - UpdateApp(); - updateavailable = false; - SetState(STATE_DEFAULT); - } - - else if (poweroffBtn->GetState() == STATE_CLICKED) - { - gprintf("\tpoweroffBtn clicked\n"); - int choice = WindowPrompt(tr( "How to Shutdown?" ), 0, tr( "Full shutdown" ), tr( "Standby" ), tr( "Cancel" )); - if (choice == 2) - Sys_ShutdownToIdle(); - else if (choice == 1) - Sys_ShutdownToStandby(); - - poweroffBtn->ResetState(); - } - else if (gamecntBtn->GetState() == STATE_CLICKED) - { - gprintf("\tgameCntBtn clicked\n"); - gamecntBtn->ResetState(); - - int choice = WindowPrompt(0, fmt("%s %sGameList ?", tr( "Save Game List to" ), Settings.update_path), "TXT", "CSV", tr( "Back" )); - if (choice) - { - if (save_gamelist(choice - 1)) - WindowPrompt(0, tr( "Saved" ), tr( "OK" )); - else - WindowPrompt(tr( "Error" ), tr( "Could not save." ), tr( "OK" )); - } - } - else if (homeBtn->GetState() == STATE_CLICKED) - { - gprintf("\thomeBtn clicked\n"); - WindowExitPrompt(); - - homeBtn->ResetState(); - } - else if (installBtn->GetState() == STATE_CLICKED) - { - int choice = WindowPrompt(tr( "Install a game" ), 0, tr( "Yes" ), tr( "No" )); - if (choice == 1) - return MENU_INSTALL; - - installBtn->ResetState(); - } - else if (sdcardBtn->GetState() == STATE_CLICKED) - { - gprintf("\tsdCardBtn Clicked\n"); - HaltGui(); - bgMusic->Pause(); - Settings.Save(); - DeviceHandler::Instance()->MountSD(); - gprintf("\tLoading config...%s\n", Settings.Load() ? "done" : "failed"); - gprintf("\tLoading language...%s\n", Settings.LoadLanguage(Settings.language_path, CONSOLE_DEFAULT) ? "done" : "failed"); - gprintf("\tLoading game settings...%s\n", GameSettings.Load(Settings.ConfigPath) ? "done" : "failed"); - gprintf("\tLoading game statistics...%s\n", GameStatistics.Load(Settings.ConfigPath) ? "done" : "failed"); - gprintf("\tLoading font...%s\n", Theme::LoadFont(Settings.theme_path) ? "done" : "failed (using default)"); - gprintf("\tLoading theme...%s\n", Theme::Load(Settings.theme) ? "done" : "failed (using default)"); - bgMusic->Resume(); - wString oldFilter(gameList.GetCurrentFilter()); - gameList.FilterList(oldFilter.c_str()); - ReloadBrowser(); - ResumeGui(); - sdcardBtn->ResetState(); - } - - else if (DownloadBtn->GetState() == STATE_CLICKED) - { - gprintf("\tDownloadBtn Clicked\n"); - ImageDownloader::DownloadImages(); - ReloadBrowser(); - DownloadBtn->ResetState(); - } - - else if (settingsBtn->GetState() == STATE_CLICKED) - { - if (!Settings.godmode && (Settings.ParentalBlocks & BLOCK_GLOBAL_SETTINGS)) - { - WindowPrompt(tr( "Permission denied." ), tr( "Console must be unlocked for this option." ), tr( "OK" )); - settingsBtn->ResetState(); - return MENU_NONE; - } - - return MENU_SETTINGS; - } - - else if (favoriteBtn->GetState() == STATE_CLICKED) - { - favoriteBtn->ResetState(); - gprintf("\tfavoriteBtn Clicked\n"); - - if(Settings.GameSort & SORT_FAVORITE) - Settings.GameSort &= ~SORT_FAVORITE; - else - Settings.GameSort |= SORT_FAVORITE; - - wString oldFilter(gameList.GetCurrentFilter()); - gameList.FilterList(oldFilter.c_str()); - - if(Settings.GameSort & SORT_FAVORITE && gameList.size() == 0) - { - Settings.GameSort &= ~SORT_FAVORITE; - gameList.FilterList(oldFilter.c_str()); - ShowError(tr("No favorites selected.")); - } - else - ReloadBrowser(); - } - - else if (searchBtn->GetState() == STATE_CLICKED) - { - gprintf("\tsearchBtn Clicked\n"); - show_searchwindow = !show_searchwindow; - wString oldFilter(gameList.GetCurrentFilter()); - gameList.FilterList(oldFilter.c_str()); - ReloadBrowser(); - searchBtn->ResetState(); - if(show_searchwindow && wcslen(gameList.GetCurrentFilter()) == 0) - GridRowsPreSearch = Settings.gridRows; //! store old rows amount - } - - else if (searchBar && (searchChar = searchBar->GetClicked())) - { - if (searchChar > 27) //! Character clicked - { - int len = gameList.GetCurrentFilter() ? wcslen(gameList.GetCurrentFilter()) : 0; - wchar_t newFilter[len + 2]; - if (gameList.GetCurrentFilter()) wcscpy(newFilter, gameList.GetCurrentFilter()); - newFilter[len] = searchChar; - newFilter[len + 1] = 0; - - gameList.FilterList(newFilter); - } - else if (searchChar == 7) //! Close - { - show_searchwindow = false; - searchBtn->StopEffect(); - } - else if (searchChar == 8) //! Backspace - { - int len = wcslen(gameList.GetCurrentFilter()); - wchar_t newFilter[len + 1]; - if (gameList.GetCurrentFilter()) wcscpy(newFilter, gameList.GetCurrentFilter()); - newFilter[len > 0 ? len - 1 : 0] = 0; - gameList.FilterList(newFilter); - if(len == 1) - Settings.gridRows = GridRowsPreSearch; //! restore old rows amount so we don't stay on one row - } - ReloadBrowser(); - return MENU_NONE; - } - - else if (sortBtn->GetState() == STATE_CLICKED) - { - sortBtn->ResetState(); - gprintf("\tsortBtn clicked\n"); - if(Settings.GameSort & SORT_ABC) - { - Settings.GameSort &= ~SORT_ABC; - Settings.GameSort |= SORT_RANKING; - } - else if(Settings.GameSort & SORT_RANKING) - { - Settings.GameSort &= ~SORT_RANKING; - Settings.GameSort |= SORT_PLAYCOUNT; - } - else if(Settings.GameSort & SORT_PLAYCOUNT) - { - Settings.GameSort &= ~SORT_PLAYCOUNT; - Settings.GameSort |= SORT_PLAYERS; - } - else if(Settings.GameSort & SORT_PLAYERS) - { - Settings.GameSort &= ~SORT_PLAYERS; - Settings.GameSort |= SORT_ABC; - } - - wString oldFilter(gameList.GetCurrentFilter()); - gameList.FilterList(oldFilter.c_str()); - ReloadBrowser(); - } - - else if (listBtn->GetState() == STATE_CLICKED) - { - gprintf("\tlistBtn Clicked\n"); - if (Settings.gameDisplay != LIST_MODE) - { - Settings.gameDisplay = LIST_MODE; - ReloadBrowser(); - } - listBtn->ResetState(); - } - - else if (gridBtn->GetState() == STATE_CLICKED) - { - gprintf("\tgridBtn Clicked\n"); - if (Settings.gameDisplay != GRID_MODE) - { - Settings.gameDisplay = GRID_MODE; - ReloadBrowser(); - } - gridBtn->ResetState(); - } - - else if (carouselBtn->GetState() == STATE_CLICKED) - { - gprintf("\tcarouselBtn Clicked\n"); - if (Settings.gameDisplay != CAROUSEL_MODE) - { - Settings.gameDisplay = CAROUSEL_MODE; - ReloadBrowser(); - } - carouselBtn->ResetState(); - } - - else if (homebrewBtn->GetState() == STATE_CLICKED) - { - gprintf("\thomebrewBtn Clicked\n"); - return MENU_HOMEBREWBROWSE; - } - - else if (gameInfo->GetState() == STATE_CLICKED) - { - gprintf("\tgameinfo Clicked\n"); - int SelectedGame = GetSelectedGame(); - gameInfo->ResetState(); - if (SelectedGame >= 0 && SelectedGame < (s32) gameList.size()) - { - rockout(SelectedGame); - struct discHdr *header = gameList[SelectedGame]; - char IDfull[7]; - snprintf(IDfull, sizeof(IDfull), "%s", (char *) header->id); - SetState(STATE_DISABLED); - int choice = showGameInfo(IDfull); - SetState(STATE_DEFAULT); - rockout(SelectedGame, 2); - if (choice == 2) - homeBtn->SetState(STATE_CLICKED); - } - } - else if (lockBtn->GetState() == STATE_CLICKED) - { - gprintf("\tlockBtn clicked\n"); - lockBtn->ResetState(); - if (Settings.godmode) - { - if(WindowPrompt(tr( "Parental Control" ), tr( "Are you sure you want to lock USB Loader GX?" ), tr( "Yes" ), tr( "No" )) == 1) - { - Settings.godmode = 0; - wString oldFilter(gameList.GetCurrentFilter()); - gameList.FilterList(oldFilter.c_str()); - ReloadBrowser(); - } - } - else - { - //password check to unlock Install,Delete and Format - SetState(STATE_DISABLED); - int result = PasswordCheck(Settings.unlockCode); - SetState(STATE_DEFAULT); - if (result > 0) - { - if(result == 1) - WindowPrompt( tr( "Correct Password" ), tr( "All the features of USB Loader GX are unlocked." ), tr( "OK" )); - Settings.godmode = 1; - wString oldFilter(gameList.GetCurrentFilter()); - gameList.FilterList(oldFilter.c_str()); - ReloadBrowser(); - } - else if(result < 0) - WindowPrompt(tr( "Wrong Password" ), tr( "USB Loader GX is protected" ), tr( "OK" )); - } - } - - else if (Settings.gameDisplay == LIST_MODE && idBtn->GetState() == STATE_CLICKED) - { - gprintf("\tidBtn Clicked\n"); - struct discHdr * header = gameList[GetSelectedGame()]; - //enter new game ID - char entered[7]; - snprintf(entered, sizeof(entered), "%s", (char *) header->id); - int result = OnScreenKeyboard(entered, sizeof(entered), 0); - if (result == 1) - { - WBFS_ReIDGame(header->id, entered); - wString oldFilter(gameList.GetCurrentFilter()); - gameList.ReadGameList(); - gameList.FilterList(oldFilter.c_str()); - ReloadBrowser(); - } - idBtn->ResetState(); - } - - else if (Settings.gameDisplay == LIST_MODE && GetSelectedGame() != gameSelectedOld) - { - gameSelectedOld = GetSelectedGame(); - int gameSelected = gameSelectedOld; - if(gameSelected >= 0 && gameSelected < (s32) gameList.size()) - { - struct discHdr *header = gameList[gameSelected]; - LoadCover(header); - UpdateGameInfoText(header->id); - } - } - - gameClicked = GetClickedGame(); - if ((gameClicked >= 0 && gameClicked < (s32) gameList.size()) || mountMethod != 0) - { - OpenClickedGame(); - } - - if (!IsWpadConnected()) - { - if(Settings.screensaver != 0 && WiiMoteInitiated) - WindowScreensaver(); - } - else if(!WiiMoteInitiated) - WiiMoteInitiated = true; - - return returnMenu; -} - -void GameBrowseMenu::CheckDiscSlotUpdate() -{ - u32 DiscDriveCover = 0; - WDVD_GetCoverStatus(&DiscDriveCover);//for detecting if i disc has been inserted - - if ((DiscDriveCover & 0x02) && (DiscDriveCover != DiscDriveCoverOld)) - { - gprintf("\tNew Disc Detected\n"); - int choice = WindowPrompt(tr( "New Disc Detected" ), 0, tr( "Install" ), tr( "Mount DVD drive" ), tr( "Cancel" )); - if (choice == 1) - { - if(!Settings.godmode && (Settings.ParentalBlocks & BLOCK_GAME_INSTALL)) - { - WindowPrompt(tr( "Permission denied." ), tr( "Console must be unlocked for this option." ), tr( "OK" )); - return; - } - - returnMenu = MENU_INSTALL; - } - else if (choice == 2) - dvdBtn->SetState(STATE_CLICKED); - } - else if (dvdBtn->GetState() == STATE_CLICKED) - { - gprintf("\tdvdBtn Clicked\n"); - if(!dvdheader) - dvdheader = new struct discHdr; - mountMethod = DiscMount(dvdheader); - dvdBtn->ResetState(); - - rockout(GetSelectedGame()); - } - - if(DiscDriveCoverOld != DiscDriveCover) - { - if(DiscDriveCover & 0x02) - dvdBtn->SetImage(dvdBtnImg); - else - dvdBtn->SetImage(dvdBtnImg_g); - - DiscDriveCoverOld = DiscDriveCover; - } -} - -void GameBrowseMenu::UpdateClock() -{ - if(Settings.hddinfo != CLOCK_HR12 && Settings.hddinfo != CLOCK_HR24) - return; - - time_t rawtime = time(0); - if(rawtime == lastrawtime) //! Only update every 1 second - return; - - lastrawtime = rawtime; - - char theTime[50]; - theTime[0] = 0; - - struct tm * timeinfo = localtime(&rawtime); - if (Settings.hddinfo == CLOCK_HR12) - { - if (rawtime & 1) - strftime(theTime, sizeof(theTime), "%I:%M", timeinfo); - else - strftime(theTime, sizeof(theTime), "%I %M", timeinfo); - } - if (Settings.hddinfo == CLOCK_HR24) - { - if (rawtime & 1) - strftime(theTime, sizeof(theTime), "%H:%M", timeinfo); - else - strftime(theTime, sizeof(theTime), "%H %M", timeinfo); - } - clockTime->SetText(theTime); -} - -int GameBrowseMenu::GetSelectedGame() -{ - if(gameBrowser) - return gameBrowser->GetSelectedOption(); - - else if(gameCarousel) - return gameCarousel->GetSelectedOption(); - - else if(gameGrid) - return gameGrid->GetSelectedOption(); - - return -1; -} - -int GameBrowseMenu::GetClickedGame() -{ - if(gameBrowser) - return gameBrowser->GetClickedOption(); - - else if(gameCarousel) - return gameCarousel->GetClickedOption(); - - else if(gameGrid) - return gameGrid->GetClickedOption(); - - return -1; -} - -void GameBrowseMenu::UpdateGameInfoText(const u8 * gameId) -{ - if(!gameId) - { - Remove(GameRegionTxt); - delete GameRegionTxt; - GameRegionTxt = NULL; - Remove(idBtn); - idBtn->SetLabel(NULL); - delete GameIDTxt; - GameIDTxt = NULL; - return; - } - - char gameregion[10]; - char IDfull[7]; - memset(IDfull, 0, sizeof(IDfull)); - snprintf(IDfull, sizeof(IDfull), (char *) gameId); - - switch (IDfull[3]) - { - case 'E': - sprintf(gameregion, "NTSC U"); - break; - case 'J': - sprintf(gameregion, "NTSC J"); - break; - case 'W': - sprintf(gameregion, "NTSC T"); - break; - default: - case 'K': - sprintf(gameregion, "NTSC K"); - break; - case 'P': - case 'D': - case 'F': - case 'I': - case 'S': - case 'H': - case 'U': - case 'X': - case 'Y': - case 'Z': - sprintf(gameregion, " PAL "); - break; - } - - HaltGui(); - if (Settings.sinfo == GAMEINFO_ID || Settings.sinfo == GAMEINFO_BOTH) - { - Remove(GameIDTxt); - delete GameIDTxt; - GameIDTxt = new GuiText(IDfull, 22, thColor("r=55 g=190 b=237 a=255 - game id text color")); - GameIDTxt->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - if(Settings.godmode || !(Settings.ParentalBlocks & BLOCK_GAMEID_CHANGE)) - { - idBtn->SetEffect(EFFECT_FADE, 20); - idBtn->SetLabel(GameIDTxt); - Append(idBtn); - } - else - { - GameIDTxt->SetPosition(thInt("68 - gameID btn pos x"), thInt("305 - gameID btn pos y")); - GameIDTxt->SetEffect(EFFECT_FADE, 20); - Append(GameIDTxt); - } - } - //don't try to show region for channels because all the custom channels wont follow the rules - if ((Settings.sinfo == GAMEINFO_REGION) || (Settings.sinfo == GAMEINFO_BOTH)) - { - Remove(GameRegionTxt); - delete GameRegionTxt; - GameRegionTxt = new GuiText(gameregion, 22, thColor("r=55 g=190 b=237 a=255 - region info text color")); - GameRegionTxt->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - GameRegionTxt->SetPosition(thInt("68 - region info text pos x"), thInt("30 - region info text pos y")); - GameRegionTxt->SetEffect(EFFECT_FADE, 20); - Append(GameRegionTxt); - } - ResumeGui(); -} - -int GameBrowseMenu::OpenClickedGame() -{ - int gameSelected = GetSelectedGame(); - if(gameSelected < 0 || gameSelected >= gameList.size()) - return -1; - - if (searchBar) - { - HaltGui(); - mainWindow->Remove(searchBar); - ResumeGui(); - } - - rockout(gameSelected); - - struct discHdr *header = (mountMethod ? dvdheader : gameList[gameSelected]); - - char IDfull[7]; - snprintf(IDfull, sizeof(IDfull), "%s", (char *) header->id); - - bool returnHere = true;// prompt to start game - int choice = -1; - - while (returnHere) - { - returnHere = false; - - if (Settings.wiilight == ON) - wiilight(1); - - if (Settings.quickboot) //quickboot game - choice = 1; - else - { - SetState(STATE_DISABLED); - GameWindow * GamePrompt = new GameWindow(gameSelected); - mainWindow->Append(GamePrompt); - choice = GamePrompt->Show(); - gameSelected = GamePrompt->GetSelectedGame(); - delete GamePrompt; - SetState(STATE_DEFAULT); - //update header and id if it was changed - header = (mountMethod ? dvdheader : gameList[gameSelected]); - snprintf(IDfull, sizeof(IDfull), "%s", (char *) header->id); - } - - if (choice == 1) - { - bool RunGame = true; - wiilight(0); - - GameCFG* game_cfg = GameSettings.GetGameCFG(header->id); - - if (game_cfg->loadalternatedol == 2) - CheckAlternativeDOL(IDfull); - else if(game_cfg->loadalternatedol == 3 && WDMMenu::Show(header) == 0) - { - RunGame = false; - returnHere = true; - } - else if(game_cfg->loadalternatedol == 4) - defaultDolPrompt((char *) header->id); - - if (RunGame && game_cfg->ocarina != OFF) - CheckOcarina(IDfull); - - if(RunGame) - { - GameStatistics.SetPlayCount(header->id, GameStatistics.GetPlayCount(header->id)+1); - GameStatistics.Save(); - - //Just calling that shuts down everything and starts game - GameBooter::BootGame(IDfull); - } - } - else if (choice == 2) - { - ReloadBrowser(); - if(Settings.ShowFreeSpace) - { - ThreadedTask::Instance()->AddCallback(&HDDSizeCallback); - ThreadedTask::Instance()->Execute(); - } - } - } - - rockout(-1, -1); - mountMethod = 0; - - if (searchBar) - { - HaltGui(); - mainWindow->Append(searchBar); - ResumeGui(); - } - - return 0; -} - -void GameBrowseMenu::LoadCover(struct discHdr *header) -{ - gameCoverImg->SetImage(NULL); - - delete gameCover; - gameCover = LoadCoverImage(header); - - gameCoverImg->SetImage(gameCover);// put the new image on the download button -} - -void GameBrowseMenu::CheckOcarina(const char * IDfull) -{ - char filepath[200]; - snprintf(filepath, sizeof(filepath), "%s%s.gct", Settings.Cheatcodespath, IDfull); - if (CheckFile(filepath) == false) - { - gprintf("\ttried to load missing gct.\n"); - sprintf(filepath, "%s %s", filepath, tr( "does not exist! Loading game without cheats." )); - WindowPrompt(tr( "Error" ), filepath, NULL, NULL, NULL, NULL, 170); - } -} - -void GameBrowseMenu::CheckAlternativeDOL(const char * IDfull) -{ - char filepath[200]; - snprintf(filepath, sizeof(filepath), "%s%s.dol", Settings.dolpath, IDfull); - if (CheckFile(filepath) == false) - { - sprintf(filepath, "%s %s", filepath, tr( "does not exist!" )); - WindowPrompt(tr( "Error" ), filepath, tr( "OK" )); - } -} - -void GameBrowseMenu::UpdateCallback(void * e) -{ - //! Draw the selected Icon allways on top - GameBrowseMenu * w = (GameBrowseMenu *) e; - - for(u32 i = 0; i < w->ToolBar.size(); ++i) - { - if(w->ToolBar[i]->GetState() == STATE_SELECTED) - { - w->Remove(w->ToolBar[i]); - w->Append(w->ToolBar[i]); - break; - } - } -} - -void GameBrowseMenu::UpdateFreeSpace(void * arg) -{ - char spaceinfo[30]; - memset(spaceinfo, 0, 30); - - if(Settings.ShowFreeSpace) - { - float freespace = 0.0, used = 0.0; - WBFS_DiskSpace(&used, &freespace); - if (strcmp(Settings.db_language, "JA") == 0) - { - // needs to be "total...used" for Japanese - sprintf(spaceinfo, "%.2fGB %s %.2fGB %s", (freespace + used), tr( "of" ), freespace, tr( "free" )); - } - else - { - sprintf(spaceinfo, "%.2fGB %s %.2fGB %s", freespace, tr( "of" ), (freespace + used), tr( "free" )); - } - } - - if(Exiting) - return; - - usedSpaceTxt->SetText(spaceinfo); -} diff --git a/source/menu/GameBrowseMenu.hpp b/source/menu/GameBrowseMenu.hpp deleted file mode 100644 index 0003f7e8..00000000 --- a/source/menu/GameBrowseMenu.hpp +++ /dev/null @@ -1,162 +0,0 @@ -#ifndef GAMEBROWSEMENU_HPP_ -#define GAMEBROWSEMENU_HPP_ - -#include "libwiigui/gui.h" -#include "libwiigui/gui_gamebrowser.h" -#include "libwiigui/gui_gamegrid.h" -#include "libwiigui/gui_gamecarousel.h" -#include "libwiigui/gui_searchbar.h" -#include "utils/ThreadedTask.hpp" - -class GameBrowseMenu : public GuiWindow -{ - public: - GameBrowseMenu(); - ~GameBrowseMenu(); - static int Execute(); - protected: - int MainLoop(); - void ReloadBrowser(); - int OpenClickedGame(); - int GetSelectedGame(); - int GetClickedGame(); - void UpdateGameInfoText(const u8 * gameId); - void LoadCover(struct discHdr *header); - void CheckAlternativeDOL(const char * IDfull); - void CheckOcarina(const char * IDfull); - void CheckDiscSlotUpdate(); - void UpdateFreeSpace(void *arg); - void UpdateClock(); - static void UpdateCallback(void * e); - - TCallback HDDSizeCallback; - u32 DiscDriveCoverOld; - int returnMenu; - int gameSelectedOld; - int gameClicked; - int GridRowsPreSearch; - time_t lastrawtime; - bool show_searchwindow; - wchar_t searchChar; - std::vector ToolBar; - - GuiGameBrowser * gameBrowser; - GuiGameGrid * gameGrid; - GuiGameCarousel * gameCarousel; - GuiSearchBar * searchBar; - - GuiImageData * btnInstall; - GuiImageData * btnInstallOver; - GuiImageData * btnSettings; - GuiImageData * btnSettingsOver; - GuiImageData * btnpwroff; - GuiImageData * btnpwroffOver; - GuiImageData * btnhome; - GuiImageData * btnhomeOver; - GuiImageData * btnsdcardOver; - GuiImageData * btnsdcard; - GuiImageData * imgfavIcon; - GuiImageData * imgfavIcon_gray; - GuiImageData * imgsearchIcon; - GuiImageData * imgsearchIcon_gray; - GuiImageData * imgabcIcon; - GuiImageData * imgrankIcon; - GuiImageData * imgplayCountIcon; - GuiImageData * imgplayersSortIcon; - GuiImageData * imgarrangeGrid; - GuiImageData * imgarrangeGrid_gray; - GuiImageData * imgarrangeCarousel; - GuiImageData * imgarrangeCarousel_gray; - GuiImageData * imgarrangeList; - GuiImageData * imgarrangeList_gray; - GuiImageData * imgdvd; - GuiImageData * imgdvd_gray; - GuiImageData * imgLock; - GuiImageData * imgLock_gray; - GuiImageData * imgUnlock; - GuiImageData * imgUnlock_gray; - GuiImageData * homebrewImgData; - GuiImageData * homebrewImgDataOver; - GuiImageData * gameCover; - - GuiTrigger * trigA; - GuiTrigger * trigHome; - GuiTrigger * trig1; - GuiTrigger * trig2; - - GuiImage * installBtnImg; - GuiImage * installBtnImgOver; - GuiImage * settingsBtnImg; - GuiImage * settingsBtnImgOver; - GuiImage * homeBtnImg; - GuiImage * homeBtnImgOver; - GuiImage * poweroffBtnImg; - GuiImage * poweroffBtnImgOver; - GuiImage * sdcardImg; - GuiImage * sdcardImgOver; - GuiImage * favoriteBtnImg; - GuiImage * favoriteBtnImg_g; - GuiImage * searchBtnImg; - GuiImage * searchBtnImg_g; - GuiImage * sortBtnImg; - GuiImage * listBtnImg; - GuiImage * listBtnImg_g; - GuiImage * gridBtnImg; - GuiImage * gridBtnImg_g; - GuiImage * carouselBtnImg; - GuiImage * carouselBtnImg_g; - GuiImage * lockBtnImg; - GuiImage * lockBtnImg_g; - GuiImage * unlockBtnImg; - GuiImage * unlockBtnImg_g; - GuiImage * dvdBtnImg; - GuiImage * dvdBtnImg_g; - GuiImage * homebrewImg; - GuiImage * homebrewImgOver; - GuiImage * gameCoverImg; - - GuiText * usedSpaceTxt; - GuiText * gamecntTxt; - GuiText * clockTimeBack; - GuiText * clockTime; - GuiText * GameRegionTxt; - GuiText * GameIDTxt; - - GuiButton * gamecntBtn; - GuiButton * installBtn; - GuiButton * settingsBtn; - GuiButton * homeBtn; - GuiButton * poweroffBtn; - GuiButton * sdcardBtn; - GuiButton * gameInfo; - GuiButton * favoriteBtn; - GuiButton * searchBtn; - GuiButton * sortBtn; - GuiButton * listBtn; - GuiButton * gridBtn; - GuiButton * carouselBtn; - GuiButton * lockBtn; - GuiButton * dvdBtn; - GuiButton * homebrewBtn; - GuiButton * DownloadBtn; - GuiButton * idBtn; - - GuiTooltip * installBtnTT; - GuiTooltip * settingsBtnTT; - GuiTooltip * homeBtnTT; - GuiTooltip * poweroffBtnTT; - GuiTooltip * sdcardBtnTT; - GuiTooltip * favoriteBtnTT; - GuiTooltip * searchBtnTT; - GuiTooltip * sortBtnTT; - GuiTooltip * listBtnTT; - GuiTooltip * gridBtnTT; - GuiTooltip * carouselBtnTT; - GuiTooltip * lockBtnTT; - GuiTooltip * dvdBtnTT; - GuiTooltip * homebrewBtnTT; - GuiTooltip * DownloadBtnTT; - GuiTooltip * IDBtnTT; -}; - -#endif diff --git a/source/menu/WDMMenu.cpp b/source/menu/WDMMenu.cpp deleted file mode 100644 index 57689317..00000000 --- a/source/menu/WDMMenu.cpp +++ /dev/null @@ -1,264 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include -#include "WDMMenu.hpp" -#include "FileOperations/fileops.h" -#include "menu/menus.h" -#include "themes/CTheme.h" -#include "language/gettext.h" -#include "usbloader/wbfs.h" -#include "libs/libwbfs/libwbfs.h" -#include "libs/libwbfs/wiidisc.h" -#include "usbloader/fstfile.h" -#include "settings/GameTitles.h" -#include "gecko.h" - -u32 WDMMenu::AlternateDolOffset = 0; -u32 WDMMenu::AlternateDolParameter = 0; - -WDMMenu::WDMMenu(const struct discHdr * header) - : GuiWindow(screenwidth, screenheight) -{ - Options = new OptionList; - - btnOutline = Resources::GetImageData("button_dialogue_box.png"); - - trigA = new GuiTrigger(); - trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - - trigB = new GuiTrigger(); - trigB->SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B); - - defaultBtnTxt = new GuiText(tr("Default"), 22, (GXColor){0, 0, 0, 255}); - defaultBtnImg = new GuiImage(btnOutline); - defaultBtn = new GuiButton(defaultBtnImg, defaultBtnImg, 2, 3, 130, 400, trigA, btnSoundOver, btnSoundClick2, 1); - defaultBtn->SetLabel(defaultBtnTxt); - Append(defaultBtn); - - backBtnTxt = new GuiText(tr("Back"), 22, (GXColor){0, 0, 0, 255}); - backBtnImg = new GuiImage(btnOutline); - backBtn = new GuiButton(backBtnImg, backBtnImg, 2, 3, -130, 400, trigA, btnSoundOver, btnSoundClick2, 1); - backBtn->SetLabel(backBtnTxt); - backBtn->SetTrigger(trigB); - Append(backBtn); - - optionBrowser = new GuiCustomOptionBrowser(396, 280, Options, "bg_options_settings.png"); - optionBrowser->SetPosition(0, 90); - optionBrowser->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - Append(optionBrowser); - - SetEffect(EFFECT_FADE, 50); - - char WDMPath[200]; - snprintf(WDMPath, sizeof(WDMPath), "%s/%.3s.wdm", Settings.WDMpath, (char *) header->id); - - if(!CheckFile(WDMPath)) - { - snprintf(WDMPath, sizeof(WDMPath), "%s/%.6s.wdm", Settings.WDMpath, (char *) header->id); - if(!CheckFile(WDMPath)) - snprintf(WDMPath, sizeof(WDMPath), "%s/%.4s.wdm", Settings.WDMpath, (char *) header->id); - } - - wdmFile = new WDMFile(WDMPath); - - CheckGameFiles(header); -} - -WDMMenu::~WDMMenu() -{ - ResumeGui(); - - SetEffect(EFFECT_FADE, -50); - while(this->GetEffect() > 0) - usleep(100); - - HaltGui(); - if(parentElement) - ((GuiWindow *) parentElement)->Remove(this); - - RemoveAll(); - - delete btnOutline; - - delete backBtnTxt; - delete backBtnImg; - delete backBtn; - - delete defaultBtnTxt; - delete defaultBtnImg; - delete defaultBtn; - - delete trigA; - delete trigB; - - delete optionBrowser; - delete wdmFile; - - ResumeGui(); -} - -int WDMMenu::GetChoice() -{ - if (shutdown) - Sys_Shutdown(); - else if (reset) - Sys_Reboot(); - - if(backBtn->GetState() == STATE_CLICKED) - return 0; - - else if(defaultBtn->GetState() == STATE_CLICKED) - return 1; - - int choice = optionBrowser->GetClickedOption(); - if(choice >= 0 && choice < (int) DOLOffsetList.size()) - { - AlternateDolOffset = DOLOffsetList[choice].first; - AlternateDolParameter = DOLOffsetList[choice].second; - return 1; - } - - return -1; -} - -int WDMMenu::Show(const struct discHdr * header) -{ - WDMMenu Menu(header); - - mainWindow->SetState(STATE_DISABLED); - mainWindow->Append(&Menu); - - int ret = -1; - - while(ret == -1) - { - usleep(100); - ret = Menu.GetChoice(); - } - mainWindow->SetState(STATE_DEFAULT); - - return ret; -} - -static inline bool stringcompare(const char * replace, const char * dolname) -{ - if(strlen(replace) == 0 || strlen(dolname) == 0) - return false; - - for( ; *replace != 0 && *dolname != 0; replace++, dolname++) - { - if(*replace == '?') - continue; - - if(toupper((int) *replace) != toupper((int) *dolname)) - return false; - } - - return true; -} - -void WDMMenu::CheckGameFiles(const struct discHdr * header) -{ - wbfs_disc_t *disc = WBFS_OpenDisc((u8 *) header->id); - if (!disc) - { - WindowPrompt(tr( "ERROR:" ), tr( "Could not open Disc" ), tr( "OK" )); - return; - } - - wiidisc_t *wdisc = wd_open_disc((int(*)(void *, u32, u32, void *)) wbfs_disc_read, disc); - if (!wdisc) - { - WindowPrompt(tr( "ERROR:" ), tr( "Could not open Disc" ), tr( "OK" )); - return; - } - - FST_ENTRY * fstbuffer = (FST_ENTRY *) wd_get_fst(wdisc, ONLY_GAME_PARTITION); - if (!fstbuffer) - { - WindowPrompt(tr( "ERROR:" ), tr( "Not enough free memory." ), tr( "OK" )); - return; - } - - wd_close_disc(wdisc); - WBFS_CloseDisc(disc); - - int position = 0; - vector > FilesNotInWDM; - - for(int i = 0; i < wdmFile->size(); ++i) - { - if(stringcompare(wdmFile->GetDolName(i), "main") == true) - { - DOLOffsetList.push_back(pair(0, wdmFile->GetParameter(i))); - Options->SetName(position, "%i.", position+1); - Options->SetValue(position, wdmFile->GetReplaceName(i)); - position++; - } - } - - for (u32 i = 1; i < fstbuffer[0].filelen; i++) - { - //don't add files that aren't .dol to the list - const char * filename = fstfiles(fstbuffer, i); - const char * fileext = NULL; - - if(filename) - fileext = strrchr(filename, '.'); - - if (fileext && strcasecmp(fileext, ".dol") == 0) - { - char NameCpy[strlen(filename)+1]; - strcpy(NameCpy, filename); - char *extension = strrchr(NameCpy, '.'); - if(extension) *extension = 0; - - int j; - for(j = 0; j < wdmFile->size(); ++j) - { - if(stringcompare(wdmFile->GetDolName(j), NameCpy) == true) - { - DOLOffsetList.push_back(pair(i, wdmFile->GetParameter(j))); - Options->SetName(position, "%i.", position+1); - Options->SetValue(position, wdmFile->GetReplaceName(j)); - position++; - break; - } - } - - if(j == wdmFile->size()) - FilesNotInWDM.push_back(pair(i, filename)); - } - } - - for(u32 i = 0; i < FilesNotInWDM.size(); ++i) - { - DOLOffsetList.push_back(pair(FilesNotInWDM[i].first, 1)); - Options->SetName(position, "%i.", position+1); - Options->SetValue(position, FilesNotInWDM[i].second.c_str()); - position++; - } - - free(fstbuffer); -} diff --git a/source/menu/WDMMenu.hpp b/source/menu/WDMMenu.hpp deleted file mode 100644 index 011d2b28..00000000 --- a/source/menu/WDMMenu.hpp +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef WDMMENU_HPP_ -#define WDMMENU_HPP_ - -#include "libwiigui/gui.h" -#include "libwiigui/gui_customoptionbrowser.h" -#include "usbloader/disc.h" -#include "usbloader/WDMFile.hpp" - -class WDMMenu : public GuiWindow -{ - public: - WDMMenu(const struct discHdr * header); - ~WDMMenu(); - int GetChoice(); - static int Show(const struct discHdr * header); - static u32 GetAlternateDolOffset() { return AlternateDolOffset; } - static u32 GetDolParameter() { return AlternateDolParameter; } - private: - void CheckGameFiles(const struct discHdr * header); - - static u32 AlternateDolOffset; - static u32 AlternateDolParameter; - - WDMFile * wdmFile; - vector > DOLOffsetList; - GuiImageData * btnOutline; - - GuiTrigger * trigA; - GuiTrigger * trigB; - - OptionList * Options; - - GuiText * backBtnTxt; - GuiImage * backBtnImg; - GuiButton * backBtn; - - GuiText * defaultBtnTxt; - GuiImage * defaultBtnImg; - GuiButton * defaultBtn; - - GuiCustomOptionBrowser * optionBrowser; -}; - -#endif diff --git a/source/menu/menu_install.cpp b/source/menu/menu_install.cpp deleted file mode 100644 index fc43cb72..00000000 --- a/source/menu/menu_install.cpp +++ /dev/null @@ -1,127 +0,0 @@ -#include "menus.h" -#include "usbloader/usbstorage2.h" -#include "usbloader/wbfs.h" -#include "usbloader/disc.h" -#include "usbloader/utils.h" -#include "usbloader/GameList.h" -#include "prompts/ProgressWindow.h" -#include "themes/CTheme.h" - -u64 gamesize = 0; - -/**************************************************************************** - * MenuInstall - ***************************************************************************/ - -int MenuInstall() -{ - int ios_ver = IOS_GetVersion(); - if(ios_ver < 200) - { - char text[100]; - snprintf(text, sizeof(text), "%s %i.", tr("You are currently using IOS"), ios_ver); - WindowPrompt(text, tr("The game installation is disabled under this IOS because of instability in usb write."), tr("OK")); - return MENU_DISCLIST; - } - - gprintf("\nMenuInstall()"); - - static struct discHdr headerdisc ATTRIBUTE_ALIGN( 32 ); - - Disc_SetUSB(NULL); - - int ret, choice = 0; - char name[200]; - - ret = DiscWait(tr( "Insert Disk" ), tr( "Waiting..." ), tr( "Cancel" ), 0, 0); - if (ret < 0) - { - WindowPrompt(tr( "Error reading Disc" ), 0, tr( "Back" )); - return MENU_DISCLIST; - } - ret = Disc_Open(); - if (ret < 0) - { - WindowPrompt(tr( "Could not open Disc" ), 0, tr( "Back" )); - return MENU_DISCLIST; - } - - ret = Disc_IsWii(); - if (ret < 0) - { - choice = WindowPrompt(tr( "Not a Wii Disc" ), tr( "Insert a Wii Disc!" ), tr( "OK" ), tr( "Back" )); - - if (choice == 1) - return MENU_INSTALL; - else - return MENU_DISCLIST; - } - - Disc_ReadHeader(&headerdisc); - snprintf(name, sizeof(name), "%s", headerdisc.title); - - ret = WBFS_CheckGame(headerdisc.id); - if (ret) - { - WindowPrompt(tr( "Game is already installed:" ), name, tr( "Back" )); - return MENU_DISCLIST; - } - - f32 freespace, used; - - WBFS_DiskSpace(&used, &freespace); - gamesize = WBFS_EstimeGameSize(); - - char gametxt[50]; - - sprintf(gametxt, "%s : %.2fGB", name, gamesize/GB_SIZE); - - wiilight(1); - choice = WindowPrompt(tr( "Continue to install game?" ), gametxt, tr( "OK" ), tr( "Cancel" )); - - if (choice == 1) - { - sprintf(gametxt, "%s", tr( "Installing game:" )); - - if (gamesize/GB_SIZE > freespace) - { - char errortxt[50]; - sprintf(errortxt, "%s: %.2fGB, %s: %.2fGB", tr( "Game Size" ), gamesize/GB_SIZE, tr( "Free Space" ), freespace); - WindowPrompt(tr( "Not enough free space!" ), errortxt, tr( "OK" )); - } - else - { - USBStorage2_Watchdog(0); - StartProgress(gametxt, name, 0, true, true); - ret = WBFS_AddGame(); - ProgressStop(); - USBStorage2_Watchdog(1); - wiilight(0); - if (ret != 0) - { - WindowPrompt(tr( "Install Error!" ), 0, tr( "Back" )); - } - else - { - gameList.ReadGameList(); //get the entries again - gameList.FilterList(); - GuiSound * instsuccess = NULL; - bgMusic->Pause(); - instsuccess = new GuiSound(Resources::GetFile("success.ogg"), Resources::GetFileSize("success.ogg"), Settings.sfxvolume); - instsuccess->SetVolume(Settings.sfxvolume); - instsuccess->SetLoop(0); - instsuccess->Play(); - WindowPrompt(tr( "Successfully installed:" ), name, tr( "OK" )); - instsuccess->Stop(); - delete instsuccess; - bgMusic->Resume(); - } - } - } - - //Turn off the WiiLight - wiilight(0); - gamesize = 0; - - return MENU_DISCLIST; -} diff --git a/source/menu/menu_partition_selection.cpp b/source/menu/menu_partition_selection.cpp deleted file mode 100644 index 5749d262..00000000 --- a/source/menu/menu_partition_selection.cpp +++ /dev/null @@ -1,131 +0,0 @@ -#include - -#include "menus.h" -#include "usbloader/usbstorage2.h" -#include "usbloader/utils.h" -#include "usbloader/wbfs.h" -#include "libwiigui/gui_customoptionbrowser.h" -#include "Controls/DeviceHandler.hpp" -#include "themes/CTheme.h" - -/**************************************************************************** - * SelectPartitionMenu - ***************************************************************************/ -int SelectPartitionMenu() -{ - bool ExitSelect = false; - OptionList options; - - u32 counter = 0; - int choice = -1; - int ret = -1; - - PartitionHandle * usbHandle = DeviceHandler::Instance()->GetUSBHandle(); - - //create the partitionlist - for (int cnt = 0; cnt < usbHandle->GetPartitionCount(); cnt++) - { - /* Calculate size in gigabytes */ - f32 size = usbHandle->GetSize(cnt) / GB_SIZE; - - if (size) - { - options.SetName(counter, "%s %d %s: ", tr( "Partition" ), cnt + 1, usbHandle->GetFSName(cnt)); - options.SetValue(counter, "%.2fGB", size); - } - else - { - options.SetName(counter, "%s %d:", tr( "Partition" ), cnt + 1); - options.SetValue(counter, tr( "Can't be formatted" )); - } - counter++; - } - - GuiImageData btnpwroff(Resources::GetFile("wiimote_poweroff.png"), Resources::GetFileSize("wiimote_poweroff.png")); - GuiImageData btnpwroffOver(Resources::GetFile("wiimote_poweroff_over.png"), Resources::GetFileSize("wiimote_poweroff_over.png")); - GuiImageData btnhome(Resources::GetFile("menu_button.png"), Resources::GetFileSize("menu_button.png")); - GuiImageData btnhomeOver(Resources::GetFile("menu_button_over.png"), Resources::GetFileSize("menu_button_over.png")); - GuiImageData battery(Resources::GetFile("battery.png"), Resources::GetFileSize("battery.png")); - GuiImageData batteryBar(Resources::GetFile("battery_bar.png"), Resources::GetFileSize("battery_bar.png")); - GuiImageData batteryRed(Resources::GetFile("battery_red.png"), Resources::GetFileSize("battery_red.png")); - GuiImageData batteryBarRed(Resources::GetFile("battery_bar_red.png"), Resources::GetFileSize("battery_bar_red.png")); - - GuiTrigger trigA; - trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - GuiTrigger trigHome; - trigHome.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0); - - GuiImage poweroffBtnImg(&btnpwroff); - GuiImage poweroffBtnImgOver(&btnpwroffOver); - poweroffBtnImg.SetWidescreen(Settings.widescreen); - poweroffBtnImgOver.SetWidescreen(Settings.widescreen); - GuiButton poweroffBtn(&poweroffBtnImg, &poweroffBtnImgOver, 0, 3, - thInt("576 - power off btn pos x"), thInt("355 - power off btn pos y"), - &trigA, btnSoundOver, btnSoundClick2, 1); - GuiImage exitBtnImg(&btnhome); - GuiImage exitBtnImgOver(&btnhomeOver); - exitBtnImg.SetWidescreen(Settings.widescreen); - exitBtnImgOver.SetWidescreen(Settings.widescreen); - GuiButton exitBtn(&exitBtnImg, &exitBtnImgOver, 0, 3, - thInt("489 - home menu btn pos x"), thInt("371 - home menu btn pos y"), - &trigA, btnSoundOver, btnSoundClick2, 1); - exitBtn.SetTrigger(&trigHome); - - GuiCustomOptionBrowser optionBrowser(396, 280, &options, "bg_options_settings.png"); - optionBrowser.SetPosition(0, 40); - optionBrowser.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - - HaltGui(); - GuiWindow w(screenwidth, screenheight); - w.Append(&poweroffBtn); - w.Append(&exitBtn); - - mainWindow->Append(&w); - mainWindow->Append(&optionBrowser); - - ResumeGui(); - - while (!ExitSelect) - { - VIDEO_WaitVSync(); - - if (shutdown) - Sys_Shutdown(); - if (reset) - Sys_Reboot(); - - ret = optionBrowser.GetClickedOption(); - - if (ret >= 0) - { - if (usbHandle->GetSize(ret)) - { - choice = ret; - ExitSelect = true; - } - } - - if (poweroffBtn.GetState() == STATE_CLICKED) - { - choice = WindowPrompt(tr( "Shutdown System" ), tr( "Are you sure?" ), tr( "Yes" ), tr( "No" )); - if (choice == 1) - Sys_Shutdown(); - - } - else if (exitBtn.GetState() == STATE_CLICKED) - { - choice = WindowPrompt(tr( "Return to Wii Menu" ), tr( "Are you sure?" ), tr( "Yes" ), tr( "No" )); - if (choice == 1) - Sys_LoadMenu(); - } - } - - HaltGui(); - - mainWindow->Remove(&optionBrowser); - mainWindow->Remove(&w); - ResumeGui(); - - return choice; -} - diff --git a/source/menu/menus.h b/source/menu/menus.h deleted file mode 100644 index 0733afdc..00000000 --- a/source/menu/menus.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _MENUS_H -#define _MENUS_H - -#include "libwiigui/gui.h" -#include "language/gettext.h" -#include "prompts/PromptWindows.h" -#include "menu.h" -#include "gecko.h" -#include "sys.h" - -extern u8 shutdown; -extern u8 reset; - -int MenuInstall(); -int SelectPartitionMenu(); - -#endif // _MENUS_H diff --git a/source/mload/mload.c b/source/mload/mload.c deleted file mode 100644 index 4b5effce..00000000 --- a/source/mload/mload.c +++ /dev/null @@ -1,493 +0,0 @@ -/* mload.c (for PPC) (c) 2009, Hermes - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#include "mload.h" -#include "gecko.h" - -static const char mload_fs[] ATTRIBUTE_ALIGN(32) = "/dev/mload"; - -static s32 mload_fd = -1; -static s32 hid = -1; - -/*--------------------------------------------------------------------------------------------------------------*/ - -// to init/test if the device is running - -int mload_init() -{ - int n; - - if(hid<0) hid = iosCreateHeap(0x10000); - - if(hid<0) - { - if(mload_fd>=0) - IOS_Close(mload_fd); - - mload_fd=-1; - - return hid; - } - - if(mload_fd>=0) - { - return 0; - } - - for(n=0;n<20;n++) // try 5 seconds - { - mload_fd=IOS_Open(mload_fs, 0); - - if(mload_fd>=0) break; - - usleep(250*1000); - } - - return mload_fd; -} - -/*--------------------------------------------------------------------------------------------------------------*/ - -// to close the device (remember call it when rebooting the IOS!) - -int mload_close() -{ - int ret; - - if(mload_fd<0) return -1; - - ret=IOS_Close(mload_fd); - - mload_fd=-1; - - return ret; -} - -/*--------------------------------------------------------------------------------------------------------------*/ - -// to get the thread id of mload - -int mload_get_thread_id() -{ - int ret; - - if(mload_init()<0) return -1; - - ret= IOS_IoctlvFormat(hid, mload_fd, MLOAD_MLOAD_THREAD_ID, ":"); - - return ret; -} - -/*--------------------------------------------------------------------------------------------------------------*/ - -// get the base and the size of the memory readable/writable to load modules - -int mload_get_load_base(u32 *starlet_base, int *size) -{ - int ret; - - if(mload_init()<0) return -1; - - ret= IOS_IoctlvFormat(hid, mload_fd, MLOAD_GET_LOAD_BASE, ":ii",starlet_base, size); - - return ret; -} - -/*--------------------------------------------------------------------------------------------------------------*/ - -// load and run a module from starlet (it need to allocate MEM2 to send the elf file) -// the module must be a elf made with stripios - -int mload_module(void *addr, int len) -{ - int ret; - void *buf=NULL; - - buf= iosAlloc(hid, len); - - if(!buf) - return -1; - - memcpy(buf, addr,len); - - ret = IOS_IoctlvFormat(hid, mload_fd, MLOAD_LOAD_MODULE, ":d", buf, len); - if(ret<0) - return ret; - - ret=IOS_IoctlvFormat(hid, mload_fd, MLOAD_RUN_MODULE, ":"); - - return ret; -} - -/*--------------------------------------------------------------------------------------------------------------*/ - -// load a module from the PPC -// the module must be a elf made with stripios - -int mload_elf(void *my_elf, data_elf *data_elf) -{ - int n,m; - int p; - u8 *adr; - u32 elf=(u32) my_elf; - - if(elf & 3) return -1; // aligned to 4 please! - - elfheader *head=(void *) elf; - elfphentry *entries; - - if(head->ident0!=0x7F454C46) return -1; - if(head->ident1!=0x01020161) return -1; - if(head->ident2!=0x01000000) return -1; - - p=head->phoff; - - data_elf->start=(void *) head->entry; - - for(n=0; nphnum; n++) - { - entries=(void *) (elf+p); - p+=sizeof(elfphentry); - - if(entries->type == 4) - { - adr=(void *) (elf + entries->offset); - - if(getbe32(0)!=0) return -2; // bad info (sure) - - for(m=4; (u32)m < entries->memsz; m+=8) - { - switch(getbe32(m)) - { - case 0x9: - data_elf->start= (void *) getbe32(m+4); - break; - case 0x7D: - data_elf->prio= getbe32(m+4); - break; - case 0x7E: - data_elf->size_stack= getbe32(m+4); - break; - case 0x7F: - data_elf->stack= (void *) (getbe32(m+4)); - break; - - } - - } - - } - else - if(entries->type == 1 && entries->memsz != 0 && entries->vaddr!=0) - { - - if(mload_memset((void *) entries->vaddr, 0, entries->memsz)<0) return -1; - if(mload_seek(entries->vaddr, SEEK_SET)<0) return -1; - if(mload_write((void *) (elf + entries->offset), entries->filesz)<0) return -1; - - } - } - - return 0; -} - -/*--------------------------------------------------------------------------------------------------------------*/ - -// run one thread (you can use to load modules or binary files) - -int mload_run_thread(void *starlet_addr, void *starlet_top_stack, int stack_size, int priority) -{ - int ret; - - if(mload_init()<0) return -1; - - ret= IOS_IoctlvFormat(hid, mload_fd, MLOAD_RUN_THREAD, "iiii:", starlet_addr,starlet_top_stack, stack_size, priority); - - return ret; -} - -/*--------------------------------------------------------------------------------------------------------------*/ - -// stops one starlet thread - -int mload_stop_thread(int id) -{ -int ret; - - if(mload_init()<0) return -1; - - ret= IOS_IoctlvFormat(hid, mload_fd, MLOAD_STOP_THREAD, "i:", id); - -return ret; - -} - -/*--------------------------------------------------------------------------------------------------------------*/ - -// continue one stopped starlet thread - -int mload_continue_thread(int id) -{ - int ret; - - if(mload_init()<0) return -1; - - ret= IOS_IoctlvFormat(hid, mload_fd, MLOAD_CONTINUE_THREAD, "i:", id); - - return ret; -} -/*--------------------------------------------------------------------------------------------------------------*/ - -// fix starlet address to read/write (uses SEEK_SET, etc as mode) - -int mload_seek(int offset, int mode) -{ - if(mload_init()<0) return -1; - - return IOS_Seek(mload_fd, offset, mode); -} - -/*--------------------------------------------------------------------------------------------------------------*/ - -// read bytes from starlet (it update the offset) - -int mload_read(void* buf, u32 size) -{ - if(mload_init()<0) return -1; - - return IOS_Read(mload_fd, buf, size); -} - -/*--------------------------------------------------------------------------------------------------------------*/ - -// write bytes from starlet (it update the offset) - -int mload_write(const void * buf, u32 size) -{ - if(mload_init()<0) return -1; - - return IOS_Write(mload_fd, buf, size); -} - -/*--------------------------------------------------------------------------------------------------------------*/ - -// fill a block (similar to memset) - -int mload_memset(void *starlet_addr, int set, int len) -{ - int ret; - - if(mload_init()<0) return -1; - - ret= IOS_IoctlvFormat(hid, mload_fd, MLOAD_MEMSET, "iii:", starlet_addr, set, len); - - return ret; -} - -/*--------------------------------------------------------------------------------------------------------------*/ - -// get the ehci datas ( ehcmodule.elf uses this address) - -void * mload_get_ehci_data() -{ - int ret; - - if(mload_init()<0) return NULL; - - ret= IOS_IoctlvFormat(hid, mload_fd, MLOAD_GET_EHCI_DATA, ":"); - if(ret<0) return NULL; - - return (void *) ret; -} - -/*--------------------------------------------------------------------------------------------------------------*/ - -// set the dev/es ioctlv in routine - -int mload_set_ES_ioctlv_vector(void *starlet_addr) -{ - int ret; - - if(mload_init()<0) return -1; - - ret= IOS_IoctlvFormat(hid, mload_fd, MLOAD_SET_ES_IOCTLV, "i:", starlet_addr); - - return ret; -} - - - -int mload_getw(const void * addr, u32 *dat) -{ - int ret; - - if(mload_init()<0) return -1; - - ret= IOS_IoctlvFormat(hid, mload_fd, MLOAD_GETW, "i:i", addr, dat); - - return ret; -} - -int mload_geth(const void * addr, u16 *dat) -{ - int ret; - - if(mload_init()<0) return -1; - - ret= IOS_IoctlvFormat(hid, mload_fd, MLOAD_GETH, "i:h", addr, dat); - - return ret; -} - -int mload_getb(const void * addr, u8 *dat) -{ - int ret; - - if(mload_init()<0) return -1; - - ret= IOS_IoctlvFormat(hid, mload_fd, MLOAD_GETB, "i:b", addr, dat); - - return ret; -} - -int mload_setw(const void * addr, u32 dat) -{ - int ret; - - if(mload_init()<0) return -1; - - ret= IOS_IoctlvFormat(hid, mload_fd, MLOAD_SETW, "ii:", addr, dat); - - return ret; -} - -int mload_seth(const void * addr, u16 dat) -{ - int ret; - - if(mload_init()<0) return -1; - - ret= IOS_IoctlvFormat(hid, mload_fd, MLOAD_SETH, "ih:", addr, dat); - - return ret; -} - -int mload_setb(const void * addr, u8 dat) -{ - int ret; - - if(mload_init()<0) return -1; - - ret= IOS_IoctlvFormat(hid, mload_fd, MLOAD_SETB, "ib:", addr, dat); - - return ret; -} - -/*--------------------------------------------------------------------------------------------------------------*/ - -// to get log buffer -// this function return the size of the log buffer and prepare it to read with mload_read() the datas - -int mload_get_log() -{ - int ret; - - if(mload_init()<0) return -1; - - ret= IOS_IoctlvFormat(hid, mload_fd, MLOAD_GET_LOG, ":"); - - return ret; - -} - - -/*--------------------------------------------------------------------------------------------------------------*/ - -// to get IOS base for dev/es to create the cIOS - -int mload_get_IOS_base() -{ - int ret; - - if(mload_init()<0) return -1; - - ret= IOS_IoctlvFormat(hid, mload_fd, MLOAD_GET_IOS_BASE, ":"); - - return ret; - -} - - -int mload_get_version() -{ - int ret; - if(mload_init()<0) return -1; - ret = IOS_IoctlvFormat(hid, mload_fd, MLOAD_GET_MLOAD_VERSION, ":"); - return ret; -} - -/* IOS info structure */ -typedef struct { - /* Syscall base */ - u32 syscall; - - /* Module versions */ - u32 dipVersion; - u32 esVersion; - u32 ffsVersion; - u32 iopVersion; -} iosInfo; - -int wanin_mload_get_IOS_base() -{ - int ret; - iosInfo ios; - memset(&ios, 0, sizeof(ios)); - - if(mload_init()<0) return -1; - - ret= IOS_IoctlvFormat(hid, mload_fd, MLOAD_GET_IOS_BASE, ":d", &ios, sizeof(ios)); - //gprintf("get_ios_base: %d %x\n", ret, ios.dipVersion); - if (ret == 0) { - switch(ios.dipVersion) { - case 0x48776F72: /* DIP: 07/11/08 14:34:26 */ - return 37; - - case 0x4888E14C: /* DIP: 07/24/08 20:08:44 */ - return 38; - - case 0x4A262AF5: /* DIP: 06/03/09 07:49:09 */ - return 57; - - case 0x492ACA9D: /* DIP: 11/24/08 15:39:09 */ - return 60; - } - } - return ret; -} - -int mload_set_gecko_debug() -{ - int ret; - u32 log_mode = 2; // GECKO - if(mload_init()<0) return -1; - - gprintf("Setting debug mode..."); - ret = IOS_IoctlvFormat(hid, mload_fd, MLOAD_SET_LOG_MODE, ":d", &log_mode, sizeof(log_mode)); - gprintf("%d\n", ret); - return ret; -} diff --git a/source/mload/mload.h b/source/mload/mload.h deleted file mode 100644 index 43f21d4c..00000000 --- a/source/mload/mload.h +++ /dev/null @@ -1,233 +0,0 @@ -/* mload.c (for PPC) (c) 2009, Hermes - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#ifndef __MLOAD_H__ -#define __MLOAD_H__ - - -#include -#include -#include -#include -#include -#include "unistd.h" - -#define MLOAD_MLOAD_THREAD_ID 0x4D4C4400 -#define MLOAD_GET_IOS_BASE 0x4D4C4401 -#define MLOAD_GET_MLOAD_VERSION 0x4D4C4402 - -#define MLOAD_LOAD_MODULE 0x4D4C4480 -#define MLOAD_RUN_MODULE 0x4D4C4481 -#define MLOAD_RUN_THREAD 0x4D4C4482 - -#define MLOAD_STOP_THREAD 0x4D4C4484 -#define MLOAD_CONTINUE_THREAD 0x4D4C4485 - -#define MLOAD_GET_LOAD_BASE 0x4D4C4490 -#define MLOAD_MEMSET 0x4D4C4491 - -#define MLOAD_GET_EHCI_DATA 0x4D4C44A0 -#define MLOAD_GET_LOG 0x4D4C44A1 - -#define MLOAD_SET_ES_IOCTLV 0x4D4C44B0 - -#define MLOAD_GETW 0x4D4C44C0 -#define MLOAD_GETH 0x4D4C44C1 -#define MLOAD_GETB 0x4D4C44C2 -#define MLOAD_SETW 0x4D4C44C3 -#define MLOAD_SETH 0x4D4C44C4 -#define MLOAD_SETB 0x4D4C44C5 - -#define MLOAD_SET_LOG_MODE 0x4D4C44D0 -#define MLOAD_GET_LOG_BUFFER 0x4D4C44D1 - -#ifdef __cplusplus -extern "C" { -#endif - -// from IOS ELF stripper of neimod - -#define getbe32(x) ((adr[x]<<24) | (adr[x+1]<<16) | (adr[x+2]<<8) | (adr[x+3])) - -typedef struct -{ - u32 ident0; - u32 ident1; - u32 ident2; - u32 ident3; - u32 machinetype; - u32 version; - u32 entry; - u32 phoff; - u32 shoff; - u32 flags; - u16 ehsize; - u16 phentsize; - u16 phnum; - u16 shentsize; - u16 shnum; - u16 shtrndx; -} elfheader; - -typedef struct -{ - u32 type; - u32 offset; - u32 vaddr; - u32 paddr; - u32 filesz; - u32 memsz; - u32 flags; - u32 align; -} elfphentry; - -typedef struct -{ - void *start; - int prio; - void *stack; - int size_stack; -} data_elf; - -/*--------------------------------------------------------------------------------------------------------------*/ - -// to init/test if the device is running - -int mload_init(); - -/*--------------------------------------------------------------------------------------------------------------*/ - -// to close the device (remember call it when rebooting the IOS!) - -int mload_close(); - -/*--------------------------------------------------------------------------------------------------------------*/ - -// to get the thread id of mload - -int mload_get_thread_id(); - -/*--------------------------------------------------------------------------------------------------------------*/ - -// get the base and the size of the memory readable/writable to load modules - -int mload_get_load_base(u32 *starlet_base, int *size); - -/*--------------------------------------------------------------------------------------------------------------*/ - -// load and run a module from starlet (it need to allocate MEM2 to send the elf file) -// the module must be a elf made with stripios - -int mload_module(void *addr, int len); - -/*--------------------------------------------------------------------------------------------------------------*/ - -// load a module from the PPC -// the module must be a elf made with stripios - -int mload_elf(void *my_elf, data_elf *data_elf); - -/*--------------------------------------------------------------------------------------------------------------*/ - -// run one thread (you can use to load modules or binary files) - -int mload_run_thread(void *starlet_addr, void *starlet_top_stack, int stack_size, int priority); - -/*--------------------------------------------------------------------------------------------------------------*/ - -// stops one starlet thread - -int mload_stop_thread(int id); - -/*--------------------------------------------------------------------------------------------------------------*/ - -// continue one stopped starlet thread - -int mload_continue_thread(int id); - -/*--------------------------------------------------------------------------------------------------------------*/ - -// fix starlet address to read/write (uses SEEK_SET, etc as mode) - -int mload_seek(int offset, int mode); - -/*--------------------------------------------------------------------------------------------------------------*/ - -// read bytes from starlet (it update the offset) - -int mload_read(void* buf, u32 size); - -/*--------------------------------------------------------------------------------------------------------------*/ - -// write bytes from starlet (it update the offset) - -int mload_write(const void * buf, u32 size); - -/*--------------------------------------------------------------------------------------------------------------*/ - -// fill a block (similar to memset) - -int mload_memset(void *starlet_addr, int set, int len); - -/*--------------------------------------------------------------------------------------------------------------*/ - -// get the ehci datas ( ehcmodule.elf uses this address) - -void * mload_get_ehci_data(); - -/*--------------------------------------------------------------------------------------------------------------*/ - -// set the dev/es ioctlv in routine - -int mload_set_ES_ioctlv_vector(void *starlet_addr); - -/*--------------------------------------------------------------------------------------------------------------*/ - - -// to get log buffer -// this function return the size of the log buffer and prepare it to read with mload_read() the datas - -int mload_get_log(); - -/*--------------------------------------------------------------------------------------------------------------*/ - - -// to get IOS base for dev/es to create the cIOS - -int mload_get_IOS_base(); - -int mload_get_version(); - -/*--------------------------------------------------------------------------------------------------------------*/ - -int mload_getw(const void * addr, u32 *dat); -int mload_geth(const void * addr, u16 *dat); -int mload_getb(const void * addr, u8 *dat); - -int mload_setw(const void * addr, u32 dat); -int mload_seth(const void * addr, u16 dat); -int mload_setb(const void * addr, u8 dat); - -int wanin_mload_get_IOS_base(); -int mload_set_gecko_debug(); - -#ifdef __cplusplus - } -#endif - - -#endif diff --git a/source/mload/mload_modules.c b/source/mload/mload_modules.c deleted file mode 100644 index 06dcd671..00000000 --- a/source/mload/mload_modules.c +++ /dev/null @@ -1,230 +0,0 @@ -#include "mload_modules.h" - -static u32 ios_36[16] ATTRIBUTE_ALIGN(32)= -{ - 0, // DI_EmulateCmd - 0, - 0x2022DDAC, // dvd_read_controlling_data - 0x20201010+1, // handle_di_cmd_reentry (thumb) - 0x20200b9c+1, // ios_shared_alloc_aligned (thumb) - 0x20200b70+1, // ios_shared_free (thumb) - 0x20205dc0+1, // ios_memcpy (thumb) - 0x20200048+1, // ios_fatal_di_error (thumb) - 0x20202b4c+1, // ios_doReadHashEncryptedState (thumb) - 0x20203934+1, // ios_printf (thumb) -}; - -static u32 ios_38[16] ATTRIBUTE_ALIGN(32)= -{ - 0, // DI_EmulateCmd - 0, - 0x2022cdac, // dvd_read_controlling_data - 0x20200d38+1, // handle_di_cmd_reentry (thumb) - 0x202008c4+1, // ios_shared_alloc_aligned (thumb) - 0x20200898+1, // ios_shared_free (thumb) - 0x20205b80+1, // ios_memcpy (thumb) - 0x20200048+1, // ios_fatal_di_error (thumb) - 0x20202874+1, // ios_doReadHashEncryptedState (thumb) - 0x2020365c+1, // ios_printf (thumb) -}; - - -static u32 ios_37[16] ATTRIBUTE_ALIGN(32)= -{ - 0, // DI_EmulateCmd - 0, - 0x2022DD60, // dvd_read_controlling_data - 0x20200F04+1, // handle_di_cmd_reentry (thumb) - 0x2020096C+1, // ios_shared_alloc_aligned (thumb) - 0x2020093C+1, // ios_shared_free (thumb) - 0x20205E54+1, // ios_memcpy (thumb) - 0x20200048+1, // ios_fatal_di_error (thumb) - 0x20202A70+1, // ios_doReadHashEncryptedState (thumb) - 0x2020387C+1, // ios_printf (thumb) -}; - -static u32 ios_57[16] ATTRIBUTE_ALIGN(32)= -{ - 0, // DI_EmulateCmd - 0, - 0x2022cd60, // dvd_read_controlling_data - 0x20200f04+1, // handle_di_cmd_reentry (thumb) - 0x2020096c+1, // ios_shared_alloc_aligned (thumb) // no usado - 0x2020093C+1, // ios_shared_free (thumb) // no usado - 0x20205EF0+1, // ios_memcpy (thumb) - 0x20200048+1, // ios_fatal_di_error (thumb) - 0x20202944+1, // ios_doReadHashEncryptedState (thumb) - 0x20203750+1, // ios_printf (thumb) -}; - -static u32 ios_60[16] ATTRIBUTE_ALIGN(32)= -{ - 0, // DI_EmulateCmd - 0, - 0x2022cd60, // dvd_read_controlling_data - 0x20200f04+1, // handle_di_cmd_reentry (thumb) - 0x2020096c+1, // ios_shared_alloc_aligned (thumb) // no usado - 0x2020093C+1, // ios_shared_free (thumb) // no usado - 0x20205e00+1, // ios_memcpy (thumb) - 0x20200048+1, // ios_fatal_di_error (thumb) - 0x20202944+1, // ios_doReadHashEncryptedState (thumb) - 0x20203750+1, // ios_printf (thumb) -}; - - -static u32 patch_datas[8] ATTRIBUTE_ALIGN(32); -static int my_thread_id = 0; -static data_elf my_data_elf; -static u8 * dip_plugin = NULL; -static u32 dip_plugin_size = 0; - -int load_modules(const u8 * ehcmodule, int ehcmodule_size, const u8 * dip, int dip_size) -{ - if(mload_init() < 0) - return -1; - - dip_plugin = (u8 *) dip; - dip_plugin_size = dip_size; - - mload_elf((u8 *) ehcmodule, &my_data_elf); - my_thread_id= mload_run_thread(my_data_elf.start, my_data_elf.stack, my_data_elf.size_stack, my_data_elf.prio); - - if(my_thread_id < 0) - return -2; - usleep(350*1000); - - // Test for IOS - int is_ios = mload_get_IOS_base(); - u32 dip_address = 0x1377C000; - - switch(is_ios) - { - - case 36: - - memcpy(ios_36, dip_plugin, 4); // copy the entry_point - memcpy(dip_plugin, ios_36, 4*10); // copy the adresses from the array - - mload_seek(dip_address, SEEK_SET); // copy dip_plugin in the starlet - mload_write(dip_plugin, dip_plugin_size); - - // enables DIP plugin - mload_seek(0x20209040, SEEK_SET); - mload_write(ios_36, 4); - break; - - case 37: - - memcpy(ios_37, dip_plugin, 4); // copy the entry_point - memcpy(dip_plugin, ios_37, 4*10); // copy the adresses from the array - - mload_seek(dip_address, SEEK_SET); // copy dip_plugin in the starlet - mload_write(dip_plugin,dip_plugin_size); - - // enables DIP plugin - mload_seek(0x20209030, SEEK_SET); - mload_write(ios_37, 4); - break; - - case 38: - - memcpy(ios_38, dip_plugin, 4); // copy the entry_point - memcpy(dip_plugin, ios_38, 4*10); // copy the adresses from the array - - mload_seek(dip_address, SEEK_SET); // copy dip_plugin in the starlet - mload_write(dip_plugin,dip_plugin_size); - - // enables DIP plugin - mload_seek(0x20208030, SEEK_SET); - mload_write(ios_38, 4); - break; - - case 57: - - memcpy(ios_57, dip_plugin, 4); // copy the entry_point - memcpy(dip_plugin, ios_57, 4*10); // copy the adresses from the array - - mload_seek(dip_address, SEEK_SET); // copy dip_plugin in the starlet - mload_write(dip_plugin,dip_plugin_size); - - // enables DIP plugin - mload_seek(0x20208030, SEEK_SET); - mload_write(ios_57, 4); - break; - - case 60: - - memcpy(ios_60, dip_plugin, 4); // copy the entry_point - memcpy(dip_plugin, ios_60, 4*10); // copy the adresses from the array - - mload_seek(dip_address, SEEK_SET); // copy dip_plugin in the starlet - mload_write(dip_plugin,dip_plugin_size); - - // enables DIP plugin - mload_seek(0x20208030, SEEK_SET); - mload_write(ios_60, 4); - break; - - } - mload_close(); - return 0; -} - -void enable_ES_ioctlv_vector(void) -{ - mload_init(); - patch_datas[0]=*((u32 *) (dip_plugin+16*4)); - mload_set_ES_ioctlv_vector((void *) patch_datas[0]); - mload_close(); -} - -void Set_DIP_BCA_Datas(u8 *bca_data) -{ - // write in dip_plugin bca data area - mload_init(); - mload_seek(*((u32 *) (dip_plugin+15*4)), SEEK_SET); // offset 15 (bca_data area) - mload_write(bca_data, 64); - mload_close(); -} - -u8 *search_for_ehcmodule_cfg(u8 *p, int size) -{ - int n; - - for(n=0;n= 5 && mload_get_version() >= v51) - { - char fs[] ATTRIBUTE_ALIGN(32) = "/dev/mload/OFF"; - // shadow /dev/mload supported in hermes cios v5.1char fs[] ATTRIBUTE_ALIGN(32) = "/dev/usb2"; - IOS_Open(fs,0); - return true; - } - return false; -} diff --git a/source/mload/mload_modules.h b/source/mload/mload_modules.h deleted file mode 100644 index 74e4f64b..00000000 --- a/source/mload/mload_modules.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef _MLOAD_MODULES_H_ -#define _MLOAD_MODULES_H_ - -#include "mload.h" - -#ifdef __cplusplus -extern "C" { -#endif - -int load_modules(const u8 * ehcmodule, int ehcmodule_size, const u8 * dip_plugin, int dip_plugin_size); -void enable_ES_ioctlv_vector(void); -void Set_DIP_BCA_Datas(u8 *bca_data); -void disableIOSReload(void); -u8 *search_for_ehcmodule_cfg(u8 *p, int size); -bool shadow_mload(); - -#ifdef __cplusplus -} -#endif - -#endif - - diff --git a/source/mload/modules/dip_plugin_249.c b/source/mload/modules/dip_plugin_249.c deleted file mode 100644 index 4f6b211b..00000000 --- a/source/mload/modules/dip_plugin_249.c +++ /dev/null @@ -1,338 +0,0 @@ -#define size_dip_plugin_249 5340 - -unsigned char dip_plugin_249[5340] __attribute__((aligned (32)))={ - 0x7f, 0x45, 0x4c, 0x46, 0x01, 0x02, 0x01, 0x61, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x28, 0x00, 0x00, 0x00, 0x01, 0x13, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x34, 0x00, 0x20, 0x00, 0x05, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xa0, 0x00, 0xf0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x34, 0x00, 0xf0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0xd4, 0x00, 0xf0, 0x00, 0x00, - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x08, 0x13, 0x70, 0x00, 0x00, - 0x13, 0x70, 0x00, 0x00, 0x00, 0x00, 0x12, 0xe4, 0x00, 0x00, 0x12, 0xe4, 0x00, 0xf0, 0x00, 0x05, - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x13, 0xec, 0x13, 0x70, 0x20, 0x00, - 0x13, 0x70, 0x20, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0xbd, 0xc0, 0x00, 0xf0, 0x00, 0x06, - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x06, - 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x09, 0x13, 0x70, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x7d, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x7f, 0x13, 0x70, 0xdd, 0xc0, 0xe3, 0xa0, 0x00, 0x00, 0xe3, 0xa0, 0x10, 0x00, - 0xe5, 0x9f, 0x30, 0x00, 0xe1, 0x2f, 0xff, 0x13, 0x13, 0x70, 0x03, 0x8d, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb5, 0xf0, 0xb0, 0x89, 0x1c, 0x0d, 0x1c, 0x06, - 0x1c, 0x17, 0x46, 0x68, 0x22, 0x20, 0x21, 0x00, 0xf0, 0x01, 0xf9, 0x0e, 0x23, 0xa8, 0x06, 0x1b, - 0x1c, 0x30, 0x1c, 0x29, 0x93, 0x00, 0x95, 0x01, 0x97, 0x02, 0xf0, 0x00, 0xed, 0x82, 0x1c, 0x31, - 0x1c, 0x2a, 0x46, 0x68, 0xf0, 0x00, 0xf9, 0x0b, 0xb0, 0x09, 0xbd, 0xf0, 0xb5, 0xf0, 0xb0, 0x8d, - 0x90, 0x01, 0x0a, 0xcb, 0x20, 0xa0, 0x27, 0xd0, 0x1c, 0x0d, 0x92, 0x03, 0x93, 0x02, 0x02, 0x00, - 0x26, 0x00, 0xac, 0x04, 0x06, 0x3f, 0xe0, 0x13, 0x22, 0x20, 0x21, 0x00, 0x1c, 0x20, 0xf0, 0x01, - 0xf8, 0xeb, 0x9b, 0x02, 0x98, 0x01, 0x60, 0xe3, 0x9b, 0x03, 0x1c, 0x29, 0x61, 0x23, 0x60, 0x27, - 0xf0, 0x00, 0xed, 0x5e, 0x1c, 0x20, 0x99, 0x01, 0x1c, 0x2a, 0xf0, 0x00, 0xf8, 0xe8, 0x36, 0x01, - 0x23, 0x0f, 0x42, 0xb3, 0xd3, 0x01, 0x28, 0x00, 0xd1, 0xe6, 0xb0, 0x0d, 0xbd, 0xf0, 0xb5, 0xf0, - 0xb0, 0x83, 0x24, 0x80, 0x93, 0x01, 0x01, 0x24, 0x18, 0x53, 0x90, 0x00, 0x1c, 0x0f, 0x1c, 0x16, - 0x42, 0xa3, 0xd8, 0x15, 0x1c, 0x20, 0x21, 0x20, 0xf0, 0x00, 0xe8, 0xa2, 0x1e, 0x05, 0xd0, 0x11, - 0x1c, 0x21, 0x1c, 0x28, 0x9a, 0x01, 0xf7, 0xff, 0xff, 0xc1, 0x1e, 0x04, 0xd1, 0x04, 0x19, 0xa9, - 0x98, 0x00, 0x1c, 0x3a, 0xf0, 0x01, 0xf8, 0x76, 0x1c, 0x28, 0xf0, 0x00, 0xe8, 0x9e, 0xe0, 0x03, - 0x24, 0x65, 0xe0, 0x00, 0x24, 0x16, 0x42, 0x64, 0xb0, 0x03, 0x1c, 0x20, 0xbd, 0xf0, 0x00, 0x00, - 0xb5, 0x10, 0x1c, 0x03, 0x1c, 0x0c, 0x48, 0x0a, 0x1c, 0x19, 0x22, 0x20, 0xf0, 0x01, 0xf8, 0x62, - 0x4b, 0x08, 0x68, 0x1b, 0x07, 0xda, 0xd4, 0x09, 0x2c, 0x00, 0xd0, 0x04, 0x1c, 0x20, 0x49, 0x04, - 0x22, 0x20, 0xf0, 0x01, 0xf8, 0x57, 0x4b, 0x04, 0x68, 0x18, 0xbd, 0x10, 0xe7, 0xfe, 0x46, 0xc0, - 0x0d, 0x00, 0x60, 0x00, 0x0d, 0x00, 0x60, 0x1c, 0x0d, 0x00, 0x60, 0x20, 0xb5, 0x00, 0x23, 0xe3, - 0xb0, 0x89, 0x06, 0x1b, 0x93, 0x00, 0x46, 0x68, 0x23, 0x00, 0x21, 0x00, 0x22, 0x00, 0x93, 0x01, - 0x93, 0x02, 0xf0, 0x00, 0xf8, 0x8c, 0xb0, 0x09, 0xbd, 0x00, 0xb5, 0xf0, 0xb0, 0x87, 0x92, 0x02, - 0x0a, 0x56, 0x23, 0xff, 0x22, 0x80, 0x01, 0x12, 0x03, 0xdb, 0x90, 0x05, 0x91, 0x04, 0x20, 0x00, - 0x27, 0x00, 0x92, 0x00, 0x93, 0x03, 0xe0, 0x30, 0x9a, 0x04, 0x02, 0x73, 0x1b, 0xd4, 0x9a, 0x02, - 0x25, 0x00, 0x42, 0x9a, 0xd9, 0x01, 0x1a, 0xd5, 0x00, 0xad, 0x9b, 0x05, 0x22, 0x80, 0x19, 0xdb, - 0x1c, 0x18, 0x1c, 0x21, 0x01, 0x12, 0x93, 0x01, 0xf0, 0x00, 0xf8, 0x7e, 0x28, 0x00, 0xd0, 0x01, - 0x2d, 0x00, 0xd0, 0x0b, 0x9a, 0x00, 0x19, 0x2b, 0x42, 0x93, 0xd9, 0x00, 0x1b, 0x54, 0x98, 0x01, - 0x1c, 0x21, 0x1c, 0x2a, 0x1c, 0x33, 0xf7, 0xff, 0xff, 0x7a, 0xe0, 0x0a, 0x9b, 0x03, 0x1c, 0x04, - 0x42, 0x98, 0xd9, 0x01, 0x24, 0xff, 0x03, 0xe4, 0x98, 0x01, 0x1c, 0x21, 0x1c, 0x32, 0xf7, 0xff, - 0xff, 0x45, 0x19, 0x65, 0x0a, 0xed, 0x19, 0x76, 0x19, 0x3f, 0x9a, 0x04, 0x42, 0x97, 0xd3, 0xcb, - 0xb0, 0x07, 0xbd, 0xf0, 0xb5, 0x08, 0xf7, 0xff, 0xff, 0x1f, 0xbd, 0x08, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe9, 0x2d, 0x40, 0x80, 0xe5, 0x9f, 0x70, 0x7c, - 0xe5, 0x97, 0x70, 0x00, 0xeb, 0x00, 0x00, 0x13, 0xe8, 0xbd, 0x40, 0x80, 0xe1, 0x2f, 0xff, 0x1e, - 0xe9, 0x2d, 0x40, 0x80, 0xe5, 0x9f, 0x70, 0x68, 0xe5, 0x97, 0x70, 0x00, 0xeb, 0x00, 0x00, 0x0d, - 0xe8, 0xbd, 0x40, 0x80, 0xe1, 0x2f, 0xff, 0x1e, 0xe9, 0x2d, 0x40, 0x80, 0xe5, 0x9f, 0x70, 0x54, - 0xe5, 0x97, 0x70, 0x00, 0xeb, 0x00, 0x00, 0x07, 0xe8, 0xbd, 0x40, 0x80, 0xe1, 0x2f, 0xff, 0x1e, - 0xe9, 0x2d, 0x40, 0x80, 0xe5, 0x9f, 0x70, 0x40, 0xe5, 0x97, 0x70, 0x00, 0xeb, 0x00, 0x00, 0x01, - 0xe8, 0xbd, 0x40, 0x80, 0xe1, 0x2f, 0xff, 0x1e, 0xe1, 0x2f, 0xff, 0x17, 0xb5, 0xf0, 0x46, 0x57, - 0x46, 0x46, 0xb4, 0xc0, 0x68, 0x05, 0x46, 0x8a, 0x4b, 0x09, 0x68, 0x1b, 0x47, 0x18, 0xb5, 0xf0, - 0x46, 0x5f, 0x46, 0x56, 0x46, 0x4d, 0x46, 0x44, 0xb4, 0xf0, 0x4b, 0x06, 0x68, 0x1b, 0x47, 0x18, - 0x13, 0x70, 0x21, 0x14, 0x13, 0x70, 0x21, 0x20, 0x13, 0x70, 0x21, 0x24, 0x13, 0x70, 0x21, 0x28, - 0x13, 0x70, 0x21, 0x18, 0x13, 0x70, 0x21, 0x1c, 0xb5, 0x30, 0x1c, 0x03, 0x20, 0x00, 0x06, 0xdc, - 0xd1, 0x17, 0x48, 0x0c, 0x24, 0x00, 0x42, 0x83, 0xd8, 0x02, 0x24, 0xc0, 0x04, 0x64, 0x1a, 0xe4, - 0x20, 0xf0, 0x06, 0x00, 0x18, 0x1d, 0x48, 0x08, 0x42, 0x85, 0xd8, 0x01, 0x4c, 0x07, 0x1a, 0xe4, - 0x20, 0x00, 0x42, 0x94, 0xd3, 0x03, 0x1c, 0x20, 0x42, 0x8c, 0xd9, 0x00, 0x1c, 0x08, 0x3a, 0x01, - 0x43, 0x90, 0xbd, 0x30, 0x01, 0x7f, 0xff, 0xff, 0x03, 0x61, 0x7f, 0xff, 0x13, 0x61, 0x80, 0x00, - 0xb5, 0x08, 0x21, 0x00, 0xf0, 0x00, 0xeb, 0xf4, 0x4b, 0x03, 0x60, 0x18, 0x1e, 0x43, 0x43, 0x03, - 0x17, 0xdb, 0x40, 0x18, 0xbd, 0x08, 0x46, 0xc0, 0x13, 0x70, 0x20, 0x00, 0xb5, 0x08, 0x4b, 0x05, - 0x68, 0x18, 0x28, 0x00, 0xdb, 0x01, 0xf0, 0x00, 0xeb, 0xe8, 0x4a, 0x02, 0x23, 0x01, 0x42, 0x5b, - 0x60, 0x13, 0xbd, 0x08, 0x13, 0x70, 0x20, 0x00, 0xb5, 0x70, 0x4c, 0x0a, 0x1c, 0x05, 0x1c, 0x0e, - 0x68, 0x20, 0x00, 0x91, 0x22, 0x00, 0xf0, 0x00, 0xeb, 0xe4, 0x28, 0x00, 0xdb, 0x08, 0x68, 0x20, - 0x1c, 0x29, 0x1c, 0x32, 0xf0, 0x00, 0xeb, 0xd4, 0x1e, 0x43, 0x43, 0x03, 0x17, 0xdb, 0x40, 0x18, - 0xbd, 0x70, 0x46, 0xc0, 0x13, 0x70, 0x20, 0x00, 0xb5, 0x10, 0xf0, 0x00, 0xec, 0x32, 0xf0, 0x00, - 0xec, 0x36, 0x1c, 0x04, 0x20, 0x01, 0x42, 0x40, 0xf0, 0x00, 0xec, 0x34, 0x4b, 0x04, 0x68, 0x58, - 0xf0, 0x00, 0xf8, 0x22, 0x1c, 0x20, 0xf0, 0x00, 0xec, 0x2e, 0x20, 0x00, 0xbd, 0x10, 0x46, 0xc0, - 0x13, 0x70, 0x21, 0x00, 0xb5, 0x08, 0x48, 0x05, 0xf0, 0x00, 0xfb, 0x32, 0x48, 0x04, 0x21, 0x00, - 0x22, 0x00, 0xf0, 0x00, 0xfb, 0x23, 0x20, 0x00, 0xbd, 0x08, 0x46, 0xc0, 0x13, 0x70, 0x21, 0x00, - 0x13, 0x70, 0x03, 0x41, 0xb5, 0x08, 0x48, 0x03, 0xf0, 0x00, 0xeb, 0xea, 0xf7, 0xff, 0xff, 0xea, - 0xbd, 0x08, 0x46, 0xc0, 0x13, 0x70, 0x20, 0xa8, 0xb5, 0x10, 0x4b, 0x41, 0x42, 0x98, 0xd0, 0x32, - 0x42, 0x98, 0xd8, 0x03, 0x4b, 0x3f, 0x42, 0x98, 0xd1, 0x79, 0xe0, 0x06, 0x4b, 0x3e, 0x42, 0x98, - 0xd0, 0x4f, 0x4b, 0x3e, 0x42, 0x98, 0xd1, 0x72, 0xe0, 0x4b, 0x48, 0x3d, 0x4c, 0x3d, 0x21, 0x04, - 0x60, 0x04, 0xf0, 0x00, 0xeb, 0xea, 0x4b, 0x3c, 0x48, 0x3c, 0x21, 0x04, 0x60, 0x03, 0xf0, 0x00, - 0xeb, 0xe4, 0x48, 0x3b, 0x21, 0x04, 0x60, 0x04, 0xf0, 0x00, 0xeb, 0xde, 0x4b, 0x39, 0x48, 0x3a, - 0x21, 0x04, 0x60, 0x03, 0xf0, 0x00, 0xeb, 0xd8, 0x4b, 0x38, 0x4a, 0x39, 0x60, 0x1a, 0x4a, 0x39, - 0x60, 0x5a, 0x4a, 0x39, 0x60, 0x9a, 0x4a, 0x39, 0x60, 0xda, 0x3a, 0x30, 0x61, 0x1a, 0x4a, 0x38, - 0x61, 0x5a, 0x4a, 0x38, 0xe0, 0x4a, 0x48, 0x38, 0x4c, 0x2a, 0x21, 0x04, 0x60, 0x04, 0xf0, 0x00, - 0xeb, 0xc4, 0x4b, 0x29, 0x48, 0x35, 0x21, 0x04, 0x60, 0x03, 0xf0, 0x00, 0xeb, 0xbe, 0x48, 0x34, - 0x21, 0x04, 0x60, 0x04, 0xf0, 0x00, 0xeb, 0xb8, 0x4b, 0x26, 0x48, 0x32, 0x21, 0x04, 0x60, 0x03, - 0xf0, 0x00, 0xeb, 0xb2, 0x4b, 0x25, 0x4a, 0x30, 0x60, 0x1a, 0x4a, 0x30, 0x60, 0x5a, 0x4a, 0x30, - 0x60, 0x9a, 0x4a, 0x30, 0x60, 0xda, 0x3a, 0x2c, 0x61, 0x1a, 0x4a, 0x2f, 0x61, 0x5a, 0x4a, 0x2f, - 0xe0, 0x24, 0x48, 0x17, 0x4c, 0x17, 0x21, 0x04, 0x60, 0x04, 0xf0, 0x00, 0xeb, 0x9e, 0x4b, 0x16, - 0x48, 0x16, 0x21, 0x04, 0x60, 0x03, 0xf0, 0x00, 0xeb, 0x98, 0x48, 0x15, 0x21, 0x04, 0x60, 0x04, - 0xf0, 0x00, 0xeb, 0x92, 0x4b, 0x13, 0x48, 0x14, 0x21, 0x04, 0x60, 0x03, 0xf0, 0x00, 0xeb, 0x8c, - 0x4b, 0x12, 0x4a, 0x23, 0x60, 0x1a, 0x4a, 0x13, 0x60, 0x5a, 0x4a, 0x13, 0x60, 0x9a, 0x4a, 0x13, - 0x60, 0xda, 0x3a, 0x30, 0x61, 0x1a, 0x4a, 0x1f, 0x61, 0x5a, 0x4a, 0x1f, 0x61, 0x9a, 0xbd, 0x10, - 0x48, 0x88, 0xe1, 0x4c, 0x48, 0x77, 0x6f, 0x72, 0x49, 0x2a, 0xca, 0x9d, 0x4a, 0x26, 0x2a, 0xf5, - 0x20, 0x20, 0x04, 0x00, 0x4b, 0x00, 0x47, 0x18, 0x13, 0x70, 0x09, 0x45, 0x20, 0x20, 0x04, 0x04, - 0x20, 0x20, 0x0e, 0xf8, 0x13, 0x70, 0x06, 0x55, 0x20, 0x20, 0x0e, 0xfc, 0x13, 0x70, 0x21, 0x14, - 0x20, 0x20, 0x2a, 0x71, 0x20, 0x20, 0x04, 0x0d, 0x20, 0x20, 0x0f, 0x05, 0x20, 0x20, 0x09, 0x6d, - 0x20, 0x20, 0x38, 0x7d, 0x20, 0x22, 0xdd, 0x60, 0x20, 0x20, 0x03, 0xb8, 0x20, 0x20, 0x03, 0xbc, - 0x20, 0x20, 0x0d, 0x2c, 0x20, 0x20, 0x0d, 0x30, 0x20, 0x20, 0x28, 0x75, 0x20, 0x20, 0x03, 0xc5, - 0x20, 0x20, 0x0d, 0x39, 0x20, 0x20, 0x08, 0xc5, 0x20, 0x20, 0x36, 0x5d, 0x20, 0x22, 0xcd, 0xac, - 0x20, 0x20, 0x29, 0x45, 0x20, 0x20, 0x37, 0x51, 0x20, 0x22, 0xcd, 0x60, 0xb5, 0x00, 0x4b, 0x0b, - 0x68, 0x5b, 0x2b, 0x01, 0xd0, 0x02, 0x2b, 0x02, 0xd1, 0x0c, 0xe0, 0x01, 0x4a, 0x08, 0xe0, 0x00, - 0x4a, 0x08, 0x23, 0x00, 0x42, 0x90, 0xd3, 0x06, 0x4b, 0x04, 0x4a, 0x07, 0x61, 0x1a, 0x23, 0xa0, - 0x02, 0x1b, 0xe0, 0x00, 0x23, 0x00, 0x1c, 0x18, 0xbd, 0x00, 0x46, 0xc0, 0x13, 0x70, 0x21, 0x30, - 0x46, 0x09, 0x00, 0x00, 0x7e, 0xd3, 0x80, 0x00, 0x00, 0x05, 0x21, 0x00, 0xb5, 0x70, 0x1c, 0x04, - 0x1c, 0x10, 0x1c, 0x0d, 0x1c, 0x16, 0xf7, 0xff, 0xff, 0xd9, 0x28, 0x00, 0xd1, 0x25, 0x4b, 0x13, - 0x68, 0xd9, 0x68, 0x9a, 0x68, 0x1b, 0x18, 0x8a, 0x19, 0x92, 0x06, 0xd9, 0xd5, 0x04, 0x1c, 0x20, - 0x1c, 0x29, 0xf0, 0x00, 0xfd, 0xd5, 0xe0, 0x18, 0x07, 0x19, 0xd5, 0x04, 0x1c, 0x20, 0x1c, 0x29, - 0xf7, 0xff, 0xfe, 0xba, 0xe0, 0x11, 0x07, 0x59, 0xd5, 0x04, 0x1c, 0x20, 0x1c, 0x29, 0xf0, 0x00, - 0xfb, 0x55, 0xe0, 0x0a, 0x07, 0xd9, 0xd5, 0x04, 0x1c, 0x20, 0x1c, 0x29, 0xf7, 0xff, 0xfd, 0xcd, - 0xe0, 0x03, 0x1c, 0x20, 0x1c, 0x29, 0xf7, 0xff, 0xfe, 0x0d, 0xbd, 0x70, 0x13, 0x70, 0x21, 0x30, - 0xb5, 0x10, 0x22, 0x00, 0x1c, 0x04, 0xf7, 0xff, 0xff, 0xc9, 0x28, 0x00, 0xdb, 0x0d, 0x69, 0xa2, - 0x4b, 0x06, 0x42, 0x9a, 0xd1, 0x09, 0x4b, 0x06, 0x21, 0x01, 0x68, 0x1a, 0x70, 0x11, 0x68, 0x1b, - 0x78, 0x5b, 0x2b, 0x00, 0xd1, 0x01, 0xf7, 0xff, 0xee, 0x00, 0xbd, 0x10, 0x5d, 0x1c, 0x9e, 0xa3, - 0x13, 0x70, 0x21, 0x2c, 0xb5, 0x10, 0x20, 0x80, 0x01, 0x00, 0x21, 0x20, 0xf7, 0xff, 0xee, 0x00, - 0x1e, 0x04, 0xd0, 0x0f, 0x21, 0x80, 0x22, 0xa0, 0x1c, 0x20, 0x01, 0x09, 0x05, 0xd2, 0xf7, 0xff, - 0xff, 0xa5, 0x1e, 0x43, 0x41, 0x98, 0x23, 0x02, 0x1a, 0x18, 0x4b, 0x03, 0x60, 0x58, 0x1c, 0x20, - 0xf7, 0xff, 0xed, 0xfa, 0xbd, 0x10, 0x46, 0xc0, 0x13, 0x70, 0x21, 0x30, 0x4b, 0x06, 0x21, 0x03, - 0x68, 0x1a, 0x43, 0x8a, 0x60, 0x1a, 0x22, 0x00, 0x60, 0x9a, 0x60, 0xda, 0x60, 0x5a, 0x61, 0x1a, - 0x61, 0x5a, 0x61, 0x9a, 0x47, 0x70, 0x46, 0xc0, 0x13, 0x70, 0x21, 0x30, 0xb5, 0xf0, 0xb0, 0x83, - 0x78, 0x03, 0x1c, 0x06, 0x1c, 0x0f, 0x92, 0x00, 0x2b, 0xe0, 0xd1, 0x00, 0xe0, 0xd4, 0x4c, 0xb4, - 0x22, 0x00, 0x61, 0x22, 0x2b, 0xe4, 0xd1, 0x00, 0xe0, 0xb5, 0x2b, 0xe4, 0xd8, 0x2a, 0x2b, 0xa8, - 0xd1, 0x00, 0xe0, 0x98, 0x2b, 0xa8, 0xd8, 0x10, 0x2b, 0x8a, 0xd0, 0x51, 0x2b, 0x8a, 0xd8, 0x05, - 0x2b, 0x70, 0xd0, 0x60, 0x2b, 0x71, 0xd0, 0x00, 0xe1, 0x48, 0xe0, 0x81, 0x2b, 0x8d, 0xd1, 0x00, - 0xe0, 0x89, 0x2b, 0xa4, 0xd0, 0x00, 0xe1, 0x41, 0xe0, 0xa4, 0x2b, 0xd9, 0xd1, 0x00, 0xe0, 0x8d, - 0x2b, 0xd9, 0xd8, 0x06, 0x2b, 0xab, 0xd1, 0x00, 0xe0, 0x95, 0x2b, 0xd0, 0xd0, 0x00, 0xe1, 0x35, - 0xe0, 0x79, 0x2b, 0xdb, 0xd1, 0x00, 0xe0, 0xa0, 0x2b, 0xdb, 0xd3, 0x7b, 0x2b, 0xe0, 0xd0, 0x00, - 0xe1, 0x2c, 0xe0, 0xa1, 0x2b, 0xf6, 0xd1, 0x00, 0xe1, 0x1e, 0x2b, 0xf6, 0xd8, 0x12, 0x2b, 0xf2, - 0xd1, 0x00, 0xe0, 0xaa, 0x2b, 0xf2, 0xd8, 0x06, 0x2b, 0xf0, 0xd1, 0x00, 0xe0, 0xa0, 0x2b, 0xf1, - 0xd0, 0x00, 0xe1, 0x1b, 0xe0, 0x9f, 0x2b, 0xf4, 0xd1, 0x00, 0xe0, 0xad, 0x2b, 0xf4, 0xd9, 0x00, - 0xe0, 0xbf, 0xe0, 0xa6, 0x2b, 0xf9, 0xd1, 0x00, 0xe0, 0xd7, 0x2b, 0xf9, 0xd8, 0x06, 0x2b, 0xf7, - 0xd1, 0x00, 0xe0, 0xb9, 0x2b, 0xf8, 0xd0, 0x00, 0xe1, 0x08, 0xe0, 0xca, 0x2b, 0xfb, 0xd1, 0x00, - 0xe0, 0xf3, 0x2b, 0xfb, 0xd2, 0x00, 0xe0, 0xed, 0x2b, 0xff, 0xd0, 0x00, 0xe0, 0xfe, 0xe0, 0xf6, - 0x69, 0xa3, 0x25, 0x00, 0x2b, 0x00, 0xd0, 0x00, 0xe0, 0xff, 0xf7, 0xff, 0xff, 0x7f, 0x68, 0x22, - 0x23, 0x1c, 0x42, 0x1a, 0xd1, 0x00, 0xe0, 0xf1, 0xf7, 0xff, 0xfc, 0xf8, 0x69, 0x62, 0x23, 0x04, - 0x43, 0x13, 0x61, 0x63, 0xe0, 0xf1, 0x68, 0xa3, 0x68, 0xe2, 0x25, 0x00, 0x43, 0x1a, 0x92, 0x01, - 0x68, 0x22, 0x23, 0x1c, 0x42, 0x1a, 0xd1, 0x09, 0x9a, 0x00, 0xf7, 0xff, 0xfd, 0x80, 0x1e, 0x05, - 0xd0, 0x04, 0x4b, 0x73, 0x22, 0x01, 0x68, 0x19, 0x43, 0x0a, 0x60, 0x1a, 0x4b, 0x70, 0x68, 0x1a, - 0x23, 0x1d, 0x40, 0x13, 0x9a, 0x01, 0x43, 0x1a, 0xd0, 0x04, 0x1c, 0x38, 0x99, 0x00, 0xf7, 0xff, - 0xff, 0x1f, 0x1c, 0x05, 0x2d, 0x00, 0xd0, 0x00, 0xe0, 0xcf, 0xf7, 0xff, 0xff, 0x33, 0xe0, 0xcc, - 0x68, 0x23, 0x07, 0x9a, 0xd4, 0x00, 0xe0, 0xc1, 0x68, 0x41, 0x68, 0x82, 0x1c, 0x38, 0xf7, 0xff, - 0xfe, 0xdd, 0x1c, 0x05, 0xe0, 0xc1, 0x68, 0x71, 0x68, 0xb2, 0x2b, 0xd0, 0xd1, 0xf6, 0x02, 0xc9, - 0x02, 0x52, 0xe7, 0xf3, 0x1c, 0x08, 0x22, 0x40, 0x99, 0x00, 0xe7, 0xf0, 0x68, 0x22, 0x23, 0x1d, - 0x42, 0x1a, 0xd1, 0x00, 0xe0, 0xaa, 0x68, 0x43, 0x68, 0x82, 0x07, 0x9b, 0x43, 0x13, 0x0b, 0xdb, - 0x03, 0xdb, 0x60, 0xe3, 0xe0, 0xa8, 0x68, 0x22, 0x23, 0x1d, 0x25, 0x00, 0x42, 0x1a, 0xd0, 0x00, - 0xe0, 0xa3, 0xe0, 0x9b, 0x68, 0x22, 0x23, 0x1d, 0x42, 0x1a, 0xd1, 0x00, 0xe0, 0x96, 0x4a, 0x51, - 0x4b, 0x4f, 0x25, 0xa0, 0x61, 0x1a, 0x02, 0x2d, 0xe0, 0x97, 0x68, 0x21, 0x23, 0x1c, 0x42, 0x19, - 0xd1, 0x00, 0xe0, 0x8b, 0x60, 0x3a, 0xe0, 0x8f, 0x4b, 0x49, 0x22, 0x1c, 0x68, 0x19, 0x42, 0x11, - 0xd1, 0x03, 0x69, 0x1b, 0x2b, 0x00, 0xd1, 0x00, 0xe0, 0x80, 0x4b, 0x45, 0x69, 0x1b, 0xe0, 0x6a, - 0x68, 0x43, 0x60, 0xa3, 0xe0, 0x80, 0x68, 0xa3, 0xe0, 0x65, 0x68, 0x43, 0x2b, 0x00, 0xd0, 0x03, - 0x68, 0x22, 0x23, 0x02, 0x43, 0x13, 0xe0, 0x02, 0x68, 0x23, 0x22, 0x02, 0x43, 0x93, 0x60, 0x23, - 0xe0, 0x72, 0x68, 0x23, 0x22, 0x02, 0xe0, 0x2e, 0x68, 0x47, 0xf0, 0x00, 0xf9, 0xf1, 0x68, 0x23, - 0x22, 0x04, 0x43, 0x93, 0x60, 0x23, 0x25, 0x00, 0x2f, 0x00, 0xd0, 0x66, 0x1c, 0x31, 0x1e, 0x78, - 0x31, 0x08, 0xf0, 0x00, 0xf9, 0xb9, 0x1e, 0x05, 0xd1, 0x5f, 0x4b, 0x31, 0x22, 0x04, 0x68, 0x19, - 0xe0, 0x3d, 0x68, 0x23, 0x22, 0x04, 0xe0, 0x16, 0x68, 0x46, 0xf7, 0xff, 0xfd, 0x37, 0x68, 0x23, - 0x22, 0x08, 0x43, 0x93, 0x60, 0x23, 0x25, 0x00, 0x2e, 0x00, 0xd0, 0x4e, 0x1c, 0x30, 0xf0, 0x00, - 0xe9, 0x9a, 0xf7, 0xff, 0xfd, 0x1d, 0x1e, 0x05, 0xd1, 0x47, 0x4b, 0x25, 0x22, 0x08, 0x68, 0x19, - 0xe0, 0x25, 0x68, 0x23, 0x22, 0x08, 0x40, 0x13, 0xe0, 0x25, 0x68, 0x43, 0x68, 0x82, 0x93, 0x00, - 0x92, 0x01, 0x68, 0xc6, 0xf0, 0x00, 0xfa, 0xc4, 0x68, 0x23, 0x22, 0x10, 0x43, 0x93, 0x60, 0x23, - 0x9b, 0x01, 0x2b, 0x00, 0xd0, 0x30, 0x9a, 0x00, 0x2a, 0x00, 0xd0, 0x2d, 0x25, 0x00, 0x2e, 0x00, - 0xd0, 0x2b, 0x1c, 0x18, 0xf0, 0x00, 0xe9, 0x76, 0x1c, 0x32, 0x1c, 0x01, 0x98, 0x00, 0xf0, 0x00, - 0xfa, 0xd9, 0x60, 0x38, 0x28, 0x00, 0xdd, 0x20, 0x4b, 0x11, 0x22, 0x10, 0x68, 0x19, 0x43, 0x0a, - 0x60, 0x1a, 0xe0, 0x1a, 0x68, 0x23, 0x60, 0x3b, 0xe0, 0x16, 0x4b, 0x0f, 0x60, 0x0b, 0x68, 0x23, - 0x60, 0x4b, 0x68, 0x63, 0x60, 0x8b, 0xe0, 0x0f, 0x68, 0x43, 0x61, 0xa3, 0xe0, 0x0c, 0x68, 0x40, - 0xf0, 0x00, 0xe9, 0x58, 0x1c, 0x39, 0xf7, 0xff, 0xfb, 0xeb, 0xe7, 0x42, 0x1c, 0x30, 0x1c, 0x39, - 0x9a, 0x00, 0xf7, 0xff, 0xfc, 0x9c, 0xe7, 0x3c, 0x25, 0x00, 0xb0, 0x03, 0x1c, 0x28, 0xbd, 0xf0, - 0x13, 0x70, 0x21, 0x30, 0x00, 0x05, 0x31, 0x00, 0x48, 0x45, 0x4c, 0x4f, 0xb5, 0x38, 0x1c, 0x03, - 0x68, 0x1a, 0x68, 0xc0, 0x2a, 0x86, 0xd0, 0x19, 0x2a, 0x86, 0xd8, 0x04, 0x2a, 0x79, 0xd0, 0x07, - 0x2a, 0x7a, 0xd1, 0x2d, 0xe0, 0x0b, 0x2a, 0x88, 0xd0, 0x1b, 0x2a, 0x95, 0xd1, 0x28, 0xe0, 0x20, - 0x4a, 0x15, 0x20, 0x01, 0x68, 0x14, 0x22, 0x1c, 0x42, 0x14, 0xd1, 0x24, 0xe0, 0x20, 0x4a, 0x12, - 0x24, 0x1c, 0x68, 0x15, 0x42, 0x25, 0xd0, 0x1b, 0x69, 0x53, 0xe0, 0x10, 0x4a, 0x0e, 0x20, 0x1c, - 0x68, 0x14, 0x42, 0x04, 0xd0, 0x14, 0x69, 0x53, 0x21, 0x04, 0x43, 0x8b, 0x61, 0x53, 0x20, 0x01, - 0xe0, 0x11, 0x4a, 0x09, 0x68, 0x14, 0x22, 0x1c, 0x42, 0x14, 0xd0, 0x09, 0x23, 0x02, 0x60, 0x03, - 0xe7, 0xf5, 0x4a, 0x05, 0x68, 0x14, 0x22, 0x1c, 0x42, 0x14, 0xd0, 0x01, 0x23, 0x0a, 0xe7, 0xf6, - 0x1c, 0x18, 0xf7, 0xff, 0xfc, 0x4b, 0xbd, 0x38, 0x13, 0x70, 0x21, 0x30, 0xb5, 0x38, 0x1c, 0x05, - 0x1c, 0x0c, 0x1c, 0x13, 0x1c, 0x29, 0x1c, 0x22, 0x20, 0x10, 0xf0, 0x00, 0xe8, 0xf8, 0xbd, 0x38, - 0xb5, 0x08, 0x1c, 0x01, 0x22, 0x00, 0x20, 0x12, 0x23, 0x00, 0xf0, 0x00, 0xe8, 0xf0, 0xbd, 0x08, - 0xe6, 0x00, 0x00, 0x10, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x00, 0x30, 0xe1, 0x2f, 0xff, 0x1e, - 0xe6, 0x00, 0x00, 0x50, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x00, 0x70, 0xe1, 0x2f, 0xff, 0x1e, - 0xe6, 0x00, 0x00, 0x90, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x00, 0xb0, 0xe1, 0x2f, 0xff, 0x1e, - 0xe6, 0x00, 0x00, 0xd0, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x00, 0xf0, 0xe1, 0x2f, 0xff, 0x1e, - 0xe6, 0x00, 0x01, 0x10, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x01, 0x30, 0xe1, 0x2f, 0xff, 0x1e, - 0xe6, 0x00, 0x01, 0x50, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x01, 0x70, 0xe1, 0x2f, 0xff, 0x1e, - 0xe6, 0x00, 0x01, 0x90, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x01, 0xb0, 0xe1, 0x2f, 0xff, 0x1e, - 0xe6, 0x00, 0x01, 0xd0, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x01, 0xf0, 0xe1, 0x2f, 0xff, 0x1e, - 0xe6, 0x00, 0x02, 0x10, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x02, 0x30, 0xe1, 0x2f, 0xff, 0x1e, - 0xe6, 0x00, 0x02, 0x50, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x02, 0x70, 0xe1, 0x2f, 0xff, 0x1e, - 0xe6, 0x00, 0x02, 0x90, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x02, 0xb0, 0xe1, 0x2f, 0xff, 0x1e, - 0xe6, 0x00, 0x02, 0xd0, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x02, 0xf0, 0xe1, 0x2f, 0xff, 0x1e, - 0xe6, 0x00, 0x03, 0x10, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x03, 0x30, 0xe1, 0x2f, 0xff, 0x1e, - 0xe6, 0x00, 0x03, 0x50, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x03, 0x70, 0xe1, 0x2f, 0xff, 0x1e, - 0xe6, 0x00, 0x03, 0x90, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x03, 0xb0, 0xe1, 0x2f, 0xff, 0x1e, - 0xe6, 0x00, 0x03, 0xd0, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x03, 0xf0, 0xe1, 0x2f, 0xff, 0x1e, - 0xe6, 0x00, 0x04, 0x10, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x04, 0x30, 0xe1, 0x2f, 0xff, 0x1e, - 0xe6, 0x00, 0x04, 0x50, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x04, 0x70, 0xe1, 0x2f, 0xff, 0x1e, - 0xe6, 0x00, 0x04, 0x90, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x04, 0xb0, 0xe1, 0x2f, 0xff, 0x1e, - 0xe6, 0x00, 0x04, 0xd0, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x04, 0xf0, 0xe1, 0x2f, 0xff, 0x1e, - 0xe6, 0x00, 0x05, 0x10, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x05, 0x30, 0xe1, 0x2f, 0xff, 0x1e, - 0xe6, 0x00, 0x05, 0x50, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x06, 0x90, 0xe1, 0x2f, 0xff, 0x1e, - 0xe6, 0x00, 0x07, 0xf0, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x08, 0x10, 0xe1, 0x2f, 0xff, 0x1e, - 0xe6, 0x00, 0x09, 0xf0, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x0a, 0x10, 0xe1, 0x2f, 0xff, 0x1e, - 0xe1, 0xa0, 0x20, 0x0e, 0xe2, 0x90, 0x10, 0x00, 0xe3, 0xb0, 0x00, 0x04, 0xef, 0x00, 0x00, 0xab, - 0xe1, 0x2f, 0xff, 0x12, 0x00, 0x00, 0x00, 0x00, 0xe5, 0x9f, 0xc0, 0x54, 0xe5, 0x9c, 0xc0, 0x00, - 0xe1, 0xa0, 0x00, 0x00, 0xe7, 0x9c, 0xc1, 0x0b, 0xe1, 0xa0, 0x00, 0x00, 0xe1, 0x2f, 0xff, 0x1c, - 0xe3, 0xa0, 0xb0, 0x3f, 0xea, 0xff, 0xff, 0xf7, 0xe3, 0xa0, 0xb0, 0x40, 0xea, 0xff, 0xff, 0xf5, - 0xe3, 0xa0, 0x00, 0x00, 0xee, 0x07, 0x0f, 0x15, 0xe1, 0x2f, 0xff, 0x1e, 0xee, 0x13, 0x0f, 0x10, - 0xe1, 0x2f, 0xff, 0x1e, 0xee, 0x03, 0x0f, 0x10, 0xe1, 0x2f, 0xff, 0x1e, 0xef, 0x00, 0x00, 0xcc, - 0xe1, 0x2f, 0xff, 0x1e, 0xe3, 0xc0, 0x01, 0x02, 0xe1, 0x2f, 0xff, 0x1e, 0xe3, 0x80, 0x01, 0x02, - 0xe1, 0x2f, 0xff, 0x1e, 0x13, 0x70, 0x21, 0x00, 0xb5, 0x70, 0xb0, 0x82, 0x4b, 0x10, 0x00, 0x80, - 0x58, 0xc0, 0x1c, 0x0e, 0x21, 0x01, 0xf7, 0xff, 0xef, 0x6c, 0x4b, 0x0e, 0x1c, 0x05, 0x60, 0x18, - 0x28, 0x00, 0xdb, 0x11, 0x4c, 0x0c, 0x1c, 0x31, 0x1c, 0x20, 0x22, 0x06, 0xf0, 0x00, 0xfa, 0xe2, - 0x23, 0x06, 0x64, 0x63, 0x64, 0x24, 0x1c, 0x28, 0x34, 0x40, 0x49, 0x08, 0x22, 0x01, 0x23, 0x00, - 0x94, 0x00, 0xf7, 0xff, 0xef, 0x6e, 0x1c, 0x05, 0xb0, 0x02, 0x1c, 0x28, 0xbd, 0x70, 0x46, 0xc0, - 0x13, 0x70, 0x20, 0xa0, 0x13, 0x70, 0x20, 0x04, 0x13, 0x70, 0x21, 0x60, 0x57, 0x46, 0x53, 0x01, - 0xb5, 0x08, 0x4b, 0x05, 0x68, 0x18, 0x28, 0x00, 0xdb, 0x01, 0xf7, 0xff, 0xef, 0x46, 0x4a, 0x02, - 0x23, 0x01, 0x42, 0x5b, 0x60, 0x13, 0xbd, 0x08, 0x13, 0x70, 0x20, 0x04, 0xb5, 0xf0, 0xb0, 0x83, - 0x4c, 0x14, 0x23, 0x04, 0x60, 0x22, 0x1c, 0x26, 0x1c, 0x22, 0x32, 0x20, 0x36, 0x40, 0x64, 0x63, - 0x64, 0xa2, 0x64, 0xe3, 0x62, 0x21, 0x65, 0x20, 0x65, 0x61, 0x64, 0x24, 0x1c, 0x07, 0x1c, 0x0d, - 0x1c, 0x30, 0x21, 0x20, 0xf7, 0xff, 0xef, 0x68, 0x1c, 0x20, 0x21, 0x24, 0xf7, 0xff, 0xef, 0x64, - 0x4b, 0x09, 0x49, 0x0a, 0x68, 0x18, 0x22, 0x02, 0x23, 0x01, 0x96, 0x00, 0xf7, 0xff, 0xef, 0x30, - 0x1e, 0x04, 0xd1, 0x03, 0x1c, 0x38, 0x1c, 0x29, 0xf7, 0xff, 0xef, 0x52, 0xb0, 0x03, 0x1c, 0x20, - 0xbd, 0xf0, 0x46, 0xc0, 0x13, 0x70, 0x21, 0x60, 0x13, 0x70, 0x20, 0x04, 0x57, 0x46, 0x53, 0x02, - 0xb5, 0x70, 0xb0, 0x82, 0x1c, 0x03, 0x48, 0x1c, 0x68, 0x04, 0x20, 0x00, 0x2c, 0x00, 0xdb, 0x31, - 0x4e, 0x1a, 0x60, 0x33, 0x23, 0x04, 0x62, 0x73, 0x62, 0xf3, 0x6b, 0xb3, 0x60, 0x71, 0x43, 0x59, - 0x1c, 0x34, 0x1d, 0x30, 0x34, 0x20, 0x62, 0x36, 0x62, 0xb0, 0x63, 0x32, 0x63, 0x71, 0x1c, 0x25, - 0x36, 0x38, 0x68, 0x28, 0x68, 0x69, 0xf7, 0xff, 0xef, 0x30, 0x35, 0x08, 0x42, 0xb5, 0xd1, 0xf8, - 0x4d, 0x0e, 0x21, 0x18, 0x35, 0x20, 0x1c, 0x28, 0xf7, 0xff, 0xef, 0x26, 0x4b, 0x0a, 0x49, 0x0c, - 0x68, 0x18, 0x22, 0x02, 0x23, 0x01, 0x95, 0x00, 0xf7, 0xff, 0xee, 0xf2, 0x1c, 0x03, 0x20, 0x00, - 0x2b, 0x00, 0xdb, 0x07, 0x68, 0x20, 0x68, 0x61, 0xf7, 0xff, 0xef, 0x12, 0x34, 0x08, 0x42, 0xb4, - 0xd1, 0xf8, 0x20, 0x01, 0xb0, 0x02, 0xbd, 0x70, 0x13, 0x70, 0x20, 0x20, 0x13, 0x70, 0x21, 0xc0, - 0x55, 0x4d, 0x53, 0x03, 0xb5, 0x30, 0xb0, 0x83, 0x4c, 0x0e, 0x25, 0x00, 0x68, 0x23, 0x2b, 0x00, - 0xda, 0x14, 0x1c, 0x20, 0x30, 0x20, 0x21, 0x01, 0xf7, 0xff, 0xee, 0xba, 0x60, 0x20, 0x28, 0x00, - 0xdb, 0x0a, 0x22, 0x00, 0x23, 0x00, 0x49, 0x08, 0x95, 0x00, 0xf7, 0xff, 0xee, 0xca, 0x4a, 0x07, - 0x23, 0x80, 0x00, 0x9b, 0x63, 0x93, 0xe0, 0x01, 0x25, 0x0b, 0x42, 0x6d, 0xb0, 0x03, 0x1c, 0x28, - 0xbd, 0x30, 0x46, 0xc0, 0x13, 0x70, 0x20, 0x20, 0x55, 0x4d, 0x53, 0x01, 0x13, 0x70, 0x21, 0xc0, - 0xb5, 0x30, 0xb0, 0x83, 0x4c, 0x0d, 0x25, 0x00, 0x68, 0x23, 0x2b, 0x00, 0xda, 0x13, 0x1c, 0x20, - 0x30, 0x20, 0x21, 0x01, 0xf7, 0xff, 0xee, 0x94, 0x60, 0x20, 0x28, 0x00, 0xdb, 0x09, 0x23, 0x00, - 0x21, 0x01, 0x22, 0x00, 0x95, 0x00, 0xf7, 0xff, 0xee, 0xa4, 0x23, 0x80, 0x00, 0x9b, 0x63, 0x23, - 0xe0, 0x01, 0x25, 0x0b, 0x42, 0x6d, 0xb0, 0x03, 0x1c, 0x28, 0xbd, 0x30, 0x13, 0x70, 0x20, 0x60, - 0xb5, 0x70, 0xb0, 0x82, 0x4c, 0x1c, 0x1c, 0x03, 0x68, 0x25, 0x20, 0x00, 0x2d, 0x00, 0xdb, 0x31, - 0x4e, 0x1a, 0x60, 0x33, 0x23, 0x04, 0x62, 0x73, 0x62, 0xf3, 0x6b, 0x23, 0x60, 0x71, 0x43, 0x59, - 0x1c, 0x34, 0x1d, 0x30, 0x34, 0x20, 0x62, 0x36, 0x62, 0xb0, 0x63, 0x32, 0x63, 0x71, 0x1c, 0x25, - 0x36, 0x38, 0x68, 0x28, 0x68, 0x69, 0xf7, 0xff, 0xee, 0xa8, 0x35, 0x08, 0x42, 0xb5, 0xd1, 0xf8, - 0x4d, 0x0e, 0x21, 0x18, 0x35, 0x20, 0x1c, 0x28, 0xf7, 0xff, 0xee, 0x9e, 0x4b, 0x0a, 0x21, 0x02, - 0x68, 0x18, 0x22, 0x02, 0x23, 0x01, 0x95, 0x00, 0xf7, 0xff, 0xee, 0x6a, 0x1c, 0x03, 0x20, 0x00, - 0x2b, 0x00, 0xdb, 0x07, 0x68, 0x20, 0x68, 0x61, 0xf7, 0xff, 0xee, 0x8a, 0x34, 0x08, 0x42, 0xb4, - 0xd1, 0xf8, 0x20, 0x01, 0xb0, 0x02, 0xbd, 0x70, 0x13, 0x70, 0x20, 0x60, 0x13, 0x70, 0x22, 0x00, - 0x4b, 0x02, 0x22, 0x00, 0x60, 0x1a, 0x60, 0x5a, 0x60, 0x9a, 0x47, 0x70, 0x13, 0x70, 0x22, 0x40, - 0xb5, 0xf0, 0x48, 0x0f, 0x21, 0xa0, 0x68, 0x44, 0x23, 0x00, 0x30, 0x0c, 0x22, 0x00, 0x00, 0x89, - 0x03, 0xd6, 0xe0, 0x01, 0x04, 0x2b, 0x0c, 0x1b, 0x00, 0x5d, 0x18, 0xed, 0x00, 0xad, 0x19, 0x65, - 0x69, 0x6f, 0x68, 0xed, 0x19, 0x7d, 0x42, 0xae, 0xd3, 0x03, 0x68, 0x67, 0x1c, 0x5d, 0x42, 0xbd, - 0xd3, 0xf0, 0x32, 0x01, 0x80, 0x03, 0x30, 0x02, 0x42, 0x8a, 0xd1, 0xe9, 0xbd, 0xf0, 0x46, 0xc0, - 0x13, 0x70, 0x22, 0x40, 0xb5, 0xf8, 0x4b, 0x20, 0x1c, 0x06, 0x68, 0x1b, 0x1c, 0x0f, 0x1c, 0x15, - 0x2b, 0x00, 0xd0, 0x01, 0xf7, 0xff, 0xff, 0xcc, 0x1e, 0x73, 0x2b, 0x01, 0xd8, 0x2e, 0x2d, 0x00, - 0xd0, 0x2c, 0x4b, 0x1a, 0x42, 0x9d, 0xd8, 0x2b, 0x4c, 0x19, 0x2e, 0x01, 0xd1, 0x02, 0xf7, 0xff, - 0xff, 0x39, 0xe0, 0x01, 0xf7, 0xff, 0xff, 0x5c, 0x4b, 0x15, 0x60, 0xe0, 0x68, 0xd8, 0x28, 0x00, - 0xd1, 0x20, 0x4c, 0x11, 0x33, 0x10, 0x60, 0x63, 0x60, 0xa6, 0x1c, 0x38, 0x1c, 0x29, 0xf7, 0xff, - 0xee, 0x30, 0x68, 0x66, 0x21, 0x00, 0x4a, 0x0d, 0x1c, 0x30, 0xf0, 0x00, 0xf9, 0xad, 0x1c, 0x2a, - 0x1c, 0x39, 0x1c, 0x30, 0xf0, 0x00, 0xf9, 0x66, 0x1c, 0x38, 0x1c, 0x29, 0xf7, 0xff, 0xee, 0x24, - 0xf7, 0xff, 0xff, 0xa6, 0x23, 0x01, 0x60, 0x23, 0x1c, 0x28, 0xe0, 0x03, 0x20, 0x01, 0xe0, 0x00, - 0x20, 0x02, 0x42, 0x40, 0xbd, 0xf8, 0x46, 0xc0, 0x13, 0x70, 0x22, 0x40, 0x00, 0x00, 0xa4, 0x1c, - 0x13, 0x70, 0x27, 0x40, 0xb5, 0xf0, 0xb0, 0x83, 0x4d, 0x33, 0x24, 0xa0, 0x0b, 0xcf, 0x00, 0xa4, - 0x9e, 0x09, 0x62, 0xef, 0x42, 0xa7, 0xd9, 0x01, 0x4c, 0x30, 0x62, 0xec, 0x4d, 0x2e, 0x4f, 0x30, - 0x6a, 0xec, 0x46, 0x9c, 0x00, 0x64, 0x19, 0x3c, 0x89, 0xa4, 0x63, 0x2c, 0x63, 0x6c, 0x00, 0x67, - 0x68, 0x45, 0x19, 0x3f, 0x00, 0xbf, 0x95, 0x00, 0x19, 0xc7, 0x18, 0x55, 0x37, 0x0c, 0x95, 0x01, - 0xe0, 0x35, 0x68, 0x3d, 0x42, 0x8d, 0xd8, 0x18, 0x68, 0xbb, 0x18, 0xeb, 0x42, 0x8b, 0xd9, 0x2c, - 0x4f, 0x21, 0x1b, 0x4d, 0x46, 0x63, 0x63, 0x7c, 0x63, 0xbd, 0x60, 0x19, 0x00, 0x63, 0x19, 0x1c, - 0x00, 0xa4, 0x19, 0x00, 0x69, 0x03, 0x99, 0x08, 0x18, 0xeb, 0x60, 0x0b, 0x69, 0x43, 0x20, 0x00, - 0x1b, 0x5d, 0x60, 0x35, 0x42, 0x95, 0xd9, 0x2d, 0xe0, 0x15, 0x9b, 0x01, 0x42, 0x9d, 0xd2, 0x14, - 0x4f, 0x15, 0x46, 0x63, 0x1a, 0x69, 0x63, 0x7c, 0x63, 0xb9, 0x60, 0x1d, 0x00, 0x63, 0x19, 0x1c, - 0x00, 0xa4, 0x19, 0x00, 0x69, 0x03, 0x9c, 0x08, 0x1a, 0x52, 0x60, 0x23, 0x69, 0x43, 0x20, 0x00, - 0x60, 0x33, 0x42, 0x93, 0xd9, 0x16, 0x60, 0x32, 0xe0, 0x14, 0x34, 0x01, 0x37, 0x0c, 0x9d, 0x00, - 0x42, 0xac, 0xd3, 0xc6, 0x4d, 0x08, 0x18, 0x51, 0x68, 0x02, 0x46, 0x63, 0x63, 0x6c, 0x42, 0x91, - 0xd8, 0x06, 0x60, 0x19, 0x99, 0x08, 0x23, 0x00, 0x60, 0x0b, 0x20, 0x00, 0x60, 0x33, 0xe0, 0x01, - 0x20, 0x02, 0x42, 0x40, 0xb0, 0x03, 0xbd, 0xf0, 0x13, 0x70, 0xcb, 0x40, 0x00, 0x00, 0x02, 0x7f, - 0x13, 0x70, 0x22, 0x40, 0xb5, 0xf0, 0xb0, 0x85, 0x1c, 0x07, 0x1c, 0x0e, 0x92, 0x02, 0x4d, 0x28, - 0xe0, 0x43, 0x4a, 0x28, 0x4b, 0x28, 0x68, 0x50, 0x93, 0x00, 0x1c, 0x2b, 0x33, 0x44, 0x93, 0x01, - 0x1c, 0x39, 0x9a, 0x02, 0x4b, 0x25, 0xf7, 0xff, 0xff, 0x7d, 0x64, 0xa8, 0x28, 0x00, 0xd1, 0x3d, - 0x6b, 0xeb, 0x1b, 0xdb, 0x93, 0x03, 0x64, 0xeb, 0x2b, 0x00, 0xd0, 0x0b, 0x02, 0x5c, 0x1c, 0x30, - 0x1c, 0x22, 0x21, 0x00, 0xf0, 0x00, 0xf9, 0x00, 0x9a, 0x03, 0x9b, 0x02, 0x18, 0xbf, 0x1a, 0x9b, - 0x19, 0x36, 0x93, 0x02, 0x4c, 0x16, 0x6c, 0x61, 0x29, 0x00, 0xd0, 0x18, 0x4b, 0x15, 0x68, 0x9b, - 0x2b, 0x01, 0xd1, 0x04, 0x6c, 0x20, 0x1c, 0x32, 0xf7, 0xff, 0xfe, 0x22, 0xe0, 0x03, 0x6c, 0x20, - 0x1c, 0x32, 0xf7, 0xff, 0xfe, 0xa5, 0x4b, 0x0e, 0x64, 0xa0, 0x6c, 0x9a, 0x2a, 0x00, 0xd0, 0x11, - 0x6c, 0x5b, 0x02, 0x5a, 0x18, 0xb6, 0x9a, 0x02, 0x18, 0xff, 0x1a, 0xd2, 0x92, 0x02, 0x4b, 0x08, - 0x6c, 0x5a, 0x6c, 0xdb, 0x18, 0xd3, 0x2b, 0x00, 0xd0, 0x06, 0x9b, 0x02, 0x2b, 0x00, 0xd1, 0xb8, - 0x20, 0x00, 0xe0, 0x03, 0x20, 0x03, 0xe0, 0x00, 0x20, 0x04, 0x42, 0x40, 0xb0, 0x05, 0xbd, 0xf0, - 0x13, 0x70, 0xcb, 0x40, 0x13, 0x70, 0x22, 0x40, 0x13, 0x70, 0xcb, 0x80, 0x13, 0x70, 0xcb, 0x7c, - 0xb5, 0xf8, 0x24, 0x7f, 0x1c, 0x0f, 0x1c, 0x1e, 0x09, 0xc1, 0x4b, 0x17, 0x40, 0x20, 0x24, 0x80, - 0x00, 0x80, 0x00, 0xa4, 0x1a, 0x24, 0x65, 0x19, 0x65, 0x58, 0x65, 0x9c, 0x42, 0x94, 0xd9, 0x00, - 0x65, 0x9a, 0x4a, 0x11, 0x23, 0x80, 0x6d, 0x90, 0x00, 0x9b, 0x42, 0x98, 0xd1, 0x01, 0x23, 0x00, - 0x65, 0x93, 0x4c, 0x0d, 0x6d, 0xa3, 0x2b, 0x00, 0xd0, 0x10, 0x1c, 0x25, 0x35, 0x60, 0x1c, 0x08, - 0x22, 0x01, 0x1c, 0x29, 0xf7, 0xff, 0xff, 0x7e, 0x4b, 0x08, 0x66, 0x18, 0x28, 0x00, 0xd1, 0x09, - 0x6d, 0x61, 0x6d, 0xa2, 0x18, 0x69, 0x1c, 0x38, 0xf0, 0x00, 0xf8, 0x54, 0x4b, 0x02, 0x20, 0x00, - 0x6d, 0x9b, 0x60, 0x33, 0xbd, 0xf8, 0x46, 0xc0, 0x13, 0x70, 0xcb, 0x40, 0x13, 0x70, 0xcd, 0x40, - 0xb5, 0xf0, 0xb0, 0x83, 0x4c, 0x21, 0x91, 0x01, 0x1c, 0x06, 0x1c, 0x23, 0x1c, 0x10, 0x1c, 0x17, - 0x33, 0x64, 0x1c, 0x31, 0x9a, 0x01, 0xf7, 0xff, 0xff, 0xbb, 0x1c, 0x05, 0x66, 0xa0, 0x28, 0x00, - 0xd1, 0x31, 0x6e, 0x63, 0x08, 0x9a, 0x18, 0xbf, 0x9a, 0x01, 0x18, 0xf6, 0x96, 0x00, 0x1a, 0xd6, - 0x4b, 0x17, 0x42, 0x9e, 0xd9, 0x11, 0x09, 0xf8, 0x0a, 0x72, 0x66, 0xe0, 0x67, 0x22, 0x99, 0x00, - 0xf7, 0xff, 0xff, 0x48, 0x66, 0xa0, 0x28, 0x00, 0xd1, 0x19, 0x6f, 0x23, 0x01, 0xda, 0x18, 0xbf, - 0x9a, 0x00, 0x02, 0x5b, 0x18, 0xd2, 0x1a, 0xf6, 0x92, 0x00, 0x2e, 0x00, 0xd0, 0x13, 0x4c, 0x0b, - 0x1c, 0x38, 0x1c, 0x23, 0x33, 0x64, 0x99, 0x00, 0x1c, 0x32, 0xf7, 0xff, 0xff, 0x91, 0x1c, 0x05, - 0x66, 0xa0, 0x28, 0x00, 0xd1, 0x07, 0x6e, 0x63, 0x42, 0x9e, 0xd1, 0x02, 0xe0, 0x03, 0x1c, 0x05, - 0xe0, 0x01, 0x25, 0x05, 0x42, 0x6d, 0xb0, 0x03, 0x1c, 0x28, 0xbd, 0xf0, 0x13, 0x70, 0xcd, 0x40, - 0x00, 0x00, 0x01, 0xff, 0xb5, 0xf0, 0x1c, 0x05, 0x1c, 0x0e, 0x1c, 0x14, 0x2a, 0x0f, 0xd9, 0x03, - 0x1c, 0x0b, 0x43, 0x03, 0x07, 0x9f, 0xd0, 0x0a, 0x2c, 0x00, 0xd0, 0x05, 0x23, 0x00, 0x5c, 0xf2, - 0x54, 0xea, 0x33, 0x01, 0x42, 0xa3, 0xd1, 0xfa, 0xbc, 0xf0, 0xbc, 0x02, 0x47, 0x08, 0x1c, 0x15, - 0x1c, 0x0c, 0x1c, 0x03, 0x68, 0x26, 0x60, 0x1e, 0x68, 0x66, 0x60, 0x5e, 0x68, 0xa6, 0x60, 0x9e, - 0x68, 0xe6, 0x3d, 0x10, 0x60, 0xde, 0x34, 0x10, 0x33, 0x10, 0x2d, 0x0f, 0xd8, 0xf2, 0x3a, 0x10, - 0x09, 0x17, 0x1c, 0x7e, 0x01, 0x3f, 0x01, 0x36, 0x1b, 0xd7, 0x19, 0x85, 0x1c, 0x3c, 0x19, 0x8e, - 0x2f, 0x03, 0xd9, 0xd9, 0x1c, 0x34, 0x1c, 0x3b, 0x1c, 0x2a, 0xcc, 0x02, 0x3b, 0x04, 0xc2, 0x02, - 0x2b, 0x03, 0xd8, 0xfa, 0x3f, 0x04, 0x08, 0xbc, 0x1c, 0x63, 0x00, 0x9b, 0x00, 0xa4, 0x18, 0xed, - 0x18, 0xf6, 0x1b, 0x3c, 0xe7, 0xc8, 0x46, 0xc0, 0xb5, 0x70, 0x1c, 0x03, 0x07, 0x84, 0xd0, 0x0d, - 0x2a, 0x00, 0xd0, 0x40, 0x06, 0x0d, 0x3a, 0x01, 0x0e, 0x2d, 0x24, 0x03, 0xe0, 0x02, 0x2a, 0x00, - 0xd0, 0x39, 0x3a, 0x01, 0x70, 0x1d, 0x33, 0x01, 0x42, 0x23, 0xd1, 0xf8, 0x2a, 0x03, 0xd9, 0x29, - 0x25, 0xff, 0x40, 0x0d, 0x02, 0x2c, 0x43, 0x25, 0x04, 0x2c, 0x1c, 0x1e, 0x43, 0x25, 0x2a, 0x0f, - 0xd9, 0x12, 0x1c, 0x1c, 0x1c, 0x16, 0x3e, 0x10, 0x60, 0x25, 0x60, 0x65, 0x60, 0xa5, 0x60, 0xe5, - 0x34, 0x10, 0x2e, 0x0f, 0xd8, 0xf7, 0x3a, 0x10, 0x09, 0x16, 0x36, 0x01, 0x01, 0x36, 0x19, 0x9e, - 0x23, 0x0f, 0x40, 0x1a, 0x2a, 0x03, 0xd9, 0x0c, 0x1c, 0x34, 0x1c, 0x13, 0x3b, 0x04, 0xc4, 0x20, - 0x2b, 0x03, 0xd8, 0xfb, 0x3a, 0x04, 0x08, 0x93, 0x33, 0x01, 0x00, 0x9b, 0x18, 0xf6, 0x23, 0x03, - 0x40, 0x1a, 0x1c, 0x33, 0x2a, 0x00, 0xd0, 0x06, 0x06, 0x09, 0x0e, 0x0c, 0x21, 0x00, 0x54, 0x5c, - 0x31, 0x01, 0x42, 0x8a, 0xd1, 0xfb, 0xbc, 0x70, 0xbc, 0x02, 0x47, 0x08, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2f, 0x64, 0x65, 0x76, - 0x2f, 0x75, 0x73, 0x62, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2f, 0x64, 0x65, 0x76, - 0x2f, 0x73, 0x64, 0x69, 0x6f, 0x2f, 0x73, 0x64, 0x68, 0x63, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x70, 0x20, 0xd6, - 0x13, 0x70, 0x20, 0xe0, 0x24, 0x49, 0x4f, 0x53, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, - 0x20, 0x44, 0x49, 0x50, 0x50, 0x3a, 0x20, 0x53, 0x65, 0x70, 0x20, 0x20, 0x37, 0x20, 0x32, 0x30, - 0x31, 0x30, 0x20, 0x31, 0x32, 0x3a, 0x32, 0x33, 0x3a, 0x31, 0x34, 0x20, 0x36, 0x34, 0x4d, 0x24, - 0x0a, 0x00, 0x2f, 0x64, 0x65, 0x76, 0x2f, 0x75, 0x73, 0x62, 0x32, 0x00, 0x2f, 0x64, 0x65, 0x76, - 0x2f, 0x73, 0x64, 0x69, 0x6f, 0x2f, 0x73, 0x64, 0x68, 0x63, 0x00, 0x00 -}; diff --git a/source/mload/modules/dip_plugin_249.h b/source/mload/modules/dip_plugin_249.h deleted file mode 100644 index ceaf4f96..00000000 --- a/source/mload/modules/dip_plugin_249.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef DIP_PLUGIN249_H_ -#define DIP_PLUGIN249_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -extern unsigned char dip_plugin_249[5340]; - -#define dip_plugin_249_size sizeof(dip_plugin_249) - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/mload/modules/odip_frag.c b/source/mload/modules/odip_frag.c deleted file mode 100644 index c044ec5b..00000000 --- a/source/mload/modules/odip_frag.c +++ /dev/null @@ -1,574 +0,0 @@ -unsigned char odip_frag[9120] __attribute__((aligned (32)))={ - 0x13, 0x77, 0xca, 0x6d, 0x12, 0x34, 0x00, 0x01, 0x20, 0x22, 0xdd, 0xac, 0x20, 0x20, 0x10, 0x11, - 0x20, 0x20, 0x0b, 0x9d, 0x20, 0x20, 0x0b, 0x71, 0x20, 0x20, 0x5d, 0xc1, 0x20, 0x20, 0x00, 0x49, - 0x20, 0x20, 0x2b, 0x4d, 0x20, 0x20, 0x39, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x77, 0xe2, 0xa0, 0x13, 0x77, 0xd8, 0xe0, - 0x13, 0x77, 0xd5, 0x2d, 0x13, 0x77, 0xe3, 0xa0, 0x00, 0x00, 0x10, 0xa0, 0xe1, 0xa0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xb5, 0x00, 0x23, 0xe3, 0xb0, 0x89, 0x06, 0x1b, 0x93, 0x00, 0x46, 0x68, 0x23, 0x00, 0x21, 0x00, - 0x22, 0x00, 0x93, 0x01, 0x93, 0x02, 0xf0, 0x01, 0xfa, 0xed, 0xb0, 0x09, 0xbc, 0x02, 0x47, 0x08, - 0xb5, 0x10, 0x1c, 0x03, 0x22, 0x20, 0x1c, 0x0c, 0x48, 0x0d, 0x1c, 0x19, 0xf0, 0x01, 0xfc, 0x82, - 0x48, 0x0b, 0x21, 0x20, 0xf0, 0x01, 0xfc, 0x72, 0x4a, 0x0a, 0x23, 0x01, 0x68, 0x11, 0x42, 0x0b, - 0xd1, 0xfc, 0x22, 0x20, 0x1c, 0x20, 0x49, 0x06, 0xf0, 0x01, 0xfc, 0x74, 0x1c, 0x20, 0x21, 0x20, - 0xf0, 0x01, 0xfc, 0x64, 0x4b, 0x04, 0x68, 0x18, 0xbc, 0x10, 0xbc, 0x02, 0x47, 0x08, 0x46, 0xc0, - 0x0d, 0x00, 0x60, 0x00, 0x0d, 0x00, 0x60, 0x1c, 0x0d, 0x00, 0x60, 0x20, 0xb5, 0xf0, 0xb0, 0x8d, - 0x1c, 0x0e, 0x27, 0xd0, 0x0a, 0xc9, 0x90, 0x01, 0x92, 0x03, 0x91, 0x02, 0x25, 0x00, 0xac, 0x04, - 0x06, 0x3f, 0x99, 0x03, 0x9b, 0x02, 0x22, 0x00, 0x61, 0x21, 0x98, 0x01, 0x1c, 0x31, 0x60, 0xe3, - 0x60, 0x62, 0x60, 0xa2, 0x35, 0x01, 0x60, 0x27, 0xf0, 0x01, 0xfc, 0x48, 0x99, 0x01, 0x1c, 0x32, - 0x1c, 0x20, 0xf0, 0x01, 0xfa, 0xa7, 0x0f, 0xeb, 0x22, 0x00, 0x21, 0x1f, 0x42, 0xa9, 0x41, 0x53, - 0x06, 0x1b, 0x2b, 0x00, 0xd0, 0x01, 0x28, 0x00, 0xd1, 0xe3, 0xb0, 0x0d, 0xbc, 0xf0, 0xbc, 0x02, - 0x47, 0x08, 0xb5, 0xf0, 0xb0, 0x8b, 0x27, 0xa8, 0x90, 0x00, 0x1c, 0x0e, 0x92, 0x01, 0x25, 0x00, - 0xac, 0x02, 0x06, 0x3f, 0x99, 0x01, 0x98, 0x00, 0x60, 0xa1, 0x1c, 0x31, 0x35, 0x01, 0x60, 0x27, - 0x60, 0x66, 0xf0, 0x01, 0xfc, 0x23, 0x99, 0x00, 0x1c, 0x32, 0x1c, 0x20, 0xf0, 0x01, 0xfa, 0x82, - 0x0f, 0xeb, 0x22, 0x00, 0x21, 0x07, 0x42, 0xa9, 0x41, 0x53, 0x06, 0x1b, 0x2b, 0x00, 0xd0, 0x01, - 0x28, 0x00, 0xd1, 0xe7, 0xb0, 0x0b, 0xbc, 0xf0, 0xbc, 0x02, 0x47, 0x08, 0xb5, 0xf0, 0xb0, 0x87, - 0x90, 0x05, 0x91, 0x03, 0x92, 0x04, 0x25, 0x00, 0x29, 0x00, 0xd0, 0x75, 0x0a, 0x51, 0x91, 0x01, - 0x95, 0x00, 0xe0, 0x69, 0x9a, 0x03, 0x9b, 0x00, 0x99, 0x01, 0x1a, 0xd4, 0x9a, 0x04, 0x02, 0x4b, - 0x27, 0x00, 0x42, 0x9a, 0xd9, 0x01, 0x1a, 0xd7, 0x00, 0xbf, 0x9b, 0x05, 0x21, 0x1f, 0x1c, 0x1e, - 0x9b, 0x00, 0x18, 0xf6, 0x23, 0x00, 0x42, 0x0e, 0xd1, 0x19, 0x4b, 0x32, 0x22, 0x00, 0x42, 0x9e, - 0xd8, 0x02, 0x22, 0xc0, 0x04, 0x52, 0x1b, 0x92, 0x21, 0xf0, 0x06, 0x09, 0x18, 0x73, 0x49, 0x2e, - 0x42, 0x8b, 0xd8, 0x01, 0x4a, 0x2d, 0x1b, 0x92, 0x49, 0x2d, 0x23, 0x00, 0x42, 0x8a, 0xd9, 0x03, - 0x1c, 0x13, 0x42, 0xa2, 0xd9, 0x00, 0x1c, 0x23, 0x05, 0x5a, 0x0d, 0x52, 0x1a, 0x9b, 0x2b, 0x00, - 0xd0, 0x01, 0x2f, 0x00, 0xd0, 0x22, 0x23, 0x80, 0x19, 0x3a, 0x01, 0x1b, 0x42, 0x9a, 0xd9, 0x00, - 0x1b, 0xdc, 0x20, 0x80, 0x01, 0x00, 0x21, 0x20, 0xf0, 0x01, 0xfb, 0xbc, 0x90, 0x02, 0x28, 0x00, - 0xd0, 0x30, 0x21, 0x80, 0x01, 0x09, 0x9a, 0x01, 0xf7, 0xff, 0xff, 0x60, 0x1e, 0x05, 0xd1, 0x09, - 0x9a, 0x02, 0x1c, 0x30, 0x19, 0xd1, 0x1c, 0x22, 0xf0, 0x01, 0xfb, 0xbc, 0x1c, 0x30, 0x1c, 0x21, - 0xf0, 0x01, 0xfb, 0xac, 0x98, 0x02, 0xf0, 0x01, 0xfb, 0xa1, 0xe0, 0x0b, 0x1c, 0x1c, 0x4b, 0x15, - 0x42, 0x9c, 0xd9, 0x01, 0x24, 0xff, 0x03, 0xe4, 0x1c, 0x30, 0x1c, 0x21, 0x9a, 0x01, 0xf7, 0xff, - 0xff, 0x45, 0x1c, 0x05, 0x2d, 0x00, 0xd1, 0x0f, 0x9b, 0x00, 0x99, 0x01, 0x19, 0x1b, 0x19, 0xe4, - 0x0a, 0xe4, 0x19, 0x09, 0x93, 0x00, 0x91, 0x01, 0x9a, 0x00, 0x9b, 0x03, 0x42, 0x9a, 0xd3, 0x91, - 0x25, 0x00, 0xe0, 0x01, 0x25, 0x01, 0x42, 0x6d, 0xb0, 0x07, 0x1c, 0x28, 0xbc, 0xf0, 0xbc, 0x02, - 0x47, 0x08, 0x46, 0xc0, 0x01, 0x7f, 0xff, 0xff, 0x03, 0x61, 0x7f, 0xff, 0x13, 0x61, 0x80, 0x00, - 0x00, 0x00, 0x07, 0xff, 0x00, 0x7f, 0x7f, 0xff, 0xb5, 0xf8, 0x4e, 0x26, 0x27, 0x01, 0x1c, 0x04, - 0x60, 0x37, 0x21, 0x20, 0xf0, 0x01, 0xfb, 0x7a, 0x7b, 0x22, 0x7b, 0x63, 0x06, 0x12, 0x04, 0x1b, - 0x43, 0x13, 0x7b, 0xa2, 0x02, 0x12, 0x43, 0x13, 0x7b, 0xe2, 0x43, 0x13, 0x2b, 0x08, 0xd1, 0x30, - 0x7e, 0x22, 0x7e, 0x63, 0x06, 0x12, 0x04, 0x1b, 0x43, 0x13, 0x7e, 0xa2, 0x25, 0xc5, 0x02, 0x12, - 0x43, 0x13, 0x7e, 0xe2, 0x01, 0xad, 0x43, 0x13, 0x68, 0x18, 0x68, 0x59, 0xf0, 0x01, 0xfb, 0x5e, - 0x7e, 0x22, 0x7e, 0x63, 0x06, 0x12, 0x04, 0x1b, 0x43, 0x13, 0x7e, 0xa2, 0x1c, 0x28, 0x02, 0x12, - 0x43, 0x13, 0x7e, 0xe2, 0x21, 0x08, 0x43, 0x13, 0x68, 0x1b, 0x68, 0x5c, 0xf0, 0x01, 0xfb, 0x4e, - 0x04, 0x24, 0x43, 0x27, 0x4c, 0x0c, 0x60, 0x2f, 0x1c, 0x28, 0x21, 0x04, 0x60, 0x27, 0xf0, 0x01, - 0xfb, 0x3d, 0x1c, 0x20, 0x21, 0x04, 0xf0, 0x01, 0xfb, 0x39, 0x23, 0x00, 0x60, 0x33, 0x20, 0x00, - 0xe0, 0x04, 0x1c, 0x20, 0xf0, 0x01, 0xf9, 0x11, 0x23, 0x00, 0x60, 0x33, 0xbc, 0xf8, 0xbc, 0x02, - 0x47, 0x08, 0x46, 0xc0, 0x13, 0x77, 0xe3, 0xa0, 0x00, 0x00, 0x31, 0x88, 0x4a, 0x03, 0x23, 0x00, - 0x60, 0x13, 0x4a, 0x03, 0x60, 0x13, 0x4a, 0x03, 0x60, 0x13, 0x47, 0x70, 0x13, 0x77, 0xe5, 0xe8, - 0x13, 0x77, 0xe3, 0xc0, 0x13, 0x77, 0xe3, 0xb8, 0xb5, 0xf0, 0x4b, 0x10, 0x21, 0xa0, 0x48, 0x10, - 0x68, 0x1c, 0x22, 0x00, 0x23, 0x00, 0x00, 0x89, 0x03, 0xd6, 0xe0, 0x01, 0x04, 0x2b, 0x0c, 0x1b, - 0x00, 0x5d, 0x18, 0xed, 0x00, 0xad, 0x19, 0x65, 0x69, 0x6f, 0x68, 0xed, 0x19, 0x7d, 0x42, 0xae, - 0xd3, 0x03, 0x68, 0x67, 0x1c, 0x5d, 0x42, 0xbd, 0xd3, 0xf0, 0x32, 0x01, 0x80, 0x03, 0x30, 0x02, - 0x42, 0x8a, 0xd1, 0xe9, 0xbc, 0xf0, 0xbc, 0x01, 0x47, 0x00, 0x46, 0xc0, 0x13, 0x77, 0xe3, 0xc0, - 0x13, 0x77, 0xe6, 0x04, 0xb5, 0xf8, 0x4b, 0x22, 0x1c, 0x06, 0x68, 0x1b, 0x1c, 0x0f, 0x1c, 0x14, - 0x2b, 0x00, 0xd0, 0x01, 0xf7, 0xff, 0xff, 0xc2, 0x1e, 0x73, 0x2b, 0x01, 0xd8, 0x30, 0x2c, 0x00, - 0xd0, 0x2e, 0x4b, 0x1c, 0x42, 0x9c, 0xd8, 0x2d, 0x4d, 0x1b, 0x2e, 0x01, 0xd1, 0x02, 0xf0, 0x00, - 0xfe, 0x29, 0xe0, 0x01, 0xf0, 0x00, 0xfd, 0x72, 0x4b, 0x17, 0x60, 0x28, 0x68, 0x18, 0x28, 0x00, - 0xd1, 0x22, 0x4b, 0x16, 0x4d, 0x16, 0x60, 0x1e, 0x4b, 0x16, 0x1c, 0x38, 0x60, 0x2b, 0x1c, 0x21, - 0xf0, 0x01, 0xfa, 0xd4, 0x68, 0x2d, 0x21, 0x00, 0x4a, 0x0e, 0x1c, 0x28, 0xf0, 0x01, 0xfa, 0x2a, - 0x1c, 0x22, 0x1c, 0x39, 0x1c, 0x28, 0xf0, 0x01, 0xf9, 0xe3, 0x1c, 0x38, 0x1c, 0x21, 0xf0, 0x01, - 0xfa, 0xbd, 0xf7, 0xff, 0xff, 0xa1, 0x4b, 0x06, 0x22, 0x01, 0x60, 0x1a, 0x1c, 0x20, 0xe0, 0x03, - 0x20, 0x01, 0xe0, 0x00, 0x20, 0x02, 0x42, 0x40, 0xbc, 0xf8, 0xbc, 0x02, 0x47, 0x08, 0x46, 0xc0, - 0x13, 0x77, 0xe5, 0xe8, 0x00, 0x00, 0xa4, 0x1c, 0x13, 0x77, 0xe3, 0xb4, 0x13, 0x77, 0xe3, 0xb8, - 0x13, 0x77, 0xe3, 0xc0, 0x13, 0x73, 0x00, 0x00, 0xb5, 0xf0, 0xb0, 0x83, 0x24, 0xa0, 0x4d, 0x36, - 0x0b, 0xcf, 0x00, 0xa4, 0x9e, 0x09, 0x60, 0x2f, 0x42, 0xa7, 0xd9, 0x01, 0x4c, 0x33, 0x60, 0x2c, - 0x4c, 0x31, 0x4d, 0x33, 0x68, 0x24, 0x46, 0x9c, 0x00, 0x64, 0x5b, 0x2c, 0x4d, 0x31, 0x00, 0x67, - 0x60, 0x2c, 0x4d, 0x31, 0x19, 0x3f, 0x60, 0x2c, 0x68, 0x45, 0x00, 0xbf, 0x95, 0x00, 0x19, 0xc7, - 0x18, 0x55, 0x37, 0x0c, 0x95, 0x01, 0xe0, 0x37, 0x68, 0x3d, 0x42, 0x8d, 0xd8, 0x19, 0x68, 0xbb, - 0x18, 0xeb, 0x42, 0x8b, 0xd9, 0x2e, 0x4f, 0x28, 0x1b, 0x4d, 0x60, 0x3c, 0x4f, 0x27, 0x46, 0x63, - 0x60, 0x3d, 0x60, 0x19, 0x00, 0x63, 0x19, 0x1c, 0x00, 0xa4, 0x19, 0x00, 0x69, 0x03, 0x99, 0x08, - 0x18, 0xeb, 0x60, 0x0b, 0x69, 0x43, 0x20, 0x00, 0x1b, 0x5d, 0x60, 0x35, 0x42, 0x95, 0xd9, 0x2e, - 0xe0, 0x16, 0x9b, 0x01, 0x42, 0x9d, 0xd2, 0x15, 0x4f, 0x1b, 0x46, 0x63, 0x60, 0x3c, 0x4f, 0x1b, - 0x1a, 0x69, 0x60, 0x39, 0x60, 0x1d, 0x00, 0x63, 0x19, 0x1c, 0x00, 0xa4, 0x19, 0x00, 0x69, 0x03, - 0x9c, 0x08, 0x1a, 0x52, 0x60, 0x23, 0x69, 0x43, 0x20, 0x00, 0x60, 0x33, 0x42, 0x93, 0xd9, 0x16, - 0x60, 0x32, 0xe0, 0x14, 0x34, 0x01, 0x37, 0x0c, 0x9d, 0x00, 0x42, 0xac, 0xd3, 0xc4, 0x4d, 0x0e, - 0x18, 0x51, 0x68, 0x02, 0x46, 0x63, 0x60, 0x2c, 0x42, 0x91, 0xd8, 0x06, 0x60, 0x19, 0x99, 0x08, - 0x23, 0x00, 0x60, 0x0b, 0x20, 0x00, 0x60, 0x33, 0xe0, 0x01, 0x20, 0x02, 0x42, 0x40, 0xb0, 0x03, - 0xbc, 0xf0, 0xbc, 0x02, 0x47, 0x08, 0x46, 0xc0, 0x13, 0x77, 0xe3, 0xa4, 0x00, 0x00, 0x02, 0x7f, - 0x13, 0x77, 0xe6, 0x04, 0x13, 0x77, 0xe5, 0xfc, 0x13, 0x77, 0xeb, 0x04, 0x13, 0x77, 0xe5, 0xec, - 0xb5, 0xf0, 0xb0, 0x85, 0x1c, 0x06, 0x1c, 0x0d, 0x1c, 0x17, 0xe0, 0x46, 0x4a, 0x29, 0x4b, 0x2a, - 0x68, 0x10, 0x4a, 0x2a, 0x93, 0x00, 0x92, 0x01, 0x4b, 0x29, 0x1c, 0x31, 0x1c, 0x3a, 0xf7, 0xff, - 0xff, 0x73, 0x4b, 0x28, 0x60, 0x18, 0x28, 0x00, 0xd1, 0x3f, 0x4a, 0x25, 0x68, 0x13, 0x1b, 0x9b, - 0x93, 0x03, 0x9a, 0x03, 0x4b, 0x24, 0x60, 0x1a, 0x2a, 0x00, 0xd0, 0x09, 0x02, 0x54, 0x1c, 0x28, - 0x21, 0x00, 0x1c, 0x22, 0xf0, 0x01, 0xf9, 0x66, 0x9b, 0x03, 0x19, 0x2d, 0x18, 0xf6, 0x1a, 0xff, - 0x4b, 0x1a, 0x68, 0x19, 0x29, 0x00, 0xd0, 0x19, 0x4b, 0x1c, 0x4c, 0x1a, 0x68, 0x1a, 0x4b, 0x16, - 0x2a, 0x01, 0xd1, 0x04, 0x68, 0x18, 0x1c, 0x2a, 0xf0, 0x00, 0xfc, 0xf4, 0xe0, 0x03, 0x68, 0x18, - 0x1c, 0x2a, 0xf0, 0x00, 0xfc, 0xa9, 0x4b, 0x13, 0x60, 0x20, 0x68, 0x1b, 0x2b, 0x00, 0xd0, 0x10, - 0x4b, 0x0e, 0x68, 0x1b, 0x02, 0x5a, 0x18, 0xf6, 0x18, 0xad, 0x1a, 0xff, 0x4b, 0x0b, 0x68, 0x1a, - 0x4b, 0x0d, 0x68, 0x1b, 0x18, 0xd3, 0x2b, 0x00, 0xd0, 0x05, 0x2f, 0x00, 0xd1, 0xb6, 0x20, 0x00, - 0xe0, 0x03, 0x20, 0x03, 0xe0, 0x00, 0x20, 0x04, 0x42, 0x40, 0xb0, 0x05, 0xbc, 0xf0, 0xbc, 0x02, - 0x47, 0x08, 0x46, 0xc0, 0x13, 0x77, 0xe3, 0xc0, 0x13, 0x77, 0xe3, 0xc8, 0x13, 0x77, 0xe5, 0xf0, - 0x13, 0x77, 0xe3, 0xac, 0x13, 0x77, 0xe6, 0x00, 0x13, 0x77, 0xe3, 0xbc, 0x13, 0x77, 0xe3, 0xb8, - 0xb5, 0xf8, 0x1c, 0x1e, 0x4b, 0x1a, 0x1c, 0x0f, 0x09, 0xc1, 0x60, 0x19, 0x23, 0x7f, 0x40, 0x18, - 0x4b, 0x18, 0x00, 0x80, 0x60, 0x18, 0x23, 0x80, 0x00, 0x9b, 0x4c, 0x17, 0x1a, 0x1b, 0x60, 0x23, - 0x42, 0x93, 0xd9, 0x00, 0x60, 0x22, 0x4a, 0x14, 0x23, 0x80, 0x68, 0x10, 0x00, 0x9b, 0x42, 0x98, - 0xd1, 0x01, 0x23, 0x00, 0x60, 0x13, 0x4c, 0x10, 0x68, 0x23, 0x2b, 0x00, 0xd0, 0x10, 0x4d, 0x0f, - 0x1c, 0x08, 0x22, 0x01, 0x1c, 0x29, 0xf7, 0xff, 0xff, 0x73, 0x4b, 0x0d, 0x60, 0x18, 0x28, 0x00, - 0xd1, 0x0a, 0x4b, 0x08, 0x68, 0x22, 0x68, 0x19, 0x1c, 0x38, 0x18, 0x69, 0xf0, 0x01, 0xf8, 0xb0, - 0x4b, 0x05, 0x20, 0x00, 0x68, 0x1b, 0x60, 0x33, 0xbc, 0xf8, 0xbc, 0x02, 0x47, 0x08, 0x46, 0xc0, - 0x13, 0x77, 0xe5, 0xf4, 0x13, 0x77, 0xe5, 0xf8, 0x13, 0x77, 0xe3, 0xa8, 0x13, 0x77, 0xe3, 0xe0, - 0x13, 0x77, 0xe5, 0xe0, 0xb5, 0xf0, 0xb0, 0x85, 0x4d, 0x25, 0x90, 0x01, 0x91, 0x03, 0x1c, 0x10, - 0x1c, 0x17, 0x99, 0x01, 0x9a, 0x03, 0x1c, 0x2b, 0xf7, 0xff, 0xff, 0xb2, 0x4e, 0x21, 0x1c, 0x04, - 0x60, 0x30, 0x28, 0x00, 0xd1, 0x37, 0x68, 0x2d, 0x99, 0x01, 0x08, 0xab, 0x18, 0xfb, 0x9a, 0x03, - 0x93, 0x02, 0x4b, 0x1d, 0x19, 0x49, 0x1b, 0x55, 0x91, 0x01, 0x42, 0x9d, 0xd9, 0x15, 0x9b, 0x02, - 0x4f, 0x1a, 0x09, 0xd8, 0x4b, 0x1a, 0x0a, 0x6a, 0x60, 0x18, 0x60, 0x3a, 0xf7, 0xff, 0xff, 0x30, - 0x60, 0x30, 0x28, 0x00, 0xd1, 0x1b, 0x68, 0x3b, 0x99, 0x02, 0x01, 0xda, 0x18, 0x89, 0x9a, 0x01, - 0x02, 0x5b, 0x18, 0xd2, 0x91, 0x02, 0x92, 0x01, 0x1a, 0xed, 0x2d, 0x00, 0xd0, 0x13, 0x4e, 0x0c, - 0x98, 0x02, 0x1c, 0x33, 0x99, 0x01, 0x1c, 0x2a, 0xf7, 0xff, 0xff, 0x82, 0x4b, 0x09, 0x1c, 0x04, - 0x60, 0x18, 0x28, 0x00, 0xd1, 0x07, 0x68, 0x33, 0x42, 0x9d, 0xd1, 0x02, 0xe0, 0x03, 0x1c, 0x04, - 0xe0, 0x01, 0x24, 0x05, 0x42, 0x64, 0xb0, 0x05, 0x1c, 0x20, 0xbc, 0xf0, 0xbc, 0x02, 0x47, 0x08, - 0x13, 0x77, 0xe3, 0xb0, 0x13, 0x77, 0xe3, 0xc4, 0x00, 0x00, 0x01, 0xff, 0x13, 0x77, 0xe5, 0xe4, - 0x13, 0x77, 0xeb, 0x08, 0xb5, 0x00, 0x4b, 0x0b, 0x68, 0x1b, 0x2b, 0x01, 0xd0, 0x02, 0x2b, 0x02, - 0xd1, 0x0c, 0xe0, 0x01, 0x4a, 0x08, 0xe0, 0x00, 0x4a, 0x08, 0x23, 0x00, 0x42, 0x90, 0xd3, 0x06, - 0x4b, 0x07, 0x4a, 0x08, 0x62, 0x1a, 0x23, 0xa0, 0x02, 0x1b, 0xe0, 0x00, 0x23, 0x00, 0x1c, 0x18, - 0xbc, 0x02, 0x47, 0x08, 0x13, 0x77, 0xeb, 0x10, 0x46, 0x09, 0x00, 0x00, 0x7e, 0xd3, 0x80, 0x00, - 0x13, 0x77, 0xeb, 0x14, 0x00, 0x05, 0x21, 0x00, 0xb5, 0x10, 0x4b, 0x0c, 0x1d, 0xdc, 0x7f, 0xe4, - 0x2c, 0x00, 0xd0, 0x02, 0xf7, 0xff, 0xff, 0x7e, 0xe0, 0x0d, 0x69, 0x1c, 0x2c, 0x00, 0xd0, 0x02, - 0xf0, 0x00, 0xfc, 0xb8, 0xe0, 0x07, 0x68, 0x5b, 0x2b, 0x00, 0xd0, 0x02, 0xf7, 0xff, 0xfc, 0xe6, - 0xe0, 0x01, 0xf7, 0xff, 0xfc, 0xbe, 0xbc, 0x10, 0xbc, 0x02, 0x47, 0x08, 0x13, 0x77, 0xeb, 0x14, - 0xb5, 0xf0, 0xb0, 0x85, 0x90, 0x02, 0x1c, 0x10, 0x91, 0x03, 0x1c, 0x14, 0xf7, 0xff, 0xff, 0xba, - 0x28, 0x00, 0xd0, 0x00, 0xe0, 0xfe, 0x4b, 0x81, 0x68, 0xdd, 0x68, 0x9a, 0x18, 0xad, 0x19, 0x2d, - 0x95, 0x01, 0x69, 0x1b, 0x2b, 0x00, 0xd0, 0x12, 0x4b, 0x7d, 0x68, 0x1b, 0x2b, 0x00, 0xdd, 0x00, - 0xe0, 0xeb, 0x4b, 0x7c, 0x68, 0x19, 0x29, 0x00, 0xd0, 0x01, 0xf0, 0x01, 0xf8, 0xe7, 0x4b, 0x79, - 0x22, 0x00, 0x60, 0x1a, 0x23, 0x01, 0x4a, 0x78, 0x42, 0x5b, 0x60, 0x13, 0xe0, 0xdd, 0x4b, 0x76, - 0x49, 0x76, 0x68, 0x1b, 0x18, 0x5a, 0x2a, 0x00, 0xd1, 0x00, 0xe0, 0xa8, 0x2b, 0x00, 0xda, 0x00, - 0xe0, 0xa5, 0x4c, 0x70, 0x68, 0x23, 0x2b, 0x00, 0xd1, 0x06, 0x21, 0x80, 0x20, 0x00, 0x01, 0x89, - 0x22, 0x20, 0xf0, 0x01, 0xf8, 0xbb, 0x60, 0x20, 0x20, 0x80, 0x01, 0x00, 0x21, 0x20, 0xf0, 0x01, - 0xf8, 0xa1, 0x1e, 0x04, 0xd1, 0x03, 0x23, 0x01, 0x4a, 0x67, 0x42, 0x5b, 0x60, 0x13, 0x4e, 0x66, - 0x22, 0x00, 0x68, 0x33, 0x92, 0x00, 0x2b, 0x00, 0xdb, 0x26, 0x1c, 0x35, 0x27, 0x00, 0x68, 0x32, - 0x21, 0x80, 0x1c, 0x13, 0x33, 0x10, 0x02, 0x5b, 0x02, 0x52, 0x1c, 0x20, 0x01, 0x09, 0x93, 0x00, - 0xf7, 0xff, 0xff, 0x8a, 0x28, 0x00, 0xda, 0x03, 0x23, 0x01, 0x42, 0x5b, 0x60, 0x33, 0xe0, 0x13, - 0x78, 0x23, 0x2b, 0x43, 0xd1, 0x08, 0x78, 0x63, 0x2b, 0x49, 0xd1, 0x05, 0x78, 0xa3, 0x2b, 0x53, - 0xd1, 0x02, 0x78, 0xe3, 0x2b, 0x4f, 0xd0, 0x07, 0x68, 0x2b, 0x2b, 0x00, 0xd0, 0x01, 0x60, 0x2f, - 0xe7, 0xdd, 0x23, 0x01, 0x42, 0x5b, 0x60, 0x2b, 0x4e, 0x4f, 0x68, 0x33, 0x2b, 0x00, 0xdb, 0x59, - 0x4b, 0x4c, 0x68, 0x1b, 0x2b, 0x00, 0xd0, 0x55, 0x79, 0x62, 0x79, 0xa3, 0x02, 0x12, 0x04, 0x1b, - 0x18, 0xd2, 0x79, 0x23, 0x48, 0x4a, 0x18, 0xd2, 0x79, 0xe3, 0x21, 0x00, 0x06, 0x1b, 0x18, 0xd2, - 0x4b, 0x48, 0x08, 0x92, 0x60, 0x1a, 0x22, 0x80, 0x01, 0x12, 0xf0, 0x00, 0xfb, 0xcb, 0x27, 0x08, - 0x25, 0x00, 0x05, 0x7b, 0x2b, 0x00, 0xd1, 0x16, 0x49, 0x43, 0x23, 0x01, 0x42, 0x8d, 0xdc, 0x00, - 0x23, 0x00, 0x06, 0x1b, 0x2b, 0x00, 0xd0, 0x0e, 0x68, 0x33, 0x12, 0xfa, 0x18, 0xd2, 0x21, 0x80, - 0x02, 0x52, 0x1c, 0x20, 0x01, 0x09, 0xf7, 0xff, 0xff, 0x3f, 0x28, 0x00, 0xda, 0x03, 0x23, 0x01, - 0x42, 0x5b, 0x60, 0x33, 0xe0, 0x20, 0x20, 0x07, 0x40, 0x28, 0xd1, 0x05, 0x4b, 0x31, 0x10, 0xea, - 0x68, 0x1b, 0x99, 0x00, 0x00, 0x92, 0x50, 0xd1, 0x05, 0x7b, 0x0d, 0x5b, 0x5c, 0xe3, 0x2b, 0x00, - 0xd0, 0x0c, 0x4a, 0x2f, 0x21, 0x01, 0x10, 0xeb, 0x40, 0x81, 0x1c, 0x08, 0x5c, 0xd1, 0x43, 0x01, - 0x54, 0xd1, 0x4b, 0x2c, 0x9a, 0x00, 0x68, 0x1b, 0x18, 0xd2, 0x92, 0x00, 0x23, 0x80, 0x35, 0x01, - 0x01, 0xdb, 0x37, 0x01, 0x42, 0x9d, 0xd1, 0xc4, 0x4b, 0x23, 0x68, 0x1a, 0x2a, 0x00, 0xdb, 0x01, - 0x4a, 0x26, 0x60, 0x1a, 0x2c, 0x00, 0xd0, 0x02, 0x1c, 0x20, 0xf0, 0x01, 0xf8, 0x07, 0x4b, 0x1e, - 0x4c, 0x1c, 0x68, 0x1a, 0x4b, 0x21, 0x42, 0x9a, 0xd1, 0x1e, 0x4b, 0x1e, 0x98, 0x01, 0x68, 0x1d, - 0x1c, 0x29, 0xf0, 0x01, 0xf8, 0x1b, 0x68, 0x23, 0x08, 0xc1, 0x24, 0x07, 0x00, 0x8a, 0x58, 0xd2, - 0x40, 0x20, 0x23, 0x00, 0x4e, 0x16, 0x24, 0x01, 0xe0, 0x05, 0x5c, 0x77, 0x41, 0x1f, 0x42, 0x3c, - 0xd0, 0x00, 0x19, 0x52, 0x33, 0x01, 0x42, 0x83, 0xd3, 0xf7, 0x9b, 0x01, 0x3d, 0x01, 0x40, 0x1d, - 0x19, 0x52, 0x98, 0x02, 0x99, 0x03, 0xe0, 0x0b, 0x68, 0x21, 0x29, 0x00, 0xd0, 0x02, 0x20, 0x00, - 0xf0, 0x01, 0xf8, 0x04, 0x4b, 0x07, 0x22, 0x00, 0x60, 0x1a, 0x98, 0x02, 0x99, 0x03, 0x9a, 0x01, - 0xf7, 0xff, 0xfe, 0xda, 0xb0, 0x05, 0xbc, 0xf0, 0xbc, 0x02, 0x47, 0x08, 0x13, 0x77, 0xeb, 0x14, - 0x13, 0x77, 0xec, 0x24, 0x13, 0x77, 0xeb, 0x0c, 0x13, 0x77, 0xe2, 0x04, 0x80, 0x00, 0x00, 0x01, - 0x13, 0x77, 0xec, 0x40, 0x13, 0x77, 0xeb, 0x3c, 0x00, 0x00, 0x07, 0xf7, 0x7f, 0xff, 0xff, 0xff, - 0xb5, 0x10, 0x21, 0x80, 0x20, 0x00, 0x01, 0x09, 0x22, 0x20, 0xf0, 0x00, 0xff, 0xcf, 0x1e, 0x04, - 0xd0, 0x10, 0x21, 0x80, 0x22, 0x8e, 0x01, 0x09, 0x1c, 0x20, 0x05, 0xd2, 0xf7, 0xff, 0xfe, 0xd0, - 0x1e, 0x43, 0x41, 0x98, 0x23, 0x02, 0x1a, 0x18, 0x4b, 0x04, 0x1c, 0x21, 0x60, 0x18, 0x20, 0x00, - 0xf0, 0x00, 0xff, 0xcc, 0xbc, 0x10, 0xbc, 0x01, 0x47, 0x00, 0x46, 0xc0, 0x13, 0x77, 0xeb, 0x10, - 0xb5, 0x38, 0x22, 0x00, 0x21, 0x20, 0x1c, 0x04, 0xf7, 0xff, 0xfe, 0xba, 0x69, 0xa2, 0x4b, 0x09, - 0x1c, 0x05, 0x42, 0x9a, 0xd1, 0x09, 0x4b, 0x08, 0x21, 0x01, 0x68, 0x1a, 0x70, 0x11, 0x68, 0x1b, - 0x78, 0x5b, 0x2b, 0x00, 0xd1, 0x01, 0xf0, 0x00, 0xff, 0x85, 0x1c, 0x28, 0xbc, 0x38, 0xbc, 0x02, - 0x47, 0x08, 0x46, 0xc0, 0x5d, 0x1c, 0x9e, 0xa3, 0x13, 0x77, 0xc0, 0x08, 0xb5, 0xf0, 0xb0, 0x83, - 0x92, 0x01, 0x78, 0x02, 0x1c, 0x07, 0x92, 0x00, 0x4a, 0xba, 0x1c, 0x0d, 0x68, 0x13, 0x2b, 0x00, - 0xd0, 0x0d, 0x4c, 0xb9, 0x4e, 0xb9, 0x68, 0x20, 0x68, 0x32, 0x21, 0x00, 0xf0, 0x00, 0xfa, 0xea, - 0x68, 0x20, 0x68, 0x31, 0xf0, 0x00, 0xff, 0x72, 0x4a, 0xb2, 0x23, 0x00, 0x60, 0x13, 0x9b, 0x00, - 0x2b, 0xe0, 0xd0, 0x61, 0x4c, 0xb2, 0x26, 0x00, 0x62, 0x26, 0x2b, 0xda, 0xd1, 0x00, 0xe1, 0x51, - 0x2b, 0xda, 0xd8, 0x2f, 0x2b, 0x8a, 0xd1, 0x00, 0xe1, 0xb6, 0x2b, 0x8a, 0xd8, 0x12, 0x2b, 0x15, - 0xd1, 0x00, 0xe1, 0x1c, 0x2b, 0x15, 0xd8, 0x03, 0x2b, 0x13, 0xd2, 0x00, 0xe1, 0xd8, 0xe0, 0xf0, - 0x9a, 0x00, 0x2a, 0x71, 0xd1, 0x00, 0xe1, 0x69, 0x2a, 0x79, 0xd0, 0x60, 0x2a, 0x70, 0xd0, 0x00, - 0xe1, 0xce, 0xe1, 0x7a, 0x9b, 0x00, 0x2b, 0xa8, 0xd1, 0x00, 0xe1, 0xbe, 0x2b, 0xa8, 0xd8, 0x06, - 0x2b, 0x8d, 0xd1, 0x00, 0xe1, 0xb9, 0x2b, 0xa4, 0xd0, 0x00, 0xe1, 0xc1, 0xe1, 0x1c, 0x9a, 0x00, - 0x2a, 0xd0, 0xd1, 0x00, 0xe1, 0xb1, 0x2a, 0xd9, 0xd1, 0x00, 0xe1, 0x04, 0x2a, 0xab, 0xd0, 0x00, - 0xe1, 0xb6, 0xe0, 0x39, 0x9b, 0x00, 0x2b, 0xf4, 0xd0, 0x5e, 0x2b, 0xf4, 0xd8, 0x0f, 0x2b, 0xf0, - 0xd0, 0x50, 0x2b, 0xf0, 0xd8, 0x05, 0x2b, 0xe0, 0xd0, 0x1e, 0x2b, 0xe4, 0xd0, 0x00, 0xe1, 0xa7, - 0xe0, 0x3a, 0x9a, 0x00, 0x2a, 0xf2, 0xd0, 0x4a, 0x2a, 0xf2, 0xd8, 0x4b, 0xe0, 0x45, 0x9b, 0x00, - 0x2b, 0xf9, 0xd0, 0x61, 0x2b, 0xf9, 0xd8, 0x05, 0x2b, 0xf5, 0xd0, 0x56, 0x2b, 0xf6, 0xd0, 0x00, - 0xe1, 0x96, 0xe0, 0xaa, 0x9a, 0x00, 0x2a, 0xfb, 0xd1, 0x00, 0xe0, 0x9b, 0x2a, 0xfb, 0xd3, 0x7d, - 0x2a, 0xff, 0xd0, 0x00, 0xe1, 0x8c, 0xe0, 0xcf, 0x4b, 0x81, 0x6a, 0x1a, 0x2a, 0x00, 0xd1, 0x03, - 0x69, 0x1b, 0x2b, 0x00, 0xd1, 0x00, 0xe1, 0x83, 0x1c, 0x28, 0x21, 0x00, 0x9a, 0x01, 0xf0, 0x00, - 0xfa, 0x71, 0x4b, 0x7b, 0x6a, 0x1b, 0xe0, 0x39, 0x4b, 0x79, 0x26, 0x00, 0x68, 0x5a, 0x2a, 0x00, - 0xd0, 0x00, 0xe1, 0x7d, 0x69, 0x1b, 0x2b, 0x00, 0xd0, 0x00, 0xe1, 0x79, 0xe1, 0x70, 0x69, 0x23, - 0x2b, 0x00, 0xd1, 0x00, 0xe1, 0x6c, 0xe1, 0x72, 0x68, 0x63, 0x2b, 0x00, 0xd1, 0x04, 0x4b, 0x70, - 0x69, 0x1b, 0x2b, 0x00, 0xd1, 0x00, 0xe1, 0x63, 0x1c, 0x28, 0x21, 0x00, 0x9a, 0x01, 0xf0, 0x00, - 0xfa, 0x51, 0xe0, 0x1c, 0x68, 0x7b, 0x60, 0xa3, 0xe1, 0x61, 0x68, 0xa3, 0xe0, 0x16, 0x68, 0x7b, - 0x60, 0x23, 0xe1, 0x5c, 0x68, 0x23, 0xe0, 0x11, 0x68, 0x7b, 0x1d, 0xe2, 0x61, 0x23, 0x77, 0xd6, - 0x2b, 0x00, 0xd0, 0x06, 0x1c, 0x20, 0x1c, 0x39, 0x30, 0x18, 0x31, 0x08, 0x22, 0x06, 0xf0, 0x00, - 0xfe, 0xd1, 0x69, 0x7a, 0x4b, 0x5e, 0x61, 0x5a, 0xe1, 0x49, 0x69, 0x23, 0x60, 0x2b, 0x99, 0x01, - 0x1c, 0x28, 0xf0, 0x00, 0xfe, 0xbb, 0xe1, 0x42, 0x68, 0x7b, 0x93, 0x00, 0x68, 0xba, 0x92, 0x01, - 0x68, 0xff, 0xf7, 0xff, 0xfb, 0x8b, 0x1d, 0xe3, 0x77, 0xde, 0x9b, 0x01, 0x61, 0x26, 0x60, 0x2e, - 0x2b, 0x00, 0xd1, 0x00, 0xe1, 0x33, 0x9a, 0x00, 0x2a, 0x00, 0xd1, 0x00, 0xe1, 0x2f, 0x26, 0x00, - 0x2f, 0x00, 0xd1, 0x00, 0xe1, 0x2c, 0x1c, 0x18, 0xf0, 0x00, 0xfe, 0xa4, 0x1c, 0x3a, 0x1c, 0x01, - 0x98, 0x00, 0xf7, 0xff, 0xfb, 0xa7, 0x60, 0x28, 0x28, 0x00, 0xdc, 0x00, 0xe1, 0x20, 0x4b, 0x48, - 0x21, 0x01, 0x1d, 0xda, 0x77, 0xd1, 0x9a, 0x00, 0x61, 0x1a, 0xe1, 0x19, 0x60, 0x2e, 0x34, 0x07, - 0x7f, 0xe3, 0x2b, 0x00, 0xd0, 0x01, 0x23, 0x10, 0xe0, 0x0a, 0x4b, 0x42, 0x68, 0x1b, 0x2b, 0x00, - 0xd0, 0x01, 0x23, 0x08, 0xe0, 0x04, 0x4b, 0x3e, 0x69, 0x1a, 0x2a, 0x00, 0xd0, 0x02, 0x23, 0x04, - 0x60, 0x2b, 0xe1, 0x04, 0x68, 0x5b, 0x26, 0x00, 0x2b, 0x00, 0xd1, 0x00, 0xe1, 0x00, 0x23, 0x01, - 0x60, 0x2b, 0xe0, 0xfd, 0x1c, 0x28, 0x49, 0x38, 0x22, 0x04, 0xf0, 0x00, 0xfe, 0x7b, 0x69, 0x23, - 0x34, 0x07, 0x60, 0x6b, 0x7f, 0xe3, 0x60, 0xab, 0xe0, 0xf1, 0x79, 0x3b, 0x34, 0x05, 0x77, 0xe3, - 0xe0, 0xed, 0x26, 0x00, 0x2d, 0x00, 0xd1, 0x00, 0xe0, 0xea, 0x9b, 0x00, 0x2b, 0x13, 0xd1, 0x0d, - 0x69, 0x23, 0x2b, 0x00, 0xd0, 0x11, 0x4b, 0x2d, 0x68, 0x1b, 0x2b, 0x00, 0xd0, 0x09, 0xf0, 0x00, - 0xf9, 0xf9, 0x1e, 0x43, 0x41, 0x98, 0x00, 0x40, 0x60, 0x28, 0xe7, 0x90, 0x69, 0x23, 0x2b, 0x00, - 0xd0, 0x03, 0x4b, 0x27, 0x68, 0x1b, 0x2b, 0x00, 0xda, 0x07, 0x4b, 0x26, 0x22, 0x01, 0x68, 0x1b, - 0x40, 0x13, 0x42, 0x5a, 0x41, 0x53, 0x00, 0x5b, 0xe7, 0x80, 0x23, 0x02, 0xe7, 0x7e, 0x4b, 0x21, - 0x22, 0x01, 0x68, 0x1b, 0x43, 0x93, 0xe7, 0x79, 0x68, 0x78, 0x1c, 0x29, 0x00, 0x40, 0x08, 0x40, - 0xf7, 0xff, 0xf9, 0xb6, 0xe0, 0xb9, 0x68, 0x63, 0x2b, 0x00, 0xd1, 0x04, 0x4b, 0x14, 0x69, 0x1b, - 0x2b, 0x00, 0xd1, 0x00, 0xe0, 0xac, 0x68, 0x7a, 0x68, 0xbb, 0x07, 0x92, 0x43, 0x1a, 0x0b, 0xd2, - 0x4b, 0x0f, 0x03, 0xd2, 0x60, 0xda, 0xe0, 0xaa, 0x68, 0x63, 0x2b, 0x00, 0xd1, 0x04, 0x4b, 0x0c, - 0x69, 0x1b, 0x2b, 0x00, 0xd1, 0x00, 0xe0, 0x9b, 0x4a, 0x0f, 0x4b, 0x09, 0x26, 0xa0, 0x62, 0x1a, - 0x02, 0x36, 0xe0, 0x9d, 0x4c, 0x0d, 0x21, 0x40, 0x1c, 0x20, 0xf0, 0x00, 0xfe, 0x17, 0x1c, 0x23, - 0x33, 0x40, 0xe0, 0x18, 0x13, 0x77, 0xe2, 0x00, 0x13, 0x77, 0xc0, 0x44, 0x13, 0x77, 0xc0, 0x48, - 0x13, 0x77, 0xeb, 0x14, 0x13, 0x77, 0xec, 0x24, 0x13, 0x77, 0xd8, 0xd8, 0x13, 0x77, 0xec, 0x28, - 0x13, 0x77, 0xe2, 0x84, 0x0d, 0x00, 0x60, 0x04, 0x00, 0x05, 0x31, 0x00, 0x13, 0x77, 0xd8, 0xe0, - 0x34, 0x01, 0x42, 0x9c, 0xd0, 0x74, 0x78, 0x22, 0x2a, 0x00, 0xd0, 0xf9, 0x49, 0x3f, 0x1c, 0x28, - 0x22, 0x40, 0xf0, 0x00, 0xfd, 0xf7, 0x1c, 0x28, 0x21, 0x40, 0xe7, 0x2a, 0x1d, 0xa3, 0x22, 0x01, - 0x77, 0xda, 0x68, 0x23, 0x2b, 0x00, 0xd1, 0x05, 0x1c, 0x38, 0x1c, 0x29, 0x9a, 0x01, 0xf0, 0x00, - 0xfc, 0x49, 0xe0, 0x04, 0x68, 0x79, 0x68, 0xba, 0x1c, 0x28, 0xf7, 0xff, 0xfc, 0xf1, 0x4b, 0x34, - 0x22, 0x00, 0x33, 0x06, 0x1c, 0x06, 0x77, 0xda, 0xe0, 0x5a, 0x4b, 0x31, 0x69, 0x1b, 0x2b, 0x00, - 0xd1, 0x06, 0x1c, 0x38, 0x1c, 0x29, 0x9a, 0x01, 0xf0, 0x00, 0xfc, 0x34, 0x28, 0x00, 0xd1, 0x0c, - 0x4b, 0x2b, 0x20, 0x00, 0x68, 0xd9, 0x68, 0x9a, 0x43, 0x11, 0xd1, 0x06, 0x69, 0x1a, 0x2a, 0x00, - 0xd1, 0x03, 0x69, 0xac, 0x49, 0x27, 0x42, 0x8c, 0xd0, 0x0a, 0x1e, 0x43, 0x41, 0x98, 0x4b, 0x24, - 0x99, 0x01, 0x60, 0x58, 0x1c, 0x28, 0xf7, 0xff, 0xfe, 0x0b, 0x1e, 0x06, 0xd1, 0x38, 0xe0, 0x00, - 0x60, 0x5a, 0xf7, 0xff, 0xfd, 0xe5, 0xe0, 0x32, 0x1d, 0x63, 0x7f, 0xdb, 0x26, 0x00, 0x2b, 0x00, - 0xd1, 0x2e, 0x1d, 0xa2, 0x77, 0xd3, 0x60, 0x23, 0x60, 0x63, 0x60, 0xa3, 0x60, 0xe3, 0x69, 0x23, - 0x2b, 0x00, 0xd1, 0x04, 0x69, 0x62, 0x4b, 0x18, 0x3a, 0x01, 0x60, 0x1a, 0xe0, 0x18, 0xf7, 0xff, - 0xf9, 0x07, 0x1d, 0xe3, 0x7f, 0xdb, 0x2b, 0x00, 0xd1, 0x1a, 0x69, 0x20, 0x1c, 0x21, 0x31, 0x18, - 0x69, 0x62, 0x38, 0x01, 0xf0, 0x00, 0xfa, 0x9c, 0xe0, 0x0f, 0x9b, 0x00, 0x68, 0x79, 0x68, 0xba, - 0x2b, 0xd0, 0xd1, 0x01, 0x02, 0xc9, 0x02, 0x52, 0x1c, 0x28, 0xf7, 0xff, 0xfc, 0x99, 0xe0, 0x04, - 0x1c, 0x38, 0x1c, 0x29, 0x9a, 0x01, 0xf0, 0x00, 0xfb, 0xe5, 0x1c, 0x06, 0xe0, 0x00, 0x26, 0x00, - 0xb0, 0x03, 0x1c, 0x30, 0xbc, 0xf0, 0xbc, 0x02, 0x47, 0x08, 0x46, 0xc0, 0x13, 0x77, 0xd8, 0xe0, - 0x13, 0x77, 0xeb, 0x14, 0x5d, 0x1c, 0x9e, 0xa3, 0x13, 0x77, 0xe2, 0x04, 0xb5, 0x30, 0xb0, 0x83, - 0x4c, 0x0e, 0x25, 0x00, 0x68, 0x23, 0x2b, 0x00, 0xda, 0x13, 0x48, 0x0d, 0x21, 0x01, 0xf0, 0x00, - 0xfd, 0x43, 0x60, 0x20, 0x28, 0x00, 0xdb, 0x0a, 0x22, 0x00, 0x23, 0x00, 0x21, 0x01, 0x95, 0x00, - 0xf0, 0x00, 0xfd, 0x44, 0x23, 0x80, 0x4a, 0x07, 0x00, 0x9b, 0x60, 0x13, 0xe0, 0x01, 0x25, 0x0b, - 0x42, 0x6d, 0xb0, 0x03, 0x1c, 0x28, 0xbc, 0x30, 0xbc, 0x02, 0x47, 0x08, 0x13, 0x77, 0xe2, 0x44, - 0x13, 0x77, 0xe2, 0x20, 0x13, 0x77, 0xe2, 0x40, 0xb5, 0x70, 0xb0, 0x82, 0x1c, 0x03, 0x48, 0x1d, - 0x68, 0x04, 0x20, 0x00, 0x2c, 0x00, 0xdb, 0x31, 0x48, 0x1b, 0x4c, 0x1c, 0x60, 0x03, 0x23, 0x04, - 0x60, 0x63, 0x60, 0xe3, 0x4b, 0x1a, 0x60, 0x41, 0x68, 0x1b, 0x60, 0x20, 0x43, 0x59, 0x30, 0x04, - 0x1c, 0x26, 0x60, 0xa0, 0x61, 0x22, 0x61, 0x61, 0x36, 0x18, 0x1c, 0x25, 0x68, 0x28, 0x68, 0x69, - 0x35, 0x08, 0xf0, 0x00, 0xfd, 0x23, 0x42, 0xb5, 0xd1, 0xf8, 0x4d, 0x10, 0x21, 0x18, 0x1c, 0x28, - 0xf0, 0x00, 0xfd, 0x1c, 0x4b, 0x0b, 0x21, 0x02, 0x68, 0x18, 0x22, 0x02, 0x23, 0x01, 0x95, 0x00, - 0xf0, 0x00, 0xfd, 0x04, 0x1c, 0x03, 0x20, 0x00, 0x2b, 0x00, 0xdb, 0x07, 0x68, 0x20, 0x68, 0x61, - 0x34, 0x08, 0xf0, 0x00, 0xfd, 0x13, 0x42, 0xb4, 0xd1, 0xf8, 0x20, 0x01, 0xb0, 0x02, 0xbc, 0x70, - 0xbc, 0x02, 0x47, 0x08, 0x13, 0x77, 0xe2, 0x44, 0x13, 0x77, 0xeb, 0x60, 0x13, 0x77, 0xeb, 0x40, - 0x13, 0x77, 0xe2, 0x40, 0xb5, 0x70, 0xb0, 0x82, 0x1c, 0x03, 0x48, 0x1d, 0x68, 0x04, 0x20, 0x00, - 0x2c, 0x00, 0xdb, 0x31, 0x48, 0x1b, 0x4c, 0x1c, 0x60, 0x03, 0x23, 0x04, 0x60, 0x63, 0x60, 0xe3, - 0x4b, 0x1a, 0x60, 0x41, 0x68, 0x1b, 0x60, 0x20, 0x43, 0x59, 0x30, 0x04, 0x1c, 0x26, 0x60, 0xa0, - 0x61, 0x22, 0x61, 0x61, 0x36, 0x18, 0x1c, 0x25, 0x68, 0x28, 0x68, 0x69, 0x35, 0x08, 0xf0, 0x00, - 0xfc, 0xdd, 0x42, 0xb5, 0xd1, 0xf8, 0x4d, 0x10, 0x21, 0x18, 0x1c, 0x28, 0xf0, 0x00, 0xfc, 0xd6, - 0x4b, 0x0b, 0x49, 0x0f, 0x68, 0x18, 0x22, 0x02, 0x23, 0x01, 0x95, 0x00, 0xf0, 0x00, 0xfc, 0xbe, - 0x1c, 0x03, 0x20, 0x00, 0x2b, 0x00, 0xdb, 0x07, 0x68, 0x20, 0x68, 0x61, 0x34, 0x08, 0xf0, 0x00, - 0xfc, 0xcd, 0x42, 0xb4, 0xd1, 0xf8, 0x20, 0x01, 0xb0, 0x02, 0xbc, 0x70, 0xbc, 0x02, 0x47, 0x08, - 0x13, 0x77, 0xe2, 0x80, 0x13, 0x77, 0xeb, 0xa0, 0x13, 0x77, 0xeb, 0x80, 0x13, 0x77, 0xeb, 0xc0, - 0x55, 0x4d, 0x53, 0x03, 0xb5, 0x30, 0xb0, 0x83, 0x4c, 0x0e, 0x25, 0x00, 0x68, 0x23, 0x2b, 0x00, - 0xda, 0x13, 0x48, 0x0d, 0x21, 0x01, 0xf0, 0x00, 0xfc, 0x8f, 0x60, 0x20, 0x28, 0x00, 0xdb, 0x0a, - 0x22, 0x00, 0x23, 0x00, 0x49, 0x09, 0x95, 0x00, 0xf0, 0x00, 0xfc, 0x90, 0x23, 0x80, 0x4a, 0x08, - 0x00, 0x9b, 0x60, 0x13, 0xe0, 0x01, 0x25, 0x0b, 0x42, 0x6d, 0xb0, 0x03, 0x1c, 0x28, 0xbc, 0x30, - 0xbc, 0x02, 0x47, 0x08, 0x13, 0x77, 0xe2, 0x80, 0x13, 0x77, 0xe2, 0x60, 0x55, 0x4d, 0x53, 0x01, - 0x13, 0x77, 0xeb, 0xc0, 0xb5, 0xf0, 0x2a, 0x00, 0xd0, 0x29, 0x23, 0x03, 0x1c, 0x1c, 0x40, 0x04, - 0x27, 0x04, 0x1b, 0x3c, 0x06, 0x0e, 0x40, 0x1c, 0x0e, 0x36, 0x1c, 0x05, 0x42, 0x94, 0xd8, 0x03, - 0x23, 0x00, 0x2c, 0x00, 0xd0, 0x08, 0xe0, 0x00, 0x1c, 0x14, 0x1c, 0x23, 0xe0, 0x01, 0x70, 0x2e, - 0x35, 0x01, 0x3b, 0x01, 0xd2, 0xfb, 0x1c, 0x23, 0x04, 0x0c, 0x06, 0x0d, 0x43, 0x25, 0x43, 0x0d, - 0x02, 0x0c, 0x1c, 0x29, 0x43, 0x21, 0x18, 0xc4, 0xe0, 0x01, 0xc4, 0x02, 0x1c, 0x2b, 0x1d, 0x1d, - 0x42, 0x95, 0xd9, 0xfa, 0xe0, 0x01, 0x33, 0x01, 0x54, 0xc6, 0x42, 0x93, 0xd3, 0xfb, 0xbc, 0xf0, - 0xbc, 0x01, 0x47, 0x00, 0xb5, 0x00, 0xb0, 0x83, 0x4b, 0x0a, 0x20, 0x01, 0x68, 0x1b, 0x2b, 0x00, - 0xd0, 0x0c, 0x4b, 0x09, 0x68, 0x1b, 0x2b, 0x00, 0xdb, 0x08, 0x4a, 0x08, 0x1c, 0x18, 0x68, 0x12, - 0x49, 0x07, 0x92, 0x00, 0x23, 0x00, 0x22, 0x00, 0xf0, 0x00, 0xfc, 0x38, 0xb0, 0x03, 0xbc, 0x02, - 0x47, 0x08, 0x46, 0xc0, 0x13, 0x77, 0xec, 0x28, 0x13, 0x77, 0xe2, 0x84, 0x13, 0x77, 0xeb, 0xc4, - 0x57, 0x46, 0x53, 0x04, 0xb5, 0xf0, 0xb0, 0x87, 0x4b, 0x9a, 0x90, 0x03, 0x68, 0x1b, 0x91, 0x02, - 0x92, 0x04, 0x2b, 0x00, 0xd0, 0x04, 0x21, 0xff, 0x9a, 0x02, 0xf7, 0xff, 0xff, 0xa3, 0xe0, 0xee, - 0x4d, 0x95, 0x68, 0x2b, 0x2b, 0x00, 0xda, 0x00, 0xe1, 0x1c, 0x4b, 0x94, 0x68, 0x1b, 0x2b, 0x00, - 0xd1, 0x00, 0xe0, 0xf0, 0x3b, 0x01, 0x2b, 0x01, 0xd9, 0x00, 0xe0, 0xad, 0x4c, 0x90, 0x68, 0x23, - 0x2b, 0x00, 0xd1, 0x06, 0x21, 0x80, 0x20, 0x00, 0x01, 0x89, 0x22, 0x20, 0xf0, 0x00, 0xfc, 0x26, - 0x60, 0x20, 0x20, 0x80, 0x01, 0x00, 0x21, 0x20, 0xf0, 0x00, 0xfc, 0x0c, 0x1e, 0x04, 0xd1, 0x03, - 0x23, 0x01, 0x4a, 0x86, 0x42, 0x5b, 0x60, 0x13, 0x4b, 0x84, 0x25, 0x00, 0x68, 0x1b, 0x2b, 0x00, - 0xdb, 0x21, 0x4d, 0x81, 0x21, 0x00, 0x68, 0x28, 0x22, 0x00, 0xf0, 0x00, 0xfc, 0x13, 0x28, 0x00, - 0xdb, 0x13, 0x22, 0x80, 0x68, 0x28, 0x1c, 0x21, 0x01, 0x12, 0xf0, 0x00, 0xfc, 0x13, 0x28, 0x00, - 0xdb, 0x0b, 0x78, 0x23, 0x2b, 0x43, 0xd1, 0x08, 0x78, 0x63, 0x2b, 0x49, 0xd1, 0x05, 0x78, 0xa3, - 0x2b, 0x53, 0xd1, 0x02, 0x78, 0xe3, 0x2b, 0x4f, 0xd0, 0x03, 0x23, 0x01, 0x4a, 0x73, 0x42, 0x5b, - 0x60, 0x13, 0x25, 0x80, 0x01, 0xad, 0x4a, 0x71, 0x68, 0x13, 0x2b, 0x00, 0xdb, 0x67, 0x4b, 0x70, - 0x68, 0x1b, 0x2b, 0x00, 0xd0, 0x63, 0x79, 0x62, 0x79, 0xa3, 0x02, 0x12, 0x04, 0x1b, 0x18, 0xd2, - 0x79, 0x23, 0x48, 0x6c, 0x18, 0xd2, 0x79, 0xe3, 0x21, 0x00, 0x06, 0x1b, 0x18, 0xd2, 0x4b, 0x6a, - 0x08, 0x92, 0x60, 0x1a, 0x22, 0x80, 0x01, 0x12, 0xf7, 0xff, 0xff, 0x3c, 0x27, 0x08, 0x26, 0x00, - 0x05, 0x7b, 0x2b, 0x00, 0xd1, 0x26, 0x4a, 0x65, 0x23, 0x01, 0x42, 0x96, 0xdc, 0x00, 0x23, 0x00, - 0x06, 0x1b, 0x2b, 0x00, 0xd0, 0x1e, 0x4b, 0x5d, 0x68, 0x1a, 0x4b, 0x5b, 0x2a, 0x02, 0xd1, 0x03, - 0x12, 0xf9, 0x68, 0x18, 0x02, 0x49, 0xe0, 0x02, 0x0a, 0xf9, 0x68, 0x18, 0x02, 0xc9, 0x22, 0x00, - 0xf0, 0x00, 0xfb, 0xc0, 0x28, 0x00, 0xdb, 0x08, 0x4b, 0x53, 0x22, 0x80, 0x68, 0x18, 0x1c, 0x21, - 0x01, 0x12, 0xf0, 0x00, 0xfb, 0xbf, 0x28, 0x00, 0xda, 0x04, 0x23, 0x01, 0x4a, 0x4f, 0x42, 0x5b, - 0x60, 0x13, 0xe0, 0x1d, 0x20, 0x07, 0x40, 0x30, 0xd1, 0x04, 0x4b, 0x4d, 0x10, 0xf2, 0x68, 0x1b, - 0x00, 0x92, 0x50, 0xd5, 0x05, 0x7b, 0x0d, 0x5b, 0x5c, 0xe3, 0x2b, 0x00, 0xd0, 0x0a, 0x4a, 0x49, - 0x21, 0x01, 0x10, 0xf3, 0x40, 0x81, 0x1c, 0x08, 0x5c, 0xd1, 0x43, 0x01, 0x54, 0xd1, 0x4b, 0x46, - 0x68, 0x1b, 0x18, 0xed, 0x23, 0x80, 0x36, 0x01, 0x01, 0xdb, 0x37, 0x01, 0x42, 0x9e, 0xd1, 0xb7, - 0x4b, 0x3e, 0x68, 0x1a, 0x2a, 0x00, 0xdb, 0x02, 0x21, 0x04, 0x43, 0x0a, 0x60, 0x1a, 0x2c, 0x00, - 0xd0, 0x02, 0x1c, 0x20, 0xf0, 0x00, 0xfb, 0x6a, 0x4b, 0x38, 0x4c, 0x39, 0x68, 0x1b, 0x93, 0x05, - 0x2b, 0x03, 0xdd, 0x2e, 0x4b, 0x38, 0x98, 0x04, 0x68, 0x1d, 0x1c, 0x29, 0xf0, 0x00, 0xfb, 0x7e, - 0x68, 0x23, 0x08, 0xc2, 0x24, 0x07, 0x00, 0x91, 0x58, 0xc9, 0x40, 0x20, 0x23, 0x00, 0x4e, 0x31, - 0x24, 0x01, 0xe0, 0x05, 0x5c, 0xb7, 0x41, 0x1f, 0x42, 0x3c, 0xd0, 0x00, 0x19, 0x49, 0x33, 0x01, - 0x42, 0x83, 0xd3, 0xf7, 0x9a, 0x04, 0x3d, 0x01, 0x40, 0x15, 0x9a, 0x05, 0x19, 0x49, 0x4b, 0x26, - 0x07, 0x92, 0xd5, 0x01, 0x68, 0x18, 0xe0, 0x01, 0x68, 0x18, 0x00, 0x89, 0x22, 0x00, 0xf0, 0x00, - 0xfb, 0x59, 0x4b, 0x21, 0x99, 0x03, 0x68, 0x18, 0x9a, 0x02, 0xf0, 0x00, 0xfb, 0x5b, 0x24, 0x00, - 0xe0, 0x32, 0x68, 0x21, 0x29, 0x00, 0xd0, 0x02, 0x20, 0x00, 0xf0, 0x00, 0xfb, 0x57, 0x4b, 0x1c, - 0x22, 0x00, 0x60, 0x1a, 0xe0, 0x26, 0x4c, 0x1e, 0x9b, 0x04, 0x68, 0x20, 0x9a, 0x02, 0x62, 0x03, - 0x9b, 0x03, 0x63, 0xc2, 0x61, 0x03, 0x61, 0x82, 0x21, 0x40, 0xf0, 0x00, 0xfb, 0x27, 0x98, 0x03, - 0x99, 0x02, 0xf0, 0x00, 0xfb, 0x23, 0x4b, 0x17, 0x68, 0x1b, 0x2b, 0x00, 0xd0, 0x04, 0x68, 0x23, - 0x68, 0x28, 0x49, 0x15, 0x93, 0x00, 0xe0, 0x03, 0x68, 0x23, 0x49, 0x14, 0x68, 0x28, 0x93, 0x00, - 0x22, 0x02, 0x23, 0x01, 0xf0, 0x00, 0xfb, 0x02, 0x99, 0x02, 0x1c, 0x04, 0x98, 0x03, 0xf0, 0x00, - 0xfb, 0x15, 0xe0, 0x01, 0x24, 0x01, 0x42, 0x64, 0xb0, 0x07, 0x1c, 0x20, 0xbc, 0xf0, 0xbc, 0x02, - 0x47, 0x08, 0x46, 0xc0, 0x13, 0x77, 0xec, 0x20, 0x13, 0x77, 0xe2, 0x84, 0x13, 0x77, 0xec, 0x24, - 0x13, 0x77, 0xeb, 0x0c, 0x13, 0x77, 0xec, 0x40, 0x13, 0x77, 0xeb, 0x3c, 0x00, 0x00, 0x07, 0xf7, - 0x13, 0x77, 0xeb, 0xc4, 0x13, 0x77, 0xec, 0x28, 0x57, 0x46, 0x53, 0x03, 0x57, 0x46, 0x53, 0x02, - 0xb5, 0xf0, 0xb0, 0x85, 0x1c, 0x05, 0x1c, 0x0e, 0x92, 0x03, 0x28, 0x01, 0xd9, 0x00, 0xe0, 0x9e, - 0x4a, 0x53, 0x4b, 0x54, 0x68, 0x11, 0x42, 0x99, 0xd1, 0x02, 0x23, 0x01, 0x42, 0x5b, 0x60, 0x13, - 0x4b, 0x51, 0x68, 0x1a, 0x2a, 0x00, 0xd1, 0x02, 0x4a, 0x50, 0x60, 0x1a, 0xe0, 0x05, 0x4b, 0x4c, - 0x68, 0x18, 0x28, 0x00, 0xdb, 0x01, 0xf0, 0x00, 0xfa, 0xf5, 0x48, 0x49, 0x23, 0x01, 0x42, 0x5b, - 0x60, 0x03, 0x4a, 0x4b, 0x4b, 0x4b, 0x21, 0x00, 0x60, 0x11, 0x60, 0x19, 0x78, 0x31, 0x29, 0x5f, - 0xd1, 0x38, 0x78, 0x71, 0x29, 0x4e, 0xd1, 0x0c, 0x78, 0xb2, 0x2a, 0x55, 0xd1, 0x32, 0x78, 0xf2, - 0x2a, 0x4c, 0xd1, 0x2f, 0x22, 0x01, 0x60, 0x1a, 0x4b, 0x43, 0x60, 0x1a, 0x4b, 0x3d, 0x60, 0x03, - 0xe0, 0x70, 0x29, 0x44, 0xd1, 0x26, 0x78, 0xb1, 0x29, 0x45, 0xd1, 0x1c, 0x78, 0xf2, 0x2a, 0x56, - 0xd1, 0x20, 0x22, 0x01, 0x60, 0x1a, 0x79, 0x32, 0x2a, 0x57, 0xd1, 0x01, 0x22, 0x02, 0x60, 0x1a, - 0x4c, 0x3a, 0x21, 0x80, 0x1c, 0x20, 0x00, 0x49, 0xf0, 0x00, 0xfa, 0xa8, 0x1c, 0x20, 0x21, 0x00, - 0xf0, 0x00, 0xfa, 0x82, 0x4b, 0x2e, 0x1c, 0x05, 0x60, 0x18, 0x28, 0x00, 0xda, 0x52, 0x4b, 0x31, - 0x22, 0x00, 0x60, 0x1a, 0xe0, 0x4f, 0x29, 0x56, 0xd1, 0x04, 0x78, 0xf3, 0x2b, 0x44, 0xd1, 0x01, - 0x23, 0x01, 0x60, 0x13, 0x4b, 0x2e, 0x00, 0xaa, 0x58, 0xd0, 0x21, 0x01, 0xf0, 0x00, 0xfa, 0x6c, - 0x4c, 0x23, 0x60, 0x20, 0x28, 0x00, 0xda, 0x06, 0x2d, 0x00, 0xd1, 0x04, 0x48, 0x29, 0x21, 0x01, - 0xf0, 0x00, 0xfa, 0x62, 0x60, 0x20, 0x4f, 0x1e, 0x68, 0x3d, 0x2d, 0x00, 0xdb, 0x33, 0x4c, 0x1e, - 0x1c, 0x31, 0x68, 0x20, 0x22, 0x06, 0x30, 0x20, 0xf0, 0x00, 0xfa, 0x7c, 0x68, 0x20, 0xa9, 0x03, - 0x22, 0x04, 0x30, 0x3c, 0xf0, 0x00, 0xfa, 0x76, 0x68, 0x20, 0x26, 0x04, 0x1c, 0x03, 0x33, 0x20, - 0x60, 0x03, 0x23, 0x06, 0x60, 0x43, 0x1c, 0x03, 0x33, 0x3c, 0x60, 0x83, 0x60, 0xc6, 0x21, 0x40, - 0xf0, 0x00, 0xfa, 0x5c, 0x68, 0x23, 0x68, 0x38, 0x49, 0x17, 0x93, 0x00, 0x22, 0x02, 0x23, 0x00, - 0xf0, 0x00, 0xfa, 0x44, 0x1c, 0x05, 0x68, 0x20, 0x21, 0x40, 0x1c, 0x03, 0x33, 0x20, 0x60, 0x03, - 0x33, 0x1c, 0x60, 0x46, 0x60, 0x83, 0x60, 0xc6, 0xf0, 0x00, 0xfa, 0x48, 0xe0, 0x03, 0x25, 0x01, - 0x42, 0x6d, 0xe0, 0x00, 0x25, 0x00, 0xb0, 0x05, 0x1c, 0x28, 0xbc, 0xf0, 0xbc, 0x02, 0x47, 0x08, - 0x13, 0x77, 0xe2, 0x84, 0x00, 0x66, 0x69, 0x99, 0x13, 0x77, 0xeb, 0xc4, 0x13, 0x77, 0xeb, 0xe0, - 0x13, 0x77, 0xec, 0x28, 0x13, 0x77, 0xec, 0x24, 0x13, 0x77, 0xec, 0x20, 0x13, 0x77, 0xe2, 0xa0, - 0x13, 0x77, 0xd9, 0x3c, 0x13, 0x77, 0xd9, 0x20, 0x57, 0x46, 0x53, 0x01, 0xb4, 0x7c, 0xb5, 0x00, - 0xf7, 0xfe, 0xfe, 0xaa, 0xbc, 0x02, 0xbc, 0x7c, 0x47, 0x08, 0xb5, 0x70, 0xb0, 0x88, 0x68, 0x85, - 0x1c, 0x01, 0x4b, 0x01, 0x47, 0x18, 0x00, 0x00, 0x20, 0x10, 0x00, 0xd5, 0x00, 0x00, 0x00, 0x00, - 0xe6, 0x00, 0x08, 0x10, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x07, 0xf0, 0xe1, 0x2f, 0xff, 0x1e, - 0xe6, 0x00, 0x03, 0x30, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x03, 0x50, 0xe1, 0x2f, 0xff, 0x1e, - 0xe6, 0x00, 0x03, 0x90, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x03, 0xb0, 0xe1, 0x2f, 0xff, 0x1e, - 0xe6, 0x00, 0x03, 0xd0, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x03, 0xf0, 0xe1, 0x2f, 0xff, 0x1e, - 0xe6, 0x00, 0x04, 0x10, 0xe1, 0x2f, 0xff, 0x1e, 0xe6, 0x00, 0x04, 0x50, 0xe1, 0x2f, 0xff, 0x1e, - 0xef, 0x00, 0x00, 0xcc, 0xe1, 0x2f, 0xff, 0x1e, 0x46, 0x72, 0x1c, 0x01, 0x20, 0x04, 0xdf, 0xab, - 0x47, 0x10, 0x46, 0xc0, 0x46, 0xc0, 0x46, 0xc0, 0x46, 0xc0, 0x46, 0xc0, 0x46, 0xc0, 0x46, 0xc0, - 0xe9, 0x2d, 0x40, 0x80, 0xe5, 0x9f, 0x70, 0xac, 0xe5, 0x97, 0x70, 0x00, 0xeb, 0x00, 0x00, 0x1f, - 0xe8, 0xbd, 0x40, 0x80, 0xe1, 0x2f, 0xff, 0x1e, 0xe9, 0x2d, 0x40, 0x80, 0xe5, 0x9f, 0x70, 0x98, - 0xe5, 0x97, 0x70, 0x00, 0xeb, 0x00, 0x00, 0x19, 0xe8, 0xbd, 0x40, 0x80, 0xe1, 0x2f, 0xff, 0x1e, - 0xe9, 0x2d, 0x40, 0x80, 0xe5, 0x9f, 0x70, 0x84, 0xe5, 0x97, 0x70, 0x00, 0xeb, 0x00, 0x00, 0x13, - 0xe8, 0xbd, 0x40, 0x80, 0xe1, 0x2f, 0xff, 0x1e, 0xe9, 0x2d, 0x40, 0x80, 0xe5, 0x9f, 0x70, 0x70, - 0xe5, 0x97, 0x70, 0x00, 0xeb, 0x00, 0x00, 0x0d, 0xe8, 0xbd, 0x40, 0x80, 0xe1, 0x2f, 0xff, 0x1e, - 0xe9, 0x2d, 0x40, 0x80, 0xe5, 0x9f, 0x70, 0x5c, 0xe5, 0x97, 0x70, 0x00, 0xeb, 0x00, 0x00, 0x07, - 0xe8, 0xbd, 0x40, 0x80, 0xe1, 0x2f, 0xff, 0x1e, 0xe9, 0x2d, 0x40, 0x80, 0xe5, 0x9f, 0x70, 0x48, - 0xe5, 0x97, 0x70, 0x00, 0xeb, 0x00, 0x00, 0x01, 0xe8, 0xbd, 0x40, 0x80, 0xe1, 0x2f, 0xff, 0x1e, - 0xe1, 0x2f, 0xff, 0x17, 0xb5, 0xf0, 0x46, 0x5f, 0x46, 0x56, 0x46, 0x4d, 0x46, 0x44, 0xb4, 0xf0, - 0x4b, 0x0b, 0x68, 0x1b, 0x47, 0x18, 0x00, 0x00, 0xe3, 0xc0, 0x01, 0x02, 0xe1, 0x2f, 0xff, 0x1e, - 0xe3, 0x80, 0x01, 0x02, 0xe1, 0x2f, 0xff, 0x1e, 0x13, 0x77, 0xc0, 0x10, 0x13, 0x77, 0xc0, 0x14, - 0x13, 0x77, 0xc0, 0x18, 0x13, 0x77, 0xc0, 0x1c, 0x13, 0x77, 0xc0, 0x20, 0x13, 0x77, 0xc0, 0x24, - 0x13, 0x77, 0xc0, 0x0c, 0xe1, 0xa0, 0x00, 0x00, 0xe1, 0xa0, 0x00, 0x00, 0xe1, 0xa0, 0x00, 0x00, - 0xe2, 0x51, 0x20, 0x01, 0x01, 0x2f, 0xff, 0x1e, 0x3a, 0x00, 0x00, 0x36, 0xe1, 0x50, 0x00, 0x01, - 0x9a, 0x00, 0x00, 0x22, 0xe1, 0x11, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x23, 0xe3, 0x11, 0x02, 0x0e, - 0x01, 0xa0, 0x11, 0x81, 0x03, 0xa0, 0x30, 0x08, 0x13, 0xa0, 0x30, 0x01, 0xe3, 0x51, 0x02, 0x01, - 0x31, 0x51, 0x00, 0x00, 0x31, 0xa0, 0x12, 0x01, 0x31, 0xa0, 0x32, 0x03, 0x3a, 0xff, 0xff, 0xfa, - 0xe3, 0x51, 0x01, 0x02, 0x31, 0x51, 0x00, 0x00, 0x31, 0xa0, 0x10, 0x81, 0x31, 0xa0, 0x30, 0x83, - 0x3a, 0xff, 0xff, 0xfa, 0xe3, 0xa0, 0x20, 0x00, 0xe1, 0x50, 0x00, 0x01, 0x20, 0x40, 0x00, 0x01, - 0x21, 0x82, 0x20, 0x03, 0xe1, 0x50, 0x00, 0xa1, 0x20, 0x40, 0x00, 0xa1, 0x21, 0x82, 0x20, 0xa3, - 0xe1, 0x50, 0x01, 0x21, 0x20, 0x40, 0x01, 0x21, 0x21, 0x82, 0x21, 0x23, 0xe1, 0x50, 0x01, 0xa1, - 0x20, 0x40, 0x01, 0xa1, 0x21, 0x82, 0x21, 0xa3, 0xe3, 0x50, 0x00, 0x00, 0x11, 0xb0, 0x32, 0x23, - 0x11, 0xa0, 0x12, 0x21, 0x1a, 0xff, 0xff, 0xef, 0xe1, 0xa0, 0x00, 0x02, 0xe1, 0x2f, 0xff, 0x1e, - 0x03, 0xa0, 0x00, 0x01, 0x13, 0xa0, 0x00, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 0xe3, 0x51, 0x08, 0x01, - 0x21, 0xa0, 0x18, 0x21, 0x23, 0xa0, 0x20, 0x10, 0x33, 0xa0, 0x20, 0x00, 0xe3, 0x51, 0x0c, 0x01, - 0x21, 0xa0, 0x14, 0x21, 0x22, 0x82, 0x20, 0x08, 0xe3, 0x51, 0x00, 0x10, 0x21, 0xa0, 0x12, 0x21, - 0x22, 0x82, 0x20, 0x04, 0xe3, 0x51, 0x00, 0x04, 0x82, 0x82, 0x20, 0x03, 0x90, 0x82, 0x20, 0xa1, - 0xe1, 0xa0, 0x02, 0x30, 0xe1, 0x2f, 0xff, 0x1e, 0xe1, 0x2f, 0xff, 0x1f, 0xe1, 0xa0, 0x00, 0x00, - 0xe3, 0x50, 0x00, 0x00, 0x13, 0xe0, 0x00, 0x00, 0xea, 0x00, 0x00, 0x6c, 0xe3, 0x51, 0x00, 0x00, - 0x0a, 0xff, 0xff, 0xf8, 0xe9, 0x2d, 0x40, 0x03, 0xeb, 0xff, 0xff, 0xbc, 0xe8, 0xbd, 0x40, 0x06, - 0xe0, 0x03, 0x00, 0x92, 0xe0, 0x41, 0x10, 0x03, 0xe1, 0x2f, 0xff, 0x1e, 0x47, 0x70, 0x46, 0xc0, - 0xb5, 0xf0, 0x1c, 0x05, 0x1c, 0x0e, 0x1c, 0x14, 0x2a, 0x0f, 0xd9, 0x03, 0x1c, 0x0b, 0x43, 0x03, - 0x07, 0x9f, 0xd0, 0x0a, 0x2c, 0x00, 0xd0, 0x05, 0x23, 0x00, 0x5c, 0xf2, 0x54, 0xea, 0x33, 0x01, - 0x42, 0xa3, 0xd1, 0xfa, 0xbc, 0xf0, 0xbc, 0x02, 0x47, 0x08, 0x1c, 0x15, 0x1c, 0x0c, 0x1c, 0x03, - 0x68, 0x26, 0x60, 0x1e, 0x68, 0x66, 0x60, 0x5e, 0x68, 0xa6, 0x60, 0x9e, 0x68, 0xe6, 0x3d, 0x10, - 0x60, 0xde, 0x34, 0x10, 0x33, 0x10, 0x2d, 0x0f, 0xd8, 0xf2, 0x3a, 0x10, 0x09, 0x17, 0x1c, 0x7e, - 0x01, 0x3f, 0x01, 0x36, 0x1b, 0xd7, 0x19, 0x85, 0x1c, 0x3c, 0x19, 0x8e, 0x2f, 0x03, 0xd9, 0xd9, - 0x1c, 0x34, 0x1c, 0x3b, 0x1c, 0x2a, 0xcc, 0x02, 0x3b, 0x04, 0xc2, 0x02, 0x2b, 0x03, 0xd8, 0xfa, - 0x3f, 0x04, 0x08, 0xbc, 0x1c, 0x63, 0x00, 0x9b, 0x00, 0xa4, 0x18, 0xed, 0x18, 0xf6, 0x1b, 0x3c, - 0xe7, 0xc8, 0x46, 0xc0, 0xb5, 0x70, 0x1c, 0x03, 0x07, 0x84, 0xd0, 0x0d, 0x2a, 0x00, 0xd0, 0x40, - 0x06, 0x0d, 0x3a, 0x01, 0x0e, 0x2d, 0x24, 0x03, 0xe0, 0x02, 0x2a, 0x00, 0xd0, 0x39, 0x3a, 0x01, - 0x70, 0x1d, 0x33, 0x01, 0x42, 0x23, 0xd1, 0xf8, 0x2a, 0x03, 0xd9, 0x29, 0x25, 0xff, 0x40, 0x0d, - 0x02, 0x2c, 0x43, 0x25, 0x04, 0x2c, 0x1c, 0x1e, 0x43, 0x25, 0x2a, 0x0f, 0xd9, 0x12, 0x1c, 0x1c, - 0x1c, 0x16, 0x3e, 0x10, 0x60, 0x25, 0x60, 0x65, 0x60, 0xa5, 0x60, 0xe5, 0x34, 0x10, 0x2e, 0x0f, - 0xd8, 0xf7, 0x3a, 0x10, 0x09, 0x16, 0x36, 0x01, 0x01, 0x36, 0x19, 0x9e, 0x23, 0x0f, 0x40, 0x1a, - 0x2a, 0x03, 0xd9, 0x0c, 0x1c, 0x34, 0x1c, 0x13, 0x3b, 0x04, 0xc4, 0x20, 0x2b, 0x03, 0xd8, 0xfb, - 0x3a, 0x04, 0x08, 0x93, 0x33, 0x01, 0x00, 0x9b, 0x18, 0xf6, 0x23, 0x03, 0x40, 0x1a, 0x1c, 0x33, - 0x2a, 0x00, 0xd0, 0x06, 0x06, 0x09, 0x0e, 0x0c, 0x21, 0x00, 0x54, 0x5c, 0x31, 0x01, 0x42, 0x8a, - 0xd1, 0xfb, 0xbc, 0x70, 0xbc, 0x02, 0x47, 0x08, 0x48, 0x45, 0x4c, 0x4f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x2f, 0x64, 0x65, 0x76, 0x2f, 0x75, 0x73, 0x62, 0x31, 0x32, 0x33, 0x00, 0x2f, 0x64, 0x65, 0x76, - 0x2f, 0x73, 0x64, 0x69, 0x6f, 0x2f, 0x73, 0x64, 0x68, 0x63, 0x00, 0x00, 0x13, 0x77, 0xd9, 0x20, - 0x13, 0x77, 0xd9, 0x2c, 0x13, 0x77, 0xd9, 0x20, 0x47, 0x78, 0x46, 0xc0, 0xea, 0xff, 0xff, 0x07, - 0xe5, 0x9f, 0xc0, 0x00, 0xe1, 0x2f, 0xff, 0x1c, 0x13, 0x77, 0xd7, 0xbd, 0x47, 0x78, 0x46, 0xc0, - 0xea, 0xff, 0xff, 0x0c, 0x47, 0x78, 0x46, 0xc0, 0xea, 0xff, 0xff, 0x2c, 0x47, 0x78, 0x46, 0xc0, - 0xea, 0xff, 0xff, 0x18, 0x47, 0x78, 0x46, 0xc0, 0xea, 0xff, 0xff, 0x10, 0x47, 0x78, 0x46, 0xc0, - 0xea, 0xff, 0xfe, 0xf2, 0x47, 0x78, 0x46, 0xc0, 0xea, 0xff, 0xff, 0x36, 0x47, 0x78, 0x46, 0xc0, - 0xea, 0xff, 0xfe, 0xf0, 0x47, 0x78, 0x46, 0xc0, 0xea, 0xff, 0xff, 0x14, 0x47, 0x78, 0x46, 0xc0, - 0xea, 0xff, 0xfe, 0xee, 0x47, 0x78, 0x46, 0xc0, 0xea, 0xff, 0xfe, 0xf8, 0x47, 0x78, 0x46, 0xc0, - 0xea, 0xff, 0xff, 0x3a, 0x47, 0x78, 0x46, 0xc0, 0xea, 0xff, 0xfe, 0xf0, 0x47, 0x78, 0x46, 0xc0, - 0xea, 0xff, 0xfe, 0xe8, 0x47, 0x78, 0x46, 0xc0, 0xea, 0xff, 0xfe, 0xea, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x2f, 0x64, 0x65, 0x76, 0x2f, 0x73, 0x64, 0x69, 0x6f, 0x2f, 0x73, 0x64, 0x68, 0x63, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x02, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x2f, 0x64, 0x65, 0x76, 0x2f, 0x75, 0x73, 0x62, 0x31, 0x32, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - -}; -#define size_odip_frag 9120 diff --git a/source/mload/modules/odip_frag.h b/source/mload/modules/odip_frag.h deleted file mode 100644 index 43abdc30..00000000 --- a/source/mload/modules/odip_frag.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef ODIP_FRAG_H_ -#define ODIP_FRAG_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -extern unsigned char odip_frag[9120]; - -#define odip_frag_size sizeof(odip_frag) - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/network/FileDownloader.cpp b/source/network/FileDownloader.cpp deleted file mode 100644 index 94895896..00000000 --- a/source/network/FileDownloader.cpp +++ /dev/null @@ -1,289 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#include -#include -#include -#include "language/gettext.h" -#include "networkops.h" -#include "http.h" -#include "FileOperations/fileops.h" -#include "prompts/PromptWindows.h" -#include "prompts/ProgressWindow.h" -#include "utils/ShowError.h" - -/**************************************************************************** - * Download a file from a given url with a Progressbar - ****************************************************************************/ -int DownloadFileToMem(const char *url, u8 **inbuffer, u32 *size) -{ - if(strncasecmp(url, "http://", strlen("http://")) != 0) - { - ShowError(tr("Not a valid URL")); - return -1; - } - char *path = strchr(url + strlen("http://"), '/'); - - if(!path) - { - ShowError(tr("Not a valid URL path")); - return -2; - } - - int domainlength = path - url - strlen("http://"); - - if(domainlength == 0) - { - ShowError(tr("Not a valid domain")); - return -3; - } - - char domain[domainlength + 1]; - strncpy(domain, url + strlen("http://"), domainlength); - domain[domainlength] = '\0'; - - int connection = GetConnection(domain); - - if(connection < 0) - { - ShowError(tr("Could not connect to the server.")); - return -4; - } - - char header[1024]; - char * ptr = header; - ptr += sprintf(ptr, "GET %s HTTP/1.1\r\n", path); - ptr += sprintf(ptr, "Host: %s\r\n", domain); - ptr += sprintf(ptr, "Referer: %s\r\n", domain); - ptr += sprintf(ptr, "User-Agent: USB Loader GX\r\n"); - ptr += sprintf(ptr, "Pragma: no-cache\r\n"); - ptr += sprintf(ptr, "Cache-Control: no-cache\r\n"); - ptr += sprintf(ptr, "Connection: close\r\n\r\n"); - - char filename[255]; - memset(filename, 0, sizeof(filename)); - - int filesize = network_request(connection, header, filename); - - if(filesize <= 0) - { - net_close(connection); - ShowError(tr("Filesize is 0 Byte.")); - return -5; - } - - int blocksize = 10*1024; - - u8 * buffer = (u8 *) malloc(filesize); - if(!buffer) - { - net_close(connection); - ShowError(tr("Not enough memory.")); - return -6; - } - - int done = 0; - - while(done < filesize) - { - ShowProgress(tr("Downloading file..."), 0, filename, (f32) done, (f32) filesize, true, true); - - if(blocksize > filesize - done) - blocksize = filesize - done; - - - s32 read = network_read(connection, buffer+done, blocksize); - - if(read < 0) - { - free(buffer); - ProgressStop(); - net_close(connection); - ShowError(tr("Transfer failed")); - return -8; - } - else if(!read) - break; - - done += read; - } - - ProgressStop(); - net_close(connection); - - *inbuffer = buffer; - *size = filesize; - - return 1; -} - -/**************************************************************************** - * Download a file from a given url to a given path with a Progressbar - ****************************************************************************/ -int DownloadFileToPath(const char *orig_url, const char *dest, bool UseFilename) -{ - if(!orig_url || !dest) - { - ShowError(tr("No URL or Path specified.")); - return -2; - } - - bool addhttp = false; - - if(strncasecmp(orig_url, "http://", strlen("http://")) != 0) - { - addhttp = true; - } - - char url[strlen(orig_url) + (addhttp ? strlen("http://") : 0) + 1]; - - if(addhttp) - snprintf(url, sizeof(url), "http://%s", orig_url); - else - strcpy(url, orig_url); - - char *path = strchr(url + strlen("http://"), '/'); - - if(!path) - { - ShowError(tr("Not a valid URL path")); - return -2; - } - - int domainlength = path - url - strlen("http://"); - - if(domainlength == 0) - { - ShowError(tr("Not a valid domain")); - return -3; - } - - char domain[domainlength + 1]; - strncpy(domain, url + strlen("http://"), domainlength); - domain[domainlength] = '\0'; - - int connection = GetConnection(domain); - - if(connection < 0) - { - ShowError(tr("Could not connect to the server.")); - return -4; - } - - char header[1024]; - char * ptr = header; - ptr += sprintf(ptr, "GET %s HTTP/1.1\r\n", path); - ptr += sprintf(ptr, "Host: %s\r\n", domain); - ptr += sprintf(ptr, "Referer: %s\r\n", domain); - ptr += sprintf(ptr, "User-Agent: WiiXplorer\r\n"); - ptr += sprintf(ptr, "Pragma: no-cache\r\n"); - ptr += sprintf(ptr, "Cache-Control: no-cache\r\n"); - ptr += sprintf(ptr, "Connection: close\r\n\r\n"); - - char filename[255]; - memset(filename, 0, sizeof(filename)); - - int filesize = network_request(connection, header, filename); - - if(filesize <= 0) - { - net_close(connection); - ShowError(tr("Filesize is %i Byte."), filesize); - return -5; - } - - int blocksize = 10*1024; - - u8 *buffer = (u8 *) malloc(blocksize); - if(!buffer) - { - net_close(connection); - ShowError(tr("Not enough memory.")); - return -6; - } - - if(UseFilename) - { - if(dest[strlen(dest)-1] != '/') - strcat((char *) dest, "/"); - - CreateSubfolder(dest); - - strcat((char *) dest, filename); - } - - if(!UseFilename && strcmp(filename, "") == 0) - { - const char * ptr = strrchr(dest, '/'); - if(ptr) ptr++; - else ptr = dest; - - snprintf(filename, sizeof(filename), "%s", ptr); - } - - FILE *file = fopen(dest, "wb"); - if(!file) - { - net_close(connection); - free(buffer); - ShowError(tr("Cannot write to destination.")); - return -7; - } - - int done = 0; - - while(done < filesize) - { - ShowProgress(tr("Downloading file..."), 0, filename, (f32) done, (f32) filesize, true, true); - - if(blocksize > filesize - done) - blocksize = filesize - done; - - s32 read = network_read(connection, buffer, blocksize); - - if(read < 0) - { - free(buffer); - ProgressStop(); - net_close(connection); - fclose(file); - ShowError(tr("Transfer failed")); - return -8; - } - else if(!read) - break; - - fwrite(buffer, 1, read, file); - - done += read; - } - - free(buffer); - ProgressStop(); - net_close(connection); - fclose(file); - - return done; -} diff --git a/source/network/FileDownloader.h b/source/network/FileDownloader.h deleted file mode 100644 index 3fd2f24b..00000000 --- a/source/network/FileDownloader.h +++ /dev/null @@ -1,32 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#ifndef FILE_DOWNLOADER_H_ -#define FILE_DOWNLOADER_H_ - -int DownloadFileToMem(const char *url, u8 **inbuffer, u32 *size); -int DownloadFileToPath(const char *url, const char *dest, bool UseFilename = true); - -#endif diff --git a/source/network/HTML_Stream.cpp b/source/network/HTML_Stream.cpp deleted file mode 100644 index ffac2d61..00000000 --- a/source/network/HTML_Stream.cpp +++ /dev/null @@ -1,183 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * HTML_Stream Class - * - * for WiiXplorer 2010 - ***************************************************************************/ -#include -#include -#include - -#include "HTML_Stream.h" -#include "networkops.h" -#include "http.h" - -#define htmlstringcompare(text, cmp, pos) strncasecmp((const char*) &text[pos], (const char*) cmp, strlen((const char*) cmp)) - -HTML_Stream::HTML_Stream() -{ - HTML_File = NULL; - position = 0; - filesize = 0; -} - -HTML_Stream::HTML_Stream(const char * url) -{ - HTML_File = NULL; - position = 0; - filesize = 0; - - LoadLink(url); -} - -HTML_Stream::~HTML_Stream() -{ - if (HTML_File) free(HTML_File); -} - -bool HTML_Stream::LoadLink(const char * url) -{ - if (!IsNetworkInit()) return false; - - struct block file = downloadfile(url); - - if (!file.data || !file.size) return false; - - if (HTML_File) free(HTML_File); - - HTML_File = (char *) file.data; - filesize = file.size; - position = 0; - - return true; -} - -const char * HTML_Stream::FindStringStart(const char * string) -{ - if (!HTML_File) return NULL; - - while ((u32) position < filesize) - { - if (htmlstringcompare( HTML_File, string, position ) == 0) break; - - position++; - } - - return &HTML_File[position]; -} - -const char * HTML_Stream::FindStringEnd(const char * string) -{ - if (!HTML_File) return NULL; - - while ((u32) position < filesize) - { - if (htmlstringcompare( HTML_File, string, position ) == 0) break; - - position++; - } - - if ((u32) position >= filesize) - { - return NULL; - } - - position += strlen(string); - - return &HTML_File[position]; -} - -char * HTML_Stream::CopyString(const char * stopat) -{ - if (!stopat || !HTML_File) return NULL; - - u32 blocksize = 1024; - u32 counter = 0; - u32 allocatedsize = 0; - - char * outtext = (char*) malloc(blocksize); - if (!outtext) return NULL; - - allocatedsize = blocksize; - memset(outtext, 0, blocksize); - - while ((htmlstringcompare( HTML_File, stopat, position ) != 0) && (position + strlen(stopat) < filesize)) - { - if (counter > blocksize) - { - blocksize += 1024; - char * tmpblock = (char*) realloc(outtext, blocksize); - if (!tmpblock) - { - free(outtext); - outtext = NULL; - free(tmpblock); - return NULL; - } - - outtext = tmpblock; - } - - outtext[counter] = HTML_File[position]; - position++; - counter++; - } - - outtext[counter] = '\0'; - outtext = (char*) realloc(outtext, counter + 1); - - return outtext; -} - -int HTML_Stream::Seek(u32 pos, int origin) -{ - if (!HTML_File) return -1; - - switch (origin) - { - case SEEK_SET: - position = pos; - break; - case SEEK_CUR: - position += pos; - break; - case SEEK_END: - position = filesize + pos; - break; - } - - return 0; -} - -void HTML_Stream::Rewind() -{ - if (!HTML_File) return; - - position = 0; -} - -int HTML_Stream::GetPosition() -{ - return position; -} diff --git a/source/network/HTML_Stream.h b/source/network/HTML_Stream.h deleted file mode 100644 index c2b30603..00000000 --- a/source/network/HTML_Stream.h +++ /dev/null @@ -1,68 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * HTML_Stream Class - * - * for WiiXplorer 2010 - ***************************************************************************/ -#ifndef ___HTML_STREAM_H_ -#define ___HTML_STREAM_H_ - -#include - -class HTML_Stream -{ - public: - //!Constructor - HTML_Stream(); - //!\param url from where to the HTML file - HTML_Stream(const char * url); - //!Destructor - ~HTML_Stream(); - //!Load url - bool LoadLink(const char * url); - //! Find start of a string from current position in the html - //!\param string to find - const char * FindStringStart(const char * string); - //! Find end of a string from current position in the html - //!\param string to find - const char * FindStringEnd(const char * string); - //!CopyString from current position in html till stopat string - //!\param stopat string before which to stop copying (e.g. ) - //!\param outtext variable is allocated with malloc and must be set 0 before - char * CopyString(const char * stopat); - //!Seek position in file - //!\param position seeked - //!\param seek origin (SEEK_SET, SEEK_CUR, SEEK_END) - int Seek(u32 pos, int origin); - //!Rewind to the start of the html - void Rewind(); - //!Get current position - int GetPosition(); - protected: - int position; - u32 filesize; - char * HTML_File; -}; - -#endif diff --git a/source/network/ImageDownloader.cpp b/source/network/ImageDownloader.cpp deleted file mode 100644 index bf5fecd1..00000000 --- a/source/network/ImageDownloader.cpp +++ /dev/null @@ -1,334 +0,0 @@ -#include -#include -#include "ImageDownloader.h" -#include "network/networkops.h" -#include "prompts/PromptWindows.h" -#include "prompts/ProgressWindow.h" -#include "prompts/CheckboxPrompt.hpp" -#include "FileOperations/fileops.h" -#include "settings/CSettings.h" -#include "settings/GameTitles.h" -#include "language/gettext.h" -#include "usbloader/GetMissingGameFiles.hpp" -#include "utils/StringTools.h" -#include "gecko.h" - -#define VALID_IMAGE(x) (!(x.size == 36864 || x.size <= 1024 || x.size == 7386 || x.size <= 1174 || x.size == 4446 || x.data == NULL)) - -static const char *serverURL3D = "http://wiitdb.com/wiitdb/artwork/cover3D/"; -static const char *serverURL2D = "http://wiitdb.com/wiitdb/artwork/cover/"; -static const char *serverURLFullHQ = "http://wiitdb.com/wiitdb/artwork/coverfullHQ/"; -static const char *serverURLFull = "http://wiitdb.com/wiitdb/artwork/coverfull/"; -static const char *serverURLOrigDiscs = "http://wiitdb.com/wiitdb/artwork/disc/"; -static const char *serverURLCustomDiscs = "http://wiitdb.com/wiitdb/artwork/disccustom/"; - -static bool AbortRequested = false; - -static void AbortCallback(void) -{ - AbortRequested = true; -} - -void ImageDownloader::DownloadImages() -{ - int choice = CheckboxWindow(tr( "Cover Download" ), 0, tr( "3D Covers" ), tr( "Flat Covers" ), tr("Full HQ Covers"), tr("Full LQ Covers"), tr( "Original Discarts" ), tr( "Custom Discarts" )); // ask for download choice - if (choice == 0) - return; - - ImageDownloader Downloader; - Downloader.SetChoices(choice); - Downloader.Start(); -} - -void ImageDownloader::Start() -{ - gprintf("CoverDownload start - choices: %04X\n", choices); - - MissingImagesCount = 0; - FindMissingImages(); - - if(MissingImagesCount == 0) - { - WindowPrompt(tr( "No file missing!" ), 0, tr("OK")); - return; - } - - u32 TotalDownloadCount = MissingImagesCount; - - if (WindowPrompt(tr("Found missing images."), fmt(tr("%i missing files"), TotalDownloadCount), tr( "Yes" ), tr( "No" )) == 0) - return; - - if (!IsNetworkInit() && !NetworkInitPrompt()) - { - gprintf("No network\n"); - return; - } - - AbortRequested = false; - ProgressSetAbortCallback(AbortCallback); - - DownloadProcess(TotalDownloadCount); - - ProgressSetAbortCallback(NULL); - ProgressStop(); - - if(MissingImagesCount == 0) - WindowPrompt(tr("Download finished"), tr("All images downloaded successfully."), tr( "OK" )); - else - { - int res = WindowPrompt(tr( "Download finished" ), fmt(tr("%i files not found on the server!"), MissingImagesCount), tr("Save List"), tr( "OK" )); - if(res) - CreateCSVLog(); - } -} - -void ImageDownloader::FindMissingImages() -{ - if(choices & CheckedBox1) - FindMissing(Settings.covers_path, serverURL3D, NULL, tr("Downloading 3D Covers")); - - if(choices & CheckedBox2) - FindMissing(Settings.covers2d_path, serverURL2D, NULL, tr("Downloading Flat Covers")); - - if(choices & CheckedBox3) - FindMissing(Settings.coversFull_path, serverURLFullHQ, (choices & CheckedBox4) ? serverURLFull : NULL, tr("Downloading Full HQ Covers")); - - if(choices & CheckedBox4) - FindMissing(Settings.coversFull_path, serverURLFull, NULL, tr("Downloading Full LQ Covers")); - - if(choices & CheckedBox5) - { - const char * downloadURL = (Settings.discart == DISCARTS_ORIGINALS_CUSTOMS) ? serverURLOrigDiscs : serverURLCustomDiscs; - const char * backupURL = (choices & CheckedBox6) ? ((Settings.discart == DISCARTS_ORIGINALS_CUSTOMS) ? serverURLCustomDiscs : serverURLOrigDiscs) : NULL; - const char * progressTitle = (Settings.discart == DISCARTS_ORIGINALS_CUSTOMS) ? tr("Downloading original Discarts") : tr("Downloading custom Discarts"); - FindMissing(Settings.disc_path, downloadURL, backupURL, progressTitle); - } - - if(choices & CheckedBox6) - { - const char * downloadURL = (Settings.discart == DISCARTS_ORIGINALS_CUSTOMS) ? serverURLCustomDiscs : serverURLOrigDiscs; - const char * progressTitle = (Settings.discart == DISCARTS_ORIGINALS_CUSTOMS) ? tr("Downloading custom Discarts") : tr("Downloading original Discarts"); - FindMissing(Settings.disc_path, downloadURL, NULL, progressTitle); - } -} - -void ImageDownloader::FindMissing(const char *writepath, const char *downloadURL, const char *backupURL, const char *progressTitle) -{ - if (!CreateSubfolder(writepath)) - { - WindowPrompt(tr( "Error !" ), fmt("%s %s", tr("Can't create directory"), writepath), tr( "OK" )); - return; - } - - std::vector MissingFilesList; - - GetMissingGameFiles(writepath, ".png", MissingFilesList); - int size = MissingImages.size(); - MissingImages.resize(size+MissingFilesList.size()); - - for(u32 i = 0, n = size; i < MissingFilesList.size(); ++i, ++n) - { - MissingImages[n].gameID = MissingFilesList[i]; - MissingImages[n].downloadURL = downloadURL; - MissingImages[n].backupURL = backupURL; - MissingImages[n].writepath = writepath; - MissingImages[n].progressTitle = progressTitle; - } - - if(!backupURL) - MissingImagesCount += MissingFilesList.size(); -} - -int ImageDownloader::DownloadProcess(int TotalDownloadCount) -{ - char progressMsg[255]; - - for(u32 i = 0, pos = 0; i < MissingImages.size(); ++i, ++pos) - { - if(AbortRequested) - break; - - snprintf(progressMsg, sizeof(progressMsg), "http://wiitdb.com : %s.png", MissingImages[i].gameID.c_str()); - - ShowProgress(MissingImages[i].progressTitle, fmt("%i %s", TotalDownloadCount - pos, tr( "files left" )), progressMsg, pos, TotalDownloadCount); - - if(MissingImages[i].gameID.size() < 4) - continue; - - struct block file = DownloadImage(MissingImages[i].downloadURL, MissingImages[i].gameID.c_str()); - if(!file.data) - { - if(MissingImages[i].backupURL) - { - MissingImages.erase(MissingImages.begin()+i); - --i; - --pos; - } - continue; - } - - char imgPath[200]; - snprintf(imgPath, sizeof(imgPath), "%s/%s.png", MissingImages[i].writepath, MissingImages[i].gameID.c_str()); - - FILE *pfile = fopen(imgPath, "wb"); - if (pfile != NULL) - { - fwrite(file.data, 1, file.size, pfile); - fclose(pfile); - MissingImagesCount--; - } - free(file.data); - - if(MissingImages[i].backupURL) - { - //! Find and remove the backup download image. - //! The backup image is always further in the vector, so let's save cpu time. - for(u32 n = i+1; n < MissingImages.size(); ++n) - { - if(MissingImages[n].downloadURL == MissingImages[i].backupURL && - MissingImages[n].gameID == MissingImages[i].gameID) - { - MissingImages.erase(MissingImages.begin()+n); - break; - } - } - } - - //! Remove the image from the vector since it's done - MissingImages.erase(MissingImages.begin()+i); - --i; - } - - return MissingImages.size(); -} - -struct block ImageDownloader::DownloadImage(const char * url, const char * gameID) -{ - char CheckedRegion[10]; - char downloadURL[512]; - bool PAL = false; - - //Creates URL depending from which Country the game is - switch (gameID[3]) - { - case 'J': - sprintf(downloadURL, "%sJA/%s.png", url, gameID); - sprintf(CheckedRegion, "JA"); - break; - case 'W': - sprintf(downloadURL, "%sZH/%s.png", url, gameID); - sprintf(CheckedRegion, "ZH"); - break; - case 'K': - sprintf(downloadURL, "%sKO/%s.png", url, gameID); - sprintf(CheckedRegion, "KO"); - break; - case 'P': - case 'D': - case 'F': - case 'I': - case 'S': - case 'H': - case 'U': - case 'X': - case 'Y': - case 'Z': - sprintf(downloadURL, "%s%s/%s.png", url, Settings.db_language, gameID); - sprintf(CheckedRegion, "%s", Settings.db_language); - PAL = true; - break; - case 'E': - sprintf(downloadURL, "%sUS/%s.png", url, gameID); - sprintf(CheckedRegion, "US"); - break; - default: - strcpy(downloadURL, ""); - strcpy(CheckedRegion, ""); - break; - } - - struct block file = downloadfile(downloadURL); - if(VALID_IMAGE(file)) - return file; - - free(file.data); - file.data = NULL; - - if(PAL && strcmp(CheckedRegion, "EN") != 0) - { - snprintf(downloadURL, sizeof(downloadURL), "%sEN/%s.png", url, gameID); - file = downloadfile(downloadURL); - if(VALID_IMAGE(file)) - return file; - } - else if(strcmp(CheckedRegion, "") == 0) - { - const char * lang = Settings.db_language; - - if(strcmp(lang, "EN") == 0 && CONF_GetRegion() == CONF_REGION_US) - lang = "US"; - - snprintf(downloadURL, sizeof(downloadURL), "%s%s/%s.png", url, lang, gameID); - file = downloadfile(downloadURL); - if(VALID_IMAGE(file)) - return file; - - free(file.data); - - snprintf(downloadURL, sizeof(downloadURL), "%sOTHER/%s.png", url, gameID); - file = downloadfile(downloadURL); - if(VALID_IMAGE(file)) - return file; - } - - free(file.data); - - memset(&file, 0, sizeof(struct block)); - - return file; -} - -void ImageDownloader::CreateCSVLog() -{ - char path[200]; - snprintf(path, sizeof(path), "%s/MissingImages.csv", Settings.update_path); - - FILE *f = fopen(path, "wb"); - if(!f) return; - - const char *ImageType = "3D Cover"; - - fprintf(f, "\"ID\",\"Name\",\"ImageType\"\n"); - - for (u32 i = 0; i < MissingImages.size(); ++i) - { - if(MissingImages[i].downloadURL == serverURL3D) - { - ImageType = "3D Cover"; - } - else if(MissingImages[i].downloadURL == serverURL2D) - { - ImageType = "2D Cover"; - } - else if(MissingImages[i].downloadURL == serverURLFullHQ) - { - ImageType = "Full HQ Cover"; - } - else if(MissingImages[i].downloadURL == serverURLFull) - { - ImageType = "Full LQ Cover"; - } - else if(MissingImages[i].downloadURL == serverURLOrigDiscs) - { - ImageType = "Original Discart"; - } - else if(MissingImages[i].downloadURL == serverURLCustomDiscs) - { - ImageType = "Custom Discart"; - } - - fprintf(f, "\"%s\",\"%s\",\"%s\"\n", MissingImages[i].gameID.c_str(), GameTitles.GetTitle(MissingImages[i].gameID.c_str()), ImageType); - } - - fclose(f); -} diff --git a/source/network/ImageDownloader.h b/source/network/ImageDownloader.h deleted file mode 100644 index b5061e39..00000000 --- a/source/network/ImageDownloader.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef IMAGE_DOWNLOADER_H_ -#define IMAGE_DOWNLOADER_H_ - -#include -#include -#include "network/http.h" - -class ImageDownloader -{ - public: - static void DownloadImages(); - private: - void Start(); - void SetChoices(int c) { choices = c; } - void FindMissingImages(); - void FindMissing(const char *writepath, const char *downloadURL, const char *backupURL, const char *progressTitle); - int DownloadProcess(int TotalDownloadCount); - struct block DownloadImage(const char * url, const char * gameID); - void CreateCSVLog(); - - struct ImageLink - { - std::string gameID; - const char *downloadURL; - const char *backupURL; - const char *writepath; - const char *progressTitle; - }; - int choices; - u32 MissingImagesCount; - std::vector MissingImages; -}; - -#endif diff --git a/source/network/URL_List.cpp b/source/network/URL_List.cpp deleted file mode 100644 index b2b54b4d..00000000 --- a/source/network/URL_List.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/**************************************************************************** - * URL List Class - * for USB Loader GX - * by dimok - ***************************************************************************/ -#include -#include -#include -#include - -#include "URL_List.h" - -URL_List::URL_List(const char * url) -{ - Links = NULL; - urlcount = 0; - - if (!IsNetworkInit()) - { - urlcount = -1; - return; - } - - struct block file = downloadfile(url); - - if (!file.data || !file.size) - { - urlcount = -2; - return; - } - - u32 cnt = 0; - char temp[1024]; - - Links = (Link_Info *) malloc(sizeof(Link_Info)); - if (!Links) - { - free(file.data); - urlcount = -3; - return; - } - - memset(&Links[urlcount], 0, sizeof(Link_Info)); - - while (cnt < file.size) - { - - if (file.data[cnt] == '"' && file.data[cnt - 1] == '=' && file.data[cnt - 2] == 'f' && file.data[cnt - 3] - == 'e' && file.data[cnt - 4] == 'r' && file.data[cnt - 5] == 'h') - { - - u32 cnt2 = 0; - cnt++; - while (file.data[cnt] != '"' && cnt2 < 1024) - { - temp[cnt2] = file.data[cnt]; - cnt2++; - cnt++; - } - temp[cnt2] = '\0'; - - Links = (Link_Info *) realloc(Links, (urlcount + 1) * sizeof(Link_Info)); - - if (!Links) - { - for (int i = 0; i == urlcount; i++) - { - delete Links[i].URL; - Links[i].URL = NULL; - } - free(Links); - Links = NULL; - free(file.data); - urlcount = -4; - break; - } - - memset(&(Links[urlcount]), 0, sizeof(Link_Info)); - - Links[urlcount].URL = new char[cnt2 + 1]; - - if (!Links[urlcount].URL) - { - for (int i = 0; i == urlcount; i++) - { - delete Links[i].URL; - Links[i].URL = NULL; - } - free(Links); - Links = NULL; - free(file.data); - urlcount = -5; - break; - } - - snprintf(Links[urlcount].URL, cnt2 + 1, "%s", temp); - - if (strncmp(Links[urlcount].URL, "http://", strlen("http://")) != 0) - Links[urlcount].direct = false; - else Links[urlcount].direct = true; - - urlcount++; - } - cnt++; - } - - free(file.data); -} - -URL_List::~URL_List() -{ - for (int i = 0; i == urlcount; i++) - { - delete Links[i].URL; - Links[i].URL = NULL; - } - - if (Links != NULL) - { - free(Links); - Links = NULL; - } -} - -char * URL_List::GetURL(int ind) -{ - if (ind > urlcount || ind < 0 || !Links || urlcount <= 0) - return NULL; - else return Links[ind].URL; -} - -int URL_List::GetURLCount() -{ - return urlcount; -} - -static int ListCompare(const void *a, const void *b) -{ - Link_Info *ab = (Link_Info*) a; - Link_Info *bb = (Link_Info*) b; - - return stricmp((char *) ab->URL, (char *) bb->URL); -} -void URL_List::SortList() -{ - qsort(Links, urlcount, sizeof(Link_Info), ListCompare); -} diff --git a/source/network/URL_List.h b/source/network/URL_List.h deleted file mode 100644 index a78f579f..00000000 --- a/source/network/URL_List.h +++ /dev/null @@ -1,40 +0,0 @@ -/**************************************************************************** - * URL List Class - * for USB Loader GX - * by dimok - ***************************************************************************/ -#ifndef ___URLLIST_H_ -#define ___URLLIST_H_ - -#include "network/networkops.h" -#include "network/http.h" - -typedef struct -{ - char *URL; - bool direct; -} Link_Info; - -class URL_List -{ - public: - //!Constructor - //!\param url from where to get the list of links - URL_List(const char *url); - //!Destructor - ~URL_List(); - //! Get the a filepath of the list - //!\param list index - char * GetURL(int index); - //! Is it a direct URL or just a file or path under the main url - bool IsDirectURL(int index); - //! Get the number of links counted - int GetURLCount(); - //! Sort list - void SortList(); - protected: - int urlcount; - Link_Info *Links; -}; - -#endif diff --git a/source/network/dns.c b/source/network/dns.c deleted file mode 100644 index ab189f17..00000000 --- a/source/network/dns.c +++ /dev/null @@ -1,124 +0,0 @@ -#include "dns.h" - -/** - * Resolves a domainname to an ip address - * It makes use of net_gethostbyname from libogc, which in turn makes use of a Wii BIOS function - * Just like the net_gethostbyname function this function is NOT threadsafe! - * - * @param char* The domain name to resolve - * @return u32 The ipaddress represented by four bytes inside an u32 (in network order) - */ -u32 getipbyname(char *domain) -{ - //Care should be taken when using net_gethostbyname, - //it returns a static buffer which makes it not threadsafe - //TODO: implement some locking mechanism to make below code atomic - struct hostent *host = net_gethostbyname(domain); - - if (host == NULL) - { - return 0; - } - - u32 *ip = (u32*) host->h_addr_list[0]; - return *ip; -} - -//Defines how many DNS entries should be cached by getipbynamecached() -#define MAX_DNS_CACHE_ENTRIES 20 - -//The cache is defined as a linked list, -//The last resolved domain name will always be at the front -//This will allow heavily used domainnames to always stay cached -struct dnsentry -{ - char *domain; - u32 ip; - struct dnsentry *nextnode; -}; - -static struct dnsentry *firstdnsentry = NULL; -static int dnsentrycount = 0; - -/** - * Performs the same function as getipbyname(), - * except that it will prevent extremely expensive net_gethostbyname() calls by caching the result - */ -u32 getipbynamecached(char *domain) -{ - //Search if this domainname is already cached - struct dnsentry *node = firstdnsentry; - struct dnsentry *previousnode = NULL; - - while (node != NULL) - { - if (strcmp(node->domain, domain) == 0) - { - //DNS node found in the cache, move it to the front of the list - if (previousnode != NULL) previousnode->nextnode = node->nextnode; - - if (node != firstdnsentry) node->nextnode = firstdnsentry; - firstdnsentry = node; - - return node->ip; - } - //Go to the next element in the list - previousnode = node; - node = node->nextnode; - } - u32 ip = getipbyname(domain); - - //No cache of this domain could be found, create a cache node and add it to the front of the cache - struct dnsentry *newnode = malloc(sizeof(struct dnsentry)); - if (newnode == NULL) - { - return ip; - } - - newnode->ip = ip; - newnode->domain = malloc(strlen(domain) + 1); - if (newnode->domain == NULL) - { - free(newnode); - return ip; - } - strcpy(newnode->domain, domain); - - newnode->nextnode = firstdnsentry; - firstdnsentry = newnode; - dnsentrycount++; - - //If the cache grows too big delete the last (and probably least important) node of the list - if (dnsentrycount > MAX_DNS_CACHE_ENTRIES) - { - struct dnsentry *node = firstdnsentry; - struct dnsentry *previousnode = NULL; - - //Fetch the last two elements of the list - while (node->nextnode != NULL) - { - previousnode = node; - node = node->nextnode; - } - - if (node == NULL) - { - printf("Configuration error, MAX_DNS_ENTRIES reached while the list is empty\n"); - exit(1); - } - else if (previousnode == NULL) - { - firstdnsentry = NULL; - } - else - { - previousnode->nextnode = NULL; - } - - free(node->domain); - free(node); - dnsentrycount--; - } - - return newnode->ip; -} diff --git a/source/network/dns.h b/source/network/dns.h deleted file mode 100644 index f979550f..00000000 --- a/source/network/dns.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef _DNS_H_ -#define _DNS_H_ - -#include -#include -#include -#include - -#include //usleep -#ifdef __cplusplus -extern "C" -{ -#endif - - u32 getipbyname(char *domain); - u32 getipbynamecached(char *domain); - -#ifdef __cplusplus -} -#endif - -#endif /* _DNS_H_ */ diff --git a/source/network/http.c b/source/network/http.c deleted file mode 100644 index acc09749..00000000 --- a/source/network/http.c +++ /dev/null @@ -1,263 +0,0 @@ -#include "http.h" -#include "../svnrev.h" - -extern char incommingIP[50]; - -/** - * Emptyblock is a statically defined variable for functions to return if they are unable - * to complete a request - */ -const struct block emptyblock = { 0, NULL }; - -//The maximum amount of bytes to send per net_write() call -//#define NET_BUFFER_SIZE 1024 -#define NET_BUFFER_SIZE 3600 - -// Write our message to the server -static s32 send_message(s32 server, char *msg) -{ - s32 bytes_transferred = 0; - s32 remaining = strlen(msg); - while (remaining) - { - if ((bytes_transferred = net_write(server, msg, remaining > NET_BUFFER_SIZE ? NET_BUFFER_SIZE : remaining)) > 0) - { - remaining -= bytes_transferred; - usleep(20 * 1000); - } - else if (bytes_transferred < 0) - { - return bytes_transferred; - } - else - { - return -ENODATA; - } - } - return 0; -} - -/** - * Connect to a remote server via TCP on a specified port - * - * @param u32 ip address of the server to connect to - * @param u32 the port to connect to on the server - * @return s32 The connection to the server (negative number if connection could not be established) - */ -static s32 server_connect(u32 ipaddress, u32 socket_port) -{ - //Initialize socket - s32 connection = net_socket(AF_INET, SOCK_STREAM, IPPROTO_IP); - if (connection < 0) return connection; - - struct sockaddr_in connect_addr; - memset(&connect_addr, 0, sizeof(connect_addr)); - connect_addr.sin_family = AF_INET; - connect_addr.sin_port = socket_port; - connect_addr.sin_addr.s_addr = ipaddress; - - sprintf(incommingIP, "%s", inet_ntoa(connect_addr.sin_addr)); - - //Attemt to open the socket - if (net_connect(connection, (struct sockaddr*) &connect_addr, sizeof(connect_addr)) == -1) - { - net_close(connection); - return -1; - } - return connection; -} - -//The amount of memory in bytes reserved initially to store the HTTP response in -//Be careful in increasing this number, reading from a socket on the Wii -//will fail if you request more than 20k or so -#define HTTP_BUFFER_SIZE 1024 * 5 - -//The amount of memory the buffer should expanded with if the buffer is full -#define HTTP_BUFFER_GROWTH 1024 * 5 - -/** - * This function reads all the data from a connection into a buffer which it returns. - * It will return an empty buffer if something doesn't go as planned - * - * @param s32 connection The connection identifier to suck the response out of - * @return block A 'block' struct (see http.h) in which the buffer is located - */ -struct block read_message(s32 connection) -{ - //Create a block of memory to put in the response - struct block buffer; - buffer.data = malloc(HTTP_BUFFER_SIZE); - buffer.size = HTTP_BUFFER_SIZE; - - if (buffer.data == NULL) - { - return emptyblock; - } - - //The offset variable always points to the first byte of memory that is free in the buffer - u32 offset = 0; - - while (1) - { - //Fill the buffer with a new batch of bytes from the connection, - //starting from where we left of in the buffer till the end of the buffer - s32 bytes_read = net_read(connection, buffer.data + offset, buffer.size - offset); - - //Anything below 0 is an error in the connection - if (bytes_read < 0) - { - //printf("Connection error from net_read() Errorcode: %i\n", bytes_read); - return emptyblock; - } - - //No more bytes were read into the buffer, - //we assume this means the HTTP response is done - if (bytes_read == 0) - { - break; - } - - offset += bytes_read; - - //Check if we have enough buffer left over, - //if not expand it with an additional HTTP_BUFFER_GROWTH worth of bytes - if (offset >= buffer.size) - { - buffer.size += HTTP_BUFFER_GROWTH; - u8 * tmp = realloc(buffer.data, buffer.size); - - if (tmp == NULL) - { - free(buffer.data); - return emptyblock; - } - else - buffer.data = tmp; - } - } - - //At the end of above loop offset should be precisely the amount of bytes that were read from the connection - buffer.size = offset; - - //Shrink the size of the buffer so the data fits exactly in it - buffer.data = realloc(buffer.data, buffer.size); - - return buffer; -} - -/** - * Downloads the contents of a URL to memory - * This method is not threadsafe (because networking is not threadsafe on the Wii) - */ -struct block downloadfile(const char *url) -{ - //Check if the url starts with "http://", if not it is not considered a valid url - if (strncmp(url, "http://", strlen("http://")) != 0) - { - //printf("URL '%s' doesn't start with 'http://'\n", url); - return emptyblock; - } - - //Locate the path part of the url by searching for '/' past "http://" - char *path = strchr(url + strlen("http://"), '/'); - - //At the very least the url has to end with '/', ending with just a domain is invalid - if (path == NULL) - { - //printf("URL '%s' has no PATH part\n", url); - return emptyblock; - } - - //Extract the domain part out of the url - int domainlength = path - url - strlen("http://"); - - if (domainlength == 0) - { - //printf("No domain part in URL '%s'\n", url); - return emptyblock; - } - - char domain[domainlength + 1]; - strlcpy(domain, url + strlen("http://"), domainlength + 1); - - //Parsing of the URL is done, start making an actual connection - u32 ipaddress = getipbynamecached(domain); - - if (ipaddress == 0) - { - //printf("\ndomain %s could not be resolved", domain); - return emptyblock; - } - - s32 connection = server_connect(ipaddress, 80); - - if (connection < 0) - { - //printf("Error establishing connection"); - return emptyblock; - } - - //Form a nice request header to send to the webserver - char* headerformat = "GET %s HTTP/1.0\r\nHost: %s\r\nReferer: %s\r\nUser-Agent: USBLoaderGX r%s\r\n\r\n"; - char header[strlen(headerformat) + strlen(path) + strlen(domain)*2 + 100]; - sprintf(header, headerformat, path, domain, domain, GetRev()); - - //Do the request and get the response - send_message(connection, header); - struct block response = read_message(connection); - net_close(connection); - - //Search for the 4-character sequence \r\n\r\n in the response which signals the start of the http payload (file) - unsigned char *filestart = NULL; - u32 filesize = 0; - u32 i; - for (i = 3; i < response.size; i++) - { - if (response.data[i] == '\n' && response.data[i - 1] == '\r' && response.data[i - 2] == '\n' && response.data[i - - 3] == '\r') - { - filestart = response.data + i + 1; - filesize = response.size - i - 1; - break; - } - } - - if (filestart == NULL) - { - //printf("HTTP Response was without a file\n"); - free(response.data); - return emptyblock; - } - - //Copy the file part of the response into a new memoryblock to return - struct block file; - file.data = malloc(filesize); - file.size = filesize; - - if (file.data == NULL) - { - //printf("No more memory to copy file from HTTP response\n"); - free(response.data); - return emptyblock; - } - - memcpy(file.data, filestart, filesize); - - //Dispose of the original response - free(response.data); - - return file; -} - -s32 GetConnection(char * domain) -{ - - u32 ipaddress = getipbynamecached(domain); - if (ipaddress == 0) - { - return -1; - } - s32 connection = server_connect(ipaddress, 80); - return connection; - -} diff --git a/source/network/http.h b/source/network/http.h deleted file mode 100644 index 1998b32a..00000000 --- a/source/network/http.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef _HTTP_H_ -#define _HTTP_H_ - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include "dns.h" - - /** - * A simple structure to keep track of the size of a malloc()ated block of memory - */ - struct block - { - u32 size; - unsigned char *data; - }; - - extern const struct block emptyblock; - - struct block downloadfile(const char *url); - s32 GetConnection(char * domain); - -#ifdef __cplusplus -} -#endif - -#endif /* _HTTP_H_ */ diff --git a/source/network/networkops.cpp b/source/network/networkops.cpp deleted file mode 100644 index e44b86ca..00000000 --- a/source/network/networkops.cpp +++ /dev/null @@ -1,505 +0,0 @@ -/**************************************************************************** - * Network Operations - * for USB Loader GX - * - * HTTP operations - * Written by dhewg/bushing modified by dimok - ****************************************************************************/ - -#include -#include -#include -#include -#include - -#include "prompts/PromptWindows.h" -#include "language/gettext.h" -#include "settings/CSettings.h" -#include "utils/timer.h" -#include "networkops.h" -#include "main.h" -#include "http.h" -#include "svnrev.h" -#include "gecko.h" -#include "update.h" - -#define PORT 4299 - -/*** Incomming filesize ***/ -u32 infilesize = 0; -u32 uncfilesize = 0; - -bool updateavailable = false; -s32 connection; -static s32 socket; -static bool updatechecked = false; -static bool networkinitialized = false; -static bool checkincomming = false; -static bool waitforanswer = false; -static char IP[16]; -char incommingIP[50]; -char wiiloadVersion[2]; - -static lwp_t networkthread = LWP_THREAD_NULL; -static bool networkHalt = true; - -/**************************************************************************** - * Initialize_Network - ***************************************************************************/ -void Initialize_Network(void) -{ - - if (networkinitialized) return; - - s32 result; - - result = if_config(IP, NULL, NULL, true); - - if (result < 0) - { - networkinitialized = false; - return; - } - else - { - networkinitialized = true; - return; - } -} - -/**************************************************************************** - * DeinitNetwork - ***************************************************************************/ -void DeinitNetwork(void) -{ - net_wc24cleanup(); - net_deinit(); - networkinitialized = false; -} - -/**************************************************************************** - * Check if network was initialised - ***************************************************************************/ -bool IsNetworkInit(void) -{ - return networkinitialized; -} - -/**************************************************************************** - * Get network IP - ***************************************************************************/ -char * GetNetworkIP(void) -{ - return IP; -} - -/**************************************************************************** - * Get incomming IP - ***************************************************************************/ -char * GetIncommingIP(void) -{ - return incommingIP; -} - -s32 network_request(s32 connect, const char * request, char * filename) -{ - char buf[1024]; - char *ptr = NULL; - - u32 cnt, size; - s32 ret; - - /* Send request */ - ret = net_send(connect, request, strlen(request), 0); - if (ret < 0) return ret; - - /* Clear buffer */ - memset(buf, 0, sizeof(buf)); - - /* Read HTTP header */ - for (cnt = 0; !strstr(buf, "\r\n\r\n"); cnt++) - if (net_recv(connect, buf + cnt, 1, 0) <= 0) return -1; - - /* HTTP request OK? */ - if (!strstr(buf, "HTTP/1.1 200 OK")) return -1; - - if (filename) - { - /* Get filename */ - ptr = strstr(buf, "filename=\""); - - if (ptr) - { - ptr += sizeof("filename=\"") - 1; - - for (cnt = 0; ptr[cnt] != '\r' && ptr[cnt] != '\n' && ptr[cnt] != '"'; cnt++) - { - filename[cnt] = ptr[cnt]; - filename[cnt + 1] = '\0'; - } - } - } - - /* Retrieve content size */ - ptr = strstr(buf, "Content-Length:"); - if (!ptr) return -1; - - sscanf(ptr, "Content-Length: %u", &size); - return size; -} - -s32 network_read(s32 connect, u8 *buf, u32 len) -{ - u32 read = 0; - s32 ret = -1; - - /* Data to be read */ - while (read < len) - { - /* Read network data */ - ret = net_read(connect, buf + read, len - read); - if (ret < 0) return ret; - - /* Read finished */ - if (!ret) break; - - /* Increment read variable */ - read += ret; - } - - return read; -} - -/**************************************************************************** - * Download request - ***************************************************************************/ -s32 download_request(const char * url, char * filename) -{ - - //Check if the url starts with "http://", if not it is not considered a valid url - if (strncmp(url, "http://", strlen("http://")) != 0) - { - return -1; - } - - //Locate the path part of the url by searching for '/' past "http://" - char *path = strchr(url + strlen("http://"), '/'); - - //At the very least the url has to end with '/', ending with just a domain is invalid - if (path == NULL) - { - return -1; - } - - //Extract the domain part out of the url - int domainlength = path - url - strlen("http://"); - - if (domainlength == 0) - { - return -1; - } - - char domain[domainlength + 1]; - strlcpy(domain, url + strlen("http://"), domainlength + 1); - - connection = GetConnection(domain); - if (connection < 0) - { - return -1; - } - - //Form a nice request header to send to the webserver - char header[strlen(path) + strlen(domain) + strlen(url) + 100]; - sprintf(header, "GET %s HTTP/1.1\r\nHost: %s\r\nReferer: %s\r\nConnection: close\r\n\r\n", path, domain, url); - - s32 filesize = network_request(connection, header, filename); - - return filesize; -} - -/**************************************************************************** - * HTML HEAD request - ***************************************************************************/ -char * HEAD_Request(const char * url) -{ - if(strncmp(url, "http://", strlen("http://")) != 0) - { - gprintf("Not a valid URL"); - return NULL; - } - char *path = strchr(url + strlen("http://"), '/'); - - if(!path) - { - gprintf("Not a valid URL path"); - return NULL; - } - - int domainlength = path - url - strlen("http://"); - - if(domainlength == 0) - { - gprintf("Not a valid domain"); - return NULL; - } - - char domain[domainlength + 1]; - strncpy(domain, url + strlen("http://"), domainlength); - domain[domainlength] = '\0'; - - connection = GetConnection(domain); - if(connection < 0) - { - gprintf("Could not connect to the server."); - return NULL; - } - - char header[strlen(path)+strlen(domain)*2+150]; - sprintf(header, "HEAD %s HTTP/1.1\r\nHost: %s\r\nReferer: %s\r\nUser-Agent: USB Loader GX\r\nConnection: close\r\n\r\n", path, domain, domain); - - /* Send request */ - s32 ret = net_send(connection, header, strlen(header), 0); - if (ret < 0) - { - CloseConnection(); - return NULL; - } - - u32 cnt = 0; - char * buf = (char *) malloc(1024); - memset(buf, 0, 1024); - - for (cnt = 0; !strstr(buf, "\r\n\r\n") && cnt < 1024; cnt++) - { - if(net_recv(connection, buf + cnt, 1, 0) <= 0) - { - CloseConnection(); - free(buf); - return NULL; - } - } - - CloseConnection(); - - return buf; -} - -void CloseConnection() -{ - - net_close(connection); - - if (waitforanswer) - { - net_close(socket); - waitforanswer = false; - } -} - -/**************************************************************************** - * Test if connection to the address is available (PING) - ***************************************************************************/ -bool CheckConnection(const char *url, float timeout) -{ - //Check if the url starts with "http://", if not it is not considered a valid url - if (strncmp(url, "http://", strlen("http://")) != 0) - return false; - - //Locate the path part of the url by searching for '/' past "http://" - char *path = strchr(url + strlen("http://"), '/'); - - //At the very least the url has to end with '/', ending with just a domain is invalid - if (path == NULL) - return false; - - //Extract the domain part out of the url - int domainlength = path - url - strlen("http://"); - if (domainlength == 0) - return false; - - char domain[domainlength + 1]; - strlcpy(domain, url + strlen("http://"), domainlength + 1); - - //Parsing of the URL is done, start making an actual connection - u32 ipaddress = getipbynamecached(domain); - if (ipaddress == 0) - return false; - - //Initialize socket - s32 connection = net_socket(AF_INET, SOCK_STREAM, IPPROTO_IP); - if (connection < 0) return connection; - - s32 flags = net_fcntl(connection, F_GETFL, 0); - if (flags >= 0) flags = net_fcntl(connection, F_SETFL, flags | 4); - - struct sockaddr_in connect_addr; - memset(&connect_addr, 0, sizeof(connect_addr)); - connect_addr.sin_family = AF_INET; - connect_addr.sin_port = 80; - connect_addr.sin_addr.s_addr = getipbynamecached(domain); - - Timer netTime; - - int res = -1; - while(res < 0 && res != -127 && netTime.elapsed() < timeout) - { - res = net_connect(connection, (struct sockaddr*) &connect_addr, sizeof(connect_addr)); - usleep(1000); - } - - net_close(connection); - - return !(res < 0 && res != -127); -} - -/**************************************************************************** - * NetworkWait - ***************************************************************************/ -int NetworkWait() -{ - - if (!checkincomming) return -3; - - struct sockaddr_in sin; - struct sockaddr_in client_address; - socklen_t addrlen = sizeof(client_address); - - //Open socket - socket = net_socket(AF_INET, SOCK_STREAM, IPPROTO_IP); - - if (socket == INVALID_SOCKET) - { - return socket; - } - - sin.sin_family = AF_INET; - sin.sin_port = htons( PORT ); - sin.sin_addr.s_addr = htonl( INADDR_ANY ); - - if (net_bind(socket, (struct sockaddr*) &sin, sizeof(sin)) < 0) - { - net_close(socket); - return -1; - } - - if (net_listen(socket, 3) < 0) - { - net_close(socket); - return -1; - } - - connection = net_accept(socket, (struct sockaddr*) &client_address, &addrlen); - - sprintf(incommingIP, "%s", inet_ntoa(client_address.sin_addr)); - - if (connection < 0) - { - net_close(connection); - net_close(socket); - return -4; - - } - else - { - - unsigned char haxx[9]; - //skip haxx - net_read(connection, &haxx, 8); - wiiloadVersion[0] = haxx[4]; - wiiloadVersion[1] = haxx[5]; - - net_read(connection, &infilesize, 4); - - if (haxx[4] > 0 || haxx[5] > 4) - { - net_read(connection, &uncfilesize, 4); // Compressed protocol, read another 4 bytes - } - waitforanswer = true; - checkincomming = false; - networkHalt = true; - } - - return 1; -} - -/**************************************************************************** - * HaltNetwork - ***************************************************************************/ -void HaltNetworkThread() -{ - networkHalt = true; - checkincomming = false; - - if (waitforanswer) CloseConnection(); - - // wait for thread to finish - while (!LWP_ThreadIsSuspended(networkthread)) - usleep(100); -} - -/**************************************************************************** - * ResumeNetworkThread - ***************************************************************************/ -void ResumeNetworkThread() -{ - networkHalt = false; - LWP_ResumeThread(networkthread); -} - -/**************************************************************************** - * Resume NetworkWait - ***************************************************************************/ -void ResumeNetworkWait() -{ - networkHalt = true; - checkincomming = true; - waitforanswer = true; - infilesize = 0; - connection = -1; - LWP_ResumeThread(networkthread); -} - -/********************************************************************************* - * Networkthread for background network initialize and update check with idle prio - *********************************************************************************/ -static void * networkinitcallback(void *arg) -{ - while (1) - { - - if (!checkincomming && networkHalt) LWP_SuspendThread(networkthread); - - Initialize_Network(); - - if (networkinitialized == true && updatechecked == false) - { - - if (CheckUpdate() > 0) updateavailable = true; - - //suspend thread - updatechecked = true; - networkHalt = true; - checkincomming = false; - } - - if (checkincomming) NetworkWait(); - } - return NULL; -} - -/**************************************************************************** - * InitNetworkThread with priority 0 (idle) - ***************************************************************************/ -void InitNetworkThread() -{ - LWP_CreateThread(&networkthread, networkinitcallback, NULL, NULL, 16384, 0); -} - -/**************************************************************************** - * ShutdownThread - ***************************************************************************/ -void ShutdownNetworkThread() -{ - LWP_JoinThread(networkthread, NULL); - networkthread = LWP_THREAD_NULL; -} diff --git a/source/network/networkops.h b/source/network/networkops.h deleted file mode 100644 index 7be90463..00000000 --- a/source/network/networkops.h +++ /dev/null @@ -1,30 +0,0 @@ -/**************************************************************************** - * Network Operations - * for USB Loader GX - * - * HTTP operations - * Written by dhewg/bushing modified by dimok - ****************************************************************************/ -#ifndef _NETWORKOPS_H_ -#define _NETWORKOPS_H_ - -#define NETWORKBLOCKSIZE 5*1024 //5KB -void Initialize_Network(void); -void DeinitNetwork(void); -bool IsNetworkInit(void); -char * GetNetworkIP(void); -char * GetIncommingIP(void); -bool ShutdownWC24(); -bool CheckConnection(const char *url, float timeout = 5.0f); -s32 network_request(s32 connection, const char * request, char * filename); -s32 network_read(s32 connection, u8 *buf, u32 len); -s32 download_request(const char * url, char * filename = NULL); -void CloseConnection(); -char * HEAD_Request(const char * url); -void HaltNetworkThread(); -void ResumeNetworkWait(); -void ResumeNetworkThread(); -void InitNetworkThread(); -void ShutdownNetworkThread(); - -#endif diff --git a/source/network/update.cpp b/source/network/update.cpp deleted file mode 100644 index 552f714d..00000000 --- a/source/network/update.cpp +++ /dev/null @@ -1,360 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2009 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * update.cpp - * - * Update operations - * for Wii-Xplorer 2009 - ***************************************************************************/ -#include -#include -#include -#include - -#include "gecko.h" -#include "ZipFile.h" -#include "http.h" -#include "networkops.h" -#include "HTML_Stream.h" -#include "FileDownloader.h" -#include "settings/CSettings.h" -#include "settings/GameTitles.h" -#include "language/gettext.h" -#include "language/UpdateLanguage.h" -#include "homebrewboot/BootHomebrew.h" -#include "utils/StringTools.h" -#include "utils/ShowError.h" -#include "prompts/PromptWindows.h" -#include "FileOperations/fileops.h" -#include "xml/WiiTDB.hpp" -#include "wad/nandtitle.h" -#include "wad/wad.h" -#include "buildtype.h" -#include "sys.h" -#include "svnrev.h" - -static const char * WiiTDB_URL = "http://wiitdb.com/wiitdb.zip"; - -/**************************************************************************** - * Checking if an Update is available - ***************************************************************************/ -int CheckForBetaUpdate() -{ - int revnumber = 0; - - HTML_Stream HTML("http://code.google.com/p/usbloader-gui/downloads/list"); - - const char * HTML_Pos = NULL; - - do - { - HTML_Pos = HTML.FindStringEnd("href='"); - char * tmpLink = HTML.CopyString("'\""); - if (tmpLink) - { - char *fileext = strrchr(tmpLink, '.'); - if (fileext) - { - if (strcasecmp(fileext, ".dol") == 0) - { - char revtxt[80]; - char *filename = strrchr(tmpLink, '/') + 2; - u8 n = 0; - for (n = 0; n < strlen(filename) - 2; n++) - revtxt[n] = filename[n]; - revtxt[n] = 0; - int fileRev = atoi(revtxt); - - if (fileRev > revnumber) - { - revnumber = fileRev; - } - } - } - free(tmpLink); - } - } while (HTML_Pos != NULL); - - return revnumber; -} - -static bool CheckNewWiiTDBVersion(const char *url) -{ - u64 Version = 0; - - char * HEAD_Responde = HEAD_Request(url); - if(!HEAD_Responde) - return false; - - char * version_ptr = strstr(HEAD_Responde, "X-WiiTDB-Timestamp: "); - if(version_ptr) - { - version_ptr += strlen("X-WiiTDB-Timestamp: "); - Version = strtoull(version_ptr, NULL, 10); - } - - free(HEAD_Responde); - - std::string Title; - std::string Filepath = Settings.titlestxt_path; - if(Settings.titlestxt_path[Filepath.size()-1] != '/') - Filepath += '/'; - Filepath += "wiitdb.xml"; - - WiiTDB XML_DB; - - if(!XML_DB.OpenFile((Filepath.c_str()))) - return true; //! If no file exists we need the file - - u64 ExistingVersion = XML_DB.GetWiiTDBVersion(); - - gprintf("Existing WiiTDB Version: %llu Online WiiTDB Version: %llu\n", ExistingVersion, Version); - - return (ExistingVersion != Version); -} - -int UpdateWiiTDB() -{ - if(CheckNewWiiTDBVersion(WiiTDB_URL) == false) - { - gprintf("Not updating WiiTDB: Version is the same\n"); - return -1; - } - - gprintf("Updating WiiTDB...\n"); - - string ZipPath = Settings.titlestxt_path; - if(Settings.titlestxt_path[ZipPath.size()-1] != '/') - ZipPath += '/'; - - ZipPath += "wiitdb.zip"; - - int filesize = DownloadFileToPath(WiiTDB_URL, ZipPath.c_str(), false); - - if(filesize <= 0) - return -1; - - ZipFile zFile(ZipPath.c_str()); - - bool result = zFile.ExtractAll(Settings.titlestxt_path); - - //! The zip file is not needed anymore so we can remove it - remove(ZipPath.c_str()); - - //! Reload all titles because the file changed now. - GameTitles.LoadTitlesFromWiiTDB(Settings.titlestxt_path); - - return (result ? filesize : -1); -} - -static void UpdateIconPng() -{ - char iconpath[200]; - struct block file = downloadfile("http://www.techjawa.com/usbloadergx/icon.png"); - if (file.data != NULL) - { - snprintf(iconpath, sizeof(iconpath), "%sicon.png", Settings.update_path); - FILE * pfile = fopen(iconpath, "wb"); - if(pfile) - { - fwrite(file.data, 1, file.size, pfile); - fclose(pfile); - } - free(file.data); - } -} - -static void UpdateMetaXml() -{ - char xmlpath[200]; - struct block file = downloadfile("http://www.techjawa.com/usbloadergx/meta.file"); - if (file.data != NULL) - { - snprintf(xmlpath, sizeof(xmlpath), "%smeta.xml", Settings.update_path); - FILE *pfile = fopen(xmlpath, "wb"); - if(pfile) - { - fwrite(file.data, 1, file.size, pfile); - fclose(pfile); - } - free(file.data); - } -} - -int CheckUpdate() -{ - if (!IsNetworkInit()) - return -1; - - int revnumber = 0; - int currentrev = atoi(GetRev()); - -#ifdef FULLCHANNEL - struct block file = downloadfile( "http://www.techjawa.com/usbloadergx/wadrev.txt" ); -#else - struct block file = downloadfile("http://www.techjawa.com/usbloadergx/rev.txt"); -#endif - - if (file.data != NULL) - { - revnumber = atoi((char *) file.data); - free(file.data); - } - - if (revnumber > currentrev) - return revnumber; - - return -1; -} - -static int ApplicationDownload(int newrev) -{ - bool update_error = false; - char tmppath[250]; - - #ifdef FULLCHANNEL - const char * DownloadURL = "http://www.techjawa.com/usbloadergx/ULNR.wad"; - snprintf(tmppath, sizeof(tmppath), "%s/ULNR.wad", Settings.BootDevice); - #else - char realpath[250]; - snprintf(realpath, sizeof(realpath), "%sboot.dol", Settings.update_path); - const char * DownloadURL = "http://www.techjawa.com/usbloadergx/boot.dol"; - snprintf(tmppath, sizeof(tmppath), "%sboot.tmp", Settings.update_path); - #endif - - int update_choice = WindowPrompt(fmt("Rev%i %s.", newrev, tr( "available" )), tr( "How do you want to update?" ), tr( "Update DOL" ), tr( "Update All" ), tr( "Cancel" )); - if (update_choice == 0) - return 0; - - int ret = DownloadFileToPath(DownloadURL, tmppath, false); - if(ret < 1024*1024) - { - remove(tmppath); - WindowPrompt(tr("Failed updating"), tr("Error while downloding file"), tr( "OK" )); - if(update_choice == 1) - return -1; - - update_error = true; - } - else - { - #ifdef FULLCHANNEL - FILE * wadFile = fopen(tmppath, "rb"); - if(!wadFile) - { - update_error = true; - WindowPrompt(tr("Failed updating"), tr("Error opening downloaded file"), tr( "OK" )); - return -1; - } - - int error = Wad_Install( wadFile ); - if(error) - { - update_error = true; - ShowError(tr( "The wad installation failed with error %i" ), error); - } - else - WindowPrompt(tr( "Success" ), tr( "The wad file was installed" ), tr( "OK" )); - - RemoveFile(tmppath); - #else - gprintf("%s\n%s\n", realpath, tmppath); - RemoveFile(realpath); - if(!RenameFile(tmppath, realpath)) - update_error = true; - #endif - } - - if (update_choice == 2) - { - UpdateIconPng(); - UpdateMetaXml(); - UpdateWiiTDB(); - DownloadAllLanguageFiles(); - } - - if(update_error) - { - ShowError(tr( "Error while updating USB Loader GX." )); - return -1; - } - - if (update_choice > 0) - { - WindowPrompt(tr( "Restarting..." ), tr( "Successfully Updated thanks to www.techjawa.com" ), 0, 0, 0, 0, 150); - RebootApp(); - } - - return 0; -} - -int UpdateApp() -{ - if (!IsNetworkInit() && !NetworkInitPrompt()) - { - WindowPrompt(tr("Error !"), tr("Could not initialize network!"), tr("OK")); - return -1; - } - - if (!CreateSubfolder(Settings.update_path)) - { - WindowPrompt(tr("Error !"), tr("Can't create directory"), tr("OK")); - return -1; - } - - int choice = WindowPrompt(tr( "What do you want to update?" ), 0, "USB Loader GX", tr( "WiiTDB Files" ), tr( "Language File" ), tr( "Cancel" )); - if(choice == 0) - return -1; - - if(choice == 1) - { - int newrev = CheckUpdate(); - if (newrev < 0) - { - WindowPrompt(tr( "No new updates." ), 0, tr( "OK" )); - return 0; - } - - return ApplicationDownload(newrev); - } - else if (choice == 2) - { - if(UpdateWiiTDB() < 0) - { - WindowPrompt(fmt("%s", tr( "WiiTDB is up to date." )), 0, tr("OK")); - return 1; - } - else - { - WindowPrompt(tr( "Successfully Updated" ), 0, tr( "OK" )); - return 1; - } - } - else if (choice == 3) - { - if(UpdateLanguageFiles() > 0) - WindowPrompt(tr( "Successfully Updated" ), 0, tr( "OK" )); - } - - return 1; -} diff --git a/source/network/update.h b/source/network/update.h deleted file mode 100644 index 56a87462..00000000 --- a/source/network/update.h +++ /dev/null @@ -1,37 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2009 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * update.h - * - * Update operations - * for Wii-Xplorer 2009 - ***************************************************************************/ -#ifndef _UPDATEOPS_H_ -#define _UPDATEOPS_H_ - -int CheckUpdate(); -int CheckForBetaUpdate(); -int UpdateWiiTDB(); -int UpdateApp(); - -#endif diff --git a/source/patches/codehandler.h b/source/patches/codehandler.h deleted file mode 100644 index 7cf81098..00000000 --- a/source/patches/codehandler.h +++ /dev/null @@ -1,247 +0,0 @@ -/* - This file was autogenerated by raw2c. - Visit http://www.devkitpro.org - */ - -const unsigned char codehandler[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x27, 0x74, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x94, 0x21, 0xff, 0x58, 0x90, 0x01, 0x00, - 0x08, 0x7c, 0x08, 0x02, 0xa6, 0x90, 0x01, 0x00, 0xac, 0x7c, 0x00, 0x00, 0x26, 0x90, 0x01, 0x00, 0x0c, 0x7c, - 0x09, 0x02, 0xa6, 0x90, 0x01, 0x00, 0x10, 0x7c, 0x01, 0x02, 0xa6, 0x90, 0x01, 0x00, 0x14, 0xbc, 0x61, 0x00, - 0x18, 0x7f, 0x20, 0x00, 0xa6, 0x63, 0x3a, 0x20, 0x00, 0x73, 0x5a, 0xf9, 0xff, 0x7f, 0x40, 0x01, 0x24, 0xd8, - 0x41, 0x00, 0x98, 0xd8, 0x61, 0x00, 0xa0, 0x3f, 0xe0, 0x80, 0x00, 0x3e, 0x80, 0xcc, 0x00, 0xa3, 0x94, 0x40, - 0x10, 0x63, 0x95, 0x00, 0xff, 0xb2, 0xb4, 0x40, 0x10, 0x48, 0x00, 0x06, 0x55, 0x3a, 0xa0, 0x00, 0x00, 0x3a, - 0xc0, 0x00, 0x19, 0x3a, 0xe0, 0x00, 0xd0, 0x3f, 0x00, 0xcd, 0x00, 0x63, 0xf2, 0x27, 0x74, 0x80, 0x01, 0x00, - 0xac, 0x90, 0x12, 0x00, 0x04, 0x92, 0xb8, 0x64, 0x3c, 0x48, 0x00, 0x04, 0x2d, 0x41, 0x82, 0x05, 0xa4, 0x2c, - 0x1d, 0x00, 0x04, 0x40, 0x80, 0x00, 0x10, 0x2c, 0x1d, 0x00, 0x01, 0x41, 0x80, 0x05, 0x94, 0x48, 0x00, 0x03, - 0x4c, 0x41, 0x82, 0x04, 0xf0, 0x2c, 0x1d, 0x00, 0x06, 0x41, 0x82, 0x00, 0x8c, 0x2c, 0x1d, 0x00, 0x07, 0x41, - 0x82, 0x03, 0x30, 0x2c, 0x1d, 0x00, 0x08, 0x41, 0x82, 0x05, 0x80, 0x2c, 0x1d, 0x00, 0x09, 0x41, 0x82, 0x00, - 0xa0, 0x2c, 0x1d, 0x00, 0x10, 0x41, 0x82, 0x00, 0x98, 0x2c, 0x1d, 0x00, 0x2f, 0x41, 0x82, 0x00, 0x70, 0x2c, - 0x1d, 0x00, 0x30, 0x41, 0x82, 0x00, 0x78, 0x2c, 0x1d, 0x00, 0x38, 0x41, 0x82, 0x05, 0x28, 0x2c, 0x1d, 0x00, - 0x40, 0x41, 0x82, 0x03, 0x40, 0x2c, 0x1d, 0x00, 0x41, 0x41, 0x82, 0x03, 0x58, 0x2c, 0x1d, 0x00, 0x44, 0x41, - 0x82, 0x00, 0x68, 0x2c, 0x1d, 0x00, 0x50, 0x41, 0x82, 0x00, 0x20, 0x2c, 0x1d, 0x00, 0x60, 0x41, 0x82, 0x00, - 0x24, 0x2c, 0x1d, 0x00, 0x89, 0x41, 0x82, 0x00, 0x50, 0x2c, 0x1d, 0x00, 0x99, 0x41, 0x82, 0x05, 0x0c, 0x48, - 0x00, 0x05, 0x10, 0x80, 0x72, 0x00, 0x00, 0x48, 0x00, 0x04, 0x29, 0x48, 0x00, 0x05, 0x04, 0x48, 0x00, 0x05, - 0x89, 0x48, 0x00, 0x04, 0xfc, 0x38, 0x80, 0x00, 0x01, 0x90, 0x92, 0x00, 0x00, 0x48, 0x00, 0x04, 0xf0, 0x48, - 0x00, 0x04, 0x09, 0x3a, 0x00, 0x00, 0xa0, 0x63, 0xec, 0x27, 0x98, 0x48, 0x00, 0x03, 0x14, 0x38, 0x60, 0x01, - 0x20, 0x63, 0xec, 0x27, 0x98, 0x48, 0x00, 0x03, 0xc9, 0x48, 0x00, 0x04, 0xd0, 0x2f, 0x1d, 0x00, 0x10, 0x2e, - 0x9d, 0x00, 0x44, 0x63, 0xe4, 0x1a, 0xb4, 0x3c, 0x60, 0x80, 0x00, 0x60, 0x63, 0x03, 0x00, 0x48, 0x00, 0x05, - 0x09, 0x38, 0x63, 0x0a, 0x00, 0x48, 0x00, 0x05, 0x01, 0x38, 0x63, 0x06, 0x00, 0x48, 0x00, 0x04, 0xf9, 0x63, - 0xec, 0x27, 0x88, 0x92, 0xac, 0x00, 0x00, 0x92, 0xac, 0x00, 0x04, 0x92, 0xac, 0x00, 0x08, 0x63, 0xe4, 0x27, - 0x98, 0x81, 0x24, 0x00, 0x18, 0x80, 0x72, 0x00, 0x00, 0x2c, 0x03, 0x00, 0x02, 0x40, 0x82, 0x00, 0x0c, 0x41, - 0x96, 0x00, 0x0c, 0x48, 0x00, 0x00, 0x20, 0x38, 0x60, 0x00, 0x00, 0x90, 0x6c, 0x00, 0x0c, 0x40, 0x82, 0x00, - 0x14, 0x40, 0x96, 0x00, 0x10, 0x61, 0x29, 0x04, 0x00, 0x91, 0x24, 0x00, 0x18, 0x48, 0x00, 0x02, 0x14, 0x55, - 0x29, 0x05, 0xa8, 0x91, 0x24, 0x00, 0x18, 0x41, 0x96, 0x04, 0x54, 0x41, 0x9a, 0x00, 0x08, 0x39, 0x8c, 0x00, - 0x04, 0x38, 0x60, 0x00, 0x04, 0x48, 0x00, 0x03, 0x09, 0x40, 0x99, 0x00, 0x10, 0x39, 0x8c, 0x00, 0x04, 0x38, - 0x60, 0x00, 0x04, 0x48, 0x00, 0x02, 0xf9, 0x63, 0xe4, 0x27, 0x88, 0x80, 0x64, 0x00, 0x00, 0x80, 0x84, 0x00, - 0x04, 0x7c, 0x72, 0xfb, 0xa6, 0x7c, 0x95, 0xfb, 0xa6, 0x48, 0x00, 0x04, 0x1c, 0x7c, 0x32, 0x43, 0xa6, 0x7c, - 0x3a, 0x02, 0xa6, 0x7c, 0x73, 0x43, 0xa6, 0x7c, 0x7b, 0x02, 0xa6, 0x54, 0x63, 0x05, 0xa8, 0x90, 0x60, 0x27, - 0xb0, 0x54, 0x63, 0x06, 0x1e, 0x60, 0x63, 0x20, 0x00, 0x7c, 0x7b, 0x03, 0xa6, 0x3c, 0x60, 0x80, 0x00, 0x60, - 0x63, 0x1a, 0xe8, 0x7c, 0x7a, 0x03, 0xa6, 0x4c, 0x00, 0x00, 0x64, 0x3c, 0x60, 0x80, 0x00, 0x60, 0x63, 0x27, - 0x98, 0x90, 0x23, 0x00, 0x14, 0x7c, 0x61, 0x1b, 0x78, 0x7c, 0x73, 0x42, 0xa6, 0xbc, 0x41, 0x00, 0x24, 0x7c, - 0x24, 0x0b, 0x78, 0x7c, 0x32, 0x42, 0xa6, 0x90, 0x04, 0x00, 0x1c, 0x90, 0x24, 0x00, 0x20, 0x7c, 0x68, 0x02, - 0xa6, 0x90, 0x64, 0x00, 0x9c, 0x7c, 0x60, 0x00, 0x26, 0x90, 0x64, 0x00, 0x00, 0x7c, 0x61, 0x02, 0xa6, 0x90, - 0x64, 0x00, 0x04, 0x7c, 0x69, 0x02, 0xa6, 0x90, 0x64, 0x00, 0x08, 0x7c, 0x72, 0x02, 0xa6, 0x90, 0x64, 0x00, - 0x0c, 0x7c, 0x73, 0x02, 0xa6, 0x90, 0x64, 0x00, 0x10, 0x39, 0x20, 0x00, 0x00, 0x7d, 0x32, 0xfb, 0xa6, 0x7d, - 0x35, 0xfb, 0xa6, 0x3c, 0xa0, 0x80, 0x00, 0x60, 0xa5, 0x1b, 0x70, 0x3f, 0xe0, 0xd0, 0x04, 0x63, 0xff, 0x00, - 0xa0, 0x93, 0xe5, 0x00, 0x00, 0x7c, 0x00, 0x28, 0x6c, 0x7c, 0x00, 0x04, 0xac, 0x7c, 0x00, 0x2f, 0xac, 0x4c, - 0x00, 0x01, 0x2c, 0xd0, 0x04, 0x00, 0xa0, 0x3b, 0xff, 0x00, 0x04, 0x3f, 0xff, 0x00, 0x20, 0x57, 0xf0, 0x01, - 0x4b, 0x41, 0x82, 0xff, 0xdc, 0x3f, 0xe0, 0x80, 0x00, 0x63, 0xe5, 0x27, 0x88, 0x82, 0x05, 0x00, 0x00, 0x82, - 0x25, 0x00, 0x04, 0x82, 0x65, 0x00, 0x0c, 0x2c, 0x13, 0x00, 0x00, 0x41, 0x82, 0x00, 0x74, 0x2c, 0x13, 0x00, - 0x02, 0x40, 0x82, 0x00, 0x18, 0x81, 0x24, 0x00, 0x14, 0x39, 0x33, 0x00, 0x03, 0x91, 0x25, 0x00, 0x00, 0x91, - 0x25, 0x00, 0x0c, 0x48, 0x00, 0x00, 0x6c, 0x7c, 0x10, 0x98, 0x00, 0x41, 0x82, 0x00, 0x38, 0x7c, 0x11, 0x98, - 0x00, 0x41, 0x82, 0x00, 0x30, 0x7d, 0x30, 0x8a, 0x14, 0x91, 0x25, 0x00, 0x0c, 0x82, 0x05, 0x00, 0x08, 0x2c, - 0x10, 0x00, 0x00, 0x41, 0x82, 0x00, 0x48, 0x80, 0x64, 0x00, 0x10, 0x7c, 0x10, 0x18, 0x00, 0x40, 0x82, 0x00, - 0x10, 0x3a, 0x00, 0x00, 0x00, 0x92, 0x05, 0x00, 0x08, 0x48, 0x00, 0x00, 0x30, 0x3a, 0x20, 0x00, 0x00, 0x92, - 0x25, 0x00, 0x0c, 0x81, 0x24, 0x00, 0x18, 0x61, 0x29, 0x04, 0x00, 0x91, 0x24, 0x00, 0x18, 0x48, 0x00, 0x00, - 0x30, 0x7e, 0x12, 0xfb, 0xa6, 0x7e, 0x35, 0xfb, 0xa6, 0x39, 0x20, 0x00, 0x01, 0x91, 0x25, 0x00, 0x0c, 0x48, - 0x00, 0x00, 0x1c, 0x38, 0xa0, 0x00, 0x02, 0x63, 0xe4, 0x27, 0x74, 0x90, 0xa4, 0x00, 0x00, 0x38, 0x60, 0x00, - 0x11, 0x48, 0x00, 0x01, 0xb9, 0x4b, 0xff, 0xfc, 0x71, 0x7c, 0x20, 0x00, 0xa6, 0x54, 0x21, 0x07, 0xfa, 0x54, - 0x21, 0x04, 0x5e, 0x7c, 0x20, 0x01, 0x24, 0x63, 0xe1, 0x27, 0x98, 0x80, 0x61, 0x00, 0x00, 0x7c, 0x6f, 0xf1, - 0x20, 0x80, 0x61, 0x00, 0x14, 0x7c, 0x7a, 0x03, 0xa6, 0x80, 0x61, 0x00, 0x18, 0x7c, 0x7b, 0x03, 0xa6, 0x80, - 0x61, 0x00, 0x9c, 0x7c, 0x68, 0x03, 0xa6, 0xb8, 0x41, 0x00, 0x24, 0x80, 0x01, 0x00, 0x1c, 0x80, 0x21, 0x00, - 0x20, 0x4c, 0x00, 0x00, 0x64, 0x92, 0xb2, 0x00, 0x00, 0x48, 0x00, 0x02, 0x54, 0x2e, 0x9d, 0x00, 0x02, 0x38, - 0x60, 0x00, 0x08, 0x63, 0xec, 0x27, 0x7c, 0x48, 0x00, 0x00, 0xfd, 0x80, 0xac, 0x00, 0x00, 0x80, 0x6c, 0x00, - 0x04, 0x98, 0x65, 0x00, 0x00, 0x41, 0x94, 0x00, 0x10, 0xb0, 0x65, 0x00, 0x00, 0x41, 0x96, 0x00, 0x08, 0x90, - 0x65, 0x00, 0x00, 0x7c, 0x00, 0x28, 0xac, 0x7c, 0x00, 0x04, 0xac, 0x7c, 0x00, 0x2f, 0xac, 0x4c, 0x00, 0x01, - 0x2c, 0x48, 0x00, 0x02, 0x08, 0x48, 0x00, 0x01, 0x21, 0x38, 0x60, 0x00, 0x04, 0x63, 0xec, 0x27, 0x7c, 0x48, - 0x00, 0x00, 0xbd, 0x82, 0x0c, 0x00, 0x00, 0x3d, 0x80, 0x80, 0x00, 0x61, 0x8c, 0x28, 0xb8, 0x48, 0x00, 0x00, - 0x1c, 0x48, 0x00, 0x01, 0x01, 0x38, 0x60, 0x00, 0x08, 0x63, 0xec, 0x27, 0x7c, 0x48, 0x00, 0x00, 0x9d, 0x82, - 0x0c, 0x00, 0x04, 0x81, 0x8c, 0x00, 0x00, 0x63, 0xfb, 0x27, 0x84, 0x3a, 0x20, 0x0f, 0x80, 0x48, 0x00, 0x02, - 0x39, 0x41, 0x82, 0x00, 0x20, 0x7e, 0x23, 0x8b, 0x78, 0x48, 0x00, 0x00, 0x7d, 0x48, 0x00, 0x00, 0xd1, 0x41, - 0x82, 0xff, 0xfc, 0x7d, 0x8c, 0x72, 0x14, 0x35, 0x6b, 0xff, 0xff, 0x41, 0x81, 0xff, 0xe8, 0x80, 0x7b, 0x00, - 0x00, 0x2c, 0x03, 0x00, 0x00, 0x41, 0x82, 0x00, 0x08, 0x48, 0x00, 0x00, 0x59, 0x7c, 0x00, 0x60, 0xac, 0x7c, - 0x00, 0x04, 0xac, 0x7c, 0x00, 0x67, 0xac, 0x4c, 0x00, 0x01, 0x2c, 0x48, 0x00, 0x01, 0x80, 0x7f, 0xc8, 0x02, - 0xa6, 0x3c, 0x60, 0xa0, 0x00, 0x48, 0x00, 0x00, 0x15, 0x76, 0x03, 0x08, 0x00, 0x56, 0x1d, 0x86, 0x3e, 0x7f, - 0xc8, 0x03, 0xa6, 0x4e, 0x80, 0x00, 0x20, 0x92, 0xf8, 0x68, 0x14, 0x90, 0x78, 0x68, 0x24, 0x92, 0xd8, 0x68, - 0x20, 0x80, 0xb8, 0x68, 0x20, 0x70, 0xa5, 0x00, 0x01, 0x40, 0x82, 0xff, 0xf8, 0x82, 0x18, 0x68, 0x24, 0x90, - 0xb8, 0x68, 0x14, 0x4e, 0x80, 0x00, 0x20, 0x7d, 0x48, 0x02, 0xa6, 0x7c, 0x69, 0x03, 0xa6, 0x39, 0xc0, 0x00, - 0x00, 0x48, 0x00, 0x00, 0x79, 0x48, 0x00, 0x00, 0x75, 0x4b, 0xff, 0xff, 0xad, 0x41, 0x82, 0xff, 0xf4, 0x7f, - 0xae, 0x61, 0xae, 0x39, 0xce, 0x00, 0x01, 0x42, 0x00, 0xff, 0xe8, 0x7d, 0x48, 0x03, 0xa6, 0x4e, 0x80, 0x00, - 0x20, 0x7d, 0x48, 0x02, 0xa6, 0x7c, 0x69, 0x03, 0xa6, 0x39, 0xc0, 0x00, 0x00, 0x7c, 0x6c, 0x70, 0xae, 0x48, - 0x00, 0x00, 0x1d, 0x41, 0x82, 0xff, 0xf8, 0x39, 0xce, 0x00, 0x01, 0x42, 0x00, 0xff, 0xf0, 0x7d, 0x48, 0x03, - 0xa6, 0x4e, 0x80, 0x00, 0x20, 0x38, 0x60, 0x00, 0xaa, 0x7f, 0xc8, 0x02, 0xa6, 0x54, 0x63, 0xa0, 0x16, 0x64, - 0x63, 0xb0, 0x00, 0x3a, 0xc0, 0x00, 0x19, 0x3a, 0xe0, 0x00, 0xd0, 0x3f, 0x00, 0xcd, 0x00, 0x4b, 0xff, 0xff, - 0x69, 0x56, 0x03, 0x37, 0xff, 0x7f, 0xc8, 0x03, 0xa6, 0x4e, 0x80, 0x00, 0x20, 0x7f, 0xc8, 0x02, 0xa6, 0x3c, - 0x60, 0xd0, 0x00, 0x4b, 0xff, 0xff, 0x51, 0x56, 0x03, 0x37, 0xff, 0x41, 0x82, 0xff, 0xf4, 0x7f, 0xc8, 0x03, - 0xa6, 0x4e, 0x80, 0x00, 0x20, 0x4b, 0xff, 0xff, 0xb9, 0x38, 0x60, 0x00, 0x08, 0x63, 0xec, 0x27, 0x7c, 0x4b, - 0xff, 0xff, 0x55, 0x80, 0xac, 0x00, 0x04, 0x81, 0x8c, 0x00, 0x00, 0x63, 0xfb, 0x27, 0x84, 0x62, 0xb1, 0xf8, - 0x00, 0x7e, 0x0c, 0x28, 0x50, 0x48, 0x00, 0x00, 0xed, 0x41, 0x81, 0x00, 0x10, 0x82, 0x3b, 0x00, 0x00, 0x2c, - 0x11, 0x00, 0x00, 0x41, 0x82, 0x00, 0x68, 0x7e, 0x23, 0x8b, 0x78, 0x4b, 0xff, 0xff, 0x55, 0x4b, 0xff, 0xff, - 0xa5, 0x4b, 0xff, 0xff, 0xa1, 0x4b, 0xff, 0xfe, 0xd9, 0x41, 0x82, 0xff, 0xf4, 0x2c, 0x1d, 0x00, 0xcc, 0x41, - 0x82, 0x00, 0x48, 0x2c, 0x1d, 0x00, 0xbb, 0x41, 0x82, 0xff, 0xdc, 0x2c, 0x1d, 0x00, 0xaa, 0x40, 0x82, 0xff, - 0xdc, 0x7d, 0x8c, 0x72, 0x14, 0x35, 0x6b, 0xff, 0xff, 0x41, 0x80, 0x00, 0x2c, 0x4b, 0xff, 0xff, 0xb4, 0x7e, - 0xb5, 0xfb, 0xa6, 0x7e, 0xb2, 0xfb, 0xa6, 0x63, 0xe4, 0x27, 0x98, 0x81, 0x24, 0x00, 0x18, 0x55, 0x29, 0x05, - 0xa8, 0x91, 0x24, 0x00, 0x18, 0x48, 0x00, 0x00, 0x0c, 0x38, 0x60, 0x00, 0x80, 0x4b, 0xff, 0xff, 0x25, 0x80, - 0x92, 0x00, 0x00, 0x2c, 0x04, 0x00, 0x00, 0x40, 0x82, 0xfa, 0x50, 0xb3, 0x94, 0x40, 0x10, 0xc8, 0x41, 0x00, - 0x98, 0xc8, 0x61, 0x00, 0xa0, 0x7f, 0x20, 0x00, 0xa6, 0x80, 0x01, 0x00, 0xac, 0x7c, 0x08, 0x03, 0xa6, 0x80, - 0x01, 0x00, 0x0c, 0x7c, 0x0f, 0xf1, 0x20, 0x80, 0x01, 0x00, 0x10, 0x7c, 0x09, 0x03, 0xa6, 0x80, 0x01, 0x00, - 0x14, 0x7c, 0x01, 0x03, 0xa6, 0xb8, 0x61, 0x00, 0x18, 0x80, 0x01, 0x00, 0x08, 0x38, 0x21, 0x00, 0xa8, 0x4c, - 0x00, 0x01, 0x2c, 0x4e, 0x80, 0x00, 0x20, 0x7e, 0x23, 0x20, 0x50, 0x3c, 0xa0, 0x48, 0x00, 0x52, 0x25, 0x01, - 0xba, 0x90, 0xa3, 0x00, 0x00, 0x7c, 0x00, 0x18, 0xac, 0x7c, 0x00, 0x04, 0xac, 0x7c, 0x00, 0x1f, 0xac, 0x4c, - 0x00, 0x01, 0x2c, 0x4e, 0x80, 0x00, 0x20, 0x7d, 0x70, 0x8b, 0xd7, 0x7d, 0x4b, 0x89, 0xd6, 0x7d, 0x4a, 0x80, - 0x50, 0x91, 0x5b, 0x00, 0x00, 0x4e, 0x80, 0x00, 0x20, 0x7f, 0xa8, 0x02, 0xa6, 0x3d, 0xe0, 0x80, 0x00, 0x61, - 0xef, 0x28, 0xb8, 0x63, 0xe7, 0x18, 0x08, 0x3c, 0xc0, 0x80, 0x00, 0x7c, 0xd0, 0x33, 0x78, 0x39, 0x00, 0x00, - 0x00, 0x3c, 0x60, 0x00, 0xd0, 0x60, 0x63, 0xc0, 0xde, 0x80, 0x8f, 0x00, 0x00, 0x7c, 0x03, 0x20, 0x00, 0x40, - 0x82, 0x00, 0x18, 0x80, 0x8f, 0x00, 0x04, 0x7c, 0x03, 0x20, 0x00, 0x40, 0x82, 0x00, 0x0c, 0x39, 0xef, 0x00, - 0x08, 0x48, 0x00, 0x00, 0x0c, 0x7f, 0xa8, 0x03, 0xa6, 0x4e, 0x80, 0x00, 0x20, 0x80, 0x6f, 0x00, 0x00, 0x80, - 0x8f, 0x00, 0x04, 0x39, 0xef, 0x00, 0x08, 0x71, 0x09, 0x00, 0x01, 0x2f, 0x89, 0x00, 0x00, 0x39, 0x20, 0x00, - 0x00, 0x54, 0x6a, 0x1f, 0x7e, 0x54, 0x65, 0x3f, 0x7e, 0x74, 0x6b, 0x10, 0x00, 0x54, 0x63, 0x01, 0xfe, 0x40, - 0x82, 0x00, 0x0c, 0x54, 0xcc, 0x00, 0x0c, 0x48, 0x00, 0x00, 0x08, 0x7e, 0x0c, 0x83, 0x78, 0x2e, 0x05, 0x00, - 0x00, 0x2c, 0x0a, 0x00, 0x01, 0x41, 0xa0, 0x00, 0x2c, 0x41, 0xa2, 0x00, 0xe4, 0x2c, 0x0a, 0x00, 0x03, 0x41, - 0xa0, 0x01, 0xac, 0x41, 0x82, 0x02, 0x50, 0x2c, 0x0a, 0x00, 0x05, 0x41, 0x80, 0x02, 0xd4, 0x41, 0xa2, 0x04, - 0xe0, 0x2c, 0x0a, 0x00, 0x07, 0x41, 0xa0, 0x05, 0x0c, 0x48, 0x00, 0x05, 0xf0, 0x7d, 0x8c, 0x1a, 0x14, 0x2c, - 0x05, 0x00, 0x03, 0x41, 0x82, 0x00, 0x48, 0x41, 0x81, 0x00, 0x60, 0x40, 0xbe, 0xff, 0x84, 0x2e, 0x05, 0x00, - 0x01, 0x41, 0x91, 0x00, 0x2c, 0x54, 0x8a, 0x84, 0x3e, 0x41, 0x92, 0x00, 0x10, 0x7c, 0x89, 0x61, 0xae, 0x39, - 0x29, 0x00, 0x01, 0x48, 0x00, 0x00, 0x0c, 0x7c, 0x89, 0x63, 0x2e, 0x39, 0x29, 0x00, 0x02, 0x35, 0x4a, 0xff, - 0xff, 0x40, 0xa0, 0xff, 0xe4, 0x4b, 0xff, 0xff, 0x54, 0x55, 0x8c, 0x00, 0x3a, 0x90, 0x8c, 0x00, 0x00, 0x4b, - 0xff, 0xff, 0x48, 0x7c, 0x89, 0x23, 0x78, 0x40, 0x9e, 0x04, 0xc8, 0x35, 0x29, 0xff, 0xff, 0x41, 0x80, 0x04, - 0xc0, 0x7c, 0xa9, 0x78, 0xae, 0x7c, 0xa9, 0x61, 0xae, 0x4b, 0xff, 0xff, 0xf0, 0x39, 0xef, 0x00, 0x08, 0x40, - 0xbe, 0xff, 0x24, 0x80, 0xaf, 0xff, 0xf8, 0x81, 0x6f, 0xff, 0xfc, 0x54, 0xb1, 0x04, 0x3e, 0x54, 0xaa, 0x85, - 0x3e, 0x54, 0xa5, 0x27, 0x3e, 0x2e, 0x85, 0x00, 0x01, 0x41, 0x96, 0x00, 0x10, 0x41, 0xb5, 0x00, 0x14, 0x7c, - 0x89, 0x61, 0xae, 0x48, 0x00, 0x00, 0x10, 0x7c, 0x89, 0x63, 0x2e, 0x48, 0x00, 0x00, 0x08, 0x7c, 0x89, 0x61, - 0x2e, 0x7c, 0x84, 0x5a, 0x14, 0x7d, 0x29, 0x8a, 0x14, 0x35, 0x4a, 0xff, 0xff, 0x40, 0x80, 0xff, 0xd4, 0x4b, - 0xff, 0xfe, 0xdc, 0x54, 0x69, 0x07, 0xff, 0x41, 0x82, 0x00, 0x10, 0x55, 0x08, 0xf8, 0x7e, 0x71, 0x09, 0x00, - 0x01, 0x2f, 0x89, 0x00, 0x00, 0x2e, 0x85, 0x00, 0x04, 0x2d, 0x8a, 0x00, 0x05, 0x51, 0x08, 0x08, 0x3c, 0x40, - 0x9e, 0x00, 0x78, 0x41, 0x8d, 0x04, 0xb8, 0x7d, 0x8c, 0x1a, 0x14, 0x41, 0x8c, 0x00, 0x0c, 0x41, 0x94, 0x00, - 0x30, 0x48, 0x00, 0x00, 0x1c, 0x40, 0x94, 0x00, 0x10, 0x55, 0x8c, 0x00, 0x3a, 0x81, 0x6c, 0x00, 0x00, 0x48, - 0x00, 0x00, 0x1c, 0x55, 0x8c, 0x00, 0x3c, 0xa1, 0x6c, 0x00, 0x00, 0x7c, 0x89, 0x20, 0xf8, 0x55, 0x29, 0x84, - 0x3e, 0x7d, 0x6b, 0x48, 0x38, 0x54, 0x84, 0x04, 0x3e, 0x7f, 0x0b, 0x20, 0x40, 0x70, 0xa9, 0x00, 0x03, 0x41, - 0x82, 0x00, 0x18, 0x2c, 0x09, 0x00, 0x02, 0x41, 0x82, 0x00, 0x18, 0x41, 0x81, 0x00, 0x1c, 0x40, 0x9a, 0x00, - 0x20, 0x48, 0x00, 0x00, 0x18, 0x41, 0x9a, 0x00, 0x18, 0x48, 0x00, 0x00, 0x10, 0x41, 0x99, 0x00, 0x10, 0x48, - 0x00, 0x00, 0x08, 0x41, 0x98, 0x00, 0x08, 0x61, 0x08, 0x00, 0x01, 0x40, 0x8e, 0xfe, 0x40, 0x41, 0x94, 0xfe, - 0x3c, 0x81, 0x6f, 0xff, 0xf8, 0x40, 0x9e, 0x00, 0x20, 0x70, 0x6c, 0x00, 0x08, 0x41, 0x82, 0x00, 0x0c, 0x71, - 0x0c, 0x00, 0x01, 0x41, 0x82, 0x00, 0x10, 0x39, 0x8b, 0x00, 0x10, 0x51, 0x8b, 0x03, 0x36, 0x48, 0x00, 0x00, - 0x08, 0x55, 0x6b, 0x07, 0x16, 0x91, 0x6f, 0xff, 0xf8, 0x4b, 0xff, 0xfe, 0x0c, 0x40, 0xbe, 0xfe, 0x08, 0x54, - 0x69, 0x16, 0xba, 0x54, 0x6e, 0x87, 0xfe, 0x2d, 0x8e, 0x00, 0x00, 0x2e, 0x05, 0x00, 0x04, 0x70, 0xae, 0x00, - 0x03, 0x2e, 0x8e, 0x00, 0x02, 0x41, 0x94, 0x00, 0x14, 0x41, 0x96, 0x00, 0x50, 0x7c, 0x64, 0x07, 0x34, 0x7c, - 0x84, 0x7a, 0x14, 0x48, 0x00, 0x00, 0x68, 0x54, 0x65, 0xa7, 0xff, 0x41, 0x82, 0x00, 0x0c, 0x7d, 0x27, 0x48, - 0x2e, 0x7c, 0x84, 0x4a, 0x14, 0x41, 0x8e, 0x00, 0x08, 0x7c, 0x8c, 0x22, 0x14, 0x2e, 0x8e, 0x00, 0x01, 0x41, - 0x96, 0x00, 0x08, 0x80, 0x84, 0x00, 0x00, 0x54, 0x63, 0x67, 0xff, 0x41, 0x82, 0x00, 0x3c, 0x40, 0x90, 0x00, - 0x0c, 0x7c, 0x84, 0x32, 0x14, 0x48, 0x00, 0x00, 0x30, 0x7c, 0x84, 0x82, 0x14, 0x48, 0x00, 0x00, 0x28, 0x54, - 0x65, 0xa7, 0xff, 0x41, 0x82, 0x00, 0x0c, 0x7d, 0x27, 0x48, 0x2e, 0x7c, 0x84, 0x4a, 0x14, 0x40, 0x90, 0x00, - 0x0c, 0x7c, 0xcc, 0x21, 0x2e, 0x4b, 0xff, 0xfd, 0x80, 0x7e, 0x0c, 0x21, 0x2e, 0x4b, 0xff, 0xfd, 0x78, 0x40, - 0x90, 0x00, 0x0c, 0x7c, 0x86, 0x23, 0x78, 0x4b, 0xff, 0xfd, 0x6c, 0x7c, 0x90, 0x23, 0x78, 0x4b, 0xff, 0xfd, - 0x64, 0x54, 0x89, 0x1e, 0x78, 0x39, 0x29, 0x00, 0x40, 0x2c, 0x05, 0x00, 0x02, 0x41, 0x80, 0x00, 0x48, 0x54, - 0x6b, 0x50, 0x03, 0x41, 0x82, 0x00, 0x14, 0x41, 0x81, 0x00, 0x08, 0x48, 0x00, 0x00, 0x10, 0x41, 0xbe, 0xfd, - 0x40, 0x48, 0x00, 0x00, 0x08, 0x40, 0xbe, 0xfd, 0x38, 0x2c, 0x05, 0x00, 0x03, 0x41, 0x81, 0x00, 0x10, 0x41, - 0xa2, 0x00, 0x10, 0x7d, 0xe7, 0x48, 0x2e, 0x4b, 0xff, 0xfd, 0x24, 0x7d, 0xe7, 0x49, 0x2e, 0x7c, 0x64, 0x07, - 0x34, 0x54, 0x84, 0x1a, 0x78, 0x7d, 0xef, 0x22, 0x14, 0x4b, 0xff, 0xfd, 0x10, 0x40, 0xbe, 0xfd, 0x0c, 0x7c, - 0xa7, 0x4a, 0x14, 0x40, 0x92, 0x00, 0x14, 0x54, 0x64, 0x04, 0x3e, 0x91, 0xe5, 0x00, 0x00, 0x90, 0x85, 0x00, - 0x04, 0x4b, 0xff, 0xfc, 0xf4, 0x81, 0x25, 0x00, 0x04, 0x2c, 0x09, 0x00, 0x00, 0x41, 0xa2, 0xfc, 0xe8, 0x39, - 0x29, 0xff, 0xff, 0x91, 0x25, 0x00, 0x04, 0x81, 0xe5, 0x00, 0x00, 0x4b, 0xff, 0xfc, 0xd8, 0x40, 0xbe, 0xfc, - 0xd4, 0x54, 0x6b, 0x16, 0xba, 0x7f, 0x47, 0x5a, 0x14, 0x81, 0x3a, 0x00, 0x00, 0x54, 0x6e, 0x67, 0xbe, 0x41, - 0x92, 0x00, 0x84, 0x2e, 0x05, 0x00, 0x05, 0x40, 0x90, 0x01, 0x74, 0x2e, 0x05, 0x00, 0x03, 0x40, 0x90, 0x00, - 0x90, 0x2e, 0x05, 0x00, 0x01, 0x54, 0x65, 0x87, 0xff, 0x41, 0x82, 0x00, 0x08, 0x7c, 0x8c, 0x22, 0x14, 0x2f, - 0x0e, 0x00, 0x01, 0x40, 0x92, 0x00, 0x24, 0x41, 0xb9, 0x00, 0x18, 0x41, 0x9a, 0x00, 0x0c, 0x88, 0x84, 0x00, - 0x00, 0x48, 0x00, 0x00, 0xf8, 0xa0, 0x84, 0x00, 0x00, 0x48, 0x00, 0x00, 0xf0, 0x80, 0x84, 0x00, 0x00, 0x48, - 0x00, 0x00, 0xe8, 0x54, 0x73, 0xe5, 0x3e, 0x41, 0xb9, 0x00, 0x20, 0x41, 0x9a, 0x00, 0x10, 0x99, 0x24, 0x00, - 0x00, 0x38, 0x84, 0x00, 0x01, 0x48, 0x00, 0x00, 0x18, 0xb1, 0x24, 0x00, 0x00, 0x38, 0x84, 0x00, 0x02, 0x48, - 0x00, 0x00, 0x0c, 0x91, 0x24, 0x00, 0x00, 0x38, 0x84, 0x00, 0x04, 0x36, 0x73, 0xff, 0xff, 0x40, 0x80, 0xff, - 0xd4, 0x4b, 0xff, 0xfc, 0x40, 0x54, 0x65, 0x87, 0xff, 0x41, 0x82, 0x00, 0x08, 0x7c, 0x84, 0x62, 0x14, 0x71, - 0xc5, 0x00, 0x01, 0x41, 0x82, 0x00, 0x9c, 0x7c, 0x84, 0x4a, 0x14, 0x48, 0x00, 0x00, 0x94, 0x54, 0x6a, 0x87, - 0xbe, 0x54, 0x8e, 0x16, 0xba, 0x7e, 0x67, 0x72, 0x14, 0x40, 0x92, 0x00, 0x08, 0x3a, 0x6f, 0xff, 0xfc, 0x80, - 0x9a, 0x00, 0x00, 0x81, 0x33, 0x00, 0x00, 0x71, 0x4b, 0x00, 0x01, 0x41, 0x82, 0x00, 0x08, 0x7c, 0x9a, 0x23, - 0x78, 0x71, 0x4b, 0x00, 0x02, 0x41, 0x82, 0x00, 0x10, 0x7d, 0x33, 0x4b, 0x78, 0x40, 0xb2, 0x00, 0x08, 0x7e, - 0x6c, 0x9a, 0x14, 0x54, 0x65, 0x67, 0x3f, 0x2c, 0x05, 0x00, 0x09, 0x40, 0x80, 0x00, 0x54, 0x48, 0x00, 0x00, - 0x79, 0x7c, 0x89, 0x22, 0x14, 0x48, 0x00, 0x00, 0x40, 0x7c, 0x89, 0x21, 0xd6, 0x48, 0x00, 0x00, 0x38, 0x7d, - 0x24, 0x23, 0x78, 0x48, 0x00, 0x00, 0x30, 0x7d, 0x24, 0x20, 0x38, 0x48, 0x00, 0x00, 0x28, 0x7d, 0x24, 0x22, - 0x78, 0x48, 0x00, 0x00, 0x20, 0x7d, 0x24, 0x20, 0x30, 0x48, 0x00, 0x00, 0x18, 0x7d, 0x24, 0x24, 0x30, 0x48, - 0x00, 0x00, 0x10, 0x5d, 0x24, 0x20, 0x3e, 0x48, 0x00, 0x00, 0x08, 0x7d, 0x24, 0x26, 0x30, 0x90, 0x9a, 0x00, - 0x00, 0x4b, 0xff, 0xfb, 0x8c, 0x2c, 0x05, 0x00, 0x0a, 0x41, 0x81, 0xfb, 0x84, 0xc0, 0x5a, 0x00, 0x00, 0xc0, - 0x73, 0x00, 0x00, 0x41, 0x82, 0x00, 0x0c, 0xec, 0x43, 0x10, 0x2a, 0x48, 0x00, 0x00, 0x08, 0xec, 0x43, 0x00, - 0xb2, 0xd0, 0x5a, 0x00, 0x00, 0x4b, 0xff, 0xfb, 0x64, 0x7d, 0x48, 0x02, 0xa6, 0x54, 0xa5, 0x1e, 0x78, 0x7d, - 0x4a, 0x2a, 0x14, 0x80, 0x9a, 0x00, 0x00, 0x81, 0x33, 0x00, 0x00, 0x7d, 0x48, 0x03, 0xa6, 0x4e, 0x80, 0x00, - 0x20, 0x40, 0xbe, 0xfb, 0x44, 0x54, 0x69, 0xc0, 0x3e, 0x7d, 0x8e, 0x63, 0x78, 0x48, 0x00, 0x00, 0x35, 0x41, - 0x92, 0x00, 0x0c, 0x7e, 0x31, 0x22, 0x14, 0x48, 0x00, 0x00, 0x08, 0x7d, 0x29, 0x22, 0x14, 0x54, 0x64, 0xc4, - 0x3f, 0x38, 0xa0, 0x00, 0x00, 0x41, 0x82, 0xfb, 0x1c, 0x7d, 0x45, 0x88, 0xae, 0x7d, 0x45, 0x49, 0xae, 0x38, - 0xa5, 0x00, 0x01, 0x7c, 0x05, 0x20, 0x00, 0x4b, 0xff, 0xff, 0xec, 0x2e, 0x8a, 0x00, 0x04, 0x55, 0x31, 0x36, - 0xba, 0x2c, 0x11, 0x00, 0x3c, 0x7e, 0x27, 0x88, 0x2e, 0x40, 0x82, 0x00, 0x08, 0x7d, 0xd1, 0x73, 0x78, 0x41, - 0x96, 0x00, 0x08, 0xa2, 0x31, 0x00, 0x00, 0x55, 0x29, 0x56, 0xba, 0x2c, 0x09, 0x00, 0x3c, 0x7d, 0x27, 0x48, - 0x2e, 0x40, 0x82, 0x00, 0x08, 0x7d, 0xc9, 0x73, 0x78, 0x41, 0x96, 0x00, 0x08, 0xa1, 0x29, 0x00, 0x00, 0x4e, - 0x80, 0x00, 0x20, 0x2c, 0x05, 0x00, 0x04, 0x40, 0x80, 0x00, 0x28, 0x7c, 0x89, 0x23, 0x78, 0x7d, 0xc3, 0x62, - 0x14, 0x55, 0xce, 0x00, 0x3c, 0x4b, 0xff, 0xff, 0xad, 0x7c, 0x84, 0x20, 0xf8, 0x54, 0x84, 0x04, 0x3e, 0x7d, - 0x2b, 0x20, 0x38, 0x7e, 0x24, 0x20, 0x38, 0x4b, 0xff, 0xfb, 0xc4, 0x54, 0x6b, 0xe4, 0x3e, 0x4b, 0xff, 0xfb, - 0xbc, 0x7c, 0x9a, 0x23, 0x78, 0x54, 0x84, 0x18, 0x38, 0x40, 0x92, 0x00, 0x20, 0x40, 0x9e, 0x00, 0x0c, 0x7d, - 0xe8, 0x03, 0xa6, 0x4e, 0x80, 0x00, 0x21, 0x7d, 0xe4, 0x7a, 0x14, 0x39, 0xef, 0x00, 0x07, 0x55, 0xef, 0x00, - 0x38, 0x4b, 0xff, 0xfa, 0x6c, 0x2e, 0x05, 0x00, 0x03, 0x41, 0x91, 0x00, 0x5c, 0x3c, 0xa0, 0x48, 0x00, 0x7d, - 0x83, 0x62, 0x14, 0x55, 0x8c, 0x00, 0x3a, 0x40, 0x92, 0x00, 0x20, 0x40, 0xbe, 0xfa, 0x50, 0x57, 0x44, 0x00, - 0x3a, 0x7c, 0x8c, 0x20, 0x50, 0x50, 0x85, 0x01, 0xba, 0x50, 0x65, 0x07, 0xfe, 0x90, 0xac, 0x00, 0x00, 0x4b, - 0xff, 0xfa, 0x38, 0x40, 0xbe, 0xff, 0xbc, 0x7d, 0x2c, 0x78, 0x50, 0x51, 0x25, 0x01, 0xba, 0x90, 0xac, 0x00, - 0x00, 0x39, 0x8c, 0x00, 0x04, 0x7d, 0x6f, 0x22, 0x14, 0x39, 0x6b, 0xff, 0xfc, 0x7d, 0x2b, 0x60, 0x50, 0x51, - 0x25, 0x01, 0xba, 0x90, 0xab, 0x00, 0x00, 0x4b, 0xff, 0xff, 0x94, 0x2e, 0x05, 0x00, 0x06, 0x41, 0x92, 0x00, - 0x28, 0x4b, 0xff, 0xfb, 0x28, 0x55, 0x8c, 0x84, 0x3e, 0x57, 0x44, 0x84, 0x3e, 0x57, 0x5a, 0x04, 0x3e, 0x7c, - 0x0c, 0x20, 0x00, 0x41, 0x80, 0xfb, 0xa8, 0x7c, 0x0c, 0xd0, 0x00, 0x40, 0x80, 0xfb, 0xa0, 0x4b, 0xff, 0xf9, - 0xe0, 0x57, 0x45, 0xff, 0xfe, 0x68, 0xa5, 0x00, 0x01, 0x71, 0x03, 0x00, 0x01, 0x7c, 0x05, 0x18, 0x00, 0x41, - 0x82, 0x00, 0x1c, 0x51, 0x1a, 0x0f, 0xbc, 0x6b, 0x5a, 0x00, 0x02, 0x57, 0x45, 0xff, 0xff, 0x41, 0x82, 0x00, - 0x08, 0x6b, 0x5a, 0x00, 0x01, 0x93, 0x4f, 0xff, 0xfc, 0x53, 0x48, 0x07, 0xfe, 0x4b, 0xff, 0xf9, 0xac, 0x2c, - 0x0b, 0x00, 0x00, 0x41, 0x82, 0x01, 0x38, 0x2c, 0x05, 0x00, 0x01, 0x41, 0x82, 0x00, 0x18, 0x2c, 0x05, 0x00, - 0x02, 0x41, 0x82, 0x00, 0x14, 0x2c, 0x05, 0x00, 0x03, 0x41, 0x82, 0x00, 0x70, 0x4b, 0xff, 0xf9, 0x80, 0x54, - 0xcc, 0x00, 0x0c, 0x54, 0x97, 0x46, 0x3e, 0x54, 0x98, 0xc4, 0x3e, 0x54, 0x84, 0x06, 0x3e, 0x40, 0x9e, 0x00, - 0xfc, 0x56, 0xf9, 0x06, 0x31, 0x7d, 0x9a, 0x63, 0x78, 0x7f, 0x43, 0xd2, 0x14, 0x57, 0x5a, 0x00, 0x3a, 0x41, - 0x82, 0x00, 0x18, 0x7e, 0xf7, 0x07, 0x74, 0x7e, 0xf7, 0x00, 0xd0, 0x1f, 0x37, 0x00, 0x02, 0x3b, 0x39, 0x00, - 0x04, 0x7f, 0x59, 0xd0, 0x50, 0x2c, 0x17, 0x00, 0x00, 0x41, 0x82, 0x00, 0x1c, 0x3b, 0x20, 0x00, 0x00, 0x7e, - 0xe9, 0x03, 0xa6, 0xa3, 0x7a, 0x00, 0x04, 0x7f, 0x79, 0xca, 0x78, 0x3b, 0x5a, 0x00, 0x02, 0x42, 0x00, 0xff, - 0xf4, 0x7c, 0x18, 0xc8, 0x00, 0x40, 0x82, 0x00, 0xac, 0x4b, 0xff, 0xfe, 0x90, 0x51, 0x08, 0x08, 0x3c, 0x40, - 0x9e, 0x00, 0x9c, 0x54, 0x77, 0xb0, 0x03, 0x41, 0x81, 0x00, 0x88, 0x41, 0x80, 0x00, 0x8c, 0x54, 0x7e, 0x06, - 0x3e, 0x1f, 0xde, 0x00, 0x02, 0x54, 0x97, 0x00, 0x1e, 0x6e, 0xf8, 0x80, 0x00, 0x2c, 0x18, 0x00, 0x00, 0x40, - 0x82, 0x00, 0x08, 0x62, 0xf7, 0x30, 0x00, 0x54, 0x98, 0x80, 0x1e, 0x1f, 0x3e, 0x00, 0x04, 0x7f, 0x19, 0xc0, - 0x50, 0x3b, 0x20, 0x00, 0x00, 0x1f, 0x59, 0x00, 0x04, 0x7f, 0x6f, 0xd0, 0x2e, 0x7f, 0x57, 0xd0, 0x2e, 0x3b, - 0x39, 0x00, 0x01, 0x7c, 0x17, 0xc0, 0x40, 0x41, 0x81, 0x00, 0x34, 0x7c, 0x19, 0xf0, 0x00, 0x41, 0x81, 0x00, - 0x14, 0x7c, 0x1a, 0xd8, 0x00, 0x41, 0x82, 0xff, 0xdc, 0x3a, 0xf7, 0x00, 0x04, 0x4b, 0xff, 0xff, 0xd0, 0x80, - 0x6f, 0xff, 0xf8, 0x60, 0x63, 0x03, 0x00, 0x90, 0x6f, 0xff, 0xf8, 0x92, 0xef, 0xff, 0xfc, 0x7e, 0xf0, 0xbb, - 0x78, 0x48, 0x00, 0x00, 0x1c, 0x80, 0x6f, 0xff, 0xf8, 0x60, 0x63, 0x01, 0x00, 0x90, 0x6f, 0xff, 0xf8, 0x61, - 0x08, 0x00, 0x01, 0x48, 0x00, 0x00, 0x08, 0x7c, 0x90, 0x23, 0x78, 0x54, 0x64, 0x06, 0x3e, 0x1c, 0x84, 0x00, - 0x08, 0x7d, 0xe4, 0x7a, 0x14, 0x4b, 0xff, 0xf8, 0x70, 0x40, 0x92, 0x00, 0x0c, 0x39, 0x00, 0x00, 0x00, 0x48, - 0x00, 0x00, 0x14, 0x54, 0x69, 0x06, 0xff, 0x54, 0x65, 0x67, 0xfe, 0x7d, 0x08, 0x4c, 0x30, 0x55, 0x17, 0xff, - 0xff, 0x40, 0x82, 0x00, 0x08, 0x7d, 0x08, 0x2a, 0x78, 0x54, 0x85, 0x00, 0x1f, 0x41, 0x82, 0x00, 0x08, 0x7c, - 0xa6, 0x2b, 0x78, 0x54, 0x85, 0x80, 0x1f, 0x41, 0x82, 0x00, 0x08, 0x7c, 0xb0, 0x2b, 0x78, 0x4b, 0xff, 0xf8, - 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - -}; -const int codehandler_size = sizeof(codehandler); diff --git a/source/patches/codehandleronly.h b/source/patches/codehandleronly.h deleted file mode 100644 index 62d12278..00000000 --- a/source/patches/codehandleronly.h +++ /dev/null @@ -1,161 +0,0 @@ -/* - This file was autogenerated by raw2c. - Visit http://www.devkitpro.org - */ - -const unsigned char codehandleronly[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x21, 0x60, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x94, 0x21, 0xff, 0x58, 0x90, 0x01, 0x00, - 0x08, 0x7c, 0x08, 0x02, 0xa6, 0x90, 0x01, 0x00, 0xac, 0x7c, 0x00, 0x00, 0x26, 0x90, 0x01, 0x00, 0x0c, 0x7c, - 0x09, 0x02, 0xa6, 0x90, 0x01, 0x00, 0x10, 0x7c, 0x01, 0x02, 0xa6, 0x90, 0x01, 0x00, 0x14, 0xbc, 0x61, 0x00, - 0x18, 0x7f, 0x20, 0x00, 0xa6, 0x63, 0x3a, 0x20, 0x00, 0x73, 0x5a, 0xf9, 0xff, 0x7f, 0x40, 0x01, 0x24, 0xd8, - 0x41, 0x00, 0x98, 0xd8, 0x61, 0x00, 0xa0, 0x3f, 0xe0, 0x80, 0x00, 0x3e, 0x80, 0xcc, 0x00, 0xa3, 0x94, 0x40, - 0x10, 0x63, 0x95, 0x00, 0xff, 0xb2, 0xb4, 0x40, 0x10, 0x7f, 0xa8, 0x02, 0xa6, 0x3d, 0xe0, 0x80, 0x00, 0x61, - 0xef, 0x22, 0xa8, 0x63, 0xe7, 0x18, 0x08, 0x3c, 0xc0, 0x80, 0x00, 0x7c, 0xd0, 0x33, 0x78, 0x39, 0x00, 0x00, - 0x00, 0x3c, 0x60, 0x00, 0xd0, 0x60, 0x63, 0xc0, 0xde, 0x80, 0x8f, 0x00, 0x00, 0x7c, 0x03, 0x20, 0x00, 0x40, - 0x82, 0x00, 0x18, 0x80, 0x8f, 0x00, 0x04, 0x7c, 0x03, 0x20, 0x00, 0x40, 0x82, 0x00, 0x0c, 0x39, 0xef, 0x00, - 0x08, 0x48, 0x00, 0x00, 0x4c, 0x7f, 0xa8, 0x03, 0xa6, 0xb3, 0x94, 0x40, 0x10, 0xc8, 0x41, 0x00, 0x98, 0xc8, - 0x61, 0x00, 0xa0, 0x7f, 0x20, 0x00, 0xa6, 0x80, 0x01, 0x00, 0xac, 0x7c, 0x08, 0x03, 0xa6, 0x80, 0x01, 0x00, - 0x0c, 0x7c, 0x0f, 0xf1, 0x20, 0x80, 0x01, 0x00, 0x10, 0x7c, 0x09, 0x03, 0xa6, 0x80, 0x01, 0x00, 0x14, 0x7c, - 0x01, 0x03, 0xa6, 0xb8, 0x61, 0x00, 0x18, 0x80, 0x01, 0x00, 0x08, 0x38, 0x21, 0x00, 0xa8, 0x4c, 0x00, 0x01, - 0x2c, 0x4e, 0x80, 0x00, 0x20, 0x80, 0x6f, 0x00, 0x00, 0x80, 0x8f, 0x00, 0x04, 0x39, 0xef, 0x00, 0x08, 0x71, - 0x09, 0x00, 0x01, 0x2f, 0x89, 0x00, 0x00, 0x39, 0x20, 0x00, 0x00, 0x54, 0x6a, 0x1f, 0x7e, 0x54, 0x65, 0x3f, - 0x7e, 0x74, 0x6b, 0x10, 0x00, 0x54, 0x63, 0x01, 0xfe, 0x40, 0x82, 0x00, 0x0c, 0x54, 0xcc, 0x00, 0x0c, 0x48, - 0x00, 0x00, 0x08, 0x7e, 0x0c, 0x83, 0x78, 0x2e, 0x05, 0x00, 0x00, 0x2c, 0x0a, 0x00, 0x01, 0x41, 0xa0, 0x00, - 0x2c, 0x41, 0xa2, 0x00, 0xe4, 0x2c, 0x0a, 0x00, 0x03, 0x41, 0xa0, 0x01, 0xac, 0x41, 0x82, 0x02, 0x50, 0x2c, - 0x0a, 0x00, 0x05, 0x41, 0x80, 0x02, 0xd4, 0x41, 0xa2, 0x04, 0xe0, 0x2c, 0x0a, 0x00, 0x07, 0x41, 0xa0, 0x05, - 0x0c, 0x48, 0x00, 0x05, 0xf0, 0x7d, 0x8c, 0x1a, 0x14, 0x2c, 0x05, 0x00, 0x03, 0x41, 0x82, 0x00, 0x48, 0x41, - 0x81, 0x00, 0x60, 0x40, 0xbe, 0xff, 0x84, 0x2e, 0x05, 0x00, 0x01, 0x41, 0x91, 0x00, 0x2c, 0x54, 0x8a, 0x84, - 0x3e, 0x41, 0x92, 0x00, 0x10, 0x7c, 0x89, 0x61, 0xae, 0x39, 0x29, 0x00, 0x01, 0x48, 0x00, 0x00, 0x0c, 0x7c, - 0x89, 0x63, 0x2e, 0x39, 0x29, 0x00, 0x02, 0x35, 0x4a, 0xff, 0xff, 0x40, 0xa0, 0xff, 0xe4, 0x4b, 0xff, 0xff, - 0x54, 0x55, 0x8c, 0x00, 0x3a, 0x90, 0x8c, 0x00, 0x00, 0x4b, 0xff, 0xff, 0x48, 0x7c, 0x89, 0x23, 0x78, 0x40, - 0x9e, 0x04, 0xc8, 0x35, 0x29, 0xff, 0xff, 0x41, 0x80, 0x04, 0xc0, 0x7c, 0xa9, 0x78, 0xae, 0x7c, 0xa9, 0x61, - 0xae, 0x4b, 0xff, 0xff, 0xf0, 0x39, 0xef, 0x00, 0x08, 0x40, 0xbe, 0xff, 0x24, 0x80, 0xaf, 0xff, 0xf8, 0x81, - 0x6f, 0xff, 0xfc, 0x54, 0xb1, 0x04, 0x3e, 0x54, 0xaa, 0x85, 0x3e, 0x54, 0xa5, 0x27, 0x3e, 0x2e, 0x85, 0x00, - 0x01, 0x41, 0x96, 0x00, 0x10, 0x41, 0xb5, 0x00, 0x14, 0x7c, 0x89, 0x61, 0xae, 0x48, 0x00, 0x00, 0x10, 0x7c, - 0x89, 0x63, 0x2e, 0x48, 0x00, 0x00, 0x08, 0x7c, 0x89, 0x61, 0x2e, 0x7c, 0x84, 0x5a, 0x14, 0x7d, 0x29, 0x8a, - 0x14, 0x35, 0x4a, 0xff, 0xff, 0x40, 0x80, 0xff, 0xd4, 0x4b, 0xff, 0xfe, 0xdc, 0x54, 0x69, 0x07, 0xff, 0x41, - 0x82, 0x00, 0x10, 0x55, 0x08, 0xf8, 0x7e, 0x71, 0x09, 0x00, 0x01, 0x2f, 0x89, 0x00, 0x00, 0x2e, 0x85, 0x00, - 0x04, 0x2d, 0x8a, 0x00, 0x05, 0x51, 0x08, 0x08, 0x3c, 0x40, 0x9e, 0x00, 0x78, 0x41, 0x8d, 0x04, 0xb8, 0x7d, - 0x8c, 0x1a, 0x14, 0x41, 0x8c, 0x00, 0x0c, 0x41, 0x94, 0x00, 0x30, 0x48, 0x00, 0x00, 0x1c, 0x40, 0x94, 0x00, - 0x10, 0x55, 0x8c, 0x00, 0x3a, 0x81, 0x6c, 0x00, 0x00, 0x48, 0x00, 0x00, 0x1c, 0x55, 0x8c, 0x00, 0x3c, 0xa1, - 0x6c, 0x00, 0x00, 0x7c, 0x89, 0x20, 0xf8, 0x55, 0x29, 0x84, 0x3e, 0x7d, 0x6b, 0x48, 0x38, 0x54, 0x84, 0x04, - 0x3e, 0x7f, 0x0b, 0x20, 0x40, 0x70, 0xa9, 0x00, 0x03, 0x41, 0x82, 0x00, 0x18, 0x2c, 0x09, 0x00, 0x02, 0x41, - 0x82, 0x00, 0x18, 0x41, 0x81, 0x00, 0x1c, 0x40, 0x9a, 0x00, 0x20, 0x48, 0x00, 0x00, 0x18, 0x41, 0x9a, 0x00, - 0x18, 0x48, 0x00, 0x00, 0x10, 0x41, 0x99, 0x00, 0x10, 0x48, 0x00, 0x00, 0x08, 0x41, 0x98, 0x00, 0x08, 0x61, - 0x08, 0x00, 0x01, 0x40, 0x8e, 0xfe, 0x40, 0x41, 0x94, 0xfe, 0x3c, 0x81, 0x6f, 0xff, 0xf8, 0x40, 0x9e, 0x00, - 0x20, 0x70, 0x6c, 0x00, 0x08, 0x41, 0x82, 0x00, 0x0c, 0x71, 0x0c, 0x00, 0x01, 0x41, 0x82, 0x00, 0x10, 0x39, - 0x8b, 0x00, 0x10, 0x51, 0x8b, 0x03, 0x36, 0x48, 0x00, 0x00, 0x08, 0x55, 0x6b, 0x07, 0x16, 0x91, 0x6f, 0xff, - 0xf8, 0x4b, 0xff, 0xfe, 0x0c, 0x40, 0xbe, 0xfe, 0x08, 0x54, 0x69, 0x16, 0xba, 0x54, 0x6e, 0x87, 0xfe, 0x2d, - 0x8e, 0x00, 0x00, 0x2e, 0x05, 0x00, 0x04, 0x70, 0xae, 0x00, 0x03, 0x2e, 0x8e, 0x00, 0x02, 0x41, 0x94, 0x00, - 0x14, 0x41, 0x96, 0x00, 0x50, 0x7c, 0x64, 0x07, 0x34, 0x7c, 0x84, 0x7a, 0x14, 0x48, 0x00, 0x00, 0x68, 0x54, - 0x65, 0xa7, 0xff, 0x41, 0x82, 0x00, 0x0c, 0x7d, 0x27, 0x48, 0x2e, 0x7c, 0x84, 0x4a, 0x14, 0x41, 0x8e, 0x00, - 0x08, 0x7c, 0x8c, 0x22, 0x14, 0x2e, 0x8e, 0x00, 0x01, 0x41, 0x96, 0x00, 0x08, 0x80, 0x84, 0x00, 0x00, 0x54, - 0x63, 0x67, 0xff, 0x41, 0x82, 0x00, 0x3c, 0x40, 0x90, 0x00, 0x0c, 0x7c, 0x84, 0x32, 0x14, 0x48, 0x00, 0x00, - 0x30, 0x7c, 0x84, 0x82, 0x14, 0x48, 0x00, 0x00, 0x28, 0x54, 0x65, 0xa7, 0xff, 0x41, 0x82, 0x00, 0x0c, 0x7d, - 0x27, 0x48, 0x2e, 0x7c, 0x84, 0x4a, 0x14, 0x40, 0x90, 0x00, 0x0c, 0x7c, 0xcc, 0x21, 0x2e, 0x4b, 0xff, 0xfd, - 0x80, 0x7e, 0x0c, 0x21, 0x2e, 0x4b, 0xff, 0xfd, 0x78, 0x40, 0x90, 0x00, 0x0c, 0x7c, 0x86, 0x23, 0x78, 0x4b, - 0xff, 0xfd, 0x6c, 0x7c, 0x90, 0x23, 0x78, 0x4b, 0xff, 0xfd, 0x64, 0x54, 0x89, 0x1e, 0x78, 0x39, 0x29, 0x00, - 0x40, 0x2c, 0x05, 0x00, 0x02, 0x41, 0x80, 0x00, 0x48, 0x54, 0x6b, 0x50, 0x03, 0x41, 0x82, 0x00, 0x14, 0x41, - 0x81, 0x00, 0x08, 0x48, 0x00, 0x00, 0x10, 0x41, 0xbe, 0xfd, 0x40, 0x48, 0x00, 0x00, 0x08, 0x40, 0xbe, 0xfd, - 0x38, 0x2c, 0x05, 0x00, 0x03, 0x41, 0x81, 0x00, 0x10, 0x41, 0xa2, 0x00, 0x10, 0x7d, 0xe7, 0x48, 0x2e, 0x4b, - 0xff, 0xfd, 0x24, 0x7d, 0xe7, 0x49, 0x2e, 0x7c, 0x64, 0x07, 0x34, 0x54, 0x84, 0x1a, 0x78, 0x7d, 0xef, 0x22, - 0x14, 0x4b, 0xff, 0xfd, 0x10, 0x40, 0xbe, 0xfd, 0x0c, 0x7c, 0xa7, 0x4a, 0x14, 0x40, 0x92, 0x00, 0x14, 0x54, - 0x64, 0x04, 0x3e, 0x91, 0xe5, 0x00, 0x00, 0x90, 0x85, 0x00, 0x04, 0x4b, 0xff, 0xfc, 0xf4, 0x81, 0x25, 0x00, - 0x04, 0x2c, 0x09, 0x00, 0x00, 0x41, 0xa2, 0xfc, 0xe8, 0x39, 0x29, 0xff, 0xff, 0x91, 0x25, 0x00, 0x04, 0x81, - 0xe5, 0x00, 0x00, 0x4b, 0xff, 0xfc, 0xd8, 0x40, 0xbe, 0xfc, 0xd4, 0x54, 0x6b, 0x16, 0xba, 0x7f, 0x47, 0x5a, - 0x14, 0x81, 0x3a, 0x00, 0x00, 0x54, 0x6e, 0x67, 0xbe, 0x41, 0x92, 0x00, 0x84, 0x2e, 0x05, 0x00, 0x05, 0x40, - 0x90, 0x01, 0x74, 0x2e, 0x05, 0x00, 0x03, 0x40, 0x90, 0x00, 0x90, 0x2e, 0x05, 0x00, 0x01, 0x54, 0x65, 0x87, - 0xff, 0x41, 0x82, 0x00, 0x08, 0x7c, 0x8c, 0x22, 0x14, 0x2f, 0x0e, 0x00, 0x01, 0x40, 0x92, 0x00, 0x24, 0x41, - 0xb9, 0x00, 0x18, 0x41, 0x9a, 0x00, 0x0c, 0x88, 0x84, 0x00, 0x00, 0x48, 0x00, 0x00, 0xf8, 0xa0, 0x84, 0x00, - 0x00, 0x48, 0x00, 0x00, 0xf0, 0x80, 0x84, 0x00, 0x00, 0x48, 0x00, 0x00, 0xe8, 0x54, 0x73, 0xe5, 0x3e, 0x41, - 0xb9, 0x00, 0x20, 0x41, 0x9a, 0x00, 0x10, 0x99, 0x24, 0x00, 0x00, 0x38, 0x84, 0x00, 0x01, 0x48, 0x00, 0x00, - 0x18, 0xb1, 0x24, 0x00, 0x00, 0x38, 0x84, 0x00, 0x02, 0x48, 0x00, 0x00, 0x0c, 0x91, 0x24, 0x00, 0x00, 0x38, - 0x84, 0x00, 0x04, 0x36, 0x73, 0xff, 0xff, 0x40, 0x80, 0xff, 0xd4, 0x4b, 0xff, 0xfc, 0x40, 0x54, 0x65, 0x87, - 0xff, 0x41, 0x82, 0x00, 0x08, 0x7c, 0x84, 0x62, 0x14, 0x71, 0xc5, 0x00, 0x01, 0x41, 0x82, 0x00, 0x9c, 0x7c, - 0x84, 0x4a, 0x14, 0x48, 0x00, 0x00, 0x94, 0x54, 0x6a, 0x87, 0xbe, 0x54, 0x8e, 0x16, 0xba, 0x7e, 0x67, 0x72, - 0x14, 0x40, 0x92, 0x00, 0x08, 0x3a, 0x6f, 0xff, 0xfc, 0x80, 0x9a, 0x00, 0x00, 0x81, 0x33, 0x00, 0x00, 0x71, - 0x4b, 0x00, 0x01, 0x41, 0x82, 0x00, 0x08, 0x7c, 0x9a, 0x23, 0x78, 0x71, 0x4b, 0x00, 0x02, 0x41, 0x82, 0x00, - 0x10, 0x7d, 0x33, 0x4b, 0x78, 0x40, 0xb2, 0x00, 0x08, 0x7e, 0x6c, 0x9a, 0x14, 0x54, 0x65, 0x67, 0x3f, 0x2c, - 0x05, 0x00, 0x09, 0x40, 0x80, 0x00, 0x54, 0x48, 0x00, 0x00, 0x79, 0x7c, 0x89, 0x22, 0x14, 0x48, 0x00, 0x00, - 0x40, 0x7c, 0x89, 0x21, 0xd6, 0x48, 0x00, 0x00, 0x38, 0x7d, 0x24, 0x23, 0x78, 0x48, 0x00, 0x00, 0x30, 0x7d, - 0x24, 0x20, 0x38, 0x48, 0x00, 0x00, 0x28, 0x7d, 0x24, 0x22, 0x78, 0x48, 0x00, 0x00, 0x20, 0x7d, 0x24, 0x20, - 0x30, 0x48, 0x00, 0x00, 0x18, 0x7d, 0x24, 0x24, 0x30, 0x48, 0x00, 0x00, 0x10, 0x5d, 0x24, 0x20, 0x3e, 0x48, - 0x00, 0x00, 0x08, 0x7d, 0x24, 0x26, 0x30, 0x90, 0x9a, 0x00, 0x00, 0x4b, 0xff, 0xfb, 0x8c, 0x2c, 0x05, 0x00, - 0x0a, 0x41, 0x81, 0xfb, 0x84, 0xc0, 0x5a, 0x00, 0x00, 0xc0, 0x73, 0x00, 0x00, 0x41, 0x82, 0x00, 0x0c, 0xec, - 0x43, 0x10, 0x2a, 0x48, 0x00, 0x00, 0x08, 0xec, 0x43, 0x00, 0xb2, 0xd0, 0x5a, 0x00, 0x00, 0x4b, 0xff, 0xfb, - 0x64, 0x7d, 0x48, 0x02, 0xa6, 0x54, 0xa5, 0x1e, 0x78, 0x7d, 0x4a, 0x2a, 0x14, 0x80, 0x9a, 0x00, 0x00, 0x81, - 0x33, 0x00, 0x00, 0x7d, 0x48, 0x03, 0xa6, 0x4e, 0x80, 0x00, 0x20, 0x40, 0xbe, 0xfb, 0x44, 0x54, 0x69, 0xc0, - 0x3e, 0x7d, 0x8e, 0x63, 0x78, 0x48, 0x00, 0x00, 0x35, 0x41, 0x92, 0x00, 0x0c, 0x7e, 0x31, 0x22, 0x14, 0x48, - 0x00, 0x00, 0x08, 0x7d, 0x29, 0x22, 0x14, 0x54, 0x64, 0xc4, 0x3f, 0x38, 0xa0, 0x00, 0x00, 0x41, 0x82, 0xfb, - 0x1c, 0x7d, 0x45, 0x88, 0xae, 0x7d, 0x45, 0x49, 0xae, 0x38, 0xa5, 0x00, 0x01, 0x7c, 0x05, 0x20, 0x00, 0x4b, - 0xff, 0xff, 0xec, 0x2e, 0x8a, 0x00, 0x04, 0x55, 0x31, 0x36, 0xba, 0x2c, 0x11, 0x00, 0x3c, 0x7e, 0x27, 0x88, - 0x2e, 0x40, 0x82, 0x00, 0x08, 0x7d, 0xd1, 0x73, 0x78, 0x41, 0x96, 0x00, 0x08, 0xa2, 0x31, 0x00, 0x00, 0x55, - 0x29, 0x56, 0xba, 0x2c, 0x09, 0x00, 0x3c, 0x7d, 0x27, 0x48, 0x2e, 0x40, 0x82, 0x00, 0x08, 0x7d, 0xc9, 0x73, - 0x78, 0x41, 0x96, 0x00, 0x08, 0xa1, 0x29, 0x00, 0x00, 0x4e, 0x80, 0x00, 0x20, 0x2c, 0x05, 0x00, 0x04, 0x40, - 0x80, 0x00, 0x28, 0x7c, 0x89, 0x23, 0x78, 0x7d, 0xc3, 0x62, 0x14, 0x55, 0xce, 0x00, 0x3c, 0x4b, 0xff, 0xff, - 0xad, 0x7c, 0x84, 0x20, 0xf8, 0x54, 0x84, 0x04, 0x3e, 0x7d, 0x2b, 0x20, 0x38, 0x7e, 0x24, 0x20, 0x38, 0x4b, - 0xff, 0xfb, 0xc4, 0x54, 0x6b, 0xe4, 0x3e, 0x4b, 0xff, 0xfb, 0xbc, 0x7c, 0x9a, 0x23, 0x78, 0x54, 0x84, 0x18, - 0x38, 0x40, 0x92, 0x00, 0x20, 0x40, 0x9e, 0x00, 0x0c, 0x7d, 0xe8, 0x03, 0xa6, 0x4e, 0x80, 0x00, 0x21, 0x7d, - 0xe4, 0x7a, 0x14, 0x39, 0xef, 0x00, 0x07, 0x55, 0xef, 0x00, 0x38, 0x4b, 0xff, 0xfa, 0x6c, 0x2e, 0x05, 0x00, - 0x03, 0x41, 0x91, 0x00, 0x5c, 0x3c, 0xa0, 0x48, 0x00, 0x7d, 0x83, 0x62, 0x14, 0x55, 0x8c, 0x00, 0x3a, 0x40, - 0x92, 0x00, 0x20, 0x40, 0xbe, 0xfa, 0x50, 0x57, 0x44, 0x00, 0x3a, 0x7c, 0x8c, 0x20, 0x50, 0x50, 0x85, 0x01, - 0xba, 0x50, 0x65, 0x07, 0xfe, 0x90, 0xac, 0x00, 0x00, 0x4b, 0xff, 0xfa, 0x38, 0x40, 0xbe, 0xff, 0xbc, 0x7d, - 0x2c, 0x78, 0x50, 0x51, 0x25, 0x01, 0xba, 0x90, 0xac, 0x00, 0x00, 0x39, 0x8c, 0x00, 0x04, 0x7d, 0x6f, 0x22, - 0x14, 0x39, 0x6b, 0xff, 0xfc, 0x7d, 0x2b, 0x60, 0x50, 0x51, 0x25, 0x01, 0xba, 0x90, 0xab, 0x00, 0x00, 0x4b, - 0xff, 0xff, 0x94, 0x2e, 0x05, 0x00, 0x06, 0x41, 0x92, 0x00, 0x28, 0x4b, 0xff, 0xfb, 0x28, 0x55, 0x8c, 0x84, - 0x3e, 0x57, 0x44, 0x84, 0x3e, 0x57, 0x5a, 0x04, 0x3e, 0x7c, 0x0c, 0x20, 0x00, 0x41, 0x80, 0xfb, 0xa8, 0x7c, - 0x0c, 0xd0, 0x00, 0x40, 0x80, 0xfb, 0xa0, 0x4b, 0xff, 0xf9, 0xe0, 0x57, 0x45, 0xff, 0xfe, 0x68, 0xa5, 0x00, - 0x01, 0x71, 0x03, 0x00, 0x01, 0x7c, 0x05, 0x18, 0x00, 0x41, 0x82, 0x00, 0x1c, 0x51, 0x1a, 0x0f, 0xbc, 0x6b, - 0x5a, 0x00, 0x02, 0x57, 0x45, 0xff, 0xff, 0x41, 0x82, 0x00, 0x08, 0x6b, 0x5a, 0x00, 0x01, 0x93, 0x4f, 0xff, - 0xfc, 0x53, 0x48, 0x07, 0xfe, 0x4b, 0xff, 0xf9, 0xac, 0x2c, 0x0b, 0x00, 0x00, 0x41, 0x82, 0x01, 0x38, 0x2c, - 0x05, 0x00, 0x01, 0x41, 0x82, 0x00, 0x18, 0x2c, 0x05, 0x00, 0x02, 0x41, 0x82, 0x00, 0x14, 0x2c, 0x05, 0x00, - 0x03, 0x41, 0x82, 0x00, 0x70, 0x4b, 0xff, 0xf9, 0x40, 0x54, 0xcc, 0x00, 0x0c, 0x54, 0x97, 0x46, 0x3e, 0x54, - 0x98, 0xc4, 0x3e, 0x54, 0x84, 0x06, 0x3e, 0x40, 0x9e, 0x00, 0xfc, 0x56, 0xf9, 0x06, 0x31, 0x7d, 0x9a, 0x63, - 0x78, 0x7f, 0x43, 0xd2, 0x14, 0x57, 0x5a, 0x00, 0x3a, 0x41, 0x82, 0x00, 0x18, 0x7e, 0xf7, 0x07, 0x74, 0x7e, - 0xf7, 0x00, 0xd0, 0x1f, 0x37, 0x00, 0x02, 0x3b, 0x39, 0x00, 0x04, 0x7f, 0x59, 0xd0, 0x50, 0x2c, 0x17, 0x00, - 0x00, 0x41, 0x82, 0x00, 0x1c, 0x3b, 0x20, 0x00, 0x00, 0x7e, 0xe9, 0x03, 0xa6, 0xa3, 0x7a, 0x00, 0x04, 0x7f, - 0x79, 0xca, 0x78, 0x3b, 0x5a, 0x00, 0x02, 0x42, 0x00, 0xff, 0xf4, 0x7c, 0x18, 0xc8, 0x00, 0x40, 0x82, 0x00, - 0xac, 0x4b, 0xff, 0xfe, 0x90, 0x51, 0x08, 0x08, 0x3c, 0x40, 0x9e, 0x00, 0x9c, 0x54, 0x77, 0xb0, 0x03, 0x41, - 0x81, 0x00, 0x88, 0x41, 0x80, 0x00, 0x8c, 0x54, 0x7e, 0x06, 0x3e, 0x1f, 0xde, 0x00, 0x02, 0x54, 0x97, 0x00, - 0x1e, 0x6e, 0xf8, 0x80, 0x00, 0x2c, 0x18, 0x00, 0x00, 0x40, 0x82, 0x00, 0x08, 0x62, 0xf7, 0x30, 0x00, 0x54, - 0x98, 0x80, 0x1e, 0x1f, 0x3e, 0x00, 0x04, 0x7f, 0x19, 0xc0, 0x50, 0x3b, 0x20, 0x00, 0x00, 0x1f, 0x59, 0x00, - 0x04, 0x7f, 0x6f, 0xd0, 0x2e, 0x7f, 0x57, 0xd0, 0x2e, 0x3b, 0x39, 0x00, 0x01, 0x7c, 0x17, 0xc0, 0x40, 0x41, - 0x81, 0x00, 0x34, 0x7c, 0x19, 0xf0, 0x00, 0x41, 0x81, 0x00, 0x14, 0x7c, 0x1a, 0xd8, 0x00, 0x41, 0x82, 0xff, - 0xdc, 0x3a, 0xf7, 0x00, 0x04, 0x4b, 0xff, 0xff, 0xd0, 0x80, 0x6f, 0xff, 0xf8, 0x60, 0x63, 0x03, 0x00, 0x90, - 0x6f, 0xff, 0xf8, 0x92, 0xef, 0xff, 0xfc, 0x7e, 0xf0, 0xbb, 0x78, 0x48, 0x00, 0x00, 0x1c, 0x80, 0x6f, 0xff, - 0xf8, 0x60, 0x63, 0x01, 0x00, 0x90, 0x6f, 0xff, 0xf8, 0x61, 0x08, 0x00, 0x01, 0x48, 0x00, 0x00, 0x08, 0x7c, - 0x90, 0x23, 0x78, 0x54, 0x64, 0x06, 0x3e, 0x1c, 0x84, 0x00, 0x08, 0x7d, 0xe4, 0x7a, 0x14, 0x4b, 0xff, 0xf8, - 0x70, 0x40, 0x92, 0x00, 0x0c, 0x39, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x14, 0x54, 0x69, 0x06, 0xff, 0x54, - 0x65, 0x67, 0xfe, 0x7d, 0x08, 0x4c, 0x30, 0x55, 0x17, 0xff, 0xff, 0x40, 0x82, 0x00, 0x08, 0x7d, 0x08, 0x2a, - 0x78, 0x54, 0x85, 0x00, 0x1f, 0x41, 0x82, 0x00, 0x08, 0x7c, 0xa6, 0x2b, 0x78, 0x54, 0x85, 0x80, 0x1f, 0x41, - 0x82, 0x00, 0x08, 0x7c, 0xb0, 0x2b, 0x78, 0x4b, 0xff, 0xf8, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00 - -}; -const int codehandleronly_size = sizeof(codehandleronly); diff --git a/source/patches/dolpatcher.c b/source/patches/dolpatcher.c deleted file mode 100644 index f5153ea8..00000000 --- a/source/patches/dolpatcher.c +++ /dev/null @@ -1,19 +0,0 @@ -#include -#include - -bool PatchDOL(u8 * Address, int Size, const u8 * SearchPattern, int SearchSize, const u8 * PatchData, int PatchSize) -{ - u8 * Addr = Address; - u8 * Addr_end = Address + Size; - - while (Addr <= Addr_end - SearchSize) - { - if (memcmp(Addr, SearchPattern, SearchSize) == 0) - { - memcpy(Addr, PatchData, PatchSize); - return true; - } - Addr += 4; - } - return false; -} diff --git a/source/patches/dolpatcher.h b/source/patches/dolpatcher.h deleted file mode 100644 index 09eb3190..00000000 --- a/source/patches/dolpatcher.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef DOLPATCHER_C_ -#define DOLPATCHER_C_ - -#include - -bool PatchDOL(u8 * Address, int Size, const u8 * SearchPattern, int SearchSize, const u8 * PatchData, int PatchSize); - -#endif diff --git a/source/patches/dvd_broadway.c b/source/patches/dvd_broadway.c deleted file mode 100644 index 3b629991..00000000 --- a/source/patches/dvd_broadway.c +++ /dev/null @@ -1,639 +0,0 @@ -/* - * Copyright (C) 2008 Nuke (wiinuke@gmail.com) - * - * this file is part of GeckoOS for USB Gecko - * http://www.usbgecko.com - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "dvd_broadway.h" - -#define DI_CMDCTX_CNT 4 - -#define DVD_DISKIDSIZE 0x20 -#define DVD_DRVINFSIZE 0x20 - -#define IOCTL_DI_INQUIRY 0x12 -#define IOCTL_DI_READID 0x70 -#define IOCTL_DI_READ 0x71 -#define IOCTL_DI_WAITCVRCLOSE 0x79 -#define IOCTL_DI_COVER 0x7A -#define IOCTL_DI_RESETNOTIFY 0x7E -#define IOCTL_DI_RESET 0x8A -#define IOCTL_DI_OPENPART 0x8B -#define IOCTL_DI_CLOSEPART 0x8C -#define IOCTL_DI_UNENCREAD 0x8D -#define IOCTL_DI_ENABLE_DVD 0x8E -#define IOCTL_DI_SEEK 0xAB -#define IOCTL_DI_READ_DVDVIDEO 0xD0 -#define IOCTL_DI_STOPLASER 0xD2 -#define IOCTL_DI_OFFSET 0xD9 -#define IOCTL_DI_REQERROR 0xE0 -#define IOCTL_DI_STOPMOTOR 0xE3 -#define IOCTL_DI_SETOFFBASE 0xF0 -#define IOCTL_DI_GETOFFBASE 0xF1 -#define IOCTL_DI_SETCRYPTMODE 0xF2 -#define IOCTL_DI_GETCRYPTMODE 0xF3 -#define IOCTL_DI_SETDVDROMMODE 0xF4 -#define IOCTL_DI_GETDVDROMMODE 0xF5 - -#define _SHIFTL(v, s, w) \ - ((u32) (((u32)(v) & ((0x01 << (w)) - 1)) << (s))) -#define _SHIFTR(v, s, w) \ - ((u32)(((u32)(v) >> (s)) & ((0x01 << (w)) - 1))) - -struct dicommand -{ - u32 diReg[8]; -}; - -struct dicontext -{ - lwp_node node; - dvdcallbacklow cb; - struct dicommand *cmd; -}; - -static s32 __dvd_fd = -1; -static u32 __dvd_spinupval = 1; -static lwp_queue __di_contextq; -static u32 __dvd_readlength = 0; -static u32 __dvd_cbinprogress = 0; -static u32 __dvd_reqinprogress = 0; -static u32 __dvd_lowinitcalled = 0; -static struct dicommand *__di_commands = NULL; -static struct dicontext __di_contexts[DI_CMDCTX_CNT]; -static u32 __di_regbuffer[0x08] ATTRIBUTE_ALIGN( 32 ); -static u32 __di_regvalcache[0x08] ATTRIBUTE_ALIGN( 32 ); -static u32 __di_lastticketerror[0x08] ATTRIBUTE_ALIGN( 32 ); -static ioctlv __di_iovector[0x08] ATTRIBUTE_ALIGN( 32 ); -static char __di_fs[] ATTRIBUTE_ALIGN( 32 ) = "/dev/di"; - -extern u32 __IPC_ClntInit(); - -static __inline__ lwp_node* __lwp_queue_head(lwp_queue *queue) -{ - return (lwp_node*) queue; -} - -static __inline__ lwp_node* __lwp_queue_tail(lwp_queue *queue) -{ - return (lwp_node*) &queue->perm_null; -} - -static __inline__ void __lwp_queue_init_empty(lwp_queue *queue) -{ - queue->first = __lwp_queue_tail(queue); - queue->perm_null = NULL; - queue->last = __lwp_queue_head(queue); -} - -static struct dicontext* __dvd_getcontext(dvdcallbacklow cb) -{ - struct dicontext *ctx; - - ctx = (struct dicontext*) __lwp_queue_get(&__di_contextq); - if (ctx != NULL) ctx->cb = cb; - - return ctx; -} - -static s32 __dvd_iostransactionCB(s32 result, void *usrdata) -{ - struct dicontext *ctx = (struct dicontext*) usrdata; - - __dvd_reqinprogress = 0; - - if (ctx->cb != NULL) - { - __dvd_cbinprogress = 1; - if (result != 0) __dvd_readlength = 0; - ctx->cb(result); - __dvd_cbinprogress = 0; - } - __lwp_queue_append(&__di_contextq, &ctx->node); - - return 0; -} - -static s32 __dvd_ioscoverregisterCB(s32 result, void *usrdata) -{ - struct dicontext *ctx = (struct dicontext*) usrdata; - - __dvd_reqinprogress = 0; - __di_regvalcache[1] = __di_regbuffer[0]; - - if (ctx->cb != NULL) - { - __dvd_cbinprogress = 1; - ctx->cb(result); - __dvd_cbinprogress = 0; - } - __lwp_queue_append(&__di_contextq, &ctx->node); - - return 0; -} - -static s32 __dvd_ioscovercloseCB(s32 result, void *usrdata) -{ - struct dicontext *ctx = (struct dicontext*) usrdata; - - __dvd_reqinprogress = 0; - - if (ctx->cb != NULL) - { - __dvd_cbinprogress = 1; - ctx->cb(result); - __dvd_cbinprogress = 0; - } - __lwp_queue_append(&__di_contextq, &ctx->node); - - return 0; -} - -s32 bwDVD_LowInit() -{ - s32 i, ret = 0; - u32 ipclo, ipchi; - lwp_queue inactives; - struct dicontext *ctx; - - if (__dvd_lowinitcalled == 0) - { - ret = __IPC_ClntInit(); - if (ret < 0) return ret; - - ipclo = (((u32) IPC_GetBufferLo() + 0x1f) & ~0x1f); - ipchi = (u32) IPC_GetBufferHi(); - if (ipchi >= (ipclo + (sizeof(struct dicommand) * DI_CMDCTX_CNT))) - { - __di_commands = (struct dicommand*) ipclo; - IPC_SetBufferLo((void*) (ipclo + (sizeof(struct dicommand) * DI_CMDCTX_CNT))); - - memset(__di_commands, 0, (sizeof(struct dicommand) * DI_CMDCTX_CNT)); - - i = 0; - __lwp_queue_init_empty(&__di_contextq); - __lwp_queue_initialize(&inactives, __di_contexts, DI_CMDCTX_CNT, sizeof(struct dicontext)); - while ((ctx = (struct dicontext*) __lwp_queue_get(&inactives)) != NULL) - { - ctx->cmd = &__di_commands[i]; - ctx->cb = NULL; - __lwp_queue_append(&__di_contextq, &ctx->node); - - i++; - } - } - - ret = IOS_Open(__di_fs, 0); - if (ret < 0) return ret; - - __dvd_fd = ret; - // __dvd_lowinitcalled = 1; - - // printf("DVD_LowInit(%d)\n",ret); - } - return 0; -} - -s32 bwDVD_LowInquiry(dvddrvinfo *info, dvdcallbacklow cb) -{ - s32 ret; - struct dicontext *ctx; - struct dicommand *cmd; - - __dvd_reqinprogress = 1; - - ctx = __dvd_getcontext(cb); - if (ctx == NULL) return IPC_ENOMEM; - - cmd = ctx->cmd; - cmd->diReg[0] = (IOCTL_DI_INQUIRY << 24); - ret = IOS_IoctlAsync(__dvd_fd, IOCTL_DI_INQUIRY, cmd->diReg, sizeof(struct dicommand), info, DVD_DRVINFSIZE, - __dvd_iostransactionCB, ctx); - - return ret; -} - -s32 bwDVD_LowReadID(dvddiskid *diskID, dvdcallbacklow cb) -{ - s32 ret = 0; - struct dicontext *ctx; - struct dicommand *cmd; - - // printf("DVD_LowReadID()\n"); - - __dvd_reqinprogress = 1; - - ctx = __dvd_getcontext(cb); - if (ctx == NULL) return IPC_ENOMEM; - - cmd = ctx->cmd; - cmd->diReg[0] = (IOCTL_DI_READID << 24); - ret = IOS_IoctlAsync(__dvd_fd, IOCTL_DI_READID, cmd->diReg, sizeof(struct dicommand), diskID, DVD_DISKIDSIZE, - __dvd_iostransactionCB, ctx); - - // printf("DVD_LowReadID(%d)\n",ret); - return ret; -} - -s32 bwDVD_LowRead(void *buf, u32 len, u32 offset, dvdcallbacklow cb) -{ - s32 ret; - struct dicontext *ctx; - struct dicommand *cmd; - - if (buf == NULL || ((u32) buf % 32) != 0) return -1; - - __dvd_reqinprogress = 1; - __dvd_readlength = len; - - ctx = __dvd_getcontext(cb); - if (ctx == NULL) return IPC_ENOMEM; - - cmd = ctx->cmd; - cmd->diReg[0] = (IOCTL_DI_READ << 24); - cmd->diReg[1] = len; - cmd->diReg[2] = offset; - ret = IOS_IoctlAsync(__dvd_fd, IOCTL_DI_READ, cmd->diReg, sizeof(struct dicommand), buf, len, - __dvd_iostransactionCB, ctx); - - return ret; -} - -// never got this function working, probably removed from wii -s32 bwDVD_LowReadVideo(void *buf, u32 len, u32 offset, dvdcallbacklow cb) -{ - s32 ret; - struct dicontext *ctx; - struct dicommand *cmd; - - __dvd_reqinprogress = 1; - __dvd_readlength = len; - - ctx = __dvd_getcontext(cb); - if (ctx == NULL) return IPC_ENOMEM; - - cmd = ctx->cmd; - cmd->diReg[0] = (IOCTL_DI_READ_DVDVIDEO << 24); - cmd->diReg[1] = len; - cmd->diReg[2] = offset; - ret = IOS_IoctlAsync(__dvd_fd, IOCTL_DI_READ_DVDVIDEO, cmd->diReg, sizeof(struct dicommand), buf, len, - __dvd_iostransactionCB, ctx); - - return ret; -} - -s32 bwDVD_LowStopLaser(dvdcallbacklow cb) -{ - s32 ret; - struct dicontext *ctx; - struct dicommand *cmd; - - __dvd_reqinprogress = 1; - - ctx = __dvd_getcontext(cb); - if (ctx == NULL) return IPC_ENOMEM; - - cmd = ctx->cmd; - cmd->diReg[0] = (IOCTL_DI_STOPLASER << 24); - ret = IOS_IoctlAsync(__dvd_fd, IOCTL_DI_STOPLASER, cmd->diReg, sizeof(struct dicommand), __di_regvalcache, 0x20, - __dvd_iostransactionCB, ctx); - - return ret; -} - -// never got this function working, probably removed from wii -s32 bwDVD_EnableVideo(dvdcallbacklow cb) -{ - s32 ret; - struct dicontext *ctx; - struct dicommand *cmd; - - __dvd_reqinprogress = 1; - - ctx = __dvd_getcontext(cb); - if (ctx == NULL) return IPC_ENOMEM; - - cmd = ctx->cmd; - cmd->diReg[0] = (IOCTL_DI_ENABLE_DVD << 24); - ret = IOS_IoctlAsync(__dvd_fd, IOCTL_DI_ENABLE_DVD, cmd->diReg, sizeof(struct dicommand), __di_regvalcache, 0x20, - __dvd_iostransactionCB, ctx); - - return ret; -} - -s32 bwDVD_LowSeek(u32 offset, dvdcallbacklow cb) -{ - s32 ret; - struct dicontext *ctx; - struct dicommand *cmd; - - __dvd_reqinprogress = 1; - - ctx = __dvd_getcontext(cb); - if (ctx == NULL) return IPC_ENOMEM; - - cmd = ctx->cmd; - cmd->diReg[0] = (IOCTL_DI_SEEK << 24); - cmd->diReg[1] = offset; - ret = IOS_IoctlAsync(__dvd_fd, IOCTL_DI_SEEK, cmd->diReg, sizeof(struct dicommand), NULL, 0, - __dvd_iostransactionCB, ctx); - - return ret; -} - -s32 bwDVD_LowOffset(u64 offset, dvdcallbacklow cb) -{ - s32 ret; - //u32 *off = (u32*)(void*)(&offset); - union - { - u64 off64; - u32 off32[2]; - } off; - off.off64 = offset; - struct dicontext *ctx; - struct dicommand *cmd; - - __dvd_reqinprogress = 1; - - ctx = __dvd_getcontext(cb); - if (ctx == NULL) return IPC_ENOMEM; - - cmd = ctx->cmd; - cmd->diReg[0] = (IOCTL_DI_OFFSET << 24); - cmd->diReg[1] = 0; - if (off.off32[0]) cmd->diReg[1] = 1; - cmd->diReg[2] = off.off32[1]; - ret = IOS_IoctlAsync(__dvd_fd, IOCTL_DI_OFFSET, cmd->diReg, sizeof(struct dicommand), __di_regvalcache, 0x20, - __dvd_iostransactionCB, ctx); - - return ret; -} - -s32 bwDVD_LowPrepareCoverRegister(dvdcallbacklow cb) -{ - s32 ret; - struct dicontext *ctx; - struct dicommand *cmd; - - __dvd_reqinprogress = 1; - - ctx = __dvd_getcontext(cb); - if (ctx == NULL) return IPC_ENOMEM; - - cmd = ctx->cmd; - cmd->diReg[0] = (IOCTL_DI_COVER << 24); - ret = IOS_IoctlAsync(__dvd_fd, IOCTL_DI_COVER, cmd->diReg, sizeof(struct dicommand), __di_regbuffer, 0x20, - __dvd_ioscoverregisterCB, ctx); - - return ret; -} - -s32 bwDVD_LowOpenPartition(u32 offset, void *eticket, u32 certin_len, void *certificate_in, void *certificate_out, - dvdcallbacklow cb) -{ - s32 ret; - struct dicontext *ctx; - struct dicommand *cmd; - - if (eticket != NULL && ((u32) eticket % 32) != 0) return -1; - if (certificate_in != NULL && ((u32) certificate_in % 32) != 0) return -1; - if (certificate_out != NULL && ((u32) certificate_out % 32) != 0) return -1; - - __dvd_reqinprogress = 1; - - ctx = __dvd_getcontext(cb); - if (ctx == NULL) return IPC_ENOMEM; - - cmd = ctx->cmd; - cmd->diReg[0] = (IOCTL_DI_OPENPART << 24); - cmd->diReg[1] = offset; - - __di_iovector[0].data = cmd; - __di_iovector[0].len = sizeof(struct dicommand); - - __di_iovector[1].data = eticket; - if (eticket == NULL) - __di_iovector[1].len = 0; - else __di_iovector[1].len = 676; - - __di_iovector[2].data = certificate_in; - if (certificate_in == NULL) - __di_iovector[2].len = 0; - else __di_iovector[2].len = certin_len; - - __di_iovector[3].data = certificate_out; - __di_iovector[3].len = 18916; - __di_iovector[4].data = __di_lastticketerror; - __di_iovector[4].len = 0x20; - ret = IOS_IoctlvAsync(__dvd_fd, IOCTL_DI_OPENPART, 3, 2, __di_iovector, __dvd_iostransactionCB, ctx); - - return ret; -} - -s32 bwDVD_LowClosePartition(dvdcallbacklow cb) -{ - s32 ret; - struct dicontext *ctx; - struct dicommand *cmd; - - __dvd_reqinprogress = 1; - - ctx = __dvd_getcontext(cb); - if (ctx == NULL) return IPC_ENOMEM; - - cmd = ctx->cmd; - cmd->diReg[0] = (IOCTL_DI_CLOSEPART << 24); - ret = IOS_IoctlAsync(__dvd_fd, IOCTL_DI_CLOSEPART, cmd->diReg, sizeof(struct dicommand), NULL, 0, - __dvd_iostransactionCB, ctx); - - return ret; -} - -s32 bwDVD_LowUnencryptedRead(void *buf, u32 len, u32 offset, dvdcallbacklow cb) -{ - s32 ret; - struct dicontext *ctx; - struct dicommand *cmd; - - __dvd_reqinprogress = 1; - __dvd_readlength = len; - - ctx = __dvd_getcontext(cb); - if (ctx == NULL) return IPC_ENOMEM; - - cmd = ctx->cmd; - cmd->diReg[0] = (IOCTL_DI_UNENCREAD << 24); - cmd->diReg[1] = len; - cmd->diReg[2] = offset; - ret = IOS_IoctlAsync(__dvd_fd, IOCTL_DI_UNENCREAD, cmd->diReg, sizeof(struct dicommand), buf, len, - __dvd_iostransactionCB, ctx); - - return ret; -} - -s32 bwDVD_LowWaitCoverClose(dvdcallbacklow cb) -{ - s32 ret; - struct dicontext *ctx; - struct dicommand *cmd; - - __dvd_reqinprogress = 1; - - ctx = __dvd_getcontext(cb); - if (ctx == NULL) return IPC_ENOMEM; - - cmd = ctx->cmd; - cmd->diReg[0] = (IOCTL_DI_WAITCVRCLOSE << 24); - ret = IOS_IoctlAsync(__dvd_fd, IOCTL_DI_WAITCVRCLOSE, cmd->diReg, sizeof(struct dicommand), NULL, 0, - __dvd_ioscovercloseCB, ctx); - - return ret; -} - -s32 bwDVD_LowResetNotify() -{ - s32 ret; - struct dicontext *ctx; - struct dicommand *cmd; - - if (__dvd_cbinprogress == 1) return -1; - - ctx = __dvd_getcontext(NULL); - if (ctx == NULL) return IPC_ENOMEM; - - cmd = ctx->cmd; - cmd->diReg[0] = (IOCTL_DI_RESETNOTIFY << 24); - ret = IOS_Ioctl(__dvd_fd, IOCTL_DI_RESETNOTIFY, cmd->diReg, sizeof(struct dicommand), NULL, 0); - - return ret; -} - -s32 bwDVD_LowReset(dvdcallbacklow cb) -{ - s32 ret; - struct dicontext *ctx; - struct dicommand *cmd; - - // printf("DVD_LowReset()\n"); - __dvd_reqinprogress = 1; - - ctx = __dvd_getcontext(cb); - if (ctx == NULL) return IPC_ENOMEM; - - cmd = ctx->cmd; - cmd->diReg[0] = (IOCTL_DI_RESET << 24); - cmd->diReg[1] = __dvd_spinupval; - ret = IOS_IoctlAsync(__dvd_fd, IOCTL_DI_RESET, cmd->diReg, sizeof(struct dicommand), NULL, 0, - __dvd_iostransactionCB, ctx); - - // printf("DVD_LowReset(%d)\n",ret); - return ret; -} - -s32 bwDVD_LowStopMotor(u8 stop1, u8 stop2, dvdcallbacklow cb) -{ - s32 ret; - struct dicontext *ctx; - struct dicommand *cmd; - - __dvd_reqinprogress = 1; - - ctx = __dvd_getcontext(cb); - if (ctx == NULL) return IPC_ENOMEM; - - cmd = ctx->cmd; - cmd->diReg[0] = (IOCTL_DI_STOPMOTOR << 24); - cmd->diReg[1] = (stop1 << 24); - cmd->diReg[2] = (stop2 << 24); - ret = IOS_IoctlAsync(__dvd_fd, IOCTL_DI_STOPMOTOR, cmd->diReg, sizeof(struct dicommand), __di_regvalcache, 0x20, - __dvd_iostransactionCB, ctx); - - return ret; - -} - -s32 bwDVD_LowRequestError(dvdcallbacklow cb) -{ - s32 ret; - struct dicontext *ctx; - struct dicommand *cmd; - - __dvd_reqinprogress = 1; - - ctx = __dvd_getcontext(cb); - if (ctx == NULL) return IPC_ENOMEM; - - cmd = ctx->cmd; - cmd->diReg[0] = (IOCTL_DI_REQERROR << 24); - ret = IOS_IoctlAsync(__dvd_fd, IOCTL_DI_REQERROR, cmd->diReg, sizeof(struct dicommand), __di_regvalcache, 0x20, - __dvd_iostransactionCB, ctx); - - return ret; -} - -s32 bwDVD_SetDecryption(s32 mode, dvdcallbacklow cb) -{ - s32 ret; - struct dicontext *ctx; - struct dicommand *cmd; - - __dvd_reqinprogress = 1; - - ctx = __dvd_getcontext(cb); - if (ctx == NULL) return IPC_ENOMEM; - - cmd = ctx->cmd; - cmd->diReg[0] = (IOCTL_DI_SETCRYPTMODE << 24); - cmd->diReg[1] = mode; - ret = IOS_IoctlAsync(__dvd_fd, IOCTL_DI_SETCRYPTMODE, cmd->diReg, sizeof(struct dicommand), __di_regvalcache, 0x20, - __dvd_iostransactionCB, ctx); - - return ret; - -} - -s32 bwDVD_SetOffset(u32 offset, dvdcallbacklow cb) -{ - s32 ret; - struct dicontext *ctx; - struct dicommand *cmd; - - __dvd_reqinprogress = 1; - - ctx = __dvd_getcontext(cb); - if (ctx == NULL) return IPC_ENOMEM; - - cmd = ctx->cmd; - cmd->diReg[0] = (IOCTL_DI_SETOFFBASE << 24); - cmd->diReg[1] = offset; - ret = IOS_IoctlAsync(__dvd_fd, IOCTL_DI_SETOFFBASE, cmd->diReg, sizeof(struct dicommand), __di_regvalcache, 0x20, - __dvd_iostransactionCB, ctx); - - return ret; - -} diff --git a/source/patches/dvd_broadway.h b/source/patches/dvd_broadway.h deleted file mode 100644 index eaf41e21..00000000 --- a/source/patches/dvd_broadway.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2008 Nuke (wiinuke@gmail.com) - * - * this file is part of GeckoOS for USB Gecko - * http://www.usbgecko.com - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef __DVD_BROADWAY_H__ -#define __DVD_BROADWAY_H__ - -#include -#include -#include - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - typedef void (*dvdcallbacklow)(s32 result); - - s32 bwDVD_LowInit(); - s32 bwDVD_LowInquiry(dvddrvinfo *info, dvdcallbacklow cb); - s32 bwDVD_LowReadID(dvddiskid *diskID, dvdcallbacklow cb); - s32 bwDVD_LowClosePartition(dvdcallbacklow cb); - s32 bwDVD_LowOpenPartition(u32 offset, void *eticket, u32 certin_len, void *certificate_in, void *certificate_out, - dvdcallbacklow cb); - s32 bwDVD_LowUnencryptedRead(void *buf, u32 len, u32 offset, dvdcallbacklow cb); - s32 bwDVD_LowReset(dvdcallbacklow cb); - s32 bwDVD_LowWaitCoverClose(dvdcallbacklow cb); - s32 bwDVD_LowRead(void *buf, u32 len, u32 offset, dvdcallbacklow cb); - s32 bwDVD_EnableVideo(dvdcallbacklow cb); - s32 bwDVD_LowReadVideo(void *buf, u32 len, u32 offset, dvdcallbacklow cb); - s32 bwDVD_SetDecryption(s32 mode, dvdcallbacklow cb); - s32 bwDVD_SetOffset(u32 offset, dvdcallbacklow cb); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/source/patches/fst.c b/source/patches/fst.c deleted file mode 100644 index 4a4924b6..00000000 --- a/source/patches/fst.c +++ /dev/null @@ -1,861 +0,0 @@ -/* - * Copyright (C) 2008 Nuke (wiinuke@gmail.com) - * - * this file is part of GeckoOS for USB Gecko - * http://www.usbgecko.com - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include -#include -#include - -#include "fst.h" -#include "dvd_broadway.h" -#include "mload/mload.h" -#include "mload/mload_modules.h" -#include "gecko.h" - -#include "patchcode.h" -#include "language/gettext.h" - -#include "codehandler.h" -//#include "codehandlerslota.h" -#include "codehandleronly.h" -#include "multidol.h" - -#define FSTDIRTYPE 1 -#define FSTFILETYPE 0 -#define ENTRYSIZE 0xC -//#define FILEDIR "fat0:/codes" -//#define FILEDIR "sd:/codes" -#define FILEDIR "/codes" - -#define MAX_FILENAME_LEN 128 - -const char * CheatFilepath = NULL; -static const char * BCAFilepath = NULL; - -static u8 *codelistend = NULL; -static void *codelist = NULL; - -static u8 *code_buf = NULL; -static int code_size = 0; - -static u32 gameconfsize = 0; -static u32 *gameconf = NULL; - -static u8 debuggerselect = 0; - -extern const u32 viwiihooks[4]; -extern const u32 kpadhooks[4]; -extern const u32 joypadhooks[4]; -extern const u32 gxdrawhooks[4]; -extern const u32 gxflushhooks[4]; -extern const u32 ossleepthreadhooks[4]; -extern const u32 axnextframehooks[4]; -extern const u32 wpadbuttonsdownhooks[4]; -extern const u32 wpadbuttonsdown2hooks[4]; - -void SetCheatFilepath(const char * path) -{ - CheatFilepath = path; -} - -void SetBCAFilepath(const char * path) -{ - BCAFilepath = path; -} - -//static vu32 dvddone = 0; - -//--------------------------------------------------------------------------------- -void app_loadgameconfig(char *discid) -//--------------------------------------------------------------------------------- -{ - if (!CheatFilepath) return; - - gameconfsize = 0; - - if (gameconf == NULL) - { - gameconf = (u32*) malloc(65536); - if (gameconf == NULL) - { - //TODO for oggzee - //print_status("Out of memory"); - return; - } - } - - FILE* fp; - u32 ret; - u32 filesize; - s32 gameidmatch, maxgameidmatch = -1, maxgameidmatch2 = -1; - u32 i, numnonascii, parsebufpos; - u32 codeaddr, codeval, codeaddr2, codeval2, codeoffset; - u32 temp, tempoffset = 0; - char parsebuffer[18]; - - //if (config_bytes[2] == 8) - // hookset = 1; - - u8 *tempgameconf; - u32 tempgameconfsize = 0; - - //memcpy(tempgameconf, defaultgameconfig, defaultgameconfig_size); - //tempgameconf[defaultgameconfig_size] = '\n'; - //tempgameconfsize = defaultgameconfig_size + 1; - - char filepath[200]; - snprintf(filepath, sizeof(filepath), "%s/gameconfig.txt", CheatFilepath); - - fp = fopen(filepath, "rb"); - - if (!fp) - { - snprintf(filepath, sizeof(filepath), "sd:/gameconfig.txt"); - fp = fopen(filepath, "rb"); - - for(i = 1; i <= 8; ++i) - { - if(fp) break; - - snprintf(filepath, sizeof(filepath), "usb%i:/gameconfig.txt", i); - fp = fopen(filepath, "rb"); - } - } - - if (fp) - { - fseek(fp, 0, SEEK_END); - filesize = ftell(fp); - fseek(fp, 0, SEEK_SET); - - tempgameconf = (u8*) malloc(filesize); - if (tempgameconf == NULL) - { - //TODO for oggzee - //print_status("Out of memory"); - //wait(4); - return; - } - - ret = fread((void*) tempgameconf, 1, filesize, fp); - fclose(fp); - if (ret != filesize) - { - //TODO for oggzee - //print_status("Error reading gameconfig.txt"); - //wait(4); - return; - } - tempgameconfsize = filesize; - } - else - { - return; - } - - // Remove non-ASCII characters - numnonascii = 0; - for (i = 0; i < tempgameconfsize; i++) - { - if (tempgameconf[i] < 9 || tempgameconf[i] > 126) - numnonascii++; - else tempgameconf[i - numnonascii] = tempgameconf[i]; - } - tempgameconfsize -= numnonascii; - - *(tempgameconf + tempgameconfsize) = 0; - //gameconf = (tempgameconf + tempgameconfsize) + (4 - (((u32) (tempgameconf + tempgameconfsize)) % 4)); - - for (maxgameidmatch = 0; maxgameidmatch <= 6; maxgameidmatch++) - { - i = 0; - while (i < tempgameconfsize) - { - maxgameidmatch2 = -1; - while (maxgameidmatch != maxgameidmatch2) - { - while (i != tempgameconfsize && tempgameconf[i] != ':') - i++; - if (i == tempgameconfsize) break; - while ((tempgameconf[i] != 10 && tempgameconf[i] != 13) && (i != 0)) - i--; - if (i != 0) i++; - parsebufpos = 0; - gameidmatch = 0; - while (tempgameconf[i] != ':') - { - if (tempgameconf[i] == '?') - { - parsebuffer[parsebufpos] = discid[parsebufpos]; - parsebufpos++; - gameidmatch--; - i++; - } - else if (tempgameconf[i] != 0 && tempgameconf[i] != ' ') - parsebuffer[parsebufpos++] = tempgameconf[i++]; - else if (tempgameconf[i] == ' ') - break; - else i++; - if (parsebufpos == 8) break; - } - parsebuffer[parsebufpos] = 0; - if (strncasecmp("DEFAULT", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 7) - { - gameidmatch = 0; - goto idmatch; - } - if (strncmp(discid, parsebuffer, strlen(parsebuffer)) == 0) - { - gameidmatch += strlen(parsebuffer); - idmatch: if (gameidmatch > maxgameidmatch2) - { - maxgameidmatch2 = gameidmatch; - } - } - while ((i != tempgameconfsize) && (tempgameconf[i] != 10 && tempgameconf[i] != 13)) - i++; - } - while (i != tempgameconfsize && tempgameconf[i] != ':') - { - parsebufpos = 0; - while ((i != tempgameconfsize) && (tempgameconf[i] != 10 && tempgameconf[i] != 13)) - { - if (tempgameconf[i] != 0 && tempgameconf[i] != ' ' && tempgameconf[i] != '(' && tempgameconf[i] - != ':') - parsebuffer[parsebufpos++] = tempgameconf[i++]; - else if (tempgameconf[i] == ' ' || tempgameconf[i] == '(' || tempgameconf[i] == ':') - break; - else i++; - if (parsebufpos == 17) break; - } - parsebuffer[parsebufpos] = 0; - //if (!autobootcheck) - { - //if (strncasecmp("addtocodelist(", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 14) - //{ - // ret = sscanf(tempgameconf + i, "%x %x", &codeaddr, &codeval); - // if (ret == 2) - // addtocodelist(codeaddr, codeval); - //} - if (strncasecmp("codeliststart", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) - == 13) - { - sscanf((char *) (tempgameconf + i), " = %x", (unsigned int *) &codelist); - } - if (strncasecmp("codelistend", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 11) - { - sscanf((char *) (tempgameconf + i), " = %x", (unsigned int *) &codelistend); - } - /* - if (strncasecmp("hooktype", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 8) - { - if (hookset == 1) - { - ret = sscanf(tempgameconf + i, " = %u", &temp); - if (ret == 1) - if (temp >= 0 && temp <= 7) - config_bytes[2] = temp; - } - } - */ - if (strncasecmp("poke", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 4) - { - ret = sscanf((char *) tempgameconf + i, "( %x , %x", &codeaddr, &codeval); - if (ret == 2) - { - *(gameconf + (gameconfsize / 4)) = 0; - gameconfsize += 4; - *(gameconf + (gameconfsize / 4)) = 0; - gameconfsize += 8; - *(gameconf + (gameconfsize / 4)) = codeaddr; - gameconfsize += 4; - *(gameconf + (gameconfsize / 4)) = codeval; - gameconfsize += 4; - DCFlushRange((void *) (gameconf + (gameconfsize / 4) - 5), 20); - } - } - if (strncasecmp("pokeifequal", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 11) - { - ret = sscanf((char *) (tempgameconf + i), "( %x , %x , %x , %x", &codeaddr, &codeval, - &codeaddr2, &codeval2); - if (ret == 4) - { - *(gameconf + (gameconfsize / 4)) = 0; - gameconfsize += 4; - *(gameconf + (gameconfsize / 4)) = codeaddr; - gameconfsize += 4; - *(gameconf + (gameconfsize / 4)) = codeval; - gameconfsize += 4; - *(gameconf + (gameconfsize / 4)) = codeaddr2; - gameconfsize += 4; - *(gameconf + (gameconfsize / 4)) = codeval2; - gameconfsize += 4; - DCFlushRange((void *) (gameconf + (gameconfsize / 4) - 5), 20); - } - } - if (strncasecmp("searchandpoke", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) - == 13) - { - ret = sscanf((char *) (tempgameconf + i), "( %x%n", &codeval, &tempoffset); - if (ret == 1) - { - gameconfsize += 4; - temp = 0; - while (ret == 1) - { - *(gameconf + (gameconfsize / 4)) = codeval; - gameconfsize += 4; - temp++; - i += tempoffset; - ret = sscanf((char *) (tempgameconf + i), " %x%n", &codeval, &tempoffset); - } - *(gameconf + (gameconfsize / 4) - temp - 1) = temp; - ret = sscanf((char *) (tempgameconf + i), " , %x , %x , %x , %x", &codeaddr, &codeaddr2, - &codeoffset, &codeval2); - if (ret == 4) - { - *(gameconf + (gameconfsize / 4)) = codeaddr; - gameconfsize += 4; - *(gameconf + (gameconfsize / 4)) = codeaddr2; - gameconfsize += 4; - *(gameconf + (gameconfsize / 4)) = codeoffset; - gameconfsize += 4; - *(gameconf + (gameconfsize / 4)) = codeval2; - gameconfsize += 4; - DCFlushRange((void *) (gameconf + (gameconfsize / 4) - temp - 5), temp * 4 + 20); - } - else gameconfsize -= temp * 4 + 4; - } - - } - /* - if (strncasecmp("hook", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 4) - { - ret = sscanf(tempgameconf + i, "( %x %x %x %x %x %x %x %x", customhook, customhook + 1, customhook + 2, customhook + 3, customhook + 4, customhook + 5, customhook + 6, customhook + 7); - if (ret >= 3) - { - if (hookset != 1) - configwarn |= 4; - config_bytes[2] = 0x08; - customhooksize = ret * 4; - } - } - if (strncasecmp("002fix", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 6) - { - ret = sscanf(tempgameconf + i, " = %u", &temp); - if (ret == 1) - if (temp >= 0 && temp <= 0x1) - fakeiosversion = temp; - } - if (strncasecmp("switchios", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 9) - { - ret = sscanf(tempgameconf + i, " = %u", &temp); - if (ret == 1) - if (temp >= 0 && temp <= 1) - willswitchios = temp; - } - if (strncasecmp("videomode", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 9) - { - ret = sscanf(tempgameconf + i, " = %u", &temp); - if (ret == 1) - { - if (temp == 0) - { - if (config_bytes[1] != 0x00) - configwarn |= 1; - config_bytes[1] = 0x00; - } - else if (temp == 1) - { - if (config_bytes[1] != 0x03) - configwarn |= 1; - config_bytes[1] = 0x03; - } - else if (temp == 2) - { - if (config_bytes[1] != 0x01) - configwarn |= 1; - config_bytes[1] = 0x01; - } - else if (temp == 3) - { - if (config_bytes[1] != 0x02) - configwarn |= 1; - config_bytes[1] = 0x02; - } - } - } - if (strncasecmp("language", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 8) - { - ret = sscanf(tempgameconf + i, " = %u", &temp); - if (ret == 1) - { - if (temp == 0) - { - if (config_bytes[0] != 0xCD) - configwarn |= 2; - config_bytes[0] = 0xCD; - } - else if (temp > 0 && temp <= 10) - { - if (config_bytes[0] != temp-1) - configwarn |= 2; - config_bytes[0] = temp-1; - } - } - } - if (strncasecmp("diagnostic", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 10) - { - ret = sscanf(tempgameconf + i, " = %u", &temp); - if (ret == 1) - { - if (temp == 0 || temp == 1) - diagcreate = temp; - } - } - if (strncasecmp("vidtv", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 5) - { - ret = sscanf(tempgameconf + i, " = %u", &temp); - if (ret == 1) - if (temp >= 0 && temp <= 1) - vipatchon = temp; - } - if (strncasecmp("fwritepatch", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 11) - { - ret = sscanf(tempgameconf + i, " = %u", &temp); - if (ret == 1) - if (temp >= 0 && temp <= 1) - applyfwritepatch = temp; - } - if (strncasecmp("dumpmaindol", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 11) - { - ret = sscanf(tempgameconf + i, " = %u", &temp); - if (ret == 1) - if (temp >= 0 && temp <= 1) - dumpmaindol = temp; - } - */ - } - /*else - { - - if (strncasecmp("autoboot", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 8) - { - ret = sscanf(tempgameconf + i, " = %u", &temp); - if (ret == 1) - if (temp >= 0 && temp <= 1) - autoboot = temp; - } - if (strncasecmp("autobootwait", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 12) - { - ret = sscanf(tempgameconf + i, " = %u", &temp); - if (ret == 1) - if (temp >= 0 && temp <= 255) - autobootwait = temp; - } - if (strncasecmp("autoboothbc", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 11) - { - ret = sscanf(tempgameconf + i, " = %u", &temp); - if (ret == 1) - if (temp >= 0 && temp <= 1) - autoboothbc = temp; - } - if (strncasecmp("autobootocarina", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 15) - { - ret = sscanf(tempgameconf + i, " = %u", &temp); - if (ret == 1) - if (temp >= 0 && temp <= 1) - config_bytes[4] = temp; - } - if (strncasecmp("autobootdebugger", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 16) - { - ret = sscanf(tempgameconf + i, " = %u", &temp); - if (ret == 1) - if (temp >= 0 && temp <= 1) - config_bytes[7] = temp; - } - if (strncasecmp("rebootermenuitem", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 16) - { - ret = sscanf(tempgameconf + i, " = %u", &temp); - if (ret == 1) - if (temp >= 0 && temp <= 1) - rebooterasmenuitem = temp; - } - if (strncasecmp("startupios", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 10) - { - ret = sscanf(tempgameconf + i, " = %u", &temp); - if (ret == 1) - if (temp >= 0 && temp <= 255) - { - sdio_Shutdown(); - IOS_ReloadIOS(temp); - detectIOScapabilities(); - sd_init(); - startupiosloaded = 1; - } - } - - }*/ - if (tempgameconf[i] != ':') - { - while ((i != tempgameconfsize) && (tempgameconf[i] != 10 && tempgameconf[i] != 13)) - i++; - if (i != tempgameconfsize) i++; - } - } - if (i != tempgameconfsize) while ((tempgameconf[i] != 10 && tempgameconf[i] != 13) && (i != 0)) - i--; - } - } - - free(tempgameconf); - //tempcodelist = ((u8 *) gameconf) + gameconfsize; -} - -int ocarina_load_code(u8 *id) -{ - if (debuggerselect == 0x00) - codelist = (u8 *) 0x800022A8; - else codelist = (u8 *) 0x800028B8; - codelistend = (u8 *) 0x80003000; - - app_loadgameconfig((char *) id); - - char filepath[150]; - - gprintf("Ocarina: Searching codes..."); - gprintf("\n"); - - sprintf(filepath, "%s%.6s", CheatFilepath, (char *) id); - filepath[strlen(CheatFilepath) + 6] = 0x2E; - filepath[strlen(CheatFilepath) + 7] = 0x67; - filepath[strlen(CheatFilepath) + 8] = 0x63; - filepath[strlen(CheatFilepath) + 9] = 0x74; - filepath[strlen(CheatFilepath) + 10] = 0; - - FILE * fp = fopen(filepath, "rb"); - if (!fp) - { - gprintf("Ocarina: No codes found"); - printf("\n"); - return 0; - } - - fseek(fp, 0, SEEK_END); - u32 filesize = ftell(fp); - rewind(fp); - - code_buf = (u8*) malloc(filesize); - if (!code_buf) - { - gprintf("Ocarina: No codes found\n"); - fclose(fp); - return 0; - } - - code_size = fread(code_buf, 1, filesize, fp); - - fclose(fp); - - if (code_size <= 0) - { - gprintf("Ocarina: could not read file.\n"); - free(code_buf); - code_buf = NULL; - code_size = 0; - return 0; - } - - if (code_size > (s32) codelistend - (s32) codelist) - { - gprintf("Ocarina: Too many codes found\n"); - free(code_buf); - code_buf = NULL; - code_size = 0; - return 0; - } - - gprintf("Ocarina: Codes found.\n"); - - return code_size; -} - -//--------------------------------------------------------------------------------- -void app_pokevalues() -//--------------------------------------------------------------------------------- -{ - u32 i, *codeaddr, *codeaddr2, *addrfound = NULL; - - if (gameconfsize != 0) - { - for (i = 0; i < gameconfsize / 4; i++) - { - if (*(gameconf + i) == 0) - { - if (((u32 *) (*(gameconf + i + 1))) == NULL || *((u32 *) (*(gameconf + i + 1))) == *(gameconf + i + 2)) - { - *((u32 *) (*(gameconf + i + 3))) = *(gameconf + i + 4); - DCFlushRange((void *) *(gameconf + i + 3), 4); - } - i += 4; - } - else - { - codeaddr = (u32 *) *(gameconf + i + *(gameconf + i) + 1); - codeaddr2 = (u32 *) *(gameconf + i + *(gameconf + i) + 2); - if (codeaddr == 0 && addrfound != NULL) - codeaddr = addrfound; - else if (codeaddr == 0 && codeaddr2 != 0) - codeaddr = (u32 *) ((((u32) codeaddr2) >> 28) << 28); - else if (codeaddr == 0 && codeaddr2 == 0) - { - i += *(gameconf + i) + 4; - continue; - } - if (codeaddr2 == 0) codeaddr2 = codeaddr + *(gameconf + i); - addrfound = NULL; - while (codeaddr <= (codeaddr2 - *(gameconf + i))) - { - if (memcmp(codeaddr, gameconf + i + 1, (*(gameconf + i)) * 4) == 0) - { - *(codeaddr + ((*(gameconf + i + *(gameconf + i) + 3)) / 4)) = *(gameconf + i + *(gameconf + i) - + 4); - if (addrfound == NULL) addrfound = codeaddr; - } - codeaddr++; - } - i += *(gameconf + i) + 4; - } - } - } -} - -//--------------------------------------------------------------------------------- -void load_handler() -//--------------------------------------------------------------------------------- -{ - if (hooktype != 0x00) - { - if (debuggerselect == 0x01) - { - /*switch(gecko_channel) - { - case 0: // Slot A - - memset((void*)0x80001800,0,codehandlerslota_size); - memcpy((void*)0x80001800,codehandlerslota,codehandlerslota_size); - if (pausedstartoption == 0x01) - *(u32*)0x80002798 = 1; - memcpy((void*)0x80001CDE, &codelist, 2); - memcpy((void*)0x80001CE2, ((u8*) &codelist) + 2, 2); - memcpy((void*)0x80001F7E, &codelist, 2); - memcpy((void*)0x80001F82, ((u8*) &codelist) + 2, 2); - DCFlushRange((void*)0x80001800,codehandlerslota_size); - break; - - case 1: // slot B - */ - memset((void*) 0x80001800, 0, codehandler_size); - memcpy((void*) 0x80001800, codehandler, codehandler_size); - //TODO for oggzee: Consider adding an option for paused start, debugging related - //if (pausedstartoption == 0x01) - // *(u32*)0x80002798 = 1; - memcpy((void*) 0x80001CDE, &codelist, 2); - memcpy((void*) 0x80001CE2, ((u8*) &codelist) + 2, 2); - memcpy((void*) 0x80001F5A, &codelist, 2); - memcpy((void*) 0x80001F5E, ((u8*) &codelist) + 2, 2); - DCFlushRange((void*) 0x80001800, codehandler_size); - /* break; - - case 2: - memset((void*)0x80001800,0,codehandler_size); - memcpy((void*)0x80001800,codehandler,codehandler_size); - if (pausedstartoption == 0x01) - *(u32*)0x80002798 = 1; - memcpy((void*)0x80001CDE, &codelist, 2); - memcpy((void*)0x80001CE2, ((u8*) &codelist) + 2, 2); - memcpy((void*)0x80001F5A, &codelist, 2); - memcpy((void*)0x80001F5E, ((u8*) &codelist) + 2, 2); - DCFlushRange((void*)0x80001800,codehandler_size); - break; - }*/ - } - else - { - memset((void*) 0x80001800, 0, codehandleronly_size); - memcpy((void*) 0x80001800, codehandleronly, codehandleronly_size); - memcpy((void*) 0x80001906, &codelist, 2); - memcpy((void*) 0x8000190A, ((u8*) &codelist) + 2, 2); - DCFlushRange((void*) 0x80001800, codehandleronly_size); - } - // Load multidol handler - memset((void*) 0x80001000, 0, multidol_size); - memcpy((void*) 0x80001000, multidol, multidol_size); - DCFlushRange((void*) 0x80001000, multidol_size); - switch (hooktype) - { - case 0x01: - memcpy((void*) 0x8000119C, viwiihooks, 12); - memcpy((void*) 0x80001198, viwiihooks + 3, 4); - break; - case 0x02: - memcpy((void*) 0x8000119C, kpadhooks, 12); - memcpy((void*) 0x80001198, kpadhooks + 3, 4); - break; - case 0x03: - memcpy((void*) 0x8000119C, joypadhooks, 12); - memcpy((void*) 0x80001198, joypadhooks + 3, 4); - break; - case 0x04: - memcpy((void*) 0x8000119C, gxdrawhooks, 12); - memcpy((void*) 0x80001198, gxdrawhooks + 3, 4); - break; - case 0x05: - memcpy((void*) 0x8000119C, gxflushhooks, 12); - memcpy((void*) 0x80001198, gxflushhooks + 3, 4); - break; - case 0x06: - memcpy((void*) 0x8000119C, ossleepthreadhooks, 12); - memcpy((void*) 0x80001198, ossleepthreadhooks + 3, 4); - break; - case 0x07: - memcpy((void*) 0x8000119C, axnextframehooks, 12); - memcpy((void*) 0x80001198, axnextframehooks + 3, 4); - break; - case 0x08: - //if (customhooksize == 16) - //{ - // memcpy((void*)0x8000119C,customhook,12); - // memcpy((void*)0x80001198,customhook+3,4); - //} - break; - case 0x09: - //memcpy((void*)0x8000119C,wpadbuttonsdownhooks,12); - //memcpy((void*)0x80001198,wpadbuttonsdownhooks+3,4); - break; - case 0x0A: - //memcpy((void*)0x8000119C,wpadbuttonsdown2hooks,12); - //memcpy((void*)0x80001198,wpadbuttonsdown2hooks+3,4); - break; - } - DCFlushRange((void*) 0x80001198, 16); - } - memcpy((void *) 0x80001800, (void*) 0x80000000, 6); -} - -int ocarina_do_code() -{ - if (!code_buf) - { - return 0; - } - - memset((void *) 0x80001800, 0, 0x1800); - - load_handler(); - memset(codelist, 0, (u32) codelistend - (u32) codelist); - - //Copy the codes - if (code_size > 0) - { - memcpy(codelist, code_buf, code_size); - DCFlushRange(codelist, (u32) codelistend - (u32) codelist); - free(code_buf); - code_buf = NULL; - } - - // TODO What's this??? - // enable flag - //*(vu8*)0x80001807 = 0x01; - - //This needs to be done after loading the .dol into memory - app_pokevalues(); - - // hooks are patched in dogamehooks() - return 1; -} - -u32 do_bca_code(u8 *gameid) -{ - if (!BCAFilepath) return 0; - - if (IOS_GetVersion() == 222 || IOS_GetVersion() == 223) - { - FILE *fp; - u32 filesize; - char filepath[150]; - memset(filepath, 0, 150); - u8 bcaCode[64] ATTRIBUTE_ALIGN( 32 ); - - sprintf(filepath, "%s%6s", BCAFilepath, gameid); - filepath[strlen(BCAFilepath) + 6] = '.'; - filepath[strlen(BCAFilepath) + 7] = 'b'; - filepath[strlen(BCAFilepath) + 8] = 'c'; - filepath[strlen(BCAFilepath) + 9] = 'a'; - - fp = fopen(filepath, "rb"); - if (!fp) - { - memset(filepath, 0, 150); - sprintf(filepath, "%s%3s", BCAFilepath, gameid + 1); - filepath[strlen(BCAFilepath) + 3] = '.'; - filepath[strlen(BCAFilepath) + 4] = 'b'; - filepath[strlen(BCAFilepath) + 5] = 'c'; - filepath[strlen(BCAFilepath) + 6] = 'a'; - fp = fopen(filepath, "rb"); - - if (!fp) - { - // Set default bcaCode - memset(bcaCode, 0, 64); - bcaCode[0x33] = 1; - } - } - - if (fp) - { - u32 ret = 0; - - fseek(fp, 0, SEEK_END); - filesize = ftell(fp); - - if (filesize == 64) - { - fseek(fp, 0, SEEK_SET); - ret = fread(bcaCode, 1, 64, fp); - } - fclose(fp); - - if (ret != 64) - { - // Set default bcaCode - memset(bcaCode, 0, 64); - bcaCode[0x33] = 1; - } - } - - Set_DIP_BCA_Datas(bcaCode); - } - return 0; -} diff --git a/source/patches/fst.h b/source/patches/fst.h deleted file mode 100644 index 290e2af5..00000000 --- a/source/patches/fst.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2008 Nuke (wiinuke@gmail.com) - * - * this file is part of GeckoOS for USB Gecko - * http://www.usbgecko.com - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef __FST_H__ -#define __FST_H__ - -#ifdef __cplusplus -extern "C" -{ -#endif - //u32 do_fst(u32 fstlocation); - //u32 do_sd_code(char *filename); - -#define MAX_GCT_SIZE 2056 - - u32 do_bca_code(u8 *gameid); - int ocarina_load_code(u8 *id); - int ocarina_do_code(); - void SetCheatFilepath(const char * path); - void SetBCAFilepath(const char * path); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/patches/fwrite_patch.h b/source/patches/fwrite_patch.h deleted file mode 100644 index 026f2796..00000000 --- a/source/patches/fwrite_patch.h +++ /dev/null @@ -1,9 +0,0 @@ -unsigned char fwrite_patch_bin[] = { 0x7c, 0x84, 0x29, 0xd6, 0x39, 0x40, 0x00, 0x00, 0x94, 0x21, 0xff, 0xf0, 0x93, - 0xe1, 0x00, 0x0c, 0x7f, 0x8a, 0x20, 0x00, 0x40, 0x9c, 0x00, 0x64, 0x3d, 0x00, 0xcd, 0x00, 0x3d, 0x60, 0xcd, - 0x00, 0x3d, 0x20, 0xcd, 0x00, 0x61, 0x08, 0x68, 0x14, 0x61, 0x6b, 0x68, 0x24, 0x61, 0x29, 0x68, 0x20, 0x39, - 0x80, 0x00, 0xd0, 0x38, 0xc0, 0x00, 0x19, 0x38, 0xe0, 0x00, 0x00, 0x91, 0x88, 0x00, 0x00, 0x7c, 0x03, 0x50, - 0xae, 0x54, 0x00, 0xa0, 0x16, 0x64, 0x00, 0xb0, 0x00, 0x90, 0x0b, 0x00, 0x00, 0x90, 0xc9, 0x00, 0x00, 0x80, - 0x09, 0x00, 0x00, 0x70, 0x1f, 0x00, 0x01, 0x40, 0x82, 0xff, 0xf8, 0x80, 0x0b, 0x00, 0x00, 0x90, 0xe8, 0x00, - 0x00, 0x54, 0x00, 0x37, 0xfe, 0x7d, 0x4a, 0x02, 0x14, 0x7f, 0x8a, 0x20, 0x00, 0x41, 0x9c, 0xff, 0xc8, 0x7c, - 0xa3, 0x2b, 0x78, 0x83, 0xe1, 0x00, 0x0c, 0x38, 0x21, 0x00, 0x10, 0x4e, 0x80, 0x00, 0x20 }; -unsigned int fwrite_patch_bin_len = 136; diff --git a/source/patches/gamepatches.c b/source/patches/gamepatches.c deleted file mode 100644 index 48956a26..00000000 --- a/source/patches/gamepatches.c +++ /dev/null @@ -1,444 +0,0 @@ -#include -#include -#include -#include "dolpatcher.h" -#include "wip.h" -#include "gecko.h" -#include "../settings/SettingsEnums.h" - -/** Anti 002 fix for IOS 249 rev > 12 thanks to WiiPower **/ -bool Anti_002_fix(u8 * Address, int Size) -{ - u8 SearchPattern[12] = { 0x2C, 0x00, 0x00, 0x00, 0x48, 0x00, 0x02, 0x14, 0x3C, 0x60, 0x80, 0x00 }; - u8 PatchData[12] = { 0x2C, 0x00, 0x00, 0x00, 0x40, 0x82, 0x02, 0x14, 0x3C, 0x60, 0x80, 0x00 }; - return PatchDOL(Address, Size, (const u8 *) SearchPattern, sizeof(SearchPattern), (const u8 *) PatchData, sizeof(PatchData)); -} - -bool NSMBPatch() -{ - WIP_Code * CodeList = NULL; - - if (memcmp("SMNE01", (char *) 0x80000000, 6) == 0) - { - CodeList = malloc(3 * sizeof(WIP_Code)); - if(!CodeList) - return false; - - CodeList[0].offset = 0x001AB610; - CodeList[0].srcaddress = 0x9421FFD0; - CodeList[0].dstaddress = 0x4E800020; - CodeList[1].offset = 0x001CED53; - CodeList[1].srcaddress = 0xDA000000; - CodeList[1].dstaddress = 0x71000000; - CodeList[2].offset = 0x001CED6B; - CodeList[2].srcaddress = 0xDA000000; - CodeList[2].dstaddress = 0x71000000; - - } - else if (memcmp("SMNP01", (char *) 0x80000000, 6) == 0) - { - CodeList = malloc(3 * sizeof(WIP_Code)); - if(!CodeList) - return false; - - CodeList[0].offset = 0x001AB750; - CodeList[0].srcaddress = 0x9421FFD0; - CodeList[0].dstaddress = 0x4E800020; - CodeList[1].offset = 0x001CEE90; - CodeList[1].srcaddress = 0x38A000DA; - CodeList[1].dstaddress = 0x38A00071; - CodeList[2].offset = 0x001CEEA8; - CodeList[2].srcaddress = 0x388000DA; - CodeList[2].dstaddress = 0x38800071; - } - else if (memcmp("SMNJ01", (char *) 0x80000000, 6) == 0) - { - CodeList = malloc(3 * sizeof(WIP_Code)); - if(!CodeList) - return false; - - CodeList[0].offset = 0x001AB420; - CodeList[0].srcaddress = 0x9421FFD0; - CodeList[0].dstaddress = 0x4E800020; - CodeList[1].offset = 0x001CEB63; - CodeList[1].srcaddress = 0xDA000000; - CodeList[1].dstaddress = 0x71000000; - CodeList[2].offset = 0x001CEB7B; - CodeList[2].srcaddress = 0xDA000000; - CodeList[2].dstaddress = 0x71000000; - } - - if (CodeList && set_wip_list(CodeList, 3) == false) - { - free(CodeList); - CodeList = NULL; - return false; - } - - - return CodeList != NULL; -} - -bool PoPPatch() -{ - if (memcmp("SPX", (char *) 0x80000000, 3) != 0 && memcmp("RPW", (char *) 0x80000000, 3) != 0) - return false; - - WIP_Code * CodeList = malloc(5 * sizeof(WIP_Code)); - CodeList[0].offset = 0x007AAC6A; - CodeList[0].srcaddress = 0x7A6B6F6A; - CodeList[0].dstaddress = 0x6F6A7A6B; - CodeList[1].offset = 0x007AAC75; - CodeList[1].srcaddress = 0x7C7A6939; - CodeList[1].dstaddress = 0x69397C7A; - CodeList[2].offset = 0x007AAC82; - CodeList[2].srcaddress = 0x7376686B; - CodeList[2].dstaddress = 0x686B7376; - CodeList[3].offset = 0x007AAC92; - CodeList[3].srcaddress = 0x80717570; - CodeList[3].dstaddress = 0x75708071; - CodeList[4].offset = 0x007AAC9D; - CodeList[4].srcaddress = 0x82806F3F; - CodeList[4].dstaddress = 0x6F3F8280; - - if (set_wip_list(CodeList, 5) == false) - { - free(CodeList); - CodeList = NULL; - return false; - } - - return true; -} - -/** Insert the individual gamepatches above with the patterns and patch data **/ -/** Following is only the VideoPatcher **/ - -#if 0 /** Isn't used right now **/ - -static GXRModeObj* vmodes[] = -{ - &TVNtsc240Ds, - &TVNtsc240DsAa, - &TVNtsc240Int, - &TVNtsc240IntAa, - &TVNtsc480IntDf, - &TVNtsc480IntAa, - &TVNtsc480Prog, - &TVMpal480IntDf, - &TVPal264Ds, - &TVPal264DsAa, - &TVPal264Int, - &TVPal264IntAa, - &TVPal524IntAa, - &TVPal528Int, - &TVPal528IntDf, - &TVPal574IntDfScale, - &TVEurgb60Hz240Ds, - &TVEurgb60Hz240DsAa, - &TVEurgb60Hz240Int, - &TVEurgb60Hz240IntAa, - &TVEurgb60Hz480Int, - &TVEurgb60Hz480IntDf, - &TVEurgb60Hz480IntAa, - &TVEurgb60Hz480Prog, - &TVEurgb60Hz480ProgSoft, - &TVEurgb60Hz480ProgAa -}; - -#endif - -static GXRModeObj* PAL2NTSC[] = { &TVMpal480IntDf, &TVNtsc480IntDf, &TVPal264Ds, &TVNtsc240Ds, &TVPal264DsAa, - &TVNtsc240DsAa, &TVPal264Int, &TVNtsc240Int, &TVPal264IntAa, &TVNtsc240IntAa, &TVPal524IntAa, &TVNtsc480IntAa, - &TVPal528Int, &TVNtsc480IntAa, &TVPal528IntDf, &TVNtsc480IntDf, &TVPal574IntDfScale, &TVNtsc480IntDf, - &TVEurgb60Hz240Ds, &TVNtsc240Ds, &TVEurgb60Hz240DsAa, &TVNtsc240DsAa, &TVEurgb60Hz240Int, &TVNtsc240Int, - &TVEurgb60Hz240IntAa, &TVNtsc240IntAa, &TVEurgb60Hz480Int, &TVNtsc480IntAa, &TVEurgb60Hz480IntDf, - &TVNtsc480IntDf, &TVEurgb60Hz480IntAa, &TVNtsc480IntAa, &TVEurgb60Hz480Prog, &TVNtsc480Prog, - &TVEurgb60Hz480ProgSoft, &TVNtsc480Prog, &TVEurgb60Hz480ProgAa, &TVNtsc480Prog, 0, 0 }; - -static GXRModeObj* NTSC2PAL[] = { &TVNtsc240Ds, &TVPal264Ds, &TVNtsc240DsAa, &TVPal264DsAa, &TVNtsc240Int, - &TVPal264Int, &TVNtsc240IntAa, &TVPal264IntAa, &TVNtsc480IntDf, &TVPal528IntDf, &TVNtsc480IntAa, - &TVPal524IntAa, &TVNtsc480Prog, &TVPal528IntDf, 0, 0 }; - -static GXRModeObj* NTSC2PAL60[] = { &TVNtsc240Ds, &TVEurgb60Hz240Ds, &TVNtsc240DsAa, &TVEurgb60Hz240DsAa, - &TVNtsc240Int, &TVEurgb60Hz240Int, &TVNtsc240IntAa, &TVEurgb60Hz240IntAa, &TVNtsc480IntDf, - &TVEurgb60Hz480IntDf, &TVNtsc480IntAa, &TVEurgb60Hz480IntAa, &TVNtsc480Prog, &TVEurgb60Hz480Prog, 0, 0 }; - -static bool compare_videomodes(GXRModeObj* mode1, GXRModeObj* mode2) -{ - if (mode1->viTVMode != mode2->viTVMode || mode1->fbWidth != mode2->fbWidth || mode1->efbHeight != mode2->efbHeight - || mode1->xfbHeight != mode2->xfbHeight || mode1->viXOrigin != mode2->viXOrigin || mode1->viYOrigin - != mode2->viYOrigin || mode1->viWidth != mode2->viWidth || mode1->viHeight != mode2->viHeight - || mode1->xfbMode != mode2->xfbMode || mode1->field_rendering != mode2->field_rendering || mode1->aa - != mode2->aa || mode1->sample_pattern[0][0] != mode2->sample_pattern[0][0] || mode1->sample_pattern[1][0] - != mode2->sample_pattern[1][0] || mode1->sample_pattern[2][0] != mode2->sample_pattern[2][0] - || mode1->sample_pattern[3][0] != mode2->sample_pattern[3][0] || mode1->sample_pattern[4][0] - != mode2->sample_pattern[4][0] || mode1->sample_pattern[5][0] != mode2->sample_pattern[5][0] - || mode1->sample_pattern[6][0] != mode2->sample_pattern[6][0] || mode1->sample_pattern[7][0] - != mode2->sample_pattern[7][0] || mode1->sample_pattern[8][0] != mode2->sample_pattern[8][0] - || mode1->sample_pattern[9][0] != mode2->sample_pattern[9][0] || mode1->sample_pattern[10][0] - != mode2->sample_pattern[10][0] || mode1->sample_pattern[11][0] != mode2->sample_pattern[11][0] - || mode1->sample_pattern[0][1] != mode2->sample_pattern[0][1] || mode1->sample_pattern[1][1] - != mode2->sample_pattern[1][1] || mode1->sample_pattern[2][1] != mode2->sample_pattern[2][1] - || mode1->sample_pattern[3][1] != mode2->sample_pattern[3][1] || mode1->sample_pattern[4][1] - != mode2->sample_pattern[4][1] || mode1->sample_pattern[5][1] != mode2->sample_pattern[5][1] - || mode1->sample_pattern[6][1] != mode2->sample_pattern[6][1] || mode1->sample_pattern[7][1] - != mode2->sample_pattern[7][1] || mode1->sample_pattern[8][1] != mode2->sample_pattern[8][1] - || mode1->sample_pattern[9][1] != mode2->sample_pattern[9][1] || mode1->sample_pattern[10][1] - != mode2->sample_pattern[10][1] || mode1->sample_pattern[11][1] != mode2->sample_pattern[11][1] - || mode1->vfilter[0] != mode2->vfilter[0] || mode1->vfilter[1] != mode2->vfilter[1] || mode1->vfilter[2] - != mode2->vfilter[2] || mode1->vfilter[3] != mode2->vfilter[3] || mode1->vfilter[4] != mode2->vfilter[4] - || mode1->vfilter[5] != mode2->vfilter[5] || mode1->vfilter[6] != mode2->vfilter[6]) - { - return false; - } - else - { - return true; - } -} - -static void patch_videomode(GXRModeObj* mode1, GXRModeObj* mode2) -{ - mode1->viTVMode = mode2->viTVMode; - mode1->fbWidth = mode2->fbWidth; - mode1->efbHeight = mode2->efbHeight; - mode1->xfbHeight = mode2->xfbHeight; - mode1->viXOrigin = mode2->viXOrigin; - mode1->viYOrigin = mode2->viYOrigin; - mode1->viWidth = mode2->viWidth; - mode1->viHeight = mode2->viHeight; - mode1->xfbMode = mode2->xfbMode; - mode1->field_rendering = mode2->field_rendering; - mode1->aa = mode2->aa; - mode1->sample_pattern[0][0] = mode2->sample_pattern[0][0]; - mode1->sample_pattern[1][0] = mode2->sample_pattern[1][0]; - mode1->sample_pattern[2][0] = mode2->sample_pattern[2][0]; - mode1->sample_pattern[3][0] = mode2->sample_pattern[3][0]; - mode1->sample_pattern[4][0] = mode2->sample_pattern[4][0]; - mode1->sample_pattern[5][0] = mode2->sample_pattern[5][0]; - mode1->sample_pattern[6][0] = mode2->sample_pattern[6][0]; - mode1->sample_pattern[7][0] = mode2->sample_pattern[7][0]; - mode1->sample_pattern[8][0] = mode2->sample_pattern[8][0]; - mode1->sample_pattern[9][0] = mode2->sample_pattern[9][0]; - mode1->sample_pattern[10][0] = mode2->sample_pattern[10][0]; - mode1->sample_pattern[11][0] = mode2->sample_pattern[11][0]; - mode1->sample_pattern[0][1] = mode2->sample_pattern[0][1]; - mode1->sample_pattern[1][1] = mode2->sample_pattern[1][1]; - mode1->sample_pattern[2][1] = mode2->sample_pattern[2][1]; - mode1->sample_pattern[3][1] = mode2->sample_pattern[3][1]; - mode1->sample_pattern[4][1] = mode2->sample_pattern[4][1]; - mode1->sample_pattern[5][1] = mode2->sample_pattern[5][1]; - mode1->sample_pattern[6][1] = mode2->sample_pattern[6][1]; - mode1->sample_pattern[7][1] = mode2->sample_pattern[7][1]; - mode1->sample_pattern[8][1] = mode2->sample_pattern[8][1]; - mode1->sample_pattern[9][1] = mode2->sample_pattern[9][1]; - mode1->sample_pattern[10][1] = mode2->sample_pattern[10][1]; - mode1->sample_pattern[11][1] = mode2->sample_pattern[11][1]; - mode1->vfilter[0] = mode2->vfilter[0]; - mode1->vfilter[1] = mode2->vfilter[1]; - mode1->vfilter[2] = mode2->vfilter[2]; - mode1->vfilter[3] = mode2->vfilter[3]; - mode1->vfilter[4] = mode2->vfilter[4]; - mode1->vfilter[5] = mode2->vfilter[5]; - mode1->vfilter[6] = mode2->vfilter[6]; -} - -static bool Search_and_patch_Video_Modes(u8 * Address, u32 Size, GXRModeObj* Table[]) -{ - u8 *Addr = (u8 *) Address; - bool found = 0; - u32 i; - - while (Size >= sizeof(GXRModeObj)) - { - - for (i = 0; Table[i]; i += 2) - { - - if (compare_videomodes(Table[i], (GXRModeObj*) Addr)) - - { - found = 1; - patch_videomode((GXRModeObj*) Addr, Table[i + 1]); - Addr += (sizeof(GXRModeObj) - 4); - Size -= (sizeof(GXRModeObj) - 4); - break; - } - } - - Addr += 4; - Size -= 4; - } - - return found; -} - -void VideoModePatcher(u8 * dst, int len, u8 videoSelected) -{ - GXRModeObj** table = NULL; - if (videoSelected == VIDEO_MODE_PATCH) // patch enum'd in cfg.h - - { - switch (CONF_GetVideo()) - { - case CONF_VIDEO_PAL: - if (CONF_GetEuRGB60() > 0) - { - table = NTSC2PAL60; - } - else - { - table = NTSC2PAL; - } - break; - - case CONF_VIDEO_MPAL: - - table = NTSC2PAL; - break; - - default: - table = PAL2NTSC; - break; - } - Search_and_patch_Video_Modes(dst, len, table); - } -} - -//giantpune's magic super patch to return to channels - -static u32 ad[ 4 ] = { 0, 0, 0, 0 };//these variables are global on the off chance the different parts needed -static u8 found = 0; //to find in the dol are found in different sections of the dol -static u8 patched = 0; -bool PatchReturnTo( void *Address, int Size, u32 id ) -{ - if( !id || patched ) - return 0; - //gprintf("PatchReturnTo( %p, %08x, %08x )\n", Address, Size, id ); - - //new __OSLoadMenu() (SM2.0 and higher) - u8 SearchPattern[ 12 ] = { 0x38, 0x80, 0x00, 0x02, 0x38, 0x60, 0x00, 0x01, 0x38, 0xa0, 0x00, 0x00 }; //li r4,2 - //li r3,1 - //li r5,0 - //old _OSLoadMenu() (used in launch games) - u8 SearchPatternB[ 12 ] = { 0x38, 0xC0, 0x00, 0x02, 0x38, 0xA0, 0x00, 0x01, 0x38, 0xE0, 0x00, 0x00 }; //li r6,2 - //li r5,1 - //li r7,0 - //identifier for the safe place - u8 SearchPattern2[ 12 ] = { 0x4D, 0x65, 0x74, 0x72, 0x6F, 0x77, 0x65, 0x72, 0x6B, 0x73, 0x20, 0x54 }; //"Metrowerks T" - - u8 oldSDK = 0; - found = 0; - - void *Addr = Address; - void *Addr_end = Address+Size; - - while (Addr <= Addr_end - 12 ) { - //find a safe place or the patch to hang out - if ( ! ad[ 3 ] && memcmp( Addr, SearchPattern2, 12 ) == 0 ) { - ad[ 3 ] = (u32)Addr + 0x30; - } - //find __OSLaunchMenu() and remember some addresses in it - else if ( memcmp( Addr, SearchPattern, 12 )==0 ) { - ad[ found++ ] = (u32)Addr; - } - else if ( ad[ 0 ] && memcmp( Addr, SearchPattern, 8 )==0 ) //after the first match is found, only search the first 8 bytes for the other 2 - { - if( !ad[ 1 ] ) ad[ found++ ] = (u32)Addr; - else if( !ad[ 2 ] ) ad[ found++ ] = (u32)Addr; - if( found >= 3 )break; - } - Addr += 4; - } - //check for the older-ass version of the SDK - if( found < 3 && ad[ 3 ] ) - { - Addr = Address; - ad[ 0 ] = 0; ad[ 1 ] = 0; - ad[ 2 ] = 0; - found = 0; - oldSDK = 1; - - while (Addr <= Addr_end - 12 ) { - //find __OSLaunchMenu() and remember some addresses in it - if ( memcmp( Addr, SearchPatternB, 12 )==0 ) { - ad[ found++ ] = (u32)Addr; - } - else if ( ad[ 0 ] && memcmp( Addr, SearchPatternB, 8 ) == 0 ) //after the first match is found, only search the first 8 bytes for the other 2 - { - if( !ad[ 1 ] ) ad[ found++ ] = (u32)Addr; - else if( !ad[ 2 ] ) ad[ found++ ] = (u32)Addr; - if( found >= 3 )break; - } - Addr += 4; - } - } - - //if the function is found - if( found == 3 && ad[ 3 ] ) - { - //gprintf("patch __OSLaunchMenu( 0x00010001, 0x%08x )\n", id); - u32 nop = 0x60000000; - - //the magic that writes the TID to the registers - u8 jump[ 20 ] = { 0x3C, 0x60, 0x00, 0x01, //lis r3,1 - 0x60, 0x63, 0x00, 0x01, //ori r3,r3,1 - 0x3C, 0x80, (u8)( id >> 24 ), (u8)( id >> 16 ), //lis r4,(u16)(tid >> 16) - 0x60, 0x84, (u8)( id >> 8 ), (u8)id, //ori r4,r4,(u16)(tid) - 0x4E, 0x80, 0x00, 0x20 }; //blr - - if( oldSDK ) - { - jump[ 1 ] = 0xA0; //3CA00001 //lis r5,1 - jump[ 5 ] = 0xA5; //60A50001 //ori r5,r5,1 - jump[ 9 ] = 0xC0; //3CC0AF1B //lis r6,(u16)(tid >> 16) - jump[ 13 ] = 0xC6;//60C6F516 //ori r6,r6,(u16)(tid) - } - - void* addr = (u32*)ad[ 3 ]; - - //write new stuff to in a unused part of the main.dol - memcpy( addr, jump, sizeof( jump ) ); - - //ES_GetTicketViews() - u32 newval = ( ad[ 3 ] - ad[ 0 ] ); - newval &= 0x03FFFFFC; - newval |= 0x48000001; - addr = (u32*)ad[ 0 ]; - memcpy( addr, &newval, sizeof( u32 ) ); //bl ad[ 3 ] - memcpy( addr + 4, &nop, sizeof( u32 ) ); //nop - //gprintf("\t%08x -> %08x\n", addr, newval ); - - //ES_GetTicketViews() again - newval = ( ad[ 3 ] - ad[ 1 ] ); - newval &= 0x03FFFFFC; - newval |= 0x48000001; - addr = (u32*)ad[ 1 ]; - memcpy( addr, &newval, sizeof( u32 ) ); //bl ad[ 3 ] - memcpy( addr + 4, &nop, sizeof( u32 ) ); //nop - //gprintf("\t%08x -> %08x\n", addr, newval ); - - //ES_LaunchTitle() - newval = ( ad[ 3 ] - ad[ 2 ] ); - newval &= 0x03FFFFFC; - newval |= 0x48000001; - addr = (u32*)ad[ 2 ]; - memcpy( addr, &newval, sizeof( u32 ) ); //bl ad[ 3 ] - memcpy( addr + 4, &nop, sizeof( u32 ) ); //nop - //gprintf("\t%08x -> %08x\n", addr, newval ); - - patched = 1; - } - /*else - { - gprintf("not patched\n"); - gprintf("found %d addresses\n", found); - int i; - for( i = 0; i< 4; i++) - gprintf("ad[ %d ]: %08x\n", i, ad[ i ] ); - gprintf("offset : %08x\n", ad[ 2 ] - ad[ 3 ] ); - - }*/ - return patched; -} diff --git a/source/patches/gamepatches.h b/source/patches/gamepatches.h deleted file mode 100644 index 4fd78b9a..00000000 --- a/source/patches/gamepatches.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef GAMEPATCHES_H_ -#define GAMEPATCHES_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -bool Anti_002_fix(u8 * Address, int Size); -bool NSMBPatch(); -bool PoPPatch(); -bool Search_and_patch_Video_Modes(u8 * Address, u32 Size, GXRModeObj* Table[]); -void VideoModePatcher(u8 * dst, int len, u8 videoSelected); -bool PatchReturnTo(void *Address, int Size, u32 id); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/patches/geckomenu.h b/source/patches/geckomenu.h deleted file mode 100644 index d86fd2c9..00000000 --- a/source/patches/geckomenu.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2008 Nuke (wiinuke@gmail.com) - * - * this file is part of GeckoOS for USB Gecko - * http://www.usbgecko.com - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef __GECKOMENU_H__ -#define __GECKOMENU_H__ - -#define ROOTMENU 0 -#define ABOUTMENU 1 -#define CONFIGMENU 2 -#define REBOOTMENU 3 -#define root_itemcount 7 -#define about_itemcount 4 -#define config_itemcount 9 -#define rebooter_itemcount 6 - -u32 currentmenu; // 0 ROOT -u32 rootmenu_item; -u32 menufreeze; -u32 langselect; -u32 langsaved; -u32 pal60select; -u32 pal50select; -u32 viselect; -u32 ntscselect; -u32 hookselect; -u32 ocarinaselect; -u32 recoveryselect; -u32 regionfreeselect; -u32 nocopyselect; -u32 buttonskipselect; - -u32 doprogress(u32 progstate, u32 noelements); -void drawmenu(u32 menuid); -void drawselected(u32 menuidpos); -void processwpad(); -void clearscreen(u32 *framebuffer, u16 xscreen, u16 yscreen, u16 width, u16 height, u32 color); -void drawicon(u32 *framebuffer, u16 xscreen, u16 yscreen, u16 width, u16 height, u32 gicon); -u32 CvtRGB(u8 r1, u8 g1, u8 b1, u8 r2, u8 g2, u8 b2); - -#endif // __GECKOLOAD_H__ diff --git a/source/patches/kenobiwii.h b/source/patches/kenobiwii.h deleted file mode 100644 index 7d6c4f94..00000000 --- a/source/patches/kenobiwii.h +++ /dev/null @@ -1,235 +0,0 @@ -/* - This file was autogenerated by raw2c. - Visit http://www.devkitpro.org - */ - -const unsigned char kenobiwii[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x26, 0xa0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x94, 0x21, 0xff, 0x58, 0x90, 0x01, 0x00, 0x08, - 0x7c, 0x08, 0x02, 0xa6, 0x90, 0x01, 0x00, 0xac, 0x7c, 0x00, 0x00, 0x26, 0x90, 0x01, 0x00, 0x0c, 0x7c, 0x09, - 0x02, 0xa6, 0x90, 0x01, 0x00, 0x10, 0x7c, 0x01, 0x02, 0xa6, 0x90, 0x01, 0x00, 0x14, 0xbc, 0x61, 0x00, 0x18, - 0x7f, 0x20, 0x00, 0xa6, 0x63, 0x3a, 0x20, 0x00, 0x73, 0x5a, 0xf9, 0xff, 0x7f, 0x40, 0x01, 0x24, 0xd8, 0x41, - 0x00, 0x98, 0xd8, 0x61, 0x00, 0xa0, 0x3f, 0xe0, 0x80, 0x00, 0x3e, 0x80, 0xcc, 0x00, 0xa3, 0x94, 0x40, 0x10, - 0x63, 0x95, 0x00, 0xff, 0xb2, 0xb4, 0x40, 0x10, 0x48, 0x00, 0x06, 0xb1, 0x3a, 0xa0, 0x00, 0x00, 0x3a, 0xc0, - 0x00, 0x19, 0x3a, 0xe0, 0x00, 0xd0, 0x3f, 0x00, 0xcd, 0x00, 0x63, 0xf2, 0x26, 0xa0, 0x80, 0x01, 0x00, 0xac, - 0x90, 0x12, 0x00, 0x04, 0x92, 0xb8, 0x64, 0x3c, 0x48, 0x00, 0x04, 0x85, 0x41, 0x82, 0x05, 0xfc, 0x2c, 0x1d, - 0x00, 0x04, 0x40, 0x80, 0x00, 0x10, 0x2c, 0x1d, 0x00, 0x01, 0x41, 0x80, 0x05, 0xec, 0x48, 0x00, 0x03, 0xa8, - 0x41, 0x82, 0x05, 0x48, 0x2c, 0x1d, 0x00, 0x06, 0x41, 0x82, 0x00, 0x8c, 0x2c, 0x1d, 0x00, 0x07, 0x41, 0x82, - 0x03, 0x8c, 0x2c, 0x1d, 0x00, 0x08, 0x41, 0x82, 0x05, 0xd8, 0x2c, 0x1d, 0x00, 0x09, 0x41, 0x82, 0x00, 0xa0, - 0x2c, 0x1d, 0x00, 0x10, 0x41, 0x82, 0x00, 0x98, 0x2c, 0x1d, 0x00, 0x2f, 0x41, 0x82, 0x00, 0x70, 0x2c, 0x1d, - 0x00, 0x30, 0x41, 0x82, 0x00, 0x78, 0x2c, 0x1d, 0x00, 0x38, 0x41, 0x82, 0x05, 0x80, 0x2c, 0x1d, 0x00, 0x40, - 0x41, 0x82, 0x03, 0x9c, 0x2c, 0x1d, 0x00, 0x41, 0x41, 0x82, 0x03, 0xb0, 0x2c, 0x1d, 0x00, 0x44, 0x41, 0x82, - 0x00, 0x68, 0x2c, 0x1d, 0x00, 0x50, 0x41, 0x82, 0x00, 0x20, 0x2c, 0x1d, 0x00, 0x60, 0x41, 0x82, 0x00, 0x24, - 0x2c, 0x1d, 0x00, 0x89, 0x41, 0x82, 0x00, 0x50, 0x2c, 0x1d, 0x00, 0x99, 0x41, 0x82, 0x05, 0x64, 0x48, 0x00, - 0x05, 0x68, 0x80, 0x72, 0x00, 0x00, 0x48, 0x00, 0x04, 0x81, 0x48, 0x00, 0x05, 0x5c, 0x48, 0x00, 0x05, 0xe5, - 0x48, 0x00, 0x05, 0x54, 0x38, 0x80, 0x00, 0x01, 0x90, 0x92, 0x00, 0x00, 0x48, 0x00, 0x05, 0x48, 0x48, 0x00, - 0x04, 0x61, 0x3a, 0x00, 0x00, 0xa0, 0x63, 0xec, 0x26, 0xc4, 0x48, 0x00, 0x03, 0x6c, 0x38, 0x60, 0x01, 0x20, - 0x63, 0xec, 0x26, 0xc4, 0x48, 0x00, 0x04, 0x21, 0x48, 0x00, 0x05, 0x28, 0x2f, 0x1d, 0x00, 0x10, 0x2e, 0x9d, - 0x00, 0x44, 0x63, 0xe4, 0x1a, 0xb4, 0x3c, 0x60, 0x80, 0x00, 0x60, 0x63, 0x03, 0x00, 0x48, 0x00, 0x05, 0x65, - 0x38, 0x63, 0x0a, 0x00, 0x48, 0x00, 0x05, 0x5d, 0x38, 0x63, 0x06, 0x00, 0x48, 0x00, 0x05, 0x55, 0x63, 0xec, - 0x26, 0xb4, 0x92, 0xac, 0x00, 0x00, 0x92, 0xac, 0x00, 0x04, 0x92, 0xac, 0x00, 0x08, 0x63, 0xe4, 0x26, 0xc4, - 0x81, 0x24, 0x00, 0x18, 0x80, 0x72, 0x00, 0x00, 0x2c, 0x03, 0x00, 0x02, 0x40, 0x82, 0x00, 0x0c, 0x41, 0x96, - 0x00, 0x0c, 0x48, 0x00, 0x00, 0x20, 0x38, 0x60, 0x00, 0x00, 0x90, 0x6c, 0x00, 0x0c, 0x40, 0x82, 0x00, 0x14, - 0x40, 0x96, 0x00, 0x10, 0x61, 0x29, 0x04, 0x00, 0x91, 0x24, 0x00, 0x18, 0x48, 0x00, 0x02, 0x70, 0x55, 0x29, - 0x05, 0xa8, 0x91, 0x24, 0x00, 0x18, 0x41, 0x96, 0x04, 0xac, 0x41, 0x9a, 0x00, 0x08, 0x39, 0x8c, 0x00, 0x04, - 0x38, 0x60, 0x00, 0x04, 0x48, 0x00, 0x03, 0x61, 0x40, 0x99, 0x00, 0x10, 0x39, 0x8c, 0x00, 0x04, 0x38, 0x60, - 0x00, 0x04, 0x48, 0x00, 0x03, 0x51, 0x63, 0xe4, 0x26, 0xb4, 0x80, 0x64, 0x00, 0x00, 0x80, 0x84, 0x00, 0x04, - 0x7c, 0x72, 0xfb, 0xa6, 0x7c, 0x95, 0xfb, 0xa6, 0x48, 0x00, 0x04, 0x74, 0x7c, 0x32, 0x43, 0xa6, 0x7c, 0x3a, - 0x02, 0xa6, 0x7c, 0x73, 0x43, 0xa6, 0x7c, 0x7b, 0x02, 0xa6, 0x54, 0x63, 0x05, 0xa8, 0x90, 0x60, 0x26, 0xdc, - 0x54, 0x63, 0x06, 0x20, 0x60, 0x63, 0x20, 0x00, 0x54, 0x63, 0x04, 0x5e, 0x7c, 0x7b, 0x03, 0xa6, 0x3c, 0x60, - 0x80, 0x00, 0x60, 0x63, 0x1a, 0xf4, 0x7c, 0x7a, 0x03, 0xa6, 0x4c, 0x00, 0x01, 0x2c, 0x7c, 0x00, 0x04, 0xac, - 0x4c, 0x00, 0x00, 0x64, 0x3c, 0x60, 0x80, 0x00, 0x60, 0x63, 0x26, 0xc4, 0x90, 0x23, 0x00, 0x14, 0x7c, 0x61, - 0x1b, 0x78, 0x7c, 0x73, 0x42, 0xa6, 0xbc, 0x41, 0x00, 0x24, 0x7c, 0x24, 0x0b, 0x78, 0x7c, 0x32, 0x42, 0xa6, - 0x90, 0x04, 0x00, 0x1c, 0x90, 0x24, 0x00, 0x20, 0x7c, 0x68, 0x02, 0xa6, 0x90, 0x64, 0x00, 0x9c, 0x7c, 0x60, - 0x00, 0x26, 0x90, 0x64, 0x00, 0x00, 0x7c, 0x61, 0x02, 0xa6, 0x90, 0x64, 0x00, 0x04, 0x7c, 0x69, 0x02, 0xa6, - 0x90, 0x64, 0x00, 0x08, 0x7c, 0x72, 0x02, 0xa6, 0x90, 0x64, 0x00, 0x0c, 0x7c, 0x73, 0x02, 0xa6, 0x90, 0x64, - 0x00, 0x10, 0x39, 0x20, 0x00, 0x00, 0x7d, 0x32, 0xfb, 0xa6, 0x7d, 0x35, 0xfb, 0xa6, 0xd0, 0x04, 0x00, 0xa0, - 0xd0, 0x24, 0x00, 0xa4, 0xd0, 0x44, 0x00, 0xa8, 0xd0, 0x64, 0x00, 0xac, 0xd0, 0x84, 0x00, 0xb0, 0xd0, 0xa4, - 0x00, 0xb4, 0xd0, 0xc4, 0x00, 0xb8, 0xd0, 0xe4, 0x00, 0xbc, 0xd1, 0x04, 0x00, 0xc0, 0xd1, 0x24, 0x00, 0xc4, - 0xd1, 0x44, 0x00, 0xc8, 0xd1, 0x64, 0x00, 0xcc, 0xd1, 0x84, 0x00, 0xd0, 0xd1, 0xa4, 0x00, 0xd4, 0xd1, 0xc4, - 0x00, 0xd8, 0xd1, 0xe4, 0x00, 0xdc, 0xd2, 0x04, 0x00, 0xe0, 0xd2, 0x24, 0x00, 0xe4, 0xd2, 0x44, 0x00, 0xe8, - 0xd2, 0x64, 0x00, 0xec, 0xd2, 0x84, 0x00, 0xf0, 0xd2, 0xa4, 0x00, 0xf4, 0xd2, 0xc4, 0x00, 0xf8, 0xd2, 0xe4, - 0x00, 0xfc, 0xd3, 0x04, 0x01, 0x00, 0xd3, 0x24, 0x01, 0x04, 0xd3, 0x44, 0x01, 0x08, 0xd3, 0x64, 0x01, 0x0c, - 0xd3, 0x84, 0x01, 0x10, 0xd3, 0xa4, 0x01, 0x14, 0xd3, 0xc4, 0x01, 0x18, 0xd3, 0xe4, 0x01, 0x1c, 0x3f, 0xe0, - 0x80, 0x00, 0x63, 0xe5, 0x26, 0xb4, 0x82, 0x05, 0x00, 0x00, 0x82, 0x25, 0x00, 0x04, 0x82, 0x65, 0x00, 0x0c, - 0x2c, 0x13, 0x00, 0x00, 0x41, 0x82, 0x00, 0x74, 0x2c, 0x13, 0x00, 0x02, 0x40, 0x82, 0x00, 0x18, 0x81, 0x24, - 0x00, 0x14, 0x39, 0x33, 0x00, 0x03, 0x91, 0x25, 0x00, 0x00, 0x91, 0x25, 0x00, 0x0c, 0x48, 0x00, 0x00, 0x6c, - 0x7c, 0x10, 0x98, 0x00, 0x41, 0x82, 0x00, 0x38, 0x7c, 0x11, 0x98, 0x00, 0x41, 0x82, 0x00, 0x30, 0x7d, 0x30, - 0x8a, 0x14, 0x91, 0x25, 0x00, 0x0c, 0x82, 0x05, 0x00, 0x08, 0x2c, 0x10, 0x00, 0x00, 0x41, 0x82, 0x00, 0x48, - 0x80, 0x64, 0x00, 0x10, 0x7c, 0x10, 0x18, 0x00, 0x40, 0x82, 0x00, 0x10, 0x3a, 0x00, 0x00, 0x00, 0x92, 0x05, - 0x00, 0x08, 0x48, 0x00, 0x00, 0x30, 0x3a, 0x20, 0x00, 0x00, 0x92, 0x25, 0x00, 0x0c, 0x81, 0x24, 0x00, 0x18, - 0x61, 0x29, 0x04, 0x00, 0x91, 0x24, 0x00, 0x18, 0x48, 0x00, 0x00, 0x30, 0x7e, 0x12, 0xfb, 0xa6, 0x7e, 0x35, - 0xfb, 0xa6, 0x39, 0x20, 0x00, 0x01, 0x91, 0x25, 0x00, 0x0c, 0x48, 0x00, 0x00, 0x1c, 0x38, 0xa0, 0x00, 0x02, - 0x63, 0xe4, 0x26, 0xa0, 0x90, 0xa4, 0x00, 0x00, 0x38, 0x60, 0x00, 0x11, 0x48, 0x00, 0x01, 0xbd, 0x4b, 0xff, - 0xfc, 0x1d, 0x7c, 0x20, 0x00, 0xa6, 0x54, 0x21, 0x07, 0xfa, 0x54, 0x21, 0x04, 0x5e, 0x7c, 0x20, 0x01, 0x24, - 0x63, 0xe1, 0x26, 0xc4, 0x80, 0x61, 0x00, 0x00, 0x7c, 0x6f, 0xf1, 0x20, 0x80, 0x61, 0x00, 0x14, 0x7c, 0x7a, - 0x03, 0xa6, 0x80, 0x61, 0x00, 0x18, 0x7c, 0x7b, 0x03, 0xa6, 0x80, 0x61, 0x00, 0x9c, 0x7c, 0x68, 0x03, 0xa6, - 0xb8, 0x41, 0x00, 0x24, 0x80, 0x01, 0x00, 0x1c, 0x80, 0x21, 0x00, 0x20, 0x4c, 0x00, 0x01, 0x2c, 0x7c, 0x00, - 0x04, 0xac, 0x4c, 0x00, 0x00, 0x64, 0x92, 0xb2, 0x00, 0x00, 0x48, 0x00, 0x02, 0x50, 0x2e, 0x9d, 0x00, 0x02, - 0x38, 0x60, 0x00, 0x08, 0x63, 0xec, 0x26, 0xa8, 0x48, 0x00, 0x00, 0xf9, 0x80, 0xac, 0x00, 0x00, 0x80, 0x6c, - 0x00, 0x04, 0x98, 0x65, 0x00, 0x00, 0x41, 0x94, 0x00, 0x10, 0xb0, 0x65, 0x00, 0x00, 0x41, 0x96, 0x00, 0x08, - 0x90, 0x65, 0x00, 0x00, 0x7c, 0x00, 0x28, 0xac, 0x7c, 0x00, 0x04, 0xac, 0x7c, 0x00, 0x2f, 0xac, 0x4c, 0x00, - 0x01, 0x2c, 0x48, 0x00, 0x02, 0x04, 0x48, 0x00, 0x01, 0x1d, 0x38, 0x60, 0x00, 0x04, 0x63, 0xec, 0x26, 0xa8, - 0x48, 0x00, 0x00, 0xb9, 0x82, 0x0c, 0x00, 0x00, 0x63, 0xec, 0x27, 0xe8, 0x48, 0x00, 0x00, 0x1c, 0x48, 0x00, - 0x01, 0x01, 0x38, 0x60, 0x00, 0x08, 0x63, 0xec, 0x26, 0xa8, 0x48, 0x00, 0x00, 0x9d, 0x82, 0x0c, 0x00, 0x04, - 0x81, 0x8c, 0x00, 0x00, 0x63, 0xfb, 0x26, 0xb0, 0x3a, 0x20, 0x0f, 0x80, 0x48, 0x00, 0x02, 0x3d, 0x41, 0x82, - 0x00, 0x20, 0x7e, 0x23, 0x8b, 0x78, 0x48, 0x00, 0x00, 0x7d, 0x48, 0x00, 0x00, 0xd1, 0x41, 0x82, 0xff, 0xfc, - 0x7d, 0x8c, 0x72, 0x14, 0x35, 0x6b, 0xff, 0xff, 0x41, 0x81, 0xff, 0xe8, 0x80, 0x7b, 0x00, 0x00, 0x2c, 0x03, - 0x00, 0x00, 0x41, 0x82, 0x00, 0x08, 0x48, 0x00, 0x00, 0x59, 0x7c, 0x00, 0x60, 0xac, 0x7c, 0x00, 0x04, 0xac, - 0x7c, 0x00, 0x67, 0xac, 0x4c, 0x00, 0x01, 0x2c, 0x48, 0x00, 0x01, 0x80, 0x7f, 0xc8, 0x02, 0xa6, 0x3c, 0x60, - 0xa0, 0x00, 0x48, 0x00, 0x00, 0x15, 0x76, 0x03, 0x08, 0x00, 0x56, 0x1d, 0x86, 0x3e, 0x7f, 0xc8, 0x03, 0xa6, - 0x4e, 0x80, 0x00, 0x20, 0x92, 0xf8, 0x68, 0x14, 0x90, 0x78, 0x68, 0x24, 0x92, 0xd8, 0x68, 0x20, 0x80, 0xb8, - 0x68, 0x20, 0x70, 0xa5, 0x00, 0x01, 0x40, 0x82, 0xff, 0xf8, 0x82, 0x18, 0x68, 0x24, 0x90, 0xb8, 0x68, 0x14, - 0x4e, 0x80, 0x00, 0x20, 0x7d, 0x48, 0x02, 0xa6, 0x7c, 0x69, 0x03, 0xa6, 0x39, 0xc0, 0x00, 0x00, 0x48, 0x00, - 0x00, 0x79, 0x48, 0x00, 0x00, 0x75, 0x4b, 0xff, 0xff, 0xad, 0x41, 0x82, 0xff, 0xf4, 0x7f, 0xae, 0x61, 0xae, - 0x39, 0xce, 0x00, 0x01, 0x42, 0x00, 0xff, 0xe8, 0x7d, 0x48, 0x03, 0xa6, 0x4e, 0x80, 0x00, 0x20, 0x7d, 0x48, - 0x02, 0xa6, 0x7c, 0x69, 0x03, 0xa6, 0x39, 0xc0, 0x00, 0x00, 0x7c, 0x6c, 0x70, 0xae, 0x48, 0x00, 0x00, 0x1d, - 0x41, 0x82, 0xff, 0xf8, 0x39, 0xce, 0x00, 0x01, 0x42, 0x00, 0xff, 0xf0, 0x7d, 0x48, 0x03, 0xa6, 0x4e, 0x80, - 0x00, 0x20, 0x38, 0x60, 0x00, 0xaa, 0x7f, 0xc8, 0x02, 0xa6, 0x54, 0x63, 0xa0, 0x16, 0x64, 0x63, 0xb0, 0x00, - 0x3a, 0xc0, 0x00, 0x19, 0x3a, 0xe0, 0x00, 0xd0, 0x3f, 0x00, 0xcd, 0x00, 0x4b, 0xff, 0xff, 0x69, 0x56, 0x03, - 0x37, 0xff, 0x7f, 0xc8, 0x03, 0xa6, 0x4e, 0x80, 0x00, 0x20, 0x7f, 0xc8, 0x02, 0xa6, 0x3c, 0x60, 0xd0, 0x00, - 0x4b, 0xff, 0xff, 0x51, 0x56, 0x03, 0x37, 0xff, 0x41, 0x82, 0xff, 0xf4, 0x7f, 0xc8, 0x03, 0xa6, 0x4e, 0x80, - 0x00, 0x20, 0x4b, 0xff, 0xff, 0xb9, 0x38, 0x60, 0x00, 0x08, 0x63, 0xec, 0x26, 0xa8, 0x4b, 0xff, 0xff, 0x55, - 0x80, 0xac, 0x00, 0x04, 0x81, 0x8c, 0x00, 0x00, 0x63, 0xfb, 0x26, 0xb0, 0x62, 0xb1, 0xf8, 0x00, 0x7e, 0x0c, - 0x28, 0x50, 0x48, 0x00, 0x00, 0xf1, 0x41, 0x81, 0x00, 0x10, 0x82, 0x3b, 0x00, 0x00, 0x2c, 0x11, 0x00, 0x00, - 0x41, 0x82, 0x00, 0x68, 0x7e, 0x23, 0x8b, 0x78, 0x4b, 0xff, 0xff, 0x55, 0x4b, 0xff, 0xff, 0xa5, 0x4b, 0xff, - 0xff, 0xa1, 0x4b, 0xff, 0xfe, 0xd9, 0x41, 0x82, 0xff, 0xf4, 0x2c, 0x1d, 0x00, 0xcc, 0x41, 0x82, 0x00, 0x48, - 0x2c, 0x1d, 0x00, 0xbb, 0x41, 0x82, 0xff, 0xdc, 0x2c, 0x1d, 0x00, 0xaa, 0x40, 0x82, 0xff, 0xdc, 0x7d, 0x8c, - 0x72, 0x14, 0x35, 0x6b, 0xff, 0xff, 0x41, 0x80, 0x00, 0x2c, 0x4b, 0xff, 0xff, 0xb4, 0x7e, 0xb5, 0xfb, 0xa6, - 0x7e, 0xb2, 0xfb, 0xa6, 0x63, 0xe4, 0x26, 0xc4, 0x81, 0x24, 0x00, 0x18, 0x55, 0x29, 0x05, 0xa8, 0x91, 0x24, - 0x00, 0x18, 0x48, 0x00, 0x00, 0x0c, 0x38, 0x60, 0x00, 0x80, 0x4b, 0xff, 0xff, 0x25, 0x80, 0x92, 0x00, 0x00, - 0x2c, 0x04, 0x00, 0x00, 0x40, 0x82, 0xf9, 0xf8, 0xb3, 0x94, 0x40, 0x10, 0xc8, 0x41, 0x00, 0x98, 0xc8, 0x61, - 0x00, 0xa0, 0x7f, 0x20, 0x00, 0xa6, 0x80, 0x01, 0x00, 0xac, 0x7c, 0x08, 0x03, 0xa6, 0x80, 0x01, 0x00, 0x0c, - 0x7c, 0x0f, 0xf1, 0x20, 0x80, 0x01, 0x00, 0x10, 0x7c, 0x09, 0x03, 0xa6, 0x80, 0x01, 0x00, 0x14, 0x7c, 0x01, - 0x03, 0xa6, 0xb8, 0x61, 0x00, 0x18, 0x80, 0x01, 0x00, 0x08, 0x38, 0x21, 0x00, 0xa8, 0x4c, 0x00, 0x01, 0x2c, - 0x7c, 0x00, 0x04, 0xac, 0x4e, 0x80, 0x00, 0x20, 0x7e, 0x23, 0x20, 0x50, 0x3c, 0xa0, 0x48, 0x00, 0x52, 0x25, - 0x01, 0xba, 0x90, 0xa3, 0x00, 0x00, 0x7c, 0x00, 0x18, 0xac, 0x7c, 0x00, 0x04, 0xac, 0x7c, 0x00, 0x1f, 0xac, - 0x4c, 0x00, 0x01, 0x2c, 0x4e, 0x80, 0x00, 0x20, 0x7d, 0x70, 0x8b, 0xd7, 0x7d, 0x4b, 0x89, 0xd6, 0x7d, 0x4a, - 0x80, 0x50, 0x91, 0x5b, 0x00, 0x00, 0x4e, 0x80, 0x00, 0x20, 0x7f, 0xa8, 0x02, 0xa6, 0x63, 0xef, 0x27, 0xe8, - 0x63, 0xe7, 0x18, 0x08, 0x3c, 0xc0, 0x80, 0x00, 0x7c, 0xd0, 0x33, 0x78, 0x39, 0x00, 0x00, 0x00, 0x3c, 0x60, - 0x00, 0xd0, 0x60, 0x63, 0xc0, 0xde, 0x80, 0x8f, 0x00, 0x00, 0x7c, 0x03, 0x20, 0x00, 0x40, 0x82, 0x00, 0x18, - 0x80, 0x8f, 0x00, 0x04, 0x7c, 0x03, 0x20, 0x00, 0x40, 0x82, 0x00, 0x0c, 0x39, 0xef, 0x00, 0x08, 0x48, 0x00, - 0x00, 0x0c, 0x7f, 0xa8, 0x03, 0xa6, 0x4e, 0x80, 0x00, 0x20, 0x80, 0x6f, 0x00, 0x00, 0x80, 0x8f, 0x00, 0x04, - 0x39, 0xef, 0x00, 0x08, 0x71, 0x09, 0x00, 0x01, 0x2f, 0x89, 0x00, 0x00, 0x39, 0x20, 0x00, 0x00, 0x54, 0x6a, - 0x1f, 0x7e, 0x54, 0x65, 0x3f, 0x7e, 0x74, 0x6b, 0x10, 0x00, 0x54, 0x63, 0x01, 0xfe, 0x40, 0x82, 0x00, 0x0c, - 0x54, 0xcc, 0x00, 0x0c, 0x48, 0x00, 0x00, 0x08, 0x7e, 0x0c, 0x83, 0x78, 0x2e, 0x05, 0x00, 0x00, 0x2c, 0x0a, - 0x00, 0x01, 0x41, 0xa0, 0x00, 0x2c, 0x41, 0xa2, 0x00, 0xe4, 0x2c, 0x0a, 0x00, 0x03, 0x41, 0xa0, 0x01, 0xb0, - 0x41, 0x82, 0x02, 0x54, 0x2c, 0x0a, 0x00, 0x05, 0x41, 0x80, 0x02, 0xdc, 0x41, 0xa2, 0x04, 0xe8, 0x2c, 0x0a, - 0x00, 0x07, 0x41, 0xa0, 0x05, 0x14, 0x48, 0x00, 0x05, 0xf8, 0x7d, 0x8c, 0x1a, 0x14, 0x2c, 0x05, 0x00, 0x03, - 0x41, 0x82, 0x00, 0x48, 0x41, 0x81, 0x00, 0x60, 0x40, 0xbe, 0xff, 0x84, 0x2e, 0x05, 0x00, 0x01, 0x41, 0x91, - 0x00, 0x2c, 0x54, 0x8a, 0x84, 0x3e, 0x41, 0x92, 0x00, 0x10, 0x7c, 0x89, 0x61, 0xae, 0x39, 0x29, 0x00, 0x01, - 0x48, 0x00, 0x00, 0x0c, 0x7c, 0x89, 0x63, 0x2e, 0x39, 0x29, 0x00, 0x02, 0x35, 0x4a, 0xff, 0xff, 0x40, 0xa0, - 0xff, 0xe4, 0x4b, 0xff, 0xff, 0x54, 0x55, 0x8c, 0x00, 0x3a, 0x90, 0x8c, 0x00, 0x00, 0x4b, 0xff, 0xff, 0x48, - 0x7c, 0x89, 0x23, 0x78, 0x40, 0x9e, 0x04, 0xd0, 0x35, 0x29, 0xff, 0xff, 0x41, 0x80, 0x04, 0xc8, 0x7c, 0xa9, - 0x78, 0xae, 0x7c, 0xa9, 0x61, 0xae, 0x4b, 0xff, 0xff, 0xf0, 0x39, 0xef, 0x00, 0x08, 0x40, 0xbe, 0xff, 0x24, - 0x80, 0xaf, 0xff, 0xf8, 0x81, 0x6f, 0xff, 0xfc, 0x54, 0xb1, 0x04, 0x3e, 0x54, 0xaa, 0x85, 0x3e, 0x54, 0xa5, - 0x27, 0x3e, 0x2e, 0x85, 0x00, 0x01, 0x41, 0x96, 0x00, 0x10, 0x41, 0xb5, 0x00, 0x14, 0x7c, 0x89, 0x61, 0xae, - 0x48, 0x00, 0x00, 0x10, 0x7c, 0x89, 0x63, 0x2e, 0x48, 0x00, 0x00, 0x08, 0x7c, 0x89, 0x61, 0x2e, 0x7c, 0x84, - 0x5a, 0x14, 0x7d, 0x29, 0x8a, 0x14, 0x35, 0x4a, 0xff, 0xff, 0x40, 0x80, 0xff, 0xd4, 0x4b, 0xff, 0xfe, 0xdc, - 0x54, 0x69, 0x07, 0xff, 0x41, 0x82, 0x00, 0x10, 0x55, 0x08, 0xf8, 0x7e, 0x71, 0x09, 0x00, 0x01, 0x2f, 0x89, - 0x00, 0x00, 0x2e, 0x85, 0x00, 0x04, 0x2d, 0x8a, 0x00, 0x05, 0x7d, 0x13, 0x43, 0x78, 0x52, 0x68, 0x08, 0x3c, - 0x40, 0x9e, 0x00, 0x78, 0x41, 0x8d, 0x04, 0xbc, 0x7d, 0x8c, 0x1a, 0x14, 0x41, 0x8c, 0x00, 0x0c, 0x41, 0x94, - 0x00, 0x30, 0x48, 0x00, 0x00, 0x1c, 0x40, 0x94, 0x00, 0x10, 0x55, 0x8c, 0x00, 0x3a, 0x81, 0x6c, 0x00, 0x00, - 0x48, 0x00, 0x00, 0x1c, 0x55, 0x8c, 0x00, 0x3c, 0xa1, 0x6c, 0x00, 0x00, 0x7c, 0x89, 0x20, 0xf8, 0x55, 0x29, - 0x84, 0x3e, 0x7d, 0x6b, 0x48, 0x38, 0x54, 0x84, 0x04, 0x3e, 0x7f, 0x0b, 0x20, 0x40, 0x70, 0xa9, 0x00, 0x03, - 0x41, 0x82, 0x00, 0x18, 0x2c, 0x09, 0x00, 0x02, 0x41, 0x82, 0x00, 0x18, 0x41, 0x81, 0x00, 0x1c, 0x40, 0x9a, - 0x00, 0x20, 0x48, 0x00, 0x00, 0x18, 0x41, 0x9a, 0x00, 0x18, 0x48, 0x00, 0x00, 0x10, 0x41, 0x99, 0x00, 0x10, - 0x48, 0x00, 0x00, 0x08, 0x41, 0x98, 0x00, 0x08, 0x61, 0x08, 0x00, 0x01, 0x40, 0x8e, 0xfe, 0x3c, 0x41, 0x94, - 0xfe, 0x38, 0x81, 0x6f, 0xff, 0xf8, 0x40, 0x9e, 0x00, 0x20, 0x70, 0x6c, 0x00, 0x08, 0x41, 0x82, 0x00, 0x0c, - 0x71, 0x0c, 0x00, 0x01, 0x41, 0x82, 0x00, 0x10, 0x39, 0x8b, 0x00, 0x10, 0x51, 0x8b, 0x03, 0x36, 0x48, 0x00, - 0x00, 0x08, 0x55, 0x6b, 0x07, 0x16, 0x91, 0x6f, 0xff, 0xf8, 0x4b, 0xff, 0xfe, 0x08, 0x40, 0xbe, 0xfe, 0x04, - 0x54, 0x69, 0x16, 0xba, 0x54, 0x6e, 0x87, 0xfe, 0x2d, 0x8e, 0x00, 0x00, 0x2e, 0x05, 0x00, 0x04, 0x70, 0xae, - 0x00, 0x03, 0x2e, 0x8e, 0x00, 0x02, 0x41, 0x94, 0x00, 0x14, 0x41, 0x96, 0x00, 0x50, 0x7c, 0x64, 0x07, 0x34, - 0x7c, 0x84, 0x7a, 0x14, 0x48, 0x00, 0x00, 0x68, 0x54, 0x65, 0xa7, 0xff, 0x41, 0x82, 0x00, 0x0c, 0x7d, 0x27, - 0x48, 0x2e, 0x7c, 0x84, 0x4a, 0x14, 0x41, 0x8e, 0x00, 0x08, 0x7c, 0x8c, 0x22, 0x14, 0x2e, 0x8e, 0x00, 0x01, - 0x41, 0x96, 0x00, 0x08, 0x80, 0x84, 0x00, 0x00, 0x54, 0x63, 0x67, 0xff, 0x41, 0x82, 0x00, 0x3c, 0x40, 0x90, - 0x00, 0x0c, 0x7c, 0x84, 0x32, 0x14, 0x48, 0x00, 0x00, 0x30, 0x7c, 0x84, 0x82, 0x14, 0x48, 0x00, 0x00, 0x28, - 0x54, 0x65, 0xa7, 0xff, 0x41, 0x82, 0x00, 0x0c, 0x7d, 0x27, 0x48, 0x2e, 0x7c, 0x84, 0x4a, 0x14, 0x40, 0x90, - 0x00, 0x0c, 0x7c, 0xcc, 0x21, 0x2e, 0x4b, 0xff, 0xfd, 0x7c, 0x7e, 0x0c, 0x21, 0x2e, 0x4b, 0xff, 0xfd, 0x74, - 0x40, 0x90, 0x00, 0x0c, 0x7c, 0x86, 0x23, 0x78, 0x4b, 0xff, 0xfd, 0x68, 0x7c, 0x90, 0x23, 0x78, 0x4b, 0xff, - 0xfd, 0x60, 0x54, 0x89, 0x1e, 0x78, 0x39, 0x29, 0x00, 0x40, 0x2c, 0x05, 0x00, 0x02, 0x41, 0x80, 0x00, 0x4c, - 0x54, 0x6b, 0x67, 0xbf, 0x2c, 0x0b, 0x00, 0x01, 0x41, 0x80, 0x00, 0x14, 0x41, 0x82, 0x00, 0x08, 0x48, 0x00, - 0x00, 0x10, 0x41, 0xbe, 0xfd, 0x38, 0x48, 0x00, 0x00, 0x08, 0x40, 0xbe, 0xfd, 0x30, 0x2c, 0x05, 0x00, 0x03, - 0x41, 0x81, 0x00, 0x10, 0x41, 0xa2, 0x00, 0x10, 0x7d, 0xe7, 0x48, 0x2e, 0x4b, 0xff, 0xfd, 0x1c, 0x7d, 0xe7, - 0x49, 0x2e, 0x7c, 0x64, 0x07, 0x34, 0x54, 0x84, 0x1a, 0x78, 0x7d, 0xef, 0x22, 0x14, 0x4b, 0xff, 0xfd, 0x08, - 0x40, 0xbe, 0xfd, 0x04, 0x7c, 0xa7, 0x4a, 0x14, 0x40, 0x92, 0x00, 0x14, 0x54, 0x64, 0x04, 0x3e, 0x91, 0xe5, - 0x00, 0x00, 0x90, 0x85, 0x00, 0x04, 0x4b, 0xff, 0xfc, 0xec, 0x81, 0x25, 0x00, 0x04, 0x2c, 0x09, 0x00, 0x00, - 0x41, 0xa2, 0xfc, 0xe0, 0x39, 0x29, 0xff, 0xff, 0x91, 0x25, 0x00, 0x04, 0x81, 0xe5, 0x00, 0x00, 0x4b, 0xff, - 0xfc, 0xd0, 0x40, 0xbe, 0xfc, 0xcc, 0x54, 0x6b, 0x16, 0xba, 0x7f, 0x47, 0x5a, 0x14, 0x81, 0x3a, 0x00, 0x00, - 0x54, 0x6e, 0x67, 0xbe, 0x41, 0x92, 0x00, 0x84, 0x2e, 0x05, 0x00, 0x05, 0x40, 0x90, 0x01, 0x74, 0x2e, 0x05, - 0x00, 0x03, 0x40, 0x90, 0x00, 0x90, 0x2e, 0x05, 0x00, 0x01, 0x54, 0x65, 0x87, 0xff, 0x41, 0x82, 0x00, 0x08, - 0x7c, 0x8c, 0x22, 0x14, 0x2f, 0x0e, 0x00, 0x01, 0x40, 0x92, 0x00, 0x24, 0x41, 0xb9, 0x00, 0x18, 0x41, 0x9a, - 0x00, 0x0c, 0x88, 0x84, 0x00, 0x00, 0x48, 0x00, 0x00, 0xf8, 0xa0, 0x84, 0x00, 0x00, 0x48, 0x00, 0x00, 0xf0, - 0x80, 0x84, 0x00, 0x00, 0x48, 0x00, 0x00, 0xe8, 0x54, 0x73, 0xe5, 0x3e, 0x41, 0xb9, 0x00, 0x20, 0x41, 0x9a, - 0x00, 0x10, 0x99, 0x24, 0x00, 0x00, 0x38, 0x84, 0x00, 0x01, 0x48, 0x00, 0x00, 0x18, 0xb1, 0x24, 0x00, 0x00, - 0x38, 0x84, 0x00, 0x02, 0x48, 0x00, 0x00, 0x0c, 0x91, 0x24, 0x00, 0x00, 0x38, 0x84, 0x00, 0x04, 0x36, 0x73, - 0xff, 0xff, 0x40, 0x80, 0xff, 0xd4, 0x4b, 0xff, 0xfc, 0x38, 0x54, 0x65, 0x87, 0xff, 0x41, 0x82, 0x00, 0x08, - 0x7c, 0x84, 0x62, 0x14, 0x71, 0xc5, 0x00, 0x01, 0x41, 0x82, 0x00, 0x9c, 0x7c, 0x84, 0x4a, 0x14, 0x48, 0x00, - 0x00, 0x94, 0x54, 0x6a, 0x87, 0xbe, 0x54, 0x8e, 0x16, 0xba, 0x7e, 0x67, 0x72, 0x14, 0x40, 0x92, 0x00, 0x08, - 0x3a, 0x6f, 0xff, 0xfc, 0x80, 0x9a, 0x00, 0x00, 0x81, 0x33, 0x00, 0x00, 0x71, 0x4b, 0x00, 0x01, 0x41, 0x82, - 0x00, 0x08, 0x7c, 0x9a, 0x23, 0x78, 0x71, 0x4b, 0x00, 0x02, 0x41, 0x82, 0x00, 0x10, 0x7d, 0x33, 0x4b, 0x78, - 0x40, 0xb2, 0x00, 0x08, 0x7e, 0x6c, 0x9a, 0x14, 0x54, 0x65, 0x67, 0x3f, 0x2c, 0x05, 0x00, 0x09, 0x40, 0x80, - 0x00, 0x54, 0x48, 0x00, 0x00, 0x79, 0x7c, 0x89, 0x22, 0x14, 0x48, 0x00, 0x00, 0x40, 0x7c, 0x89, 0x21, 0xd6, - 0x48, 0x00, 0x00, 0x38, 0x7d, 0x24, 0x23, 0x78, 0x48, 0x00, 0x00, 0x30, 0x7d, 0x24, 0x20, 0x38, 0x48, 0x00, - 0x00, 0x28, 0x7d, 0x24, 0x22, 0x78, 0x48, 0x00, 0x00, 0x20, 0x7d, 0x24, 0x20, 0x30, 0x48, 0x00, 0x00, 0x18, - 0x7d, 0x24, 0x24, 0x30, 0x48, 0x00, 0x00, 0x10, 0x5d, 0x24, 0x20, 0x3e, 0x48, 0x00, 0x00, 0x08, 0x7d, 0x24, - 0x26, 0x30, 0x90, 0x9a, 0x00, 0x00, 0x4b, 0xff, 0xfb, 0x84, 0x2c, 0x05, 0x00, 0x0a, 0x41, 0x81, 0xfb, 0x7c, - 0xc0, 0x5a, 0x00, 0x00, 0xc0, 0x73, 0x00, 0x00, 0x41, 0x82, 0x00, 0x0c, 0xec, 0x43, 0x10, 0x2a, 0x48, 0x00, - 0x00, 0x08, 0xec, 0x43, 0x00, 0xb2, 0xd0, 0x5a, 0x00, 0x00, 0x4b, 0xff, 0xfb, 0x5c, 0x7d, 0x48, 0x02, 0xa6, - 0x54, 0xa5, 0x1e, 0x78, 0x7d, 0x4a, 0x2a, 0x14, 0x80, 0x9a, 0x00, 0x00, 0x81, 0x33, 0x00, 0x00, 0x7d, 0x48, - 0x03, 0xa6, 0x4e, 0x80, 0x00, 0x20, 0x40, 0xbe, 0xfb, 0x3c, 0x54, 0x69, 0xc0, 0x3e, 0x7d, 0x8e, 0x63, 0x78, - 0x48, 0x00, 0x00, 0x35, 0x41, 0x92, 0x00, 0x0c, 0x7e, 0x31, 0x22, 0x14, 0x48, 0x00, 0x00, 0x08, 0x7d, 0x29, - 0x22, 0x14, 0x54, 0x64, 0xc4, 0x3f, 0x38, 0xa0, 0x00, 0x00, 0x41, 0x82, 0xfb, 0x14, 0x7d, 0x45, 0x88, 0xae, - 0x7d, 0x45, 0x49, 0xae, 0x38, 0xa5, 0x00, 0x01, 0x7c, 0x05, 0x20, 0x00, 0x4b, 0xff, 0xff, 0xec, 0x2e, 0x8a, - 0x00, 0x04, 0x55, 0x31, 0x36, 0xba, 0x2c, 0x11, 0x00, 0x3c, 0x7e, 0x27, 0x88, 0x2e, 0x40, 0x82, 0x00, 0x08, - 0x7d, 0xd1, 0x73, 0x78, 0x41, 0x96, 0x00, 0x08, 0xa2, 0x31, 0x00, 0x00, 0x55, 0x29, 0x56, 0xba, 0x2c, 0x09, - 0x00, 0x3c, 0x7d, 0x27, 0x48, 0x2e, 0x40, 0x82, 0x00, 0x08, 0x7d, 0xc9, 0x73, 0x78, 0x41, 0x96, 0x00, 0x08, - 0xa1, 0x29, 0x00, 0x00, 0x4e, 0x80, 0x00, 0x20, 0x2c, 0x05, 0x00, 0x04, 0x40, 0x80, 0x00, 0x28, 0x7c, 0x89, - 0x23, 0x78, 0x7d, 0xc3, 0x62, 0x14, 0x55, 0xce, 0x00, 0x3c, 0x4b, 0xff, 0xff, 0xad, 0x7c, 0x84, 0x20, 0xf8, - 0x54, 0x84, 0x04, 0x3e, 0x7d, 0x2b, 0x20, 0x38, 0x7e, 0x24, 0x20, 0x38, 0x4b, 0xff, 0xfb, 0xbc, 0x54, 0x6b, - 0xe4, 0x3e, 0x4b, 0xff, 0xfb, 0xb4, 0x7c, 0x9a, 0x23, 0x78, 0x54, 0x84, 0x18, 0x38, 0x40, 0x92, 0x00, 0x20, - 0x40, 0x9e, 0x00, 0x0c, 0x7d, 0xe8, 0x03, 0xa6, 0x4e, 0x80, 0x00, 0x21, 0x7d, 0xe4, 0x7a, 0x14, 0x39, 0xef, - 0x00, 0x07, 0x55, 0xef, 0x00, 0x38, 0x4b, 0xff, 0xfa, 0x64, 0x2e, 0x05, 0x00, 0x03, 0x41, 0x91, 0x00, 0x5c, - 0x3c, 0xa0, 0x48, 0x00, 0x7d, 0x83, 0x62, 0x14, 0x55, 0x8c, 0x00, 0x3a, 0x40, 0x92, 0x00, 0x20, 0x40, 0xbe, - 0xfa, 0x48, 0x57, 0x44, 0x00, 0x3a, 0x7c, 0x8c, 0x20, 0x50, 0x50, 0x85, 0x01, 0xba, 0x50, 0x65, 0x07, 0xfe, - 0x90, 0xac, 0x00, 0x00, 0x4b, 0xff, 0xfa, 0x30, 0x40, 0xbe, 0xff, 0xbc, 0x7d, 0x2c, 0x78, 0x50, 0x51, 0x25, - 0x01, 0xba, 0x90, 0xac, 0x00, 0x00, 0x39, 0x8c, 0x00, 0x04, 0x7d, 0x6f, 0x22, 0x14, 0x39, 0x6b, 0xff, 0xfc, - 0x7d, 0x2b, 0x60, 0x50, 0x51, 0x25, 0x01, 0xba, 0x90, 0xab, 0x00, 0x00, 0x4b, 0xff, 0xff, 0x94, 0x2e, 0x05, - 0x00, 0x06, 0x41, 0x92, 0x00, 0x28, 0x4b, 0xff, 0xfb, 0x20, 0x55, 0x8c, 0x84, 0x3e, 0x57, 0x44, 0x84, 0x3e, - 0x57, 0x5a, 0x04, 0x3e, 0x7c, 0x0c, 0x20, 0x00, 0x41, 0x80, 0xfb, 0xa4, 0x7c, 0x0c, 0xd0, 0x00, 0x40, 0x80, - 0xfb, 0x9c, 0x4b, 0xff, 0xf9, 0xd8, 0x57, 0x45, 0xff, 0xfe, 0x68, 0xa5, 0x00, 0x01, 0x71, 0x03, 0x00, 0x01, - 0x7c, 0x05, 0x18, 0x00, 0x41, 0x82, 0x00, 0x1c, 0x51, 0x1a, 0x0f, 0xbc, 0x6b, 0x5a, 0x00, 0x02, 0x57, 0x45, - 0xff, 0xff, 0x41, 0x82, 0x00, 0x08, 0x6b, 0x5a, 0x00, 0x01, 0x93, 0x4f, 0xff, 0xfc, 0x53, 0x48, 0x07, 0xfe, - 0x4b, 0xff, 0xf9, 0xa4, 0x2c, 0x0b, 0x00, 0x00, 0x40, 0x82, 0xf9, 0x94, 0x40, 0x92, 0x00, 0x0c, 0x39, 0x00, - 0x00, 0x00, 0x48, 0x00, 0x00, 0x14, 0x54, 0x69, 0x06, 0xff, 0x40, 0x82, 0x00, 0x08, 0x40, 0x9e, 0x00, 0x10, - 0x54, 0x65, 0x67, 0xfe, 0x7d, 0x08, 0x4c, 0x30, 0x7d, 0x08, 0x2a, 0x78, 0x54, 0x85, 0x00, 0x1f, 0x41, 0x82, - 0x00, 0x08, 0x7c, 0xa6, 0x2b, 0x78, 0x54, 0x85, 0x80, 0x1f, 0x41, 0x82, 0x00, 0x08, 0x7c, 0xb0, 0x2b, 0x78, - 0x4b, 0xff, 0xf9, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - -}; -const int kenobiwii_size = sizeof(kenobiwii); diff --git a/source/patches/multidol.c b/source/patches/multidol.c deleted file mode 100644 index 1061858b..00000000 --- a/source/patches/multidol.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - This file was autogenerated by raw2c. - Visit http://www.devkitpro.org - */ - -const unsigned char multidol[] = { 0x7f, 0xe8, 0x03, 0xa6, 0x7c, 0x08, 0x02, 0xa6, 0x90, 0x01, 0x00, 0xac, 0x7c, 0x00, - 0x00, 0x26, 0x90, 0x01, 0x00, 0x0c, 0x7c, 0x09, 0x02, 0xa6, 0x90, 0x01, 0x00, 0x10, 0x7c, 0x01, 0x02, 0xa6, - 0x90, 0x01, 0x00, 0x14, 0xbc, 0x61, 0x00, 0x18, 0x3c, 0x60, 0x80, 0x00, 0x60, 0x63, 0x18, 0xa8, 0x3c, 0xe0, - 0x80, 0x00, 0x60, 0xe7, 0x11, 0x98, 0x3e, 0x60, 0x80, 0x00, 0x62, 0x73, 0x11, 0x88, 0x3e, 0x40, 0x4e, 0x80, - 0x62, 0x52, 0x00, 0x20, 0x81, 0xc7, 0x00, 0x04, 0x81, 0xe7, 0x00, 0x08, 0x82, 0x07, 0x00, 0x0c, 0x82, 0x27, - 0x00, 0x00, 0x3c, 0x80, 0x80, 0x00, 0x3c, 0xa0, 0x81, 0x33, 0x38, 0x84, 0xff, 0xfc, 0x84, 0xc4, 0x00, 0x04, - 0x7c, 0x04, 0x28, 0x00, 0x40, 0x80, 0x00, 0x4c, 0x7c, 0x06, 0x70, 0x00, 0x40, 0x82, 0xff, 0xf0, 0x84, 0xc4, - 0x00, 0x04, 0x7c, 0x06, 0x78, 0x00, 0x40, 0x82, 0xff, 0xe0, 0x84, 0xc4, 0x00, 0x04, 0x7c, 0x06, 0x80, 0x00, - 0x40, 0x82, 0xff, 0xd4, 0x84, 0xc4, 0x00, 0x04, 0x7c, 0x06, 0x88, 0x00, 0x40, 0x82, 0xff, 0xc8, 0x84, 0xc4, - 0x00, 0x04, 0x7c, 0x04, 0x28, 0x00, 0x40, 0x80, 0x00, 0x14, 0x7c, 0x06, 0x90, 0x00, 0x40, 0x82, 0xff, 0xf0, - 0x48, 0x00, 0x00, 0xad, 0x4b, 0xff, 0xff, 0xb0, 0x3c, 0x60, 0x80, 0x00, 0x60, 0x63, 0x10, 0x00, 0x3e, 0x60, - 0x80, 0x00, 0x62, 0x73, 0x11, 0x90, 0x3c, 0xe0, 0x80, 0x00, 0x60, 0xe7, 0x11, 0xa8, 0x81, 0xc7, 0x00, 0x04, - 0x81, 0xe7, 0x00, 0x08, 0x82, 0x07, 0x00, 0x0c, 0x82, 0x27, 0x00, 0x00, 0x3c, 0x80, 0x80, 0x00, 0x3c, 0xa0, - 0x81, 0x40, 0x38, 0x84, 0xff, 0xfc, 0x84, 0xc4, 0x00, 0x04, 0x7c, 0x04, 0x28, 0x00, 0x40, 0x80, 0x00, 0x38, - 0x7c, 0x06, 0x70, 0x00, 0x40, 0x82, 0xff, 0xf0, 0x84, 0xc4, 0x00, 0x04, 0x7c, 0x06, 0x78, 0x00, 0x40, 0x82, - 0xff, 0xe0, 0x84, 0xc4, 0x00, 0x04, 0x7c, 0x06, 0x80, 0x00, 0x40, 0x82, 0xff, 0xd4, 0x84, 0xc4, 0x00, 0x04, - 0x7c, 0x06, 0x88, 0x00, 0x40, 0x82, 0xff, 0xc8, 0x48, 0x00, 0x00, 0x39, 0x4b, 0xff, 0xff, 0xc4, 0x80, 0x01, - 0x00, 0xac, 0x7c, 0x08, 0x03, 0xa6, 0x80, 0x01, 0x00, 0x0c, 0x7c, 0x0f, 0xf1, 0x20, 0x80, 0x01, 0x00, 0x10, - 0x7c, 0x09, 0x03, 0xa6, 0x80, 0x01, 0x00, 0x14, 0x7c, 0x01, 0x03, 0xa6, 0xb8, 0x61, 0x00, 0x18, 0x80, 0x01, - 0x00, 0x08, 0x38, 0x21, 0x00, 0xa8, 0x48, 0x00, 0x07, 0x50, 0x7e, 0x44, 0x18, 0x50, 0x3c, 0xc0, 0x48, 0x00, - 0x52, 0x46, 0x01, 0xba, 0x90, 0xc4, 0x00, 0x00, 0x90, 0xd3, 0x00, 0x00, 0x90, 0x93, 0x00, 0x04, 0x7c, 0x00, - 0x20, 0xac, 0x7c, 0x00, 0x04, 0xac, 0x7c, 0x00, 0x27, 0xac, 0x4c, 0x00, 0x01, 0x2c, 0x4e, 0x80, 0x00, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xc7, - 0x00, 0x4c, 0x7c, 0xe3, 0x3b, 0x78, 0x38, 0x87, 0x00, 0x34, 0x38, 0xa7, 0x00, 0x38, 0x4e, 0x80, 0x04, 0x20, - 0x7c, 0x00, 0x04, 0xac, 0x4c, 0x00, 0x01, 0x2c, 0x7f, 0xe9, 0x03, 0xa6 }; -const int multidol_size = sizeof(multidol); diff --git a/source/patches/multidol.h b/source/patches/multidol.h deleted file mode 100644 index 11d1f8a4..00000000 --- a/source/patches/multidol.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - This file was autogenerated by raw2c. - Visit http://www.devkitpro.org - */ - -//--------------------------------------------------------------------------------- -#ifndef _multidol_h_ -#define _multidol_h_ -//--------------------------------------------------------------------------------- -extern const unsigned char multidol[]; -extern const int multidol_size; -//--------------------------------------------------------------------------------- -#endif //_multidol_h_ -//--------------------------------------------------------------------------------- diff --git a/source/patches/patchcode.c b/source/patches/patchcode.c deleted file mode 100644 index adb599f9..00000000 --- a/source/patches/patchcode.c +++ /dev/null @@ -1,408 +0,0 @@ -/* - * Copyright (C) 2008 Nuke (wiinuke@gmail.com) - * - * this file is part of GeckoOS for USB Gecko - * http://www.usbgecko.com - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include -#include -#include -#include -#include - -#include "usbloader/apploader.h" -#include "patchcode.h" -#include "settings/SettingsEnums.h" -#include "FileOperations/fileops.h" -#include "fst.h" - -//#include "sd.h" -//#include "fwrite_patch.h" -//#include "fwrite_patch_slota.h" -//#include "main.h" - -extern const char * CheatFilepath; - -extern void patchhook(u32 address, u32 len); -extern void patchhook2(u32 address, u32 len); -extern void patchhook3(u32 address, u32 len); - -extern void multidolpatchone(u32 address, u32 len); -extern void multidolpatchtwo(u32 address, u32 len); - -extern void regionfreejap(u32 address, u32 len); -extern void regionfreeusa(u32 address, u32 len); -extern void regionfreepal(u32 address, u32 len); - -extern void removehealthcheck(u32 address, u32 len); - -extern void copyflagcheck1(u32 address, u32 len); -extern void copyflagcheck2(u32 address, u32 len); -extern void copyflagcheck3(u32 address, u32 len); -extern void copyflagcheck4(u32 address, u32 len); -extern void copyflagcheck5(u32 address, u32 len); - -extern void patchupdatecheck(u32 address, u32 len); - -extern void movedvdhooks(u32 address, u32 len); - -extern void multidolhook(u32 address); -extern void langvipatch(u32 address, u32 len, u8 langbyte); -extern void vipatch(u32 address, u32 len); - -static const u32 multidolpatch1[2] = { 0x3C03FFB4, 0x28004F43 }; - -static const u32 healthcheckhook[2] = { 0x41810010, 0x881D007D }; - -static const u32 updatecheckhook[3] = { 0x80650050, 0x80850054, 0xA0A50058 }; - -static const u32 multidolpatch2[2] = { 0x3F608000, 0x807B0018 }; - -static const u32 recoveryhooks[3] = { 0xA00100AC, 0x5400073E, 0x2C00000F }; - -static const u32 nocopyflag1[3] = { 0x540007FF, 0x4182001C, 0x80630068 }; - -static const u32 nocopyflag2[3] = { 0x540007FF, 0x41820024, 0x387E12E2 }; - -// this one is for the GH3 and VC saves -//static const u32 nocopyflag3[5] = { -// 0x2C030000, 0x40820010, 0x88010020, 0x28000002, 0x41820234 -//}; - -static const u32 nocopyflag3[5] = { 0x2C030000, 0x41820200, 0x48000058, 0x38610100 }; -// this removes the display warning for no copy VC and GH3 saves -static const u32 nocopyflag4[4] = { 0x80010008, 0x2C000000, 0x4182000C, 0x3BE00001 }; - -static const u32 nocopyflag5[3] = { 0x801D0024, 0x540007FF, 0x41820024 }; - -static const u32 movedvdpatch[3] = { 0x2C040000, 0x41820120, 0x3C608109 }; - -static const u32 regionfreehooks[5] = { 0x7C600774, 0x2C000001, 0x41820030, 0x40800010, 0x2C000000 }; - -static const u32 cIOScode[16] = { 0x7f06c378, 0x7f25cb78, 0x387e02c0, 0x4cc63182 }; - -static const u32 cIOSblock[16] = { 0x2C1800F9, 0x40820008, 0x3B000024 }; - -static const u32 fwritepatch[8] = { 0x9421FFD0, 0x7C0802A6, 0x90010034, 0xBF210014, 0x7C9B2378, 0x7CDC3378, 0x7C7A1B78, - 0x7CB92B78 // bushing fwrite - }; - -static const u32 vipatchcode[3] = { 0x4182000C, 0x4180001C, 0x48000018 }; - -const u32 viwiihooks[4] = { 0x7CE33B78, 0x38870034, 0x38A70038, 0x38C7004C }; - -const u32 kpadhooks[4] = { 0x9A3F005E, 0x38AE0080, 0x389FFFFC, 0x7E0903A6 }; - -const u32 kpadoldhooks[6] = { 0x801D0060, 0x901E0060, 0x801D0064, 0x901E0064, 0x801D0068, 0x901E0068 }; - -const u32 joypadhooks[4] = { 0x3AB50001, 0x3A73000C, 0x2C150004, 0x3B18000C }; - -const u32 gxdrawhooks[4] = { 0x3CA0CC01, 0x38000061, 0x3C804500, 0x98058000 }; - -const u32 gxflushhooks[4] = { 0x90010014, 0x800305FC, 0x2C000000, 0x41820008 }; - -const u32 ossleepthreadhooks[4] = { 0x90A402E0, 0x806502E4, 0x908502E4, 0x2C030000 }; - -const u32 axnextframehooks[4] = { 0x3800000E, 0x7FE3FB78, 0xB0050000, 0x38800080 }; - -const u32 wpadbuttonsdownhooks[4] = { 0x7D6B4A14, 0x816B0010, 0x7D635B78, 0x4E800020 }; - -const u32 wpadbuttonsdown2hooks[4] = { 0x7D6B4A14, 0x800B0010, 0x7C030378, 0x4E800020 }; - -const u32 multidolhooks[4] = { 0x7C0004AC, 0x4C00012C, 0x7FE903A6, 0x4E800420 }; - -const u32 multidolchanhooks[4] = { 0x4200FFF4, 0x48000004, 0x38800000, 0x4E800020 }; - -const u32 langpatch[3] = { 0x7C600775, 0x40820010, 0x38000000 }; - -static const u32 oldpatch002[3] = { 0x2C000000, 0x40820214, 0x3C608000 }; - -static const u32 newpatch002[3] = { 0x2C000000, 0x48000214, 0x3C608000 }; - -//--------------------------------------------------------------------------------- -bool dogamehooks(void *addr, u32 len) -//--------------------------------------------------------------------------------- -{ - if (!CheatFilepath) return false; - - //this is temporary since the screen freezes without a file loaded - char filepath[150]; - char GameId[10]; - memcpy(GameId, (u8 *) 0x80000000, 6); - GameId[6] = 0; - sprintf(filepath, "%s%s.gct", CheatFilepath, GameId); - - if (!CheckFile(filepath)) return false; - - //TODO for oggzee: when using Ocarina check if a hook as patched - - hooktype = 1; // TODO for oggzee: Create an option for hooktype - /* - 0 No Hook - 1 VBI - 2 KPAD read - 3 Joypad Hook - 4 GXDraw Hook - 5 GXFlush Hook - 6 OSSleepThread Hook - 7 AXNextFrame Hook - */ - - void *addr_start = addr; - void *addr_end = addr + len; - bool hookpatched = false; - - while (addr_start < addr_end) - { - switch (hooktype) - { - - case 0x00: - hookpatched = true; - break; - - case 0x01: - if (memcmp(addr_start, viwiihooks, sizeof(viwiihooks)) == 0) - { - patchhook((u32) addr_start, len); - hookpatched = true; - } - if (memcmp(addr_start, multidolhooks, sizeof(multidolhooks)) == 0) - { - multidolhook((u32) addr_start + sizeof(multidolhooks) - 4); - hookpatched = true; - } - break; - - case 0x02: - - if (memcmp(addr_start, kpadhooks, sizeof(kpadhooks)) == 0) - { - patchhook((u32) addr_start, len); - hookpatched = true; - } - - if (memcmp(addr_start, kpadoldhooks, sizeof(kpadoldhooks)) == 0) - { - patchhook((u32) addr_start, len); - hookpatched = true; - } - if (memcmp(addr_start, multidolhooks, sizeof(multidolhooks)) == 0) - { - multidolhook((u32) addr_start + sizeof(multidolhooks) - 4); - hookpatched = true; - } - break; - - case 0x03: - - if (memcmp(addr_start, joypadhooks, sizeof(joypadhooks)) == 0) - { - patchhook((u32) addr_start, len); - hookpatched = true; - } - if (memcmp(addr_start, multidolhooks, sizeof(multidolhooks)) == 0) - { - multidolhook((u32) addr_start + sizeof(multidolhooks) - 4); - hookpatched = true; - } - break; - - case 0x04: - - if (memcmp(addr_start, gxdrawhooks, sizeof(gxdrawhooks)) == 0) - { - patchhook((u32) addr_start, len); - hookpatched = true; - } - if (memcmp(addr_start, multidolhooks, sizeof(multidolhooks)) == 0) - { - multidolhook((u32) addr_start + sizeof(multidolhooks) - 4); - hookpatched = true; - } - break; - - case 0x05: - - if (memcmp(addr_start, gxflushhooks, sizeof(gxflushhooks)) == 0) - { - patchhook((u32) addr_start, len); - hookpatched = true; - } - if (memcmp(addr_start, multidolhooks, sizeof(multidolhooks)) == 0) - { - multidolhook((u32) addr_start + sizeof(multidolhooks) - 4); - hookpatched = true; - } - break; - - case 0x06: - - if (memcmp(addr_start, ossleepthreadhooks, sizeof(ossleepthreadhooks)) == 0) - { - patchhook((u32) addr_start, len); - hookpatched = true; - } - if (memcmp(addr_start, multidolhooks, sizeof(multidolhooks)) == 0) - { - multidolhook((u32) addr_start + sizeof(multidolhooks) - 4); - hookpatched = true; - } - break; - - case 0x07: - - if (memcmp(addr_start, axnextframehooks, sizeof(axnextframehooks)) == 0) - { - patchhook((u32) addr_start, len); - hookpatched = true; - } - if (memcmp(addr_start, multidolhooks, sizeof(multidolhooks)) == 0) - { - multidolhook((u32) addr_start + sizeof(multidolhooks) - 4); - hookpatched = true; - } - break; - - case 0x08: - - //if(memcmp(addr_start, customhook, customhooksize)==0) - //{ - // patchhook((u32)addr_start, len); - // hookpatched = true; - //} - if (memcmp(addr_start, multidolhooks, sizeof(multidolhooks)) == 0) - { - multidolhook((u32) addr_start + sizeof(multidolhooks) - 4); - hookpatched = true; - } - break; - } - addr_start += 4; - } - return hookpatched; -} - -// Not used yet, for patching DOL once loaded into memory and befor execution -/* - void patchdol(void *addr, u32 len) - { - - void *addr_start = addr; - void *addr_end = addr+len; - - while(addr_start < addr_end) - { - if(memcmp(addr_start, wpadlibogc, sizeof(wpadlibogc))==0) { - // printf("\n\n\n"); - // printf("found at address %x\n", addr_start); - // sleep(10); - // patchhookdol((u32)addr_start, len); - patched = 1; - break; - } - addr_start += 4; - } - } - */ -void langpatcher(void *addr, u32 len, u8 languageChoice) -{ - u8 ocarinaLangPatchByte = 1; - switch (languageChoice) - { - case JAPANESE: - ocarinaLangPatchByte = 0x00; - break; - case ENGLISH: - ocarinaLangPatchByte = 0x01; - break; - case GERMAN: - ocarinaLangPatchByte = 0x02; - break; - case FRENCH: - ocarinaLangPatchByte = 0x03; - break; - case SPANISH: - ocarinaLangPatchByte = 0x04; - break; - case ITALIAN: - ocarinaLangPatchByte = 0x05; - break; - case DUTCH: - ocarinaLangPatchByte = 0x06; - break; - case S_CHINESE: - ocarinaLangPatchByte = 0x07; - break; - case T_CHINESE: - ocarinaLangPatchByte = 0x08; - break; - case KOREAN: - ocarinaLangPatchByte = 0x09; - break; - default: - return; - } - - u8 * addr_start = addr; - u8 * addr_end = addr + len; - - while (addr_start < addr_end) - { - - if (memcmp(addr_start, langpatch, sizeof(langpatch)) == 0) - { - langvipatch((u32) addr_start, len, ocarinaLangPatchByte); - } - addr_start += 4; - } -} -/* - void patchdebug(void *addr, u32 len) - { - - void *addr_start = addr; - void *addr_end = addr+len; - - while(addr_start < addr_end) - { - - if(memcmp(addr_start, fwritepatch, sizeof(fwritepatch))==0) { - - memcpy(addr_start,fwrite_patch_bin,fwrite_patch_bin_len); - // apply patch - } - addr_start += 4; - } - } - */ -void vidolpatcher(void *addr, u32 len) -{ - - void *addr_start = addr; - void *addr_end = addr + len; - - while (addr_start < addr_end) - { - if (memcmp(addr_start, vipatchcode, sizeof(vipatchcode)) == 0) - { - vipatch((u32) addr_start, len); - } - addr_start += 4; - } -} - diff --git a/source/patches/patchcode.h b/source/patches/patchcode.h deleted file mode 100644 index 98e05955..00000000 --- a/source/patches/patchcode.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2008 Nuke (wiinuke@gmail.com) - * - * this file is part of GeckoOS for USB Gecko - * http://www.usbgecko.com - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef __PATCHCODE_H__ -#define __PATCHCODE_H__ - -#ifdef __cplusplus -extern "C" -{ -#endif - // Globals - u32 hooktype; - int patched; - //u8 configbytes[2]; - //u32 regionfree; - - // Function prototypes - bool dogamehooks(void *addr, u32 len); - void langpatcher(void *addr, u32 len, u8 languageChoice); - void vidolpatcher(void *addr, u32 len); - void patchdebug(void *addr, u32 len); - -#ifdef __cplusplus -} -#endif - -#endif // __PATCHCODE_H__ diff --git a/source/patches/patchhook.S b/source/patches/patchhook.S deleted file mode 100644 index 865e3417..00000000 --- a/source/patches/patchhook.S +++ /dev/null @@ -1,505 +0,0 @@ -.text -.set r0,0; .set sp,1; .set r2,2; .set r3,3; .set r4,4 -.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9 -.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14 -.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19 -.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24 -.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29 -.set r30,30; .set r31,31 - - -.globl patchhook # r3 address -patchhook: - mtctr r4 - lis r6, 0x4E80 - ori r6, r6, 0x0020 # blr -findblr: - lwz r5, 0(r3) - cmpw r6, r5 - beq writebranch - addi r3, r3, 4 # next word - bdnz findblr # loop length - b exit # stop unhooked game hanging - -writebranch: - lis r4, 0x8000 # 800018A0 hook location (source) - ori r4, r4, 0x18A8 - subf r4, r3, r4 # subtract r3 from r4 and place in r4 - lis r5, 0x3FF - ori r5, r5, 0xFFFF # 0x3FFFFFF - and r4, r4, r5 - lis r5, 0x4800 # 0x48000000 - or r4, r4, r5 - stw r4, 0(r3) # result in r3 - dcbf r0, r3 # data cache block flush - icbi r0, r3 -exit: - blr # return - - .globl patchhook2 # r3 address -patchhook2: - mtctr r4 - lis r6, 0x4E80 - ori r6, r6, 0x0020 # blr -findblr2: - lwz r5, 0(r3) - cmpw r6, r5 - beq writebranch2 - addi r3, r3, 4 # next word - bdnz findblr2 # loop length - b exit2 # stop unhooked game hanging - -writebranch2: - lis r4, 0x8000 # 81700000 our temp patcher - ori r4, r4, 0x18a8 - subf r4, r3, r4 # subtract r3 from r4 and place in r4 - lis r5, 0x3FF - ori r5, r5, 0xFFFF # 0x3FFFFFF - and r4, r4, r5 - lis r5, 0x4800 # 0x48000000 - or r4, r4, r5 - stw r4, 0(r3) # result in r3 - dcbf r0, r3 # data cache block flush - icbi r0, r3 -exit2: - blr # return - -.globl patchhook3 # r3 address -patchhook3: - mtctr r4 - lis r6, 0x4BFF - ori r6, r6, 0xE955 # blr -findbne: - lwz r5, 0(r3) - cmpw r6, r5 - beq writebl - addi r3, r3, 4 # next word - bdnz findbne # loop length - b exit3 # stop unhooked game hanging - -writebl: - lis r4, 0x4BFF # 81700000 our temp patcher - ori r4, r4, 0xEA91 - stw r4, 0(r3) # result in r3 - dcbf r0, r3 # data cache block flush - icbi r0, r3 -exit3: - blr # return - -.globl multidolpatchone # r3 address -multidolpatchone: - mtctr r4 - lis r6, 0x3800 - ori r6, r6, 0x0001 # (li r0,1) -findmulti: - lwz r5, 0(r3) - cmpw r6, r5 - beq writemulti - subi r3, r3, 4 # go back - bdnz findmulti # loop length - b exit5 # stop unhooked game hanging - -writemulti: - lis r4, 0x8170 # 81700000 - ori r4, r4, 0x0020 - subf r18, r3, r4 # subf r18,(source),(dest) - lis r6, 0x4800 - ori r6,r6,1 - rlwimi r6,r18,0,6,29 - stw r6,0(r3) - stw r6,0(r19) - stw r3,4(r19) - dcbf r0, r3 - sync - icbi r0, r3 - isync -exit5: - blr # return - -.globl multidolpatchtwo # r3 address -multidolpatchtwo: - mtctr r4 - lis r6, 0x3F60 - ori r6, r6, 0x8000 # (lis r27,-32768) -findmulti2: - lwz r5, 0(r3) - cmpw r6, r5 - beq writemulti2 - addi r3, r3, 4 # go forward - bdnz findmulti2 # loop length - b exit6 # stop unhooked game hanging - -writemulti2: - lis r4, 0x8170 # 81700020 - ori r4, r4, 0x0000 - subf r18, r3, r4 # subf r18,(source),(dest) - lis r6, 0x4800 - ori r6,r6,1 - rlwimi r6,r18,0,6,29 - stw r6,0(r3) - stw r6,0(r19) - stw r3,4(r19) - dcbf r0, r3 - sync - icbi r0, r3 - isync -exit6: - blr # return - -.globl multidolhook # r3 address -multidolhook: - lis r4, 0x8000 # 80001000 hook location (source) - ori r4, r4, 0x1000 - subf r4, r3, r4 # subtract r3 from r4 and place in r4 - lis r5, 0x3FF - ori r5, r5, 0xFFFF # 0x3FFFFFF - and r4, r4, r5 - lis r5, 0x4800 # 0x48000000 - or r4, r4, r5 - stw r4, 0(r3) # result in r3 - dcbf r0, r3 # data cache block flush - icbi r0, r3 - blr # return - - -.globl langvipatch # r3 address, r4 len, r5 lang byte -langvipatch: - mtctr r4 - lis r6, 0x8861 - ori r6, r6, 0x0008 # lbz r3, 8(sp) -findlang: - lwz r7, 0(r3) - cmpw r6, r7 - beq patchlang - addi r3, r3, 4 # next word - bdnz findlang # loop length - b exitlang # stop unhooked game hanging - -patchlang: - - lis r4, 0x3860 # 0x38600001 li %r3, 1 # eng - add r4, r4, r5 -gofinal: - stw r4, 0(r3) # result in r3 - dcbf r0, r3 # data cache block flush - icbi r0, r3 -exitlang: - blr # return - -.globl vipatch # r3 address -vipatch: - mtctr r4 - lis r6, 0x5400 - ori r6, r6, 0xFFFE -findvi: - lwz r5, 0(r3) - cmpw r6, r5 - beq patchvi - addi r3, r3, 4 # next word - bdnz findvi # loop length - b exitvi # stop unhooked game hanging - -patchvi: - lis r4, 0x8000 - ori r4, r4, 0x0003 - lbz r5, 0(r4) - cmpwi r5, 0x45 # USA - beq patchusa - cmpwi r5, 0x4A - beq patchjap2 # JAP - b exitvi -patchjap2: - lis r4, 0x3800 - ori r4, r4, 0x0001 - b gofinal2 -patchusa: - lis r4, 0x3800 - ori r4, r4, 0x0000 -gofinal2: - stw r4, 0(r3) # result in r3 - dcbf r0, r3 # data cache block flush - icbi r0, r3 -exitvi: - blr # return - -.globl regionfreejap # r3 address -regionfreejap: - mtctr r4 - lis r6, 0x2C1B - ori r6, r6, 0x0000 # blr -findjap: - lwz r5, 0(r3) - cmpw r6, r5 - beq writenop - addi r3, r3, 4 # next word - bdnz findjap # loop length - b exitjap # stop unhooked game hanging - -writenop: - addi r3, r3, 4 # next word - lis r4, 0x6000 # nop - ori r4, r4, 0x0000 - stw r4, 0(r3) # result in r3 - dcbf r0, r3 # data cache block flush - icbi r0, r3 -exitjap: - blr # return - -.globl regionfreeusa # r3 address -regionfreeusa: - mtctr r4 - lis r6, 0x281B - ori r6, r6, 0x0001 # blr -findusa: - lwz r5, 0(r3) - cmpw r6, r5 - beq writenop1 - addi r3, r3, 4 # next word - bdnz findusa # loop length - b exitusa # stop unhooked game hanging - -writenop1: - addi r3, r3, 4 # next word - lis r4, 0x6000 # nop - ori r4, r4, 0x0000 - stw r4, 0(r3) # result in r3 - dcbf r0, r3 # data cache block flush - icbi r0, r3 -exitusa: - blr # return - -.globl regionfreepal # r3 address -regionfreepal: - mtctr r4 - lis r6, 0x281B - ori r6, r6, 0x0002 # blr -findpal: - lwz r5, 0(r3) - cmpw r6, r5 - beq writenop2 - addi r3, r3, 4 # next word - bdnz findpal # loop length - b exitpal # stop unhooked game hanging - -writenop2: - addi r3, r3, 4 # next word - lis r4, 0x6000 # nop - ori r4, r4, 0x0000 - stw r4, 0(r3) # result in r3 - dcbf r0, r3 # data cache block flush - icbi r0, r3 - - lis r6, 0x4082 - ori r6, r6, 0x001C # bne loc_81377A2C -findextra: #this is just the bne to b patch - lwz r5, 0(r3) - cmpw r6, r5 - beq writeb - addi r3, r3, 4 # next word - bdnz findextra # loop length - b exitpal # stop unhooked game hanging - -writeb: - addi r3, r3, 4 # next word - lis r4, 0x4800 - ori r4, r4, 0x001c # b loc_81377A2C - stw r4, 0(r3) # result in r3 - dcbf r0, r3 # data cache block flush - icbi r0, r3 -exitpal: - blr # return - -.globl removehealthcheck # r3 address -removehealthcheck: - mtctr r4 - lis r6, 0x4182 - ori r6, r6, 0x004C # blr -findhe: - lwz r5, 0(r3) - cmpw r6, r5 - beq writebhe - addi r3, r3, 4 # next word - bdnz findhe # loop length - b exithe # stop unhooked game hanging - -writebhe: - lis r4, 0x6000 - ori r4, r4, 0x0000 - stw r4, 0(r3) # result in r3 - dcbf r0, r3 # data cache block flush - icbi r0, r3 -exithe: - blr # return - - - -.globl patchupdatecheck # r3 address -patchupdatecheck: - mtctr r4 - lis r6, 0x4082 - ori r6, r6, 0x0020 # blr -finduc: - lwz r5, 0(r3) - cmpw r6, r5 - beq writenopuc - addi r3, r3, 4 # next word - bdnz finduc # loop length - b exituc # stop unhooked game hanging - -writenopuc: - lis r4, 0x6000 - ori r4, r4, 0x0000 - stw r4, 0(r3) # result in r3 - dcbf r0, r3 # data cache block flush - icbi r0, r3 -exituc: - blr # return - - - - -.globl copyflagcheck1 # r3 address -copyflagcheck1: - mtctr r4 - lis r6, 0x5400 - ori r6, r6, 0x07FF -findncf1: - lwz r5, 0(r3) - cmpw r6, r5 - beq writencf1 - subi r3, r3, 4 # next word - bdnz findncf1 # loop length - b exitncf1 # stop unhooked game hanging - -writencf1: - lis r4, 0x7C00 - ori r4, r4, 0x0000 - stw r4, 0(r3) # result in r3 - dcbf r0, r3 # data cache block flush - icbi r0, r3 -exitncf1: - blr # return - -.globl copyflagcheck2 # r3 address -copyflagcheck2: - mtctr r4 - lis r6, 0x5400 - ori r6, r6, 0x07FF -findncf2: - lwz r5, 0(r3) - cmpw r6, r5 - beq writencf2 - subi r3, r3, 4 # next word - bdnz findncf2 # loop length - b exitncf2 # stop unhooked game hanging - -writencf2: - lis r4, 0x7C00 - ori r4, r4, 0x0000 - stw r4, 0(r3) # result in r3 - dcbf r0, r3 # data cache block flush - icbi r0, r3 -exitncf2: - blr # return - - -.globl copyflagcheck3 # r3 address -copyflagcheck3: -findncf3: - addi r3, r3, 20 # go back one dword (4 bytes) - lwz r5, 0(r3) -writencf3: - lis r4, 0x3860 - ori r4, r4, 0x0001 # li r3,1 - stw r4, 0(r3) # result in r3 - dcbf r0, r3 # data cache block flush - icbi r0, r3 -exitncf3: - blr # return - - -.globl copyflagcheck4 # r3 address -copyflagcheck4: - mtctr r4 - lis r6, 0x3BE0 - ori r6, r6, 0x0001 # li r31,1 -findncf4: - lwz r5, 0(r3) - cmpw r6, r5 - beq writencf4 - addi r3, r3, 4 # next word - bdnz findncf4 # loop length - b exitncf4 # stop unhooked game hanging - -writencf4: - lis r4, 0x3BE0 - ori r4, r4, 0x0000 # change this to 3BE00000 (li r31,0) - stw r4, 0(r3) # result in r3 - dcbf r0, r3 # data cache block flush - icbi r0, r3 -exitncf4: - blr # return - -.globl copyflagcheck5 # r3 address -copyflagcheck5: - mtctr r4 - lis r6, 0x4182 - ori r6, r6, 0x0024 # beq loc_8134AA60 -findncf5: - lwz r5, 0(r3) - cmpw r6, r5 - beq writencf5 - addi r3, r3, 4 # next word - bdnz findncf5 # loop length - b exitncf5 # stop unhooked game hanging - -writencf5: - #addi r3, r3, 8 # skip 2 - - lis r4, 0x801D - ori r4, r4, 0x0024 # change to 801D0024 (lwz r0,36(r29)) - stw r4, 0(r3) - dcbf r0, r3 - icbi r0, r3 - - addi r3, r3, 4 # next word - - lis r4, 0x5400 - ori r4, r4, 0x003C # change to 5400003C (rlwinm r0,r0,0,0,30) - stw r4, 0(r3) - dcbf r0, r3 - icbi r0, r3 - - addi r3, r3, 4 # next word - - lis r4, 0x901D - ori r4, r4, 0x0024 # change to 901D0024 (stw r0,36(r29)) - stw r4, 0(r3) - dcbf r0, r3 - icbi r0, r3 - - addi r3, r3, 4 # next word - - lis r4, 0x4800 - ori r4, r4, 0x0018 # change to 48000018 (b 0x8134aa60) - stw r4, 0(r3) - dcbf r0, r3 - icbi r0, r3 -exitncf5: - blr # return - -.globl movedvdhooks # r3 address -movedvdhooks: - lis r6, 0x4182 - ori r6, r6, 0x0120 # beq loc_813A7938 -findmd1: - addi r3, r3, 4 # next word - lwz r5, 0(r3) -writemd1: - lis r4, 0x6000 - ori r4, r4, 0x0000 # nop - stw r4, 0(r3) # result in r3 - dcbf r0, r3 # data cache block flush - icbi r0, r3 -exitmd1: - blr # return diff --git a/source/patches/ppc.h b/source/patches/ppc.h deleted file mode 100644 index 000df8d3..00000000 --- a/source/patches/ppc.h +++ /dev/null @@ -1,81 +0,0 @@ - -/* Condition Register Bit Fields */ - -#define cr0 0 -#define cr1 1 -#define cr2 2 -#define cr3 3 -#define cr4 4 -#define cr5 5 -#define cr6 6 -#define cr7 7 - -/* General Purpose Registers */ - -#define r0 0 -#define r1 1 -#define r2 2 -#define r3 3 -#define r4 4 -#define r5 5 -#define r6 6 -#define r7 7 -#define r8 8 -#define r9 9 -#define r10 10 -#define r11 11 -#define r12 12 -#define r13 13 -#define r14 14 -#define r15 15 -#define r16 16 -#define r17 17 -#define r18 18 -#define r19 19 -#define r20 20 -#define r21 21 -#define r22 22 -#define r23 23 -#define r24 24 -#define r25 25 -#define r26 26 -#define r27 27 -#define r28 28 -#define r29 29 -#define r30 30 -#define r31 31 - -/* Define Floating Point Registers */ - -#define f0 0 -#define f1 1 -#define f2 2 -#define f3 3 -#define f4 4 -#define f5 5 -#define f6 6 -#define f7 7 -#define f8 8 -#define f9 9 -#define f10 10 -#define f11 11 -#define f12 12 -#define f13 13 -#define f14 14 -#define f15 15 -#define f16 16 -#define f17 17 -#define f18 18 -#define f19 19 -#define f20 20 -#define f21 21 -#define f22 22 -#define f23 23 -#define f24 24 -#define f25 25 -#define f26 26 -#define f27 27 -#define f28 28 -#define f29 29 -#define f30 30 -#define f31 31 diff --git a/source/patches/wip.cpp b/source/patches/wip.cpp deleted file mode 100644 index f6d88fbc..00000000 --- a/source/patches/wip.cpp +++ /dev/null @@ -1,149 +0,0 @@ -#include -#include -#include -#include -#include "gecko.h" - -#include "settings/CSettings.h" -#include "wip.h" - -static WIP_Code * CodeList = NULL; -static u32 CodesCount = 0; -static u32 ProcessedLength = 0; -static u32 Counter = 0; - -extern "C" void do_wip_code(u8 * dst, u32 len) -{ - if (!CodeList) return; - - if (Counter < 3) - { - Counter++; - return; - } - - u32 i = 0; - int n = 0; - int offset = 0; - - for (i = 0; i < CodesCount; i++) - { - for (n = 0; n < 4; n++) - { - offset = CodeList[i].offset + n - ProcessedLength; - - if (offset < 0 || offset >= (int) len) continue; - - if (dst[offset] == ((u8 *) &CodeList[i].srcaddress)[n]) - { - dst[offset] = ((u8 *) &CodeList[i].dstaddress)[n]; - gprintf("WIP: %08X Address Patched.\n", CodeList[i].offset + n); - } - else - { - gprintf("WIP: %08X Address does not match with WIP entrie.\n", CodeList[i].offset + n); - gprintf("Destination: %02X | Should be: %02X.\n", dst[offset], ((u8 *) &CodeList[i].srcaddress)[n]); - } - } - } - ProcessedLength += len; - Counter++; -} - -//! for internal patches only -//! .wip files override internal patches -//! the codelist has to be freed if the set fails -//! if set was successful the codelist will be freed when it's done -extern "C" bool set_wip_list(WIP_Code * list, int size) -{ - if (!CodeList && size > 0) - { - CodeList = list; - CodesCount = size; - return true; - } - - return false; -} - -extern "C" void wip_reset_counter() -{ - ProcessedLength = 0; - //alternative dols don't need a skip. only main.dol. - Counter = 3; -} - -extern "C" void free_wip() -{ - if (CodeList) free(CodeList); - CodeList = NULL; - CodesCount = 0; - Counter = 0; - ProcessedLength = 0; -} - -extern "C" int load_wip_code(u8 *gameid) -{ - char filepath[150]; - char GameID[8]; - memset(GameID, 0, sizeof(GameID)); - memcpy(GameID, gameid, 6); - snprintf(filepath, sizeof(filepath), "%s%s.wip", Settings.WipCodepath, GameID); - - FILE * fp = fopen(filepath, "rb"); - if (!fp) - { - memset(GameID, 0, sizeof(GameID)); - memcpy(GameID, gameid, 4); - snprintf(filepath, sizeof(filepath), "%s%s.wip", Settings.WipCodepath, GameID); - fp = fopen(filepath, "rb"); - } - if (!fp) - { - memset(GameID, 0, sizeof(GameID)); - memcpy(GameID, gameid, 3); - snprintf(filepath, sizeof(filepath), "%s%s.wip", Settings.WipCodepath, GameID); - fp = fopen(filepath, "rb"); - } - - if (!fp) return -1; - - free_wip(); - - char line[255]; - gprintf("\nLoading WIP code from %s.\n", filepath); - - while (fgets(line, sizeof(line), fp)) - { - if (line[0] == '#') continue; - if (line[0] == ';') continue; - if (line[0] == ':') continue; - - if (strlen(line) < 26) continue; - - u32 offset = (u32) strtoul(line, NULL, 16); - u32 srcaddress = (u32) strtoul(line + 9, NULL, 16); - u32 dstaddress = (u32) strtoul(line + 18, NULL, 16); - - if (!CodeList) CodeList = (WIP_Code *) malloc(sizeof(WIP_Code)); - - WIP_Code * tmp = (WIP_Code *) realloc(CodeList, (CodesCount + 1) * sizeof(WIP_Code)); - if (!tmp) - { - fclose(fp); - free_wip(); - return -1; - } - - CodeList = tmp; - - CodeList[CodesCount].offset = offset; - CodeList[CodesCount].srcaddress = srcaddress; - CodeList[CodesCount].dstaddress = dstaddress; - CodesCount++; - } - fclose(fp); - gprintf("\n"); - - return 0; -} diff --git a/source/patches/wip.h b/source/patches/wip.h deleted file mode 100644 index 45336fde..00000000 --- a/source/patches/wip.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef __WIP_H__ -#define __WIP_H__ - -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - - typedef struct - { - u32 offset; - u32 srcaddress; - u32 dstaddress; - } WIP_Code; - - int load_wip_code(u8 *gameid); - void do_wip_code(u8 * dst, u32 len); - bool set_wip_list(WIP_Code * list, int size); - void wip_reset_counter(); - void free_wip(); - -#ifdef __cplusplus -} -#endif - -#endif //__WIP_H__ diff --git a/source/prompts/CheckboxPrompt.cpp b/source/prompts/CheckboxPrompt.cpp deleted file mode 100644 index dcc0107a..00000000 --- a/source/prompts/CheckboxPrompt.cpp +++ /dev/null @@ -1,213 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include -#include "CheckboxPrompt.hpp" -#include "themes/CTheme.h" -#include "menu/menus.h" -#include "language/gettext.h" - -CheckboxPrompt::CheckboxPrompt(const char * title, const char *msg) - : PromptWindow(title, msg) -{ - PromptWindow::AddButton(tr("OK")); - PromptWindow::AddButton(tr("Cancel")); -} - -CheckboxPrompt::~CheckboxPrompt() -{ - ResumeGui(); - - SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50); - while(parentElement && this->GetEffect() > 0) usleep(100); - - HaltGui(); - if(parentElement) - ((GuiWindow *) parentElement)->Remove(this); - parentElement = NULL; - - RemoveAll(); - - for(u32 i = 0; i < Checkbox.size(); ++i) - { - delete CheckboxTxt[i]; - delete Checkbox[i]; - } - -} - -void CheckboxPrompt::AddCheckBox(const char *text) -{ - int size = Checkbox.size(); - if(size > 5) - return; - - CheckboxTxt.resize(size+1); - Checkbox.resize(size+1); - - CheckboxTxt[size] = new GuiText(text, 20, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - CheckboxTxt[size]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - CheckboxTxt[size]->SetPosition(30, 0); - - Checkbox[size] = new GuiCheckbox(24, 24); - Checkbox[size]->SetLabel(CheckboxTxt[size]); - Checkbox[size]->SetSoundClick(btnSoundClick); - Checkbox[size]->SetSoundOver(btnSoundOver); - Checkbox[size]->SetTrigger(trigA); - Append(Checkbox[size]); - - if (Settings.wsprompt && Settings.widescreen) - { - if(size == 0) - { - Checkbox[size]->SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM); - Checkbox[size]->SetPosition(80, -190); - } - else if(size == 1) - { - Checkbox[size]->SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM); - Checkbox[size]->SetPosition(80, -150); - } - else if(size == 2) - { - Checkbox[size]->SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM); - Checkbox[size]->SetPosition(80, -110); - } - else if(size == 3) - { - Checkbox[size]->SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM); - Checkbox[size]->SetPosition(-210, -190); - } - else if(size == 4) - { - Checkbox[size]->SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM); - Checkbox[size]->SetPosition(-210, -150); - } - else if(size == 5) - { - Checkbox[size]->SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM); - Checkbox[size]->SetPosition(-210, -110); - } - } - else - { - if(size == 0) - { - Checkbox[size]->SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM); - Checkbox[size]->SetPosition(40, -190); - } - else if(size == 1) - { - Checkbox[size]->SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM); - Checkbox[size]->SetPosition(40, -150); - } - else if(size == 2) - { - Checkbox[size]->SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM); - Checkbox[size]->SetPosition(40, -110); - } - else if(size == 3) - { - Checkbox[size]->SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM); - Checkbox[size]->SetPosition(-210, -190); - } - else if(size == 4) - { - Checkbox[size]->SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM); - Checkbox[size]->SetPosition(-210, -150); - } - else if(size == 5) - { - Checkbox[size]->SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM); - Checkbox[size]->SetPosition(-210, -110); - } - } -} - -int CheckboxPrompt::GetChoice() -{ - int choice = PromptWindow::GetChoice(); - if(choice == 0) - return 0; - - else if(choice == 1) - { - int ret = 0; - - for(u32 i = 0; i < Checkbox.size(); ++i) - { - if(Checkbox[i]->IsChecked()) - { - ret ^= (int) pow(2, i); - } - } - - return ret; - } - - return -1; -} - - -int CheckboxPrompt::Show(const char *title, const char *msg, - const char *chbx1, const char *chbx2, - const char *chbx3, const char *chbx4, - const char *chbx5, const char *chbx6) -{ - CheckboxPrompt * Window = new CheckboxPrompt(title, msg); - if(chbx1) - Window->AddCheckBox(chbx1); - if(chbx2) - Window->AddCheckBox(chbx2); - if(chbx3) - Window->AddCheckBox(chbx3); - if(chbx4) - Window->AddCheckBox(chbx4); - if(chbx5) - Window->AddCheckBox(chbx5); - if(chbx6) - Window->AddCheckBox(chbx6); - - mainWindow->SetState(STATE_DISABLED); - mainWindow->Append(Window); - mainWindow->ChangeFocus(Window); - - int choice = -1; - - while (choice == -1) - { - usleep(100); - - if (shutdown) - Sys_Shutdown(); - if (reset) - Sys_Reboot(); - - choice = Window->GetChoice(); - } - - delete Window; - mainWindow->SetState(STATE_DEFAULT); - - return choice; -} diff --git a/source/prompts/CheckboxPrompt.hpp b/source/prompts/CheckboxPrompt.hpp deleted file mode 100644 index 55060f7c..00000000 --- a/source/prompts/CheckboxPrompt.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#ifndef _CHECKBOXPROMPT_HPP_ -#define _CHECKBOXPROMPT_HPP_ - -#include "libwiigui/gui_checkbox.hpp" -#include "PromptWindow.hpp" - -enum -{ - CheckedBox1 = 0x01, - CheckedBox2 = 0x02, - CheckedBox3 = 0x04, - CheckedBox4 = 0x08, - CheckedBox5 = 0x10, - CheckedBox6 = 0x20, -}; - -class CheckboxPrompt : private PromptWindow -{ - public: - //! Constructor - CheckboxPrompt(const char * title = 0, const char *msg = 0); - //! Destructor - ~CheckboxPrompt(); - //! Add new checkbox - void AddCheckBox(const char *text); - //! Default function to get the button pressed - int GetChoice(); - //! Show window and wait for the user to press OK/Cancel - static int Show(const char *title = 0, const char *msg = 0, - const char *chbx1 = 0, const char *chbx2 = 0, - const char *chbx3 = 0, const char *chbx4 = 0, - const char *chbx5 = 0, const char *chbx6 = 0); - protected: - std::vector CheckboxTxt; - std::vector Checkbox; -}; - -#define CheckboxWindow CheckboxPrompt::Show - -#endif diff --git a/source/prompts/DiscBrowser.cpp b/source/prompts/DiscBrowser.cpp deleted file mode 100644 index 548b3d04..00000000 --- a/source/prompts/DiscBrowser.cpp +++ /dev/null @@ -1,217 +0,0 @@ -/**************************************************************************** - * DiscBrowser - * USB Loader GX 2009 - * - * DiscBrowser.h - ***************************************************************************/ -#include -#include "language/gettext.h" -#include "libwiigui/gui.h" -#include "libwiigui/gui_customoptionbrowser.h" -#include "prompts/PromptWindows.h" -#include "menu/menus.h" -#include "usbloader/disc.h" -#include "usbloader/fstfile.h" -#include "usbloader/wdvd.h" -#include "usbloader/wbfs.h" -#include "patches/dvd_broadway.h" -#include "libs/libwbfs/libwbfs.h" -#include "libs/libwbfs/wiidisc.h" -#include "main.h" -#include "sys.h" -#include "settings/GameTitles.h" -#include "themes/CTheme.h" -#include "memory/memory.h" -#include "gecko.h" - -/******************************************************************************** - *Disk Browser - *********************************************************************************/ -int DiscBrowse(const char * GameID, char * alternatedname, int alternatedname_size) -{ - gprintf("\nDiscBrowser() started"); - bool exit = false; - int ret = -1, choice; - - HaltGui(); - - gprintf("WBFS_OpenDisc\n"); - wbfs_disc_t *disc = WBFS_OpenDisc((u8 *) GameID); - if (!disc) - { - ResumeGui(); - WindowPrompt(tr( "ERROR:" ), tr( "Could not open Disc" ), tr( "OK" )); - return ret; - } - gprintf("wd_open_disc\n"); - wiidisc_t *wdisc = wd_open_disc((int(*)(void *, u32, u32, void *)) wbfs_disc_read, disc); - if (!wdisc) - { - ResumeGui(); - WindowPrompt(tr( "ERROR:" ), tr( "Could not open Disc" ), tr( "OK" )); - return ret; - } - - gprintf("wd_get_fst\n"); - FST_ENTRY * fstbuffer = (FST_ENTRY *) wd_get_fst(wdisc, ONLY_GAME_PARTITION); - if (!fstbuffer) - { - ResumeGui(); - WindowPrompt(tr( "ERROR:" ), tr( "Not enough free memory." ), tr( "OK" )); - return -1; - } - - gprintf("wd_close_disc\n"); - wd_close_disc(wdisc); - gprintf("WBFS_CloseDisc\n"); - WBFS_CloseDisc(disc); - - gprintf("options\n"); - OptionList options; - - for (u32 i = 0, position = 0; i < fstbuffer[0].filelen; i++) - { - //don't add files that aren't .dol to the list - const char * filename = fstfiles(fstbuffer, i); - const char * fileext = NULL; - - if(filename) - fileext = strrchr(filename, '.'); - - if (fileext && strcasecmp(fileext, ".dol") == 0) - { - options.SetName(position, "%s %03i", tr("Offset"), i); - options.SetValue(position, filename); - position++; - } - } - - free(fstbuffer); - - gprintf("\n%i alt dols found", options.GetLength()+1); - if (options.GetLength() <= 0) - { - WindowPrompt(tr( "ERROR" ), tr( "No DOL file found on disc." ), tr( "OK" )); - return ret; - } - - GuiImageData btnOutline(Resources::GetFile("button_dialogue_box.png"), Resources::GetFileSize("button_dialogue_box.png")); - GuiImageData settingsbg(Resources::GetFile("settings_background.png"), Resources::GetFileSize("settings_background.png")); - - GuiTrigger trigA; - trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - GuiTrigger trigHome; - trigHome.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0); - GuiTrigger trigB; - trigB.SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B); - - GuiText titleTxt(GameTitles.GetTitle(GameID), 28, ( GXColor ) {0, 0, 0, 255}); - titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - titleTxt.SetPosition(12, 40); - titleTxt.SetMaxWidth(356, SCROLL_HORIZONTAL); - - GuiImage settingsbackground(&settingsbg); - GuiButton settingsbackgroundbtn(settingsbackground.GetWidth(), settingsbackground.GetHeight()); - settingsbackgroundbtn.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - settingsbackgroundbtn.SetPosition(0, 0); - settingsbackgroundbtn.SetImage(&settingsbackground); - - GuiText cancelBtnTxt(tr( "Back" ), 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - cancelBtnTxt.SetMaxWidth(btnOutline.GetWidth() - 30); - GuiImage cancelBtnImg(&btnOutline); - if (Settings.wsprompt == ON) - { - cancelBtnTxt.SetWidescreen(Settings.widescreen); - cancelBtnImg.SetWidescreen(Settings.widescreen); - } - GuiButton cancelBtn(&cancelBtnImg, &cancelBtnImg, 2, 3, 180, 400, &trigA, btnSoundOver, btnSoundClick2, 1); - cancelBtn.SetScale(0.9); - cancelBtn.SetLabel(&cancelBtnTxt); - cancelBtn.SetTrigger(&trigB); - - GuiCustomOptionBrowser optionBrowser3(396, 280, &options, "bg_options_settings.png"); - optionBrowser3.SetPosition(0, 90); - optionBrowser3.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - - HaltGui(); - GuiWindow w(screenwidth, screenheight); - w.Append(&settingsbackgroundbtn); - w.Append(&titleTxt); - w.Append(&cancelBtn); - w.Append(&optionBrowser3); - - mainWindow->Append(&w); - - ResumeGui(); - while (!exit) - { - usleep(100); - - if (shutdown) - Sys_Shutdown(); - if (reset) - Sys_Reboot(); - - ret = optionBrowser3.GetClickedOption(); - - if (ret >= 0) - { - choice = WindowPrompt(options.GetValue(ret), tr( "Load this DOL as alternate DOL?" ), tr( "OK" ), tr( "Cancel" )); - if (choice) - { - snprintf(alternatedname, alternatedname_size, options.GetValue(ret)); - const char * offset = options.GetName(ret); - if(offset) - ret = atoi(offset+strlen("Offset ")); //doloffset - else - ret = -1; // weird problem - exit = true; - } - } - - if (cancelBtn.GetState() == STATE_CLICKED) - { - exit = true; - } - } - - HaltGui(); - mainWindow->Remove(&w); - ResumeGui(); - - return ret; -} - -/******************************************************************************** - * Mount a DVD, get the type and ID. - *********************************************************************************/ -u8 DiscMount(struct discHdr * header) -{ - gprintf("\nDiscMount() "); - u8 * g_diskID = (u8 *) 0x80000000; - int ret; - HaltGui(); - - u8 tmpBuff[0x60]; - memcpy(tmpBuff, g_diskID, 0x60); // Make a backup of the first 96 bytes at 0x80000000 - - Disc_SetUSB(NULL); - ret = WDVD_Reset(); - if(ret < 0) - return 0; - - ret = WDVD_ReadDiskId(g_diskID); - if(ret < 0) - return 0; - - ret = WDVD_UnencryptedRead(g_diskID, 0x60, 0x00); - if(ret < 0) - return 0; - - memcpy(header, g_diskID, 0x60); - memcpy(g_diskID, tmpBuff, 0x60); // Put the backup back, or games won't load - - ResumeGui(); - - return (header->magic == 0x5D1C9EA3) ? 1 : 2; // Don't check gamecube magic (0xC2339F3D) -} diff --git a/source/prompts/DiscBrowser.h b/source/prompts/DiscBrowser.h deleted file mode 100644 index 2d613385..00000000 --- a/source/prompts/DiscBrowser.h +++ /dev/null @@ -1,17 +0,0 @@ -/**************************************************************************** - * DiscBrowser - * USB Loader GX 2009 - * - * DiscBrowser.h - ***************************************************************************/ - -#ifndef _DISCBROWSER_H_ -#define _DISCBROWSER_H_ - -#include -#include "usbloader/disc.h" - -int DiscBrowse(const char * GameID, char * dolname, int dolname_size); -u8 DiscMount(struct discHdr * header); - -#endif diff --git a/source/prompts/GameWindow.cpp b/source/prompts/GameWindow.cpp deleted file mode 100644 index 911cdf9c..00000000 --- a/source/prompts/GameWindow.cpp +++ /dev/null @@ -1,596 +0,0 @@ -#include -#include "GameWindow.hpp" -#include "usbloader/disc.h" -#include "usbloader/wbfs.h" -#include "usbloader/GameList.h" -#include "themes/CTheme.h" -#include "settings/CSettings.h" -#include "settings/CGameSettings.h" -#include "settings/CGameStatistics.h" -#include "settings/GameTitles.h" -#include "settings/Settings.h" -#include "prompts/PromptWindows.h" -#include "language/gettext.h" -#include "menu/menus.h" -#include "banner/OpeningBNR.hpp" - -#define NONE 0 -#define LEFT 1 -#define RIGHT 2 -#define IN 3 -#define OUT 4 - -extern int mountMethod; -extern struct discHdr *dvdheader; - -GameWindow::GameWindow(int Selected) - : GuiWindow(472, 320) -{ - returnVal = -1; - gameSelected = Selected; - gameSound = NULL; - diskImgData = NULL; - diskImgData2 = NULL; - reducedVol = false; - SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - SetPosition(0, -10); - - dialogBox = Resources::GetImageData(Settings.widescreen ? "wdialogue_box_startgame.png" : "dialogue_box_startgame.png"); - btnOutline = Resources::GetImageData("button_dialogue_box.png"); - imgFavorite = Resources::GetImageData("favorite.png"); - imgNotFavorite = Resources::GetImageData("not_favorite.png"); - imgLeft = Resources::GetImageData("startgame_arrow_left.png"); - imgRight = Resources::GetImageData("startgame_arrow_right.png"); - - trigA = new GuiTrigger; - trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - trigB = new GuiTrigger; - trigB->SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B); - trigL = new GuiTrigger; - trigL->SetButtonOnlyTrigger(-1, WPAD_BUTTON_LEFT | WPAD_CLASSIC_BUTTON_LEFT, PAD_BUTTON_LEFT); - trigR = new GuiTrigger; - trigR->SetButtonOnlyTrigger(-1, WPAD_BUTTON_RIGHT | WPAD_CLASSIC_BUTTON_RIGHT, PAD_BUTTON_RIGHT); - trigPlus = new GuiTrigger; - trigPlus->SetButtonOnlyTrigger(-1, WPAD_BUTTON_PLUS | WPAD_CLASSIC_BUTTON_PLUS, 0); - trigMinus = new GuiTrigger; - trigMinus->SetButtonOnlyTrigger(-1, WPAD_BUTTON_MINUS | WPAD_CLASSIC_BUTTON_MINUS, 0); - - dialogBoxImg = new GuiImage(dialogBox); - - nameBtnTT = new GuiTooltip(tr( "Rename Game on WBFS" )); - if (Settings.wsprompt) nameBtnTT->SetWidescreen(Settings.widescreen); - nameTxt = new GuiText("", 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - if (Settings.wsprompt) nameTxt->SetWidescreen(Settings.widescreen); - nameTxt->SetMaxWidth(350, SCROLL_HORIZONTAL); - nameBtn = new GuiButton(120, 50); - nameBtn->SetLabel(nameTxt); - nameBtn->SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - nameBtn->SetPosition(0, -122); - nameBtn->SetSoundOver(btnSoundOver); - nameBtn->SetSoundClick(btnSoundClick2); - if (!mountMethod) nameBtn->SetToolTip(nameBtnTT, 24, -30, ALIGN_LEFT); - - if (Settings.godmode == 1 && !mountMethod) - { - nameBtn->SetTrigger(trigA); - nameBtn->SetEffectGrow(); - } - - sizeTxt = new GuiText((char*) NULL, 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - sizeTxt->SetAlignment(ALIGN_RIGHT, ALIGN_TOP); - sizeTxt->SetPosition(-60, 70); - - diskImg = new GuiDiskCover; - diskImg->SetWidescreen(Settings.widescreen); - diskImg->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - diskImg->SetAngle(0); - diskImg2 = new GuiDiskCover; - diskImg2->SetWidescreen(Settings.widescreen); - diskImg2->SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - diskImg2->SetPosition(0, -20); - diskImg2->SetAngle(0); - diskImg2->SetBeta(180); - - playcntTxt = new GuiText((char*) NULL, 18, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - playcntTxt->SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - playcntTxt->SetPosition(-115, 45); - - gameBtn = new GuiButton(160, 160); - gameBtn->SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - gameBtn->SetPosition(0, -20); - gameBtn->SetImage(diskImg); - gameBtn->SetSoundOver(btnSoundOver); - gameBtn->SetSoundClick(btnSoundClick2); - gameBtn->SetTrigger(trigA); - gameBtn->SetState(STATE_SELECTED); - - backBtnTxt = new GuiText(tr( "Back" ), 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - backBtnImg = new GuiImage(btnOutline); - if (Settings.wsprompt) - { - backBtnTxt->SetWidescreen(Settings.widescreen); - backBtnImg->SetWidescreen(Settings.widescreen); - } - backBtn = new GuiButton(backBtnImg, backBtnImg, 1, 5, 0, 0, trigA, btnSoundOver, btnSoundClick2, 1); - backBtn->SetLabel(backBtnTxt); - backBtn->SetTrigger(trigB); - backBtn->SetAlignment(ALIGN_CENTRE, ALIGN_BOTTOM); - backBtn->SetPosition(0, -40); - - settingsBtnTxt = new GuiText(tr( "Settings" ), 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - settingsBtnImg = new GuiImage(btnOutline); - if (Settings.wsprompt) - { - settingsBtnTxt->SetWidescreen(Settings.widescreen); - settingsBtnImg->SetWidescreen(Settings.widescreen); - } - settingsBtn = new GuiButton(settingsBtnImg, settingsBtnImg, 0, 4, 50, -40, trigA, btnSoundOver, btnSoundClick2, 1); - settingsBtn->SetLabel(settingsBtnTxt); - - int xPos = -198; - for(int i = 0; i < FAVORITE_STARS; ++i) - { - FavoriteBtnImg[i] = new GuiImage; - FavoriteBtnImg[i]->SetWidescreen(Settings.widescreen); - FavoriteBtn[i] = new GuiButton(imgFavorite->GetWidth(), imgFavorite->GetHeight()); - FavoriteBtn[i]->SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - FavoriteBtn[i]->SetPosition(xPos, -60); - FavoriteBtn[i]->SetImage(FavoriteBtnImg[i]); - FavoriteBtn[i]->SetSoundOver(btnSoundOver); - FavoriteBtn[i]->SetSoundClick(btnSoundClick2); - FavoriteBtn[i]->SetTrigger(trigA); - FavoriteBtn[i]->SetEffectGrow(); - - xPos += 27; - } - - btnLeftImg = new GuiImage(imgLeft); - if (Settings.wsprompt) btnLeftImg->SetWidescreen(Settings.widescreen); - btnLeft = new GuiButton(btnLeftImg, btnLeftImg, 0, 5, 20, 0, trigA, btnSoundOver, btnSoundClick2, 1); - btnLeft->SetTrigger(trigL); - btnLeft->SetTrigger(trigMinus); - - btnRightImg = new GuiImage(imgRight); - if (Settings.wsprompt) btnRightImg->SetWidescreen(Settings.widescreen); - btnRight = new GuiButton(btnRightImg, btnRightImg, 1, 5, -20, 0, trigA, btnSoundOver, btnSoundClick2, 1); - btnRight->SetTrigger(trigR); - btnRight->SetTrigger(trigPlus); - - Append(dialogBoxImg); - Append(playcntTxt); - Append(backBtn); - if (!mountMethod)//stuff we don't show if it is a DVD mounted - { - Append(nameBtn); - Append(sizeTxt); - Append(btnLeft); - Append(btnRight); - for(int i = 0; i < FAVORITE_STARS; ++i) - Append(FavoriteBtn[i]); - } - //check if unlocked - if (mountMethod != 2 && (Settings.godmode || !(Settings.ParentalBlocks & BLOCK_GAME_INSTALL))) - { - backBtn->SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM); - backBtn->SetPosition(-50, -40); - Append(settingsBtn); - } - - Append(diskImg2); - Append(gameBtn); //! Appending the disc on top of all - - ChangeGame(NONE); - diskImg->SetImage(diskImgData); - - SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 50); -} - -GameWindow::~GameWindow() -{ - StopEffect(); - SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50); - ResumeGui(); - - while(parentElement && this->GetEffect() > 0) usleep(100); - - HaltGui(); - - if(parentElement) - ((GuiWindow * ) parentElement)->Remove(this); - - RemoveAll(); - - delete trigA; - delete trigB; - delete trigL; - delete trigR; - delete trigPlus; - delete trigMinus; - - delete diskImgData; - delete diskImgData2; - delete dialogBox; - delete btnOutline; - delete imgFavorite; - delete imgNotFavorite; - delete imgLeft; - delete imgRight; - - delete diskImg; - delete diskImg2; - - delete dialogBoxImg; - delete backBtnImg; - delete settingsBtnImg; - delete btnLeftImg; - delete btnRightImg; - - delete nameBtnTT; - - delete sizeTxt; - delete playcntTxt; - delete nameTxt; - delete backBtnTxt; - delete settingsBtnTxt; - - delete nameBtn; - delete gameBtn; - delete backBtn; - delete settingsBtn; - delete btnLeft; - delete btnRight; - - for(int i = 0; i < FAVORITE_STARS; ++i) - { - delete FavoriteBtnImg[i]; - delete FavoriteBtn[i]; - } - - if(gameSound) gameSound->Stop(); - delete gameSound; - bgMusic->SetVolume(Settings.volume); - - ResumeGui(); -} - -void GameWindow::LoadGameSound(const u8 * id) -{ - if (Settings.gamesoundvolume == 0) - return; - - if (gameSound) - { - gameSound->Stop(); - delete gameSound; - gameSound = NULL; - } - - u32 gameSoundDataLen; - const u8 *gameSoundData = BNRInstance::Instance()->GetBannerSound(id, &gameSoundDataLen); - if (gameSoundData) - { - gameSound = new GuiSound(gameSoundData, gameSoundDataLen, Settings.gamesoundvolume, true); - bgMusic->SetVolume(0); - reducedVol = true; - if (Settings.gamesound == 2) - gameSound->SetLoop(1); - gameSound->Play(); - } -} - -void GameWindow::LoadDiscImage(const u8 * id) -{ - HaltGui(); - delete diskImgData2; - diskImgData2 = diskImgData; - diskImgData = NULL; - - char imgPath[150]; - char IDFull[7]; - char ID3[4]; - char ID4[5]; - snprintf(IDFull, sizeof(IDFull), "%s", (char*) id); - snprintf(ID3, sizeof(ID3), "%s", IDFull); - snprintf(ID4, sizeof(ID4), "%s", IDFull); - - snprintf(imgPath, sizeof(imgPath), "%s%s.png", Settings.disc_path, IDFull); //changed to current full id - diskImgData = new GuiImageData(imgPath); - - if (!diskImgData->GetImage()) - { - delete diskImgData; - snprintf(imgPath, sizeof(imgPath), "%s%s.png", Settings.disc_path, ID3); //changed to current id - diskImgData = new GuiImageData(imgPath); - } - if (!diskImgData->GetImage()) - { - delete diskImgData; - snprintf(imgPath, sizeof(imgPath), "%s%s.png", Settings.disc_path, ID4); //changed to current id - diskImgData = new GuiImageData(imgPath); - } - if (!diskImgData->GetImage()) - { - delete diskImgData; - diskImgData = Resources::GetImageData("nodisc.png"); - } -} - -void GameWindow::SetWindowEffect(int direction, int in_out) -{ - if(direction == LEFT && Settings.xflip == XFLIP_DISK3D) - { - if(in_out == IN) - { - diskImg->SetImage(diskImgData); - diskImg->SetBeta(90); - diskImg->SetBetaRotateEffect(-90, 15); - diskImg2->SetImage(diskImgData2); - diskImg2->SetBeta(270); - diskImg2->SetBetaRotateEffect(-90, 15); - sizeTxt->SetEffect(EFFECT_FADE, 17); - nameTxt->SetEffect(EFFECT_FADE, 17); - } - else - { - diskImg->SetImage(diskImgData2); - diskImg->SetBeta(0); - diskImg->SetBetaRotateEffect(90, 15); - diskImg2->SetImage(diskImgData); - diskImg2->SetAngle(diskImg->GetAngle()); - diskImg2->SetBeta(180); - diskImg2->SetBetaRotateEffect(90, 15); - sizeTxt->SetEffect(EFFECT_FADE, -17); - nameTxt->SetEffect(EFFECT_FADE, -17); - } - } - else if(direction == RIGHT && Settings.xflip == XFLIP_DISK3D) - { - if(in_out == IN) - { - diskImg->SetImage(diskImgData); - diskImg->SetBeta(270); - diskImg->SetBetaRotateEffect(90, 15); - diskImg2->SetImage(diskImgData2); - diskImg2->SetBeta(90); - diskImg2->SetBetaRotateEffect(90, 15); - sizeTxt->SetEffect(EFFECT_FADE, 17); - nameTxt->SetEffect(EFFECT_FADE, 17); - - } - else - { - diskImg->SetImage(diskImgData2); - diskImg->SetBeta(0); - diskImg->SetBetaRotateEffect(-90, 15); - diskImg2->SetImage(diskImgData); - diskImg2->SetAngle(diskImg->GetAngle()); - diskImg2->SetBeta(180); - diskImg2->SetBetaRotateEffect(-90, 15); - sizeTxt->SetEffect(EFFECT_FADE, -17); - nameTxt->SetEffect(EFFECT_FADE, -17); - } - } - else if(direction == LEFT) - { - if(in_out == IN) - SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 50); - else - SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 50); - } - else if(direction == RIGHT) - { - if(in_out == IN) - SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_IN, 50); - else - SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 50); - } - - ResumeGui(); - while(parentElement && (this->GetEffect() > 0 || - nameTxt->GetEffect() > 0 || diskImg->GetBetaRotateEffect())) - { - usleep(100); - } -} - -void GameWindow::ChangeGame(int EffectDirection) -{ - struct discHdr * header = (mountMethod ? dvdheader : gameList[gameSelected]); - LoadGameSound(header->id); - LoadDiscImage(header->id); - SetWindowEffect(EffectDirection, OUT); - - HaltGui(); - - if (!mountMethod) - { - float size = 0.0f; - WBFS_GameSize(header->id, &size); - sizeTxt->SetTextf("%.2fGB", size); //set size text; - } - - diskImg->SetImage(diskImgData); - nameTxt->SetText(GameTitles.GetTitle(header)); - playcntTxt->SetTextf("%s: %i", tr( "Play Count" ), GameStatistics.GetPlayCount(header)); - - int favoritevar = GameStatistics.GetFavoriteRank(header->id); - for(int i = 0; i < FAVORITE_STARS; ++i) - FavoriteBtnImg[i]->SetImage(favoritevar >= i+1 ? imgFavorite : imgNotFavorite); - - EffectDirection = EffectDirection == LEFT ? RIGHT : EffectDirection == RIGHT ? LEFT : NONE; - SetWindowEffect(EffectDirection, IN); -} - -int GameWindow::Show() -{ - int choice = -1; - - while(choice == -1) - { - VIDEO_WaitVSync(); - - choice = MainLoop(); - } - - return choice; -} - -int GameWindow::MainLoop() -{ - diskImg->SetSpin(gameBtn->GetState() == STATE_SELECTED); - diskImg2->SetSpin(gameBtn->GetState() == STATE_SELECTED); - - if (shutdown) //for power button - { - wiilight(0); - Sys_Shutdown(); - } - else if (reset == 1) //for reset button - { - wiilight(0); - Sys_Reboot(); - } - else if (gameBtn->GetState() == STATE_CLICKED) - { - returnVal = 1; - } - else if (backBtn->GetState() == STATE_CLICKED) //back - { - mainWindow->SetState(STATE_DEFAULT); - wiilight(0); - returnVal = 0; - } - - else if(settingsBtn->GetState() == STATE_CLICKED) //settings - { - settingsBtn->ResetState(); - SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50); - while(parentElement && this->GetEffect() > 0) usleep(100); - HaltGui(); - if(parentElement) ((GuiWindow *) parentElement)->Remove(this); - ResumeGui(); - - wiilight(0); - int settret = MenuGameSettings(mountMethod ? dvdheader : gameList[gameSelected]); - - SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 50); - if(parentElement) - { - ((GuiWindow *) parentElement)->SetState(STATE_DISABLED); - ((GuiWindow *) parentElement)->Append(this); - } - - if (settret == MENU_DISCLIST) - returnVal = 2; - else - SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 50); - - } - else if (nameBtn->GetState() == STATE_CLICKED) //rename - { - nameBtn->ResetState(); - SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50); - while(parentElement && this->GetEffect() > 0) usleep(100); - HaltGui(); - if(parentElement) ((GuiWindow *) parentElement)->Remove(this); - ResumeGui(); - wiilight(0); - //re-evaluate header now in case they changed games while on the game prompt - struct discHdr *header = gameList[gameSelected]; - - //enter new game title - char entered[60]; - snprintf(entered, sizeof(entered), "%s", GameTitles.GetTitle(header)); - int result = OnScreenKeyboard(entered, 60, 0); - if (result == 1) - { - WBFS_RenameGame(header->id, entered); - wString oldFilter(gameList.GetCurrentFilter()); - gameList.ReadGameList(); - gameList.FilterList(oldFilter.c_str()); - } - SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 50); - if(parentElement) - { - ((GuiWindow *) parentElement)->SetState(STATE_DISABLED); - ((GuiWindow *) parentElement)->Append(this); - } - } - - else if (btnRight->GetState() == STATE_CLICKED) //next game - { - if(Settings.xflip == XFLIP_YES) - { - gameSelected = (gameSelected - 1 + gameList.size()) % gameList.size(); - ChangeGame(LEFT); - } - else if(Settings.xflip == XFLIP_SYSMENU) - { - gameSelected = (gameSelected + 1) % gameList.size(); - ChangeGame(LEFT); - } - else - { - gameSelected = (gameSelected + 1) % gameList.size(); - ChangeGame(RIGHT); - } - - btnRight->ResetState(); - } - - else if (btnLeft->GetState() == STATE_CLICKED) //previous game - { - if(Settings.xflip == XFLIP_YES) - { - gameSelected = (gameSelected + 1) % gameList.size(); - ChangeGame(RIGHT); - } - else if(Settings.xflip == XFLIP_SYSMENU) - { - gameSelected = (gameSelected - 1 + gameList.size()) % gameList.size(); - ChangeGame(RIGHT); - } - else - { - gameSelected = (gameSelected - 1 + gameList.size()) % gameList.size(); - ChangeGame(LEFT); - } - - btnLeft->ResetState(); - } - - if (reducedVol) - { - if (gameSound) - { - if (Settings.gamesound == 1 && !gameSound->IsPlaying()) - { - bgMusic->SetVolume(Settings.volume); - reducedVol = false; - } - } - else - { - bgMusic->SetVolume(Settings.volume); - reducedVol = false; - } - } - - for(int i = 0; i < FAVORITE_STARS; ++i) - { - if(FavoriteBtn[i]->GetState() == STATE_CLICKED) - { - struct discHdr * header = (mountMethod ? dvdheader : gameList[gameSelected]); - int FavoriteRank = (i+1 == GameStatistics.GetFavoriteRank(header->id)) ? 0 : i+1; // Press the current rank to reset the rank - - GameStatistics.SetFavoriteRank(header->id, FavoriteRank); - GameStatistics.Save(); - for(int j = 0; j < FAVORITE_STARS; ++j) - FavoriteBtnImg[j]->SetImage(FavoriteRank >= j+1 ? imgFavorite : imgNotFavorite); - - FavoriteBtn[i]->ResetState(); - } - } - - return returnVal; -} diff --git a/source/prompts/GameWindow.hpp b/source/prompts/GameWindow.hpp deleted file mode 100644 index a7051e6b..00000000 --- a/source/prompts/GameWindow.hpp +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef GAMEWINDOW_HPP_ -#define GAMEWINDOW_HPP_ - -#include "libwiigui/gui.h" -#include "libwiigui/gui_diskcover.h" - -#define FAVORITE_STARS 5 - -class GameWindow : public GuiWindow -{ - public: - GameWindow(int GameSelected); - ~GameWindow(); - int Show(); - int GetSelectedGame() { return gameSelected; }; - protected: - int MainLoop(); - void LoadGameSound(const u8 * id); - void LoadDiscImage(const u8 * id); - void SetWindowEffect(int direction, int in_out); - void ChangeGame(int EffectDirection); - - bool reducedVol; - int returnVal; - int gameSelected; - - GuiTrigger * trigA; - GuiTrigger * trigB; - GuiTrigger * trigL; - GuiTrigger * trigR; - GuiTrigger * trigPlus; - GuiTrigger * trigMinus; - - GuiImageData * diskImgData; - GuiImageData * diskImgData2; - GuiImageData * dialogBox; - GuiImageData * btnOutline; - GuiImageData * imgFavorite; - GuiImageData * imgNotFavorite; - GuiImageData * imgLeft; - GuiImageData * imgRight; - - GuiDiskCover * diskImg; - GuiDiskCover * diskImg2; - - GuiImage * dialogBoxImg; - GuiImage * backBtnImg; - GuiImage * settingsBtnImg; - GuiImage * btnLeftImg; - GuiImage * btnRightImg; - GuiImage * FavoriteBtnImg[FAVORITE_STARS]; - - GuiTooltip * nameBtnTT; - - GuiText * sizeTxt; - GuiText * playcntTxt; - GuiText * nameTxt; - GuiText * backBtnTxt; - GuiText * settingsBtnTxt; - - GuiButton * nameBtn; - GuiButton * gameBtn; - GuiButton * backBtn; - GuiButton * settingsBtn; - GuiButton * btnLeft; - GuiButton * btnRight; - GuiButton * FavoriteBtn[FAVORITE_STARS]; - - GuiSound * gameSound; -}; - -#endif diff --git a/source/prompts/ProgressWindow.cpp b/source/prompts/ProgressWindow.cpp deleted file mode 100644 index 2483c30e..00000000 --- a/source/prompts/ProgressWindow.cpp +++ /dev/null @@ -1,423 +0,0 @@ -/**************************************************************************** - * ProgressWindow - * USB Loader GX 2009 - * - * ProgressWindow.cpp - ***************************************************************************/ -#include -#include -#include -#include -#include -#include - -#include "menu/menus.h" -#include "sys.h" -#include "language/gettext.h" -#include "libwiigui/gui.h" -#include "prompts/ProgressWindow.h" -#include "usbloader/wbfs.h" -#include "usbloader/utils.h" -#include "themes/CTheme.h" -#include "utils/timer.h" - -/*** Variables used only in this file ***/ -static lwp_t progressthread = LWP_THREAD_NULL; -static mutex_t ProgressMutex = LWP_MUTEX_NULL; -static ProgressAbortCallback AbortCallback = NULL; -static const char * progressTitle = NULL; -static const char * progressMsg1 = NULL; -static const char * progressMsg2 = NULL; -static Timer ProgressTimer; -static int showProgress = 0; -static s64 progressDone = -1; -static s64 progressTotal = -1; -static bool showTime = false; -static bool showSize = false; -static bool changed = true; -static bool changedMessages = true; - -/**************************************************************************** - * StartProgress - ***************************************************************************/ -extern "C" void StartProgress(const char * title, const char * msg1, const char * msg2, bool swSize, bool swTime) -{ - progressTitle = title; - progressMsg1 = msg1; - progressMsg2 = msg2; - showSize = swSize; - showTime = swTime; - showProgress = 1; - ProgressTimer.reset(); - - LWP_ResumeThread(progressthread); -} - -/**************************************************************************** - * ShowProgress - * - * Callbackfunction for updating the progress values - * Use this function as standard callback - ***************************************************************************/ -extern "C" void ShowProgress(s64 done, s64 total) -{ - LWP_MutexLock(ProgressMutex); - progressDone = done; - progressTotal = total; - if(!done) - { - ProgressTimer.reset(); - LWP_ResumeThread(progressthread); - showProgress = 1; - } - changed = true; - LWP_MutexUnlock(ProgressMutex); -} - -void ShowProgress(const char *title, const char *msg1, const char *msg2, s64 done, s64 total, bool swSize, bool swTime) -{ - if (total <= 0) - return; - - else if (done > total) - done = total; - - LWP_MutexLock(ProgressMutex); - - progressDone = done; - progressTotal = total; - - progressTitle = title; - progressMsg1 = msg1; - progressMsg2 = msg2; - - showSize = swSize; - showTime = swTime; - - if(!done) - { - ProgressTimer.reset(); - LWP_ResumeThread(progressthread); - showProgress = 1; - } - - changedMessages = true; - changed = true; - - LWP_MutexUnlock(ProgressMutex); -} - -/**************************************************************************** - * ProgressStop - ***************************************************************************/ -extern "C" void ProgressStop() -{ - showProgress = 0; - progressTitle = NULL; - progressMsg1 = NULL; - progressMsg2 = NULL; - progressDone = -1; - progressTotal = -1; - showTime = false; - showSize = false; - - // wait for thread to finish - while (!LWP_ThreadIsSuspended(progressthread)) - usleep(100); -} - -/**************************************************************************** - * ProgressSetAbortCallback - * - * Set a callback for the cancel button - ***************************************************************************/ -extern "C" void ProgressSetAbortCallback(ProgressAbortCallback callback) -{ - AbortCallback = callback; -} - -/**************************************************************************** - * UpdateProgressValues - ***************************************************************************/ -static void UpdateProgressValues(GuiImage *progressbarImg, GuiText *prTxt, GuiText *timeTxt, GuiText *speedTxt, GuiText *sizeTxt) -{ - if(!changed) - return; - - extern u64 gamesize; - - LWP_MutexLock(ProgressMutex); - changed = false; - changedMessages = false; - s64 done = progressDone; - s64 total = progressTotal; - u32 speed = 0; - - if(gamesize > 0) - { - done = (s64) ((double) done / (double) total * (double) gamesize); - total = (s64) gamesize; - } - - //Calculate speed in KB/s - if (ProgressTimer.elapsed() > 0.0f) - speed = (u32) (done/ProgressTimer.elapsed()); - - LWP_MutexUnlock(ProgressMutex); - - u32 TimeLeft = 0, h = 0, m = 0, s = 0; - if(speed > 0) - TimeLeft = (total-done)/speed; - - if(TimeLeft > 0) - { - h = TimeLeft / 3600; - m = (TimeLeft / 60) % 60; - s = TimeLeft % 60; - } - - float progressPercent = 100.0 * done / total; - - prTxt->SetTextf("%.2f", progressPercent); - - if (Settings.widescreen && Settings.wsprompt) - progressbarImg->SetSkew(0, 0, static_cast (progressbarImg->GetWidth() * progressPercent * 0.8) - - progressbarImg->GetWidth(), 0, static_cast (progressbarImg->GetWidth() * progressPercent - * 0.8) - progressbarImg->GetWidth(), 0, 0, 0); - else - progressbarImg->SetSkew(0, 0, static_cast (progressbarImg->GetWidth() * progressPercent) - - progressbarImg->GetWidth(), 0, static_cast (progressbarImg->GetWidth() * progressPercent) - - progressbarImg->GetWidth(), 0, 0, 0); - - if (showTime == true) - { - timeTxt->SetTextf("%s %d:%02d:%02d", tr( "Time left:" ), h, m, s); - } - - if (showSize == true) - { - if (total < MB_SIZE) - sizeTxt->SetTextf("%0.2fKB/%0.2fKB", done / KB_SIZE, total / KB_SIZE); - else if (total > MB_SIZE && total < GB_SIZE) - sizeTxt->SetTextf("%0.2fMB/%0.2fMB", done / MB_SIZE, total / MB_SIZE); - else - sizeTxt->SetTextf("%0.2fGB/%0.2fGB", done / GB_SIZE, total / GB_SIZE); - - speedTxt->SetTextf("%dKB/s", (int) (speed/KB_SIZE)); - } -} - -/**************************************************************************** - * ProgressWindow - * - * Opens a window, which displays progress to the user. Can either display a - * progress bar showing % completion, or a throbber that only shows that an - * action is in progress. - ***************************************************************************/ -static void ProgressWindow(const char *title, const char *msg1, const char *msg2) -{ - GuiWindow promptWindow(472, 320); - promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - promptWindow.SetPosition(0, -10); - - GuiImageData btnOutline(Resources::GetFile("button_dialogue_box.png"), Resources::GetFileSize("button_dialogue_box.png")); - GuiImageData dialogBox(Resources::GetFile("dialogue_box.png"), Resources::GetFileSize("dialogue_box.png")); - - GuiTrigger trigA; - trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - - GuiImage dialogBoxImg(&dialogBox); - if (Settings.wsprompt) - { - dialogBoxImg.SetWidescreen(Settings.widescreen); - } - - GuiImageData progressbarOutline(Resources::GetFile("progressbar_outline.png"), Resources::GetFileSize("progressbar_outline.png")); - - GuiImage progressbarOutlineImg(&progressbarOutline); - if (Settings.wsprompt) - { - progressbarOutlineImg.SetWidescreen(Settings.widescreen); - } - progressbarOutlineImg.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - progressbarOutlineImg.SetPosition(35, 40); - - GuiImageData progressbarEmpty(Resources::GetFile("progressbar_empty.png"), Resources::GetFileSize("button_dialogue_box.png")); - GuiImage progressbarEmptyImg(&progressbarEmpty); - progressbarEmptyImg.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - progressbarEmptyImg.SetPosition(35, 40); - progressbarEmptyImg.SetTile(100); - - GuiImageData progressbar(Resources::GetFile("progressbar.png"), Resources::GetFileSize("progressbar.png")); - GuiImage progressbarImg(&progressbar); - progressbarImg.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - progressbarImg.SetPosition(35, 40); - - GuiText titleTxt(title, 26, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - titleTxt.SetPosition(0, 60); - - GuiText msg1Txt(msg1, 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - msg1Txt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - if (msg2) - msg1Txt.SetPosition(0, 100); - else - msg1Txt.SetPosition(0, 120); - msg1Txt.SetMaxWidth(430, DOTTED); - - GuiText msg2Txt(msg2, 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - msg2Txt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - msg2Txt.SetPosition(0, 125); - msg2Txt.SetMaxWidth(430, DOTTED); - - GuiText prsTxt("%", 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - prsTxt.SetAlignment(ALIGN_RIGHT, ALIGN_MIDDLE); - prsTxt.SetPosition(-178, 40); - - GuiText timeTxt((char*) NULL, 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - timeTxt.SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM); - timeTxt.SetPosition(280, -50); - - GuiText sizeTxt((char*) NULL, 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - sizeTxt.SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM); - sizeTxt.SetPosition(50, -50); - - GuiText speedTxt((char*) NULL, 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - speedTxt.SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM); - speedTxt.SetPosition(50, -74); - - GuiText prTxt((char*) NULL, 26, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - prTxt.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - prTxt.SetPosition(210, 40); - - if ((Settings.wsprompt) && (Settings.widescreen)) /////////////adjust for widescreen - { - progressbarOutlineImg.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - progressbarOutlineImg.SetPosition(0, 40); - progressbarEmptyImg.SetPosition(80, 40); - progressbarEmptyImg.SetTile(78); - progressbarImg.SetPosition(80, 40); - msg1Txt.SetMaxWidth(380, DOTTED); - msg2Txt.SetMaxWidth(380, DOTTED); - - timeTxt.SetPosition(250, -50); - timeTxt.SetFontSize(20); - speedTxt.SetPosition(90, -74); - speedTxt.SetFontSize(20); - sizeTxt.SetPosition(90, -50); - sizeTxt.SetFontSize(20); - } - - GuiText cancelTxt(tr( "Cancel" ), 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - GuiImage cancelImg(&btnOutline); - if (Settings.wsprompt) - { - cancelTxt.SetWidescreen(Settings.widescreen); - cancelImg.SetWidescreen(Settings.widescreen); - } - GuiButton cancelBtn(&cancelImg, &cancelImg, 2, 4, 0, -45, &trigA, btnSoundOver, btnSoundClick2, 1); - cancelBtn.SetLabel(&cancelTxt); - cancelBtn.SetState(STATE_SELECTED); - - usleep(400000); // wait to see if progress flag changes soon - if (!showProgress) return; - - promptWindow.Append(&dialogBoxImg); - promptWindow.Append(&progressbarEmptyImg); - promptWindow.Append(&progressbarImg); - promptWindow.Append(&progressbarOutlineImg); - promptWindow.Append(&prTxt); - promptWindow.Append(&prsTxt); - if (title) promptWindow.Append(&titleTxt); - promptWindow.Append(&msg1Txt); - promptWindow.Append(&msg2Txt); - if (showTime) promptWindow.Append(&timeTxt); - if (showSize) - { - promptWindow.Append(&sizeTxt); - promptWindow.Append(&speedTxt); - } - if(AbortCallback) - promptWindow.Append(&cancelBtn); - - HaltGui(); - promptWindow.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 50); - mainWindow->SetState(STATE_DISABLED); - mainWindow->Append(&promptWindow); - mainWindow->ChangeFocus(&promptWindow); - ResumeGui(); - - while (promptWindow.GetEffect() > 0) usleep(100); - - while (showProgress) - { - usleep(50000); - - if (shutdown) - Sys_Shutdown(); - if (reset) - Sys_Reboot(); - - if (changed) - { - if (changedMessages && progressTitle) titleTxt.SetText(progressTitle); - if (changedMessages && progressMsg1) msg1Txt.SetText(progressMsg1); - if (changedMessages && progressMsg2) msg2Txt.SetText(progressMsg2); - - UpdateProgressValues(&progressbarImg, &prTxt, &timeTxt, &speedTxt, &sizeTxt); - } - - if(cancelBtn.GetState() == STATE_CLICKED) - { - if(AbortCallback) AbortCallback(); - cancelBtn.ResetState(); - } - } - - promptWindow.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50); - while (promptWindow.GetEffect() > 0) usleep(100); - - HaltGui(); - mainWindow->Remove(&promptWindow); - mainWindow->SetState(STATE_DEFAULT); - ResumeGui(); -} - -/**************************************************************************** - * ProgressThread - ***************************************************************************/ -static void * ProgressThread(void *arg) -{ - while (1) - { - if (!showProgress) LWP_SuspendThread(progressthread); - - ProgressWindow(progressTitle, progressMsg1, progressMsg2); - usleep(100); - } - return NULL; -} - -/**************************************************************************** - * InitProgressThread - * - * Startup Progressthread in idle prio - ***************************************************************************/ -void InitProgressThread() -{ - LWP_MutexInit(&ProgressMutex, true); - LWP_CreateThread(&progressthread, ProgressThread, NULL, NULL, 16384, 70); -} - -/**************************************************************************** - * ExitProgressThread - * - * Shutdown Progressthread - ***************************************************************************/ -void ExitProgressThread() -{ - LWP_JoinThread(progressthread, NULL); - progressthread = LWP_THREAD_NULL; - LWP_MutexUnlock(ProgressMutex); - LWP_MutexDestroy(ProgressMutex); -} diff --git a/source/prompts/ProgressWindow.h b/source/prompts/ProgressWindow.h deleted file mode 100644 index 6987b801..00000000 --- a/source/prompts/ProgressWindow.h +++ /dev/null @@ -1,32 +0,0 @@ -/**************************************************************************** - * ProgressWindow - * USB Loader GX 2009 - * - * ProgressWindow.h - ***************************************************************************/ - -#ifndef _PROGRESSWINDOW_H_ -#define _PROGRESSWINDOW_H_ - -typedef void (*ProgressAbortCallback)(void); - -#ifdef __cplusplus - -void InitProgressThread(); -void ExitProgressThread(); -void ShowProgress(const char *title, const char *msg1, const char *msg2, s64 done, s64 total, bool swSize = false, bool swTime = false); - -extern "C" -{ -#endif - -void StartProgress(const char * title, const char * msg1, const char * msg2, bool swSize, bool swTime); -void ShowProgress(s64 done, s64 total); -void ProgressSetAbortCallback(ProgressAbortCallback callback); -void ProgressStop(); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/prompts/PromptWindow.cpp b/source/prompts/PromptWindow.cpp deleted file mode 100644 index cac125eb..00000000 --- a/source/prompts/PromptWindow.cpp +++ /dev/null @@ -1,250 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include -#include "PromptWindow.hpp" -#include "menu/menus.h" -#include "settings/CSettings.h" -#include "themes/CTheme.h" - -PromptWindow::PromptWindow(const char *title, const char *msg) - : GuiWindow(472, 320) -{ - SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - SetPosition(0, -10); - - btnOutline = Resources::GetImageData("button_dialogue_box.png"); - dialogBox = Resources::GetImageData("dialogue_box.png"); - - width = dialogBox->GetWidth(); - height = dialogBox->GetHeight(); - - trigA = new GuiTrigger; - trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - trigB = new GuiTrigger; - trigB->SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B); - - dialogBoxImg = new GuiImage(dialogBox); - if(Settings.wsprompt) - dialogBoxImg->SetWidescreen(Settings.widescreen); - Append(dialogBoxImg); - - titleTxt = new GuiText(title, 26, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - titleTxt->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - titleTxt->SetPosition(0, 55); - if(Settings.wsprompt && Settings.widescreen) - titleTxt->SetMaxWidth(width-140, DOTTED); - else - titleTxt->SetMaxWidth(width-40, DOTTED); - Append(titleTxt); - - msgTxt = new GuiText(msg, 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - msgTxt->SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - msgTxt->SetPosition(0, -40); - if(Settings.wsprompt && Settings.widescreen) - msgTxt->SetMaxWidth(width-140, WRAP); - else - msgTxt->SetMaxWidth(width-40, WRAP); - Append(msgTxt); - - SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 50); -} - -PromptWindow::~PromptWindow() -{ - ResumeGui(); - - SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50); - while(parentElement && this->GetEffect() > 0) usleep(100); - - HaltGui(); - if(parentElement) - ((GuiWindow *) parentElement)->Remove(this); - parentElement = NULL; - - RemoveAll(); - - delete btnOutline; - delete dialogBox; - - delete trigA; - delete trigB; - - delete dialogBoxImg; - - delete titleTxt; - delete msgTxt; - - for(u32 i = 0; i < Button.size(); ++i) - { - delete ButtonTxt[i]; - delete ButtonImg[i]; - delete Button[i]; - } - - ResumeGui(); -} - -void PromptWindow::PositionButtons() -{ - if (Settings.wsprompt && Settings.widescreen) - { - switch(Button.size()) - { - default: - break; - case 1: - Button[0]->SetAlignment(ALIGN_CENTRE, ALIGN_BOTTOM); - Button[0]->SetPosition(0, -55); - break; - case 2: - Button[0]->SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM); - Button[0]->SetPosition(70, -55); - Button[1]->SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM); - Button[1]->SetPosition(-70, -55); - break; - case 3: - Button[0]->SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM); - Button[0]->SetPosition(70, -120); - Button[1]->SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM); - Button[1]->SetPosition(-70, -120); - Button[2]->SetAlignment(ALIGN_CENTRE, ALIGN_BOTTOM); - Button[2]->SetPosition(0, -55); - break; - case 4: - Button[0]->SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM); - Button[0]->SetPosition(70, -120); - Button[1]->SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM); - Button[1]->SetPosition(-70, -120); - Button[2]->SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM); - Button[2]->SetPosition(70, -55); - Button[3]->SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM); - Button[3]->SetPosition(-70, -55); - break; - } - } - else - { - switch(Button.size()) - { - default: - break; - case 1: - Button[0]->SetAlignment(ALIGN_CENTRE, ALIGN_BOTTOM); - Button[0]->SetPosition(0, -55); - break; - case 2: - Button[0]->SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM); - Button[0]->SetPosition(50, -55); - Button[1]->SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM); - Button[1]->SetPosition(-50, -55); - break; - case 3: - Button[0]->SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM); - Button[0]->SetPosition(50, -120); - Button[1]->SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM); - Button[1]->SetPosition(-50, -120); - Button[2]->SetAlignment(ALIGN_CENTRE, ALIGN_BOTTOM); - Button[2]->SetPosition(0, -55); - break; - case 4: - Button[0]->SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM); - Button[0]->SetPosition(50, -120); - Button[1]->SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM); - Button[1]->SetPosition(-50, -120); - Button[2]->SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM); - Button[2]->SetPosition(50, -55); - Button[3]->SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM); - Button[3]->SetPosition(-50, -55); - break; - } - } -} - -void PromptWindow::AddButton(const char *text) -{ - int size = Button.size(); - if(size > 3) - return; - - ButtonTxt.resize(size+1); - ButtonImg.resize(size+1); - Button.resize(size+1); - - ButtonTxt[size] = new GuiText(text, 20, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - ButtonImg[size] = new GuiImage(btnOutline); - if (Settings.wsprompt) - { - ButtonTxt[size]->SetWidescreen(Settings.widescreen); - ButtonImg[size]->SetWidescreen(Settings.widescreen); - } - - Button[size] = new GuiButton(ButtonImg[size], ButtonImg[size], 0, 3, 0, 0, trigA, btnSoundOver, btnSoundClick2, 1); - Button[size]->SetLabel(ButtonTxt[size]); - Button[size]->SetState(STATE_SELECTED); - Button[size]->SetTrigger(1, trigB); - Append(Button[size]); - - if(size > 0) - Button[size-1]->SetTrigger(1, NULL); - - PositionButtons(); -} - -void PromptWindow::RemoveButton() -{ - Remove(Button[Button.size()-1]); - - delete ButtonTxt[ButtonTxt.size()-1]; - delete ButtonImg[ButtonImg.size()-1]; - delete Button[Button.size()-1]; - - ButtonTxt.pop_back(); - ButtonImg.pop_back(); - Button.pop_back(); - - if(ButtonImg.size() > 0) - Button[ButtonImg.size()-1]->SetTrigger(1, trigB); - - PositionButtons(); -} - -void PromptWindow::RemoveButton(int i) -{ - if(i >= 0 && i < (int) Button.size()) - Remove(Button[i]); -} - -int PromptWindow::GetChoice() -{ - for(u32 i = 0; i < Button.size(); ++i) - { - if(Button[i]->GetState() == STATE_CLICKED) - { - Button[i]->ResetState(); - return (i+1 != Button.size()) ? i+1 : 0; - } - } - - return -1; -} diff --git a/source/prompts/PromptWindow.hpp b/source/prompts/PromptWindow.hpp deleted file mode 100644 index 7f83f3ee..00000000 --- a/source/prompts/PromptWindow.hpp +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#ifndef _PROMPTWINDOW_HPP_ -#define _PROMPTWINDOW_HPP_ - -#include "libwiigui/gui.h" - -class PromptWindow : public GuiWindow -{ - public: - //! Constructor - PromptWindow(const char *title = 0, const char *msg = 0); - //! Destructor - ~PromptWindow(); - //! Set title text - void SetTitle(const char *text) { titleTxt->SetText(text); }; - //! Set message text - void SetMessageText(const char *text) { msgTxt->SetText(text); }; - //! Add new button and rearrange all buttons position. MAX 4 buttons. - void AddButton(const char *text); - //! Removes/deletes the last button and rearranges positions - void RemoveButton(); - //! Removes a button in the position from the window but does not completely delete it - void RemoveButton(int pos); - //! Default function to get the button pressed - int GetChoice(); - //! Forbid = operation - PromptWindow& operator=(const PromptWindow &w); - protected: - void PositionButtons(); - - GuiImageData *btnOutline; - GuiImageData *dialogBox; - GuiImage *dialogBoxImg; - GuiText *titleTxt; - GuiText *msgTxt; - GuiTrigger *trigA; - GuiTrigger *trigB; - std::vector ButtonTxt; - std::vector ButtonImg; - std::vector Button; -}; - -#endif diff --git a/source/prompts/PromptWindows.cpp b/source/prompts/PromptWindows.cpp deleted file mode 100644 index a8d26718..00000000 --- a/source/prompts/PromptWindows.cpp +++ /dev/null @@ -1,1606 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -#include "Controls/DeviceHandler.hpp" -#include "usbloader/wbfs.h" -#include "usbloader/wdvd.h" -#include "usbloader/usbstorage2.h" -#include "usbloader/GameList.h" -#include "usbloader/utils.h" -#include "language/gettext.h" -#include "libwiigui/gui.h" -#include "libwiigui/gui_diskcover.h" -#include "libwiigui/Text.hpp" -#include "settings/CGameStatistics.h" -#include "settings/GameTitles.h" -#include "network/networkops.h" -#include "network/update.h" -#include "network/http.h" -#include "prompts/PromptWindows.h" -#include "prompts/PromptWindow.hpp" -#include "prompts/gameinfo.h" -#include "themes/CTheme.h" -#include "utils/StringTools.h" -#include "mload/mload.h" -#include "FileOperations/fileops.h" -#include "menu.h" -#include "menu.h" -#include "sys.h" -#include "wpad.h" -#include "wad/wad.h" -#include "zlib.h" -#include "svnrev.h" -#include "audio.h" -#include "xml/xml.h" -#include "language/UpdateLanguage.h" -#include "gecko.h" -#include "lstub.h" -#include "buildtype.h" - -/*** Extern variables ***/ -s32 gameStart = 0; -extern float gamesize; -extern u8 shutdown; -extern u8 reset; -extern u8 mountMethod; -extern struct discHdr *dvdheader; -extern char game_partition[6]; -extern int connection; - -/**************************************************************************** - * OnScreenNumpad - * - * Opens an on-screen numpad window, with the data entered being stored - * into the specified variable. - ***************************************************************************/ -int OnScreenNumpad(char * var, u32 maxlen) -{ - int save = -1; - - GuiNumpad numpad(var, maxlen); - - GuiImageData btnOutline(Resources::GetFile("button_dialogue_box.png"), Resources::GetFileSize("button_dialogue_box.png")); - - GuiTrigger trigA; - trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - GuiTrigger trigB; - trigB.SetSimpleTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B); - - GuiText okBtnTxt(tr( "OK" ), 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - GuiImage okBtnImg(&btnOutline); - if (Settings.wsprompt) - { - okBtnTxt.SetWidescreen(Settings.widescreen); - okBtnImg.SetWidescreen(Settings.widescreen); - } - GuiButton okBtn(&okBtnImg, &okBtnImg, 0, 4, 5, -15, &trigA, btnSoundOver, btnSoundClick2, 1); - okBtn.SetLabel(&okBtnTxt); - GuiText cancelBtnTxt(tr( "Cancel" ), 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - GuiImage cancelBtnImg(&btnOutline); - if (Settings.wsprompt) - { - cancelBtnTxt.SetWidescreen(Settings.widescreen); - cancelBtnImg.SetWidescreen(Settings.widescreen); - } - GuiButton cancelBtn(&cancelBtnImg, &cancelBtnImg, 1, 4, -5, -15, &trigA, btnSoundOver, btnSoundClick2, 1); - cancelBtn.SetLabel(&cancelBtnTxt); - cancelBtn.SetTrigger(&trigB); - - numpad.Append(&okBtn); - numpad.Append(&cancelBtn); - - HaltGui(); - mainWindow->SetState(STATE_DISABLED); - mainWindow->Append(&numpad); - mainWindow->ChangeFocus(&numpad); - ResumeGui(); - - while (save == -1) - { - VIDEO_WaitVSync(); - - if (okBtn.GetState() == STATE_CLICKED) - save = 1; - else if (cancelBtn.GetState() == STATE_CLICKED) save = 0; - } - - if (save == 1) - { - snprintf(var, maxlen, "%s", numpad.kbtextstr); - } - - HaltGui(); - mainWindow->Remove(&numpad); - mainWindow->SetState(STATE_DEFAULT); - ResumeGui(); - gprintf("\t%s", (save == 1 ? "saved" : "discarded")); - return save; -} - -/**************************************************************************** - * OnScreenKeyboard - * - * Opens an on-screen keyboard window, with the data entered being stored - * into the specified variable. - ***************************************************************************/ -int OnScreenKeyboard(char * var, u32 maxlen, int min) -{ - - int save = -1; - - gprintf("\nOnScreenKeyboard(%s, %i, %i) \n\tkeyset = %i", var, maxlen, min, Settings.keyset); - - GuiKeyboard keyboard(var, maxlen, min, Settings.keyset); - - GuiImageData btnOutline(Resources::GetFile("button_dialogue_box.png"), Resources::GetFileSize("button_dialogue_box.png")); - - GuiTrigger trigA; - trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - GuiTrigger trigB; - trigB.SetSimpleTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B); - - GuiText okBtnTxt(tr( "OK" ), 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - GuiImage okBtnImg(&btnOutline); - if (Settings.wsprompt) - { - okBtnTxt.SetWidescreen(Settings.widescreen); - okBtnImg.SetWidescreen(Settings.widescreen); - } - GuiButton okBtn(&okBtnImg, &okBtnImg, 0, 4, 5, 15, &trigA, btnSoundOver, btnSoundClick2, 1); - okBtn.SetLabel(&okBtnTxt); - GuiText cancelBtnTxt(tr( "Cancel" ), 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - GuiImage cancelBtnImg(&btnOutline); - if (Settings.wsprompt) - { - cancelBtnTxt.SetWidescreen(Settings.widescreen); - cancelBtnImg.SetWidescreen(Settings.widescreen); - } - GuiButton cancelBtn(&cancelBtnImg, &cancelBtnImg, 1, 4, -5, 15, &trigA, btnSoundOver, btnSoundClick2, 1); - cancelBtn.SetLabel(&cancelBtnTxt); - cancelBtn.SetTrigger(&trigB); - - keyboard.Append(&okBtn); - keyboard.Append(&cancelBtn); - - HaltGui(); - mainWindow->SetState(STATE_DISABLED); - mainWindow->Append(&keyboard); - mainWindow->ChangeFocus(&keyboard); - ResumeGui(); - - while (save == -1) - { - VIDEO_WaitVSync(); - - if (okBtn.GetState() == STATE_CLICKED) - save = 1; - else if (cancelBtn.GetState() == STATE_CLICKED) save = 0; - } - - if (save) - { - snprintf(var, maxlen, "%s", keyboard.kbtextstr); - } - - HaltGui(); - mainWindow->Remove(&keyboard); - mainWindow->SetState(STATE_DEFAULT); - ResumeGui(); - gprintf("\t%s", (save ? "saved" : "discarded")); - return save; -} - -/**************************************************************************** - * WindowCredits - * Display credits - ***************************************************************************/ -void WindowCredits() -{ - gprintf("WindowCredits()\n"); - - int angle = 0; - GuiSound * creditsMusic = NULL; - - bgMusic->Pause(); - - creditsMusic = new GuiSound(Resources::GetFile("credits_music.ogg"), Resources::GetFileSize("credits_music.ogg"), 55); - creditsMusic->SetVolume(60); - creditsMusic->SetLoop(1); - creditsMusic->Play(); - - bool exit = false; - int i = 0; - int y = 20; - - GuiWindow creditsWindow(screenwidth, screenheight); - GuiWindow creditsWindowBox(580, 448); - creditsWindowBox.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - - GuiImageData creditsBox(Resources::GetFile("credits_bg.png"), Resources::GetFileSize("credits_bg.png")); - GuiImage creditsBoxImg(&creditsBox); - creditsBoxImg.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - creditsWindowBox.Append(&creditsBoxImg); - - GuiImageData star(Resources::GetFile("little_star.png"), Resources::GetFileSize("little_star.png")); - GuiImage starImg(&star); - starImg.SetWidescreen(Settings.widescreen); //added - starImg.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - starImg.SetPosition(505, 350); - - int numEntries = 24; - GuiText * txt[numEntries]; - - txt[i] = new GuiText(tr( "Credits" ), 26, ( GXColor ) {255, 255, 255, 255}); - txt[i]->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - txt[i]->SetPosition(0, 12); - i++; - -#ifdef FULLCHANNEL - char SvnRev[30]; - snprintf( SvnRev, sizeof( SvnRev ), "Rev%sc IOS%u (Rev %u)", GetRev(), IOS_GetVersion(), IOS_GetRevision() ); -#else - char SvnRev[30]; - snprintf(SvnRev, sizeof(SvnRev), "Rev%s IOS%u (Rev %u)", GetRev(), IOS_GetVersion(), IOS_GetRevision()); -#endif - - txt[i] = new GuiText(SvnRev, 16, ( GXColor ) {255, 255, 255, 255}); - txt[i]->SetAlignment(ALIGN_RIGHT, ALIGN_TOP); - txt[i]->SetPosition(0, y); - i++; - y += 34; - - txt[i] = new GuiText("USB Loader GX", 24, ( GXColor ) {255, 255, 255, 255}); - txt[i]->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - txt[i]->SetPosition(0, y); - i++; - y += 24; - - txt[i] = new GuiText(tr( "Official Site:" ), 20, ( GXColor ) {255, 255, 255, 255}); - txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - txt[i]->SetPosition(10, y); - i++; - - txt[i] = new GuiText("http://code.google.com/p/usbloader-gui/", 20, ( GXColor ) {255, 255, 255, 255}); - txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - txt[i]->SetPosition(160, y); - i++; - y += 22; - - GuiText::SetPresets(20, ( GXColor ) {255, 255, 255, 255}, 3000, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_TOP, ALIGN_LEFT, ALIGN_TOP); - - txt[i] = new GuiText(tr( "Coding:" )); - txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - txt[i]->SetPosition(10, y); - i++; - - txt[i] = new GuiText("Dimok / nIxx / giantpune / ardi"); - txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - txt[i]->SetPosition(160, y); - i++; - y += 20; - - txt[i] = new GuiText("hungyip84 / DrayX7 / lustar / r-win"); - txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - txt[i]->SetPosition(160, y); - i++; - y += 22; - - char text[100]; - - txt[i] = new GuiText(tr( "Design:" )); - txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - txt[i]->SetPosition(10, y); - i++; - - txt[i] = new GuiText("cyrex / NeoRame"); - txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - txt[i]->SetPosition(160, y); - i++; - y += 22; - - txt[i] = new GuiText(tr( "Issue manager /" )); - txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - txt[i]->SetPosition(10, y); - i++; - y += 20; - - txt[i] = new GuiText(tr( "Main tester:" )); - txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - txt[i]->SetPosition(10, y); - i++; - - txt[i] = new GuiText("Cyan"); - txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - txt[i]->SetPosition(160, y); - i++; - y += 22; - - txt[i] = new GuiText(tr( "Big thanks to:" )); - txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - txt[i]->SetPosition(10, y); - i++; - - sprintf(text, "lustar %s", tr( "for WiiTDB and hosting covers / disc images" )); - txt[i] = new GuiText(text); - txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - txt[i]->SetPosition(160, y); - i++; - y += 20; - - sprintf(text, "CorneliousJD %s", tr( "for hosting the update files" )); - txt[i] = new GuiText(text); - txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - txt[i]->SetPosition(160, y); - i++; - y += 20; - - sprintf(text, "Kinyo %s", tr( "and translators for language files updates" )); - txt[i] = new GuiText(text); - txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - txt[i]->SetPosition(160, y); - i++; - y += 20; - - sprintf(text, "Deak Phreak %s", tr( "for hosting the themes" )); - txt[i] = new GuiText(text); - txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - txt[i]->SetPosition(160, y); - i++; - y += 22; - - txt[i] = new GuiText(tr( "Special thanks to:" )); - txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - txt[i]->SetPosition(10, y); - i++; - y += 20; - - sprintf(text, "Waninkoko, Kwiirk & Hermes %s", tr( "for the USB Loader source" )); - txt[i] = new GuiText(text); - txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - txt[i]->SetPosition(60, y); - i++; - y += 20; - - sprintf(text, "Tantric %s", tr( "for his awesome tool LibWiiGui" )); - txt[i] = new GuiText(text); - txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - txt[i]->SetPosition(60, y); - i++; - y += 20; - - sprintf(text, "Fishears/Nuke %s", tr( "for Ocarina" )); - txt[i] = new GuiText(text); - txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - txt[i]->SetPosition(60, y); - i++; - y += 20; - - sprintf(text, "WiiPower %s", tr( "for diverse patches" )); - txt[i] = new GuiText(text); - txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - txt[i]->SetPosition(60, y); - i++; - y += 20; - - sprintf(text, "Oggzee %s", tr( "for FAT/NTFS support" )); - txt[i] = new GuiText(text); - txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - txt[i]->SetPosition(60, y); - i++; - y += 20; - - for (i = 0; i < numEntries; i++) - creditsWindowBox.Append(txt[i]); - - creditsWindow.Append(&creditsWindowBox); - creditsWindow.Append(&starImg); - - creditsWindow.SetEffect(EFFECT_FADE, 30); - - HaltGui(); - mainWindow->SetState(STATE_DISABLED); - mainWindow->Append(&creditsWindow); - ResumeGui(); - - while (!exit) - { - usleep(12000); - - if (shutdown) - Sys_Shutdown(); - if (reset) - Sys_Reboot(); - - angle++; - if (angle > 360) angle = 0; - starImg.SetAngle(angle); - - if (ButtonsPressed() != 0) - exit = true; - } - - creditsMusic->Stop(); - - delete creditsMusic; - - creditsWindow.SetEffect(EFFECT_FADE, -30); - while (creditsWindow.GetEffect() > 0) - usleep(100); - HaltGui(); - mainWindow->Remove(&creditsWindow); - mainWindow->SetState(STATE_DEFAULT); - for (i = 0; i < numEntries; i++) - { - delete txt[i]; - txt[i] = NULL; - } - ResumeGui(); - - bgMusic->Resume(); -} - -/**************************************************************************** - * WindowScreensaver - * Display screensaver - ***************************************************************************/ -int WindowScreensaver() -{ - //! 2 Seconds delay in case the wiimote shutdown was pressed - time_t start = time(0); - while(time(0)-start < 2) - { - usleep(100); - - if(shutdown) - return 0; - } - - gprintf("WindowScreenSaver()\n"); - bool exit = false; - - /* initialize random seed: */ - srand(time(NULL)); - - GuiImageData GXlogo(Resources::GetFile("gxlogo.png"), Resources::GetFileSize("gxlogo.png"));//uncomment for themable screensaver - //GuiImageData GXlogo(gxlogo_png);//comment for themable screensaver - GuiImage GXlogoImg(&GXlogo); - GXlogoImg.SetPosition(172, 152); - GXlogoImg.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - - GuiImage BackgroundImg(640, 480, ( GXColor ) {0, 0, 0, 255}); - BackgroundImg.SetPosition(0, 0); - BackgroundImg.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - - GuiWindow screensaverWindow(screenwidth, screenheight); - screensaverWindow.Append(&BackgroundImg); - screensaverWindow.Append(&GXlogoImg); - - HaltGui(); - mainWindow->SetState(STATE_DISABLED); - mainWindow->Append(&screensaverWindow); - ResumeGui(); - - while (!exit) - { - if (shutdown) - Sys_Shutdown(); - if (reset) - Sys_Reboot(); - - if (IsWpadConnected()) - { - exit = true; - break; - } - /* Set random position */ - GXlogoImg.SetPosition((rand() % 345), (rand() % 305)); - - sleep(4); - } - - HaltGui(); - mainWindow->Remove(&screensaverWindow); - mainWindow->SetState(STATE_DEFAULT); - ResumeGui(); - return 1; -} - -/**************************************************************************** - * WindowPrompt - * - * Displays a prompt window to user, with information, an error message, or - * presenting a user with a choice of up to 4 Buttons. - * - * Give him 1 Title, 1 Subtitle and 4 Buttons - * If title/subtitle or one of the buttons is not needed give him a 0 on that - * place. - ***************************************************************************/ -int WindowPrompt(const char *title, const char *msg, const char *btn1Label, const char *btn2Label, - const char *btn3Label, const char *btn4Label, int wait) -{ - int choice = -1; - int count = wait; - gprintf("WindowPrompt( %s, %s, %s, %s, %s, %s, %i ): ", title, msg, btn1Label, btn2Label, btn3Label, btn4Label, wait); - - PromptWindow *Window = new PromptWindow; - Window->SetTitle(title); - Window->SetMessageText(msg); - if(btn1Label) - Window->AddButton(btn1Label); - if(btn2Label) - Window->AddButton(btn2Label); - if(btn3Label) - Window->AddButton(btn3Label); - if(btn4Label) - Window->AddButton(btn4Label); - - mainWindow->SetState(STATE_DISABLED); - mainWindow->Append(Window); - mainWindow->ChangeFocus(Window); - ResumeGui(); - - while (choice == -1) - { - VIDEO_WaitVSync(); - - if (shutdown) - { - wiilight(0); - Sys_Shutdown(); - } - if (reset) - Sys_Reboot(); - - choice = Window->GetChoice(); - - if (count > 0) count--; - if (count == 0) choice = 1; - } - - delete Window; - - mainWindow->SetState(STATE_DEFAULT); - gprintf(" %i\n", choice); - - return choice; -} - -/**************************************************************************** - * WindowExitPrompt - * - * Displays a prompt window to user, with information, an error message, or - * presenting a user with a choice of up to 4 Buttons. - * - * Give him 1 Titel, 1 Subtitel and 4 Buttons - * If titel/subtitle or one of the buttons is not needed give him a 0 on that - * place. - ***************************************************************************/ -int WindowExitPrompt() -{ - gprintf("WindowExitPrompt()\n"); - - bgMusic->Pause(); - - GuiSound * homein = NULL; - homein = new GuiSound(Resources::GetFile("menuin.ogg"), Resources::GetFileSize("menuin.ogg"), Settings.sfxvolume); - homein->SetVolume(Settings.sfxvolume); - homein->SetLoop(0); - homein->Play(); - - GuiSound * homeout = NULL; - homeout = new GuiSound(Resources::GetFile("menuout.ogg"), Resources::GetFileSize("menuout.ogg"), Settings.sfxvolume); - homeout->SetVolume(Settings.sfxvolume); - homeout->SetLoop(0); - - int choice = -1; - - u64 oldstub = getStubDest(); - loadStub(); - if (oldstub != 0x00010001554c4e52ll && oldstub != 0x00010001554e454fll) Set_Stub(oldstub); - - GuiWindow promptWindow(640, 480); - promptWindow.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - promptWindow.SetPosition(0, 0); - GuiImageData top(Resources::GetFile("exit_top.png"), Resources::GetFileSize("exit_top.png")); - GuiImageData topOver(Resources::GetFile("exit_top_over.png"), Resources::GetFileSize("exit_top_over.png")); - GuiImageData bottom(Resources::GetFile("exit_bottom.png"), Resources::GetFileSize("exit_bottom.png")); - GuiImageData bottomOver(Resources::GetFile("exit_bottom_over.png"), Resources::GetFileSize("exit_bottom_over.png")); - GuiImageData button(Resources::GetFile("exit_button.png"), Resources::GetFileSize("exit_button.png")); - GuiImageData wiimote(Resources::GetFile("wiimote.png"), Resources::GetFileSize("wiimote.png")); - GuiImageData close(Resources::GetFile("closebutton.png"), Resources::GetFileSize("closebutton.png")); - - GuiImageData battery(Resources::GetFile("battery_white.png"), Resources::GetFileSize("battery_white.png")); - GuiImageData batteryBar(Resources::GetFile("battery_bar_white.png"), Resources::GetFileSize("battery_bar_white.png")); - GuiImageData batteryRed(Resources::GetFile("battery_red.png"), Resources::GetFileSize("battery_red.png")); - GuiImageData batteryBarRed(Resources::GetFile("battery_bar_red.png"), Resources::GetFileSize("battery_bar_red.png")); - - int i = 0, ret = 0, level; - char txt[3]; - GuiText * batteryTxt[4]; - GuiImage * batteryImg[4]; - GuiImage * batteryBarImg[4]; - GuiButton * batteryBtn[4]; - - for (i = 0; i < 4; i++) - { - sprintf(txt, "P%d", i + 1); - - batteryTxt[i] = new GuiText(txt, 22, ( GXColor ) {255, 255, 255, 255}); - batteryTxt[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - batteryImg[i] = new GuiImage(&battery); - batteryImg[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - batteryImg[i]->SetPosition(36, 0); - batteryImg[i]->SetTile(0); - batteryBarImg[i] = new GuiImage(&batteryBar); - batteryBarImg[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - batteryBarImg[i]->SetPosition(33, 0); - - batteryBtn[i] = new GuiButton(40, 20); - batteryBtn[i]->SetLabel(batteryTxt[i]); - batteryBtn[i]->SetImage(batteryBarImg[i]); - batteryBtn[i]->SetIcon(batteryImg[i]); - batteryBtn[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - batteryBtn[i]->SetRumble(false); - batteryBtn[i]->SetAlpha(70); - batteryBtn[i]->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_IN, 50); - } - - batteryBtn[0]->SetPosition(180, 150); - batteryBtn[1]->SetPosition(284, 150); - batteryBtn[2]->SetPosition(388, 150); - batteryBtn[3]->SetPosition(494, 150); - - GuiTrigger trigA; - trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - GuiTrigger trigB; - trigB.SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B); - GuiTrigger trigHome; - trigHome.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0); - - GuiText titleTxt(tr( "HOME Menu" ), 36, ( GXColor ) {255, 255, 255, 255}); - titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - titleTxt.SetPosition(-180, 40); - titleTxt.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 50); - - GuiText closeTxt(tr( "Close" ), 28, ( GXColor ) {0, 0, 0, 255}); - closeTxt.SetPosition(10, 3); - GuiImage closeImg(&close); - if (Settings.wsprompt) - { - closeTxt.SetWidescreen(Settings.widescreen); - closeImg.SetWidescreen(Settings.widescreen); - } - GuiButton closeBtn(close.GetWidth(), close.GetHeight()); - closeBtn.SetImage(&closeImg); - closeBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - closeBtn.SetPosition(190, 30); - closeBtn.SetLabel(&closeTxt); - closeBtn.SetRumble(false); - closeBtn.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 50); - - GuiImage btn1Img(&top); - GuiImage btn1OverImg(&topOver); - GuiButton btn1(&btn1Img, &btn1OverImg, 0, 3, 0, 0, &trigA, btnSoundOver, btnSoundClick2, 0); - btn1.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 50); - - GuiText btn2Txt(tr( "Homebrew Channel" ), 26, ( GXColor ) {0, 0, 0, 255}); - if (Settings.HomeMenu == HOME_MENU_SYSTEM) - { - btn2Txt.SetText(tr( "Wii Menu" )); - } - else if (Settings.HomeMenu == HOME_MENU_FULL) - { - btn2Txt.SetText(tr( "Exit" )); - } - GuiImage btn2Img(&button); - if (Settings.wsprompt) - { - btn2Txt.SetWidescreen(Settings.widescreen); - btn2Img.SetWidescreen(Settings.widescreen); - } - GuiButton btn2(&btn2Img, &btn2Img, 2, 5, -150, 0, &trigA, btnSoundOver, btnSoundClick2, 1); - btn2.SetLabel(&btn2Txt); - btn2.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 50); - btn2.SetRumble(false); - btn2.SetPosition(-150, 0); - - GuiText btn3Txt(tr( "Wii Menu" ), 26, ( GXColor ) {0, 0, 0, 255}); - if (Settings.HomeMenu == HOME_MENU_SYSTEM) - { - btn3Txt.SetText(tr( "Reset" )); - } - else if (Settings.HomeMenu == HOME_MENU_FULL) - { - btn3Txt.SetText(tr( "Shutdown Wii" )); - } - GuiImage btn3Img(&button); - if (Settings.wsprompt) - { - btn3Txt.SetWidescreen(Settings.widescreen); - btn3Img.SetWidescreen(Settings.widescreen); - } - GuiButton btn3(&btn3Img, &btn3Img, 2, 5, 150, 0, &trigA, btnSoundOver, btnSoundClick2, 1); - btn3.SetLabel(&btn3Txt); - btn3.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_IN, 50); - btn3.SetRumble(false); - btn3.SetPosition(150, 0); - - GuiImage btn4Img(&bottom); - GuiImage btn4OverImg(&bottomOver); - GuiButton btn4(&btn4Img, &btn4OverImg, 0, 4, 0, 0, &trigA, btnSoundOver, btnSoundClick2, 0); - btn4.SetTrigger(&trigB); - btn4.SetTrigger(&trigHome); - btn4.SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_IN, 50); - - GuiImage wiimoteImg(&wiimote); - if (Settings.wsprompt) - { - wiimoteImg.SetWidescreen(Settings.widescreen); - } - wiimoteImg.SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM); - wiimoteImg.SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_IN, 50); - wiimoteImg.SetPosition(50, 210); - - promptWindow.Append(&btn2); - promptWindow.Append(&btn3); - promptWindow.Append(&btn4); - promptWindow.Append(&btn1); - promptWindow.Append(&closeBtn); - promptWindow.Append(&titleTxt); - promptWindow.Append(&wiimoteImg); - - promptWindow.Append(batteryBtn[0]); - promptWindow.Append(batteryBtn[1]); - promptWindow.Append(batteryBtn[2]); - promptWindow.Append(batteryBtn[3]); - - HaltGui(); - mainWindow->SetState(STATE_DISABLED); - mainWindow->Append(&promptWindow); - mainWindow->ChangeFocus(&promptWindow); - ResumeGui(); - - while (choice == -1) - { - VIDEO_WaitVSync(); - - for (i = 0; i < 4; i++) - { - if (WPAD_Probe(i, NULL) == WPAD_ERR_NONE) // controller connected - { - level = (userInput[i].wpad.battery_level / 100.0) * 4; - if (level > 4) level = 4; - - if (level <= 1) - { - batteryBarImg[i]->SetImage(&batteryBarRed); - batteryImg[i]->SetImage(&batteryRed); - } - else - { - batteryBarImg[i]->SetImage(&batteryBar); - } - - batteryImg[i]->SetTile(level); - - batteryBtn[i]->SetAlpha(255); - } - else // controller not connected - { - batteryImg[i]->SetTile(0); - batteryImg[i]->SetImage(&battery); - batteryBtn[i]->SetAlpha(70); - } - } - - if (shutdown) - { - wiilight(0); - Sys_Shutdown(); - } - if (reset) - Sys_Reboot(); - - if (btn1.GetState() == STATE_CLICKED) - { - choice = 1; - btn1.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50); - closeBtn.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50); - btn4.SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 50); - btn2.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 50); - btn3.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 50); - titleTxt.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50); - wiimoteImg.SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 50); - - for (int i = 0; i < 4; i++) - batteryBtn[i]->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 50); - - } - else if (btn4.GetState() == STATE_SELECTED) - { - wiimoteImg.SetPosition(50, 165); - } - else if (btn2.GetState() == STATE_CLICKED) - { - if (Settings.HomeMenu == HOME_MENU_SYSTEM) - Sys_LoadMenu(); - else if (Settings.HomeMenu == HOME_MENU_DEFAULT) - Sys_LoadHBC(); - else if (Settings.HomeMenu == HOME_MENU_FULL) - { - ret = WindowPrompt(tr( "Exit to where?" ), 0, tr( "Homebrew Channel" ), tr( "Wii Menu" ), tr( "Reset" ), tr( "Cancel" )); - if (ret == 1) - Sys_LoadHBC(); - else if(ret == 2) - Sys_LoadMenu(); - else if(ret == 3) - RebootApp(); - } - HaltGui(); - mainWindow->SetState(STATE_DISABLED); - promptWindow.SetState(STATE_DEFAULT); - mainWindow->ChangeFocus(&promptWindow); - ResumeGui(); - btn2.ResetState(); - } - else if (btn3.GetState() == STATE_CLICKED) - { - if (Settings.HomeMenu == HOME_MENU_SYSTEM) - RebootApp(); - else if (Settings.HomeMenu == HOME_MENU_DEFAULT) - Sys_LoadMenu(); - else if (Settings.HomeMenu == HOME_MENU_FULL) - { - ret = WindowPrompt(tr( "How to Shutdown?" ), 0, tr( "Full shutdown" ), tr( "Standby" ), tr("Cancel")); - if (ret == 1) - Sys_ShutdownToStandby(); - else if(ret == 2) - Sys_ShutdownToIdle(); - } - HaltGui(); - mainWindow->SetState(STATE_DISABLED); - promptWindow.SetState(STATE_DEFAULT); - mainWindow->ChangeFocus(&promptWindow); - ResumeGui(); - btn3.ResetState(); - } - else if (btn4.GetState() == STATE_CLICKED) - { - btn1.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50); - closeBtn.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50); - btn4.SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 50); - btn2.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 50); - btn3.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 50); - titleTxt.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50); - wiimoteImg.SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 50); - - for (int i = 0; i < 4; i++) - batteryBtn[i]->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 50); - - choice = 0; - } - else if (btn4.GetState() != STATE_SELECTED) - { - wiimoteImg.SetPosition(50, 210); - } - } - homeout->Play(); - while (btn1.GetEffect() > 0) - usleep(100); - while (promptWindow.GetEffect() > 0) - usleep(100); - HaltGui(); - homein->Stop(); - delete homein; - mainWindow->Remove(&promptWindow); - mainWindow->SetState(STATE_DEFAULT); - while (homeout->IsPlaying() > 0) - usleep(100); - homeout->Stop(); - delete homeout; - - for(int i = 0; i < 4; ++i) - { - delete batteryTxt[i]; - delete batteryImg[i]; - delete batteryBarImg[i]; - delete batteryBtn[i]; - } - - ResumeGui(); - bgMusic->Resume(); - - return choice; -} - -/**************************************************************************** - * DiscWait - ***************************************************************************/ -int DiscWait(const char *title, const char *msg, const char *btn1Label, const char *btn2Label, int IsDeviceWait) -{ - int ret = 0; - u32 cover = 0; - - GuiWindow promptWindow(472, 320); - promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - promptWindow.SetPosition(0, -10); - - GuiImageData btnOutline(Resources::GetFile("button_dialogue_box.png"), Resources::GetFileSize("button_dialogue_box.png")); - GuiImageData dialogBox(Resources::GetFile("dialogue_box.png"), Resources::GetFileSize("dialogue_box.png")); - GuiTrigger trigA; - trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - GuiTrigger trigB; - trigB.SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B); - - GuiImage dialogBoxImg(&dialogBox); - if (Settings.wsprompt) - { - dialogBoxImg.SetWidescreen(Settings.widescreen); - } - - GuiText titleTxt(title, 26, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - titleTxt.SetPosition(0, 60); - GuiText msgTxt(msg, 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - msgTxt.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - msgTxt.SetPosition(0, -40); - msgTxt.SetMaxWidth(430); - - GuiText btn1Txt(btn1Label, 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - GuiImage btn1Img(&btnOutline); - if (Settings.wsprompt) - { - btn1Txt.SetWidescreen(Settings.widescreen); - btn1Img.SetWidescreen(Settings.widescreen); - } - GuiButton btn1(&btn1Img, &btn1Img, 1, 5, 0, 0, &trigA, btnSoundOver, btnSoundClick2, 1); - - if (btn2Label) - { - btn1.SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM); - btn1.SetPosition(40, -45); - } - else - { - btn1.SetAlignment(ALIGN_CENTRE, ALIGN_BOTTOM); - btn1.SetPosition(0, -45); - } - - btn1.SetLabel(&btn1Txt); - btn1.SetTrigger(&trigB); - btn1.SetState(STATE_SELECTED); - - GuiText btn2Txt(btn2Label, 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - GuiImage btn2Img(&btnOutline); - if (Settings.wsprompt) - { - btn2Txt.SetWidescreen(Settings.widescreen); - btn2Img.SetWidescreen(Settings.widescreen); - } - GuiButton btn2(&btn2Img, &btn2Img, 1, 4, -20, -25, &trigA, btnSoundOver, btnSoundClick2, 1); - btn2.SetLabel(&btn2Txt); - - if (Settings.wsprompt && Settings.widescreen) /////////////adjust buttons for widescreen - { - msgTxt.SetMaxWidth(380); - if (btn2Label) - { - btn1.SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM); - btn2.SetPosition(-70, -80); - btn1.SetPosition(70, -80); - } - else - { - btn1.SetAlignment(ALIGN_CENTRE, ALIGN_BOTTOM); - btn1.SetPosition(0, -80); - } - } - - GuiText timerTxt((char*) NULL, 26, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - timerTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - timerTxt.SetPosition(0, 160); - - promptWindow.Append(&dialogBoxImg); - promptWindow.Append(&titleTxt); - promptWindow.Append(&msgTxt); - - if (btn1Label) promptWindow.Append(&btn1); - if (btn2Label) promptWindow.Append(&btn2); - if (IsDeviceWait) promptWindow.Append(&timerTxt); - - promptWindow.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 50); - HaltGui(); - mainWindow->SetState(STATE_DISABLED); - mainWindow->Append(&promptWindow); - mainWindow->ChangeFocus(&promptWindow); - ResumeGui(); - - if (IsDeviceWait) - { - time_t starttime = time(0); - time_t timenow = starttime; - do - { - gprintf("%i\n", (int) (timenow-starttime)); - ret = WBFS_Init(WBFS_DEVICE_USB); - if (ret >= 0) break; - - timerTxt.SetTextf("%i %s", (int) (30-(timenow-starttime)), tr( "seconds left" )); - DeviceHandler::Instance()->UnMountAllUSB(); - DeviceHandler::Instance()->MountAllUSB(); - timenow = time(0); - } - while (timenow-starttime < 30); - } - else - { - while (!(cover & 0x2)) - { - VIDEO_WaitVSync(); - if (btn1.GetState() == STATE_CLICKED) - { - btn1.ResetState(); - break; - } - ret = WDVD_GetCoverStatus(&cover); - if (ret < 0) break; - } - } - - promptWindow.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50); - while (promptWindow.GetEffect() > 0) - usleep(100); - HaltGui(); - mainWindow->Remove(&promptWindow); - mainWindow->SetState(STATE_DEFAULT); - ResumeGui(); - return ret; -} - -/**************************************************************************** - * FormatingPartition - ***************************************************************************/ -int FormatingPartition(const char *title, int part_num) -{ - PartitionHandle * usbHandle = DeviceHandler::Instance()->GetUSBHandle(); - - char text[255]; - sprintf(text, "%s: %.2fGB", tr( "Partition" ), usbHandle->GetSize(part_num) / GB_SIZE); - int choice = WindowPrompt(tr( "Do you want to format:" ), text, tr( "Yes" ), tr( "No" )); - if (choice == 0) - return -666; - - int ret; - GuiWindow promptWindow(472, 320); - promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - promptWindow.SetPosition(0, -10); - - GuiImageData btnOutline(Resources::GetFile("button_dialogue_box.png"), Resources::GetFileSize("button_dialogue_box.png")); - GuiImageData dialogBox(Resources::GetFile("dialogue_box.png"), Resources::GetFileSize("dialogue_box.png")); - - GuiTrigger trigA; - trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - - GuiImage dialogBoxImg(&dialogBox); - if (Settings.wsprompt) - { - dialogBoxImg.SetWidescreen(Settings.widescreen); - } - - GuiText titleTxt(title, 26, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - titleTxt.SetPosition(0, 60); - - promptWindow.Append(&dialogBoxImg); - promptWindow.Append(&titleTxt); - - promptWindow.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 50); - HaltGui(); - mainWindow->SetState(STATE_DISABLED); - mainWindow->Append(&promptWindow); - mainWindow->ChangeFocus(&promptWindow); - ResumeGui(); - - VIDEO_WaitVSync(); - ret = WBFS_Format(usbHandle->GetLBAStart(part_num), usbHandle->GetSecCount(part_num)); - - if (ret < 0) - { - WindowPrompt(tr( "Error !" ), tr( "Failed formating" ), tr( "Return" )); - } - else - { - PartitionFS * partition = usbHandle->GetPartitionRecord(part_num); - partition->PartitionType = 0xBF; - partition->FSName = "WBFS"; - sleep(1); - ret = WBFS_OpenPart(part_num); - sprintf(text, "%s %s", text, tr( "formatted!" )); - WindowPrompt(tr( "Success:" ), text, tr( "OK" )); - if (ret < 0) - { - WindowPrompt(tr( "ERROR" ), tr( "Failed to open partition" ), tr( "OK" )); - Sys_LoadMenu(); - } - } - - promptWindow.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50); - while (promptWindow.GetEffect() > 0) - usleep(100); - HaltGui(); - mainWindow->Remove(&promptWindow); - mainWindow->SetState(STATE_DEFAULT); - ResumeGui(); - return ret; -} - -/**************************************************************************** - * NetworkInitPrompt - ***************************************************************************/ -bool NetworkInitPrompt() -{ - - gprintf("\nNetworkinitPrompt()"); - if (IsNetworkInit()) return true; - - bool success = true; - - GuiWindow promptWindow(472, 320); - promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - promptWindow.SetPosition(0, -10); - - GuiImageData btnOutline(Resources::GetFile("button_dialogue_box.png"), Resources::GetFileSize("button_dialogue_box.png")); - GuiImageData dialogBox(Resources::GetFile("dialogue_box.png"), Resources::GetFileSize("dialogue_box.png")); - GuiTrigger trigA; - trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - - GuiImage dialogBoxImg(&dialogBox); - - if (Settings.wsprompt) - { - dialogBoxImg.SetWidescreen(Settings.widescreen); - } - - GuiText titleTxt(tr( "Initializing Network" ), 26, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - titleTxt.SetPosition(0, 60); - - char msg[20] = " "; - GuiText msgTxt(msg, 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - msgTxt.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - msgTxt.SetPosition(0, -40); - - GuiText btn1Txt(tr( "Cancel" ), 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - GuiImage btn1Img(&btnOutline); - if (Settings.wsprompt) - { - btn1Txt.SetWidescreen(Settings.widescreen); - btn1Img.SetWidescreen(Settings.widescreen); - } - GuiButton btn1(&btn1Img, &btn1Img, 2, 4, 0, -45, &trigA, btnSoundOver, btnSoundClick2, 1); - btn1.SetLabel(&btn1Txt); - btn1.SetState(STATE_SELECTED); - - if ((Settings.wsprompt) && (Settings.widescreen)) /////////////adjust buttons for widescreen - { - btn1.SetAlignment(ALIGN_CENTRE, ALIGN_BOTTOM); - btn1.SetPosition(0, -80); - } - - promptWindow.Append(&dialogBoxImg); - promptWindow.Append(&titleTxt); - promptWindow.Append(&msgTxt); - promptWindow.Append(&btn1); - - promptWindow.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 50); - HaltGui(); - mainWindow->SetState(STATE_DISABLED); - mainWindow->Append(&promptWindow); - mainWindow->ChangeFocus(&promptWindow); - ResumeGui(); - - while (!IsNetworkInit()) - { - - VIDEO_WaitVSync(); - - Initialize_Network(); - - if (!IsNetworkInit()) - { - msgTxt.SetText(tr( "Could not initialize network!" )); - sleep(3); - success = false; - break; - } - - if (btn1.GetState() == STATE_CLICKED) - { - btn1.ResetState(); - success = false; - break; - } - } - - promptWindow.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50); - while (promptWindow.GetEffect() > 0) - usleep(100); - - HaltGui(); - mainWindow->Remove(&promptWindow); - mainWindow->SetState(STATE_DEFAULT); - ResumeGui(); - - return success; -} - -int CodeDownload(const char *id) -{ - int ret = 0; - - GuiWindow promptWindow(472, 320); - promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - promptWindow.SetPosition(0, -10); - - GuiImageData btnOutline(Resources::GetFile("button_dialogue_box.png"), Resources::GetFileSize("button_dialogue_box.png")); - GuiImageData dialogBox(Resources::GetFile("dialogue_box.png"), Resources::GetFileSize("dialogue_box.png")); - GuiTrigger trigA; - trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - - GuiImage dialogBoxImg(&dialogBox); - if (Settings.wsprompt) - { - dialogBoxImg.SetWidescreen(Settings.widescreen); - } - - char title[50]; - sprintf(title, "%s", tr( "Code Download" )); - GuiText titleTxt(title, 26, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - titleTxt.SetPosition(0, 50); - char msg[50]; - sprintf(msg, "%s", tr( "Initializing Network" )); - GuiText msgTxt(msg, 26, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - msgTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - msgTxt.SetPosition(0, 140); - char msg2[50] = " "; - GuiText msg2Txt(msg2, 26, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - msg2Txt.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - msg2Txt.SetPosition(0, 50); - - GuiText btn1Txt(tr( "Cancel" ), 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - GuiImage btn1Img(&btnOutline); - if (Settings.wsprompt) - { - btn1Txt.SetWidescreen(Settings.widescreen); - btn1Img.SetWidescreen(Settings.widescreen); - } - GuiButton btn1(&btn1Img, &btn1Img, 2, 4, 0, -40, &trigA, btnSoundOver, btnSoundClick2, 1); - btn1.SetLabel(&btn1Txt); - btn1.SetState(STATE_SELECTED); - - promptWindow.Append(&dialogBoxImg); - promptWindow.Append(&titleTxt); - promptWindow.Append(&msgTxt); - promptWindow.Append(&msg2Txt); - promptWindow.Append(&btn1); - - promptWindow.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 50); - - HaltGui(); - mainWindow->SetState(STATE_DISABLED); - mainWindow->Append(&promptWindow); - mainWindow->ChangeFocus(&promptWindow); - ResumeGui(); - - struct stat st; - if (stat(Settings.TxtCheatcodespath, &st) != 0) - { - if (!CreateSubfolder(Settings.TxtCheatcodespath)) - { - WindowPrompt(tr( "Error !" ), tr( "Can't create directory" ), tr( "OK" )); - ret = -1; - goto exit; - } - } - - while (!IsNetworkInit()) - { - - VIDEO_WaitVSync(); - - Initialize_Network(); - - if (IsNetworkInit()) - { - msgTxt.SetText(GetNetworkIP()); - } - else - { - msgTxt.SetText(tr( "Could not initialize network!" )); - } - if (btn1.GetState() == STATE_CLICKED) - { - ret = -1; - btn1.ResetState(); - goto exit; - } - } - - if (IsNetworkInit() && ret >= 0) - { - - char txtpath[150]; - snprintf(txtpath, sizeof(txtpath), "%s%s.txt", Settings.TxtCheatcodespath, id); - - char codeurl[150]; - snprintf(codeurl, sizeof(codeurl), "http://geckocodes.org/codes/R/%s.txt", id); - - struct block file = downloadfile(codeurl); - - if (file.size == 333 || file.size == 216 || file.size == 284) - { - strcat(codeurl, tr( " is not on the server." )); - - WindowPrompt(tr( "Error" ), codeurl, tr( "OK" )); - ret = -1; - goto exit; - } - - if (file.data != NULL) - { - - FILE * pfile; - pfile = fopen(txtpath, "wb"); - fwrite(file.data, 1, file.size, pfile); - fclose(pfile); - free(file.data); - ret = 1; - strcat( - txtpath, - tr( " has been Saved. The text has not been verified. Some of the code may not work right with each other. If you experience trouble, open the text in a real text editor for more information." )); - - WindowPrompt(0, txtpath, tr( "OK" )); - } - else - { - strcat(codeurl, tr( " could not be downloaded." )); - - WindowPrompt(tr( "Error" ), codeurl, tr( "OK" )); - ret = -1; - } - - CloseConnection(); - } - exit: promptWindow.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50); - while (promptWindow.GetEffect() > 0) - usleep(100); - - HaltGui(); - mainWindow->Remove(&promptWindow); - mainWindow->SetState(STATE_DEFAULT); - ResumeGui(); - - return ret; -} - -/**************************************************************************** - * HBCWindowPrompt - * - * Displays a prompt window to user, with information, an error message, or - * presenting a user with a choice of up to 2 Buttons. - * - ***************************************************************************/ -int HBCWindowPrompt(const char *name, const char *coder, const char *version, const char *release_date, - const char *long_description, GuiImageData * iconImgData, u64 filesize) -{ - int choice = -1; - - GuiWindow promptWindow(472, 320); - promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - promptWindow.SetPosition(0, 6); - - GuiTrigger trigA; - trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - GuiTrigger trigB; - trigB.SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B); - GuiTrigger trigU; - trigU.SetButtonOnlyTrigger(-1, WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP, PAD_BUTTON_UP); - GuiTrigger trigD; - trigD.SetButtonOnlyTrigger(-1, WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN, PAD_BUTTON_DOWN); - - GuiImageData btnOutline(Resources::GetFile("button_dialogue_box.png"), Resources::GetFileSize("button_dialogue_box.png")); - GuiImageData dialogBox(Resources::GetFile("dialogue_box.png"), Resources::GetFileSize("dialogue_box.png")); - GuiImageData whiteBox(Resources::GetFile("bg_options.png"), Resources::GetFileSize("bg_options.png")); - - GuiImageData scrollbar(Resources::GetFile("scrollbar.png"), Resources::GetFileSize("scrollbar.png")); - GuiImage scrollbarImg(&scrollbar); - scrollbarImg.SetAlignment(ALIGN_RIGHT, ALIGN_TOP); - scrollbarImg.SetPosition(-40, 114); - scrollbarImg.SetSkew(0, 0, 0, 0, 0, -120, 0, -120); - - GuiImageData arrowDown(Resources::GetFile("scrollbar_arrowdown.png"), Resources::GetFileSize("scrollbar_arrowdown.png")); - GuiImage arrowDownImg(&arrowDown); - arrowDownImg.SetScale(.8); - - GuiImageData arrowUp(Resources::GetFile("scrollbar_arrowup.png"), Resources::GetFileSize("scrollbar_arrowup.png")); - GuiImage arrowUpImg(&arrowUp); - arrowUpImg.SetScale(.8); - - GuiButton arrowUpBtn(arrowUpImg.GetWidth(), arrowUpImg.GetHeight()); - arrowUpBtn.SetImage(&arrowUpImg); - arrowUpBtn.SetAlignment(ALIGN_RIGHT, ALIGN_TOP); - arrowUpBtn.SetPosition(-25, 91); - arrowUpBtn.SetTrigger(&trigA); - arrowUpBtn.SetTrigger(&trigU); - arrowUpBtn.SetEffectOnOver(EFFECT_SCALE, 50, 130); - arrowUpBtn.SetSoundClick(btnSoundClick2); - - GuiButton arrowDownBtn(arrowDownImg.GetWidth(), arrowDownImg.GetHeight()); - arrowDownBtn.SetImage(&arrowDownImg); - arrowDownBtn.SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM); - arrowDownBtn.SetPosition(-25, -27); - arrowDownBtn.SetTrigger(&trigA); - arrowDownBtn.SetTrigger(&trigD); - arrowDownBtn.SetEffectOnOver(EFFECT_SCALE, 50, 130); - arrowDownBtn.SetSoundClick(btnSoundClick2); - - GuiImage *iconImg = new GuiImage(iconImgData); - iconImg->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - iconImg->SetPosition(45, 10); - - GuiImage dialogBoxImg(&dialogBox); - dialogBoxImg.SetSkew(0, -80, 0, -80, 0, 50, 0, 50); - - GuiImage whiteBoxImg(&whiteBox); - whiteBoxImg.SetPosition(0, 110); - whiteBoxImg.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - whiteBoxImg.SetSkew(0, 0, 0, 0, 0, -120, 0, -120); - - GuiText nameTxt(name, 30, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - nameTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - nameTxt.SetPosition(0, -15); - nameTxt.SetMaxWidth(430, SCROLL_HORIZONTAL); - - GuiText coderTxt(fmt(tr( "Coded by: %s" ), coder), 16, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - coderTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - coderTxt.SetPosition(180, 30); - coderTxt.SetMaxWidth(280); - - GuiText versionTxt(fmt(tr( "Version: %s" ), version), 16, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - versionTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - versionTxt.SetPosition(40, 65); - versionTxt.SetMaxWidth(430); - - GuiText release_dateTxt(release_date, 16, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - release_dateTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - release_dateTxt.SetPosition(40, 85); - release_dateTxt.SetMaxWidth(430); - - int pagesize = 6; - Text long_descriptionTxt(long_description, 20, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - long_descriptionTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - long_descriptionTxt.SetPosition(46, 117); - long_descriptionTxt.SetMaxWidth(360); - long_descriptionTxt.SetLinesToDraw(pagesize); - long_descriptionTxt.Refresh(); - - //convert filesize from u64 to char and put unit of measurement after it - char filesizeCH[15]; - if (filesize <= 1024.0) - snprintf(filesizeCH, sizeof(filesizeCH), "%lld B", filesize); - if (filesize > 1024.0) - snprintf(filesizeCH, sizeof(filesizeCH), "%0.2f KB", filesize / 1024.0); - if (filesize > 1048576.0) - snprintf(filesizeCH, sizeof(filesizeCH), "%0.2f MB", filesize / 1048576.0); - - GuiText filesizeTxt(filesizeCH, 16, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - filesizeTxt.SetAlignment(ALIGN_RIGHT, ALIGN_TOP); - filesizeTxt.SetPosition(-40, 12); - - GuiText btn1Txt(tr( "Load" ), 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - GuiImage btn1Img(&btnOutline); - if (Settings.wsprompt) - { - btn1Txt.SetWidescreen(Settings.widescreen); - btn1Img.SetWidescreen(Settings.widescreen); - } - - GuiButton btn1(&btn1Img, &btn1Img, 0, 3, 0, 0, &trigA, btnSoundOver, btnSoundClick2, 1); - btn1.SetLabel(&btn1Txt); - btn1.SetState(STATE_SELECTED); - - GuiText btn2Txt(tr( "Back" ), 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - GuiImage btn2Img(&btnOutline); - if (Settings.wsprompt) - { - btn2Txt.SetWidescreen(Settings.widescreen); - btn2Img.SetWidescreen(Settings.widescreen); - } - GuiButton btn2(&btn2Img, &btn2Img, 0, 3, 0, 0, &trigA, btnSoundOver, btnSoundClick2, 1); - btn2.SetLabel(&btn2Txt); - btn2.SetTrigger(&trigB); - - btn1.SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM); - btn1.SetPosition(40, 2); - btn2.SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM); - btn2.SetPosition(-40, 2); - - promptWindow.Append(&dialogBoxImg); - promptWindow.Append(&whiteBoxImg); - promptWindow.Append(&scrollbarImg); - promptWindow.Append(&arrowDownBtn); - promptWindow.Append(&arrowUpBtn); - - if(strcmp(name, "") != 0) promptWindow.Append(&nameTxt); - if(strcmp(version, "") != 0) promptWindow.Append(&versionTxt); - if(strcmp(coder, "") != 0) promptWindow.Append(&coderTxt); - if(strcmp(release_date, "") != 0) promptWindow.Append(&release_dateTxt); - if(strcmp(long_description, "") != 0) promptWindow.Append(&long_descriptionTxt); - promptWindow.Append(&filesizeTxt); - promptWindow.Append(iconImg); - promptWindow.Append(&btn1); - promptWindow.Append(&btn2); - - promptWindow.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 50); - HaltGui(); - mainWindow->SetState(STATE_DISABLED); - mainWindow->Append(&promptWindow); - mainWindow->ChangeFocus(&promptWindow); - ResumeGui(); - - while (choice == -1) - { - VIDEO_WaitVSync(); - - if (shutdown == 1) - { - wiilight(0); - Sys_Shutdown(); - } - else if (reset == 1) - { - wiilight(0); - Sys_Reboot(); - } - - if (btn1.GetState() == STATE_CLICKED) - choice = 1; - else if (btn2.GetState() == STATE_CLICKED) - choice = 0; - - else if (arrowUpBtn.GetState() == STATE_CLICKED || arrowUpBtn.GetState() == STATE_HELD) - { - long_descriptionTxt.PreviousLine(); - - usleep(6000); - if (!((ButtonsHold() & WPAD_BUTTON_UP) || (ButtonsHold() & PAD_BUTTON_UP))) arrowUpBtn.ResetState(); - } - else if (arrowDownBtn.GetState() == STATE_CLICKED || arrowDownBtn.GetState() == STATE_HELD) - { - long_descriptionTxt.NextLine(); - - usleep(60000); - if (!((ButtonsHold() & WPAD_BUTTON_DOWN) || (ButtonsHold() & PAD_BUTTON_DOWN))) arrowDownBtn.ResetState(); - } - } - - promptWindow.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50); - while (promptWindow.GetEffect() > 0) - usleep(100); - HaltGui(); - mainWindow->Remove(&promptWindow); - mainWindow->SetState(STATE_DEFAULT); - ResumeGui(); - - delete iconImg; - - return choice; -} - diff --git a/source/prompts/PromptWindows.h b/source/prompts/PromptWindows.h deleted file mode 100644 index 7f58570b..00000000 --- a/source/prompts/PromptWindows.h +++ /dev/null @@ -1,28 +0,0 @@ -/**************************************************************************** - * PromptWindows - * USB Loader GX 2009 - * - * PromptWindows.h - ***************************************************************************/ - -#ifndef _PROMPTWINDOWS_H_ -#define _PROMPTWINDOWS_H_ - -#include "libwiigui/gui.h" - -int WindowPrompt(const char *title, const char *msg = NULL, const char * btn1Label = NULL, const char * btn2Label = - NULL, const char * btn3Label = NULL, const char * btn4Label = NULL, int wait = -1); - -void WindowCredits(); -int OnScreenKeyboard(char * var, u32 maxlen, int min); -int OnScreenNumpad(char * var, u32 maxlen); -int WindowExitPrompt(); -int DiscWait(const char *title, const char *msg, const char *btn1Label, const char *btn2Label, int IsDeviceWait); -int FormatingPartition(const char *title, int part_num); -bool NetworkInitPrompt(); -int WindowScreensaver(); -int CodeDownload(const char *id); -int HBCWindowPrompt(const char *name, const char *coder, const char *version, const char *release_date, - const char *long_description, GuiImageData * iconImgData, u64 filesize); - -#endif diff --git a/source/prompts/TitleBrowser.cpp b/source/prompts/TitleBrowser.cpp deleted file mode 100644 index 04c78ad2..00000000 --- a/source/prompts/TitleBrowser.cpp +++ /dev/null @@ -1,654 +0,0 @@ -/**************************************************************************** - * TitleBrowser - * USB Loader GX 2009 - * - * TitleBrowser.cpp *giantpune* - ***************************************************************************/ - -#include -#include - -#include "language/gettext.h" -#include "libwiigui/gui.h" -#include "libwiigui/gui_customoptionbrowser.h" -#include "prompts/PromptWindows.h" -#include "prompts/ProgressWindow.h" -#include "network/networkops.h" -#include "network/http.h" -#include "FileOperations/fileops.h" -#include "themes/CTheme.h" -#include "sys.h" -#include "menu.h" -#include "audio.h" -#include "wad/wad.h" -#include "xml/xml.h" -#include "wad/nandtitle.h" -#include "../usbloader/utils.h" -#include "../gecko.h" - -u32 titleCnt; -extern u32 infilesize; -extern u32 uncfilesize; -extern char wiiloadVersion[2]; - -/*** Extern functions ***/ -extern void ResumeGui(); -extern void HaltGui(); - -/*** Extern variables ***/ -extern GuiWindow * mainWindow; -extern u8 shutdown; -extern u8 reset; -extern u32 infilesize; -extern wchar_t *gameFilter; - -/******************************************************************************** - * TitleBrowser- opens a browser with a list of installed Titles - *********************************************************************************/ -bool TitleSelector(char output[]) -{ - gprintf("TitleSelector()\n"); - - s32 num_titles; - s32 r = -1; - bool ret = false; - u64 *titleList = NULL; - - ISFS_Initialize();//initialize for "titles.Exists()" - - // Get count of titles of the good titles - num_titles = NandTitles.SetType(0x10001); - u32 n = num_titles; - //gprintf("num_titles: %u\n", num_titles ); - for (u32 i = 0; i < n; i++) - { - u64 tid = NandTitles.Next(); - if (!tid) - { - break; - } - - //remove ones not actually installed on the nand - if (!NandTitles.Exists(tid)) - { - num_titles--; - } - } - //gprintf("num_titles: %u\n", num_titles ); - - //make a list of just the tids we are adding to the titlebrowser - titleList = (u64*) memalign(32, num_titles * sizeof(u64)); - if (!titleList) - { - gprintf("TitleLister(): out of memory!\n"); - return false; - } - OptionList options4; - //write the titles on the option browser - - s32 i = 0; - NandTitles.SetType(0x10001); - while (i < num_titles) - { - u64 tid = NandTitles.Next(); - if (!tid) - { - gprintf("shit happened\n"); - break; - } - - if (!NandTitles.Exists(tid)) - { - continue; - } - - char id[5]; - NandTitles.AsciiTID(tid, (char*) &id); - - const char* name = NandTitles.NameOf(tid); - //gprintf("%016llx: %s: %s\n%p\t%p\n", tid, id, name, &id, name ); - - options4.SetName(i, "%s", id); - options4.SetValue(i, "%s", name ? NandTitles.NameOf(tid) : tr( "Unknown" )); - titleList[i] = tid; - i++; - } - // gprintf("i: %u\n", i ); - //hexdump( titleList, num_titles * sizeof( u64 ) ); - - options4.SetName(i, " "); - options4.SetValue(i, "%s", tr( "Clear" )); - - ISFS_Deinitialize(); - - bool exit = false; - - GuiImageData btnOutline(Resources::GetFile("button_dialogue_box.png"), Resources::GetFileSize("button_dialogue_box.png")); - GuiImageData settingsbg(Resources::GetFile("settings_background.png"), Resources::GetFileSize("settings_background.png")); - - GuiImage settingsbackground(&settingsbg); - GuiButton settingsbackgroundbtn(settingsbackground.GetWidth(), settingsbackground.GetHeight()); - settingsbackgroundbtn.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - settingsbackgroundbtn.SetPosition(0, 0); - settingsbackgroundbtn.SetImage(&settingsbackground); - - GuiTrigger trigA; - trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - GuiTrigger trigB; - trigB.SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B); - - GuiText cancelBtnTxt(tr( "Back" ), 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - cancelBtnTxt.SetMaxWidth(btnOutline.GetWidth() - 30); - GuiImage cancelBtnImg(&btnOutline); - if (Settings.wsprompt) - { - cancelBtnTxt.SetWidescreen(Settings.widescreen); - cancelBtnImg.SetWidescreen(Settings.widescreen); - } - GuiButton cancelBtn(&cancelBtnImg, &cancelBtnImg, 2, 3, 180, 400, &trigA, btnSoundOver, btnSoundClick2, 1); - cancelBtn.SetLabel(&cancelBtnTxt); - cancelBtn.SetTrigger(&trigB); - - GuiCustomOptionBrowser optionBrowser4(396, 280, &options4, "bg_options_settings.png"); - optionBrowser4.SetPosition(0, 90); - optionBrowser4.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - - HaltGui(); - GuiWindow w(screenwidth, screenheight); - w.Append(&settingsbackgroundbtn); - w.Append(&cancelBtn); - w.Append(&optionBrowser4); - mainWindow->SetState(STATE_DISABLED); - mainWindow->Append(&w); - - ResumeGui(); - - while (!exit) - { - VIDEO_WaitVSync(); - - if (shutdown == 1) Sys_Shutdown(); - if (reset == 1) Sys_Reboot(); - - r = optionBrowser4.GetClickedOption(); - - if (r > -1) - { //if a click happened - if (r < num_titles) - { - u64 tid = titleList[r]; - sprintf(output, "%08x", TITLE_LOWER( tid )); - } - else output[0] = 0; - ret = true; - exit = true; - } - - else if (cancelBtn.GetState() == STATE_CLICKED) - { - //break the loop and end the function - exit = true; - } - } - - HaltGui(); - mainWindow->SetState(STATE_DEFAULT); - mainWindow->Remove(&w); - free(titleList); - ResumeGui(); - - return ret; -} - -int TitleBrowser() -{ - - u32 num_titles; - u32 num_sys_titles; - s32 ret = -1; - u64 *titleList = NULL; - - ISFS_Initialize();//initialize for "titles.Exists()" - - // Get count of titles of the good titles - num_titles = NandTitles.SetType(0x10001); - u32 n = num_titles; - for (u32 i = 0; i < n; i++) - { - u64 tid = NandTitles.Next(); - if (!tid) - { - break; - } - - //remove ones not actually installed on the nand - if (!NandTitles.Exists(tid)) - { - num_titles--; - } - } - - // Get count of system titles - num_sys_titles = NandTitles.SetType(0x10002); - n = num_sys_titles; - for (u32 i = 0; i < n; i++) - { - u64 tid = NandTitles.Next(); - if (!tid) - { - break; - } - //these can't be booted anyways - if (TITLE_LOWER( tid ) == 0x48414741 || TITLE_LOWER( tid ) == 0x48414141 || TITLE_LOWER( tid ) == 0x48414641) - { - num_sys_titles--; - continue; - } - - //these aren't installed on the nand - if (!NandTitles.Exists(tid)) - { - num_sys_titles--; - } - } - - //make a list of just the tids we are adding to the titlebrowser - titleList = (u64*) memalign(32, (num_titles + num_sys_titles) * sizeof(u64)); - if (!titleList) - { - gprintf("TitleBrowser(): out of memory!\n"); - return -1; - } - OptionList options3; - //write the titles on the option browser - - u32 i = 0; - NandTitles.SetType(0x10001); - //first add the good stuff - while (i < num_titles) - { - u64 tid = NandTitles.Next(); - if (!tid) - { - gprintf("shit happened3\n"); - break; - } - gprintf("[ %u ] tid: %016llx\t%s\n", i, tid, NandTitles.NameOf(tid)); - - if (!NandTitles.Exists(tid)) - { - continue; - } - - char id[5]; - NandTitles.AsciiTID(tid, (char*) &id); - - const char* name = NandTitles.NameOf(tid); - - options3.SetName(i, "%s", id); - options3.SetValue(i, "%s", name ? NandTitles.NameOf(tid) : tr( "Unknown" )); - titleList[i] = tid; - i++; - } - - NandTitles.SetType(0x10002); - while (i < num_sys_titles + num_titles) - { - u64 tid = NandTitles.Next(); - if (!tid) - { - break; - } - if (TITLE_LOWER( tid ) == 0x48414741 || TITLE_LOWER( tid ) == 0x48414141 || TITLE_LOWER( tid ) == 0x48414641) continue; - - if (!NandTitles.Exists(tid)) - { - continue; - } - - char id[5]; - NandTitles.AsciiTID(tid, (char*) &id); - const char* name = NandTitles.NameOf(tid); - - options3.SetName(i, "%s", id); - options3.SetValue(i, "%s", name ? NandTitles.NameOf(tid) : tr( "Unknown" )); - titleList[i] = tid; - i++; - } - - ISFS_Deinitialize(); - - if (i == num_titles + num_sys_titles) - { - options3.SetName(i, " "); - options3.SetValue(i, "%s", tr( "Wii Settings" )); - } - - bool exit = false; - int total = num_titles + num_sys_titles; - - if (IsNetworkInit()) ResumeNetworkWait(); - - GuiImageData btnOutline(Resources::GetFile("button_dialogue_box.png"), Resources::GetFileSize("button_dialogue_box.png")); - GuiImageData settingsbg(Resources::GetFile("settings_background.png"), Resources::GetFileSize("settings_background.png")); - - GuiTrigger trigA; - trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - GuiTrigger trigHome; - trigHome.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0); - GuiTrigger trigB; - trigB.SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B); - - GuiText titleTxt(tr( "Title Launcher" ), 28, ( GXColor ) - { 0, 0, 0, 255}); - titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - titleTxt.SetPosition(12, 40); - titleTxt.SetMaxWidth(356, SCROLL_HORIZONTAL); - - GuiImage settingsbackground(&settingsbg); - GuiButton settingsbackgroundbtn(settingsbackground.GetWidth(), settingsbackground.GetHeight()); - settingsbackgroundbtn.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - settingsbackgroundbtn.SetPosition(0, 0); - settingsbackgroundbtn.SetImage(&settingsbackground); - - GuiText cancelBtnTxt(tr( "Back" ), 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - cancelBtnTxt.SetMaxWidth(btnOutline.GetWidth() - 30); - GuiImage cancelBtnImg(&btnOutline); - if (Settings.wsprompt) - { - cancelBtnTxt.SetWidescreen(Settings.widescreen); - cancelBtnImg.SetWidescreen(Settings.widescreen); - } - GuiButton cancelBtn(&cancelBtnImg, &cancelBtnImg, 2, 3, 180, 400, &trigA, btnSoundOver, btnSoundClick2, 1); - cancelBtn.SetScale(0.9); - cancelBtn.SetLabel(&cancelBtnTxt); - cancelBtn.SetTrigger(&trigB); - - GuiCustomOptionBrowser optionBrowser3(396, 280, &options3, "bg_options_settings.png"); - optionBrowser3.SetPosition(0, 90); - optionBrowser3.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - - GuiImageData wifiImgData(Resources::GetFile("Wifi_btn.png"), Resources::GetFileSize("Wifi_btn.png")); - GuiImage wifiImg(&wifiImgData); - if (Settings.wsprompt) - { - wifiImg.SetWidescreen(Settings.widescreen); - } - GuiButton wifiBtn(wifiImg.GetWidth(), wifiImg.GetHeight()); - wifiBtn.SetImage(&wifiImg); - wifiBtn.SetPosition(100, 400); - wifiBtn.SetEffectGrow(); - wifiBtn.SetAlpha(80); - wifiBtn.SetTrigger(&trigA); - - HaltGui(); - GuiWindow w(screenwidth, screenheight); - w.Append(&settingsbackgroundbtn); - w.Append(&titleTxt); - w.Append(&cancelBtn); - w.Append(&wifiBtn); - w.Append(&optionBrowser3); - mainWindow->Append(&w); - - ResumeGui(); - - while (!exit) - { - VIDEO_WaitVSync(); - - if (shutdown == 1) Sys_Shutdown(); - if (reset == 1) - Sys_Reboot(); - - else if (wifiBtn.GetState() == STATE_CLICKED) - { - ResumeNetworkWait(); - wifiBtn.ResetState(); - } - - if (IsNetworkInit()) - { - wifiBtn.SetAlpha(255); - } - - ret = optionBrowser3.GetClickedOption(); - - if (ret > -1) - { //if a click happened - - if (ret < total) - { - //set the title's name, number, ID to text - char text[0x100]; - char id[5]; - NandTitles.AsciiTID(titleList[ret], (char*) &id); - - snprintf(text, sizeof(text), "%s : %s", id, NandTitles.NameOf(titleList[ret])); - - //prompt to boot selected title - if (WindowPrompt(tr( "Boot?" ), text, tr( "OK" ), tr( "Cancel" ))) - { //if they say yes - CloseXMLDatabase(); - ExitGUIThreads(); - ShutdownAudio(); - StopGX(); - WII_Initialize(); - WII_LaunchTitle(titleList[ret]); - //this really shouldn't be needed because the title will be booted - exit = true; - break; - } - else - { - //if they said no to booting the title - ret = -1; - optionBrowser3.ResetState(); - } - - } - else if (ret == total) - { //if they clicked to go to the wii settings - CloseXMLDatabase(); - ExitGUIThreads(); - ShutdownAudio(); - StopGX(); - WII_Initialize(); - WII_ReturnToSettings(); - } - } -#if 0 - if ( infilesize > 0 ) - { - - char filesizetxt[50]; - char temp[50]; - char filepath[100]; - // u32 read = 0; - - //make sure there is a folder for this to be saved in - struct stat st; - snprintf( filepath, sizeof( filepath ), "%s/wad/", bootDevice ); - if ( stat( filepath, &st ) != 0 ) - { - if ( subfoldercreate( filepath ) != 1 ) - { - WindowPrompt( tr( "Error !" ), tr( "Can't create directory" ), tr( "OK" ) ); - } - } - snprintf( filepath, sizeof( filepath ), "%s/wad/tmp.tmp", bootDevice ); - - if ( infilesize < MB_SIZE ) - snprintf( filesizetxt, sizeof( filesizetxt ), tr( "Incoming file %0.2fKB" ), infilesize / KB_SIZE ); - else - snprintf( filesizetxt, sizeof( filesizetxt ), tr( "Incoming file %0.2fMB" ), infilesize / MB_SIZE ); - - snprintf( temp, sizeof( temp ), tr( "Load file from: %s ?" ), GetIncommingIP() ); - - int choice = WindowPrompt( filesizetxt, temp, tr( "OK" ), tr( "Cancel" ) ); - gprintf( "\nchoice:%d", choice ); - - if ( choice == 1 ) - { - - u32 read = 0; - u8 *temp = NULL; - int len = NETWORKBLOCKSIZE; - temp = ( u8 * ) malloc( infilesize ); - - bool error = false; - u8 *ptr = temp; - gprintf( "\nrecieving shit" ); - while ( read < infilesize ) - { - - ShowProgress( tr( "Receiving file from:" ), GetIncommingIP(), NULL, read, infilesize, true ); - - if ( infilesize - read < ( u32 ) len ) - len = infilesize - read; - else - len = NETWORKBLOCKSIZE; - - int result = network_read( ptr, len ); - - if ( result < 0 ) - { - WindowPrompt( tr( "Error while transfering data." ), 0, tr( "OK" ) ); - error = true; - break; - } - if ( !result ) - { - gprintf( "\n!RESULT" ); - break; - } - ptr += result; - read += result; - } - ProgressStop(); - - char filename[101]; - char tmptxt[200]; - - //bool installWad=0; - if ( !error ) - { - gprintf( "\nno error yet" ); - - network_read( ( u8* ) &filename, 100 ); - gprintf( "\nfilename: %s", filename ); - - // Do we need to unzip this thing? - if ( wiiloadVersion[0] > 0 || wiiloadVersion[1] > 4 ) - { - gprintf( "\nusing newer wiiload version" ); - - if ( uncfilesize != 0 ) // if uncfilesize == 0, it's not compressed - - { - gprintf( "\ntrying to uncompress" ); - // It's compressed, uncompress - u8 *unc = ( u8 * ) malloc( uncfilesize ); - uLongf f = uncfilesize; - error = uncompress( unc, &f, temp, infilesize ) != Z_OK; - uncfilesize = f; - - free( temp ); - temp = unc; - } - } - - if ( !error ) - { - sprintf( tmptxt, "%s", filename ); - //if we got a wad - if ( strcasestr( tmptxt, ".wad" ) ) - { - FILE *file = fopen( filepath, "wb" ); - fwrite( temp, 1, ( uncfilesize > 0 ? uncfilesize : infilesize ), file ); - fclose( file ); - - sprintf( tmptxt, "%s/wad/%s", bootDevice, filename ); - if ( checkfile( tmptxt ) )remove( tmptxt ); - rename( filepath, tmptxt ); - - //check and make sure the wad we just saved is the correct size - u32 lSize; - file = fopen( tmptxt, "rb" ); - - // obtain file size: - fseek ( file , 0 , SEEK_END ); - lSize = ftell ( file ); - - rewind ( file ); - if ( lSize == ( uncfilesize > 0 ? uncfilesize : infilesize ) ) - { - gprintf( "\nsize is ok" ); - int pick = WindowPrompt( tr( " Wad Saved as:" ), tmptxt, tr( "Install" ), tr( "Uninstall" ), tr( "Cancel" ) ); - //install or uninstall it - if ( pick == 1 ) - { - HaltGui(); - w.Remove( &titleTxt ); - w.Remove( &cancelBtn ); - w.Remove( &wifiBtn ); - w.Remove( &optionBrowser3 ); - ResumeGui(); - - Wad_Install( file ); - - HaltGui(); - w.Append( &titleTxt ); - w.Append( &cancelBtn ); - w.Append( &wifiBtn ); - w.Append( &optionBrowser3 ); - ResumeGui(); - - } - if ( pick == 2 )Wad_Uninstall( file ); - } - else gprintf( "\nBad size" ); - //close that beast, we're done with it - fclose ( file ); - - //do we want to keep the file in the wad folder - if ( WindowPrompt( tr( "Delete ?" ), tmptxt, tr( "Delete" ), tr( "Keep" ) ) != 0 ) - remove( tmptxt ); - } - else - { - WindowPrompt( tr( "ERROR:" ), tr( "Not a WAD file." ), tr( "OK" ) ); - } - } - } - - if ( error || read != infilesize ) - { - WindowPrompt( tr( "Error:" ), tr( "No data could be read." ), tr( "OK" ) ); - - } - if ( temp )free( temp ); - } - - CloseConnection(); - ResumeNetworkWait(); - } -#endif - if (cancelBtn.GetState() == STATE_CLICKED) - { - //break the loop and end the function - exit = true; - ret = -10; - } - } - - CloseConnection(); - if (IsNetworkInit()) HaltNetworkThread(); - - HaltGui(); - mainWindow->Remove(&w); - free(titleList); - ResumeGui(); - - return ret; -} - diff --git a/source/prompts/TitleBrowser.h b/source/prompts/TitleBrowser.h deleted file mode 100644 index cd15cc3c..00000000 --- a/source/prompts/TitleBrowser.h +++ /dev/null @@ -1,14 +0,0 @@ -/**************************************************************************** - * TitleBrowser - * USB Loader GX 2009 - * - * TitleBrowser.h - ***************************************************************************/ - -#ifndef _TITLEBROWSER_H_ -#define _TITLEBROWSER_H_ - -int TitleBrowser(); -bool TitleSelector(char output[]); - -#endif diff --git a/source/prompts/filebrowser.cpp b/source/prompts/filebrowser.cpp deleted file mode 100644 index 5aeea416..00000000 --- a/source/prompts/filebrowser.cpp +++ /dev/null @@ -1,551 +0,0 @@ -/**************************************************************************** - * libwiigui Template - * Tantric 2009 - * - * modified by dimok - * - * filebrowser.cpp - * - * Generic file routines - reading, writing, browsing - ***************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "menu.h" - -#include "themes/CTheme.h" -#include "FileOperations/fileops.h" -#include "language/gettext.h" -#include "PromptWindows.h" -#include "libwiigui/gui.h" -#include "sys.h" -#include "filebrowser.h" - -/*** Extern variables ***/ -extern GuiWindow * mainWindow; -extern u8 shutdown; -extern u8 reset; - -/*** Extern functions ***/ -extern void ResumeGui(); -extern void HaltGui(); - -static int curDevice = -1; -static std::vector browsers; -BROWSERINFO *browser = NULL; - -/**************************************************************************** - * FileFilterCallbacks - * return: 1-visible 0-hidden - ***************************************************************************/ -int noDIRS(BROWSERENTRY *Entry, void* Args) -{ - return !Entry->isdir; -} -int noFILES(BROWSERENTRY *Entry, void* Args) -{ - return Entry->isdir; -} -int noEXT(BROWSERENTRY *Entry, void* Args) -{ - if (!Entry->isdir) - { - char *cptr = strrchr(Entry->displayname, '.'); - if (cptr && cptr != Entry->displayname) *cptr = 0; - } - return 1; -} - -void ResetBrowser(BROWSERINFO *browser); -/**************************************************************************** - * InitBrowsers() - * Clears the file browser memory, and allocates one initial entry - ***************************************************************************/ -int InitBrowsers() -{ - curDevice = -1; - browsers.clear(); - browser = NULL; - char rootdir[ROOTDIRLEN]; - for (int i = 3; i < STD_MAX; i++) - { - if (strcmp(devoptab_list[i]->name, "stdnull") && devoptab_list[i]->write_r != NULL) - { - if(Settings.USBPort == 2 && strcmp(devoptab_list[i]->name, "sd") != 0) - continue; - - snprintf(rootdir, sizeof(rootdir), "%s:/", devoptab_list[i]->name); - if ( DIR *dir = opendir( rootdir ) ) - { - closedir(dir); - BROWSERINFO browser; - browser.dir[0] = '\0'; - strcpy(browser.rootdir, rootdir); - ResetBrowser(&browser); - browsers.push_back(browser); - } - } - } - if (!browsers.size()) return -1; - curDevice = 0; - browser = &browsers[curDevice]; - return 0; -} -/**************************************************************************** - * ResetBrowser() - * Clears the file browser memory, and allocates one initial entry - ***************************************************************************/ -void ResetBrowser(BROWSERINFO *browser) -{ - browser->pageIndex = 0; - browser->browserList.clear(); - /* - // Clear any existing values - if (browser->browserList != NULL) { - free(browser->browserList); - browser->browserList = NULL; - } - // set aside space for 1 entry - browser->browserList = (BROWSERENTRY *)malloc(sizeof(BROWSERENTRY)); - if(browser->browserList) - memset(browser->browserList, 0, sizeof(BROWSERENTRY)); - */ -} - -/**************************************************************************** - * FileSortCallback - * - * sort callback to sort file entries with the following order: - * . - * .. - * - * - ***************************************************************************/ -//int FileSortCallback(const void *f1, const void *f2) { -bool operator<(const BROWSERENTRY &f1, const BROWSERENTRY &f2) -{ - /* Special case for implicit directories */ - if (f1.filename[0] == '.' || f2.filename[0] == '.') - { - if (strcmp(f1.filename, ".") == 0) - { - return true; - } - if (strcmp(f2.filename, ".") == 0) - { - return false; - } - if (strcmp(f1.filename, "..") == 0) - { - return true; - } - if (strcmp(f2.filename, "..") == 0) - { - return false; - } - } - - /* If one is a file and one is a directory the directory is first. */ - if (f1.isdir && !(f2.isdir)) return true; - if (!(f1.isdir) && f2.isdir) return false; - - return stricmp(f1.filename, f2.filename) < 0; -} - -int ParseFilter(FILTERCASCADE *Filter, BROWSERENTRY* Entry) -{ - while (Filter) - { - if (Filter->filter && Filter->filter(Entry, Filter->filter_args) == 0) return 0; - Filter = Filter->next; - } - return 1; -} -/*************************************************************************** - * Browse subdirectories - **************************************************************************/ -int ParseDirectory(const char* Path, int Flags, FILTERCASCADE *Filter) -{ - DIR *dir = NULL; - char fulldir[MAXPATHLEN]; - char filename[MAXPATHLEN]; - struct stat filestat; - unsigned int i; - - if (curDevice == -1) if (InitBrowsers()) return -1; // InitBrowser fails - - if (Path) // note in this codeblock use filename temporary - { - strlcpy(fulldir, Path, sizeof(fulldir)); - if (*fulldir && fulldir[strlen(fulldir) - 1] != '/') // a file - { - char * chrp = strrchr(fulldir, '/'); - if (chrp) chrp[1] = 0; - } - if (strchr(fulldir, ':') == NULL) // Path has no device device - { - getcwd(filename, sizeof(filename)); // save the current working dir - if (*fulldir == 0) // if path is empty - strlcpy(fulldir, filename, sizeof(fulldir)); // we use the current working dir - else - { // path is not empty - if (chdir(fulldir)) // sets the path to concatenate and validate - { - if (Flags & (FB_TRYROOTDIR | FB_TRYSTDDEV)) - { - if (chdir("/") && !(Flags & FB_TRYSTDDEV)) // try to set root if is needed - return -1; - } - } - if (getcwd(fulldir, sizeof(fulldir))) return -1; // gets the concatenated current working dir - chdir(filename); // restore the saved cwd - } - } - for (i = 0; i < browsers.size(); i++) // searchs the browser who match the path - { - if (strnicmp(fulldir, browsers[i].rootdir, strlen(browsers[i].rootdir) - 1 /*means without trailing '/'*/) - == 0) - { - browser = &browsers[curDevice]; - break; - } - } - if (i != browsers.size()) // found browser - { - curDevice = i; - browser = &browsers[curDevice]; - strcpy(browser->dir, &fulldir[strlen(browser->rootdir)]); - } - else if (Flags & FB_TRYSTDDEV) - { - curDevice = 0; - browser = &browsers[curDevice]; // when no browser was found and - browser->dir[0] = 0; // we alowed try StdDevice and try RootDir - strlcpy(fulldir, browser->rootdir, sizeof(fulldir)); // set the first browser with root-dir - } - else return -1; - } - else snprintf(fulldir, sizeof(fulldir), "%s%s", browser->rootdir, browser->dir); - - // reset browser - ResetBrowser(browser); - - // open the directory - if ((dir = opendir(fulldir)) == NULL) - { - if (Flags & FB_TRYROOTDIR) - { - snprintf(fulldir, sizeof(fulldir), browser->rootdir); - browser->dir[0] = 0; - if ((dir = opendir(browser->rootdir)) == NULL) return -1; - } - else return -1; - } - - struct dirent *dirent = NULL; - - while ((dirent = readdir(dir)) != 0) - { - snprintf(filename, sizeof(filename), "%s/%s", fulldir, dirent->d_name); - if(stat(filename, &filestat) != 0) - continue; - - snprintf(filename, sizeof(filename), dirent->d_name); - - if (strcmp(filename, ".") != 0) - { - BROWSERENTRY newEntry; - memset(&newEntry, 0, sizeof(BROWSERENTRY)); // clear the new entry - strlcpy(newEntry.filename, filename, sizeof(newEntry.filename)); - strlcpy(newEntry.displayname, filename, sizeof(newEntry.displayname)); - newEntry.length = filestat.st_size; - newEntry.isdir = (filestat.st_mode & S_IFDIR) == 0 ? 0 : 1; // flag this as a dir - if (ParseFilter(Filter, &newEntry)) browser->browserList.push_back(newEntry); - } - } - - // close directory - closedir(dir); - - // Sort the file list - std::sort(browser->browserList.begin(), browser->browserList.end()); - return 0; -} -int ParseDirectory(int Device, int Flags, FILTERCASCADE *Filter) -{ - if (Device >= 0 && Device < (int) browsers.size()) - { - int old_curDevice = curDevice; - curDevice = Device; - browser = &browsers[curDevice]; - if (ParseDirectory((char*) NULL, Flags, Filter) == 0) return 0; - curDevice = old_curDevice; - browser = &browsers[old_curDevice]; - } - return -1; -} - -/**************************************************************************** - * BrowseDevice - * Displays a list of files on the selected path - ***************************************************************************/ -int BrowseDevice(char * Path, int Path_size, int Flags, FILTERCASCADE *Filter/*=NULL*/) -{ - int result = -1; - int i; - - if (InitBrowsers() || ParseDirectory(Path, Flags, Filter)) - { - WindowPrompt(tr( "Error" ), 0, tr( "OK" )); - return -1; - } - int menu = MENU_NONE; - - GuiTrigger trigA; - trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - GuiTrigger trigB; - trigB.SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B); - - GuiImageData folderImgData(Resources::GetFile("icon_folder.png"), Resources::GetFileSize("icon_folder.png")); - GuiImage folderImg(&folderImgData); - GuiButton folderBtn(folderImg.GetWidth(), folderImg.GetHeight()); - folderBtn.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - folderBtn.SetPosition(-210, -145); - folderBtn.SetImage(&folderImg); - folderBtn.SetTrigger(&trigA); - folderBtn.SetEffectGrow(); - - GuiImageData btnOutline(Resources::GetFile("button_dialogue_box.png"), Resources::GetFileSize("button_dialogue_box.png")); - GuiText ExitBtnTxt(tr( "Cancel" ), 24, ( GXColor ) {0, 0, 0, 255}); - GuiImage ExitBtnImg(&btnOutline); - if (Settings.wsprompt) - { - ExitBtnTxt.SetWidescreen(Settings.widescreen); - ExitBtnImg.SetWidescreen(Settings.widescreen); - } - GuiButton ExitBtn(btnOutline.GetWidth(), btnOutline.GetHeight()); - ExitBtn.SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM); - ExitBtn.SetPosition(-40, -35); - ExitBtn.SetLabel(&ExitBtnTxt); - ExitBtn.SetImage(&ExitBtnImg); - ExitBtn.SetTrigger(&trigA); - ExitBtn.SetTrigger(&trigB); - ExitBtn.SetEffectGrow(); - - GuiText usbBtnTxt(browsers[(curDevice + 1) % browsers.size()].rootdir, 24, ( GXColor ) {0, 0, 0, 255}); - GuiImage usbBtnImg(&btnOutline); - if (Settings.wsprompt) - { - usbBtnTxt.SetWidescreen(Settings.widescreen); - usbBtnImg.SetWidescreen(Settings.widescreen); - } - GuiButton usbBtn(btnOutline.GetWidth(), btnOutline.GetHeight()); - usbBtn.SetAlignment(ALIGN_CENTRE, ALIGN_BOTTOM); - usbBtn.SetPosition(0, -35); - usbBtn.SetLabel(&usbBtnTxt); - usbBtn.SetImage(&usbBtnImg); - usbBtn.SetTrigger(&trigA); - usbBtn.SetEffectGrow(); - - GuiText okBtnTxt(tr( "OK" ), 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - GuiImage okBtnImg(&btnOutline); - if (Settings.wsprompt) - { - okBtnTxt.SetWidescreen(Settings.widescreen); - okBtnImg.SetWidescreen(Settings.widescreen); - } - GuiButton okBtn(&okBtnImg, &okBtnImg, 0, 4, 40, -35, &trigA, btnSoundOver, btnSoundClick2, 1); - okBtn.SetLabel(&okBtnTxt); - - GuiFileBrowser fileBrowser(396, 248); - fileBrowser.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - fileBrowser.SetPosition(0, 120); - - GuiImageData Address(Resources::GetFile("addressbar_textbox.png"), Resources::GetFileSize("addressbar_textbox.png")); - GuiText AdressText((char*) NULL, 20, ( GXColor ) {0, 0, 0, 255}); - AdressText.SetTextf("%s%s", browser->rootdir, browser->dir); - AdressText.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - AdressText.SetPosition(20, 0); - AdressText.SetMaxWidth(Address.GetWidth() - 40, SCROLL_HORIZONTAL); - GuiImage AdressbarImg(&Address); - GuiButton Adressbar(Address.GetWidth(), Address.GetHeight()); - Adressbar.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - Adressbar.SetPosition(0, fileBrowser.GetTop() - 45); - Adressbar.SetImage(&AdressbarImg); - Adressbar.SetLabel(&AdressText); - - HaltGui(); - GuiWindow w(screenwidth, screenheight); - w.Append(&ExitBtn); - // w.Append(&titleTxt); - w.Append(&fileBrowser); - w.Append(&Adressbar); - w.Append(&okBtn); - if (!(Flags & FB_NOFOLDER_BTN)) w.Append(&folderBtn); - if (browsers.size() > 1 && !(Flags & FB_NODEVICE_BTN)) w.Append(&usbBtn); - mainWindow->Append(&w); - ResumeGui(); - int clickedIndex = -1; - while (menu == MENU_NONE) - { - VIDEO_WaitVSync(); - - if (shutdown == 1) Sys_Shutdown(); - - if (reset == 1) Sys_Reboot(); - - for (i = 0; i < FILEBROWSERSIZE; i++) - { - if (fileBrowser.fileList[i]->GetState() == STATE_CLICKED) - { - fileBrowser.fileList[i]->ResetState(); - - clickedIndex = browser->pageIndex + i; - bool pathCanged = false; - // check corresponding browser entry - if (browser->browserList[clickedIndex].isdir) - { - /* go up to parent directory */ - if (strcmp(browser->browserList[clickedIndex].filename, "..") == 0) - { - /* remove last subdirectory name */ - int len = strlen(browser->dir); - while (browser->dir[0] && browser->dir[len - 1] == '/') - browser->dir[--len] = '\0'; // remove all trailing '/' - char *cptr = strrchr(browser->dir, '/'); - if (cptr) - *++cptr = 0; - else browser->dir[0] = '\0'; // remove trailing dir - pathCanged = true; - } - /* Open a directory */ - /* current directory doesn't change */ - else if (strcmp(browser->browserList[clickedIndex].filename, ".")) - { - /* test new directory namelength */ - if ((strlen(browser->dir) + strlen(browser->browserList[clickedIndex].filename) + 1/*'/'*/) - < MAXPATHLEN) - { - /* update current directory name */ - sprintf(browser->dir, "%s%s/", browser->dir, browser->browserList[clickedIndex].filename); - pathCanged = true; - } - } - if (pathCanged) - { - LOCK( &fileBrowser ); - ParseDirectory((char*) NULL, Flags, Filter); - fileBrowser.ResetState(); - fileBrowser.TriggerUpdate(); - AdressText.SetTextf("%s%s", browser->rootdir, browser->dir); - } - clickedIndex = -1; - } - else /* isFile */ - { - AdressText.SetTextf("%s%s%s", browser->rootdir, browser->dir, - browser->browserList[clickedIndex].filename); - } - } - } - - if (ExitBtn.GetState() == STATE_CLICKED) - { - result = 0; - break; - } - else if (okBtn.GetState() == STATE_CLICKED) - { - if (clickedIndex >= 0) - snprintf(Path, Path_size, "%s%s%s", browser->rootdir, browser->dir, - browser->browserList[clickedIndex].filename); - else snprintf(Path, Path_size, "%s%s", browser->rootdir, browser->dir); - result = 1; - break; - } - else if (usbBtn.GetState() == STATE_CLICKED) - { - usbBtn.ResetState(); - for (u32 i = 1; i < browsers.size(); i++) - { - LOCK( &fileBrowser ); - if (ParseDirectory((curDevice + i) % browsers.size(), Flags, Filter) == 0) - { - fileBrowser.ResetState(); - fileBrowser.TriggerUpdate(); - AdressText.SetTextf("%s%s", browser->rootdir, browser->dir); - usbBtnTxt.SetText(browsers[(curDevice + 1) % browsers.size()].rootdir); - break; - } - } - } - else if (folderBtn.GetState() == STATE_CLICKED) - { - folderBtn.ResetState(); - - HaltGui(); - mainWindow->Remove(&w); - ResumeGui(); - char newfolder[100]; - char oldfolder[100]; - snprintf(newfolder, sizeof(newfolder), "%s%s", browser->rootdir, browser->dir); - strcpy(oldfolder, newfolder); - - int result = OnScreenKeyboard(newfolder, sizeof(newfolder), strlen(browser->rootdir)); - if (result == 1) - { - unsigned int len = strlen(newfolder); - if (len > 0 && len + 1 < sizeof(newfolder) && newfolder[len - 1] != '/') - { - newfolder[len] = '/'; - newfolder[len + 1] = '\0'; - } - - struct stat st; - if (stat(newfolder, &st) != 0) - { - if (WindowPrompt(tr( "Directory does not exist!" ), - tr( "The entered directory does not exist. Would you like to create it?" ), - tr( "OK" ), tr( "Cancel" )) == 1) if (CreateSubfolder(newfolder) == false) WindowPrompt( - tr( "Error !" ), tr( "Can't create directory" ), tr( "OK" )); - } - if (ParseDirectory(newfolder, Flags, Filter) == 0) - { - fileBrowser.ResetState(); - fileBrowser.TriggerUpdate(); - AdressText.SetTextf("%s%s", browser->rootdir, browser->dir); - usbBtnTxt.SetText(browsers[(curDevice + 1) % browsers.size()].rootdir); - } - } - HaltGui(); - mainWindow->Append(&w); - ResumeGui(); - } - - } - HaltGui(); - mainWindow->Remove(&w); - ResumeGui(); - - //} - - return result; -} - -int BrowseDevice(char * Path, int Path_size, int Flags, FILEFILTERCALLBACK Filter, void *FilterArgs) -{ - if (Filter) - { - FILTERCASCADE filter = { Filter, FilterArgs, NULL }; - return BrowseDevice(Path, Path_size, Flags, &filter); - } - return BrowseDevice(Path, Path_size, Flags); -} diff --git a/source/prompts/filebrowser.h b/source/prompts/filebrowser.h deleted file mode 100644 index 39c7a9ea..00000000 --- a/source/prompts/filebrowser.h +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * libwiigui Template - * Tantric 2009 - * - * modified by dimok and ardi - * - * filebrowser.h - * - * Generic file routines - reading, writing, browsing - ****************************************************************************/ - -#ifndef _FILEBROWSER_H_ -#define _FILEBROWSER_H_ - -#include -#include - -#define MAXJOLIET 255 -#define MAXDISPLAY MAXPATHLEN -#define ROOTDIRLEN 10 - -typedef struct -{ - u64 offset; // DVD offset - u64 length; // file length in 64 bytes for sizes higher than 4GB - char isdir; // 0 - file, 1 - directory - char filename[MAXJOLIET + 1]; // full filename - char displayname[MAXDISPLAY + 1]; // name for browser display -} BROWSERENTRY; - -typedef struct -{ - char dir[MAXPATHLEN]; // directory path of browserList - char rootdir[ROOTDIRLEN];// directory path of browserList - int pageIndex; // starting index of browserList page display - std::vector browserList; -} BROWSERINFO; -extern BROWSERINFO *browser; - -#define FB_NOFOLDER_BTN 0x0001 -#define FB_NODEVICE_BTN 0x0002 -#define FB_TRYROOTDIR 0x0004 -#define FB_TRYSTDDEV 0x0008 -#define FB_DEFAULT (FB_TRYROOTDIR | FB_TRYSTDDEV) - -typedef int (*FILEFILTERCALLBACK)(BROWSERENTRY *Entry, void* Args); -int noDIRS(BROWSERENTRY *Entry, void* Args); -int noFILES(BROWSERENTRY *Entry, void* Args); -int noEXT(BROWSERENTRY *Entry, void* Args); - -typedef struct _FILTERCASCADE -{ - FILEFILTERCALLBACK filter; - void *filter_args; - _FILTERCASCADE *next; -} FILTERCASCADE; - -/**************************************************************************** - * BrowseDevice - * Displays a list of files on the selected path - * Path returns the selectet Path/File - * Path_size is the space of the Path-array - * Ret: 0 ok / -1 Error - ***************************************************************************/ -/*************************************************************************** - * Example: - * FILTERKASKADE filter2 = {noEXT, NULL, NULL}; - * FILTERKASKADE filter1 = {noDirs, NULL, &filter2}; - * char Path[MAXPATHLEN] = "SD:/"; - * BrowseDevice(Path, MAXPATHLEN, FB_DEFAULT, &filter1); - * - * - ***************************************************************************/ -int BrowseDevice(char * Path, int Path_size, int Flags/*=FB_DEFAULT*/, FILTERCASCADE *Filter = NULL); -int BrowseDevice(char * Path, int Path_size, int Flags, FILEFILTERCALLBACK Filter, void *FilterArgs = NULL); - -#endif - diff --git a/source/prompts/gameinfo.cpp b/source/prompts/gameinfo.cpp deleted file mode 100644 index 26b933dd..00000000 --- a/source/prompts/gameinfo.cpp +++ /dev/null @@ -1,1141 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#include "usbloader/wbfs.h" -#include "language/gettext.h" -#include "libwiigui/gui.h" -#include "libwiigui/Text.hpp" -#include "xml/xml.h" -#include "menu.h" -#include "menu/menus.h" -#include "sys.h" -#include "wpad.h" -#include "FileOperations/fileops.h" -#include "prompts/PromptWindows.h" -#include "themes/CTheme.h" -#include "settings/GameTitles.h" -#include "gameinfo.h" -#include "usbloader/GameList.h" -#include "gecko.h" -#include "xml/WiiTDB.hpp" -#include "utils/ShowError.h" -#include "BoxCover/BoxCover.hpp" - -/**************************************************************************** - * gameinfo - ***************************************************************************/ -int showGameInfo(char *ID) -{ - HaltGui();//put this first to try to get rid of the code dump caused by loading this window at the same time as loading images from the SD card - mainWindow->SetState(STATE_DISABLED); - ResumeGui(); - - char xmlpath[300]; - snprintf(xmlpath, sizeof(xmlpath), "%swiitdb.xml", Settings.titlestxt_path); - - WiiTDB XML_DB; - - if(!XML_DB.OpenFile(xmlpath)) - { - ShowError(tr("Could not open wiitdb.xml.")); - return -1; - } - - XML_DB.SetLanguageCode(Settings.db_language); - - GameXMLInfo GameInfo; - - if(!XML_DB.GetGameXMLInfo(ID, &GameInfo)) - { - ShowError(tr("Could not find info for this game in the wiitdb.xml.")); - return -1; - } - - XML_DB.CloseFile(); - - bool showmeminfo = false; - - int choice = -1; - int titley = 10; - int marginY = titley + 40; - int indexy = marginY; - int wifiY = 0; - int intputX = 200, inputY = -30, txtXOffset = 90; - u8 nunchuk = 0, classiccontroller = 0, balanceboard = 0, dancepad = 0, guitar = 0, gamecube = 0, wheel = 0, - motionplus = 0, drums = 0, microphone = 0, zapper = 0, nintendods = 0, - //vitalitysensor=0, - wiispeak = 0; - int newline = 1; - u8 page = 1; - - BoxCover * boxCov = NULL; - GuiImageData * playersImgData = NULL; - GuiImage * playersImg = NULL; - - GuiImageData * wifiplayersImgData = NULL; - GuiImage * wifiplayersImg = NULL; - GuiImage * ratingImg = NULL; - - GuiImage * classiccontrollerImg = NULL; - GuiImage * nunchukImg = NULL; - GuiImage * guitarImg = NULL; - GuiImage * drumsImg = NULL; - GuiImage * dancepadImg = NULL; - GuiImage * motionplusImg = NULL; - GuiImage * wheelImg = NULL; - GuiImage * balanceboardImg = NULL; - GuiImage * microphoneImg = NULL; - GuiImage * zapperImg = NULL; - GuiImage * nintendodsImg = NULL; - GuiImage * wiispeakImg = NULL; - //GuiImage * vitalitysensorImg = NULL; - GuiImage * gcImg = NULL; - GuiImage * dialogBoxImg1 = NULL; - GuiImage * dialogBoxImg2 = NULL; - GuiImage * dialogBoxImg3 = NULL; - GuiImage * dialogBoxImg4 = NULL; - GuiImage * dialogBoxImg11 = NULL; - GuiImage * dialogBoxImg22 = NULL; - GuiImage * dialogBoxImg33 = NULL; - GuiImage * dialogBoxImg44 = NULL; - GuiImage * coverImg = NULL; - - GuiImageData * classiccontrollerImgData = NULL; - GuiImageData * nunchukImgData = NULL; - GuiImageData * guitarImgData = NULL; - GuiImageData * drumsImgData = NULL; - GuiImageData * motionplusImgData = NULL; - GuiImageData * wheelImgData = NULL; - GuiImageData * balanceboardImgData = NULL; - GuiImageData * dancepadImgData = NULL; - GuiImageData * microphoneImgData = NULL; - GuiImageData * zapperImgData = NULL; - GuiImageData * nintendodsImgData = NULL; - GuiImageData * wiispeakImgData = NULL; - //GuiImageData * vitalitysensorImgData = NULL; - GuiImageData * gamecubeImgData = NULL; - GuiImageData * ratingImgData = NULL; - GuiImageData * cover = NULL; - - GuiText * releasedTxt = NULL; - GuiText * publisherTxt = NULL; - GuiText * developerTxt = NULL; - GuiText * titleTxt = NULL; - Text * synopsisTxt = NULL; - GuiText * genreTitleTxt = NULL; - GuiText ** genreTxt = NULL; - GuiText ** wifiTxt = NULL; - GuiText * wiitdb1Txt = NULL; - GuiText * memTxt = NULL; - - GuiWindow gameinfoWindow(600, 308); - gameinfoWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - gameinfoWindow.SetPosition(0, -50); - - GuiWindow gameinfoWindow2(600, 308); - gameinfoWindow2.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - gameinfoWindow2.SetPosition(0, -50); - - GuiWindow txtWindow(350, 270); - txtWindow.SetAlignment(ALIGN_CENTRE, ALIGN_RIGHT); - txtWindow.SetPosition(95, 55); - - GuiImageData btnOutline(Resources::GetFile("button_dialogue_box.png"), Resources::GetFileSize("button_dialogue_box.png")); - GuiImageData dialogBox1(Resources::GetFile("gameinfo1.png"), Resources::GetFileSize("gameinfo1.png")); - GuiImageData dialogBox2(Resources::GetFile("gameinfo1a.png"), Resources::GetFileSize("gameinfo1a.png")); - GuiImageData dialogBox3(Resources::GetFile("gameinfo2.png"), Resources::GetFileSize("gameinfo2.png")); - GuiImageData dialogBox4(Resources::GetFile("gameinfo2a.png"), Resources::GetFileSize("gameinfo2a.png")); - - GuiTrigger trig1; - trig1.SetButtonOnlyTrigger(-1, WPAD_BUTTON_1 | WPAD_CLASSIC_BUTTON_X, 0); - GuiTrigger trigA; - trigA.SetButtonOnlyTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - GuiTrigger trigB; - trigB.SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B); - GuiTrigger trigU; - trigU.SetButtonOnlyTrigger(-1, WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP, PAD_BUTTON_UP); - GuiTrigger trigD; - trigD.SetButtonOnlyTrigger(-1, WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN, PAD_BUTTON_DOWN); - GuiTrigger trigH; - trigH.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0); - - //buttons for changing between synopsis and other info - GuiButton backBtn(0, 0); - backBtn.SetPosition(-20, -20); - backBtn.SetTrigger(&trigB); - gameinfoWindow.Append(&backBtn); - - GuiTrigger trigA_Simple; - trigA_Simple.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - - GuiButton coverBtn(180, 250); - coverBtn.SetPosition(20, 20); - coverBtn.SetTrigger(&trigA_Simple); - gameinfoWindow.Append(&coverBtn); - - GuiButton nextBtn(400, 300); - nextBtn.SetPosition(200, 20); - nextBtn.SetTrigger(&trigA_Simple); - gameinfoWindow.Append(&nextBtn); - - //buttons for scrolling the synopsis - GuiButton upBtn(0, 0); - upBtn.SetPosition(0, 0); - upBtn.SetTrigger(&trigU); - - GuiButton dnBtn(0, 0); - dnBtn.SetPosition(0, 0); - dnBtn.SetTrigger(&trigD); - - GuiButton homeBtn(0, 0); - homeBtn.SetPosition(0, 0); - homeBtn.SetTrigger(&trigH); - gameinfoWindow.Append(&homeBtn); - - char linebuf2[100] = ""; - - // enable icons for required accessories - for (u32 i = 0; i < GameInfo.AccessoirList.size(); ++i) - { - if(!GameInfo.AccessoirList[i].Required) - continue; - - if (strcmp(GameInfo.AccessoirList[i].Name.c_str(), "classiccontroller") == 0) classiccontroller = 1; - if (strcmp(GameInfo.AccessoirList[i].Name.c_str(), "nunchuk") == 0) nunchuk = 1; - if (strcmp(GameInfo.AccessoirList[i].Name.c_str(), "guitar") == 0) guitar = 1; - if (strcmp(GameInfo.AccessoirList[i].Name.c_str(), "drums") == 0) drums = 1; - if (strcmp(GameInfo.AccessoirList[i].Name.c_str(), "dancepad") == 0) dancepad = 1; - if (strcmp(GameInfo.AccessoirList[i].Name.c_str(), "motionplus") == 0) motionplus = 1; - if (strcmp(GameInfo.AccessoirList[i].Name.c_str(), "wheel") == 0) wheel = 1; - if (strcmp(GameInfo.AccessoirList[i].Name.c_str(), "balanceboard") == 0) balanceboard = 1; - if (strcmp(GameInfo.AccessoirList[i].Name.c_str(), "microphone") == 0) microphone = 1; - if (strcmp(GameInfo.AccessoirList[i].Name.c_str(), "zapper") == 0) zapper = 1; - if (strcmp(GameInfo.AccessoirList[i].Name.c_str(), "nintendods") == 0) nintendods = 1; - if (strcmp(GameInfo.AccessoirList[i].Name.c_str(), "wiispeak") == 0) wiispeak = 1; - //if (strcmp(GameInfo.AccessoirList[i].Name.c_str(),"vitalitysensor")==0) - // vitalitysensor=1; - if (strcmp(GameInfo.AccessoirList[i].Name.c_str(), "gamecube") == 0) gamecube = 1; - } - - // switch icons - if (nunchuk) - nunchukImgData = Resources::GetImageData("nunchukR.png"); - else nunchukImgData = Resources::GetImageData("nunchuk.png"); - - if (classiccontroller) - classiccontrollerImgData = Resources::GetImageData("classiccontrollerR.png"); - else classiccontrollerImgData = Resources::GetImageData("classiccontroller.png"); - - if (guitar) - guitarImgData = Resources::GetImageData("guitarR.png"); - else guitarImgData = Resources::GetImageData("guitar.png"); - - if (gamecube) - gamecubeImgData = Resources::GetImageData("gcncontrollerR.png"); - else gamecubeImgData = Resources::GetImageData("gcncontroller.png"); - - if (wheel) - wheelImgData = Resources::GetImageData("wheelR.png"); - else wheelImgData = Resources::GetImageData("wheel.png"); - - if (motionplus) - motionplusImgData = Resources::GetImageData("motionplusR.png"); - else motionplusImgData = Resources::GetImageData("motionplus.png"); - - if (drums) - drumsImgData = Resources::GetImageData("drumsR.png"); - else drumsImgData = Resources::GetImageData("drums.png"); - - if (microphone) - microphoneImgData = Resources::GetImageData("microphoneR.png"); - else microphoneImgData = Resources::GetImageData("microphone.png"); - - if (zapper) - zapperImgData = Resources::GetImageData("zapperR.png"); - else zapperImgData = Resources::GetImageData("zapper.png"); - - if (wiispeak) - wiispeakImgData = Resources::GetImageData("wiispeakR.png"); - else wiispeakImgData = Resources::GetImageData("wiispeak.png"); - - if (nintendods) - nintendodsImgData = Resources::GetImageData("nintendodsR.png"); - else nintendodsImgData = Resources::GetImageData("nintendods.png"); - - if (balanceboard) - balanceboardImgData = Resources::GetImageData("balanceboardR.png"); - else balanceboardImgData = Resources::GetImageData("balanceboard.png"); - - if (dancepad) - dancepadImgData = Resources::GetImageData("dancepadR.png"); - else dancepadImgData = Resources::GetImageData("dancepad.png"); - - // look for optional accessories - for (u32 i = 0; i < GameInfo.AccessoirList.size(); ++i) - { - if(GameInfo.AccessoirList[i].Required) - continue; - - if (strcmp(GameInfo.AccessoirList[i].Name.c_str(), "classiccontroller") == 0) classiccontroller = 1; - if (strcmp(GameInfo.AccessoirList[i].Name.c_str(), "nunchuk") == 0) nunchuk = 1; - if (strcmp(GameInfo.AccessoirList[i].Name.c_str(), "guitar") == 0) guitar = 1; - if (strcmp(GameInfo.AccessoirList[i].Name.c_str(), "drums") == 0) drums = 1; - if (strcmp(GameInfo.AccessoirList[i].Name.c_str(), "dancepad") == 0) dancepad = 1; - if (strcmp(GameInfo.AccessoirList[i].Name.c_str(), "motionplus") == 0) motionplus = 1; - if (strcmp(GameInfo.AccessoirList[i].Name.c_str(), "wheel") == 0) wheel = 1; - if (strcmp(GameInfo.AccessoirList[i].Name.c_str(), "balanceboard") == 0) balanceboard = 1; - if (strcmp(GameInfo.AccessoirList[i].Name.c_str(), "microphone") == 0) microphone = 1; - if (strcmp(GameInfo.AccessoirList[i].Name.c_str(), "zapper") == 0) zapper = 1; - if (strcmp(GameInfo.AccessoirList[i].Name.c_str(), "nintendods") == 0) nintendods = 1; - if (strcmp(GameInfo.AccessoirList[i].Name.c_str(), "wiispeak") == 0) wiispeak = 1; - //if (strcmp(GameInfo.AccessoirList[i].Name.c_str(),"vitalitysensor")==0) - // vitalitysensor=1; - if (strcmp(GameInfo.AccessoirList[i].Name.c_str(), "gamecube") == 0) gamecube = 1; - } - - dialogBoxImg1 = new GuiImage(&dialogBox1); - dialogBoxImg1->SetAlignment(0, 3); - dialogBoxImg1->SetPosition(-9, 0); - - dialogBoxImg2 = new GuiImage(&dialogBox2); - dialogBoxImg2->SetAlignment(0, 3); - dialogBoxImg2->SetPosition(145, 0); - - dialogBoxImg3 = new GuiImage(&dialogBox3); - dialogBoxImg3->SetAlignment(0, 3); - dialogBoxImg3->SetPosition(301, 0); - - dialogBoxImg4 = new GuiImage(&dialogBox4); - dialogBoxImg4->SetAlignment(0, 3); - dialogBoxImg4->SetPosition(457, 0); - - gameinfoWindow.Append(dialogBoxImg1); - gameinfoWindow.Append(dialogBoxImg2); - gameinfoWindow.Append(dialogBoxImg3); - gameinfoWindow.Append(dialogBoxImg4); - - bool loadFlatCover = false; - bool load3DCover = false; - char imgPath[150]; - snprintf(imgPath, sizeof(imgPath), "%s/%s.png", Settings.coversFull_path, ID); - if(!CheckFile(imgPath)) - { - loadFlatCover = true; - snprintf(imgPath, sizeof(imgPath), "%s/%s.png", Settings.covers2d_path, ID); - } - if(!CheckFile(imgPath)) - { - loadFlatCover = false; - load3DCover = true; - snprintf(imgPath, sizeof(imgPath), "%s/%s.png", Settings.covers_path, ID); - } - cover = new GuiImageData(imgPath); //load full id image - if (!cover->GetImage()) - { - delete cover; - cover = NULL; - } - - if(load3DCover && cover) //! No cover is always 3D box - { - coverImg = new GuiImage(cover); - coverImg->SetWidescreen(Settings.widescreen); - coverImg->SetPosition(15, 30); - } - else - { - boxCov = new BoxCover(cover, loadFlatCover); - boxCov->SetPosition(-1.75f, 0.4f, -5.0f); - boxCov->SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 40); - - if(GameInfo.CaseColor == 0xFF0000) - { - boxCov->SetBoxColor((GXColor) { 198, 34, 4, 255 }); - } - else if(GameInfo.CaseColor >= 0) - { - u8 * Color = (u8 *) &GameInfo.CaseColor; - boxCov->SetBoxColor((GXColor) { Color[1], Color[2], Color[3], 255 }); - } - - gameinfoWindow.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 100); - } - - // # of players - if (GameInfo.Players > 0) - { - if (GameInfo.Players == 1) - playersImgData = Resources::GetImageData("wiimote1.png"); - - else if (GameInfo.Players == 2) - playersImgData = Resources::GetImageData("wiimote2.png"); - - else if (GameInfo.Players == 4) - playersImgData = Resources::GetImageData("wiimote4.png"); - - playersImg = new GuiImage(playersImgData); - playersImg->SetWidescreen(Settings.widescreen); - playersImg->SetPosition(intputX, inputY); - playersImg->SetAlignment(0, 4); - gameinfoWindow.Append(playersImg); - intputX += (Settings.widescreen ? playersImg->GetWidth() * .8 : playersImg->GetWidth()) + 5; - } - - //draw the input types for this game - if (motionplus == 1) - { - motionplusImg = new GuiImage(motionplusImgData); - motionplusImg->SetWidescreen(Settings.widescreen); - motionplusImg->SetPosition(intputX, inputY); - motionplusImg->SetAlignment(0, 4); - gameinfoWindow.Append(motionplusImg); - intputX += (Settings.widescreen ? motionplusImg->GetWidth() * .8 : motionplusImg->GetWidth()) + 5; - } - if (nunchuk == 1) - { - nunchukImg = new GuiImage(nunchukImgData); - nunchukImg->SetWidescreen(Settings.widescreen); - nunchukImg->SetPosition(intputX, inputY); - nunchukImg->SetAlignment(0, 4); - gameinfoWindow.Append(nunchukImg); - intputX += (Settings.widescreen ? nunchukImg->GetWidth() * .8 : nunchukImg->GetWidth()) + 5; - } - if (classiccontroller == 1) - { - classiccontrollerImg = new GuiImage(classiccontrollerImgData); - classiccontrollerImg->SetWidescreen(Settings.widescreen); - classiccontrollerImg->SetPosition(intputX, inputY); - classiccontrollerImg->SetAlignment(0, 4); - gameinfoWindow.Append(classiccontrollerImg); - intputX += (Settings.widescreen ? classiccontrollerImg->GetWidth() * .8 : classiccontrollerImg->GetWidth()) + 5; - } - if (gamecube == 1) - { - gcImg = new GuiImage(gamecubeImgData); - gcImg->SetWidescreen(Settings.widescreen); - gcImg->SetPosition(intputX, inputY); - gcImg->SetAlignment(0, 4); - gameinfoWindow.Append(gcImg); - intputX += (Settings.widescreen ? gcImg->GetWidth() * .8 : gcImg->GetWidth()) + 5; - } - if (wheel == 1) - { - wheelImg = new GuiImage(wheelImgData); - wheelImg->SetWidescreen(Settings.widescreen); - wheelImg->SetPosition(intputX, inputY); - wheelImg->SetAlignment(0, 4); - gameinfoWindow.Append(wheelImg); - intputX += (Settings.widescreen ? wheelImg->GetWidth() * .8 : wheelImg->GetWidth()) + 5; - } - if (guitar == 1) - { - guitarImg = new GuiImage(guitarImgData); - guitarImg->SetWidescreen(Settings.widescreen); - guitarImg->SetPosition(intputX, inputY); - guitarImg->SetAlignment(0, 4); - gameinfoWindow.Append(guitarImg); - intputX += (Settings.widescreen ? guitarImg->GetWidth() * .8 : guitarImg->GetWidth()) + 5; - } - if (drums == 1) - { - drumsImg = new GuiImage(drumsImgData); - drumsImg->SetWidescreen(Settings.widescreen); - drumsImg->SetPosition(intputX, inputY); - drumsImg->SetAlignment(0, 4); - gameinfoWindow.Append(drumsImg); - intputX += (Settings.widescreen ? drumsImg->GetWidth() * .8 : drumsImg->GetWidth()) + 5; - } - if (microphone == 1) - { - microphoneImg = new GuiImage(microphoneImgData); - microphoneImg->SetWidescreen(Settings.widescreen); - microphoneImg->SetPosition(intputX, inputY); - microphoneImg->SetAlignment(0, 4); - gameinfoWindow.Append(microphoneImg); - intputX += (Settings.widescreen ? microphoneImg->GetWidth() * .8 : microphoneImg->GetWidth()) + 5; - } - if (zapper == 1) - { - zapperImg = new GuiImage(zapperImgData); - zapperImg->SetWidescreen(Settings.widescreen); - zapperImg->SetPosition(intputX, inputY); - zapperImg->SetAlignment(0, 4); - gameinfoWindow.Append(zapperImg); - intputX += (Settings.widescreen ? zapperImg->GetWidth() * .8 : zapperImg->GetWidth()) + 5; - } - if (wiispeak == 1) - { - wiispeakImg = new GuiImage(wiispeakImgData); - wiispeakImg->SetWidescreen(Settings.widescreen); - wiispeakImg->SetPosition(intputX, inputY); - wiispeakImg->SetAlignment(0, 4); - gameinfoWindow.Append(wiispeakImg); - intputX += (Settings.widescreen ? wiispeakImg->GetWidth() * .8 : wiispeakImg->GetWidth()) + 5; - } - if (nintendods == 1) - { - nintendodsImg = new GuiImage(nintendodsImgData); - nintendodsImg->SetWidescreen(Settings.widescreen); - nintendodsImg->SetPosition(intputX, inputY); - nintendodsImg->SetAlignment(0, 4); - gameinfoWindow.Append(nintendodsImg); - intputX += (Settings.widescreen ? nintendodsImg->GetWidth() * .8 : nintendodsImg->GetWidth()) + 5; - } - if (dancepad == 1) - { - dancepadImg = new GuiImage(dancepadImgData); - dancepadImg->SetWidescreen(Settings.widescreen); - dancepadImg->SetPosition(intputX, inputY); - dancepadImg->SetAlignment(0, 4); - gameinfoWindow.Append(dancepadImg); - intputX += (Settings.widescreen ? dancepadImg->GetWidth() * .8 : dancepadImg->GetWidth()) + 5; - } - if (balanceboard == 1) - { - balanceboardImg = new GuiImage(balanceboardImgData); - balanceboardImg->SetWidescreen(Settings.widescreen); - balanceboardImg->SetPosition(intputX, inputY); - balanceboardImg->SetAlignment(0, 4); - gameinfoWindow.Append(balanceboardImg); - intputX += (Settings.widescreen ? balanceboardImg->GetWidth() * .8 : balanceboardImg->GetWidth()) + 5; - } - - // # online players - if (GameInfo.WifiPlayers > 0) - { - if(GameInfo.WifiPlayers == 1) - wifiplayersImgData = Resources::GetImageData("wifi1.png"); - - else if(GameInfo.WifiPlayers == 2) - wifiplayersImgData = Resources::GetImageData("wifi2.png"); - - else if(GameInfo.WifiPlayers == 4) - wifiplayersImgData = Resources::GetImageData("wifi4.png"); - - else if(GameInfo.WifiPlayers == 8) - wifiplayersImgData =Resources::GetImageData("wifi8.png"); - - else if(GameInfo.WifiPlayers == 12) - wifiplayersImgData = Resources::GetImageData("wifi12.png"); - - else if(GameInfo.WifiPlayers == 16) - wifiplayersImgData = Resources::GetImageData("wifi16.png"); - - else if(GameInfo.WifiPlayers == 32) - wifiplayersImgData = Resources::GetImageData("wifi32.png"); - - wifiplayersImg = new GuiImage(wifiplayersImgData); - wifiplayersImg->SetWidescreen(Settings.widescreen); - wifiplayersImg->SetPosition(intputX, inputY); - wifiplayersImg->SetAlignment(0, 4); - gameinfoWindow.Append(wifiplayersImg); - intputX += (Settings.widescreen ? wifiplayersImg->GetWidth() * .8 : wifiplayersImg->GetWidth()) + 5; - } - - // ratings - if (GameInfo.RatingType >= 0) - { - if (GameInfo.RatingType == 1) - { - if (strcmp(GameInfo.RatingValue.c_str(), "EC") == 0) - ratingImgData = Resources::GetImageData("esrb_ec.png"); - else if (strcmp(GameInfo.RatingValue.c_str(), "E") == 0) - ratingImgData = Resources::GetImageData("esrb_e.png"); - else if (strcmp(GameInfo.RatingValue.c_str(), "E10+") == 0) - ratingImgData = Resources::GetImageData("esrb_eten.png"); - else if (strcmp(GameInfo.RatingValue.c_str(), "T") == 0) - ratingImgData = Resources::GetImageData("esrb_t.png"); - else if (strcmp(GameInfo.RatingValue.c_str(), "M") == 0) - ratingImgData = Resources::GetImageData("esrb_m.png"); - else if (strcmp(GameInfo.RatingValue.c_str(), "AO") == 0) - ratingImgData = Resources::GetImageData("esrb_ao.png"); - else - ratingImgData = Resources::GetImageData("norating.png"); - } //there are 2 values here cause some countries are stupid and - else if (GameInfo.RatingType == 2) //can't use the same as everybody else - { - if ((strcmp(GameInfo.RatingValue.c_str(), "3") == 0) || (strcmp(GameInfo.RatingValue.c_str(), "4") == 0)) - ratingImgData = Resources::GetImageData("pegi_3.png"); - else if ((strcmp(GameInfo.RatingValue.c_str(), "7") == 0) || (strcmp(GameInfo.RatingValue.c_str(), "7") == 0)) - ratingImgData = Resources::GetImageData("pegi_7.png"); - else if (strcmp(GameInfo.RatingValue.c_str(), "12") == 0) - ratingImgData = Resources::GetImageData("pegi_12.png"); - else if ((strcmp(GameInfo.RatingValue.c_str(), "16") == 0) || (strcmp(GameInfo.RatingValue.c_str(), "15") == 0)) - ratingImgData = Resources::GetImageData("pegi_16.png"); - else if (strcmp(GameInfo.RatingValue.c_str(), "18") == 0) - ratingImgData = Resources::GetImageData("pegi_18.png"); - else - { - ratingImgData = Resources::GetImageData("norating.png"); - } - } - else if (GameInfo.RatingType == 0) - { - if (strcmp(GameInfo.RatingValue.c_str(), "A") == 0) - ratingImgData = Resources::GetImageData("cero_a.png"); - else if (strcmp(GameInfo.RatingValue.c_str(), "B") == 0) - ratingImgData = Resources::GetImageData("cero_b.png"); - else if (strcmp(GameInfo.RatingValue.c_str(), "C") == 0) - ratingImgData = Resources::GetImageData("cero_c.png"); - else if (strcmp(GameInfo.RatingValue.c_str(), "D") == 0) - ratingImgData = Resources::GetImageData("cero_d.png"); - else if (strcmp(GameInfo.RatingValue.c_str(), "Z") == 0) - ratingImgData = Resources::GetImageData("cero_z.png"); - else - { - ratingImgData = Resources::GetImageData("norating.png"); - } - } - - else - { - ratingImgData = Resources::GetImageData("norating.png"); - } - ratingImg = new GuiImage(ratingImgData); - ratingImg->SetWidescreen(Settings.widescreen); - ratingImg->SetPosition(-25, inputY); - ratingImg->SetAlignment(1, 4); - gameinfoWindow.Append(ratingImg); - intputX += (Settings.widescreen ? ratingImg->GetWidth() * .8 : ratingImg->GetWidth()) + 5; - } - - // memory info - if (showmeminfo) - { - char meminfotxt[200]; - strlcpy(meminfotxt, MemInfo(), sizeof(meminfotxt)); - memTxt = new GuiText(meminfotxt, 18, ( GXColor ) {0, 0, 0, 255}); - memTxt->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - memTxt->SetPosition(0, 0); - gameinfoWindow.Append(memTxt); - } - - // title - int titlefontsize = 25; - if (GameInfo.Title.size() > 0) - { - titleTxt = new GuiText(GameInfo.Title.c_str(), titlefontsize, ( GXColor ) {0, 0, 0, 255}); - titleTxt->SetMaxWidth(350, SCROLL_HORIZONTAL); - titleTxt->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - titleTxt->SetPosition(txtXOffset, 12 + titley); - gameinfoWindow.Append(titleTxt); - } - - //date - snprintf(linebuf2, sizeof(linebuf2), " "); - if (GameInfo.PublishDate != 0) - { - int year = GameInfo.PublishDate >> 16; - int day = GameInfo.PublishDate & 0xFF; - int month = (GameInfo.PublishDate >> 8) & 0xFF; - snprintf(linebuf2, sizeof(linebuf2), "%02i ", day); - - switch (month) - { - case 1: - snprintf(linebuf2, sizeof(linebuf2), "%s%s ", linebuf2, tr( "Jan" )); - break; - case 2: - snprintf(linebuf2, sizeof(linebuf2), "%s%s ", linebuf2, tr( "Feb" )); - break; - case 3: - snprintf(linebuf2, sizeof(linebuf2), "%s%s ", linebuf2, tr( "Mar" )); - break; - case 4: - snprintf(linebuf2, sizeof(linebuf2), "%s%s ", linebuf2, tr( "Apr" )); - break; - case 5: - snprintf(linebuf2, sizeof(linebuf2), "%s%s ", linebuf2, tr( "May" )); - break; - case 6: - snprintf(linebuf2, sizeof(linebuf2), "%s%s ", linebuf2, tr( "June" )); - break; - case 7: - snprintf(linebuf2, sizeof(linebuf2), "%s%s ", linebuf2, tr( "July" )); - break; - case 8: - snprintf(linebuf2, sizeof(linebuf2), "%s%s ", linebuf2, tr( "Aug" )); - break; - case 9: - snprintf(linebuf2, sizeof(linebuf2), "%s%s ", linebuf2, tr( "Sept" )); - break; - case 10: - snprintf(linebuf2, sizeof(linebuf2), "%s%s ", linebuf2, tr( "Oct" )); - break; - case 11: - snprintf(linebuf2, sizeof(linebuf2), "%s%s ", linebuf2, tr( "Nov" )); - break; - case 12: - snprintf(linebuf2, sizeof(linebuf2), "%s%s ", linebuf2, tr( "Dec" )); - break; - } - - char linebuf[300]; - snprintf(linebuf, sizeof(linebuf), "%s : %s%i", tr( "Released" ), linebuf2, year); - releasedTxt = new GuiText(linebuf, 16, ( GXColor ) {0, 0, 0, 255}); - if (releasedTxt->GetWidth() > 300) newline = 2; - releasedTxt->SetAlignment(ALIGN_RIGHT, ALIGN_TOP); - releasedTxt->SetPosition(-17, 12 + indexy); - indexy += (20 * newline); - newline = 1; - gameinfoWindow.Append(releasedTxt); - } - - //publisher - if (GameInfo.Publisher.size() != 0) - { - snprintf(linebuf2, sizeof(linebuf2), "%s %s", tr( "Published by" ), GameInfo.Publisher.c_str()); - publisherTxt = new GuiText(linebuf2, 16, ( GXColor ) {0, 0, 0, 255}); - if (publisherTxt->GetWidth() > 250) newline = 2; - publisherTxt->SetMaxWidth(250, WRAP); - publisherTxt->SetAlignment(ALIGN_RIGHT, ALIGN_TOP); - publisherTxt->SetPosition(-17, 12 + indexy); - indexy += (20 * newline); - newline = 1; - gameinfoWindow.Append(publisherTxt); - } - - //developer - if (GameInfo.Developer.size() != 0 && strcasecmp(GameInfo.Developer.c_str(), GameInfo.Publisher.c_str()) != 0) - { - snprintf(linebuf2, sizeof(linebuf2), "%s %s", tr( "Developed by" ), GameInfo.Developer.c_str()); - developerTxt = new GuiText(linebuf2, 16, ( GXColor ) {0, 0, 0, 255}); - if (developerTxt->GetWidth() > 250) newline = 2; - developerTxt->SetMaxWidth(250, WRAP); - developerTxt->SetAlignment(ALIGN_RIGHT, ALIGN_TOP); - developerTxt->SetPosition(-17, 12 + indexy); - indexy += (20 * newline); - newline = 1; - gameinfoWindow.Append(developerTxt); - } - - //genre - int genreY = marginY; - if(GameInfo.GenreList.size() > 0) - { - genreTitleTxt = new GuiText(tr("Genre:"), 16, ( GXColor ) {0, 0, 0, 255}); - genreTitleTxt->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - genreTitleTxt->SetPosition(205, 12 + genreY); - genreY += 20; - gameinfoWindow.Append(genreTitleTxt); - } - - genreTxt = new GuiText *[GameInfo.GenreList.size()+1]; //to not alloc a 0 vector - for (u32 i = 0; i < GameInfo.GenreList.size(); ++i) - { - genreTxt[i] = new GuiText(GameInfo.GenreList[i].c_str(), 16, ( GXColor ) {0, 0, 0, 255}); - genreTxt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - genreTxt[i]->SetPosition(215, 12 + genreY); - genreY += 20; - gameinfoWindow.Append(genreTxt[i]); - } - - //online - wifiTxt = new GuiText *[GameInfo.WifiFeatureList.size()+1]; //to not alloc a 0 vector - for (int i = GameInfo.WifiFeatureList.size()-1; i >= 0 && GameInfo.WifiFeatureList.size() > 0; --i) - { - if (strcmp(GameInfo.WifiFeatureList[i].c_str(), "Nintendods") == 0) - { - snprintf(linebuf2, sizeof(linebuf2), "Nintendo DS"); - } - else - { - snprintf(linebuf2, sizeof(linebuf2), "%s", GameInfo.WifiFeatureList[i].c_str()); - } - wifiTxt[i] = new GuiText(linebuf2, 16, ( GXColor ) {0, 0, 0, 255}); - wifiTxt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - wifiTxt[i]->SetPosition(215, 200 + wifiY); - wifiY -= 20; - gameinfoWindow.Append(wifiTxt[i]); - } - if (GameInfo.WifiFeatureList.size() > 0) - { - snprintf(linebuf2, sizeof(linebuf2), "%s:", tr( "WiFi Features" )); - } - else - { - strcpy(linebuf2, ""); - } - wifiTxt[0] = new GuiText(linebuf2, 16, ( GXColor ) {0, 0, 0, 255}); - wifiTxt[0]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - wifiTxt[0]->SetPosition(205, 200 + wifiY); - gameinfoWindow.Append(wifiTxt[0]); - - //synopsis - int pagesize = 12; - if (GameInfo.Synopsis.size() != 0) - { - synopsisTxt = new Text(GameInfo.Synopsis.c_str(), 16, ( GXColor ) {0, 0, 0, 255}); - synopsisTxt->SetMaxWidth(350); - synopsisTxt->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - synopsisTxt->SetPosition(0, 0); - synopsisTxt->SetLinesToDraw(pagesize); - synopsisTxt->Refresh(); - - dialogBoxImg11 = new GuiImage(&dialogBox1); - dialogBoxImg11->SetAlignment(0, 3); - dialogBoxImg11->SetPosition(-9, 0); - - dialogBoxImg22 = new GuiImage(&dialogBox2); - dialogBoxImg22->SetAlignment(0, 3); - dialogBoxImg22->SetPosition(145, 0); - - dialogBoxImg33 = new GuiImage(&dialogBox3); - dialogBoxImg33->SetAlignment(0, 3); - dialogBoxImg33->SetPosition(301, 0); - - dialogBoxImg44 = new GuiImage(&dialogBox4); - dialogBoxImg44->SetAlignment(0, 3); - dialogBoxImg44->SetPosition(457, 0); - - gameinfoWindow2.Append(dialogBoxImg11); - gameinfoWindow2.Append(dialogBoxImg22); - gameinfoWindow2.Append(dialogBoxImg33); - gameinfoWindow2.Append(dialogBoxImg44); - - txtWindow.Append(synopsisTxt); - txtWindow.Append(&upBtn); - txtWindow.Append(&dnBtn); - gameinfoWindow2.Append(&txtWindow); - } - - wiitdb1Txt = new GuiText("http://wiitdb.com", 16, ( GXColor ) {0, 0, 0, 255}); - wiitdb1Txt->SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM); - wiitdb1Txt->SetPosition(40, -15); - gameinfoWindow.Append(wiitdb1Txt); - if(coverImg) gameinfoWindow.Append(coverImg); - - HaltGui(); - //mainWindow->SetState(STATE_DISABLED); - mainWindow->Append(&gameinfoWindow); - if(boxCov) mainWindow->Append(boxCov); - mainWindow->ChangeFocus(&gameinfoWindow); - ResumeGui(); - - while (choice == -1) - { - - VIDEO_WaitVSync(); - if (shutdown == 1) - { - wiilight(0); - Sys_Shutdown(); - } - else if (reset == 1) - Sys_Reboot(); - - else if ((backBtn.GetState() == STATE_CLICKED) || (backBtn.GetState() == STATE_HELD)) - { - backBtn.ResetState(); - if (page == 1) - { - choice = 1; - if (synopsisTxt) delete synopsisTxt; - synopsisTxt = NULL; - break; - } - else if (page == 2) - { - HaltGui(); - gameinfoWindow2.Remove(&nextBtn); - gameinfoWindow2.Remove(&backBtn); - gameinfoWindow2.Remove(&homeBtn); - gameinfoWindow2.Remove(&coverBtn); - gameinfoWindow2.Remove(coverImg); - gameinfoWindow2.SetVisible(false); - gameinfoWindow.SetVisible(true); - gameinfoWindow.Append(&backBtn); - gameinfoWindow.Append(&nextBtn); - gameinfoWindow.Append(&homeBtn); - gameinfoWindow.Append(&coverBtn); - gameinfoWindow.Append(coverImg); - mainWindow->Remove(&gameinfoWindow2); - ResumeGui(); - page = 1; - } - } - else if(coverBtn.GetState() == STATE_CLICKED && boxCov) - { - boxCov->SetEffect(EFFECT_BOX_FLY_CENTRE, 100); - gameinfoWindow2.Remove(&nextBtn); - gameinfoWindow2.Remove(&homeBtn); - gameinfoWindow.Remove(&nextBtn); - gameinfoWindow.Remove(&homeBtn); - boxCov->SetZoomable(true); - - while(backBtn.GetState() != STATE_CLICKED && homeBtn.GetState() != STATE_CLICKED) - { - usleep(100); - if (shutdown) - Sys_Shutdown(); - else if (reset) - Sys_Reboot(); - } - - if (page == 1) - { - gameinfoWindow.Append(&nextBtn); - gameinfoWindow.Append(&homeBtn); - } - else - { - gameinfoWindow2.Append(&nextBtn); - gameinfoWindow2.Append(&homeBtn); - } - - boxCov->SetZoomable(false); - boxCov->SetEffect(EFFECT_BOX_FLY_BACK, 100); - backBtn.ResetState(); - coverBtn.ResetState(); - - } - else if (((nextBtn.GetState() == STATE_CLICKED) || (nextBtn.GetState() == STATE_HELD)) && GameInfo.Synopsis.size() > 0) - { - nextBtn.ResetState(); - - if (page == 1) - { - HaltGui(); - gameinfoWindow.Remove(&nextBtn); - gameinfoWindow.Remove(&backBtn); - gameinfoWindow.Remove(&homeBtn); - gameinfoWindow.Remove(&coverBtn); - gameinfoWindow.Remove(wiitdb1Txt); - gameinfoWindow.Remove(coverImg); - gameinfoWindow.SetVisible(false); - gameinfoWindow2.SetVisible(true); - gameinfoWindow2.Append(&nextBtn); - gameinfoWindow2.Append(&backBtn); - gameinfoWindow2.Append(&homeBtn); - gameinfoWindow2.Append(&coverBtn); - gameinfoWindow2.Append(wiitdb1Txt); - gameinfoWindow2.Append(coverImg); - mainWindow->Append(&gameinfoWindow2); - ResumeGui(); - page = 2; - } - else - { - HaltGui(); - gameinfoWindow2.Remove(&nextBtn); - gameinfoWindow2.Remove(&backBtn); - gameinfoWindow2.Remove(&homeBtn); - gameinfoWindow2.Remove(&coverBtn); - gameinfoWindow2.Remove(wiitdb1Txt); - gameinfoWindow2.Remove(coverImg); - gameinfoWindow2.SetVisible(false); - gameinfoWindow.SetVisible(true); - gameinfoWindow.Append(&backBtn); - gameinfoWindow.Append(&nextBtn); - gameinfoWindow.Append(&homeBtn); - gameinfoWindow.Append(&coverBtn); - gameinfoWindow.Append(wiitdb1Txt); - gameinfoWindow.Append(coverImg); - mainWindow->Remove(&gameinfoWindow2); - ResumeGui(); - page = 1; - } - - } - else if ((upBtn.GetState() == STATE_CLICKED || upBtn.GetState() == STATE_HELD) && page == 2) - { - synopsisTxt->PreviousLine(); - - usleep(60000); - if (!((ButtonsHold() & WPAD_BUTTON_UP) || (ButtonsHold() & PAD_BUTTON_UP))) upBtn.ResetState(); - - } - else if ((dnBtn.GetState() == STATE_CLICKED || dnBtn.GetState() == STATE_HELD) && page == 2) - { - synopsisTxt->NextLine(); - - usleep(60000); - if (!((ButtonsHold() & WPAD_BUTTON_DOWN) || (ButtonsHold() & PAD_BUTTON_DOWN))) dnBtn.ResetState(); - } - else if (homeBtn.GetState() == STATE_CLICKED) - { - if (page == 1) - { - choice = 2; - if (synopsisTxt) delete synopsisTxt; - synopsisTxt = NULL; - break; - } - else if (page == 2) - { - HaltGui(); - gameinfoWindow2.SetVisible(false); - gameinfoWindow.SetVisible(true); - mainWindow->Remove(&gameinfoWindow2); - ResumeGui(); - page = 1; - } - } - } - - HaltGui(); - gameinfoWindow.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 100); - if(boxCov) boxCov->SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 60); - ResumeGui(); - - while (gameinfoWindow.GetEffect() > 0) usleep(100); - HaltGui(); - mainWindow->Remove(&gameinfoWindow); - if(boxCov) mainWindow->Remove(boxCov); - mainWindow->SetState(STATE_DEFAULT); - - delete boxCov; - delete playersImgData; - delete playersImg; - - delete wifiplayersImgData; - delete wifiplayersImg; - delete ratingImg; - - delete classiccontrollerImg; - delete nunchukImg; - delete guitarImg; - delete drumsImg; - delete dancepadImg; - delete motionplusImg; - delete wheelImg; - delete balanceboardImg; - delete microphoneImg; - delete zapperImg; - delete wiispeakImg; - delete nintendodsImg; - delete gcImg; - delete dialogBoxImg1; - delete dialogBoxImg2; - delete dialogBoxImg3; - delete dialogBoxImg4; - delete dialogBoxImg11; - delete dialogBoxImg22; - delete dialogBoxImg33; - delete dialogBoxImg44; - delete coverImg; - delete classiccontrollerImgData; - delete nunchukImgData; - delete guitarImgData; - delete drumsImgData; - delete motionplusImgData; - delete wheelImgData; - delete balanceboardImgData; - delete dancepadImgData; - delete microphoneImgData; - delete zapperImgData; - delete wiispeakImgData; - delete nintendodsImgData; - delete gamecubeImgData; - delete ratingImgData; - delete cover; - delete releasedTxt; - delete publisherTxt; - delete developerTxt; - delete titleTxt; - delete synopsisTxt; - delete genreTitleTxt; - delete wiitdb1Txt; - delete memTxt; - for (u32 i = 0; i < GameInfo.GenreList.size(); ++i) - delete genreTxt[i]; - - for (u32 i = 0; i < GameInfo.WifiFeatureList.size(); ++i) - delete wifiTxt[i]; - - delete [] genreTxt; - delete [] wifiTxt; - - ResumeGui(); - - return choice; -} - -bool save_gamelist(int txt) // save gamelist -{ - mainWindow->SetState(STATE_DISABLED); - char tmp[200]; - sprintf(tmp, "%s", Settings.update_path); - struct stat st; - if (stat(tmp, &st) != 0) - { - mkdir(tmp, 0777); - } - FILE *f; - sprintf(tmp, "%sGameList.txt", Settings.update_path); - if (txt == 1) sprintf(tmp, "%sGameList.csv", Settings.update_path); - f = fopen(tmp, "w"); - if (!f) - { - mainWindow->SetState(STATE_DEFAULT); - return false; - } - //make sure that all games are added to the gamelist - gameList.LoadUnfiltered(); - - f32 size = 0.0; - f32 freespace, used; - int i; - - WBFS_DiskSpace(&used, &freespace); - - fprintf(f, "# USB Loader Has Saved this file\n"); - fprintf(f, "# This file was created based on your list of games and language settings.\n"); - fclose(f); - /* Closing and reopening because of a write issue we are having right now */ - f = fopen(tmp, "w"); - - if (txt == 0) - { - fprintf(f, "# USB Loader Has Saved this file\n"); - fprintf(f, "# This file was created based on your list of games and language settings.\n\n"); - - fprintf(f, "%.2fGB %s %.2fGB %s\n\n", freespace, tr( "of" ), (freespace + used), tr( "free" )); - fprintf(f, "ID Size(GB) Name\n"); - - for (i = 0; i < gameList.size(); i++) - { - struct discHdr* header = gameList[i]; - WBFS_GameSize(header->id, &size); - if (i < 500) - { - fprintf(f, "%c%c%c%c%c%c", header->id[0], header->id[1], header->id[2], header->id[3], header->id[4], - header->id[5]); - fprintf(f, " [%.2f] ", size); - fprintf(f, " %s", GameTitles.GetTitle(header)); - } - fprintf(f, "\n"); - } - } - else - { - fprintf(f, "\"ID\",\"Size(GB)\",\"Name\"\n"); - - for (i = 0; i < gameList.size(); i++) - { - struct discHdr* header = gameList[i]; - WBFS_GameSize(header->id, &size); - if (i < 500) - { - fprintf(f, "\"%c%c%c%c%c%c\",\"%.2f\",\"%s\"\n", header->id[0], header->id[1], header->id[2], - header->id[3], header->id[4], header->id[5], size, GameTitles.GetTitle(header)); - } - } - } - fclose(f); - - gameList.FilterList(); - mainWindow->SetState(STATE_DEFAULT); - return true; -} - -void MemInfoPrompt() -{ - char meminfotxt[200]; - strlcpy(meminfotxt, MemInfo(), sizeof(meminfotxt)); - WindowPrompt(0, meminfotxt, tr( "OK" )); -} diff --git a/source/prompts/gameinfo.h b/source/prompts/gameinfo.h deleted file mode 100644 index dbdd70a9..00000000 --- a/source/prompts/gameinfo.h +++ /dev/null @@ -1,14 +0,0 @@ -/**************************************************************************** - * PromptWindows - * USB Loader GX 2009 - * - * PromptWindows.h - ***************************************************************************/ - -#ifndef _GAMEINFO_H_ -#define _GAMEINFO_H_ - -int showGameInfo(char *ID); -bool save_gamelist(int txt); -void MemInfoPrompt(); -#endif diff --git a/source/settings/CGameSettings.cpp b/source/settings/CGameSettings.cpp deleted file mode 100644 index e4ecd980..00000000 --- a/source/settings/CGameSettings.cpp +++ /dev/null @@ -1,429 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include -#include -#include -#include - -#include "CSettings.h" -#include "CGameSettings.h" -#include "FileOperations/fileops.h" -#include "svnrev.h" - -#define VALID_CONFIG_REV 1031 - -CGameSettings GameSettings; - -CGameSettings::CGameSettings() -{ -} - -CGameSettings::~CGameSettings() -{ -} - -GameCFG * CGameSettings::GetGameCFG(const char * id) -{ - if(!id) - return GetDefault(); - - for(u32 i = 0; i < GameList.size(); ++i) - { - if(strncmp(id, GameList[i].id, 6) == 0) - { - return &GameList[i]; - } - } - - GameCFG *defaultCFG = GetDefault(); - memcpy(defaultCFG->id, id, 6); - - return defaultCFG; -} - -bool CGameSettings::AddGame(const GameCFG & NewGame) -{ - for(u32 i = 0; i < GameList.size(); ++i) - { - if(strncmp(NewGame.id, GameList[i].id, 6) == 0) - { - memcpy(&GameList[i], &NewGame, sizeof(GameCFG)); - return true; - } - } - - GameList.push_back(NewGame); - - return true; -} - -bool CGameSettings::RemoveAll() -{ - GameList.clear(); - std::vector().swap(GameList); - - return Save(); -} - -bool CGameSettings::Remove(const char * id) -{ - if(!id) - return false; - - for(u32 i = 0; i < GameList.size(); ++i) - { - if(strncmp(id, GameList[i].id, 6) == 0) - { - GameList.erase(GameList.begin()+i); - break; - } - } - - return true; -} - -bool CGameSettings::Load(const char * path) -{ - char line[1024]; - char filepath[300]; - snprintf(filepath, sizeof(filepath), "%sGXGameSettings.cfg", path); - - ConfigPath = filepath; - - FILE *file = fopen(filepath, "r"); - if (!file) return false; - - if(!ValidVersion(file)) - { - fclose(file); - return false; - } - - while (fgets(line, sizeof(line), file)) - { - if (line[0] == '#') - continue; - - this->ParseLine(line); - } - fclose(file); - - return true; -} - -bool CGameSettings::ValidVersion(FILE * file) -{ - if(!file) return false; - - char line[255]; - int revision = 0; - - while (fgets(line, sizeof(line), file)) - { - const char * ptr = strcasestr(line, "USB Loader GX R"); - if(ptr) - { - ptr += strlen("USB Loader GX R"); - revision = atoi(ptr); - break; - } - } - - rewind(file); - - return revision >= VALID_CONFIG_REV; -} - -bool CGameSettings::Save() -{ - char filepath[300]; - strcpy(filepath, ConfigPath.c_str()); - - char * ptr = strrchr(filepath, '/'); - if(ptr) - ptr[0] = 0; - - CreateSubfolder(filepath); - - FILE * f = fopen(ConfigPath.c_str(), "w"); - if (!f) return false; - - fprintf(f, "# USB Loader GX R%s - Individual game settings file\n", GetRev()); - fprintf(f, "# note: this file is automatically generated\n"); - fprintf(f, "# Num Games: %d\n", GameList.size()); - for (u32 i = 0; i < GameList.size(); ++i) - { - fprintf(f, "game:%s = ", GameList[i].id); - fprintf(f, "video:%d; ", GameList[i].video); - fprintf(f, "language:%d; ", GameList[i].language); - fprintf(f, "ocarina:%d; ", GameList[i].ocarina); - fprintf(f, "vipatch:%d; ", GameList[i].vipatch); - fprintf(f, "ios:%d; ", GameList[i].ios); - fprintf(f, "parentalcontrol:%d; ", GameList[i].parentalcontrol); - fprintf(f, "errorfix002:%d; ", GameList[i].errorfix002); - fprintf(f, "iosreloadblock:%d; ", GameList[i].iosreloadblock); - fprintf(f, "patchcountrystrings:%d; ", GameList[i].patchcountrystrings); - fprintf(f, "loadalternatedol:%d; ", GameList[i].loadalternatedol); - fprintf(f, "alternatedolstart:%d; ", GameList[i].alternatedolstart); - fprintf(f, "alternatedolname:%s; ", GameList[i].alternatedolname); - fprintf(f, "returnTo:%d; ", GameList[i].returnTo); - fprintf(f, "Locked:%d;\n", GameList[i].Locked); - } - fprintf(f, "# END\n"); - fclose(f); - - return true; -} - -bool CGameSettings::SetSetting(GameCFG & game, char *name, char *value) -{ - int i = 0; - - if (strcmp(name, "video") == 0) - { - if (sscanf(value, "%d", &i) == 1) - { - game.video = i; - } - return true; - } - else if(strcmp(name, "language") == 0) - { - if (sscanf(value, "%d", &i) == 1) - { - game.language = i; - } - return true; - } - else if(strcmp(name, "ocarina") == 0) - { - if (sscanf(value, "%d", &i) == 1) - { - game.ocarina = i; - } - return true; - } - else if(strcmp(name, "vipatch") == 0) - { - if (sscanf(value, "%d", &i) == 1) - { - game.vipatch = i; - } - return true; - } - else if(strcmp(name, "ios") == 0) - { - if (sscanf(value, "%d", &i) == 1) - { - game.ios = i; - } - return true; - } - else if(strcmp(name, "parentalcontrol") == 0) - { - if (sscanf(value, "%d", &i) == 1) - { - game.parentalcontrol = i; - } - return true; - } - else if(strcmp(name, "errorfix002") == 0) - { - if (sscanf(value, "%d", &i) == 1) - { - game.errorfix002 = i; - } - return true; - } - else if(strcmp(name, "iosreloadblock") == 0) - { - if (sscanf(value, "%d", &i) == 1) - { - game.iosreloadblock = i; - } - return true; - } - else if(strcmp(name, "loadalternatedol") == 0) - { - if (sscanf(value, "%d", &i) == 1) - { - game.loadalternatedol = i; - } - return true; - } - else if(strcmp(name, "alternatedolstart") == 0) - { - if (sscanf(value, "%d", &i) == 1) - { - game.alternatedolstart = i; - } - return true; - } - else if(strcmp(name, "patchcountrystrings") == 0) - { - if (sscanf(value, "%d", &i) == 1) - { - game.patchcountrystrings = i; - } - return true; - } - else if(strcmp(name, "alternatedolname") == 0) - { - snprintf(game.alternatedolname, sizeof(game.alternatedolname), value); - return true; - } - else if(strcmp(name, "returnTo") == 0) - { - if (sscanf(value, "%d", &i) == 1) - { - game.returnTo = i; - } - return true; - } - else if(strcmp(name, "Locked") == 0) - { - if (sscanf(value, "%d", &i) == 1) - { - game.Locked = i; - } - return true; - } - - return false; -} - -bool CGameSettings::ReadGameID(const char * src, char * GameID, int size) -{ - if(strncasecmp(src, "game:", 5) != 0) - return false; - - char * ptr = strchr(src, ':'); - if(!ptr) - return false; - - ptr++; - - int i = 0; - - for(i = 0; i < size; i++, ptr++) - { - if(*ptr == ' ' || *ptr == '\0') - break; - - GameID[i] = *ptr; - } - - GameID[i] = 0; - - return true; -} - -void CGameSettings::ParseLine(char *line) -{ - char name[1024], value[1024]; - char GameID[8]; - - if(!ReadGameID(line, GameID, 6)) - return; - - if(strlen(GameID) != 6) - return; - - GameCFG NewCFG; - memset(&NewCFG, 0, sizeof(GameCFG)); - - strcpy(NewCFG.id, GameID); - - char * LinePtr = strchr(line, '='); - - while(LinePtr != NULL) - { - LinePtr++; - - char * eq = strchr(LinePtr, ':'); - - if (!eq) break; - - this->TrimLine(name, LinePtr, sizeof(name)); - this->TrimLine(value, eq + 1, sizeof(value)); - - SetSetting(NewCFG, name, value); - - LinePtr = strchr(LinePtr, ';'); - } - - AddGame(NewCFG); -} - -void CGameSettings::TrimLine(char *dest, const char *src, int size) -{ - while (*src == ' ') - src++; - - int i = 0; - - for(i = 0; i < size; i++, src++) - { - if(*src == ':' || *src == ';' || *src == '\n' || - *src == '\r' || *src == '\0') - break; - - dest[i] = *src; - } - - dest[i] = '\0'; -} - -int CGameSettings::GetPartenalPEGI(int parental) -{ - switch(parental) - { - case 1: return 7; - case 2: return 12; - case 3: return 16; - case 4: return 18; - default: return -1; - } -} - -GameCFG * CGameSettings::GetDefault() -{ - memset(DefaultConfig.id, 0, sizeof(DefaultConfig.id)); - DefaultConfig.video = Settings.videomode; - DefaultConfig.language = Settings.language; - DefaultConfig.ocarina = Settings.ocarina; - DefaultConfig.vipatch = Settings.videopatch; - DefaultConfig.ios = Settings.cios; - DefaultConfig.parentalcontrol = PARENTAL_LVL_EVERYONE; - DefaultConfig.errorfix002 = Settings.error002; - DefaultConfig.patchcountrystrings = Settings.patchcountrystrings; - DefaultConfig.loadalternatedol = ALT_DOL_DEFAULT; - DefaultConfig.alternatedolstart = 0; - DefaultConfig.iosreloadblock = OFF; - DefaultConfig.alternatedolname[0] = '\0'; - DefaultConfig.returnTo = 1; - DefaultConfig.Locked = OFF; - - return &DefaultConfig; -} diff --git a/source/settings/CGameSettings.h b/source/settings/CGameSettings.h deleted file mode 100644 index 1d5e427f..00000000 --- a/source/settings/CGameSettings.h +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef _GAME_SETTINGS_H_ -#define _GAME_SETTINGS_H_ - -#include -#include -#include -#include -#include "usbloader/disc.h" - -typedef struct _GameCFG -{ - char id[7]; - u8 video; - u8 language; - u8 ocarina; - u8 vipatch; - u8 ios; - u8 parentalcontrol; - u8 errorfix002; - u8 iosreloadblock; - u8 loadalternatedol; - u32 alternatedolstart; - u8 patchcountrystrings; - char alternatedolname[40]; - u8 returnTo; - u8 Locked; -} GameCFG; - -class CGameSettings -{ - public: - //!Constructor - CGameSettings(); - //!Destructor - ~CGameSettings(); - //!Load - bool Load(const char * path); - //!Save - bool Save(); - //!AddGame - bool AddGame(const GameCFG & NewGame); - //!Reset - bool RemoveAll(); - //!Overload Reset for one Game - bool Remove(const char * id); - bool Remove(const u8 * id) { return Remove((const char *) id); }; - bool Remove(const struct discHdr * game) { if(!game) return false; else return Remove(game->id); }; - //!Get GameCFG - GameCFG * GetGameCFG(const char * id); - //!Overload - GameCFG * GetGameCFG(const u8 * id) { return GetGameCFG((const char *) id); }; - //!Overload - GameCFG * GetGameCFG(const struct discHdr * game) { if(!game) return NULL; else return GetGameCFG(game->id); }; - //!Quick settings to PEGI conversion - static int GetPartenalPEGI(int parentalsetting); - //!Get the default configuration block - GameCFG * GetDefault(); - protected: - bool ReadGameID(const char * src, char * GameID, int size); - bool SetSetting(GameCFG & game, char *name, char *value); - bool ValidVersion(FILE * file); - //!Find the config file in the default paths - bool FindConfig(); - - void ParseLine(char *line); - void TrimLine(char *dest, const char *src, int size); - std::string ConfigPath; - std::vector GameList; - GameCFG DefaultConfig; -}; - -extern CGameSettings GameSettings; - -#endif diff --git a/source/settings/CGameStatistics.cpp b/source/settings/CGameStatistics.cpp deleted file mode 100644 index deba3efb..00000000 --- a/source/settings/CGameStatistics.cpp +++ /dev/null @@ -1,328 +0,0 @@ -#include -#include -#include -#include - -#include "CGameStatistics.h" -#include "FileOperations/fileops.h" -#include "svnrev.h" - -#define VALID_CONFIG_REV 1031 - -CGameStatistics GameStatistics; - - -CGameStatistics::CGameStatistics() -{ -} - -CGameStatistics::~CGameStatistics() -{ -} - -GameStatus * CGameStatistics::GetGameStatus(const char * id) const -{ - if(!id) - return NULL; - - for(u32 i = 0; i < GameList.size(); ++i) - { - if(strncmp(id, GameList[i].id, 6) == 0) - { - return (GameStatus *) &GameList[i]; - } - } - - return NULL; -} - -bool CGameStatistics::AddGame(const GameStatus & NewGame) -{ - for(u32 i = 0; i < GameList.size(); ++i) - { - if(strncmp(NewGame.id, GameList[i].id, 6) == 0) - { - memcpy(&GameList[i], &NewGame, sizeof(GameStatus)); - return true; - } - } - - GameList.push_back(NewGame); - - return true; -} - -bool CGameStatistics::RemoveAll() -{ - GameList.clear(); - std::vector().swap(GameList); - - return Save(); -} - -bool CGameStatistics::Remove(const char * id) -{ - if(!id) - return false; - - for(u32 i = 0; i < GameList.size(); ++i) - { - if(strncmp(id, GameList[i].id, 6) == 0) - { - GameList.erase(GameList.begin()+i); - break; - } - } - - return true; -} - -bool CGameStatistics::Load(const char * path) -{ - char line[1024]; - char filepath[300]; - snprintf(filepath, sizeof(filepath), "%sGXGameStatistics.cfg", path); - - ConfigPath = filepath; - - FILE *file = fopen(filepath, "r"); - if (!file) return false; - - if(!ValidVersion(file)) - { - fclose(file); - return false; - } - - while (fgets(line, sizeof(line), file)) - { - if (line[0] == '#') - continue; - - this->ParseLine(line); - } - fclose(file); - - return true; -} - -bool CGameStatistics::ValidVersion(FILE * file) -{ - if(!file) return false; - - char line[255]; - int revision = 0; - - while (fgets(line, sizeof(line), file)) - { - const char * ptr = strcasestr(line, "USB Loader GX R"); - if(ptr) - { - ptr += strlen("USB Loader GX R"); - revision = atoi(ptr); - break; - } - } - - rewind(file); - - return revision >= VALID_CONFIG_REV; -} - -bool CGameStatistics::Save() -{ - char filepath[300]; - strcpy(filepath, ConfigPath.c_str()); - - char * ptr = strrchr(filepath, '/'); - if(ptr) - ptr[0] = 0; - - if(!CreateSubfolder(filepath)) - return false; - - FILE * f = fopen(ConfigPath.c_str(), "w"); - if (!f) return false; - - fprintf(f, "# USB Loader GX R%s - Game statistics file\n", GetRev()); - fprintf(f, "# note: this file is automatically generated\n"); - fprintf(f, "# Num Games: %d\n", GameList.size()); - for (u32 i = 0; i < GameList.size(); i++) - { - fprintf(f, "game:%s = ", GameList[i].id); - fprintf(f, "FavoriteRank:%d; ", GameList[i].FavoriteRank); - fprintf(f, "PlayCount:%d;\n", GameList[i].PlayCount); - } - fprintf(f, "# END\n"); - fclose(f); - - return true; -} - -bool CGameStatistics::SetSetting(GameStatus & game, char *name, char *value) -{ - int i = 0; - - if(strcmp(name, "FavoriteRank") == 0) - { - if (sscanf(value, "%d", &i) == 1) - { - game.FavoriteRank = i; - } - return true; - } - else if(strcmp(name, "PlayCount") == 0) - { - if (sscanf(value, "%d", &i) == 1) - { - game.PlayCount = i; - } - return true; - } - - return false; -} - -bool CGameStatistics::ReadGameID(const char * src, char * GameID, int size) -{ - if(strncasecmp(src, "game:", 5) != 0) - return false; - - char * ptr = strchr(src, ':'); - if(!ptr) - return false; - - ptr++; - - int i = 0; - - for(i = 0; i < size; i++, ptr++) - { - if(*ptr == ' ' || *ptr == '\0') - break; - - GameID[i] = *ptr; - } - - GameID[i] = 0; - - return true; -} - -void CGameStatistics::ParseLine(char *line) -{ - char name[1024], value[1024]; - char GameID[8]; - - if(!ReadGameID(line, GameID, 6)) - return; - - if(strlen(GameID) != 6) - return; - - GameStatus NewGame; - memset(&NewGame, 0, sizeof(GameStatus)); - - snprintf(NewGame.id, sizeof(NewGame.id), GameID); - - char * LinePtr = strchr(line, '='); - - while(LinePtr != NULL) - { - LinePtr++; - - char * eq = strchr(LinePtr, ':'); - - if (!eq) break; - - this->TrimLine(name, LinePtr, sizeof(name)); - this->TrimLine(value, eq + 1, sizeof(value)); - - SetSetting(NewGame, name, value); - - LinePtr = strchr(LinePtr, ';'); - } - - AddGame(NewGame); -} - -void CGameStatistics::TrimLine(char *dest, const char *src, int size) -{ - while (*src == ' ') - src++; - - int i = 0; - - for(i = 0; i < size; i++, src++) - { - if(*src == ';' || *src == ':' || *src == '\n' || - *src == '\r' || *src == '\0') - break; - - dest[i] = *src; - } - - dest[i] = '\0'; -} - -void CGameStatistics::SetPlayCount(const char * id, int count) -{ - if(!id) - return; - - GameStatus NewStatus; - snprintf(NewStatus.id, sizeof(NewStatus.id), id); - NewStatus.FavoriteRank = 0; - NewStatus.PlayCount = count; - - GameStatus * game = GetGameStatus(id); - if(game) - { - NewStatus.FavoriteRank = game->FavoriteRank; - } - - AddGame(NewStatus); -} - -void CGameStatistics::SetFavoriteRank(const char * id, int rank) -{ - if(!id) - return; - - GameStatus NewStatus; - snprintf(NewStatus.id, sizeof(NewStatus.id), id); - NewStatus.FavoriteRank = rank; - NewStatus.PlayCount = 0; - - GameStatus * game = GetGameStatus(id); - if(game) - { - NewStatus.PlayCount = game->PlayCount; - } - - AddGame(NewStatus); -} - -int CGameStatistics::GetPlayCount(const char * id) const -{ - if(!id) - return 0; - - GameStatus * game = GetGameStatus(id); - if(game) - return game->PlayCount; - - return 0; -} - -int CGameStatistics::GetFavoriteRank(const char * id) const -{ - if(!id) - return 0; - - GameStatus * game = GetGameStatus(id); - if(game) - return game->FavoriteRank; - - return 0; -} diff --git a/source/settings/CGameStatistics.h b/source/settings/CGameStatistics.h deleted file mode 100644 index eabe9f51..00000000 --- a/source/settings/CGameStatistics.h +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef _GAME_STATISTICS_H_ -#define _GAME_STATISTICS_H_ - -#include -#include -#include -#include -#include "usbloader/disc.h" - -typedef struct _Stats -{ - char id[7]; - u8 FavoriteRank; - int PlayCount; -} GameStatus; - -class CGameStatistics -{ - public: - //!Constructor - CGameStatistics(); - //!Destructor - ~CGameStatistics(); - //!Load - bool Load(const char * path); - //!Save - bool Save(); - //!AddGame - bool AddGame(const GameStatus & NewGame); - //!Reset - bool RemoveAll(); - //!Overload for removing one game out of the list - bool Remove(const char * id); - bool Remove(const u8 * id) { return Remove((const char *) id); }; - bool Remove(const struct discHdr * game) { if(!game) return false; else return Remove(game->id); }; - //!Overloads for set playcount - void SetPlayCount(const char * id, int count); - void SetPlayCount(const u8 * id, int count) { SetPlayCount((const char *) id, count); }; - void SetPlayCount(const struct discHdr * game, int count) { if(!game) return; SetPlayCount(game->id, count); }; - //!Overloads for get playcount - int GetPlayCount(const char * id) const; - int GetPlayCount(const u8 * id) const { return GetPlayCount((const char *) id); }; - int GetPlayCount(const struct discHdr * game) const { if(!game) return 0; else return GetPlayCount(game->id); }; - //!Overloads for set FavoriteRank - void SetFavoriteRank(const char * id, int rank); - void SetFavoriteRank(const u8 * id, int rank) { SetFavoriteRank((const char *) id, rank); }; - void SetFavoriteRank(const struct discHdr * game, int rank) { if(!game) return; SetFavoriteRank(game->id, rank); }; - //!Overloads for get FavoriteRank - int GetFavoriteRank(const char * id) const; - int GetFavoriteRank(const u8 * id) const { return GetFavoriteRank((const char *) id); }; - int GetFavoriteRank(const struct discHdr * game) const { if(!game) return 0; else return GetFavoriteRank(game->id); }; - //!Get GameStatus - GameStatus * GetGameStatus(const char * id) const; - //!Overload - GameStatus * GetGameStatus(const u8 * id) const { return GetGameStatus((const char *) id); }; - //!Overload - GameStatus * GetGameStatus(const struct discHdr * game) const { if(!game) return NULL; else return GetGameStatus(game->id); }; - - protected: - bool ReadGameID(const char * src, char * GameID, int size); - bool SetSetting(GameStatus & game, char *name, char *value); - bool ValidVersion(FILE * file); - - void ParseLine(char *line); - void TrimLine(char *dest, const char *src, int size); - std::string ConfigPath; - std::vector GameList; -}; - -extern CGameStatistics GameStatistics; - -#endif diff --git a/source/settings/CSettings.cpp b/source/settings/CSettings.cpp deleted file mode 100644 index 9182c402..00000000 --- a/source/settings/CSettings.cpp +++ /dev/null @@ -1,822 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include -#include -#include -#include - -#include "CSettings.h" -#include "CGameSettings.h" -#include "CGameStatistics.h" -#include "Controls/DeviceHandler.hpp" -#include "language/gettext.h" -#include "themes/CTheme.h" -#include "FileOperations/fileops.h" -#include "utils/encrypt.h" -#include "svnrev.h" - -#define VALID_CONFIG_REV 1031 - -CSettings Settings; - -CSettings::CSettings() -{ - CONF_Init(); - strcpy(BootDevice, "sd:"); - snprintf(ConfigPath, sizeof(ConfigPath), "%s/config/", BootDevice); - this->SetDefault(); -} - -CSettings::~CSettings() -{ -} - -void CSettings::SetDefault() -{ - snprintf(covers_path, sizeof(covers_path), "%simages/", ConfigPath); - snprintf(covers2d_path, sizeof(covers2d_path), "%simages/2D/", ConfigPath); - snprintf(coversFull_path, sizeof(coversFull_path), "%simages/full/", ConfigPath); - snprintf(disc_path, sizeof(disc_path), "%simages/disc/", ConfigPath); - snprintf(titlestxt_path, sizeof(titlestxt_path), "%s", ConfigPath); - snprintf(languagefiles_path, sizeof(languagefiles_path), "%slanguage/", ConfigPath); - snprintf(update_path, sizeof(update_path), "%s/apps/usbloader_gx/", BootDevice); - snprintf(homebrewapps_path, sizeof(homebrewapps_path), "%s/apps/", BootDevice); - snprintf(Cheatcodespath, sizeof(Cheatcodespath), "%s/codes/", BootDevice); - snprintf(TxtCheatcodespath, sizeof(TxtCheatcodespath), "%s/txtcodes/", BootDevice); - snprintf(BcaCodepath, sizeof(BcaCodepath), "%s/bca/", BootDevice); - snprintf(WipCodepath, sizeof(WipCodepath), "%s/wip/", BootDevice); - snprintf(WDMpath, sizeof(WDMpath), "%s/wdm/", BootDevice); - snprintf(theme_path, sizeof(theme_path), "%stheme/", ConfigPath); - snprintf(dolpath, sizeof(dolpath), "%s/", BootDevice); - strcpy(theme, ""); - strcpy(language_path, ""); - strcpy(ogg_path, ""); - strcpy(unlockCode, ""); - strcpy(db_language, ""); - strcpy(returnTo, ""); - - godmode = 1; - videomode = VIDEO_MODE_DISCDEFAULT; - videopatch = OFF; - language = CONSOLE_DEFAULT; - ocarina = OFF; - hddinfo = CLOCK_HR12; - sinfo = ON; - rumble = ON; - GameSort = SORT_ABC; - volume = 80; - sfxvolume = 80; - gamesoundvolume = 80; - tooltips = ON; - gamesound = ON; - parentalcontrol = PARENTAL_LVL_ADULT; - cios = 249; - gridRows = 3; - error002 = 2; - partition = -1; - discart = DISCARTS_ORIGINALS_CUSTOMS; - xflip = XFLIP_NO; - quickboot = OFF; - wiilight = WIILIGHT_ON; - autonetwork = OFF; - patchcountrystrings = OFF; - titlesOverride = ON; - screensaver = SCREENSAVER_10_MIN; - musicloopmode = ON; - marknewtitles = ON; - ShowFreeSpace = ON; - PlaylogUpdate = ON; - ParentalBlocks = BLOCK_ALL; - InstallToDir = INSTALL_TO_NAME_GAMEID; - GameSplit = GAMESPLIT_4GB; - InstallPartitions = ONLY_GAME_PARTITION; - widescreen = (CONF_GetAspectRatio() == CONF_ASPECT_16_9); - HomeMenu = HOME_MENU_DEFAULT; - MultiplePartitions = OFF; - USBPort = 0; -} - -bool CSettings::Load() -{ - FindConfig(); - //! Reset default path variables to the right device - SetDefault(); - - char filepath[300]; - snprintf(filepath, sizeof(filepath), "%sGXGlobal.cfg", ConfigPath); - - FILE * file = fopen(filepath, "r"); - if (!file) return false; - - if(!ValidVersion(file)) - { - fclose(file); - return false; - } - - char line[1024]; - - while (fgets(line, sizeof(line), file)) - { - if (line[0] == '#') continue; - - this->ParseLine(line); - } - fclose(file); - - return true; -} - -bool CSettings::ValidVersion(FILE * file) -{ - if(!file) return false; - - char line[255]; - int revision = 0; - - while (fgets(line, sizeof(line), file)) - { - const char * ptr = strcasestr(line, "USB Loader GX R"); - if(ptr) - { - ptr += strlen("USB Loader GX R"); - revision = atoi(ptr); - break; - } - } - - rewind(file); - - return revision >= VALID_CONFIG_REV; -} - -bool CSettings::Reset() -{ - this->SetDefault(); - - if (this->Save()) return true; - - return false; -} - -bool CSettings::Save() -{ - if (!FindConfig()) return false; - - char filedest[300]; - snprintf(filedest, sizeof(filedest), "%sGXGlobal.cfg", ConfigPath); - - if(!CreateSubfolder(ConfigPath)) return false; - - FILE * file = fopen(filedest, "w"); - if (!file) return false; - - fprintf(file, "# USB Loader GX R%s - Main settings file\n", GetRev()); - fprintf(file, "# Note: This file is automatically generated\n "); - fprintf(file, "godmode = %d\n ", godmode); - fprintf(file, "videomode = %d\n ", videomode); - fprintf(file, "videopatch = %d\n ", videopatch); - fprintf(file, "language = %d\n ", language); - fprintf(file, "ocarina = %d\n ", ocarina); - fprintf(file, "hddinfo = %d\n ", hddinfo); - fprintf(file, "sinfo = %d\n ", sinfo); - fprintf(file, "rumble = %d\n ", rumble); - fprintf(file, "volume = %d\n ", volume); - fprintf(file, "sfxvolume = %d\n ", sfxvolume); - fprintf(file, "gamesoundvolume = %d\n ", gamesoundvolume); - fprintf(file, "tooltips = %d\n ", tooltips); - char EncryptedTxt[50]; - EncryptString(unlockCode, EncryptedTxt); - fprintf(file, "password = %s\n ", EncryptedTxt); - fprintf(file, "GameSort = %d\n ", GameSort); - fprintf(file, "cios = %d\n ", cios); - fprintf(file, "keyset = %d\n ", keyset); - fprintf(file, "xflip = %d\n ", xflip); - fprintf(file, "gridRows = %d\n ", gridRows); - fprintf(file, "quickboot = %d\n ", quickboot); - fprintf(file, "wsprompt = %d\n ", wsprompt); - fprintf(file, "parentalcontrol = %d\n ", parentalcontrol); - fprintf(file, "covers_path = %s\n ", covers_path); - fprintf(file, "covers2d_path = %s\n ", covers2d_path); - fprintf(file, "coversFull_path = %s\n ", coversFull_path); - fprintf(file, "theme_path = %s\n ", theme_path); - fprintf(file, "theme = %s\n ", theme); - fprintf(file, "disc_path = %s\n ", disc_path); - fprintf(file, "language_path = %s\n ", language_path); - fprintf(file, "languagefiles_path = %s\n ", languagefiles_path); - fprintf(file, "TxtCheatcodespath = %s\n ", TxtCheatcodespath); - fprintf(file, "titlestxt_path = %s\n ", titlestxt_path); - fprintf(file, "gamesound = %d\n ", gamesound); - fprintf(file, "dolpath = %s\n ", dolpath); - fprintf(file, "ogg_path = %s\n ", ogg_path); - fprintf(file, "wiilight = %d\n ", wiilight); - fprintf(file, "gameDisplay = %d\n ", gameDisplay); - fprintf(file, "update_path = %s\n ", update_path); - fprintf(file, "homebrewapps_path = %s\n ", homebrewapps_path); - fprintf(file, "Cheatcodespath = %s\n ", Cheatcodespath); - fprintf(file, "BcaCodepath = %s\n ", BcaCodepath); - fprintf(file, "WipCodepath = %s\n ", WipCodepath); - fprintf(file, "WDMpath = %s\n ", WDMpath); - fprintf(file, "titlesOverride = %d\n ", titlesOverride); - fprintf(file, "patchcountrystrings = %d\n ", patchcountrystrings); - fprintf(file, "screensaver = %d\n ", screensaver); - fprintf(file, "musicloopmode = %d\n ", musicloopmode); - fprintf(file, "error002 = %d\n ", error002); - fprintf(file, "autonetwork = %d\n ", autonetwork); - fprintf(file, "discart = %d\n ", discart); - fprintf(file, "partition = %d\n ", partition); - fprintf(file, "marknewtitles = %d\n ", marknewtitles); - fprintf(file, "ShowFreeSpace = %d\n ", ShowFreeSpace); - fprintf(file, "InstallToDir = %d\n ", InstallToDir); - fprintf(file, "GameSplit = %d\n ", GameSplit); - fprintf(file, "InstallPartitions = %08X\n ", InstallPartitions); - fprintf(file, "PlaylogUpdate = %d\n ", PlaylogUpdate); - fprintf(file, "ParentalBlocks = %08X\n ", ParentalBlocks); - fprintf(file, "returnTo = %s\n ", returnTo); - fprintf(file, "HomeMenu = %d\n ", HomeMenu); - fprintf(file, "MultiplePartitions = %d\n ", MultiplePartitions); - fprintf(file, "USBPort = %d\n ", USBPort); - fclose(file); - - return true; -} - -bool CSettings::SetSetting(char *name, char *value) -{ - int i = 0; - - if (strcmp(name, "godmode") == 0) - { - if (sscanf(value, "%d", &i) == 1) - { - godmode = i; - } - return true; - } - else if (strcmp(name, "videomode") == 0) - { - if (sscanf(value, "%d", &i) == 1) - { - videomode = i; - } - return true; - } - else if (strcmp(name, "videopatch") == 0) - { - if (sscanf(value, "%d", &i) == 1) - { - videopatch = i; - } - return true; - } - else if (strcmp(name, "language") == 0) - { - if (sscanf(value, "%d", &i) == 1) - { - language = i; - } - return true; - } - else if (strcmp(name, "ocarina") == 0) - { - if (sscanf(value, "%d", &i) == 1) - { - ocarina = i; - } - return true; - } - else if (strcmp(name, "hddinfo") == 0) - { - if (sscanf(value, "%d", &i) == 1) - { - hddinfo = i; - } - return true; - } - else if (strcmp(name, "sinfo") == 0) - { - if (sscanf(value, "%d", &i) == 1) - { - sinfo = i; - } - return true; - } - else if (strcmp(name, "rumble") == 0) - { - if (sscanf(value, "%d", &i) == 1) - { - rumble = i; - } - return true; - } - else if (strcmp(name, "volume") == 0) - { - if (sscanf(value, "%d", &i) == 1) - { - volume = i; - } - return true; - } - else if (strcmp(name, "sfxvolume") == 0) - { - if (sscanf(value, "%d", &i) == 1) - { - sfxvolume = i; - } - return true; - } - else if (strcmp(name, "gamesoundvolume") == 0) - { - if (sscanf(value, "%d", &i) == 1) - { - gamesoundvolume = i; - } - return true; - } - else if (strcmp(name, "tooltips") == 0) - { - if (sscanf(value, "%d", &i) == 1) - { - tooltips = i; - } - return true; - } - else if (strcmp(name, "password") == 0) - { - char EncryptedTxt[50]; - strcpy(EncryptedTxt, value); - DecryptString(EncryptedTxt, unlockCode); - return true; - } - else if (strcmp(name, "GameSort") == 0) - { - if (sscanf(value, "%d", &i) == 1) GameSort = i; - return true; - } - else if (strcmp(name, "cios") == 0) - { - if (sscanf(value, "%d", &i) == 1) cios = i; - return true; - } - else if (strcmp(name, "keyset") == 0) - { - if (sscanf(value, "%d", &i) == 1) keyset = i; - return true; - } - else if (strcmp(name, "xflip") == 0) - { - if (sscanf(value, "%d", &i) == 1) xflip = i; - return true; - } - else if (strcmp(name, "gridRows") == 0) - { - if (sscanf(value, "%d", &i) == 1) gridRows = i; - return true; - } - else if (strcmp(name, "quickboot") == 0) - { - if (sscanf(value, "%d", &i) == 1) quickboot = i; - return true; - } - else if (strcmp(name, "partition") == 0) - { - if (sscanf(value, "%d", &i) == 1) partition = i; - return true; - } - else if (strcmp(name, "wsprompt") == 0) - { - if (sscanf(value, "%d", &i) == 1) wsprompt = i; - return true; - } - else if (strcmp(name, "gameDisplay") == 0) - { - if (sscanf(value, "%d", &i) == 1) gameDisplay = i; - return true; - } - else if (strcmp(name, "parentalcontrol") == 0) - { - if (sscanf(value, "%d", &i) == 1) parentalcontrol = i; - return true; - } - else if (strcmp(name, "screensaver") == 0) - { - if (sscanf(value, "%d", &i) == 1) screensaver = i; - return true; - } - else if (strcmp(name, "titlesOverride") == 0) - { - if (sscanf(value, "%d", &i) == 1) titlesOverride = i; - return true; - } - else if (strcmp(name, "musicloopmode") == 0) - { - if (sscanf(value, "%d", &i) == 1) musicloopmode = i; - return true; - } - else if (strcmp(name, "gamesound") == 0) - { - if (sscanf(value, "%d", &i) == 1) gamesound = i; - return true; - } - else if (strcmp(name, "wiilight") == 0) - { - if (sscanf(value, "%d", &i) == 1) wiilight = i; - return true; - } - else if (strcmp(name, "marknewtitles") == 0) - { - if (sscanf(value, "%d", &i) == 1) marknewtitles = i; - return true; - } - else if (strcmp(name, "ShowFreeSpace") == 0) - { - if (sscanf(value, "%d", &i) == 1) ShowFreeSpace = i; - return true; - } - else if (strcmp(name, "HomeMenu") == 0) - { - if (sscanf(value, "%d", &i) == 1) HomeMenu = i; - return true; - } - else if (strcmp(name, "MultiplePartitions") == 0) - { - if (sscanf(value, "%d", &i) == 1) MultiplePartitions = i; - return true; - } - else if (strcmp(name, "USBPort") == 0) - { - if (sscanf(value, "%d", &i) == 1) USBPort = i; - return true; - } - else if (strcmp(name, "patchcountrystrings") == 0) - { - if (sscanf(value, "%d", &i) == 1) patchcountrystrings = i; - return true; - } - else if (strcmp(name, "discart") == 0) - { - if (sscanf(value, "%d", &i) == 1) discart = i; - return true; - } - else if (strcmp(name, "error002") == 0) - { - if (sscanf(value, "%d", &i) == 1) error002 = i; - return true; - } - else if (strcmp(name, "autonetwork") == 0) - { - if (sscanf(value, "%d", &i) == 1) autonetwork = i; - return true; - } - else if (strcmp(name, "InstallToDir") == 0) - { - if (sscanf(value, "%d", &i) == 1) InstallToDir = i; - return true; - } - else if (strcmp(name, "GameSplit") == 0) - { - if (sscanf(value, "%d", &i) == 1) GameSplit = i; - return true; - } - else if (strcmp(name, "PlaylogUpdate") == 0) - { - if (sscanf(value, "%d", &i) == 1) PlaylogUpdate = i; - return true; - } - else if (strcmp(name, "InstallPartitions") == 0) - { - InstallPartitions = strtoul(value, 0, 16); - return true; - } - else if (strcmp(name, "ParentalBlocks") == 0) - { - ParentalBlocks = strtoul(value, 0, 16); - return true; - } - else if (strcmp(name, "covers_path") == 0) - { - strcpy(covers_path, value); - return true; - } - else if (strcmp(name, "covers2d_path") == 0) - { - strcpy(covers2d_path, value); - return true; - } - else if (strcmp(name, "coversFull_path") == 0) - { - strcpy(coversFull_path, value); - return true; - } - else if (strcmp(name, "theme_path") == 0) - { - strcpy(theme_path, value); - return true; - } - else if (strcmp(name, "theme") == 0) - { - strcpy(theme, value); - return true; - } - else if (strcmp(name, "disc_path") == 0) - { - strcpy(disc_path, value); - return true; - } - else if (strcmp(name, "language_path") == 0) - { - strcpy(language_path, value); - return true; - } - else if (strcmp(name, "languagefiles_path") == 0) - { - strcpy(languagefiles_path, value); - return true; - } - else if (strcmp(name, "TxtCheatcodespath") == 0) - { - strcpy(TxtCheatcodespath, value); - return true; - } - else if (strcmp(name, "titlestxt_path") == 0) - { - strcpy(titlestxt_path, value); - return true; - } - else if (strcmp(name, "dolpath") == 0) - { - strcpy(dolpath, value); - return true; - } - else if (strcmp(name, "ogg_path") == 0) - { - strcpy(ogg_path, value); - return true; - } - else if (strcmp(name, "update_path") == 0) - { - strcpy(update_path, value); - return true; - } - else if (strcmp(name, "homebrewapps_path") == 0) - { - strcpy(homebrewapps_path, value); - return true; - } - else if (strcmp(name, "Cheatcodespath") == 0) - { - strcpy(Cheatcodespath, value); - return true; - } - else if (strcmp(name, "BcaCodepath") == 0) - { - strcpy(BcaCodepath, value); - return true; - } - else if (strcmp(name, "WipCodepath") == 0) - { - strcpy(WipCodepath, value); - return true; - } - else if (strcmp(name, "WDMpath") == 0) - { - strcpy(WDMpath, value); - return true; - } - else if (strcmp(name, "returnTo") == 0) - { - strcpy(returnTo, value); - return true; - } - - return false; -} - -bool CSettings::FindConfig() -{ - bool found = false; - char CheckDevice[10]; - char CheckPath[300]; - - for (int i = SD; i < MAXDEVICES; ++i) - { - sprintf(CheckDevice, "%s:", DeviceName[i]); - - if(!found) - { - strcpy(BootDevice, CheckDevice); - snprintf(ConfigPath, sizeof(ConfigPath), "%s/apps/usbloader_gx/", BootDevice); - snprintf(CheckPath, sizeof(CheckPath), "%sGXGlobal.cfg", ConfigPath); - found = CheckFile(CheckPath); - } - if(!found) - { - strcpy(BootDevice, CheckDevice); - snprintf(ConfigPath, sizeof(ConfigPath), "%s/config/", BootDevice); - snprintf(CheckPath, sizeof(CheckPath), "%sGXGlobal.cfg", ConfigPath); - found = CheckFile(CheckPath); - } - } - - if (!found) - { - FILE * testFp = NULL; - //! No existing config so try to find a place where we can write it too - for (int i = SD; i < MAXDEVICES; ++i) - { - sprintf(CheckDevice, "%s:", DeviceName[i]); - - if (!found) - { - strcpy(BootDevice, CheckDevice); - snprintf(ConfigPath, sizeof(ConfigPath), "%s/apps/usbloader_gx/", BootDevice); - snprintf(CheckPath, sizeof(CheckPath), "%sGXGlobal.cfg", ConfigPath); - testFp = fopen(CheckPath, "wb"); - found = (testFp != NULL); - fclose(testFp); - } - if (!found) - { - strcpy(BootDevice, CheckDevice); - snprintf(ConfigPath, sizeof(ConfigPath), "%s/config/", BootDevice); - CreateSubfolder(ConfigPath); - snprintf(CheckPath, sizeof(CheckPath), "%sGXGlobal.cfg", ConfigPath); - testFp = fopen(CheckPath, "wb"); - found = (testFp != NULL); - fclose(testFp); - } - } - } - - return found; -} - -void CSettings::ParseLine(char *line) -{ - char temp[1024], name[1024], value[1024]; - - strncpy(temp, line, sizeof(temp)); - - char * eq = strchr(temp, '='); - - if (!eq) return; - - *eq = 0; - - this->TrimLine(name, temp, sizeof(name)); - this->TrimLine(value, eq + 1, sizeof(value)); - - this->SetSetting(name, value); -} - -void CSettings::TrimLine(char *dest, char *src, int size) -{ - int len; - while (*src == ' ') - src++; - len = strlen(src); - while (len > 0 && strchr(" \r\n", src[len - 1])) - len--; - if (len >= size) len = size - 1; - strncpy(dest, src, len); - dest[len] = 0; -} - -//! Get language code from the selected language file -//! eg. german.lang = DE and default to EN -static inline const char * GetLangCode(const char * langpath) -{ - if(strcasestr(langpath, "japanese")) - return "JA"; - - else if(strcasestr(langpath, "german")) - return "DE"; - - else if(strcasestr(langpath, "french")) - return "FR"; - - else if(strcasestr(langpath, "spanish")) - return "ES"; - - else if(strcasestr(langpath, "italian")) - return "IT"; - - else if(strcasestr(langpath, "dutch")) - return "NL"; - - else if(strcasestr(langpath, "schinese")) - return "ZHCN"; - - else if(strcasestr(langpath, "tchinese")) - return "ZHTW"; - - else if(strcasestr(langpath, "korean")) - return "KO"; - - return "EN"; -} - -bool CSettings::LoadLanguage(const char *path, int lang) -{ - bool ret = false; - - if (path && strlen(path) > 3) - { - ret = gettextLoadLanguage(path); - if (ret) - { - snprintf(language_path, sizeof(language_path), path); - strcpy(db_language, GetLangCode(language_path)); - } - else - return LoadLanguage(NULL, CONSOLE_DEFAULT); - } - else if (lang >= 0) - { - char filepath[150]; - char langpath[150]; - snprintf(langpath, sizeof(langpath), "%s", languagefiles_path); - if (langpath[strlen(langpath) - 1] != '/') - { - char * ptr = strrchr(langpath, '/'); - if (ptr) - { - ptr++; - ptr[0] = '\0'; - } - } - - if (lang == CONSOLE_DEFAULT) - { - return LoadLanguage(NULL, CONF_GetLanguage()); - } - else if (lang == JAPANESE) - { - snprintf(filepath, sizeof(filepath), "%s/japanese.lang", langpath); - } - else if (lang == ENGLISH) - { - snprintf(filepath, sizeof(filepath), "%s/english.lang", langpath); - } - else if (lang == GERMAN) - { - snprintf(filepath, sizeof(filepath), "%s/german.lang", langpath); - } - else if (lang == FRENCH) - { - snprintf(filepath, sizeof(filepath), "%s/french.lang", langpath); - } - else if (lang == SPANISH) - { - snprintf(filepath, sizeof(filepath), "%s/spanish.lang", langpath); - } - else if (lang == ITALIAN) - { - snprintf(filepath, sizeof(filepath), "%s/italian.lang", langpath); - } - else if (lang == DUTCH) - { - snprintf(filepath, sizeof(filepath), "%s/dutch.lang", langpath); - } - else if (lang == S_CHINESE) - { - snprintf(filepath, sizeof(filepath), "%s/schinese.lang", langpath); - } - else if (lang == T_CHINESE) - { - snprintf(filepath, sizeof(filepath), "%s/tchinese.lang", langpath); - } - else if (lang == KOREAN) - { - snprintf(filepath, sizeof(filepath), "%s/korean.lang", langpath); - } - - strcpy(db_language, GetLangCode(filepath)); - ret = gettextLoadLanguage(filepath); - if (ret) - snprintf(language_path, sizeof(language_path), filepath); - } - - return ret; -} diff --git a/source/settings/CSettings.h b/source/settings/CSettings.h deleted file mode 100644 index 2cde9edb..00000000 --- a/source/settings/CSettings.h +++ /dev/null @@ -1,129 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#ifndef _CSETTINGS_H_ -#define _CSETTINGS_H_ - -#include -#include -#include -#include "SettingsEnums.h" - -class CSettings -{ - public: - //!Constructor - CSettings(); - //!Destructor - ~CSettings(); - //!Set Default Settings - void SetDefault(); - //!Load Settings - bool Load(); - //!Save Settings - bool Save(); - //!Reset Settings - bool Reset(); - //!Load a languagefile - //!\param language - bool LoadLanguage(const char *path, int language = -1); - - /** Variables **/ - char BootDevice[10]; - char unlockCode[20]; - char db_language[20]; - char returnTo[20]; - char ConfigPath[80]; - char covers_path[100]; - char coversFull_path[100]; - char covers2d_path[100]; - char theme_path[100]; - char theme[100]; - char disc_path[100]; - char titlestxt_path[100]; - char language_path[100]; - char languagefiles_path[100]; - char ogg_path[150]; - char Cheatcodespath[100]; - char TxtCheatcodespath[100]; - char BcaCodepath[100]; - char WipCodepath[100]; - char dolpath[100]; - char update_path[100]; - char homebrewapps_path[100]; - char WDMpath[100]; - short videomode; - short language; - short ocarina; - short videopatch; - short sinfo; - short hddinfo; - short rumble; - short xflip; - short volume; - short sfxvolume; - short gamesoundvolume; - short tooltips; - short parentalcontrol; - short cios; - short quickboot; - short wsprompt; - short keyset; - short GameSort; - short wiilight; - short gameDisplay; - short patchcountrystrings; - short screensaver; - short partition; - short musicloopmode; - short widescreen; - short godmode; - short error002; - short titlesOverride; // db_titles - short gridRows; - short autonetwork; - short discart; - short gamesound; - short marknewtitles; - short InstallToDir; - short GameSplit; - short PlaylogUpdate; - short ShowFreeSpace; - short HomeMenu; - short MultiplePartitions; - short USBPort; - u32 InstallPartitions; - u32 ParentalBlocks; - protected: - bool ValidVersion(FILE * file); - bool SetSetting(char *name, char *value); - //!Find the config file in the default paths - bool FindConfig(); - - void ParseLine(char *line); - void TrimLine(char *dest, char *src, int size); -}; - -extern CSettings Settings; - -#endif diff --git a/source/settings/GameTitles.cpp b/source/settings/GameTitles.cpp deleted file mode 100644 index 9a32c7cb..00000000 --- a/source/settings/GameTitles.cpp +++ /dev/null @@ -1,263 +0,0 @@ -#include -#include "GameTitles.h" -#include "CSettings.h" -#include "usbloader/GameList.h" -#include "xml/xml.h" -#include "xml/WiiTDB.hpp" - -CGameTitles GameTitles; - -void CGameTitles::SetGameTitle(const char * id, const char * title) -{ - if(!id || !title) - return; - - for(u32 i = 0; i < TitleList.size(); ++i) - { - if(strncasecmp(id, TitleList[i].GameID, 6) == 0) - { - TitleList[i].Title = title; - return; - } - } - - GameTitle newTitle; - newTitle.Title = title; - snprintf(newTitle.GameID, sizeof(newTitle.GameID), id); - - TitleList.push_back(newTitle); -} - -const char * CGameTitles::GetTitle(const char * id) const -{ - if(!id) - return NULL; - - for(u32 i = 0; i < TitleList.size(); ++i) - { - if(strncasecmp(id, TitleList[i].GameID, 6) == 0) - return TitleList[i].Title.c_str(); - } - - return NULL; -} - -const char * CGameTitles::GetTitle(const struct discHdr *header) const -{ - if(!header) - return NULL; - - for(u32 i = 0; i < TitleList.size(); ++i) - { - if(strncasecmp((const char *) header->id, TitleList[i].GameID, 6) == 0) - return TitleList[i].Title.c_str(); - } - - return header->title; -} - -int CGameTitles::GetParentalRating(const char * id) const -{ - if(!id) - return -1; - - for(u32 i = 0; i < TitleList.size(); ++i) - { - if(strncasecmp(id, TitleList[i].GameID, 6) == 0) - return TitleList[i].ParentalRating; - } - - return -1; -} - - -int CGameTitles::GetPlayersCount(const char * id) const -{ - if(!id) - return 1; - - for(u32 i = 0; i < TitleList.size(); ++i) - { - if(strncasecmp(id, TitleList[i].GameID, 6) == 0) - return TitleList[i].PlayersCount; - } - - return 1; -} - -void CGameTitles::SetDefault() -{ - TitleList.clear(); - //! Free vector memory - std::vector().swap(TitleList); -} - -typedef struct _CacheTitle -{ - char GameID[7]; - char Title[100]; - int ParentalRating; - int PlayersCount; - -} ATTRIBUTE_PACKED CacheTitle; - -u32 CGameTitles::ReadCachedTitles(const char * path) -{ - //! Load cached least so that the titles are preloaded before reading list - FILE * f = fopen(path, "rb"); - if(!f) return 0; - - char LangCode[11]; - memset(LangCode, 0, sizeof(LangCode)); - - fread(LangCode, 1, 10, f); - - //! Check if cache has correct language code - if(strcmp(LangCode, Settings.db_language) != 0) - { - fclose(f); - return 0; - } - - u32 count = 0; - fread(&count, 1, 4, f); - - std::vector CachedList(count); - TitleList.resize(count); - - fread(&CachedList[0], 1, count*sizeof(CacheTitle), f); - fclose(f); - - for(u32 i = 0; i < count; ++i) - { - strcpy(TitleList[i].GameID, CachedList[i].GameID); - TitleList[i].Title = CachedList[i].Title; - TitleList[i].ParentalRating = CachedList[i].ParentalRating; - TitleList[i].PlayersCount = CachedList[i].PlayersCount; - } - - return count; -} - -void CGameTitles::WriteCachedTitles(const char * path) -{ - FILE *f = fopen(path, "wb"); - if(!f) - return; - - CacheTitle Cache; - u32 count = TitleList.size(); - - fwrite(Settings.db_language, 1, 10, f); - fwrite(&count, 1, 4, f); - - for(u32 i = 0; i < count; ++i) - { - memset(&Cache, 0, sizeof(CacheTitle)); - - strcpy(Cache.GameID, TitleList[i].GameID); - snprintf(Cache.Title, sizeof(Cache.Title), TitleList[i].Title.c_str()); - Cache.ParentalRating = TitleList[i].ParentalRating; - Cache.PlayersCount = TitleList[i].PlayersCount; - - fwrite(&Cache, 1, sizeof(CacheTitle), f); - } - - fclose(f); -} - -void CGameTitles::RemoveUnusedCache(std::vector &MissingTitles) -{ - std::vector UsedCachedList(TitleList.size(), false); - - for(int i = 0; i < gameList.GameCount(); ++i) - { - bool isCached = false; - - for(u32 n = 0; n < TitleList.size(); ++n) - { - if(strncmp(TitleList[n].GameID, (const char *) gameList[i]->id, 6) == 0) - { - UsedCachedList[n] = true; - isCached = true; - break; - } - } - - if(!isCached) - { - char gameID[7]; - snprintf(gameID, sizeof(gameID), (const char *) gameList[i]->id); - MissingTitles.push_back(std::string(gameID)); - } - } - - for(u32 n = 0; n < TitleList.size(); ++n) - { - if(!UsedCachedList[n]) - TitleList.erase(TitleList.begin()+n); - } -} - -void CGameTitles::LoadTitlesFromWiiTDB(const char * path) -{ - this->SetDefault(); - - if(!path || !Settings.titlesOverride) - return; - - std::string Filepath = path; - if(path[strlen(path)-1] != '/') - Filepath += '/'; - - std::string Cachepath = Filepath; - Cachepath += "TitlesCache.bin"; - Filepath += "wiitdb.xml"; - - //! Read game titles cache database - ReadCachedTitles(Cachepath.c_str()); - - //! Read game list - gameList.LoadUnfiltered(); - - //! Removed unused cache titles and get the still missing ones - std::vector MissingTitles; - RemoveUnusedCache(MissingTitles); - if(MissingTitles.size() == 0) - { - WriteCachedTitles(Cachepath.c_str()); - return; - } - - std::string Title; - - WiiTDB XML_DB(Filepath.c_str()); - XML_DB.SetLanguageCode(Settings.db_language); - int Rating; - std::string RatValTxt; - - for(u32 i = 0; i < MissingTitles.size(); ++i) - { - if(!XML_DB.GetTitle(MissingTitles[i].c_str(), Title)) - continue; - - this->SetGameTitle(MissingTitles[i].c_str(), Title.c_str()); - - TitleList[TitleList.size()-1].ParentalRating = -1; - TitleList[TitleList.size()-1].PlayersCount = 1; - - Rating = XML_DB.GetRating(MissingTitles[i].c_str()); - if(Rating < 0) - continue; - - if(!XML_DB.GetRatingValue(MissingTitles[i].c_str(), RatValTxt)) - continue; - - TitleList[TitleList.size()-1].ParentalRating = ConvertRating(RatValTxt.c_str(), WiiTDB::RatingToString(Rating), "PEGI"); - int ret = XML_DB.GetPlayers(MissingTitles[i].c_str()); - if(ret > 0) - TitleList[TitleList.size()-1].PlayersCount = ret; - } - - WriteCachedTitles(Cachepath.c_str()); -} diff --git a/source/settings/GameTitles.h b/source/settings/GameTitles.h deleted file mode 100644 index 35fa09a6..00000000 --- a/source/settings/GameTitles.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef WIITDB_TITLES_H_ -#define WIITDB_TITLES_H_ - -#include -#include -#include -#include "usbloader/disc.h" - -typedef struct _GameTitle -{ - char GameID[7]; - std::string Title; - int ParentalRating; - int PlayersCount; - -} GameTitle; - -class CGameTitles -{ - public: - //! Set a game title from wiitdb - void SetGameTitle(const char * id, const char * title); - //! Overload - void SetGameTitle(const u8 * id, const char * title) { SetGameTitle((const char *) id, title); }; - - //! Get a game title - const char * GetTitle(const char * id) const; - //! Overload - const char * GetTitle(const u8 * id) const { return GetTitle((const char *) id); }; - //! Overload - const char * GetTitle(const struct discHdr *header) const; - - //! Get game parental rating - int GetParentalRating(const char * id) const; - //! Get possible number of players for this game - int GetPlayersCount(const char * id) const; - //! Load Game Titles from WiiTDB - void LoadTitlesFromWiiTDB(const char * path); - //! Set default game titles - void SetDefault(); - protected: - u32 ReadCachedTitles(const char * path); - void WriteCachedTitles(const char * path); - void RemoveUnusedCache(std::vector &MissingTitles); - - std::vector TitleList; -}; - -extern CGameTitles GameTitles; - -#endif diff --git a/source/settings/Settings.cpp b/source/settings/Settings.cpp deleted file mode 100644 index c7ac0a43..00000000 --- a/source/settings/Settings.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include -#include -#include "settings/menus/GlobalSettings.hpp" -#include "settings/menus/GameSettingsMenu.hpp" - -/**************************************************************************** - * MenuSettings - ***************************************************************************/ -int MenuSettings() -{ - GlobalSettings * Menu = new GlobalSettings(); - mainWindow->Append(Menu); - - Menu->ShowMenu(); - - int returnMenu = MENU_NONE; - - while((returnMenu = Menu->MainLoop()) == MENU_NONE); - - delete Menu; - - return returnMenu; -} - -/******************************************************************************** - *Game specific settings - *********************************************************************************/ -int MenuGameSettings(struct discHdr * header) -{ - GameSettingsMenu * Menu = new GameSettingsMenu(header); - mainWindow->Append(Menu); - - Menu->ShowMenu(); - - int returnMenu = MENU_NONE; - - while((returnMenu = Menu->MainLoop()) == MENU_NONE); - - delete Menu; - - return returnMenu; -} diff --git a/source/settings/Settings.h b/source/settings/Settings.h deleted file mode 100644 index 9eb367ec..00000000 --- a/source/settings/Settings.h +++ /dev/null @@ -1,14 +0,0 @@ -/**************************************************************************** - * Settings - * USB Loader GX 2009 - * - * settings.h - ***************************************************************************/ - -#ifndef _SETTINGS_H_ -#define _SETTINGS_H_ - -int MenuSettings(); -int MenuGameSettings(struct discHdr * header); - -#endif diff --git a/source/settings/SettingsEnums.h b/source/settings/SettingsEnums.h deleted file mode 100644 index 5eef582e..00000000 --- a/source/settings/SettingsEnums.h +++ /dev/null @@ -1,185 +0,0 @@ -#ifndef SETTINGS_ENUMS_H_ -#define SETTINGS_ENUMS_H_ - -#include "libs/libwbfs/wiidisc.h" - -enum -{ - JAPANESE, - ENGLISH, - GERMAN, - FRENCH, - SPANISH, - ITALIAN, - DUTCH, - S_CHINESE, - T_CHINESE, - KOREAN, - CONSOLE_DEFAULT, - MAX_LANGUAGE, -}; - -enum -{ - VIDEO_MODE_SYSDEFAULT, - VIDEO_MODE_DISCDEFAULT, - VIDEO_MODE_PAL50, - VIDEO_MODE_PAL60, - VIDEO_MODE_NTSC, - VIDEO_MODE_PATCH, - VIDEO_MODE_MAX -}; - -enum -{ - OFF, - ON, - MAX_ON_OFF -}; - -enum -{ - CLOCK_HR12 = 1, // use OFF for clock off - CLOCK_HR24, - CLOCK_MAX -}; - - -enum -{ - WIILIGHT_OFF, - WIILIGHT_ON, - WIILIGHT_INSTALL, - WIILIGHT_MAX - -}; - -enum -{ - GAMEINFO_ID, - GAMEINFO_REGION, - GAMEINFO_BOTH, - GAMEINFO_NONE, - GAMEINFO_MAX -}; - -enum -{ - SCREENSAVER_3_MIN = 1, - SCREENSAVER_5_MIN, - SCREENSAVER_10_MIN, - SCREENSAVER_20_MIN, - SCREENSAVER_30_MIN, - SCREENSAVER_60_MIN, - SCREENSAVER_MAX -}; - -enum -{ - XFLIP_NO, - XFLIP_YES, - XFLIP_SYSMENU, - XFLIP_WTF, - XFLIP_DISK3D, - XFLIP_MAX -}; - -enum -{ - //! Sorting should be used as AND to allow favorite ABC/RANK - SORT_ABC = 0x01, - SORT_PLAYCOUNT = 0x02, - SORT_RANKING = 0x04, - SORT_FAVORITE = 0x08, - SORT_PLAYERS = 0x10, -}; -enum -{ - KEYBOARD_QWERTY, - KEYBOARD_DVORAK, - KEYBOARD_QWERTZ, - KEYBOARD_AZERTY, - KEYBOARD_QWERTY2, - KEYBOARD_MAX -}; - -enum -{ - INSTALL_TO_NO_DIR, - INSTALL_TO_GAMEID_NAME, - INSTALL_TO_NAME_GAMEID, - INSTALL_TO_MAX -}; - -enum -{ - GAMESPLIT_NONE, - GAMESPLIT_2GB, - GAMESPLIT_4GB, - GAMESPLIT_MAX -}; - -enum -{ - LIST_MODE, - GRID_MODE, - CAROUSEL_MODE -}; - -enum -{ - DISCARTS_ORIGINALS_CUSTOMS, - DISCARTS_CUSTOMS_ORIGINALS, - DISCARTS_MAX_CHOICE, -}; - -enum -{ - PARENTAL_LVL_EVERYONE, - PARENTAL_LVL_CHILD, - PARENTAL_LVL_TEEN, - PARENTAL_LVL_MATURE, - PARENTAL_LVL_ADULT, -}; - -enum -{ - BLOCK_NONE = 0x00, - BLOCK_GLOBAL_SETTINGS = 0x01, - BLOCK_GUI_SETTINGS = 0x02, - BLOCK_LOADER_SETTINGS = 0x04, - BLOCK_PARENTAL_SETTINGS = 0x08, - BLOCK_SOUND_SETTINGS = 0x10, - BLOCK_CUSTOMPATH_SETTINGS = 0x20, - BLOCK_UPDATES = 0x40, - BLOCK_RESET_SETTINGS = 0x80, - BLOCK_THEME_DOWNLOADER = 0x0100, - BLOCK_THEME_MENU = 0x0200, - BLOCK_GAME_SETTINGS = 0x0400, - BLOCK_HBC_MENU = 0x0800, - BLOCK_TITLE_LAUNCHER_MENU = 0x1000, - BLOCK_COVER_DOWNLOADS = 0x2000, - BLOCK_GAME_INSTALL = 0x4000, - BLOCK_GAMEID_CHANGE = 0x8000, - BLOCK_ALL = 0xFFFFFFFF, -}; - -enum -{ - ALT_DOL_OFF, - ALT_DOL_FROM_GAME, - ALT_DOL_FROM_SD_USB, - ALT_DOL_ON_LAUNCH, - ALT_DOL_DEFAULT, - ALT_DOL_MAX_CHOICE, -}; - -enum -{ - HOME_MENU_SYSTEM, - HOME_MENU_FULL, - HOME_MENU_DEFAULT, - HOME_MENU_MAX_CHOICE, -}; - -#endif diff --git a/source/settings/SettingsPrompts.cpp b/source/settings/SettingsPrompts.cpp deleted file mode 100644 index e7f8845e..00000000 --- a/source/settings/SettingsPrompts.cpp +++ /dev/null @@ -1,334 +0,0 @@ -#include -#include -#include - -#include "language/gettext.h" -#include "language/UpdateLanguage.h" -#include "prompts/PromptWindows.h" -#include "prompts/ProgressWindow.h" -#include "libwiigui/gui.h" -#include "libwiigui/gui_customoptionbrowser.h" -#include "settings/CSettings.h" -#include "settings/GameTitles.h" -#include "themes/CTheme.h" -#include "network/URL_List.h" -#include "FileOperations/fileops.h" -#include "FileOperations/DirList.h" -#include "main.h" -#include "prompts/filebrowser.h" -#include "sys.h" -#include "menu/menus.h" - -/*** Extern variables ***/ -extern u8 shutdown; -extern u8 reset; - - -/**************************************************************************** - * MenuOGG - ***************************************************************************/ -bool MenuBackgroundMusic() -{ - bool ret = false; - char entered[1024]; - int result = -1; - snprintf( entered, sizeof( entered ), "%s", Settings.ogg_path ); - - if ( strcmp( entered, "" ) == 0 ) - { - sprintf( entered, "%s", Settings.BootDevice ); - } - else - { - char * pathptr = strrchr( entered, '/' ); - if ( pathptr ) - { - pathptr++; - int choice = WindowPrompt( tr( "Playing Music:" ), pathptr, tr( "Play Previous" ), tr( "Play Next" ), tr( "Change Play Path" ), tr( "Cancel" ) ); - if ( choice == 1 ) - { - return bgMusic->PlayPrevious(); - } - else if ( choice == 2 ) - { - return bgMusic->PlayNext(); - } - else if ( choice == 3 ) - { - pathptr[0] = 0; - } - else - return true; - } - else - sprintf( entered, "%s", Settings.BootDevice ); - } - - result = BrowseDevice( entered, sizeof( entered ), FB_DEFAULT ); - - if ( result ) - { - if ( !bgMusic->Load( entered ) ) - { - WindowPrompt( tr( "Not supported format!" ), tr( "Loading standard music." ), tr( "OK" ) ); - } - else - ret = true; - bgMusic->Play(); - bgMusic->SetVolume( Settings.volume ); - } - - return ret; -} - -/**************************************************************************** - * MenuLanguageSelect - ***************************************************************************/ -int MenuLanguageSelect() -{ - int cnt = 0; - int ret = 0, choice = 0; - int returnhere = 0; - char OldLangCode[10]; - snprintf(OldLangCode, sizeof(OldLangCode), Settings.db_language); - - GuiImageData btnOutline(Resources::GetFile("button_dialogue_box.png"), Resources::GetFileSize("button_dialogue_box.png")); - GuiImageData settingsbg(Resources::GetFile("settings_background.png"), Resources::GetFileSize("settings_background.png")); - - GuiTrigger trigA; - trigA.SetSimpleTrigger( -1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A ); - GuiTrigger trigB; - trigB.SetButtonOnlyTrigger( -1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B ); - - char fullpath[100]; - DirList Dir(Settings.languagefiles_path, ".lang"); - - if ( !strcmp( "", Settings.language_path ) ) - { - sprintf( fullpath, "%s", tr( "Default" ) ); - } - else - { - sprintf( fullpath, "%s", Settings.languagefiles_path ); - } - - GuiText titleTxt( fullpath, 24, ( GXColor ) {0, 0, 0, 255} ); - titleTxt.SetAlignment( ALIGN_CENTRE, ALIGN_MIDDLE ); - titleTxt.SetPosition( 0, 0 ); - GuiButton pathBtn( 300, 50 ); - pathBtn.SetAlignment( ALIGN_CENTRE, ALIGN_TOP ); - pathBtn.SetPosition( 0, 28 ); - pathBtn.SetLabel( &titleTxt ); - pathBtn.SetSoundOver( btnSoundOver ); - pathBtn.SetSoundClick( btnSoundClick2 ); - pathBtn.SetTrigger( &trigA ); - pathBtn.SetEffectGrow(); - - GuiImage oggmenubackground( &settingsbg ); - oggmenubackground.SetAlignment( ALIGN_LEFT, ALIGN_TOP ); - oggmenubackground.SetPosition( 0, 0 ); - - GuiText backBtnTxt( tr( "Back" ) , 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - backBtnTxt.SetMaxWidth( btnOutline.GetWidth() - 30 ); - GuiImage backBtnImg( &btnOutline ); - if ( Settings.wsprompt == ON ) - { - backBtnTxt.SetWidescreen( Settings.widescreen ); - backBtnImg.SetWidescreen( Settings.widescreen ); - } - GuiButton backBtn( btnOutline.GetWidth(), btnOutline.GetHeight() ); - backBtn.SetAlignment( ALIGN_CENTRE, ALIGN_TOP ); - backBtn.SetPosition( -190, 400 ); - backBtn.SetLabel( &backBtnTxt ); - backBtn.SetImage( &backBtnImg ); - backBtn.SetSoundOver( btnSoundOver ); - backBtn.SetSoundClick( btnSoundClick2 ); - backBtn.SetTrigger( &trigA ); - backBtn.SetTrigger( &trigB ); - backBtn.SetEffectGrow(); - - GuiText defaultBtnTxt( tr( "Default" ) , 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - defaultBtnTxt.SetMaxWidth( btnOutline.GetWidth() - 30 ); - GuiImage defaultBtnImg( &btnOutline ); - if ( Settings.wsprompt == ON ) - { - defaultBtnTxt.SetWidescreen( Settings.widescreen ); - defaultBtnImg.SetWidescreen( Settings.widescreen ); - } - GuiButton defaultBtn( btnOutline.GetWidth(), btnOutline.GetHeight() ); - defaultBtn.SetAlignment( ALIGN_CENTRE, ALIGN_TOP ); - defaultBtn.SetPosition( 190, 400 ); - defaultBtn.SetLabel( &defaultBtnTxt ); - defaultBtn.SetImage( &defaultBtnImg ); - defaultBtn.SetSoundOver( btnSoundOver ); - defaultBtn.SetSoundClick( btnSoundClick2 ); - defaultBtn.SetTrigger( &trigA ); - defaultBtn.SetEffectGrow(); - - GuiText updateBtnTxt( tr( "Update Files" ) , 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - updateBtnTxt.SetMaxWidth( btnOutline.GetWidth() - 30 ); - GuiImage updateBtnImg( &btnOutline ); - if ( Settings.wsprompt == ON ) - { - updateBtnTxt.SetWidescreen( Settings.widescreen ); - updateBtnImg.SetWidescreen( Settings.widescreen ); - } - GuiButton updateBtn( btnOutline.GetWidth(), btnOutline.GetHeight() ); - updateBtn.SetAlignment( ALIGN_CENTRE, ALIGN_TOP ); - updateBtn.SetPosition( 0, 400 ); - updateBtn.SetLabel( &updateBtnTxt ); - updateBtn.SetImage( &updateBtnImg ); - updateBtn.SetSoundOver( btnSoundOver ); - updateBtn.SetSoundClick( btnSoundClick2 ); - updateBtn.SetTrigger( &trigA ); - updateBtn.SetEffectGrow(); - - OptionList options2; - - for ( cnt = 0; cnt < Dir.GetFilecount(); cnt++ ) - { - char filename[64]; - strlcpy( filename, Dir.GetFilename( cnt ), sizeof( filename ) ); - char *dot = strchr( filename, '.' ); - if ( dot ) *dot = '\0'; - options2.SetName( cnt, "%s", filename ); - options2.SetValue( cnt, NULL ); - - } - - GuiCustomOptionBrowser optionBrowser4( 396, 280, &options2, "bg_options_settings.png"); - optionBrowser4.SetPosition( 0, 90 ); - optionBrowser4.SetAlignment( ALIGN_CENTRE, ALIGN_TOP ); - - HaltGui(); - GuiWindow w( screenwidth, screenheight ); - w.Append( &oggmenubackground ); - w.Append( &pathBtn ); - w.Append( &backBtn ); - w.Append( &defaultBtn ); - w.Append( &updateBtn ); - w.Append( &optionBrowser4 ); - mainWindow->Append( &w ); - - w.SetEffect( EFFECT_FADE, 20 ); - ResumeGui(); - - while ( w.GetEffect() > 0 ) usleep( 50 ); - - while ( !returnhere ) - { - usleep(100); - - if ( shutdown == 1 ) - Sys_Shutdown(); - else if ( reset == 1 ) - Sys_Reboot(); - - else if ( backBtn.GetState() == STATE_CLICKED ) - { - backBtn.ResetState(); - break; - } - - else if ( defaultBtn.GetState() == STATE_CLICKED ) - { - choice = WindowPrompt( tr( "Loading standard language." ), 0, tr( "OK" ), tr( "Cancel" ) ); - if ( choice == 1 ) - { - Settings.LoadLanguage(NULL, CONSOLE_DEFAULT); - Settings.Save(); - returnhere = 2; - } - defaultBtn.ResetState(); - //optionBrowser4.SetFocus(1); // commented out to prevent crash - } - - else if ( updateBtn.GetState() == STATE_CLICKED ) - { - choice = WindowPrompt( tr( "Update all Language Files" ), tr( "Do you wish to update/download all language files?" ), tr( "OK" ), tr( "Cancel" ) ); - if ( choice == 1 ) - { - if (IsNetworkInit() || NetworkInitPrompt()) - { - if(DownloadAllLanguageFiles() > 0) - WindowPrompt(tr("Update successfull"), 0, tr("OK")); - returnhere = 1; - break; - } - } - updateBtn.ResetState(); - //optionBrowser4.SetFocus(1); // commented out to prevent crash - } - - else if ( pathBtn.GetState() == STATE_CLICKED ) - { - w.Remove( &optionBrowser4 ); - w.Remove( &backBtn ); - w.Remove( &pathBtn ); - w.Remove( &defaultBtn ); - char entered[43] = ""; - strlcpy( entered, Settings.languagefiles_path, sizeof( entered ) ); - int result = OnScreenKeyboard( entered, 43, 0 ); - w.Append( &optionBrowser4 ); - w.Append( &pathBtn ); - w.Append( &backBtn ); - w.Append( &defaultBtn ); - if (result == 1) - { - if (entered[strlen(entered)-1] != '/') - strcat (entered, "/"); - snprintf(Settings.languagefiles_path, sizeof(Settings.languagefiles_path), entered); - WindowPrompt(tr("Languagepath changed."), 0, tr("OK")); - } - if ( Dir.GetFilecount() > 0 ) - { - optionBrowser4.SetFocus( 1 ); - } - pathBtn.ResetState(); - } - - ret = optionBrowser4.GetClickedOption(); - - if (ret >= 0) - { - choice = WindowPrompt( tr( "Do you want to change language?" ), 0, tr( "Yes" ), tr( "Cancel" ) ); - if (choice == 1) - { - char newLangPath[150]; - snprintf(Settings.languagefiles_path, sizeof( Settings.languagefiles_path ), "%s", Dir.GetFilepath(ret)); - char * ptr = strrchr(Settings.languagefiles_path, '/'); - if(ptr) ptr[1] = 0; - snprintf(newLangPath, sizeof(newLangPath), "%s", Dir.GetFilepath(ret)); - if (!CheckFile(newLangPath)) - { - WindowPrompt(tr("File not found."), tr("Loading standard language."), tr("OK")); - Settings.LoadLanguage(NULL, CONSOLE_DEFAULT); - } - else - { - Settings.LoadLanguage(newLangPath); - } - Settings.Save(); - returnhere = 2; - break; - } - optionBrowser4.SetFocus( 1 ); - } - - } - - //! Reload game list in new language - if(strcmp(Settings.db_language, OldLangCode) != 0) - { - GameTitles.LoadTitlesFromWiiTDB(Settings.titlestxt_path); - } - - w.SetEffect( EFFECT_FADE, -20 ); - while ( w.GetEffect() > 0 ) usleep( 50 ); - - HaltGui(); - mainWindow->Remove( &w ); - ResumeGui(); - - return returnhere; -} diff --git a/source/settings/SettingsPrompts.h b/source/settings/SettingsPrompts.h deleted file mode 100644 index d16a12ac..00000000 --- a/source/settings/SettingsPrompts.h +++ /dev/null @@ -1,14 +0,0 @@ -/**************************************************************************** - * SettingsPrompts - * USB Loader GX 2009 - * - * SettingsPrompts.h - ***************************************************************************/ - -#ifndef _SETTINGSPROMPTS_H_ -#define _SETTINGSPROMPTS_H_ - -bool MenuBackgroundMusic(); -int MenuLanguageSelect(); - -#endif diff --git a/source/settings/menus/CustomPathsSM.cpp b/source/settings/menus/CustomPathsSM.cpp deleted file mode 100644 index 97841f84..00000000 --- a/source/settings/menus/CustomPathsSM.cpp +++ /dev/null @@ -1,254 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include -#include "CustomPathsSM.hpp" -#include "settings/SettingsPrompts.h" -#include "settings/CSettings.h" -#include "prompts/PromptWindows.h" -#include "language/gettext.h" -#include "prompts/filebrowser.h" -#include "themes/CTheme.h" - -CustomPathsSM::CustomPathsSM() - : SettingsMenu(tr("Custom Paths"), &GuiOptions, MENU_NONE) -{ - int Idx = 0; - Options->SetName(Idx++, tr("3D Cover Path")); - Options->SetName(Idx++, tr("2D Cover Path")); - Options->SetName(Idx++, tr("Full Cover Path")); - Options->SetName(Idx++, tr("Disc Artwork Path")); - Options->SetName(Idx++, tr("Theme Path")); - Options->SetName(Idx++, tr("WiiTDB Path")); - Options->SetName(Idx++, tr("Update Path")); - Options->SetName(Idx++, tr("GCT Cheatcodes Path")); - Options->SetName(Idx++, tr("TXT Cheatcodes Path")); - Options->SetName(Idx++, tr("DOL Path")); - Options->SetName(Idx++, tr("Homebrew Apps Path")); - Options->SetName(Idx++, tr("BCA Codes Path")); - Options->SetName(Idx++, tr("WIP Patches Path")); - Options->SetName(Idx++, tr("Languagefiles Path")); - Options->SetName(Idx++, tr("WDM Files Path")); - - SetOptionValues(); -} - -void CustomPathsSM::SetOptionValues() -{ - int Idx = 0; - - //! Settings: 3D Cover Path - Options->SetValue(Idx++, Settings.covers_path); - - //! Settings: 2D Cover Path - Options->SetValue(Idx++, Settings.covers2d_path); - - //! Settings: Full Cover Path - Options->SetValue(Idx++, Settings.coversFull_path); - - //! Settings: Disc Artwork Path - Options->SetValue(Idx++, Settings.disc_path); - - //! Settings: Theme Path - Options->SetValue(Idx++, Settings.theme_path); - - //! Settings: WiiTDB Path - Options->SetValue(Idx++, Settings.titlestxt_path); - - //! Settings: Update Path - Options->SetValue(Idx++, Settings.update_path); - - //! Settings: GCT Cheatcodes Path - Options->SetValue(Idx++, Settings.Cheatcodespath); - - //! Settings: TXT Cheatcodes Path - Options->SetValue(Idx++, Settings.TxtCheatcodespath); - - //! Settings: DOL Path - Options->SetValue(Idx++, Settings.dolpath); - - //! Settings: Homebrew Apps Path - Options->SetValue(Idx++, Settings.homebrewapps_path); - - //! Settings: BCA Codes Path - Options->SetValue(Idx++, Settings.BcaCodepath); - - //! Settings: WIP Patches Path - Options->SetValue(Idx++, Settings.WipCodepath); - - //! Settings: Languagefiles Path - Options->SetValue(Idx++, Settings.languagefiles_path); - - //! Settings: WDM Files Path - Options->SetValue(Idx++, Settings.WDMpath); -} - -int CustomPathsSM::GetMenuInternal() -{ - int ret = optionBrowser->GetClickedOption(); - - if (ret < 0) - return MENU_NONE; - - int Idx = -1; - - //! Settings: 3D Cover Path - if (ret == ++Idx) - { - titleTxt->SetText(tr( "3D Cover Path" )); - ChangePath(Settings.covers_path, sizeof(Settings.covers_path)); - } - - //! Settings: 2D Cover Path - else if (ret == ++Idx) - { - titleTxt->SetText(tr( "2D Cover Path" )); - ChangePath(Settings.covers2d_path, sizeof(Settings.covers2d_path)); - } - - //! Settings: Full Cover Path - else if (ret == ++Idx) - { - titleTxt->SetText(tr( "Full Cover Path" )); - ChangePath(Settings.coversFull_path, sizeof(Settings.coversFull_path)); - } - - //! Settings: Disc Artwork Path - else if (ret == ++Idx) - { - titleTxt->SetText(tr( "Disc Artwork Path" )); - ChangePath(Settings.disc_path, sizeof(Settings.disc_path)); - } - - //! Settings: Theme Path - else if (ret == ++Idx) - { - titleTxt->SetText(tr( "Theme Path" )); - ChangePath(Settings.theme_path, sizeof(Settings.theme_path)); - } - - //! Settings: WiiTDB Path - else if (ret == ++Idx) - { - titleTxt->SetText(tr( "WiiTDB Path" )); - ChangePath(Settings.titlestxt_path, sizeof(Settings.titlestxt_path)); - } - - //! Settings: Update Path - else if (ret == ++Idx) - { - titleTxt->SetText(tr( "Update Path" )); - ChangePath(Settings.update_path, sizeof(Settings.update_path)); - } - - //! Settings: GCT Cheatcodes Path - else if (ret == ++Idx) - { - titleTxt->SetText(tr( "GCT Cheatcodes Path" )); - ChangePath(Settings.Cheatcodespath, sizeof(Settings.Cheatcodespath)); - } - - //! Settings: TXT Cheatcodes Path - else if (ret == ++Idx) - { - titleTxt->SetText(tr( "TXT Cheatcodes Path" )); - ChangePath(Settings.TxtCheatcodespath, sizeof(Settings.TxtCheatcodespath)); - } - - //! Settings: DOL Path - else if (ret == ++Idx) - { - titleTxt->SetText(tr( "DOL Path" )); - ChangePath(Settings.dolpath, sizeof(Settings.dolpath)); - } - - //! Settings: Homebrew Apps Path - else if (ret == ++Idx) - { - titleTxt->SetText(tr( "Homebrew Apps Path" )); - ChangePath(Settings.homebrewapps_path, sizeof(Settings.homebrewapps_path)); - } - - //! Settings: BCA Codes Path - else if (ret == ++Idx) - { - titleTxt->SetText(tr( "BCA Codes Path" )); - ChangePath(Settings.BcaCodepath, sizeof(Settings.BcaCodepath)); - } - - //! Settings: WIP Patches Path - else if (ret == ++Idx) - { - titleTxt->SetText(tr( "WIP Patches Path" )); - ChangePath(Settings.WipCodepath, sizeof(Settings.WipCodepath)); - } - - //! Settings: Languagefiles Path - else if (ret == ++Idx) - { - titleTxt->SetText(tr( "Languagefiles Path" )); - ChangePath(Settings.languagefiles_path, sizeof(Settings.languagefiles_path)); - } - - //! Settings: WDM Files Path - else if (ret == ++Idx) - { - titleTxt->SetText(tr( "WDM Files Path" )); - ChangePath(Settings.WDMpath, sizeof(Settings.WDMpath)); - } - - //! Global set back of the titleTxt after a change - titleTxt->SetText(tr( "Custom Paths" )); - SetOptionValues(); - - return MENU_NONE; -} - -int CustomPathsSM::ChangePath(char * SettingsPath, int SizeOfPath) -{ - char entered[300]; - snprintf(entered, sizeof(entered), SettingsPath); - - HaltGui(); - GuiWindow * parent = (GuiWindow *) parentElement; - if(parent) parent->SetState(STATE_DISABLED); - this->SetState(STATE_DEFAULT); - this->Remove(optionBrowser); - ResumeGui(); - - int result = BrowseDevice(entered, sizeof(entered), FB_DEFAULT, noFILES); - - if(parent) parent->SetState(STATE_DEFAULT); - this->Append(optionBrowser); - - if (result == 1) - { - if (entered[strlen(entered)-1] != '/') - strcat(entered, "/"); - - snprintf(SettingsPath, SizeOfPath, entered); - WindowPrompt(tr( "Path Changed" ), 0, tr( "OK" )); - } - - return result; -} diff --git a/source/settings/menus/CustomPathsSM.hpp b/source/settings/menus/CustomPathsSM.hpp deleted file mode 100644 index 344e7fb7..00000000 --- a/source/settings/menus/CustomPathsSM.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#ifndef CUSTOMPATHS_MENU_HPP_ -#define CUSTOMPATHS_MENU_HPP_ - -#include "SettingsMenu.hpp" - -class CustomPathsSM : public SettingsMenu -{ - public: - CustomPathsSM(); - virtual int GetType() { return CCustomPathsSM; }; - protected: - void SetOptionValues(); - int GetMenuInternal(); - int ChangePath(char * SettingsPath, int SizeOfPath); - - OptionList GuiOptions; -}; - - -#endif diff --git a/source/settings/menus/FlyingButtonsMenu.cpp b/source/settings/menus/FlyingButtonsMenu.cpp deleted file mode 100644 index 52f2da12..00000000 --- a/source/settings/menus/FlyingButtonsMenu.cpp +++ /dev/null @@ -1,473 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include -#include - -#include "FlyingButtonsMenu.hpp" -#include "utils/StringTools.h" -#include "language/gettext.h" -#include "themes/CTheme.h" -#include "menu/menus.h" -#include "sys.h" - -#define FADE_SPEED 20 -#define SLIDE_SPEED 35 -#define DISPLAY_BUTTONS 4 -#define MAX_INDICATORS 5 - -FlyingButtonsMenu::FlyingButtonsMenu(const char * menu_title) - : GuiWindow(screenwidth, screenheight) - -{ - currentPage = 0; - returnMenu = MENU_NONE; - ParentMenu = MENU_DISCLIST; - CurrentMenu = NULL; - titleTxt = NULL; - GoLeftImg = NULL; - GoLeftBtn = NULL; - GoRightImg = NULL; - GoRightBtn = NULL; - MenuTitle = menu_title ? menu_title : " "; - - trigA = new GuiTrigger(); - trigHome = new GuiTrigger(); - trigB = new GuiTrigger(); - trigL = new GuiTrigger(); - trigR = new GuiTrigger(); - trigMinus = new GuiTrigger(); - trigPlus = new GuiTrigger(); - trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - trigHome->SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0); - trigB->SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B); - trigL->SetButtonOnlyTrigger(-1, WPAD_BUTTON_LEFT | WPAD_CLASSIC_BUTTON_LEFT, PAD_BUTTON_LEFT); - trigR->SetButtonOnlyTrigger(-1, WPAD_BUTTON_RIGHT | WPAD_CLASSIC_BUTTON_RIGHT, PAD_BUTTON_RIGHT); - trigMinus->SetButtonOnlyTrigger(-1, WPAD_BUTTON_MINUS | WPAD_CLASSIC_BUTTON_MINUS, 0); - trigPlus->SetButtonOnlyTrigger(-1, WPAD_BUTTON_PLUS | WPAD_CLASSIC_BUTTON_PLUS, 0); - - btnOutline = Resources::GetImageData("button_dialogue_box.png"); - settingsbg = Resources::GetImageData("settings_background.png"); - MainButtonImgData = Resources::GetImageData("settings_title.png"); - MainButtonImgOverData = Resources::GetImageData("settings_title_over.png"); - PageindicatorImgData = Resources::GetImageData("pageindicator.png"); - arrow_left = Resources::GetImageData("startgame_arrow_left.png"); - arrow_right = Resources::GetImageData("startgame_arrow_right.png"); - - settingsbackground = new GuiImage(settingsbg); - Append(settingsbackground); - - homeBtn = new GuiButton(1, 1); - homeBtn->SetTrigger(trigHome); - Append(homeBtn); - - backBtnTxt = new GuiText(tr( "Back" ), 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - backBtnTxt->SetMaxWidth(btnOutline->GetWidth() - 30); - backBtnImg = new GuiImage(btnOutline); - if (Settings.wsprompt == ON) - { - backBtnTxt->SetWidescreen(Settings.widescreen); - backBtnImg->SetWidescreen(Settings.widescreen); - } - backBtn = new GuiButton(backBtnImg, backBtnImg, 2, 3, -195, 400, trigA, btnSoundOver, btnSoundClick2, 1); - backBtn->SetLabel(backBtnTxt); - backBtn->SetTrigger(trigB); - Append(backBtn); - - SetEffect(EFFECT_FADE, FADE_SPEED); -} - -FlyingButtonsMenu::~FlyingButtonsMenu() -{ - ResumeGui(); - - SetEffect(EFFECT_FADE, -FADE_SPEED); - while(parentElement && this->GetEffect() > 0) usleep(100); - - HaltGui(); - if(parentElement) - ((GuiWindow *) parentElement)->Remove(this); - - RemoveAll(); - HideMenu(); - - delete trigA; - delete trigHome; - delete trigB; - delete trigL; - delete trigR; - delete trigMinus; - delete trigPlus; - delete settingsbackground; - delete homeBtn; - delete btnOutline; - delete settingsbg; - delete MainButtonImgData; - delete MainButtonImgOverData; - delete PageindicatorImgData; - delete arrow_left; - delete arrow_right; - delete backBtnTxt; - delete backBtnImg; - delete backBtn; - - ResumeGui(); -} - -void FlyingButtonsMenu::SetPageIndicators() -{ - HaltGui(); - - for(u32 i = 0; i < PageIndicatorBtn.size(); ++i) - { - Remove(PageIndicatorBtn[i]); - delete PageindicatorImg[i]; - delete PageindicatorTxt[i]; - delete PageIndicatorBtn[i]; - } - PageindicatorImg.clear(); - PageindicatorTxt.clear(); - PageIndicatorBtn.clear(); - - int IndicatorCount = ceil(MainButton.size()/(1.0f*DISPLAY_BUTTONS)); - - FirstIndicator = 0; - if(currentPage > (int) floor(MAX_INDICATORS/2.0f)) - { - if(IndicatorCount-MAX_INDICATORS < currentPage - (int) floor(MAX_INDICATORS/2.0f)) - FirstIndicator = IndicatorCount-MAX_INDICATORS; - else - FirstIndicator = currentPage - (int) floor(MAX_INDICATORS/2.0f); - } - - int DisplayedIndicators = IndicatorCount > MAX_INDICATORS ? MAX_INDICATORS : IndicatorCount; - - for(int i = 0, n = FirstIndicator; i < MAX_INDICATORS && n < IndicatorCount; ++i, ++n) - { - PageindicatorImg.push_back(new GuiImage(PageindicatorImgData)); - PageindicatorTxt.push_back(new GuiText(fmt("%i", n+1), 22, ( GXColor ) {0, 0, 0, 255})); - PageIndicatorBtn.push_back(new GuiButton(PageindicatorImgData->GetWidth(), PageindicatorImgData->GetHeight())); - PageIndicatorBtn[i]->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - PageIndicatorBtn[i]->SetPosition(270-DisplayedIndicators*35+35*i, 400); - PageIndicatorBtn[i]->SetImage(PageindicatorImg[i]); - PageIndicatorBtn[i]->SetLabel(PageindicatorTxt[i]); - PageIndicatorBtn[i]->SetSoundOver(btnSoundOver); - PageIndicatorBtn[i]->SetSoundClick(btnSoundClick); - PageIndicatorBtn[i]->SetTrigger(trigA); - PageIndicatorBtn[i]->SetEffectGrow(); - PageIndicatorBtn[i]->SetAlpha(n == currentPage ? 255 : 50); - Append(PageIndicatorBtn[i]); - } -} - -void FlyingButtonsMenu::SetMainButton(int position, const char * ButtonText, GuiImageData * imageData, GuiImageData * imageOver) -{ - //! Don't allow operating gui mode while adding/setting the buttons - HaltGui(); - - if(position < (int) MainButton.size()) - { - delete MainButtonImg[position]; - delete MainButtonImgOver[position]; - delete MainButtonTxt[position]; - delete MainButton[position]; - } - else - { - MainButtonImg.resize(position+1); - MainButtonImgOver.resize(position+1); - MainButtonTxt.resize(position+1); - MainButton.resize(position+1); - } - - MainButtonImg[position] = new GuiImage(imageData); - MainButtonImgOver[position] = new GuiImage(imageOver); - - MainButtonTxt[position] = new GuiText(ButtonText, 22, ( GXColor ) {0, 0, 0, 255}); - MainButtonTxt[position]->SetMaxWidth(MainButtonImg[position]->GetWidth()); - - MainButton[position] = new GuiButton(imageData->GetWidth(), imageData->GetHeight()); - MainButton[position]->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - MainButton[position]->SetPosition(0, 90+(position % DISPLAY_BUTTONS)*70); - MainButton[position]->SetImage(MainButtonImg[position]); - MainButton[position]->SetImageOver(MainButtonImgOver[position]); - MainButton[position]->SetLabel(MainButtonTxt[position]); - MainButton[position]->SetSoundOver(btnSoundOver); - MainButton[position]->SetSoundClick(btnSoundClick); - MainButton[position]->SetEffectGrow(); - MainButton[position]->SetTrigger(trigA); -} - -void FlyingButtonsMenu::HideMenu() -{ - HaltGui(); - - if(titleTxt) - Remove(titleTxt); - if(GoLeftBtn) - Remove(GoLeftBtn); - if(GoRightBtn) - Remove(GoRightBtn); - - if(titleTxt) - delete titleTxt; - if(GoLeftImg) - delete GoLeftImg; - if(GoLeftBtn) - delete GoLeftBtn; - if(GoRightImg) - delete GoRightImg; - if(GoRightBtn) - delete GoRightBtn; - titleTxt = NULL; - GoLeftImg = NULL; - GoLeftBtn = NULL; - GoRightImg = NULL; - GoRightBtn = NULL; - - for(u32 i = 0; i < MainButton.size(); ++i) - { - Remove(MainButton[i]); - delete MainButtonImg[i]; - delete MainButtonImgOver[i]; - delete MainButtonTxt[i]; - delete MainButton[i]; - } - for(u32 i = 0; i < PageIndicatorBtn.size(); ++i) - { - Remove(PageIndicatorBtn[i]); - delete PageindicatorImg[i]; - delete PageindicatorTxt[i]; - delete PageIndicatorBtn[i]; - } - - PageindicatorImg.clear(); - PageindicatorTxt.clear(); - PageIndicatorBtn.clear(); - MainButtonImg.clear(); - MainButtonImgOver.clear(); - MainButtonTxt.clear(); - MainButton.clear(); -} - -void FlyingButtonsMenu::ShowMenu() -{ - //! Free memory if not done yet because new is allocated - HideMenu(); - - titleTxt = new GuiText(MenuTitle.c_str(), 28, ( GXColor ) {0, 0, 0, 255}); - titleTxt->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - titleTxt->SetPosition(0, 40); - titleTxt->SetMaxWidth(310, SCROLL_HORIZONTAL); - Append(titleTxt); - - GoLeftImg = new GuiImage(arrow_left); - GoLeftBtn = new GuiButton(GoLeftImg->GetWidth(), GoLeftImg->GetHeight()); - GoLeftBtn->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - GoLeftBtn->SetPosition(25, -25); - GoLeftBtn->SetImage(GoLeftImg); - GoLeftBtn->SetSoundOver(btnSoundOver); - GoLeftBtn->SetSoundClick(btnSoundClick2); - GoLeftBtn->SetEffectGrow(); - GoLeftBtn->SetTrigger(trigA); - GoLeftBtn->SetTrigger(trigL); - GoLeftBtn->SetTrigger(trigMinus); - Append(GoLeftBtn); - - GoRightImg = new GuiImage(arrow_right); - GoRightBtn = new GuiButton(GoRightImg->GetWidth(), GoRightImg->GetHeight()); - GoRightBtn->SetAlignment(ALIGN_RIGHT, ALIGN_MIDDLE); - GoRightBtn->SetPosition(-25, -25); - GoRightBtn->SetImage(GoRightImg); - GoRightBtn->SetSoundOver(btnSoundOver); - GoRightBtn->SetSoundClick(btnSoundClick2); - GoRightBtn->SetEffectGrow(); - GoRightBtn->SetTrigger(trigA); - GoRightBtn->SetTrigger(trigR); - GoRightBtn->SetTrigger(trigPlus); - Append(GoRightBtn); - - SetupMainButtons(); - AddMainButtons(); - - ShowButtonsEffects(EFFECT_FADE, FADE_SPEED); -} - -void FlyingButtonsMenu::AddMainButtons() -{ - HaltGui(); - - for(u32 i = 0; i < MainButton.size(); ++i) - Remove(MainButton[i]); - - int FirstItem = currentPage*DISPLAY_BUTTONS; - - for(int i = FirstItem; i < (int) MainButton.size() && i < FirstItem+DISPLAY_BUTTONS; ++i) - { - Append(MainButton[i]); - } - - SetPageIndicators(); -} - -void FlyingButtonsMenu::ShowButtonsEffects(int effect, int effect_speed) -{ - int FirstItem = currentPage*DISPLAY_BUTTONS; - if(FirstItem < 0) - FirstItem = 0; - - HaltGui(); - - for(int i = FirstItem; i < (int) MainButton.size() && i < FirstItem+DISPLAY_BUTTONS; ++i) - { - MainButton[i]->StopEffect(); - MainButton[i]->SetEffectGrow(); - MainButton[i]->SetEffect(effect, effect_speed); - } - - ResumeGui(); - - if(FirstItem < 0 || FirstItem >= (int) MainButton.size()) - return; - - //! Don't lock on fade in for initiation purpose - if(effect & EFFECT_FADE && effect_speed > 0) - return; - - while (parentElement && MainButton[FirstItem]->GetEffect() > 0) - usleep(100); -} - -void FlyingButtonsMenu::SlideButtons(int direction) -{ - int SlideEffectIN = 0; - - if(direction == SLIDE_LEFT) - { - ShowButtonsEffects(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, SLIDE_SPEED); - SlideEffectIN = EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN; - - currentPage--; - - if(currentPage < 0) - currentPage = MainButton.size() > 0 ? ceil(MainButton.size()/4.0f)-1 : 0; - } - else - { - ShowButtonsEffects(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, SLIDE_SPEED); - SlideEffectIN = EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_IN; - - currentPage++; - - if(currentPage >= ceil(MainButton.size()/4.0f)) - currentPage = 0; - } - - AddMainButtons(); - - ShowButtonsEffects(SlideEffectIN, SLIDE_SPEED); -} - -int FlyingButtonsMenu::MainLoop() -{ - usleep(100); - - if(shutdown) - Sys_Shutdown(); - else if(reset) - Sys_Reboot(); - - if(backBtn->GetState() == STATE_CLICKED) - { - if(CurrentMenu) - { - DeleteSettingsMenu(); - ShowMenu(); - } - else - { - return ParentMenu; - } - backBtn->ResetState(); - } - else if(GoRightBtn && GoRightBtn->GetState() == STATE_CLICKED) - { - SlideButtons(SLIDE_RIGHT); - GoRightBtn->ResetState(); - } - else if(GoLeftBtn && GoLeftBtn->GetState() == STATE_CLICKED) - { - SlideButtons(SLIDE_LEFT); - GoLeftBtn->ResetState(); - } - else if(homeBtn->GetState() == STATE_CLICKED) - { - Settings.Save(); - if(CurrentMenu) CurrentMenu->SetState(STATE_DISABLED); - WindowExitPrompt(); - homeBtn->ResetState(); - if(CurrentMenu) CurrentMenu->SetState(STATE_DEFAULT); - } - else if(CurrentMenu) - { - int newMenu = CurrentMenu->GetMenu(); - if(newMenu != MENU_NONE) - return newMenu; - } - - for(u32 i = 0; i < PageIndicatorBtn.size(); ++i) - { - if(PageIndicatorBtn[i]->GetState() != STATE_CLICKED) - continue; - - if(FirstIndicator+i < (u32) currentPage) - { - ShowButtonsEffects(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, SLIDE_SPEED); - currentPage = FirstIndicator+i; - AddMainButtons(); - ShowButtonsEffects(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, SLIDE_SPEED); - } - else if(FirstIndicator+i > (u32) currentPage) - { - ShowButtonsEffects(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, SLIDE_SPEED); - currentPage = FirstIndicator+i; - AddMainButtons(); - ShowButtonsEffects(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_IN, SLIDE_SPEED); - } - - PageIndicatorBtn[i]->ResetState(); - } - - for(u32 i = 0; i < MainButton.size(); ++i) - { - if(MainButton[i]->GetState() != STATE_CLICKED) - continue; - - MainButton[i]->ResetState(); - - CreateSettingsMenu(i); - break; - } - - return returnMenu; -} diff --git a/source/settings/menus/FlyingButtonsMenu.hpp b/source/settings/menus/FlyingButtonsMenu.hpp deleted file mode 100644 index 5b24e4f0..00000000 --- a/source/settings/menus/FlyingButtonsMenu.hpp +++ /dev/null @@ -1,105 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#ifndef FLYINGBUTTONSMENU_HPP_ -#define FLYINGBUTTONSMENU_HPP_ - -#include -#include -#include "libwiigui/gui.h" -#include "SettingsMenu.hpp" -#include "menu.h" - -class FlyingButtonsMenu : public GuiWindow -{ - public: - FlyingButtonsMenu(const char * menu_title); - ~FlyingButtonsMenu(); - virtual int MainLoop(); - virtual void HideMenu(); - virtual void ShowMenu(); - protected: - virtual void CreateSettingsMenu(int index) { }; - virtual void DeleteSettingsMenu() { }; - virtual void SetupMainButtons() { }; - virtual void AddMainButtons(); - virtual void ShowButtonsEffects(int effect, int effect_speed); - virtual void SlideButtons(int slide_direction); - virtual void SetPageIndicators(); - virtual void SetMainButton(int position, const char * ButtonText, GuiImageData * imageData, GuiImageData * imageOver); - - int currentPage; - int returnMenu; - int ParentMenu; - int FirstIndicator; - std::string MenuTitle; - enum - { - SLIDE_LEFT, SLIDE_RIGHT - }; - - //!The main settings gui with browser - SettingsMenu * CurrentMenu; - - GuiImageData * btnOutline; - GuiImageData * settingsbg; - GuiImageData * MainButtonImgData; - GuiImageData * MainButtonImgOverData; - GuiImageData * PageindicatorImgData; - GuiImageData * arrow_left; - GuiImageData * arrow_right; - - GuiImage * settingsbackground; - GuiImage * backBtnImg; - GuiImage * PageindicatorImg2; - GuiImage * GoLeftImg; - GuiImage * GoRightImg; - - GuiTrigger * trigA; - GuiTrigger * trigHome; - GuiTrigger * trigB; - GuiTrigger * trigL; - GuiTrigger * trigR; - GuiTrigger * trigMinus; - GuiTrigger * trigPlus; - - GuiText * titleTxt; - GuiText * backBtnTxt; - GuiText * PageindicatorTxt1; - - GuiButton * backBtn; - GuiButton * homeBtn; - GuiButton * GoLeftBtn; - GuiButton * GoRightBtn; - - std::vectorPageindicatorImg; - std::vectorPageindicatorTxt; - std::vectorPageIndicatorBtn; - - std::vector MainButtonImg; - std::vector MainButtonImgOver; - std::vector MainButtonTxt; - std::vector MainButton; -}; - -#endif diff --git a/source/settings/menus/GUISettingsMenu.cpp b/source/settings/menus/GUISettingsMenu.cpp deleted file mode 100644 index bd3aaf32..00000000 --- a/source/settings/menus/GUISettingsMenu.cpp +++ /dev/null @@ -1,345 +0,0 @@ - /**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include -#include "GUISettingsMenu.hpp" -#include "Controls/DeviceHandler.hpp" -#include "settings/CSettings.h" -#include "prompts/PromptWindows.h" -#include "language/gettext.h" -#include "settings/SettingsPrompts.h" -#include "settings/GameTitles.h" -#include "xml/xml.h" -#include "usbloader/wbfs.h" - -static const char * OnOffText[MAX_ON_OFF] = -{ - trNOOP( "OFF" ), - trNOOP( "ON" ) -}; - -static const char * WiilightText[WIILIGHT_MAX] = -{ - trNOOP( "OFF" ), - trNOOP( "ON" ), - trNOOP( "Only for Install" ) -}; - -static const char * GameInfoText[GAMEINFO_MAX] = -{ - trNOOP( "Game ID" ), - trNOOP( "Game Region" ), - trNOOP( "Both" ), - trNOOP( "Neither" ) -}; - -static const char * FlipXText[XFLIP_MAX][3] = -{ - { trNOOP( "Right" ), "/", trNOOP( "Next" ) }, - { trNOOP( "Left" ), "/", trNOOP( "Prev" ) }, - { trNOOP( "Like SysMenu" ), "", "" }, - { trNOOP( "Right" ), "/", trNOOP( "Prev" ) }, - { trNOOP( "DiskFlip" ), "", "" } -}; - -static const char * PromptButtonsText[MAX_ON_OFF] = -{ - trNOOP( "Normal" ), - trNOOP( "Widescreen Fix" ), -}; - -static const char * KeyboardText[KEYBOARD_MAX] = -{ - "QWERTY", - "DVORAK", - "QWERTZ", - "AZERTY", - "QWERTY 2" -}; - -static const char * DiscArtDownloadText[DISCARTS_MAX_CHOICE] = -{ - trNOOP( "Original/Customs" ), - trNOOP( "Customs/Original" ) -}; - -static const char *ScreensaverText[SCREENSAVER_MAX] = -{ - trNOOP( "OFF" ), - trNOOP( "3 min" ), - trNOOP( "5 min" ), - trNOOP( "10 min" ), - trNOOP( "20 min" ), - trNOOP( "30 min" ), - trNOOP( "1 hour" ) -}; - -static const char * HomeMenuText[HOME_MENU_MAX_CHOICE] = -{ - trNOOP( "System Default" ), - trNOOP( "Full Menu" ), - trNOOP( "Default" ) -}; - -GuiSettingsMenu::GuiSettingsMenu() - : SettingsMenu(tr("GUI Settings"), &GuiOptions, MENU_NONE) -{ - int Idx = 0; - Options->SetName(Idx++, "%s", tr( "App Language" )); - Options->SetName(Idx++, "%s", tr( "Display" )); - Options->SetName(Idx++, "%s", tr( "Clock" )); - Options->SetName(Idx++, "%s", tr( "Tooltips" )); - Options->SetName(Idx++, "%s", tr( "Flip-X" )); - Options->SetName(Idx++, "%s", tr( "Prompts Buttons" )); - Options->SetName(Idx++, "%s", tr( "Keyboard" )); - Options->SetName(Idx++, "%s", tr( "Disc Artwork Download" )); - Options->SetName(Idx++, "%s", tr( "Wiilight" )); - Options->SetName(Idx++, "%s", tr( "Rumble" )); - Options->SetName(Idx++, "%s", tr( "AutoInit Network" )); - Options->SetName(Idx++, "%s", tr( "Titles from WiiTDB" )); - Options->SetName(Idx++, "%s", tr( "Screensaver" )); - Options->SetName(Idx++, "%s", tr( "Mark new games" )); - Options->SetName(Idx++, "%s", tr( "Show Free Space" )); - Options->SetName(Idx++, "%s", tr( "HOME Menu" )); - - SetOptionValues(); - - OldTitlesOverride = Settings.titlesOverride; -} - -GuiSettingsMenu::~GuiSettingsMenu() -{ - if (Settings.titlesOverride != OldTitlesOverride) - GameTitles.LoadTitlesFromWiiTDB(Settings.titlestxt_path); -} - -void GuiSettingsMenu::SetOptionValues() -{ - int Idx = 0; - - //! Settings: App Language - const char * language = strrchr(Settings.language_path, '/'); - if(language) - language += 1; - if (!language || strcmp(Settings.language_path, "") == 0) - Options->SetValue(Idx++, "%s", tr( "Default" )); - else - Options->SetValue(Idx++, "%s", language); - - //! Settings: Display - Options->SetValue(Idx++, "%s", tr( GameInfoText[Settings.sinfo] )); - - //! Settings: Clock - if (Settings.hddinfo == CLOCK_HR12) - Options->SetValue(Idx++, "12 %s", tr( "Hour" )); - else if (Settings.hddinfo == CLOCK_HR24) - Options->SetValue(Idx++, "24 %s", tr( "Hour" )); - else if (Settings.hddinfo == OFF) - Options->SetValue(Idx++, "%s", tr( "OFF" )); - - //! Settings: Tooltips - Options->SetValue(Idx++, "%s", tr(OnOffText[Settings.tooltips])); - - //! Settings: Flip-X - Options->SetValue(Idx++, "%s%s%s", tr(FlipXText[Settings.xflip][0]), - FlipXText[Settings.xflip][1], tr( FlipXText[Settings.xflip][2] )); - - //! Settings: Prompts Buttons - Options->SetValue(Idx++, "%s", tr( PromptButtonsText[Settings.wsprompt] )); - - //! Settings: Keyboard - Options->SetValue(Idx++, "%s", KeyboardText[Settings.keyset]); - - //! Settings: Disc Artwork Download - Options->SetValue(Idx++, "%s", tr( DiscArtDownloadText[Settings.discart] )); - - //! Settings: Wiilight - Options->SetValue(Idx++, "%s", tr( WiilightText[Settings.wiilight] )); - - //! Settings: Rumble - Options->SetValue(Idx++, "%s", tr( OnOffText[Settings.rumble] )); - - //! Settings: AutoInit Network - Options->SetValue(Idx++, "%s", tr( OnOffText[Settings.autonetwork] )); - - //! Settings: Titles from WiiTDB - Options->SetValue(Idx++, "%s", tr( OnOffText[Settings.titlesOverride] )); - - //! Settings: Screensaver - Options->SetValue(Idx++, "%s", tr( ScreensaverText[Settings.screensaver] )); - - //! Settings: Mark new games - Options->SetValue(Idx++, "%s", tr( OnOffText[Settings.marknewtitles] )); - - //! Settings: Show Free Space - Options->SetValue(Idx++, "%s", tr( OnOffText[Settings.ShowFreeSpace] )); - - //! Settings: Home Menu style - Options->SetValue(Idx++, "%s", tr( HomeMenuText[Settings.HomeMenu] )); -} - -int GuiSettingsMenu::GetMenuInternal() -{ - int ret = optionBrowser->GetClickedOption(); - - if (ret < 0) - return MENU_NONE; - - int Idx = -1; - - //! Settings: App Language - if (ret == ++Idx) - { - if (!Settings.godmode) - { - WindowPrompt(tr( "Language change:" ), tr( "Console should be unlocked to modify it." ), tr( "OK" )); - return MENU_NONE; - } - SetEffect(EFFECT_FADE, -20); - while (GetEffect() > 0) usleep(100); - HaltGui(); - if(parentElement) - { - ((GuiWindow *) parentElement)->Remove(this); - ((GuiWindow *) parentElement)->SetState(STATE_DISABLED); - } - ResumeGui(); - - int returnhere = 1; - while (returnhere == 1) - returnhere = MenuLanguageSelect(); - - if (returnhere == 2) - { - //! Language changed. Reload game titles with new lang code. - GameTitles.LoadTitlesFromWiiTDB(Settings.titlestxt_path); - return MENU_SETTINGS; - } - - HaltGui(); - if(parentElement) - { - ((GuiWindow *) parentElement)->Append(this); - ((GuiWindow *) parentElement)->SetState(STATE_DEFAULT); - } - SetEffect(EFFECT_FADE, 20); - ResumeGui(); - while (GetEffect() > 0) usleep(100); - } - - //! Settings: Display - else if (ret == ++Idx) - { - if (++Settings.sinfo >= GAMEINFO_MAX) Settings.sinfo = 0; - } - - //! Settings: Clock - else if (ret == ++Idx) - { - if (++Settings.hddinfo >= CLOCK_MAX) Settings.hddinfo = 0; //CLOCK - } - - //! Settings: Tooltips - else if (ret == ++Idx) - { - if (++Settings.tooltips >= MAX_ON_OFF) Settings.tooltips = 0; - } - - //! Settings: Flip-X - else if (ret == ++Idx) - { - if (++Settings.xflip >= XFLIP_MAX) Settings.xflip = 0; - } - - //! Settings: Prompts Buttons - else if (ret == ++Idx) - { - if (++Settings.wsprompt >= MAX_ON_OFF) Settings.wsprompt = 0; - } - - //! Settings: Keyboard - else if (ret == ++Idx) - { - if (++Settings.keyset >= KEYBOARD_MAX) Settings.keyset = 0; - } - - //! Settings: Disc Artwork Download - else if (ret == ++Idx) - { - if (++Settings.discart >= DISCARTS_MAX_CHOICE) Settings.discart = 0; - } - - //! Settings: Wiilight - else if (ret == ++Idx) - { - if (++Settings.wiilight >= WIILIGHT_MAX) Settings.wiilight = 0; - } - - //! Settings: Rumble - else if (ret == ++Idx) - { - if (++Settings.rumble >= MAX_ON_OFF) Settings.rumble = 0; //RUMBLE - } - - //! Settings: AutoInit Network - else if (ret == ++Idx) - { - if (++Settings.autonetwork >= MAX_ON_OFF) Settings.autonetwork = 0; - } - - //! Settings: Titles from WiiTDB - else if (ret == ++Idx) - { - if (++Settings.titlesOverride >= MAX_ON_OFF) Settings.titlesOverride = 0; - } - - //! Settings: Screensaver - else if (ret == ++Idx) - { - if (++Settings.screensaver >= SCREENSAVER_MAX) Settings.screensaver = 0; - - SetWPADTimeout(); - } - - //! Settings: Mark new games - else if (ret == ++Idx) - { - if (++Settings.marknewtitles >= MAX_ON_OFF) Settings.marknewtitles = 0; - } - - //! Settings: Show Free Space - else if (ret == ++Idx) - { - if (++Settings.ShowFreeSpace >= MAX_ON_OFF) Settings.ShowFreeSpace = 0; - } - - //! Settings: Home Menu Style - else if (ret == ++Idx) - { - if (++Settings.HomeMenu >= HOME_MENU_MAX_CHOICE) Settings.HomeMenu = 0; - } - - SetOptionValues(); - - return MENU_NONE; -} diff --git a/source/settings/menus/GUISettingsMenu.hpp b/source/settings/menus/GUISettingsMenu.hpp deleted file mode 100644 index 97680648..00000000 --- a/source/settings/menus/GUISettingsMenu.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#ifndef GUISETTINGS_MENU_HPP_ -#define GUISETTINGS_MENU_HPP_ - -#include "SettingsMenu.hpp" - -class GuiSettingsMenu : public SettingsMenu -{ - public: - GuiSettingsMenu(); - ~GuiSettingsMenu(); - virtual int GetType() { return CGUISettingsMenu; }; - protected: - void SetOptionValues(); - int GetMenuInternal(); - - int OldTitlesOverride; - - OptionList GuiOptions; -}; - - -#endif diff --git a/source/settings/menus/GameLoadSM.cpp b/source/settings/menus/GameLoadSM.cpp deleted file mode 100644 index e2033a68..00000000 --- a/source/settings/menus/GameLoadSM.cpp +++ /dev/null @@ -1,369 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include -#include -#include "settings/CSettings.h" -#include "themes/CTheme.h" -#include "prompts/PromptWindows.h" -#include "prompts/DiscBrowser.h" -#include "usbloader/AlternateDOLOffsets.h" -#include "language/gettext.h" -#include "wad/nandtitle.h" -#include "GameLoadSM.hpp" - -static const char * OnOffText[MAX_ON_OFF] = -{ - trNOOP( "OFF" ), - trNOOP( "ON" ) -}; - -static const char * VideoModeText[VIDEO_MODE_MAX] = -{ - trNOOP( "System Default" ), - trNOOP( "Disc Default" ), - trNOOP( "Force PAL50" ), - trNOOP( "Force PAL60" ), - trNOOP( "Force NTSC" ), - trNOOP( "Region Patch" ), -}; - -static const char * LanguageText[MAX_LANGUAGE] = -{ - trNOOP( "Japanese" ), - trNOOP( "English" ), - trNOOP( "German" ), - trNOOP( "French" ), - trNOOP( "Spanish" ), - trNOOP( "Italian" ), - trNOOP( "Dutch" ), - trNOOP( "SChinese" ), - trNOOP( "TChinese" ), - trNOOP( "Korean" ), - trNOOP( "Console Default" ), -}; - -static const char * Error002Text[3] = -{ - trNOOP( "No" ), - trNOOP( "Yes" ), - trNOOP( "Anti" ) -}; - -static const char * ParentalText[5] = -{ - trNOOP( "0 (Everyone)" ), - trNOOP( "1 (Child 7+)" ), - trNOOP( "2 (Teen 12+)" ), - trNOOP( "3 (Mature 16+)" ), - trNOOP( "4 (Adults Only 18+)" ) -}; - -static const char * AlternateDOLText[] = -{ - trNOOP( "OFF" ), - trNOOP( "Select a DOL from Game" ), - trNOOP( "Load From SD/USB" ), - trNOOP( "List on Gamelaunch" ), - trNOOP( "Default" ), -}; - -GameLoadSM::GameLoadSM(const char * GameID) - : SettingsMenu(tr("Game Load"), &GuiOptions, MENU_NONE) -{ - memcpy(&GameConfig, GameSettings.GetGameCFG(GameID), sizeof(GameCFG)); - - if(!btnOutline) - btnOutline = Resources::GetImageData("button_dialogue_box.png"); - if(!trigA) - trigA = new GuiTrigger(); - trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - - saveBtnTxt = new GuiText(tr( "Save" ), 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - saveBtnTxt->SetMaxWidth(btnOutline->GetWidth() - 30); - saveBtnImg = new GuiImage (btnOutline); - if (Settings.wsprompt == ON) - { - saveBtnTxt->SetWidescreen(Settings.widescreen); - saveBtnImg->SetWidescreen(Settings.widescreen); - } - saveBtn = new GuiButton(saveBtnImg, saveBtnImg, 2, 3, 180, 400, trigA, btnSoundOver, btnSoundClick2, 1); - saveBtn->SetLabel(saveBtnTxt); - Append(saveBtn); - - SetOptionNames(); - SetOptionValues(); -} - -GameLoadSM::~GameLoadSM() -{ - HaltGui(); - //! The rest is destroyed in SettingsMenu.cpp - Remove(saveBtn); - delete saveBtnTxt; - delete saveBtnImg; - delete saveBtn; - ResumeGui(); -} - -void GameLoadSM::SetDefaultConfig() -{ - char id[7]; - snprintf(id, sizeof(id), GameConfig.id); - memcpy(&GameConfig, GameSettings.GetDefault(), sizeof(GameCFG)); - snprintf(GameConfig.id, sizeof(GameConfig.id), id); -} - -void GameLoadSM::SetOptionNames() -{ - int Idx = 0; - - Options->SetName(Idx++, "%s", tr( "Video Mode" )); - Options->SetName(Idx++, "%s", tr( "VIDTV Patch" )); - Options->SetName(Idx++, "%s", tr( "Game Language" )); - Options->SetName(Idx++, "%s", tr( "Patch Country Strings" )); - Options->SetName(Idx++, "%s", tr( "Ocarina" )); - Options->SetName(Idx++, "%s", tr( "Game IOS" )); - Options->SetName(Idx++, "%s", tr( "Parental Control" )); - Options->SetName(Idx++, "%s", tr( "Error 002 fix" )); - Options->SetName(Idx++, "%s", tr( "Return To" )); - Options->SetName(Idx++, "%s", tr( "Alternate DOL" )); - Options->SetName(Idx++, "%s", tr( "Select DOL Offset" )); - Options->SetName(Idx++, "%s", tr( "Block IOS Reload" )); - Options->SetName(Idx++, "%s", tr( "Game Lock" )); -} - -void GameLoadSM::SetOptionValues() -{ - int Idx = 0; - - //! Settings: Video Mode - Options->SetValue(Idx++, "%s", tr(VideoModeText[GameConfig.video])); - - //! Settings: VIDTV Patch - Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.vipatch])); - - //! Settings: Game Language - Options->SetValue(Idx++, "%s", tr(LanguageText[GameConfig.language])); - - //! Settings: Patch Country Strings - Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.patchcountrystrings])); - - //! Settings: Ocarina - Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.ocarina])); - - //! Settings: Game IOS - Options->SetValue(Idx++, "%i", GameConfig.ios); - - //! Settings: Parental Control - Options->SetValue(Idx++, "%s", tr(ParentalText[GameConfig.parentalcontrol])); - - //! Settings: Error 002 fix - Options->SetValue(Idx++, "%s", tr(Error002Text[GameConfig.errorfix002])); - - //! Settings: Return To - if(GameConfig.returnTo) - { - const char* TitleName = NULL; - int haveTitle = NandTitles.FindU32(Settings.returnTo); - if (haveTitle >= 0) - TitleName = NandTitles.NameFromIndex(haveTitle); - Options->SetValue(Idx++, "%s", TitleName ? TitleName : strlen(Settings.returnTo) > 0 ? - Settings.returnTo : tr( OnOffText[0] )); - } - else - { - Options->SetValue(Idx++, "%s", tr( OnOffText[0] )); - } - - //! Settings: Alternate DOL - Options->SetValue(Idx++, "%s", tr( AlternateDOLText[GameConfig.loadalternatedol] )); - - //! Settings: Select DOL Offset - if(GameConfig.loadalternatedol != 1) - Options->SetValue(Idx++, tr("Not required")); - else - { - if(strcmp(GameConfig.alternatedolname, "") != 0) - Options->SetValue(Idx++, "%i <%s>", GameConfig.alternatedolstart, GameConfig.alternatedolname); - else - Options->SetValue(Idx++, "%i", GameConfig.alternatedolstart); - } - - //! Settings: Block IOS Reload - Options->SetValue(Idx++, "%s", tr( OnOffText[GameConfig.iosreloadblock] )); - - //! Settings: Game Lock - Options->SetValue(Idx++, "%s", tr( OnOffText[GameConfig.Locked] )); -} - -int GameLoadSM::GetMenuInternal() -{ - if (saveBtn->GetState() == STATE_CLICKED) - { - if (GameSettings.AddGame(GameConfig) && GameSettings.Save()) - { - WindowPrompt(tr( "Successfully Saved" ), 0, tr( "OK" )); - } - else - WindowPrompt(tr( "Save Failed. No device inserted?" ), 0, tr( "OK" )); - - saveBtn->ResetState(); - } - - int ret = optionBrowser->GetClickedOption(); - - if (ret < 0) - return MENU_NONE; - - int Idx = -1; - - //! Settings: Video Mode - if (ret == ++Idx) - { - if (++GameConfig.video >= VIDEO_MODE_MAX) GameConfig.video = 0; - } - - //! Settings: VIDTV Patch - else if (ret == ++Idx) - { - if (++GameConfig.vipatch >= MAX_ON_OFF) GameConfig.vipatch = 0; - } - - //! Settings: Game Language - else if (ret == ++Idx) - { - if (++GameConfig.language >= MAX_LANGUAGE) GameConfig.language = 0; - } - - //! Settings: Patch Country Strings - else if (ret == ++Idx) - { - if (++GameConfig.patchcountrystrings >= MAX_ON_OFF) GameConfig.patchcountrystrings = 0; - } - - //! Settings: Ocarina - else if (ret == ++Idx) - { - if (++GameConfig.ocarina >= MAX_ON_OFF) GameConfig.ocarina = 0; - } - - //! Settings: Game IOS - else if (ret == ++Idx) - { - char entered[4]; - snprintf(entered, sizeof(entered), "%i", GameConfig.ios); - if(OnScreenKeyboard(entered, sizeof(entered), 0)) - { - GameConfig.ios = atoi(entered) & 0xFF; - if(GameConfig.ios < 200) GameConfig.ios = 200; - - if(NandTitles.IndexOf(TITLE_ID(1, GameConfig.ios)) < 0) - { - WindowPrompt(tr("Warning:"), tr("This IOS was not found on the titles list. If you are sure you have it installed than ignore this warning."), tr("OK")); - } - else if(GameConfig.ios == 254) - { - WindowPrompt(tr("Warning:"), tr("This IOS is the BootMii ios. If you are sure it is not BootMii and you have something else installed there than ignore this warning."), tr("OK")); - } - } - } - - //! Settings: Parental Control - else if (ret == ++Idx) - { - if (++GameConfig.parentalcontrol >= 5) GameConfig.parentalcontrol = 0; - } - - //! Settings: Error 002 fix - else if (ret == ++Idx) - { - if (++GameConfig.errorfix002 >= 3) GameConfig.errorfix002 = 0; - } - - //! Settings: Return To - else if (ret == ++Idx) - { - if (++GameConfig.returnTo >= MAX_ON_OFF) GameConfig.returnTo = 0; - } - - //! Settings: Alternate DOL - else if (ret == ++Idx) - { - if (++GameConfig.loadalternatedol >= ALT_DOL_MAX_CHOICE) - GameConfig.loadalternatedol = 0; - } - - //! Settings: Select DOL Offset from Game - else if (ret == ++Idx && GameConfig.loadalternatedol == 1) - { - GuiWindow * parentWindow = (GuiWindow *) parentElement; - if(parentWindow) parentWindow->SetState(STATE_DISABLED); - //alt dol menu for games that require more than a single alt dol - int autodol = autoSelectDolPrompt((char *) GameConfig.id); - if(autodol == 0) - { - if(parentWindow) parentWindow->SetState(STATE_DEFAULT); - return MENU_NONE; //Cancel Button pressed - } - - if (autodol > 0) - { - GameConfig.alternatedolstart = autodol; - snprintf(GameConfig.alternatedolname, sizeof(GameConfig.alternatedolname), "%s <%i>", tr( "AUTO" ), autodol); - SetOptionValues(); - if(parentWindow) parentWindow->SetState(STATE_DEFAULT); - return MENU_NONE; - } - - int res = DiscBrowse(GameConfig.id, GameConfig.alternatedolname, sizeof(GameConfig.alternatedolname)); - if (res >= 0) - { - GameConfig.alternatedolstart = res; - char tmp[170]; - snprintf(tmp, sizeof(tmp), "%s %.6s - %i", tr( "It seems that you have some information that will be helpful to us. Please pass this information along to the DEV team." ), (char *) GameConfig.id, GameConfig.alternatedolstart); - WindowPrompt(0, tmp, tr( "OK" )); - } - - if(GameConfig.alternatedolstart == 0) - GameConfig.loadalternatedol = 0; - if(parentWindow) parentWindow->SetState(STATE_DEFAULT); - } - - //! Settings: Block IOS Reload - else if (ret == ++Idx) - { - if (++GameConfig.iosreloadblock >= MAX_ON_OFF) GameConfig.iosreloadblock = 0; - } - - //! Settings: Game Lock - else if (ret == ++Idx) - { - if (++GameConfig.Locked >= MAX_ON_OFF) GameConfig.Locked = 0; - } - - SetOptionValues(); - - return MENU_NONE; -} - diff --git a/source/settings/menus/GameLoadSM.hpp b/source/settings/menus/GameLoadSM.hpp deleted file mode 100644 index 32f8a92c..00000000 --- a/source/settings/menus/GameLoadSM.hpp +++ /dev/null @@ -1,51 +0,0 @@ - /**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#ifndef GAMELOAD_SM_HPP -#define GAMELOAD_SM_HPP - -#include "SettingsMenu.hpp" -#include "settings/CGameSettings.h" - -class GameLoadSM : public SettingsMenu -{ - public: - GameLoadSM(const char * GameID); - ~GameLoadSM(); - virtual int GetType() { return CGameLoadSM; }; - protected: - void SetDefaultConfig(); - void SetOptionNames(); - void SetOptionValues(); - int GetMenuInternal(); - - GameCFG GameConfig; - OptionList GuiOptions; - - GuiText * saveBtnTxt; - GuiImage * saveBtnImg; - GuiButton * saveBtn; -}; - - -#endif diff --git a/source/settings/menus/GameSettingsMenu.cpp b/source/settings/menus/GameSettingsMenu.cpp deleted file mode 100644 index e909e490..00000000 --- a/source/settings/menus/GameSettingsMenu.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include "GameSettingsMenu.hpp" -#include "themes/CTheme.h" -#include "prompts/PromptWindows.h" -#include "settings/GameTitles.h" -#include "language/gettext.h" -#include "wad/nandtitle.h" -#include "cheats/cheatmenu.h" -#include "GameLoadSM.hpp" -#include "UninstallSM.hpp" - -GameSettingsMenu::GameSettingsMenu(struct discHdr * header) - : FlyingButtonsMenu(GameTitles.GetTitle(header)) -{ - DiscHeader = header; - //! Don't switch menu's by default but return to disc window. - ParentMenu = -2; -} - -GameSettingsMenu::~GameSettingsMenu() -{ -} - -void GameSettingsMenu::SetupMainButtons() -{ - int pos = 0; - - SetMainButton(pos++, tr( "Game Load" ), MainButtonImgData, MainButtonImgOverData); - SetMainButton(pos++, tr( "Ocarina" ), MainButtonImgData, MainButtonImgOverData); - SetMainButton(pos++, tr( "Uninstall Menu" ), MainButtonImgData, MainButtonImgOverData); - SetMainButton(pos++, tr( "Default Gamesettings" ), MainButtonImgData, MainButtonImgOverData); -} - -void GameSettingsMenu::CreateSettingsMenu(int menuNr) -{ - if(CurrentMenu) - return; - - int Idx = 0; - - //! Game Load - if(menuNr == Idx++) - { - HideMenu(); - ResumeGui(); - CurrentMenu = new GameLoadSM((const char *) DiscHeader->id); - Append(CurrentMenu); - } - - //! Ocarina - else if(menuNr == Idx++) - { - char ID[7]; - snprintf(ID, sizeof(ID), "%s", (char *) DiscHeader->id); - CheatMenu(ID); - } - - //! Uninstall Menu - else if(menuNr == Idx++) - { - HideMenu(); - ResumeGui(); - CurrentMenu = new UninstallSM(DiscHeader); - Append(CurrentMenu); - } - - //! Default Gamesettings - else if(menuNr == Idx++) - { - int choice = WindowPrompt(tr( "Are you sure?" ), 0, tr( "Yes" ), tr( "Cancel" )); - if (choice == 1) - { - GameSettings.Remove(DiscHeader->id); - GameSettings.Save(); - } - } -} - -void GameSettingsMenu::DeleteSettingsMenu() -{ - if(!CurrentMenu) - return; - - int type = CurrentMenu->GetType(); - - switch(type) - { - case CGameLoadSM: - delete ((GameLoadSM *) CurrentMenu); - break; - case CUninstallSM: - delete ((UninstallSM *) CurrentMenu); - break; - case CSettingsMenu: - default: - delete CurrentMenu; - break; - } - - CurrentMenu = NULL; -} diff --git a/source/settings/menus/GameSettingsMenu.hpp b/source/settings/menus/GameSettingsMenu.hpp deleted file mode 100644 index 91cb6b58..00000000 --- a/source/settings/menus/GameSettingsMenu.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#ifndef GAMESETTINGSMENU_HPP_ -#define GAMESETTINGSMENU_HPP_ - -#include "FlyingButtonsMenu.hpp" -#include "settings/CGameSettings.h" -#include "usbloader/disc.h" - -class GameSettingsMenu : public FlyingButtonsMenu -{ - public: - GameSettingsMenu(struct discHdr * header); - ~GameSettingsMenu(); - protected: - virtual void CreateSettingsMenu(int index); - virtual void DeleteSettingsMenu(); - virtual void SetupMainButtons(); - - struct discHdr * DiscHeader; -}; - -#endif diff --git a/source/settings/menus/GlobalSettings.cpp b/source/settings/menus/GlobalSettings.cpp deleted file mode 100644 index e0428b22..00000000 --- a/source/settings/menus/GlobalSettings.cpp +++ /dev/null @@ -1,245 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include "GlobalSettings.hpp" -#include "themes/CTheme.h" -#include "prompts/PromptWindows.h" -#include "network/update.h" -#include "language/gettext.h" -#include "GUISettingsMenu.hpp" -#include "LoaderSettings.hpp" -#include "ParentalControlSM.hpp" -#include "SoundSettingsMenu.hpp" -#include "CustomPathsSM.hpp" - -GlobalSettings::GlobalSettings() - : FlyingButtonsMenu(tr("Global Settings")) -{ - creditsImgData = Resources::GetImageData("credits_button.png"); - creditsImgOverData = Resources::GetImageData("credits_button_over.png"); -} - -GlobalSettings::~GlobalSettings() -{ - Settings.Save(); - - delete creditsImgData; - delete creditsImgOverData; -} - -void GlobalSettings::SetupMainButtons() -{ - int pos = 0; - - SetMainButton(pos++, tr( "GUI Settings" ), MainButtonImgData, MainButtonImgOverData); - SetMainButton(pos++, tr( "Loader Settings" ), MainButtonImgData, MainButtonImgOverData); - SetMainButton(pos++, tr( "Parental Control" ), MainButtonImgData, MainButtonImgOverData); - SetMainButton(pos++, tr( "Sound" ), MainButtonImgData, MainButtonImgOverData); - SetMainButton(pos++, tr( "Custom Paths" ), MainButtonImgData, MainButtonImgOverData); - SetMainButton(pos++, tr( "Theme Menu" ), MainButtonImgData, MainButtonImgOverData); - SetMainButton(pos++, tr( "Theme Downloader" ), MainButtonImgData, MainButtonImgOverData); - SetMainButton(pos++, tr( "Update" ), MainButtonImgData, MainButtonImgOverData); - SetMainButton(pos++, tr( "Default Settings" ), MainButtonImgData, MainButtonImgOverData); - SetMainButton(pos++, tr( "Credits" ), creditsImgData, creditsImgOverData); -} - -void GlobalSettings::CreateSettingsMenu(int menuNr) -{ - if(CurrentMenu) - return; - - int Idx = 0; - - //! GUI Settings - if(menuNr == Idx++) - { - if(!Settings.godmode && (Settings.ParentalBlocks & BLOCK_GUI_SETTINGS)) - { - WindowPrompt(tr( "Permission denied." ), tr( "Console must be unlocked for this option." ), tr( "OK" )); - return; - } - - HideMenu(); - ResumeGui(); - CurrentMenu = new GuiSettingsMenu(); - Append(CurrentMenu); - } - //! Loader Settings - else if(menuNr == Idx++) - { - if(!Settings.godmode && (Settings.ParentalBlocks & BLOCK_LOADER_SETTINGS)) - { - WindowPrompt(tr( "Permission denied." ), tr( "Console must be unlocked for this option." ), tr( "OK" )); - return; - } - - HideMenu(); - ResumeGui(); - CurrentMenu = new LoaderSettings(); - Append(CurrentMenu); - } - //! Parental Control - else if(menuNr == Idx++) - { - if(!Settings.godmode && (Settings.ParentalBlocks & BLOCK_PARENTAL_SETTINGS)) - { - WindowPrompt(tr( "Permission denied." ), tr( "Console must be unlocked for this option." ), tr( "OK" )); - return; - } - - HideMenu(); - ResumeGui(); - CurrentMenu = new ParentalControlSM(); - Append(CurrentMenu); - } - //! Sound - else if(menuNr == Idx++) - { - if(!Settings.godmode && (Settings.ParentalBlocks & BLOCK_SOUND_SETTINGS)) - { - WindowPrompt(tr( "Permission denied." ), tr( "Console must be unlocked for this option." ), tr( "OK" )); - return; - } - - HideMenu(); - ResumeGui(); - CurrentMenu = new SoundSettingsMenu(); - Append(CurrentMenu); - } - //! Custom Paths - else if(menuNr == Idx++) - { - if(!Settings.godmode && (Settings.ParentalBlocks & BLOCK_CUSTOMPATH_SETTINGS)) - { - WindowPrompt(tr( "Permission denied." ), tr( "Console must be unlocked for this option." ), tr( "OK" )); - return; - } - - HideMenu(); - ResumeGui(); - CurrentMenu = new CustomPathsSM(); - Append(CurrentMenu); - } - //! Theme Menu - else if(menuNr == Idx++) - { - if(!Settings.godmode && (Settings.ParentalBlocks & BLOCK_THEME_MENU)) - { - WindowPrompt(tr( "Permission denied." ), tr( "Console must be unlocked for this option." ), tr( "OK" )); - return; - } - - returnMenu = MENU_THEMEMENU; - } - //! Theme Downloader - else if(menuNr == Idx++) - { - if(!Settings.godmode && (Settings.ParentalBlocks & BLOCK_THEME_DOWNLOADER)) - { - WindowPrompt(tr( "Permission denied." ), tr( "Console must be unlocked for this option." ), tr( "OK" )); - return; - } - - returnMenu = MENU_THEMEDOWNLOADER; - } - //! Update - else if(menuNr == Idx++) - { - if(!Settings.godmode && (Settings.ParentalBlocks & BLOCK_UPDATES)) - { - WindowPrompt(tr( "Permission denied." ), tr( "Console must be unlocked for this option." ), tr( "OK" )); - return; - } - - HideMenu(); - Remove(backBtn); - ResumeGui(); - int ret = UpdateApp(); - if (ret < 0) - WindowPrompt(tr( "Update failed" ), 0, tr( "OK" )); - Append(backBtn); - ShowMenu(); - } - //! Default Settings - else if(menuNr == Idx++) - { - if(!Settings.godmode && (Settings.ParentalBlocks & BLOCK_RESET_SETTINGS)) - { - WindowPrompt(tr( "Permission denied." ), tr( "Console must be unlocked for this option." ), tr( "OK" )); - return; - } - - int choice = WindowPrompt(tr( "Are you sure you want to reset?" ), 0, tr( "Yes" ), tr( "Cancel" )); - if (choice == 1) - { - HaltGui(); - gettextCleanUp(); - Settings.Reset(); - returnMenu = MENU_SETTINGS; - ResumeGui(); - } - } - //! Credits - else if(menuNr == Idx++) - { - HideMenu(); - Remove(backBtn); - ResumeGui(); - WindowCredits(); - Append(backBtn); - ShowMenu(); - } -} - -void GlobalSettings::DeleteSettingsMenu() -{ - if(!CurrentMenu) - return; - - int type = CurrentMenu->GetType(); - - switch(type) - { - case CGUISettingsMenu: - delete ((GuiSettingsMenu *) CurrentMenu); - break; - case CLoaderSettings: - delete ((LoaderSettings *) CurrentMenu); - break; - case CParentalControlSM: - delete ((ParentalControlSM *) CurrentMenu); - break; - case CSoundSettingsMenu: - delete ((SoundSettingsMenu *) CurrentMenu); - break; - case CCustomPathsSM: - delete ((CustomPathsSM *) CurrentMenu); - break; - case CSettingsMenu: - default: - delete CurrentMenu; - break; - } - - CurrentMenu = NULL; -} diff --git a/source/settings/menus/GlobalSettings.hpp b/source/settings/menus/GlobalSettings.hpp deleted file mode 100644 index 97b9400c..00000000 --- a/source/settings/menus/GlobalSettings.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#ifndef GLOBAL_SETTINGS_HPP_ -#define GLOBAL_SETTINGS_HPP_ - -#include "FlyingButtonsMenu.hpp" - -class GlobalSettings : public FlyingButtonsMenu -{ - public: - GlobalSettings(); - ~GlobalSettings(); - protected: - virtual void CreateSettingsMenu(int index); - virtual void DeleteSettingsMenu(); - virtual void SetupMainButtons(); - - GuiImageData * creditsImgData; - GuiImageData * creditsImgOverData; -}; - -#endif diff --git a/source/settings/menus/LoaderSettings.cpp b/source/settings/menus/LoaderSettings.cpp deleted file mode 100644 index 7dbb5d9b..00000000 --- a/source/settings/menus/LoaderSettings.cpp +++ /dev/null @@ -1,475 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include -#include -#include "LoaderSettings.hpp" -#include "Controls/DeviceHandler.hpp" -#include "usbloader/usbstorage2.h" -#include "settings/CSettings.h" -#include "prompts/ProgressWindow.h" -#include "prompts/PromptWindows.h" -#include "language/gettext.h" -#include "wad/nandtitle.h" -#include "prompts/TitleBrowser.h" -#include "usbloader/GameList.h" -#include "usbloader/wbfs.h" -#include "usbloader/utils.h" -#include "system/IosLoader.h" -#include "settings/GameTitles.h" -#include "xml/xml.h" -#include "menu.h" - -static const char * OnOffText[MAX_ON_OFF] = -{ - trNOOP( "OFF" ), - trNOOP( "ON" ) -}; - -static const char * VideoModeText[VIDEO_MODE_MAX] = -{ - trNOOP( "System Default" ), - trNOOP( "Disc Default" ), - trNOOP( "Force PAL50" ), - trNOOP( "Force PAL60" ), - trNOOP( "Force NTSC" ), - trNOOP( "Region Patch" ), -}; - -static const char * LanguageText[MAX_LANGUAGE] = -{ - trNOOP( "Japanese" ), - trNOOP( "English" ), - trNOOP( "German" ), - trNOOP( "French" ), - trNOOP( "Spanish" ), - trNOOP( "Italian" ), - trNOOP( "Dutch" ), - trNOOP( "SChinese" ), - trNOOP( "TChinese" ), - trNOOP( "Korean" ), - trNOOP( "Console Default" ) -}; - -static const char * InstallToText[INSTALL_TO_MAX] = -{ - trNOOP( "None" ), - trNOOP( "GAMEID_Gamename" ), - trNOOP( "Gamename [GAMEID]" ) -}; - -static const char * SplitSizeText[INSTALL_TO_MAX] = -{ - trNOOP( "No Splitting" ), - trNOOP( "Split each 2GB" ), - trNOOP( "Split each 4GB" ), -}; - -static const char * Error002Text[3] = -{ - trNOOP( "No" ), - trNOOP( "Yes" ), - trNOOP( "Anti" ) -}; - -static inline bool IsValidPartition(int fs_type, int cios) -{ - if (IosLoader::IsWaninkokoIOS() && NandTitles.VersionOf(TITLE_ID(1, cios)) < 18) - { - return fs_type == PART_FS_WBFS; - } - else - { - return fs_type == PART_FS_WBFS || fs_type == PART_FS_FAT || fs_type == PART_FS_NTFS || fs_type == PART_FS_EXT; - } -} - -LoaderSettings::LoaderSettings() - : SettingsMenu(tr("Loader Settings"), &GuiOptions, MENU_NONE) -{ - int Idx = 0; - - Options->SetName(Idx++, "%s", tr( "Video Mode" )); - Options->SetName(Idx++, "%s", tr( "VIDTV Patch" )); - Options->SetName(Idx++, "%s", tr( "Game Language" )); - Options->SetName(Idx++, "%s", tr( "Patch Country Strings" )); - Options->SetName(Idx++, "%s", tr( "Ocarina" )); - Options->SetName(Idx++, "%s", tr( "Boot/Standard" )); - Options->SetName(Idx++, "%s", tr( "Game/Install Partition" )); - Options->SetName(Idx++, "%s", tr( "Multiple Partitions" )); - Options->SetName(Idx++, "%s", tr( "USB Port" )); - Options->SetName(Idx++, "%s", tr( "Install directories" )); - Options->SetName(Idx++, "%s", tr( "Game Split Size" )); - Options->SetName(Idx++, "%s", tr( "Quick Boot" )); - Options->SetName(Idx++, "%s", tr( "Error 002 fix" )); - Options->SetName(Idx++, "%s", tr( "Install partitions" )); - Options->SetName(Idx++, "%s", tr( "Return To" )); - Options->SetName(Idx++, "%s", tr( "Messageboard Update" )); - Options->SetName(Idx++, "%s", tr( "Sync FAT32 FS Info" )); - - OldSettingsPartition = Settings.partition; - OldSettingsMultiplePartitions = Settings.MultiplePartitions; - NewSettingsUSBPort = Settings.USBPort; - - SetOptionValues(); -} - -LoaderSettings::~LoaderSettings() -{ - //! if partition has changed, Reinitialize it - if (Settings.partition != OldSettingsPartition || - Settings.MultiplePartitions != OldSettingsMultiplePartitions || - Settings.USBPort != NewSettingsUSBPort) - { - WBFS_CloseAll(); - - if(Settings.USBPort != NewSettingsUSBPort) - { - DeviceHandler::Instance()->UnMountAllUSB(); - Settings.USBPort = NewSettingsUSBPort; - DeviceHandler::SetUSBPort(Settings.USBPort); - DeviceHandler::Instance()->MountAllUSB(); - - if(Settings.partition >= DeviceHandler::Instance()->GetUSBHandle()->GetPartitionTotalCount()) - Settings.partition = 0; - } - - if(Settings.MultiplePartitions) - WBFS_OpenAll(); - else - WBFS_OpenPart(Settings.partition); - - //! Reload the new game titles - gameList.ReadGameList(); - GameTitles.LoadTitlesFromWiiTDB(Settings.titlestxt_path); - } -} - -void LoaderSettings::SetOptionValues() -{ - int Idx = 0; - - //! Settings: Video Mode - Options->SetValue(Idx++, "%s", tr(VideoModeText[Settings.videomode])); - - //! Settings: VIDTV Patch - Options->SetValue(Idx++, "%s", tr( OnOffText[Settings.videopatch] )); - - //! Settings: Game Language - Options->SetValue(Idx++, "%s", tr( LanguageText[Settings.language] )); - - //! Settings: Patch Country Strings - Options->SetValue(Idx++, "%s", tr( OnOffText[Settings.patchcountrystrings] )); - - //! Settings: Ocarina - Options->SetValue(Idx++, "%s", tr( OnOffText[Settings.ocarina] )); - - //! Settings: Boot/Standard - if (Settings.godmode) - Options->SetValue(Idx++, "IOS %i", Settings.cios); - else - Options->SetValue(Idx++, "********"); - - //! Settings: Game/Install Partition - PartitionHandle * usbHandle = DeviceHandler::Instance()->GetUSBHandle(); - // Get the partition name and it's size in GB's - Options->SetValue(Idx++, "%s (%.2fGB)", usbHandle->GetFSName(Settings.partition), usbHandle->GetSize(Settings.partition)/GB_SIZE); - - //! Settings: Multiple Partitions - Options->SetValue(Idx++, "%s", tr( OnOffText[Settings.MultiplePartitions] )); - - //! Settings: USB Port - if(NewSettingsUSBPort == 2) - Options->SetValue(Idx++, tr("Both Ports")); - else - Options->SetValue(Idx++, "%i", NewSettingsUSBPort); - - //! Settings: Install directories - Options->SetValue(Idx++, "%s", tr( InstallToText[Settings.InstallToDir] )); - - //! Settings: Game Split Size - Options->SetValue(Idx++, "%s", tr( SplitSizeText[Settings.GameSplit] )); - - //! Settings: Quick Boot - Options->SetValue(Idx++, "%s", tr( OnOffText[Settings.quickboot] )); - - //! Settings: Error 002 fix - Options->SetValue(Idx++, "%s", tr( Error002Text[Settings.error002] )); - - //! Settings: Install partitions - if(Settings.InstallPartitions == ONLY_GAME_PARTITION) - Options->SetValue(Idx++, "%s", tr("Only Game Partition")); - else if(Settings.InstallPartitions == ALL_PARTITIONS) - Options->SetValue(Idx++, "%s", tr("All Partitions")); - else if(Settings.InstallPartitions == REMOVE_UPDATE_PARTITION) - Options->SetValue(Idx++, "%s", tr("Remove update")); - - //! Settings: Return To - const char* TitleName = NULL; - int haveTitle = NandTitles.FindU32(Settings.returnTo); - if (haveTitle >= 0) - TitleName = NandTitles.NameFromIndex(haveTitle); - TitleName = TitleName ? TitleName : strlen(Settings.returnTo) > 0 ? Settings.returnTo : tr(OnOffText[0]); - Options->SetValue(Idx++, "%s", TitleName); - - //! Settings: Messageboard Update - Options->SetValue(Idx++, "%s", tr( OnOffText[Settings.PlaylogUpdate] )); - - //! Settings: Sync FAT32 FS Info - Options->SetValue(Idx++, " "); -} - -int LoaderSettings::GetMenuInternal() -{ - int ret = optionBrowser->GetClickedOption(); - - if (ret < 0) - return MENU_NONE; - - int Idx = -1; - - //! Settings: Video Mode - if (ret == ++Idx) - { - if (++Settings.videomode >= VIDEO_MODE_MAX) Settings.videomode = 0; - } - - //! Settings: VIDTV Patch - else if (ret == ++Idx) - { - if (++Settings.videopatch >= MAX_ON_OFF) Settings.videopatch = 0; - } - - //! Settings: Game Language - else if (ret == ++Idx) - { - if (++Settings.language >= MAX_LANGUAGE) Settings.language = 0; - } - - //! Settings: Patch Country Strings - else if (ret == ++Idx) - { - if (++Settings.patchcountrystrings >= MAX_ON_OFF) Settings.patchcountrystrings = 0; - } - - //! Settings: Ocarina - else if (ret == ++Idx) - { - if (++Settings.ocarina >= MAX_ON_OFF) Settings.ocarina = 0; - } - - //! Settings: Boot/Standard - else if (ret == ++Idx) - { - if(!Settings.godmode) - return MENU_NONE; - - char entered[4]; - snprintf(entered, sizeof(entered), "%i", Settings.cios); - if(OnScreenKeyboard(entered, sizeof(entered), 0)) - { - Settings.cios = atoi(entered); - if(Settings.cios < 200) Settings.cios = 200; - else if(Settings.cios > 255) Settings.cios = 255; - - if(NandTitles.IndexOf(TITLE_ID(1, Settings.cios)) < 0) - { - WindowPrompt(tr("Warning:"), tr("This IOS was not found on the titles list. If you are sure you have it installed than ignore this warning."), tr("OK")); - } - else if(Settings.cios == 254) - { - WindowPrompt(tr("Warning:"), tr("This IOS is the BootMii ios. If you are sure it is not BootMii and you have something else installed there than ignore this warning."), tr("OK")); - } - } - } - - //! Settings: Game/Install Partition - else if (ret == ++Idx) - { - // Select the next valid partition, even if that's the same one - int fs_type = 0; - int ios = IOS_GetVersion(); - int retries = 20; - do - { - Settings.partition = (Settings.partition + 1) % DeviceHandler::Instance()->GetUSBHandle()->GetPartitionTotalCount(); - fs_type = DeviceHandler::GetUSBFilesystemType(Settings.partition); - } - while (!IsValidPartition(fs_type, ios) && --retries > 0); - - if(fs_type == PART_FS_FAT && Settings.GameSplit == GAMESPLIT_NONE) - Settings.GameSplit = GAMESPLIT_4GB; - } - - //! Settings: Multiple Partitions - else if (ret == ++Idx) - { - if (++Settings.MultiplePartitions >= MAX_ON_OFF) Settings.MultiplePartitions = 0; - } - - //! Settings: USB Port - else if (ret == ++Idx) - { - if(!IosLoader::IsHermesIOS()) - { - WindowPrompt(tr("ERROR:"), tr("USB Port changing is only supported on Hermes cIOS."), tr("OK")); - NewSettingsUSBPort = 0; - Settings.USBPort = 0; - } - - else if (++NewSettingsUSBPort >= 3) // 2 = both ports - NewSettingsUSBPort = 0; - - if(NewSettingsUSBPort == 2) - { - bool allSDPaths = true; - if(strncmp(Settings.covers_path, "usb", 3) == 0) - allSDPaths = false; - else if(strncmp(Settings.coversFull_path, "usb", 3) == 0) - allSDPaths = false; - else if(strncmp(Settings.disc_path, "usb", 3) == 0) - allSDPaths = false; - else if(strncmp(Settings.theme_path, "usb", 3) == 0) - allSDPaths = false; - else if(strncmp(Settings.titlestxt_path, "usb", 3) == 0) - allSDPaths = false; - else if(strncmp(Settings.update_path, "usb", 3) == 0) - allSDPaths = false; - else if(strncmp(Settings.Cheatcodespath, "usb", 3) == 0) - allSDPaths = false; - else if(strncmp(Settings.TxtCheatcodespath, "usb", 3) == 0) - allSDPaths = false; - else if(strncmp(Settings.dolpath, "usb", 3) == 0) - allSDPaths = false; - else if(strncmp(Settings.homebrewapps_path, "usb", 3) == 0) - allSDPaths = false; - else if(strncmp(Settings.BcaCodepath, "usb", 3) == 0) - allSDPaths = false; - else if(strncmp(Settings.WipCodepath, "usb", 3) == 0) - allSDPaths = false; - else if(strncmp(Settings.languagefiles_path, "usb", 3) == 0) - allSDPaths = false; - else if(strncmp(Settings.WDMpath, "usb", 3) == 0) - allSDPaths = false; - - if(!allSDPaths) - { - WindowPrompt(tr("ERROR:"), tr("Automatic port switching is done on the fly. You need to change all custom paths to SD-Card first for this option or else it could damage a filesystem."), tr("OK")); - NewSettingsUSBPort = 0; - } - } - } - - //! Settings: Install directories - else if (ret == ++Idx) - { - if (++Settings.InstallToDir >= INSTALL_TO_MAX) Settings.InstallToDir = 0; - } - - //! Settings: Game Split Size - else if (ret == ++Idx) - { - if (++Settings.GameSplit >= GAMESPLIT_MAX) - { - if(DeviceHandler::GetUSBFilesystemType(Settings.partition) == PART_FS_FAT) - Settings.GameSplit = GAMESPLIT_2GB; - else - Settings.GameSplit = GAMESPLIT_NONE; - } - } - - //! Settings: Quick Boot - else if (ret == ++Idx) - { - if (++Settings.quickboot >= MAX_ON_OFF) Settings.quickboot = 0; - } - - //! Settings: Error 002 fix - else if (ret == ++Idx ) - { - if (++Settings.error002 >= 3) Settings.error002 = 0; - } - - //! Settings: Install partitions - else if (ret == ++Idx) - { - switch(Settings.InstallPartitions) - { - case ONLY_GAME_PARTITION: - Settings.InstallPartitions = ALL_PARTITIONS; - break; - case ALL_PARTITIONS: - Settings.InstallPartitions = REMOVE_UPDATE_PARTITION; - break; - default: - case REMOVE_UPDATE_PARTITION: - Settings.InstallPartitions = ONLY_GAME_PARTITION; - break; - } - } - - //! Settings: Return To - else if (ret == ++Idx) - { - char tidChar[10]; - bool getChannel = TitleSelector(tidChar); - if (getChannel) - snprintf(Settings.returnTo, sizeof(Settings.returnTo), "%s", tidChar); - } - - //! Settings: Messageboard Update - else if (ret == ++Idx ) - { - if (++Settings.PlaylogUpdate >= MAX_ON_OFF) Settings.PlaylogUpdate = 0; - } - - //! Settings: Sync FAT32 FS Info - else if (ret == ++Idx ) - { - int choice = WindowPrompt(0, tr("Do you want to sync free space info sector on all FAT32 partitions?"), tr("Yes"), tr("Cancel")); - if(choice) - { - StartProgress(tr("Synchronizing..."), tr("Please wait..."), 0, false, false); - PartitionHandle * usb = DeviceHandler::Instance()->GetUSBHandle(); - for(int i = 0; i < usb->GetPartitionCount(); ++i) - { - ShowProgress(i, usb->GetPartitionCount()); - if(strncmp(usb->GetFSName(i), "FAT", 3) == 0) - { - struct statvfs stats; - char drive[20]; - snprintf(drive, sizeof(drive), "%s:/", usb->MountName(i)); - memset(&stats, 0, sizeof(stats)); - memcpy(&stats.f_flag, "SCAN", 4); - statvfs(drive, &stats); - } - } - ProgressStop(); - } - } - - SetOptionValues(); - - return MENU_NONE; -} - diff --git a/source/settings/menus/LoaderSettings.hpp b/source/settings/menus/LoaderSettings.hpp deleted file mode 100644 index 9ff3eb61..00000000 --- a/source/settings/menus/LoaderSettings.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#ifndef LOADERSETTINGS_HPP_ -#define LOADERSETTINGS_HPP_ - -#include "SettingsMenu.hpp" - -class LoaderSettings : public SettingsMenu -{ - public: - LoaderSettings(); - ~LoaderSettings(); - virtual int GetType() { return CLoaderSettings; }; - protected: - void SetOptionValues(); - int GetMenuInternal(); - - int OldSettingsPartition; - int OldSettingsMultiplePartitions; - int NewSettingsUSBPort; - - OptionList GuiOptions; -}; - - -#endif diff --git a/source/settings/menus/ParentalControlSM.cpp b/source/settings/menus/ParentalControlSM.cpp deleted file mode 100644 index dfde31dc..00000000 --- a/source/settings/menus/ParentalControlSM.cpp +++ /dev/null @@ -1,316 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include -#include "ParentalControlSM.hpp" -#include "settings/CSettings.h" -#include "prompts/PromptWindows.h" -#include "language/gettext.h" -#include "utils/PasswordCheck.h" - -static const char * OnOffText[MAX_ON_OFF] = -{ - trNOOP( "OFF" ), - trNOOP( "ON" ) -}; - -static const char * LockModeText[] = -{ - trNOOP( "Locked" ), - trNOOP( "Unlocked" ) -}; - -static const char * ParentalText[5] = -{ - trNOOP( "0 (Everyone)" ), - trNOOP( "1 (Child 7+)" ), - trNOOP( "2 (Teen 12+)" ), - trNOOP( "3 (Mature 16+)" ), - trNOOP( "4 (Adults Only 18+)" ) -}; - -ParentalControlSM::ParentalControlSM() - : SettingsMenu(tr("Parental Control"), &GuiOptions, MENU_NONE) -{ - int Idx = 0; - Options->SetName(Idx++, "%s", tr( "Console" )); - Options->SetName(Idx++, "%s", tr( "Password" )); - Options->SetName(Idx++, "%s", tr( "Controllevel" )); - Options->SetName(Idx++, "%s", tr( "Block Global Settings" )); - Options->SetName(Idx++, "%s", tr( "Block Gui Settings" )); - Options->SetName(Idx++, "%s", tr( "Block Loader Settings" )); - Options->SetName(Idx++, "%s", tr( "Block Parental Settings" )); - Options->SetName(Idx++, "%s", tr( "Block Sound Settings" )); - Options->SetName(Idx++, "%s", tr( "Block Custom Paths" )); - Options->SetName(Idx++, "%s", tr( "Block Updates" )); - Options->SetName(Idx++, "%s", tr( "Block Reset Settings" )); - Options->SetName(Idx++, "%s", tr( "Block Theme Downloader" )); - Options->SetName(Idx++, "%s", tr( "Block Theme Menu" )); - Options->SetName(Idx++, "%s", tr( "Block Game Settings" )); - Options->SetName(Idx++, "%s", tr( "Block HBC Menu" )); - Options->SetName(Idx++, "%s", tr( "Block Title Launcher" )); - Options->SetName(Idx++, "%s", tr( "Block Cover Downloads" )); - Options->SetName(Idx++, "%s", tr( "Block Game Install" )); - Options->SetName(Idx++, "%s", tr( "Block GameID Change" )); - - SetOptionValues(); -} - -void ParentalControlSM::SetOptionValues() -{ - int Idx = 0; - - //! Settings: Console - Options->SetValue(Idx++, "%s", tr( LockModeText[Settings.godmode] )); - - if(!Settings.godmode) - { - for(int i = Idx; i < Options->GetLength(); ++i) - Options->SetValue(i, "********"); - - return; - } - - //! Settings: Password - if (strcmp(Settings.unlockCode, "") == 0) - Options->SetValue(Idx++, "%s", tr( "not set" )); - else - Options->SetValue(Idx++, Settings.unlockCode); - - //! Settings: Controllevel - Options->SetValue(Idx++, "%s", tr(ParentalText[Settings.parentalcontrol])); - - //! Settings: Block Global Settings - Options->SetValue(Idx++, "%s", tr(OnOffText[((Settings.ParentalBlocks & BLOCK_GLOBAL_SETTINGS) != 0)])); - - //! Settings: Block Gui Settings - Options->SetValue(Idx++, "%s", tr(OnOffText[((Settings.ParentalBlocks & BLOCK_GUI_SETTINGS) != 0)])); - - //! Settings: Block Loader Settings - Options->SetValue(Idx++, "%s", tr(OnOffText[((Settings.ParentalBlocks & BLOCK_LOADER_SETTINGS) != 0)])); - - //! Settings: Block Parental Settings - Options->SetValue(Idx++, "%s", tr(OnOffText[((Settings.ParentalBlocks & BLOCK_PARENTAL_SETTINGS) != 0)])); - - //! Settings: Block Sound Settings - Options->SetValue(Idx++, "%s", tr(OnOffText[((Settings.ParentalBlocks & BLOCK_SOUND_SETTINGS) != 0)])); - - //! Settings: Block Custom Paths - Options->SetValue(Idx++, "%s", tr(OnOffText[((Settings.ParentalBlocks & BLOCK_CUSTOMPATH_SETTINGS) != 0)])); - - //! Settings: Block Updates - Options->SetValue(Idx++, "%s", tr(OnOffText[((Settings.ParentalBlocks & BLOCK_UPDATES) != 0)])); - - //! Settings: Block Reset Settings - Options->SetValue(Idx++, "%s", tr(OnOffText[((Settings.ParentalBlocks & BLOCK_RESET_SETTINGS) != 0)])); - - //! Settings: Block Theme Downloader - Options->SetValue(Idx++, "%s", tr(OnOffText[((Settings.ParentalBlocks & BLOCK_THEME_DOWNLOADER) != 0)])); - - //! Settings: Block Theme Menu - Options->SetValue(Idx++, "%s", tr(OnOffText[((Settings.ParentalBlocks & BLOCK_THEME_MENU) != 0)])); - - //! Settings: Block Game Settings - Options->SetValue(Idx++, "%s", tr(OnOffText[((Settings.ParentalBlocks & BLOCK_GAME_SETTINGS) != 0)])); - - //! Settings: Block HBC Menu - Options->SetValue(Idx++, "%s", tr(OnOffText[((Settings.ParentalBlocks & BLOCK_HBC_MENU) != 0)])); - - //! Settings: Block Title Launcher - Options->SetValue(Idx++, "%s", tr(OnOffText[((Settings.ParentalBlocks & BLOCK_TITLE_LAUNCHER_MENU) != 0)])); - - //! Settings: Block Cover Downloads - Options->SetValue(Idx++, "%s", tr(OnOffText[((Settings.ParentalBlocks & BLOCK_COVER_DOWNLOADS) != 0)])); - - //! Settings: Block Game Install - Options->SetValue(Idx++, "%s", tr(OnOffText[((Settings.ParentalBlocks & BLOCK_GAME_INSTALL) != 0)])); - - //! Settings: Block GameID Change - Options->SetValue(Idx++, "%s", tr(OnOffText[((Settings.ParentalBlocks & BLOCK_GAMEID_CHANGE) != 0)])); -} - -int ParentalControlSM::GetMenuInternal() -{ - int ret = optionBrowser->GetClickedOption(); - - if (ret < 0) - return MENU_NONE; - - int Idx = -1; - - //! Settings: Console - if (ret == ++Idx) - { - if (!Settings.godmode) - { - //password check to unlock Install,Delete and Format - SetState(STATE_DISABLED); - int result = PasswordCheck(Settings.unlockCode); - SetState(STATE_DEFAULT); - if (result > 0) - { - if(result == 1) - WindowPrompt( tr( "Correct Password" ), tr( "All the features of USB Loader GX are unlocked." ), tr( "OK" )); - Settings.godmode = 1; - } - else if(result < 0) - WindowPrompt(tr( "Wrong Password" ), tr( "USB Loader GX is protected" ), tr( "OK" )); - } - else - { - int choice = WindowPrompt(tr( "Lock Console" ), tr( "Are you sure?" ), tr( "Yes" ), tr( "No" )); - if (choice == 1) - { - WindowPrompt(tr( "Console Locked" ), tr( "USB Loader GX is protected" ), tr( "OK" )); - Settings.godmode = 0; - } - } - } - - //! General permission check for all following - else if(!Settings.godmode) - { - WindowPrompt(tr( "Permission denied." ), tr( "Console must be unlocked for this option." ), tr( "OK" )); - } - - //! Settings: Password - else if (ret == ++Idx) - { - char entered[20]; - SetState(STATE_DISABLED); - snprintf(entered, sizeof(entered), Settings.unlockCode); - int result = OnScreenKeyboard(entered, 20, 0); - SetState(STATE_DEFAULT); - if (result == 1) - { - snprintf(Settings.unlockCode, sizeof(Settings.unlockCode), entered); - WindowPrompt(tr( "Password Changed" ), tr( "Password has been changed" ), tr( "OK" )); - } - } - - //! Settings: Controllevel - else if (ret == ++Idx) - { - if (++Settings.parentalcontrol >= 5) Settings.parentalcontrol = 0; - } - - //! Settings: Block Global Settings - else if (ret == ++Idx) - { - Settings.ParentalBlocks ^= BLOCK_GLOBAL_SETTINGS; - } - - //! Settings: Block Gui Settings - else if (ret == ++Idx) - { - Settings.ParentalBlocks ^= BLOCK_GUI_SETTINGS; - } - - //! Settings: Block Loader Settings - else if (ret == ++Idx) - { - Settings.ParentalBlocks ^= BLOCK_LOADER_SETTINGS; - } - - //! Settings: Block Parental Settings - else if (ret == ++Idx) - { - Settings.ParentalBlocks ^= BLOCK_PARENTAL_SETTINGS; - } - - //! Settings: Block Sound Settings - else if (ret == ++Idx) - { - Settings.ParentalBlocks ^= BLOCK_SOUND_SETTINGS; - } - - //! Settings: Block Custom Paths - else if (ret == ++Idx) - { - Settings.ParentalBlocks ^= BLOCK_CUSTOMPATH_SETTINGS; - } - - //! Settings: Block Updates - else if (ret == ++Idx) - { - Settings.ParentalBlocks ^= BLOCK_UPDATES; - } - - //! Settings: Block Reset Settings - else if (ret == ++Idx) - { - Settings.ParentalBlocks ^= BLOCK_RESET_SETTINGS; - } - - //! Settings: Block Theme Downloader - else if (ret == ++Idx) - { - Settings.ParentalBlocks ^= BLOCK_THEME_DOWNLOADER; - } - - //! Settings: Block Theme Menu - else if (ret == ++Idx) - { - Settings.ParentalBlocks ^= BLOCK_THEME_MENU; - } - - //! Settings: Block Game Settings - else if (ret == ++Idx) - { - Settings.ParentalBlocks ^= BLOCK_GAME_SETTINGS; - } - - //! Settings: Block HBC Menu - else if (ret == ++Idx) - { - Settings.ParentalBlocks ^= BLOCK_HBC_MENU; - } - - //! Settings: Block Title Launcher - else if (ret == ++Idx) - { - Settings.ParentalBlocks ^= BLOCK_TITLE_LAUNCHER_MENU; - } - - //! Settings: Block Cover Downloads - else if (ret == ++Idx) - { - Settings.ParentalBlocks ^= BLOCK_COVER_DOWNLOADS; - } - - //! Settings: Block Game Install - else if (ret == ++Idx) - { - Settings.ParentalBlocks ^= BLOCK_GAME_INSTALL; - } - - //! Settings: Block GameID Change - else if (ret == ++Idx) - { - Settings.ParentalBlocks ^= BLOCK_GAMEID_CHANGE; - } - - SetOptionValues(); - - return MENU_NONE; -} diff --git a/source/settings/menus/ParentalControlSM.hpp b/source/settings/menus/ParentalControlSM.hpp deleted file mode 100644 index 7a6b2487..00000000 --- a/source/settings/menus/ParentalControlSM.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#ifndef PARENTALCONTROL_MENU_HPP_ -#define PARENTALCONTROL_MENU_HPP_ - -#include "SettingsMenu.hpp" - -class ParentalControlSM : public SettingsMenu -{ - public: - ParentalControlSM(); - virtual int GetType() { return CParentalControlSM; }; - protected: - void SetOptionValues(); - int GetMenuInternal(); - - OptionList GuiOptions; -}; - - -#endif diff --git a/source/settings/menus/SettingsMenu.cpp b/source/settings/menus/SettingsMenu.cpp deleted file mode 100644 index fa7b40dc..00000000 --- a/source/settings/menus/SettingsMenu.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include -#include "SettingsMenu.hpp" -#include "themes/CTheme.h" -#include "language/gettext.h" - -SettingsMenu::SettingsMenu(const char * title, OptionList * opts, int returnTo) - : GuiWindow(screenwidth, screenheight) -{ - Options = opts; - returnToMenu = returnTo; - trigA = NULL; - trigB = NULL; - backBtnTxt = NULL; - backBtnImg = NULL; - backBtn = NULL; - btnOutline = NULL; - - //! Skipping back button if there is no menu defined to go back to - if(returnToMenu != MENU_NONE) - { - btnOutline = Resources::GetImageData("button_dialogue_box.png"); - - trigA = new GuiTrigger(); - trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - - trigB = new GuiTrigger(); - trigB->SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B); - - backBtnTxt = new GuiText(tr("Back"), 22, (GXColor){0, 0, 0, 255}); - backBtnImg = new GuiImage(btnOutline); - backBtn = new GuiButton(backBtnImg, backBtnImg, 2, 3, -180, 400, trigA, btnSoundOver, btnSoundClick2, 1); - backBtn->SetLabel(backBtnTxt); - backBtn->SetTrigger(trigB); - Append(backBtn); - } - - optionBrowser = new GuiCustomOptionBrowser(396, 280, Options, "bg_options_settings.png"); - optionBrowser->SetPosition(0, 90); - optionBrowser->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - - titleTxt = new GuiText(title, 28, (GXColor) {0, 0, 0, 255}); - titleTxt->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - titleTxt->SetPosition(0, 40); - titleTxt->SetMaxWidth(310, SCROLL_HORIZONTAL); - - Append(optionBrowser); - Append(titleTxt); - - SetEffect(EFFECT_FADE, 50); -} - -SettingsMenu::~SettingsMenu() -{ - ResumeGui(); - - SetEffect(EFFECT_FADE, -50); - while(this->GetEffect() > 0) - usleep(100); - - HaltGui(); - if(parentElement) - ((GuiWindow *) parentElement)->Remove(this); - - RemoveAll(); - - if(btnOutline) - delete btnOutline; - - if(backBtnTxt) - delete backBtnTxt; - if(backBtnImg) - delete backBtnImg; - if(backBtn) - delete backBtn; - - if(trigA) - delete trigA; - if(trigB) - delete trigB; - - delete titleTxt; - - delete optionBrowser; - - ResumeGui(); -} - -int SettingsMenu::GetClickedOption() -{ - if(!optionBrowser) - return -1; - - return optionBrowser->GetClickedOption(); -} - -int SettingsMenu::GetMenu() -{ - if(backBtn && backBtn->GetState() == STATE_CLICKED) - return returnToMenu; - - return GetMenuInternal(); -} diff --git a/source/settings/menus/SettingsMenu.hpp b/source/settings/menus/SettingsMenu.hpp deleted file mode 100644 index b23a618b..00000000 --- a/source/settings/menus/SettingsMenu.hpp +++ /dev/null @@ -1,72 +0,0 @@ - /**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#ifndef SETTINGS_MENU_HPP_ -#define SETTINGS_MENU_HPP_ - -#include "libwiigui/gui.h" -#include "libwiigui/gui_customoptionbrowser.h" -#include "menu.h" - -enum -{ - CSettingsMenu = 0, - CGUISettingsMenu, - CLoaderSettings, - CParentalControlSM, - CSoundSettingsMenu, - CCustomPathsSM, - CGameLoadSM, - CUninstallSM, -}; - -class SettingsMenu : public GuiWindow -{ - public: - SettingsMenu(const char * title, OptionList * option, int returnTo); - ~SettingsMenu(); - int GetClickedOption(); - int GetMenu(); - virtual int GetType() { return CSettingsMenu; } - protected: - virtual int GetMenuInternal() { return MENU_NONE; }; - int returnToMenu; - - GuiImageData * btnOutline; - - GuiTrigger * trigA; - GuiTrigger * trigB; - - OptionList * Options; - - GuiText * titleTxt; - GuiText * backBtnTxt; - GuiImage * backBtnImg; - GuiButton * backBtn; - - GuiCustomOptionBrowser * optionBrowser; - -}; - - -#endif diff --git a/source/settings/menus/SoundSettingsMenu.cpp b/source/settings/menus/SoundSettingsMenu.cpp deleted file mode 100644 index 99cc8906..00000000 --- a/source/settings/menus/SoundSettingsMenu.cpp +++ /dev/null @@ -1,172 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include -#include "SoundSettingsMenu.hpp" -#include "settings/CSettings.h" -#include "settings/SettingsPrompts.h" -#include "prompts/PromptWindows.h" -#include "language/gettext.h" - -static const char * GameSoundText[] = -{ - trNOOP( "Sound+Quiet" ), - trNOOP( "Sound+BGM" ), - trNOOP( "Loop Sound" ), -}; - -static const char * MusicLoopText[] = -{ - trNOOP( "Play Once" ), - trNOOP( "Loop Music" ), - trNOOP( "Random Directory Music" ), - trNOOP( "Loop Directory" ), -}; - -SoundSettingsMenu::SoundSettingsMenu() - : SettingsMenu(tr("Sound Settings"), &GuiOptions, MENU_NONE) -{ - int Idx = 0; - Options->SetName(Idx++, "%s", tr( "Backgroundmusic" )); - Options->SetName(Idx++, "%s", tr( "Music Volume" )); - Options->SetName(Idx++, "%s", tr( "SFX Volume" )); - Options->SetName(Idx++, "%s", tr( "Game Sound Mode" )); - Options->SetName(Idx++, "%s", tr( "Game Sound Volume" )); - Options->SetName(Idx++, "%s", tr( "Music Loop Mode" )); - Options->SetName(Idx++, "%s", tr( "Reset BG Music" )); - - SetOptionValues(); -} - -void SoundSettingsMenu::SetOptionValues() -{ - int Idx = 0; - - //! Settings: Backgroundmusic - const char * filename = strrchr(Settings.ogg_path, '/'); - if (filename) - Options->SetValue(Idx++, filename+1); - else - Options->SetValue(Idx++, tr( "Default" )); - - //! Settings: Music Volume - if (Settings.volume > 0) - Options->SetValue(Idx++, "%i", Settings.volume); - else - Options->SetValue(Idx++, tr( "OFF" )); - - //! Settings: SFX Volume - if (Settings.sfxvolume > 0) - Options->SetValue(Idx++, "%i", Settings.sfxvolume); - else - Options->SetValue(Idx++, tr( "OFF" )); - - //! Settings: Game Sound Mode - Options->SetValue(Idx++, "%s", tr( GameSoundText[Settings.gamesound] )); - - //! Settings: Game Sound Volume - if (Settings.gamesoundvolume > 0) - Options->SetValue(Idx++, "%i", Settings.gamesoundvolume); - else - Options->SetValue(Idx++, tr( "OFF" )); - - //! Settings: Music Loop Mode - Options->SetValue(Idx++, tr( MusicLoopText[Settings.musicloopmode] )); - - //! Settings: Reset BG Music - Options->SetValue(Idx++, " "); -} - -int SoundSettingsMenu::GetMenuInternal() -{ - int ret = optionBrowser->GetClickedOption(); - - if (ret < 0) - return MENU_NONE; - - int Idx = -1; - - //! Settings: Backgroundmusic - if (ret == ++Idx) - { - GuiWindow * parent = (GuiWindow *) parentElement; - if(parent) parent->SetState(STATE_DISABLED); - - MenuBackgroundMusic(); - - if(parent) parent->SetState(STATE_DEFAULT); - } - - //! Settings: Music Volume - else if (ret == ++Idx) - { - Settings.volume += 10; - if (Settings.volume > 100) Settings.volume = 0; - bgMusic->SetVolume(Settings.volume); - } - - //! Settings: SFX Volume - else if (ret == ++Idx) - { - Settings.sfxvolume += 10; - if (Settings.sfxvolume > 100) Settings.sfxvolume = 0; - btnSoundOver->SetVolume(Settings.sfxvolume); - btnSoundClick->SetVolume(Settings.sfxvolume); - btnSoundClick2->SetVolume(Settings.sfxvolume); - } - - //! Settings: Game Sound Mode - else if (ret == ++Idx) - { - if (++Settings.gamesound > 2) Settings.gamesound = 0; - } - - //! Settings: Game Sound Volume - else if (ret == ++Idx) - { - Settings.gamesoundvolume += 10; - if (Settings.gamesoundvolume > 100) Settings.gamesoundvolume = 0; - } - - //! Settings: Music Loop Mode - else if (ret == ++Idx) - { - if (++Settings.musicloopmode > 3) Settings.musicloopmode = 0; - bgMusic->SetLoop(Settings.musicloopmode); - } - - //! Settings: Reset BG Music - else if (ret == ++Idx) - { - int result = WindowPrompt(tr( "Reset to default BGM?" ), 0, tr( "Yes" ), tr( "No" )); - if (result) - { - bgMusic->LoadStandard(); - bgMusic->Play(); - } - } - - SetOptionValues(); - - return MENU_NONE; -} diff --git a/source/settings/menus/SoundSettingsMenu.hpp b/source/settings/menus/SoundSettingsMenu.hpp deleted file mode 100644 index 5f6bbb05..00000000 --- a/source/settings/menus/SoundSettingsMenu.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#ifndef SOUNDSETTINGS_MENU_HPP_ -#define SOUNDSETTINGS_MENU_HPP_ - -#include "SettingsMenu.hpp" - -class SoundSettingsMenu : public SettingsMenu -{ - public: - SoundSettingsMenu(); - virtual int GetType() { return CSoundSettingsMenu; }; - protected: - void SetOptionValues(); - int GetMenuInternal(); - - OptionList GuiOptions; -}; - - -#endif diff --git a/source/settings/menus/UninstallSM.cpp b/source/settings/menus/UninstallSM.cpp deleted file mode 100644 index 519d9e6e..00000000 --- a/source/settings/menus/UninstallSM.cpp +++ /dev/null @@ -1,206 +0,0 @@ - /**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include -#include "UninstallSM.hpp" -#include "FileOperations/fileops.h" -#include "settings/CSettings.h" -#include "settings/CGameSettings.h" -#include "settings/CGameStatistics.h" -#include "settings/GameTitles.h" -#include "prompts/PromptWindows.h" -#include "language/gettext.h" -#include "usbloader/wbfs.h" -#include "usbloader/GameList.h" -#include "wstring.hpp" - -extern int mountMethod; - -UninstallSM::UninstallSM(struct discHdr * header) - : SettingsMenu(tr("Uninstall Menu"), &GuiOptions, MENU_NONE) -{ - DiscHeader = header; - - int Idx = 0; - - Options->SetName(Idx++, "%s", tr( "Uninstall Game" )); - Options->SetName(Idx++, "%s", tr( "Reset Playcounter" )); - Options->SetName(Idx++, "%s", tr( "Delete Cover Artwork" )); - Options->SetName(Idx++, "%s", tr( "Delete Disc Artwork" )); - Options->SetName(Idx++, "%s", tr( "Delete Cheat TXT" )); - Options->SetName(Idx++, "%s", tr( "Delete Cheat GCT" )); - - SetOptionValues(); -} - -void UninstallSM::SetOptionValues() -{ - int Idx = 0; - - //! Settings: Uninstall Game - Options->SetValue(Idx++, " "); - - //! Settings: Reset Playcounter - Options->SetValue(Idx++, " "); - - //! Settings: Delete Cover Artwork - Options->SetValue(Idx++, " "); - - //! Settings: Delete Disc Artwork - Options->SetValue(Idx++, " "); - - //! Settings: Delete Cheat TXT - Options->SetValue(Idx++, " "); - - //! Settings: Delete Cheat GCT - Options->SetValue(Idx++, " "); -} - -int UninstallSM::GetMenuInternal() -{ - int ret = optionBrowser->GetClickedOption(); - - if (ret < 0) - return MENU_NONE; - - int Idx = -1; - - //! Settings: Uninstall Game - if (ret == ++Idx) - { - int choice = WindowPrompt(GameTitles.GetTitle(DiscHeader), tr( "What should be deleted for this game title:" ), tr( "Game Only" ), tr("Uninstall all"), tr( "Cancel" )); - if (choice == 0) - return MENU_NONE; - - char GameID[7]; - snprintf(GameID, sizeof(GameID), "%s", (char *) DiscHeader->id); - - std::string Title = GameTitles.GetTitle(DiscHeader); - GameSettings.Remove(DiscHeader->id); - GameSettings.Save(); - GameStatistics.Remove(DiscHeader->id); - GameStatistics.Save(); - int ret = 0; - if(!mountMethod) - ret = WBFS_RemoveGame(DiscHeader->id); - - if(ret >= 0) - { - wString oldFilter(gameList.GetCurrentFilter()); - gameList.ReadGameList(); - gameList.FilterList(oldFilter.c_str()); - } - - if(choice == 2) - { - char filepath[200]; - snprintf(filepath, sizeof(filepath), "%s%s.png", Settings.covers_path, GameID); - if (CheckFile(filepath)) remove(filepath); - snprintf(filepath, sizeof(filepath), "%s%s.png", Settings.covers2d_path, GameID); - if (CheckFile(filepath)) remove(filepath); - snprintf(filepath, sizeof(filepath), "%s%s.png", Settings.disc_path, GameID); - if (CheckFile(filepath)) remove(filepath); - snprintf(filepath, sizeof(filepath), "%s%s.txt", Settings.TxtCheatcodespath, GameID); - if (CheckFile(filepath)) remove(filepath); - snprintf(filepath, sizeof(filepath), "%s%s.gct", Settings.Cheatcodespath, GameID); - if (CheckFile(filepath)) remove(filepath); - } - - if (ret < 0) - WindowPrompt(tr( "Can't delete:" ), Title.c_str(), tr( "OK" )); - else - WindowPrompt(tr( "Successfully deleted:" ), Title.c_str(), tr( "OK" )); - - return MENU_DISCLIST; - } - - //! Settings: Reset Playcounter - else if (ret == ++Idx) - { - int result = WindowPrompt(tr( "Are you sure?" ), 0, tr( "Yes" ), tr( "Cancel" )); - if (result == 1) - { - GameStatistics.SetPlayCount(DiscHeader->id, 0); - GameStatistics.Save(); - } - } - - //! Settings: Delete Cover Artwork - else if (ret == ++Idx) - { - int choice = WindowPrompt(tr( "Delete" ), tr("Are you sure?"), tr( "Yes" ), tr( "No" )); - if (choice != 1) - return MENU_NONE; - - char GameID[7]; - snprintf(GameID, sizeof(GameID), "%s", (char *) DiscHeader->id); - char filepath[200]; - snprintf(filepath, sizeof(filepath), "%s%s.png", Settings.covers_path, GameID); - if (CheckFile(filepath)) remove(filepath); - snprintf(filepath, sizeof(filepath), "%s%s.png", Settings.covers2d_path, GameID); - if (CheckFile(filepath)) remove(filepath); - } - - //! Settings: Delete Disc Artwork - else if (ret == ++Idx) - { - char GameID[7]; - snprintf(GameID, sizeof(GameID), "%s", (char *) DiscHeader->id); - char filepath[200]; - snprintf(filepath, sizeof(filepath), "%s%s.png", Settings.disc_path, GameID); - - int choice = WindowPrompt(tr( "Delete" ), filepath, tr( "Yes" ), tr( "No" )); - if (choice == 1) - if (CheckFile(filepath)) remove(filepath); - } - - //! Settings: Delete Cheat TXT - else if (ret == ++Idx) - { - char GameID[7]; - snprintf(GameID, sizeof(GameID), "%s", (char *) DiscHeader->id); - char filepath[200]; - snprintf(filepath, sizeof(filepath), "%s%s.txt", Settings.TxtCheatcodespath, GameID); - - int choice = WindowPrompt(tr( "Delete" ), filepath, tr( "Yes" ), tr( "No" )); - if (choice == 1) - if (CheckFile(filepath)) remove(filepath); - } - - //! Settings: Delete Cheat GCT - else if (ret == ++Idx) - { - char GameID[7]; - snprintf(GameID, sizeof(GameID), "%s", (char *) DiscHeader->id); - char filepath[200]; - snprintf(filepath, sizeof(filepath), "%s%s.gct", Settings.Cheatcodespath, GameID); - - int choice = WindowPrompt(tr( "Delete" ), filepath, tr( "Yes" ), tr( "No" )); - if (choice == 1) - if (CheckFile(filepath)) remove(filepath); - } - - SetOptionValues(); - - return MENU_NONE; -} diff --git a/source/settings/menus/UninstallSM.hpp b/source/settings/menus/UninstallSM.hpp deleted file mode 100644 index e639f589..00000000 --- a/source/settings/menus/UninstallSM.hpp +++ /dev/null @@ -1,44 +0,0 @@ - /**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#ifndef UNINSTALL_MENU_HPP_ -#define UNINSTALL_MENU_HPP_ - -#include "SettingsMenu.hpp" - -class UninstallSM : public SettingsMenu -{ - public: - UninstallSM(struct discHdr * header); - virtual int GetType() { return CUninstallSM; }; - protected: - void SetOptionValues(); - int GetMenuInternal(); - - struct discHdr * DiscHeader; - - OptionList GuiOptions; -}; - - -#endif diff --git a/source/settings/newtitles.cpp b/source/settings/newtitles.cpp deleted file mode 100644 index 216ed1ba..00000000 --- a/source/settings/newtitles.cpp +++ /dev/null @@ -1,189 +0,0 @@ -#include -#include - -#include "CSettings.h" -#include "settings/CGameStatistics.h" -#include "newtitles.h" - -#define NEW_SECONDS (24 * 60 * 60) -#define GAMETITLES "GameTimestamps.txt" - -NewTitles *NewTitles::instance = NULL; - -NewTitles::NewTitles() -{ - firstTitle = lastTitle = NULL; - isDirty = isNewFile = false; - - // Read the text file - char path[255]; - snprintf(path, sizeof(path), Settings.titlestxt_path); - if(path[strlen(path)-1] != '/') - strcat(path, "/"); - - snprintf(path, sizeof(path), "%s%s", path, GAMETITLES); - - char line[50]; - FILE *fp = fopen(path, "rb"); - if (!fp) - { - isNewFile = true; - return; - } - - time_t currenttime = time(0); - - while (fgets(line, sizeof(line), fp)) - { - // This is one line - if (line[0] == '#' || line[0] == ';') - continue; - - Title *title = new Title(); - if (sscanf(line, "%6c:%lu", title->titleId, &title->timestamp) != 2) - { - delete title; // Invalid title entry, ignore - continue; - } - - title->next = NULL; - title->isNew = ((currenttime - title->timestamp) < NEW_SECONDS); - - if (firstTitle == NULL) - { - firstTitle = title; - lastTitle = title; - } - else - { - lastTitle->next = title; - lastTitle = title; - } - } - - fclose(fp); -} - -NewTitles::~NewTitles() -{ - Save(); - - Title *t = firstTitle; - while (t != NULL) - { - Title *temp = t->next; - delete t; - t = temp; - } - firstTitle = lastTitle = NULL; -} - -void NewTitles::CheckGame(const u8 *titleid) -{ - if (titleid == NULL || strlen((char *) titleid) == 0) - return; - - Title *t = firstTitle; - while (t != NULL) - { - // Loop all titles, search for the correct titleid - if (memcmp(titleid, t->titleId, 6) == 0) - return; // Game found, which is excellent - - t = t->next; - } - - // Not found, add it - t = new Title; - snprintf(t->titleId, sizeof(t->titleId), (char *) titleid); - t->timestamp = time(0); - t->next = NULL; - - if (isNewFile) - { - t->isNew = false; - t->timestamp -= (NEW_SECONDS + 1); // Mark all games as not new if this is a new file - } - else - { - GameStatus *Status = GameStatistics.GetGameStatus(titleid); - t->isNew = (Status == NULL || Status->PlayCount == 0); - } - - if (firstTitle == NULL) - { - firstTitle = t; - lastTitle = t; - } - else - { - lastTitle->next = t; - lastTitle = t; - } - isDirty = true; -} - -bool NewTitles::IsNew(const u8 *titleid) const -{ - if (!titleid) return false; - - Title *t = firstTitle; - - while(t != NULL) - { - // Loop all titles, search for the correct titleid - if (memcmp(titleid, t->titleId, 6) == 0) - return t->isNew; - - t = t->next; - } - - return false; -} - -void NewTitles::Remove(const u8 *titleid) -{ - if (titleid == NULL) return; - - Title *t = firstTitle, *prev = NULL; - while (t != NULL) - { - if (memcmp(titleid, t->titleId, 6) == 0) - { - if (prev == NULL) - firstTitle = t->next; - else - prev->next = t->next; - - delete t; - isDirty = true; - return; - } - prev = t; - t = t->next; - } -} - -void NewTitles::Save() -{ - if (!isDirty) return; - - char path[255]; - snprintf(path, sizeof(path), Settings.titlestxt_path); - if(path[strlen(path)-1] != '/') - strcat(path, "/"); - - snprintf(path, sizeof(path), "%s%s", path, GAMETITLES); - - FILE *fp = fopen(path, "wb"); - if (fp == NULL) - return; - - Title *t = firstTitle; - while (t != NULL && strlen(t->titleId) > 0) - { - fprintf(fp, "%s:%lu\n", t->titleId, t->timestamp); - t = t->next; - } - fclose(fp); -} diff --git a/source/settings/newtitles.h b/source/settings/newtitles.h deleted file mode 100644 index 4d769d52..00000000 --- a/source/settings/newtitles.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef _NEWTITLES_H -#define _NEWTITLES_H - -#include - -class NewTitles -{ - public: - static NewTitles *Instance() { if(!instance) instance = new NewTitles(); return instance; } - static void DestroyInstance() { delete instance; instance = NULL; } - - void Save(); - void CheckGame(const u8 *titleid); - bool IsNew(const u8 *titleid) const; - void Remove(const u8 *titleid); - private: - NewTitles(); - ~NewTitles(); - - static NewTitles *instance; - - class Title - { - public: - char titleId[7]; - time_t timestamp; - Title *next; - bool isNew; - }; - - Title *firstTitle; - Title *lastTitle; - bool isDirty; - bool isNewFile; -}; - -#endif //_NEWTITLES_H diff --git a/source/sounds/bg_music.ogg b/source/sounds/bg_music.ogg deleted file mode 100644 index a22a73ae..00000000 Binary files a/source/sounds/bg_music.ogg and /dev/null differ diff --git a/source/sounds/button_click.wav b/source/sounds/button_click.wav deleted file mode 100644 index b0578c50..00000000 Binary files a/source/sounds/button_click.wav and /dev/null differ diff --git a/source/sounds/button_click2.wav b/source/sounds/button_click2.wav deleted file mode 100644 index 011c0ada..00000000 Binary files a/source/sounds/button_click2.wav and /dev/null differ diff --git a/source/sounds/button_over.wav b/source/sounds/button_over.wav deleted file mode 100644 index 8a06f4b0..00000000 Binary files a/source/sounds/button_over.wav and /dev/null differ diff --git a/source/sounds/credits_music.ogg b/source/sounds/credits_music.ogg deleted file mode 100644 index 4010c41c..00000000 Binary files a/source/sounds/credits_music.ogg and /dev/null differ diff --git a/source/sounds/menuin.ogg b/source/sounds/menuin.ogg deleted file mode 100644 index 65ea7d73..00000000 Binary files a/source/sounds/menuin.ogg and /dev/null differ diff --git a/source/sounds/menuout.ogg b/source/sounds/menuout.ogg deleted file mode 100644 index 3d840b0e..00000000 Binary files a/source/sounds/menuout.ogg and /dev/null differ diff --git a/source/sounds/success.ogg b/source/sounds/success.ogg deleted file mode 100644 index bb3821e5..00000000 Binary files a/source/sounds/success.ogg and /dev/null differ diff --git a/source/svnrev.h b/source/svnrev.h deleted file mode 100644 index 6f1943e2..00000000 --- a/source/svnrev.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef SVNREV_H -#define SVNREV_H - -#ifdef __cplusplus -extern "C" -{ -#endif - - const char *GetRev(); - -#ifdef __cplusplus -} -#endif - -#endif /* SVNREV_H */ diff --git a/source/sys.cpp b/source/sys.cpp deleted file mode 100644 index cf495bdc..00000000 --- a/source/sys.cpp +++ /dev/null @@ -1,243 +0,0 @@ -#include -#include -#include - -#include "mload/mload.h" -#include "Controls/DeviceHandler.hpp" -#include "FileOperations/fileops.h" -#include "homebrewboot/BootHomebrew.h" -#include "settings/CSettings.h" -#include "settings/GameTitles.h" -#include "settings/newtitles.h" -#include "language/gettext.h" -#include "network/networkops.h" -#include "utils/ResourceManager.h" -#include "usbloader/playlog.h" -#include "usbloader/wbfs.h" -#include "themes/CTheme.h" -#include "SoundOperations/SoundHandler.hpp" -#include "utils/ThreadedTask.hpp" -#include "audio.h" -#include "lstub.h" -#include "menu.h" -#include "video.h" -#include "gecko.h" -#include "xml/xml.h" -#include "wad/nandtitle.h" -#include "buildtype.h" - -extern "C" -{ - extern s32 MagicPatches(s32); -} - -extern char game_partition[6]; -extern u8 load_from_fs; - -//Wiilight stuff -static vu32 *_wiilight_reg = (u32*) 0xCD0000C0; -void wiilight(int enable) // Toggle wiilight (thanks Bool for wiilight source) -{ - u32 val = (*_wiilight_reg & ~0x20); - if (enable && Settings.wiilight) val |= 0x20; - *_wiilight_reg = val; -} - -/* Variables */ -u8 shutdown = 0; -u8 reset = 0; - -void __Sys_ResetCallback(void) -{ - /* Reboot console */ - reset = 1; -} - -void __Sys_PowerCallback(void) -{ - /* Poweroff console */ - shutdown = 1; -} - -void Sys_Init(void) -{ - /* Initialize video subsytem */ - //VIDEO_Init(); - - /* Set RESET/POWER button callback */ - SYS_SetResetCallback(__Sys_ResetCallback); - SYS_SetPowerCallback(__Sys_PowerCallback); -} - -void AppCleanUp(void) -{ - static bool app_clean = false; - if(app_clean) - return; - - app_clean = true; - extern u8 mountMethod; - gprintf("Exiting main GUI. mountMethod = %d\n", mountMethod); - - Settings.Save(); - - ExitGUIThreads(); - StopGX(); - - delete btnSoundClick; - delete btnSoundOver; - delete btnSoundClick2; - delete bgMusic; - delete background; - delete bgImg; - delete mainWindow; - for (int i = 0; i < 4; i++) - delete pointer[i]; - - gettextCleanUp(); - Theme::CleanUp(); - NewTitles::DestroyInstance(); - ThreadedTask::DestroyInstance(); - SoundHandler::DestroyInstance(); - DeinitNetwork(); - GameTitles.SetDefault(); - - ShutdownAudio(); - - ResourceManager::DestroyInstance(); - - WPAD_Shutdown(); -} - -void ExitApp(void) -{ - AppCleanUp(); - WBFS_CloseAll(); - DeviceHandler::DestroyInstance(); - USB_Deinitialize(); - if(Settings.PlaylogUpdate) - Playlog_Delete(); // Don't show USB Loader GX in the Wii message board - - MagicPatches(0); -} - -void Sys_Reboot(void) -{ - /* Restart console */ - ExitApp(); - STM_RebootSystem(); -} - -#define ShutdownToDefault 0 -#define ShutdownToIdle 1 -#define ShutdownToStandby 2 - -static void _Sys_Shutdown(int SHUTDOWN_MODE) -{ - ExitApp(); - - /* Poweroff console */ - if ((CONF_GetShutdownMode() == CONF_SHUTDOWN_IDLE && SHUTDOWN_MODE != ShutdownToStandby) || SHUTDOWN_MODE - == ShutdownToIdle) - { - s32 ret; - - /* Set LED mode */ - ret = CONF_GetIdleLedMode(); - if (ret >= 0 && ret <= 2) STM_SetLedMode(ret); - - /* Shutdown to idle */ - STM_ShutdownToIdle(); - } - else - { - /* Shutdown to standby */ - STM_ShutdownToStandby(); - } -} - -void Sys_Shutdown(void) -{ - _Sys_Shutdown(ShutdownToDefault); -} - -void Sys_ShutdownToIdle(void) -{ - _Sys_Shutdown(ShutdownToIdle); -} -void Sys_ShutdownToStandby(void) -{ - _Sys_Shutdown(ShutdownToStandby); -} - -void Sys_LoadMenu(void) -{ - ExitApp(); - /* Return to the Wii system menu */ - SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0); -} - -void Sys_BackToLoader(void) -{ - ExitApp(); - - if (hbcStubAvailable()) - exit(0); - // Channel Version - SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0); -} - -#define HBC_HAXX 0x0001000148415858LL -#define HBC_JODI 0x000100014A4F4449LL -#define HBC_1_0_7 0x00010001AF1BF516LL - -void Sys_LoadHBC(void) -{ - ExitApp(); - - WII_Initialize(); - - int ret = WII_LaunchTitle(HBC_1_0_7); - if(ret < 0) - WII_LaunchTitle(HBC_JODI); - if(ret < 0) - WII_LaunchTitle(HBC_HAXX); - - //Back to system menu if all fails - SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0); -} - -bool RebootApp(void) -{ -#ifdef FULLCHANNEL - ExitApp(); - WII_Initialize(); - return !(WII_LaunchTitle(TITLE_ID(0x00010001, 0x554c4e52)) < 0); -#else - char filepath[255]; - snprintf(filepath, sizeof(filepath), "%s/boot.dol", Settings.update_path); - return !(BootHomebrew(filepath) < 0); -#endif -} - -void ScreenShot() -{ - time_t rawtime; - struct tm * timeinfo; - char buffer[150]; - char buffer2[300]; - - time(&rawtime); - timeinfo = localtime(&rawtime); - //USBLoader_GX_ScreenShot-Month_Day_Hour_Minute_Second_Year.png - strftime(buffer, 80, "USBLoader_GX_ScreenShot-%b%d%H%M%S%y.png", timeinfo); - sprintf(buffer2, "%s%s", Settings.ConfigPath, buffer); - - if(!CreateSubfolder(Settings.ConfigPath)) - { - gprintf("Can't create screenshot folder\n"); - return; - } - - TakeScreenshot(buffer2); -} diff --git a/source/sys.h b/source/sys.h deleted file mode 100644 index d8488976..00000000 --- a/source/sys.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef _SYS_H_ -#define _SYS_H_ - -void wiilight(int enable); - -/* Prototypes */ -void AppCleanUp(void); //! Deletes all allocated space for everything -void ExitApp(void); //! Like AppCleanUp() and additional device unmount -void Sys_Init(void); -void Sys_Reboot(void); -void Sys_Shutdown(void); -void Sys_ShutdownToIdle(void); -void Sys_ShutdownToStandby(void); -void Sys_LoadMenu(void); -void Sys_BackToLoader(void); -void Sys_LoadHBC(void); -bool RebootApp(void); -void ScreenShot(); - -#endif diff --git a/source/system/IosLoader.cpp b/source/system/IosLoader.cpp deleted file mode 100644 index 1c7e4240..00000000 --- a/source/system/IosLoader.cpp +++ /dev/null @@ -1,177 +0,0 @@ -#include - -#include "IosLoader.h" -#include "Controls/DeviceHandler.hpp" -#include "../usbloader/usbstorage2.h" -#include "../usbloader/disc.h" -#include "../usbloader/wbfs.h" -#include "../usbloader/wdvd.h" -#include "../wad/nandtitle.h" -#include "../mload/mload_modules.h" -#include "../settings/CSettings.h" -#include "wad/nandtitle.h" -#include "mload/mload.h" -#include "mload/modules/ehcmodule_5.h" -#include "mload/modules/dip_plugin_249.h" -#include "mload/modules/odip_frag.h" -#include "gecko.h" - - -/****************************************************************************** - * Public Methods: - ******************************************************************************/ -/* - * Check if the ios passed is a Hermes ios. - */ -bool IosLoader::IsHermesIOS(s32 ios) -{ - return (ios == 222 || ios == 223 || ios == 224 || ios == 202); -} - -/* - * Check if the ios passed is a Waninkoko ios. - */ -bool IosLoader::IsWaninkokoIOS(s32 ios) -{ - if(ios < 200 || ios > 255) - return false; - - return !IsHermesIOS(ios); -} - -/* - * Loads CIOS (If possible the one from the settings file). - * @return 0 if a cios has been successfully loaded. Else a value below 0 is returned. - */ -s32 IosLoader::LoadAppCios() -{ - u32 activeCios = IOS_GetVersion(); - s32 ret = -1; - - // We have what we need - if((int) activeCios == Settings.cios) - return 0; - - u32 ciosLoadPriority[] = { Settings.cios, 222, 249, 250 }; // Ascending. - - - for (u32 i = 0; i < (sizeof(ciosLoadPriority)/sizeof(ciosLoadPriority[0])); ++i) - { - u32 cios = ciosLoadPriority[i]; - - if (activeCios == cios) - { - ret = 0; - break; - } - - if ((ret = ReloadIosSafe(cios)) > -1) - { - // Remember working cios. - Settings.cios = cios; - break; - } - } - - return ret; -} - - -/* - * Loads a CIOS before a game start. - * @return 0 if a cios has been successfully loaded. Else a value below 0 is returned. - */ -s32 IosLoader::LoadGameCios(s32 ios) -{ - if(ios == IOS_GetVersion()) - return 0; - - s32 ret = -1; - - // Unmount fat before reloading IOS. - WBFS_CloseAll(); - WDVD_Close(); - DeviceHandler::DestroyInstance(); - - ret = ReloadIosSafe(ios); - - // Remount devices after reloading IOS. - DeviceHandler::Instance()->MountAll(); - Disc_Init(); - - return ret; -} - -/* - * Reloads a certain IOS under the condition, that an appropriate version of the IOS is installed. - * @return a negative value if a safe reload of the ios was not possible. - */ -s32 IosLoader::ReloadIosSafe(s32 ios) -{ - if(IsHermesIOS(ios)) - { - s32 iosRev = NandTitles.VersionOf(TITLE_ID(1, ios)); - if((iosRev < 4 || iosRev > 6) && iosRev != 65535) - return -11; - } - else if(IsWaninkokoIOS(ios)) - { - s32 iosRev = NandTitles.VersionOf(TITLE_ID(1, ios)); - if((iosRev < 9 || iosRev > 30) && iosRev != 65535) //let's see if Waninkoko actually gets to 30 - return -22; - } - else - { - return -33; - } - - s32 r = IOS_ReloadIOS(ios); - if (r >= 0) WII_Initialize(); - - IosLoader::LoadIOSModules(IOS_GetVersion(), IOS_GetRevision()); - - return r; -} - -/****************************************************************************** - * Private/Protected Methods: - ******************************************************************************/ -void IosLoader::LoadIOSModules(s32 ios, s32 ios_rev) -{ - //! Hermes IOS - if(IsHermesIOS(ios)) - { - const u8 * ech_module = NULL; - int ehc_module_size = 0; - const u8 * dip_plugin = NULL; - int dip_plugin_size = 0; - - ech_module = ehcmodule_5; - ehc_module_size = size_ehcmodule_5; - dip_plugin = odip_frag; - dip_plugin_size = odip_frag_size; - gprintf("Loading ehc v5 and opendip module\n"); - - // u8 *ehc_cfg = search_for_ehcmodule_cfg((u8 *) ech_module, ehc_module_size); - // if (ehc_cfg) - // { - // ehc_cfg += 12; - // ehc_cfg[0] = 0; // USB Port 0 - // gprintf("Patched ehc module to use usb port 0.\n"); - // } - load_modules(ech_module, ehc_module_size, dip_plugin, dip_plugin_size); - } - //! Waninkoko IOS - else if(IsWaninkokoIOS(ios)) - { - if(ios_rev >= 18) - { - if(mload_init() < 0) - return; - - gprintf("Loading dip module for Waninkoko's cios\n"); - mload_module((u8 *) dip_plugin_249, dip_plugin_249_size); - mload_close(); - } - } -} diff --git a/source/system/IosLoader.h b/source/system/IosLoader.h deleted file mode 100644 index b00b04ef..00000000 --- a/source/system/IosLoader.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef _IOSLOADER_H_ -#define _IOSLOADER_H_ - -#include - -class IosLoader -{ - public: - static s32 LoadAppCios(); - static s32 LoadGameCios(s32 ios); - static s32 ReloadIosSafe(s32 ios); - static bool IsHermesIOS(s32 ios = IOS_GetVersion()); - static bool IsWaninkokoIOS(s32 ios = IOS_GetVersion()); - private: - static void LoadIOSModules(s32 ios, s32 ios_rev); -}; - -#endif diff --git a/source/themes/CTheme.cpp b/source/themes/CTheme.cpp deleted file mode 100644 index 1bd5ff97..00000000 --- a/source/themes/CTheme.cpp +++ /dev/null @@ -1,196 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include -#include -#include -#include - -#include "CTheme.h" -#include "libwiigui/gui.h" -#include "settings/CSettings.h" -#include "FileOperations/fileops.h" -#include "menu/menus.h" -#include "FreeTypeGX.h" - -FreeTypeGX * fontSystem = NULL; -static FT_Byte * MainFont = NULL; -static u32 MainFontSize = 0; - -bool Theme::ShowTooltips = true; - -void Theme::Reload() -{ - HaltGui(); - mainWindow->Remove(bgImg); - for(int i = 0; i < 4; ++i) - { - char image[50]; - snprintf(image, sizeof(image), "player%i_point.png", i+1); - delete pointer[i]; - pointer[i] = Resources::GetImageData(image); - } - delete btnSoundClick; - delete btnSoundClick2; - delete btnSoundOver; - btnSoundClick = new GuiSound(Resources::GetFile("button_click.wav"), Resources::GetFileSize("button_click.wav"), Settings.sfxvolume); - btnSoundClick2 = new GuiSound(Resources::GetFile("button_click2.wav"), Resources::GetFileSize("button_click2.wav"), Settings.sfxvolume); - btnSoundOver = new GuiSound(Resources::GetFile("button_over.wav"), Resources::GetFileSize("button_over.wav"), Settings.sfxvolume); - delete background; - background = Resources::GetImageData(Settings.widescreen ? "wbackground.png" : "background.png"); - delete bgImg; - bgImg = new GuiImage(background); - mainWindow->Append(bgImg); - ResumeGui(); -} - -void Theme::CleanUp() -{ - ThemeCleanUp(); - Resources::Clear(); - ClearFontData(); -} - -void Theme::SetDefault() -{ - ShowTooltips = true; - CleanUp(); - strcpy(Settings.theme, ""); - LoadFont(""); -} - -bool Theme::Load(const char * theme_file_path) -{ - bool result = LoadTheme(theme_file_path); - if(!result) - return result; - - Theme::ShowTooltips = (thInt("1 - Enable tooltips: 0 for off and 1 for on") != 0); - - FILE * file = fopen(theme_file_path, "rb"); - if(!file) - return false; - - char line[300]; - char * Foldername = NULL; - - while (fgets(line, sizeof(line), file)) - { - char * ptr = strcasestr(line, "Image-Folder:"); - if(!ptr) - continue; - - ptr += strlen("Image-Folder:"); - - while(*ptr != '\0' && *ptr == ' ') ptr++; - - Foldername = ptr; - - while(*ptr != '\\' && *ptr != '"' && *ptr != '\0') ptr++; - - *ptr = '\0'; - break; - } - - fclose(file); - - if(!Foldername) - return result; - - char theme_path[300]; - snprintf(theme_path, sizeof(theme_path), theme_file_path); - - char * ptr = strrchr(theme_path, '/'); - if(ptr) *ptr = '\0'; - - snprintf(theme_path, sizeof(theme_path), "%s/%s", theme_path, Foldername); - if(!Resources::LoadFiles(theme_path)) - { - const char * ThemeFilename = strrchr(theme_file_path, '/')+1; - char Filename[255]; - snprintf(Filename, sizeof(Filename), ThemeFilename); - - char * fileext = strrchr(Filename, '.'); - if(fileext) *fileext = 0; - - char * ptr = strrchr(theme_path, '/'); - *ptr = 0; - snprintf(theme_path, sizeof(theme_path), "%s/%s", theme_path, Filename); - Resources::LoadFiles(theme_path); - } - - //! Override font.ttf with the theme font.ttf if it exists in the image folder - char FontPath[300]; - snprintf(FontPath, sizeof(FontPath), "%s/font.ttf", theme_path); - - if(CheckFile(FontPath)) - Theme::LoadFont(theme_path); - - return result; -} - -bool Theme::LoadFont(const char *path) -{ - char FontPath[300]; - bool result = false; - FILE *pfile = NULL; - - ClearFontData(); - - snprintf(FontPath, sizeof(FontPath), "%s/font.ttf", path); - - pfile = fopen(FontPath, "rb"); - - if (pfile) - { - fseek(pfile, 0, SEEK_END); - MainFontSize = ftell(pfile); - rewind(pfile); - - MainFont = new (std::nothrow) FT_Byte[MainFontSize]; - if (MainFont) - { - fread(MainFont, 1, MainFontSize, pfile); - result = true; - } - fclose(pfile); - } - - FT_Byte * loadedFont = MainFont ? MainFont : (FT_Byte *) Resources::GetFile("font.ttf"); - u32 loadedFontSize = MainFont ? MainFontSize : Resources::GetFileSize("font.ttf"); - - fontSystem = new FreeTypeGX(loadedFont, loadedFontSize); - - return result; -} - -void Theme::ClearFontData() -{ - if (fontSystem) - delete fontSystem; - fontSystem = NULL; - - if (MainFont) - delete [] MainFont; - MainFont = NULL; -} diff --git a/source/themes/CTheme.h b/source/themes/CTheme.h deleted file mode 100644 index 5a7304ea..00000000 --- a/source/themes/CTheme.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef _THEME_H_ -#define _THEME_H_ - -#include -#include -#include -#include "Resources.h" -#include "gettheme.h" - -class Theme -{ - public: - //!Set Default - static void SetDefault(); - //!Load - static bool Load(const char * path); - //!Load font data - static bool LoadFont(const char *path); - //!Reload the main images/sounds for the new theme - static void Reload(); - //!Clear all image/font/theme data and free the memory - static void CleanUp(); - - //!Enable tooltips: special case treaded because it is called every frame - static bool ShowTooltips; - private: - //!Clear the font data and free the memory - static void ClearFontData(); -}; - -#endif diff --git a/source/themes/Resources.cpp b/source/themes/Resources.cpp deleted file mode 100644 index d98ecfdc..00000000 --- a/source/themes/Resources.cpp +++ /dev/null @@ -1,270 +0,0 @@ -#include -#include -#include "FileOperations/fileops.h" -#include "filelist.h" -#include "Resources.h" - -RecourceFile Resources::RecourceFiles[] = -{ - {"closebutton.png", closebutton_png, closebutton_png_size, NULL, 0}, - {"gxlogo.png", gxlogo_png, gxlogo_png_size, NULL, 0}, - {"sdcard.png", sdcard_png, sdcard_png_size, NULL, 0}, - {"sdcard_over.png", sdcard_over_png, sdcard_over_png_size, NULL, 0}, - {"Wifi_btn.png", Wifi_btn_png, Wifi_btn_png_size, NULL, 0}, - {"wiimote.png", wiimote_png, wiimote_png_size, NULL, 0}, - {"gameinfo1.png", gameinfo1_png, gameinfo1_png_size, NULL, 0}, - {"gameinfo2.png", gameinfo2_png, gameinfo2_png_size, NULL, 0}, - {"gameinfo1a.png", gameinfo1a_png, gameinfo1a_png_size, NULL, 0}, - {"gameinfo2a.png", gameinfo2a_png, gameinfo2a_png_size, NULL, 0}, - {"credits_button.png", credits_button_png, credits_button_png_size, NULL, 0}, - {"credits_button_over.png", credits_button_over_png, credits_button_over_png_size, NULL, 0}, - {"tooltip_left.png", tooltip_left_png, tooltip_left_png_size, NULL, 0}, - {"tooltip_tile.png", tooltip_tile_png, tooltip_tile_png_size, NULL, 0}, - {"tooltip_right.png", tooltip_right_png, tooltip_right_png_size, NULL, 0}, - {"startgame_arrow_left.png", startgame_arrow_left_png, startgame_arrow_left_png_size, NULL, 0}, - {"startgame_arrow_right.png", startgame_arrow_right_png, startgame_arrow_right_png_size, NULL, 0}, - {"credits_bg.png", credits_bg_png, credits_bg_png_size, NULL, 0}, - {"little_star.png", little_star_png, little_star_png_size, NULL, 0}, - {"background.png", background_png, background_png_size, NULL, 0}, - {"wbackground.png", wbackground_png, wbackground_png_size, NULL, 0}, - {"bg_options_settings.png", bg_options_settings_png, bg_options_settings_png_size, NULL, 0}, - {"settings_background.png", settings_background_png, settings_background_png_size, NULL, 0}, - {"bg_browser.png", bg_browser_png, bg_browser_png_size, NULL, 0}, - {"icon_folder.png", icon_folder_png, icon_folder_png_size, NULL, 0}, - {"bg_browser_selection.png", bg_browser_selection_png, bg_browser_selection_png_size, NULL, 0}, - {"addressbar_textbox.png", addressbar_textbox_png, addressbar_textbox_png_size, NULL, 0}, - {"browser.png", browser_png, browser_png_size, NULL, 0}, - {"browser_over.png", browser_over_png, browser_over_png_size, NULL, 0}, - {"nocover.png", nocover_png, nocover_png_size, NULL, 0}, - {"nocoverFlat.png", nocoverFlat_png, nocoverFlat_png_size, NULL, 0}, - {"nodisc.png", nodisc_png, nodisc_png_size, NULL, 0}, - {"theme_dialogue_box.png", theme_dialogue_box_png, theme_dialogue_box_png_size, NULL, 0}, - {"button_install.png", button_install_png, button_install_png_size, NULL, 0}, - {"button_install_over.png", button_install_over_png, button_install_over_png_size, NULL, 0}, - {"dialogue_box_startgame.png", dialogue_box_startgame_png, dialogue_box_startgame_png_size, NULL, 0}, - {"wdialogue_box_startgame.png", wdialogue_box_startgame_png, wdialogue_box_startgame_png_size, NULL, 0}, - {"button_dialogue_box.png", button_dialogue_box_png, button_dialogue_box_png_size, NULL, 0}, - {"keyboard_textbox.png", keyboard_textbox_png, keyboard_textbox_png_size, NULL, 0}, - {"keyboard_key.png", keyboard_key_png, keyboard_key_png_size, NULL, 0}, - {"keyboard_key_over.png", keyboard_key_over_png, keyboard_key_over_png_size, NULL, 0}, - {"keyboard_mediumkey_over.png", keyboard_mediumkey_over_png, keyboard_mediumkey_over_png_size, NULL, 0}, - {"keyboard_largekey_over.png", keyboard_largekey_over_png, keyboard_largekey_over_png_size, NULL, 0}, - {"keyboard_backspace_over.png", keyboard_backspace_over_png, keyboard_backspace_over_png_size, NULL, 0}, - {"keyboard_clear_over.png", keyboard_clear_over_png, keyboard_clear_over_png_size, NULL, 0}, - {"menu_button.png", menu_button_png, menu_button_png_size, NULL, 0}, - {"menu_button_over.png", menu_button_over_png, menu_button_over_png_size, NULL, 0}, - {"settings_button.png", settings_button_png, settings_button_png_size, NULL, 0}, - {"settings_button_over.png", settings_button_over_png, settings_button_over_png_size, NULL, 0}, - {"wiimote_poweroff.png", wiimote_poweroff_png, wiimote_poweroff_png_size, NULL, 0}, - {"dialogue_box.png", dialogue_box_png, dialogue_box_png_size, NULL, 0}, - {"theme_box.png", theme_box_png, theme_box_png_size, NULL, 0}, - {"wiimote_poweroff_over.png", wiimote_poweroff_over_png, wiimote_poweroff_over_png_size, NULL, 0}, - {"bg_options.png", bg_options_png, bg_options_png_size, NULL, 0}, - {"bg_options_entry.png", bg_options_entry_png, bg_options_entry_png_size, NULL, 0}, - {"scrollbar.png", scrollbar_png, scrollbar_png_size, NULL, 0}, - {"scrollbar_arrowup.png", scrollbar_arrowup_png, scrollbar_arrowup_png_size, NULL, 0}, - {"scrollbar_arrowdown.png", scrollbar_arrowdown_png, scrollbar_arrowdown_png_size, NULL, 0}, - {"scrollbar_box.png", scrollbar_box_png, scrollbar_box_png_size, NULL, 0}, - {"progressbar.png", progressbar_png, progressbar_png_size, NULL, 0}, - {"progressbar_empty.png", progressbar_empty_png, progressbar_empty_png_size, NULL, 0}, - {"progressbar_outline.png", progressbar_outline_png, progressbar_outline_png_size, NULL, 0}, - {"player1_point.png", player1_point_png, player1_point_png_size, NULL, 0}, - {"player2_point.png", player2_point_png, player2_point_png_size, NULL, 0}, - {"player3_point.png", player3_point_png, player3_point_png_size, NULL, 0}, - {"player4_point.png", player4_point_png, player4_point_png_size, NULL, 0}, - {"rplayer1_point.png", rplayer1_point_png, rplayer1_point_png_size, NULL, 0}, - {"rplayer2_point.png", rplayer2_point_png, rplayer2_point_png_size, NULL, 0}, - {"rplayer3_point.png", rplayer3_point_png, rplayer3_point_png_size, NULL, 0}, - {"rplayer4_point.png", rplayer4_point_png, rplayer4_point_png_size, NULL, 0}, - {"battery.png", battery_png, battery_png_size, NULL, 0}, - {"battery_bar.png", battery_bar_png, battery_bar_png_size, NULL, 0}, - {"battery_white.png", battery_white_png, battery_white_png_size, NULL, 0}, - {"battery_red.png", battery_red_png, battery_red_png_size, NULL, 0}, - {"battery_bar_white.png", battery_bar_white_png, battery_bar_white_png_size, NULL, 0}, - {"battery_bar_red.png", battery_bar_red_png, battery_bar_red_png_size, NULL, 0}, - {"exit_top.png", exit_top_png, exit_top_png_size, NULL, 0}, - {"exit_top_over.png", exit_top_over_png, exit_top_over_png_size, NULL, 0}, - {"exit_bottom.png", exit_bottom_png, exit_bottom_png_size, NULL, 0}, - {"exit_bottom_over.png", exit_bottom_over_png, exit_bottom_over_png_size, NULL, 0}, - {"exit_button.png", exit_button_png, exit_button_png_size, NULL, 0}, - {"favorite.png", favorite_png, favorite_png_size, NULL, 0}, - {"not_favorite.png", not_favorite_png, not_favorite_png_size, NULL, 0}, - {"favIcon.png", favIcon_png, favIcon_png_size, NULL, 0}, - {"favIcon_gray.png", favIcon_gray_png, favIcon_gray_png_size, NULL, 0}, - {"searchIcon.png", searchIcon_png, searchIcon_png_size, NULL, 0}, - {"searchIcon_gray.png", searchIcon_gray_png, searchIcon_gray_png_size, NULL, 0}, - {"abcIcon.png", abcIcon_png, abcIcon_png_size, NULL, 0}, - {"rankIcon.png", rankIcon_png, rankIcon_png_size, NULL, 0}, - {"playCountIcon.png", playCountIcon_png, playCountIcon_png_size, NULL, 0}, - {"playersSort.png", playersSort_png, playersSort_png_size, NULL, 0}, - {"arrangeList.png", arrangeList_png, arrangeList_png_size, NULL, 0}, - {"arrangeList_gray.png", arrangeList_gray_png, arrangeList_gray_png_size, NULL, 0}, - {"arrangeGrid.png", arrangeGrid_png, arrangeGrid_png_size, NULL, 0}, - {"arrangeGrid_gray.png", arrangeGrid_gray_png, arrangeGrid_gray_png_size, NULL, 0}, - {"arrangeCarousel.png", arrangeCarousel_png, arrangeCarousel_png_size, NULL, 0}, - {"arrangeCarousel_gray.png", arrangeCarousel_gray_png, arrangeCarousel_gray_png_size, NULL, 0}, - {"settings_title.png", settings_title_png, settings_title_png_size, NULL, 0}, - {"settings_title_over.png", settings_title_over_png, settings_title_over_png_size, NULL, 0}, - {"pageindicator.png", pageindicator_png, pageindicator_png_size, NULL, 0}, - {"Wiimote1.png", Wiimote1_png, Wiimote1_png_size, NULL, 0}, - {"Wiimote2.png", Wiimote2_png, Wiimote1_png_size, NULL, 0}, - {"Wiimote4.png", Wiimote4_png, Wiimote4_png_size, NULL, 0}, - {"wifi1.png", wifi1_png, wifi1_png_size, NULL, 0}, - {"wifi2.png", wifi2_png, wifi2_png_size, NULL, 0}, - {"wifi3.png", wifi3_png, wifi3_png_size, NULL, 0}, - {"wifi4.png", wifi4_png, wifi4_png_size, NULL, 0}, - {"wifi8.png", wifi8_png, wifi8_png_size, NULL, 0}, - {"wifi12.png", wifi12_png, wifi12_png_size, NULL, 0}, - {"wifi16.png", wifi16_png, wifi16_png_size, NULL, 0}, - {"wifi32.png", wifi32_png, wifi32_png_size, NULL, 0}, - {"norating.png", norating_png, norating_png_size, NULL, 0}, - {"guitar.png", guitar_png, guitar_png_size, NULL, 0}, - {"guitarR.png", guitarR_png, guitarR_png_size, NULL, 0}, - {"microphone.png", microphone_png, microphone_png_size, NULL, 0}, - {"microphoneR.png", microphoneR_png, microphoneR_png_size, NULL, 0}, - {"gcncontroller.png", gcncontroller_png, gcncontroller_png_size, NULL, 0}, - {"gcncontrollerR.png", gcncontrollerR_png, gcncontrollerR_png_size, NULL, 0}, - {"classiccontroller.png", classiccontroller_png, classiccontroller_png_size, NULL, 0}, - {"classiccontrollerR.png", classiccontrollerR_png, classiccontrollerR_png_size, NULL, 0}, - {"nunchuk.png", nunchuk_png, nunchuk_png_size, NULL, 0}, - {"nunchukR.png", nunchukR_png, nunchukR_png_size, NULL, 0}, - {"dancepad.png", dancepad_png, dancepad_png_size, NULL, 0}, - {"dancepadR.png", dancepadR_png, dancepadR_png_size, NULL, 0}, - {"balanceboard.png", balanceboard_png, balanceboard_png_size, NULL, 0}, - {"balanceboardR.png", balanceboardR_png, balanceboardR_png_size, NULL, 0}, - {"drums.png", drums_png, drums_png_size, NULL, 0}, - {"drumsR.png", drumsR_png, drumsR_png_size, NULL, 0}, - {"motionplus.png", motionplus_png, motionplus_png_size, NULL, 0}, - {"motionplusR.png", motionplusR_png, motionplusR_png_size, NULL, 0}, - {"wheel.png", wheel_png, wheel_png_size, NULL, 0}, - {"wheelR.png", wheelR_png, wheelR_png_size, NULL, 0}, - {"zapper.png", zapper_png, zapper_png_size, NULL, 0}, - {"zapperR.png", zapperR_png, zapperR_png_size, NULL, 0}, - {"wiispeak.png", wiispeak_png, wiispeak_png_size, NULL, 0}, - {"wiispeakR.png", wiispeakR_png, wiispeakR_png_size, NULL, 0}, - {"nintendods.png", nintendods_png, nintendods_png_size, NULL, 0}, - {"nintendodsR.png", nintendodsR_png, nintendodsR_png_size, NULL, 0}, - {"esrb_ec.png", esrb_ec_png, esrb_ec_png_size, NULL, 0}, - {"esrb_e.png", esrb_e_png, esrb_e_png_size, NULL, 0}, - {"esrb_eten.png", esrb_eten_png, esrb_eten_png_size, NULL, 0}, - {"esrb_t.png", esrb_t_png, esrb_t_png_size, NULL, 0}, - {"esrb_m.png", esrb_m_png, esrb_m_png_size, NULL, 0}, - {"esrb_ao.png", esrb_ao_png, esrb_ao_png_size, NULL, 0}, - {"cero_a.png", cero_a_png, cero_a_png_size, NULL, 0}, - {"cero_b.png", cero_b_png, cero_b_png_size, NULL, 0}, - {"cero_c.png", cero_c_png, cero_c_png_size, NULL, 0}, - {"cero_d.png", cero_d_png, cero_d_png_size, NULL, 0}, - {"cero_z.png", cero_z_png, cero_z_png_size, NULL, 0}, - {"pegi_3.png", pegi_3_png, pegi_3_png_size, NULL, 0}, - {"pegi_7.png", pegi_7_png, pegi_7_png_size, NULL, 0}, - {"pegi_12.png", pegi_12_png, pegi_12_png_size, NULL, 0}, - {"pegi_16.png", pegi_16_png, pegi_16_png_size, NULL, 0}, - {"pegi_18.png", pegi_18_png, pegi_18_png_size, NULL, 0}, - {"dvd.png", dvd_png, dvd_png_size, NULL, 0}, - {"dvd_gray.png", dvd_gray_png, dvd_gray_png_size, NULL, 0}, - {"new.png", new_png, new_png_size, NULL, 0}, - {"lock.png", lock_png, lock_png_size, NULL, 0}, - {"lock_gray.png", lock_gray_png, lock_gray_png_size, NULL, 0}, - {"unlock.png", unlock_png, unlock_png_size, NULL, 0}, - {"unlock_gray.png", unlock_gray_png, unlock_gray_png_size, NULL, 0}, - {"Channel_btn.png", Channel_btn_png, Channel_btn_png_size, NULL, 0}, - {"boxBorder.png", boxBorder_png, boxBorder_png_size, NULL, 0}, - {"nocoverFull.png", nocoverFull_png, nocoverFull_png_size, NULL, 0}, - {"button_click.wav", button_click_wav, button_click_wav_size, NULL, 0}, - {"button_click2.wav", button_click2_wav, button_click2_wav_size, NULL, 0}, - {"button_over.wav", button_over_wav, button_over_wav_size, NULL, 0}, - {"bg_music.ogg", bg_music_ogg, bg_music_ogg_size, NULL, 0}, - {"credits_music.ogg", credits_music_ogg, credits_music_ogg_size, NULL, 0}, - {"menuin.ogg", menuin_ogg, menuin_ogg_size, NULL, 0}, - {"menuout.ogg", menuout_ogg, menuout_ogg_size, NULL, 0}, - {"success.ogg", success_ogg, success_ogg_size, NULL, 0}, - {"font.ttf", font_ttf, font_ttf_size, NULL, 0}, - {"clock.ttf", clock_ttf, clock_ttf_size, NULL, 0}, - {NULL, NULL, 0, NULL, 0} -}; - -void Resources::Clear() -{ - for(int i = 0; RecourceFiles[i].filename != NULL; ++i) - { - if(RecourceFiles[i].CustomFile) - { - free(RecourceFiles[i].CustomFile); - RecourceFiles[i].CustomFile = NULL; - } - - if(RecourceFiles[i].CustomFileSize != 0) - RecourceFiles[i].CustomFileSize = 0; - } -} - -bool Resources::LoadFiles(const char * path) -{ - if(!path) - return false; - - bool result = false; - Clear(); - - char fullpath[1024]; - - for(int i = 0; RecourceFiles[i].filename != NULL; ++i) - { - snprintf(fullpath, sizeof(fullpath), "%s/%s", path, RecourceFiles[i].filename); - - if(CheckFile(fullpath)) - { - u8 * buffer = NULL; - u64 filesize = 0; - - LoadFileToMem(fullpath, &buffer, &filesize); - - RecourceFiles[i].CustomFile = buffer; - RecourceFiles[i].CustomFileSize = (u32) filesize; - result = true; - } - } - - return result; -} - -const u8 * Resources::GetFile(const char * filename) -{ - for(int i = 0; RecourceFiles[i].filename != NULL; ++i) - { - if(strcasecmp(filename, RecourceFiles[i].filename) == 0) - { - return (RecourceFiles[i].CustomFile ? RecourceFiles[i].CustomFile : RecourceFiles[i].DefaultFile); - } - } - - return NULL; -} - -u32 Resources::GetFileSize(const char * filename) -{ - for(int i = 0; RecourceFiles[i].filename != NULL; ++i) - { - if(strcasecmp(filename, RecourceFiles[i].filename) == 0) - { - return (RecourceFiles[i].CustomFile ? RecourceFiles[i].CustomFileSize : RecourceFiles[i].DefaultFileSize); - } - } - - return 0; -} - -GuiImageData * Resources::GetImageData(const char * filename) -{ - for(int i = 0; RecourceFiles[i].filename != NULL; ++i) - { - if(strcasecmp(filename, RecourceFiles[i].filename) == 0) - { - const u8 * buff = RecourceFiles[i].CustomFile ? RecourceFiles[i].CustomFile : RecourceFiles[i].DefaultFile; - const u32 size = RecourceFiles[i].CustomFile ? RecourceFiles[i].CustomFileSize : RecourceFiles[i].DefaultFileSize; - return (new GuiImageData(buff, size)); - } - } - - return NULL; -} diff --git a/source/themes/Resources.h b/source/themes/Resources.h deleted file mode 100644 index 65afc944..00000000 --- a/source/themes/Resources.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef RECOURCES_H_ -#define RECOURCES_H_ - -#include "libwiigui/gui_imagedata.h" - -typedef struct _RecourceFile -{ - const char *filename; - const u8 *DefaultFile; - const u32 DefaultFileSize; - u8 *CustomFile; - u32 CustomFileSize; -} RecourceFile; - -class Resources -{ - public: - static void Clear(); - static bool LoadFiles(const char * path); - static const u8 * GetFile(const char * filename); - static u32 GetFileSize(const char * filename); - static GuiImageData * GetImageData(const char * filename); - - private: - static RecourceFile RecourceFiles[]; -}; - -#endif diff --git a/source/themes/ThemeDownloader.cpp b/source/themes/ThemeDownloader.cpp deleted file mode 100644 index a4cce52b..00000000 --- a/source/themes/ThemeDownloader.cpp +++ /dev/null @@ -1,492 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2011 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include -#include - -#include "ThemeDownloader.h" -#include "language/gettext.h" -#include "prompts/PromptWindows.h" -#include "prompts/ProgressWindow.h" -#include "FileOperations/DirList.h" -#include "network/networkops.h" -#include "themes/CTheme.h" -#include "FileOperations/fileops.h" -#include "sys.h" -#include "network/FileDownloader.h" -#include "network/http.h" -#include "menu/menus.h" -#include "ZipFile.h" -#include "utils/ShowError.h" -#include "utils/tools.h" -#include "gecko.h" - - -ThemeDownloader::ThemeDownloader() - : FlyingButtonsMenu(tr("Theme Downloader")) -{ - ThemeList = NULL; - delete MainButtonImgData; - delete MainButtonImgOverData; - - ParentMenu = MENU_SETTINGS; - - ThemeListURL = "http://wii.spiffy360.com/themes.php?xml=1&category=1&adult="; - if(Settings.godmode) - ThemeListURL += "1"; - else - ThemeListURL += "0"; - - MainButtonImgData = Resources::GetImageData("theme_box.png"); - MainButtonImgOverData = NULL; - - urlTxt = new GuiText(tr( "Themes by www.spiffy360.com" ), 22, (GXColor) {255, 255, 255, 255}); - urlTxt->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - urlTxt->SetPosition(350, 12); - Append(urlTxt); - - for(int i = 0; i < 4; ++i) - ThemePreviews[i] = NULL; - - - defaultBtnTxt = new GuiText(tr( "Default" ), 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - defaultBtnTxt->SetMaxWidth(btnOutline->GetWidth() - 30); - defaultBtnImg = new GuiImage(btnOutline); - if (Settings.wsprompt) - { - defaultBtnTxt->SetWidescreen(Settings.widescreen); - defaultBtnImg->SetWidescreen(Settings.widescreen); - } - defaultBtn = new GuiButton(btnOutline->GetWidth(), btnOutline->GetHeight()); - defaultBtn->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - defaultBtn->SetPosition(-20, 400); - defaultBtn->SetLabel(defaultBtnTxt); - defaultBtn->SetImage(defaultBtnImg); - defaultBtn->SetSoundOver(btnSoundOver); - defaultBtn->SetSoundClick(btnSoundClick2); - defaultBtn->SetTrigger(trigA); - defaultBtn->SetEffectGrow(); - Append(defaultBtn); - - backBtn->SetPosition(-205, 400); -} - -ThemeDownloader::~ThemeDownloader() -{ - HaltGui(); - for(u32 i = 0; i < MainButton.size(); ++i) - Remove(MainButton[i]); - Remove(urlTxt); - Remove(defaultBtn); - - delete urlTxt; - delete defaultBtn; - delete defaultBtnTxt; - delete defaultBtnImg; - delete ThemeList; - for(int i = 0; i < 4; ++i) - delete ThemePreviews[i]; -} - -int ThemeDownloader::Run() -{ - ThemeDownloader * Menu = new ThemeDownloader(); - mainWindow->Append(Menu); - - Menu->ShowMenu(); - - int returnMenu = MENU_NONE; - - while((returnMenu = Menu->MainLoop()) == MENU_NONE); - - delete Menu; - - return returnMenu; -} - -int ThemeDownloader::MainLoop() -{ - if(defaultBtn->GetState() == STATE_CLICKED) - { - int choice = WindowPrompt(0, tr("Do you want to load the default theme?"), tr("Yes"), tr("Cancel")); - if(choice) - { - HaltGui(); - Theme::SetDefault(); - Theme::Reload(); - ResumeGui(); - return MENU_THEMEDOWNLOADER; - } - - defaultBtn->ResetState(); - } - - return FlyingButtonsMenu::MainLoop(); -} - -void ThemeDownloader::SetMainButton(int position, const char * ButtonText, GuiImageData * imageData, GuiImageData * themeImg) -{ - if(position >= (int) MainButton.size()) - { - MainButtonImg.resize(position+1); - MainButtonImgOver.resize(position+1); - MainButtonTxt.resize(position+1); - MainButton.resize(position+1); - } - - MainButtonImg[position] = new GuiImage(imageData); - MainButtonImgOver[position] = new GuiImage(themeImg); - MainButtonImgOver[position]->SetScale(0.4); - MainButtonImgOver[position]->SetPosition(50, -45); - - MainButtonTxt[position] = new GuiText(ButtonText, 18, ( GXColor ) {0, 0, 0, 255}); - MainButtonTxt[position]->SetAlignment(ALIGN_CENTER, ALIGN_TOP); - MainButtonTxt[position]->SetPosition(0, 10); - MainButtonTxt[position]->SetMaxWidth(imageData->GetWidth() - 10, DOTTED); - - MainButton[position] = new GuiButton(imageData->GetWidth(), imageData->GetHeight()); - MainButton[position]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - MainButton[position]->SetSoundOver(btnSoundOver); - MainButton[position]->SetSoundClick(btnSoundClick); - MainButton[position]->SetImage(MainButtonImg[position]); - MainButton[position]->SetImageOver(MainButtonImg[position]); - MainButton[position]->SetIcon(MainButtonImgOver[position]); - MainButton[position]->SetLabel(MainButtonTxt[position]); - MainButton[position]->SetTrigger(trigA); - MainButton[position]->SetEffectGrow(); - - switch(position % 4) - { - case 0: - MainButton[position]->SetPosition(90, 75); - break; - case 1: - MainButton[position]->SetPosition(340, 75); - break; - case 2: - MainButton[position]->SetPosition(90, 230); - break; - case 3: - MainButton[position]->SetPosition(340, 230); - break; - default: - break; - } -} - -GuiImageData * ThemeDownloader::GetImageData(int theme) -{ - GuiImageData * ImageData = NULL; - char filepath[300]; - snprintf(filepath, sizeof(filepath), "%s/tmp/%s.jpg", Settings.theme_path, ThemeList->GetThemeTitle(theme)); - - if (!CheckFile(filepath)) - { - struct block file = downloadfile(ThemeList->GetImageLink(theme)); - char storepath[300]; - snprintf(storepath, sizeof(storepath), "%s/tmp/", Settings.theme_path); - CreateSubfolder(storepath); - if (file.data) - { - ImageData = new GuiImageData(file.data, file.size, false); - - FILE *storefile = fopen(filepath, "wb"); - if(storefile) - { - fwrite(file.data, 1, file.size, storefile); - fclose(storefile); - } - free(file.data); - } - } - else - ImageData = new GuiImageData(filepath); - - return ImageData; -} - -void ThemeDownloader::SetupMainButtons() -{ - ResumeGui(); - - if (!IsNetworkInit() && !NetworkInitPrompt()) - { - ShowError("Could not initialize network!"); - return; - } - - ShowProgress(tr("Downloading pagelist:"), "www.spiffy360.com", tr("Please wait..."), 0, 1); - - if(!CheckConnection(ThemeListURL.c_str())) - { - ShowError(tr("Connection to server timed out.")); - return; - } - - ThemeList = new Theme_List(ThemeListURL.c_str()); - - if (ThemeList->GetThemeCount() == 0) - { - WindowPrompt(tr( "No themes found on the site." ), 0, "OK"); - returnMenu = MENU_SETTINGS; - ProgressStop(); - } - - for(int i = 0; i < ThemeList->GetThemeCount(); ++i) - { - SetMainButton(i, ThemeList->GetThemeTitle(i), MainButtonImgData, NULL); - } -} - -void ThemeDownloader::AddMainButtons() -{ - HaltGui(); - for(u32 i = 0; i < MainButton.size(); ++i) - Remove(MainButton[i]); - ResumeGui(); - - int FirstItem = currentPage*4; - int n = 0; - - for(int i = FirstItem; i < (int) MainButton.size() && i < FirstItem+4; ++i) - { - delete ThemePreviews[n]; - ShowProgress(tr("Downloading image:"), 0, ThemeList->GetThemeTitle(i), n, 4); - ThemePreviews[n] = GetImageData(i); - MainButtonImgOver[i]->SetImage(ThemePreviews[n]); - n++; - } - ProgressStop(); - HaltGui(); - - FlyingButtonsMenu::AddMainButtons(); -} - -void ThemeDownloader::MainButtonClicked(int button) -{ - //! TODO: Clean me - const char * title = ThemeList->GetThemeTitle(button); - const char * author = ThemeList->GetThemeAuthor(button); - GuiImageData *thumbimageData = ThemePreviews[button % 4]; - const char *downloadlink = ThemeList->GetDownloadLink(button); - - gprintf("\nTheme_Prompt(%s ,%s, %s)", title, author, downloadlink); - bool leave = false; - int result = 0; - - GuiImageData btnOutline(Resources::GetFile("button_dialogue_box.png"), Resources::GetFileSize("button_dialogue_box.png")); - GuiImageData dialogBox(Resources::GetFile("theme_dialogue_box.png"), Resources::GetFileSize("theme_dialogue_box.png")); - - GuiImage dialogBoxImg(&dialogBox); - - GuiWindow promptWindow(dialogBox.GetWidth(), dialogBox.GetHeight()); - promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - promptWindow.SetPosition(0, -10); - - GuiTrigger trigA; - trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - GuiTrigger trigB; - trigB.SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B); - - GuiText titleTxt(tr( "Theme Title:" ), 18, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - titleTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - titleTxt.SetPosition(230, 30); - - GuiText titleTxt2(title, 18, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - titleTxt2.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - titleTxt2.SetPosition(230, 50); - titleTxt2.SetMaxWidth(dialogBox.GetWidth() - 220, WRAP); - - GuiText authorTxt(tr( "Author(s):" ), 18, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - authorTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - authorTxt.SetPosition(230, 100); - - GuiText authorTxt2(author, 18, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - authorTxt2.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - authorTxt2.SetPosition(230, 120); - authorTxt2.SetMaxWidth(dialogBox.GetWidth() - 220, DOTTED); - - GuiText downloadBtnTxt(tr( "Download" ), 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - downloadBtnTxt.SetMaxWidth(btnOutline.GetWidth() - 30); - GuiImage downloadBtnImg(&btnOutline); - if (Settings.wsprompt) - { - downloadBtnTxt.SetWidescreen(Settings.widescreen); - downloadBtnImg.SetWidescreen(Settings.widescreen); - } - GuiButton downloadBtn(&downloadBtnImg, &downloadBtnImg, ALIGN_RIGHT, ALIGN_TOP, -5, 170, &trigA, btnSoundOver, btnSoundClick2, 1); - downloadBtn.SetLabel(&downloadBtnTxt); - downloadBtn.SetScale(0.9); - - GuiText backBtnTxt(tr( "Back" ), 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - backBtnTxt.SetMaxWidth(btnOutline.GetWidth() - 30); - GuiImage backBtnImg(&btnOutline); - if (Settings.wsprompt) - { - backBtnTxt.SetWidescreen(Settings.widescreen); - backBtnImg.SetWidescreen(Settings.widescreen); - } - GuiButton backBtn(&backBtnImg, &backBtnImg, ALIGN_RIGHT, ALIGN_TOP, -5, 220, &trigA, btnSoundOver, btnSoundClick2, 1); - backBtn.SetLabel(&backBtnTxt); - backBtn.SetTrigger(&trigB); - backBtn.SetScale(0.9); - - GuiImage ThemeImage(thumbimageData); - ThemeImage.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - ThemeImage.SetPosition(20, 10); - ThemeImage.SetScale(0.8); - - promptWindow.Append(&dialogBoxImg); - promptWindow.Append(&ThemeImage); - promptWindow.Append(&titleTxt); - promptWindow.Append(&titleTxt2); - promptWindow.Append(&authorTxt); - promptWindow.Append(&authorTxt2); - promptWindow.Append(&downloadBtn); - promptWindow.Append(&backBtn); - - HaltGui(); - promptWindow.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 50); - mainWindow->SetState(STATE_DISABLED); - mainWindow->Append(&promptWindow); - mainWindow->ChangeFocus(&promptWindow); - ResumeGui(); - - while (!leave) - { - VIDEO_WaitVSync(); - - if (shutdown) - Sys_Shutdown(); - else if (reset) - Sys_Reboot(); - - if (downloadBtn.GetState() == STATE_CLICKED) - { - int choice = WindowPrompt(tr( "Do you want to download this theme?" ), title, tr( "Yes" ), tr( "Cancel" )); - if (choice) - { - result = DownloadTheme(downloadlink, title); - if (result == 2) - { - returnMenu = MENU_THEMEDOWNLOADER; - leave = true; - } - } - mainWindow->SetState(STATE_DISABLED); - promptWindow.SetState(STATE_DEFAULT); - mainWindow->ChangeFocus(&promptWindow); - downloadBtn.ResetState(); - } - - else if (backBtn.GetState() == STATE_CLICKED) - { - leave = true; - backBtn.ResetState(); - } - } - - promptWindow.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50); - while (promptWindow.GetEffect() > 0) usleep(100); - HaltGui(); - mainWindow->Remove(&promptWindow); - mainWindow->SetState(STATE_DEFAULT); - ResumeGui(); -} - -int ThemeDownloader::DownloadTheme(const char *url, const char *title) -{ - if (!url) return -1; - - if(!CreateSubfolder(Settings.theme_path)) - { - ShowError(tr("Can't create path: %s"), Settings.theme_path); - return -1; - } - - DirList oldDir(Settings.theme_path); - - char filepath[300]; - snprintf(filepath, sizeof(filepath), "%s/TempTheme.zip", Settings.theme_path); - - int ret = DownloadFileToPath(url, filepath, false); - if(ret < 1024) - { - ShowError(tr("Error when downloading file: %i"), ret); - return -2; - } - - ZipFile *zipfile = new ZipFile(filepath); - - int result = zipfile->ExtractAll(Settings.theme_path); - if(result < 0) - { - WindowPrompt(tr( "Failed to extract." ), tr( "Unsupported format, try to extract manually TempTheme.zip." ), tr( "OK" )); - return -3; - } - - std::string themeDir; - std::string Filename; - zipfile->FindFilePart(".them", Filename); - zipfile->FindFilePart("/", themeDir); - - if(!zipfile->FindFile("theme_preview.png") && themeDir.size() != 0) - { - size_t pos = themeDir.find("/"); - if(pos != std::string::npos) - { - themeDir.erase(pos); - char filepath[255]; - char newfilepath[255]; - snprintf(filepath, sizeof(filepath), "%s/tmp/%s.jpg", Settings.theme_path, title); - snprintf(newfilepath, sizeof(newfilepath), "%s/%s/theme_preview.png", Settings.theme_path, themeDir.c_str()); - CopyFile(filepath, newfilepath); - } - - } - - delete zipfile; - remove(filepath); - - int choice = WindowPrompt(tr( "Successfully extracted theme." ), tr( "Do you want to apply it now?" ), tr( "Yes" ), tr( "No" )); - if (choice == 0) - return -1; - - if(Filename.size() == 0) - { - WindowPrompt(tr( "ERROR: Can't set up theme." ), tr( "The .them file was not found in the zip." ), tr( "OK" )); - return -1; - } - - char real_themepath[1024]; - snprintf(real_themepath, sizeof(real_themepath), "%s/%s", Settings.theme_path, Filename.c_str()); - - if (Theme::Load(real_themepath)) - { - snprintf(Settings.theme, sizeof(Settings.theme), real_themepath); - Theme::Reload(); - result = 2; - } - - return result; -} diff --git a/source/themes/ThemeDownloader.h b/source/themes/ThemeDownloader.h deleted file mode 100644 index da8923a5..00000000 --- a/source/themes/ThemeDownloader.h +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2011 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#ifndef _THEME_DOWNLOADER_H_ -#define _THEME_DOWNLOADER_H_ - -#include "settings/menus/FlyingButtonsMenu.hpp" -#include "themes/Theme_List.h" - -class ThemeDownloader : public FlyingButtonsMenu -{ - public: - ThemeDownloader(); - ~ThemeDownloader(); - static int Run(); - int MainLoop(); - protected: - void CreateSettingsMenu(int index) { MainButtonClicked(index); }; - void MainButtonClicked(int button); - void AddMainButtons(); - void SetupMainButtons(); - void SetMainButton(int position, const char * ButtonText, GuiImageData * imageData, GuiImageData * imageOver); - GuiImageData * GetImageData(int theme); - int DownloadTheme(const char *url, const char *title); - - Theme_List * ThemeList; - GuiText * urlTxt; - GuiText * defaultBtnTxt; - GuiImage * defaultBtnImg; - GuiButton * defaultBtn; - GuiImageData * ThemePreviews[4]; - std::string ThemeListURL; -}; - -#endif diff --git a/source/themes/ThemeMenu.cpp b/source/themes/ThemeMenu.cpp deleted file mode 100644 index 8ea10068..00000000 --- a/source/themes/ThemeMenu.cpp +++ /dev/null @@ -1,440 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2011 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include -#include - -#include "ThemeMenu.h" -#include "language/gettext.h" -#include "prompts/PromptWindows.h" -#include "prompts/ProgressWindow.h" -#include "FileOperations/DirList.h" -#include "network/networkops.h" -#include "themes/CTheme.h" -#include "FileOperations/fileops.h" -#include "sys.h" -#include "menu/menus.h" -#include "utils/ShowError.h" -#include "utils/tools.h" -#include "gecko.h" - - -ThemeMenu::ThemeMenu() - : FlyingButtonsMenu(tr("Theme Menu")) -{ - delete MainButtonImgData; - delete MainButtonImgOverData; - - MainButtonImgData = Resources::GetImageData("theme_box.png"); - MainButtonImgOverData = NULL; - - ParentMenu = MENU_SETTINGS; - - for(int i = 0; i < 4; ++i) - ThemePreviews[i] = NULL; - - defaultBtnTxt = new GuiText(tr( "Default" ), 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - defaultBtnTxt->SetMaxWidth(btnOutline->GetWidth() - 30); - defaultBtnImg = new GuiImage(btnOutline); - if (Settings.wsprompt) - { - defaultBtnTxt->SetWidescreen(Settings.widescreen); - defaultBtnImg->SetWidescreen(Settings.widescreen); - } - defaultBtn = new GuiButton(btnOutline->GetWidth(), btnOutline->GetHeight()); - defaultBtn->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - defaultBtn->SetPosition(-20, 400); - defaultBtn->SetLabel(defaultBtnTxt); - defaultBtn->SetImage(defaultBtnImg); - defaultBtn->SetSoundOver(btnSoundOver); - defaultBtn->SetSoundClick(btnSoundClick2); - defaultBtn->SetTrigger(trigA); - defaultBtn->SetEffectGrow(); - Append(defaultBtn); - - backBtn->SetPosition(-205, 400); -} - -ThemeMenu::~ThemeMenu() -{ - HaltGui(); - for(u32 i = 0; i < MainButton.size(); ++i) - Remove(MainButton[i]); - Remove(defaultBtn); - - delete defaultBtn; - delete defaultBtnTxt; - delete defaultBtnImg; - for(int i = 0; i < 4; ++i) - delete ThemePreviews[i]; -} - -int ThemeMenu::Run() -{ - ThemeMenu * Menu = new ThemeMenu(); - mainWindow->Append(Menu); - - Menu->ShowMenu(); - - int returnMenu = MENU_NONE; - - while((returnMenu = Menu->MainLoop()) == MENU_NONE); - - delete Menu; - - return returnMenu; -} - -int ThemeMenu::MainLoop() -{ - if(defaultBtn->GetState() == STATE_CLICKED) - { - int choice = WindowPrompt(0, tr("Do you want to load the default theme?"), tr("Yes"), tr("Cancel")); - if(choice) - { - HaltGui(); - Theme::SetDefault(); - Theme::Reload(); - ResumeGui(); - return MENU_THEMEMENU; - } - - defaultBtn->ResetState(); - } - - return FlyingButtonsMenu::MainLoop(); -} - -void ThemeMenu::SetMainButton(int position, const char * ButtonText, GuiImageData * imageData, GuiImageData * themeImg) -{ - if(position >= (int) MainButton.size()) - { - MainButtonImg.resize(position+1); - MainButtonImgOver.resize(position+1); - MainButtonTxt.resize(position+1); - MainButton.resize(position+1); - } - - MainButtonImg[position] = new GuiImage(imageData); - MainButtonImgOver[position] = new GuiImage(themeImg); - MainButtonImgOver[position]->SetScale(0.4); - MainButtonImgOver[position]->SetPosition(50, -45); - - MainButtonTxt[position] = new GuiText(ButtonText, 18, ( GXColor ) {0, 0, 0, 255}); - MainButtonTxt[position]->SetAlignment(ALIGN_CENTER, ALIGN_TOP); - MainButtonTxt[position]->SetPosition(0, 10); - MainButtonTxt[position]->SetMaxWidth(imageData->GetWidth() - 10, DOTTED); - - MainButton[position] = new GuiButton(imageData->GetWidth(), imageData->GetHeight()); - MainButton[position]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); - MainButton[position]->SetSoundOver(btnSoundOver); - MainButton[position]->SetSoundClick(btnSoundClick); - MainButton[position]->SetImage(MainButtonImg[position]); - MainButton[position]->SetImageOver(MainButtonImg[position]); - MainButton[position]->SetIcon(MainButtonImgOver[position]); - MainButton[position]->SetLabel(MainButtonTxt[position]); - MainButton[position]->SetTrigger(trigA); - MainButton[position]->SetEffectGrow(); - - switch(position % 4) - { - case 0: - MainButton[position]->SetPosition(90, 75); - break; - case 1: - MainButton[position]->SetPosition(340, 75); - break; - case 2: - MainButton[position]->SetPosition(90, 230); - break; - case 3: - MainButton[position]->SetPosition(340, 230); - break; - default: - break; - } -} - -GuiImageData * ThemeMenu::GetImageData(int theme) -{ - char filepath[300]; - snprintf(filepath, sizeof(filepath), "%stheme_preview.png", ThemeList[theme].ImageFolder.c_str()); - - return (new GuiImageData(filepath)); -} - -void ThemeMenu::SetupMainButtons() -{ - ThemeList.clear(); - - DirList ThemeDir(Settings.theme_path, ".them", DirList::Files); - if (ThemeDir.GetFilecount() == 0) - { - WindowPrompt(tr( "No themes found." ), 0, "OK"); - } - - for(int i = 0; i < ThemeDir.GetFilecount(); ++i) - { - u8 *buffer = NULL; - u64 filesize; - gprintf("%i %s\n", i, ThemeDir.GetFilepath(i)); - LoadFileToMem(ThemeDir.GetFilepath(i), &buffer, &filesize); - - if(!buffer) continue; - - buffer[filesize-1] = '\0'; - - int size = ThemeList.size(); - ThemeList.resize(size+1); - - ThemeList[size].Filepath = ThemeDir.GetFilepath(i); - GetNodeText(buffer, "Theme-Title:", ThemeList[size].Title); - GetNodeText(buffer, "Theme-Team:", ThemeList[size].Team); - GetNodeText(buffer, "Theme-Version:", ThemeList[size].Version); - GetNodeText(buffer, "Image-Folder:", ThemeList[size].ImageFolder); - - if(ThemeList[size].Title.size() == 0 && ThemeDir.GetFilename(i)) - { - ThemeList[size].Title = ThemeDir.GetFilename(i); - size_t pos = ThemeList[size].Title.rfind('.'); - if(pos != std::string::npos) - ThemeList[size].Title.erase(pos); - } - - if(ThemeList[size].ImageFolder.size() == 0) - { - ThemeList[size].ImageFolder = ThemeDir.GetFilepath(i); - size_t pos = ThemeList[size].ImageFolder.rfind('.'); - if(pos != std::string::npos) - ThemeList[size].ImageFolder.erase(pos); - ThemeList[size].ImageFolder += '/'; - } - else - { - std::string tempString = ThemeList[size].ImageFolder; - ThemeList[size].ImageFolder = Settings.theme_path; - ThemeList[size].ImageFolder += tempString; - ThemeList[size].ImageFolder += '/'; - } - - SetMainButton(size, ThemeList[size].Title.c_str(), MainButtonImgData, NULL); - - free(buffer); - } -} - -bool ThemeMenu::GetNodeText(const u8 *buffer, const char *node, std::string &outtext) -{ - const char * nodeText = strcasestr((const char *) buffer, node); - if(!nodeText) - return false; - - nodeText += strlen(node); - - while(*nodeText == ' ') nodeText++; - - while(*nodeText != '\0' && *nodeText != '\\' && *nodeText != '\n' && *nodeText != '"') - { - outtext.push_back(*nodeText); - nodeText++; - } - - return true; -} - -void ThemeMenu::AddMainButtons() -{ - HaltGui(); - for(u32 i = 0; i < MainButton.size(); ++i) - Remove(MainButton[i]); - - int FirstItem = currentPage*4; - int n = 0; - - for(int i = FirstItem; i < (int) MainButton.size() && i < FirstItem+4; ++i) - { - delete ThemePreviews[n]; - ThemePreviews[n] = GetImageData(i); - MainButtonImgOver[i]->SetImage(ThemePreviews[n]); - n++; - } - - FlyingButtonsMenu::AddMainButtons(); -} - -void ThemeMenu::MainButtonClicked(int button) -{ - //! TODO: Clean me - const char * title = ThemeList[button].Title.c_str(); - const char * author = ThemeList[button].Team.c_str(); - const char * version = ThemeList[button].Version.c_str(); - GuiImageData *thumbimageData = ThemePreviews[button % 4]; - - gprintf("\nTheme_Prompt(%s ,%s)", title, author); - bool leave = false; - - GuiImageData btnOutline(Resources::GetFile("button_dialogue_box.png"), Resources::GetFileSize("button_dialogue_box.png")); - GuiImageData dialogBox(Resources::GetFile("theme_dialogue_box.png"), Resources::GetFileSize("theme_dialogue_box.png")); - - GuiImage dialogBoxImg(&dialogBox); - - GuiWindow promptWindow(dialogBox.GetWidth(), dialogBox.GetHeight()); - promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - promptWindow.SetPosition(0, -10); - - GuiTrigger trigA; - trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - GuiTrigger trigB; - trigB.SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B); - - int PositionY = 30; - - GuiText titleTxt(tr( "Theme Title:" ), 18, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - titleTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - titleTxt.SetPosition(230, PositionY); - PositionY += 20; - - GuiText titleTxt2(title, 18, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - titleTxt2.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - titleTxt2.SetPosition(230, PositionY); - titleTxt2.SetMaxWidth(dialogBox.GetWidth() - 220, WRAP); - - if(titleTxt2.GetTextWidth() >= dialogBox.GetWidth() - 220) - PositionY += 50; - else - PositionY += 30; - - GuiText authorTxt(tr( "Author(s):" ), 18, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - authorTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - authorTxt.SetPosition(230, PositionY); - PositionY += 20; - - GuiText authorTxt2(author, 18, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - authorTxt2.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - authorTxt2.SetPosition(230, PositionY); - authorTxt2.SetMaxWidth(dialogBox.GetWidth() - 220, DOTTED); - - if(authorTxt2.GetTextWidth() >= dialogBox.GetWidth() - 220) - PositionY += 50; - else - PositionY += 30; - - GuiText versionTxt(tr( "Version:" ), 18, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - versionTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - versionTxt.SetPosition(230, PositionY); - - GuiText versionTxt2(version, 18, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - versionTxt2.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - versionTxt2.SetPosition(235+versionTxt.GetTextWidth(), PositionY); - versionTxt2.SetMaxWidth(dialogBox.GetWidth() - 220, DOTTED); - - GuiText applyBtnTxt(tr( "Apply" ), 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - applyBtnTxt.SetMaxWidth(btnOutline.GetWidth() - 30); - GuiImage applyBtnImg(&btnOutline); - if (Settings.wsprompt) - { - applyBtnTxt.SetWidescreen(Settings.widescreen); - applyBtnImg.SetWidescreen(Settings.widescreen); - } - GuiButton applyBtn(&applyBtnImg, &applyBtnImg, ALIGN_RIGHT, ALIGN_TOP, -5, 170, &trigA, btnSoundOver, btnSoundClick2, 1); - applyBtn.SetLabel(&applyBtnTxt); - applyBtn.SetScale(0.9); - - GuiText backBtnTxt(tr( "Back" ), 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - backBtnTxt.SetMaxWidth(btnOutline.GetWidth() - 30); - GuiImage backBtnImg(&btnOutline); - if (Settings.wsprompt) - { - backBtnTxt.SetWidescreen(Settings.widescreen); - backBtnImg.SetWidescreen(Settings.widescreen); - } - GuiButton backBtn(&backBtnImg, &backBtnImg, ALIGN_RIGHT, ALIGN_TOP, -5, 220, &trigA, btnSoundOver, btnSoundClick2, 1); - backBtn.SetLabel(&backBtnTxt); - backBtn.SetTrigger(&trigB); - backBtn.SetScale(0.9); - - GuiImage ThemeImage(thumbimageData); - ThemeImage.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - ThemeImage.SetPosition(20, 10); - ThemeImage.SetScale(0.8); - - promptWindow.Append(&dialogBoxImg); - promptWindow.Append(&ThemeImage); - promptWindow.Append(&titleTxt); - promptWindow.Append(&titleTxt2); - promptWindow.Append(&authorTxt); - promptWindow.Append(&authorTxt2); - promptWindow.Append(&versionTxt); - promptWindow.Append(&versionTxt2); - promptWindow.Append(&applyBtn); - promptWindow.Append(&backBtn); - - HaltGui(); - promptWindow.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 50); - mainWindow->SetState(STATE_DISABLED); - mainWindow->Append(&promptWindow); - mainWindow->ChangeFocus(&promptWindow); - ResumeGui(); - - while (!leave) - { - usleep(100); - - if (shutdown) - Sys_Shutdown(); - else if (reset) - Sys_Reboot(); - - if (applyBtn.GetState() == STATE_CLICKED) - { - int choice = WindowPrompt(tr( "Do you want to apply this theme?" ), title, tr( "Yes" ), tr( "Cancel" )); - if (choice) - { - if (Theme::Load(ThemeList[button].Filepath.c_str())) - { - snprintf(Settings.theme, sizeof(Settings.theme), ThemeList[button].Filepath.c_str()); - Theme::Reload(); - returnMenu = MENU_THEMEMENU; - leave = true; - } - } - mainWindow->SetState(STATE_DISABLED); - promptWindow.SetState(STATE_DEFAULT); - mainWindow->ChangeFocus(&promptWindow); - applyBtn.ResetState(); - } - - else if (backBtn.GetState() == STATE_CLICKED) - { - leave = true; - backBtn.ResetState(); - } - } - - promptWindow.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50); - while (promptWindow.GetEffect() > 0) usleep(100); - HaltGui(); - mainWindow->Remove(&promptWindow); - mainWindow->SetState(STATE_DEFAULT); - ResumeGui(); -} diff --git a/source/themes/ThemeMenu.h b/source/themes/ThemeMenu.h deleted file mode 100644 index 12089d7e..00000000 --- a/source/themes/ThemeMenu.h +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2011 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#ifndef _THEME_MENU_H_ -#define _THEME_MENU_H_ - -#include -#include -#include "settings/menus/FlyingButtonsMenu.hpp" -#include "FileOperations/DirList.h" -#include "themes/Theme_List.h" - -class ThemeMenu : public FlyingButtonsMenu -{ - public: - ThemeMenu(); - ~ThemeMenu(); - static int Run(); - int MainLoop(); - protected: - void CreateSettingsMenu(int index) { MainButtonClicked(index); }; - void MainButtonClicked(int button); - void AddMainButtons(); - void SetupMainButtons(); - void SetMainButton(int position, const char * ButtonText, GuiImageData * imageData, GuiImageData * imageOver); - GuiImageData * GetImageData(int theme); - bool GetNodeText(const u8 *buffer, const char *node, std::string &outtext); - - struct ThemeInfoStruct - { - std::string Filepath; - std::string Title; - std::string Team; - std::string Version; - std::string ImageFolder; - }; - std::vector ThemeList; - GuiText * defaultBtnTxt; - GuiImage * defaultBtnImg; - GuiButton * defaultBtn; - GuiImageData * ThemePreviews[4]; -}; - -#endif diff --git a/source/themes/Theme_List.cpp b/source/themes/Theme_List.cpp deleted file mode 100644 index fa9423cf..00000000 --- a/source/themes/Theme_List.cpp +++ /dev/null @@ -1,138 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2009 - * by USB Loader GX Team - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * Theme_List Class - * for the USB Loader GX - ***************************************************************************/ -#include -#include -#include -#include - -#include "Theme_List.h" -#include "xml/xml.h" - -Theme_List::Theme_List(const char * url) -{ - if (!IsNetworkInit()) - return; - - struct block file = downloadfile(url); - - if (!file.data) - return; - - ParseXML(file.data); - - free(file.data); -} - -Theme_List::~Theme_List() -{ -} - -bool Theme_List::ParseXML(const u8 * xmlfile) -{ - char element_text[1024]; - memset(element_text, 0, sizeof(element_text)); - mxml_node_t *nodetree = NULL; - mxml_node_t *nodedata = NULL; - mxml_node_t *nodeid = NULL; - mxml_index_t *nodeindex = NULL; - - nodetree = mxmlLoadString(NULL, (const char *) xmlfile, MXML_OPAQUE_CALLBACK); - - if (nodetree == NULL) - return false; - - nodedata = mxmlFindElement(nodetree, nodetree, "themes", NULL, NULL, MXML_DESCEND); - if (nodedata == NULL) - return false; - - nodeindex = mxmlIndexNew(nodedata, "name", NULL); - nodeid = mxmlIndexReset(nodeindex); - - while((nodeid = mxmlIndexFind(nodeindex, "name", NULL)) != NULL) - { - int i = ThemesList.size(); - ThemesList.resize(i+1); - - element_text[0] = '\0'; - get_nodetext(nodeid, element_text, sizeof(element_text)); - ThemesList[i].themetitle = element_text; - - element_text[0] = '\0'; - GetTextFromNode(nodeid, nodedata, (char *) "creator", NULL, NULL, MXML_NO_DESCEND, element_text, sizeof(element_text)); - ThemesList[i].author = element_text; - - element_text[0] = '\0'; - GetTextFromNode(nodeid, nodedata, (char *) "thumbpath", NULL, NULL, MXML_NO_DESCEND, element_text, sizeof(element_text)); - ThemesList[i].imagelink = element_text; - - element_text[0] = '\0'; - GetTextFromNode(nodeid, nodedata, (char *) "downloadpath", NULL, NULL, MXML_NO_DESCEND, element_text, sizeof(element_text)); - ThemesList[i].downloadlink = element_text; - - element_text[0] = '\0'; - GetTextFromNode(nodeid, nodedata, (char *) "averagerating", NULL, NULL, MXML_NO_DESCEND, element_text, sizeof(element_text)); - ThemesList[i].rating = atoi(element_text); - } - - mxmlIndexDelete(nodeindex); - mxmlDelete(nodedata); - mxmlDelete(nodetree); - - return true; -} - -const char * Theme_List::GetThemeTitle(int ind) const -{ - if (ind < 0 || ind >= (int) ThemesList.size()) - return NULL; - - else return ThemesList[ind].themetitle.c_str(); -} - -const char * Theme_List::GetThemeAuthor(int ind) const -{ - if (ind < 0 || ind >= (int) ThemesList.size()) - return NULL; - - return ThemesList[ind].author.c_str(); -} - -const char * Theme_List::GetImageLink(int ind) const -{ - if (ind < 0 || ind >= (int) ThemesList.size()) - return NULL; - - return ThemesList[ind].imagelink.c_str(); -} - -const char * Theme_List::GetDownloadLink(int ind) const -{ - if (ind < 0 || ind >= (int) ThemesList.size()) - return NULL; - - return ThemesList[ind].downloadlink.c_str(); -} diff --git a/source/themes/Theme_List.h b/source/themes/Theme_List.h deleted file mode 100644 index 6b565417..00000000 --- a/source/themes/Theme_List.h +++ /dev/null @@ -1,51 +0,0 @@ -/**************************************************************************** - * Theme_List Class - * for USB Loader GX - * by dimok - ***************************************************************************/ -#ifndef ___THEMELIST_H_ -#define ___THEMELIST_H_ - -#include -#include -#include "network/networkops.h" -#include "network/http.h" - -typedef struct _theme_info -{ - std::string themetitle; - std::string author; - std::string imagelink; - std::string downloadlink; - u8 rating; -} Theme_Info; - -class Theme_List -{ - public: - //!Constructor - //!\param url from where to get the list of links - Theme_List(const char *url); - //!Destructor - ~Theme_List(); - //! Get the a theme title - //!\param list index - const char * GetThemeTitle(int index) const; - //! Get the author of the theme - //!\param list index - const char * GetThemeAuthor(int index) const; - //! Get the author of the theme - //!\param list index - const char * GetImageLink(int index) const; - //! Get the download link of the theme - //!\param list index - const char * GetDownloadLink(int index) const; - //! Get the number of links counted - int GetThemeCount() const { return ThemesList.size(); }; - protected: - //!Get Themes into a struct from the XML file amount - bool ParseXML(const u8 * xmlfile); - std::vector ThemesList; -}; - -#endif diff --git a/source/themes/gettheme.c b/source/themes/gettheme.c deleted file mode 100644 index 2fe870a6..00000000 --- a/source/themes/gettheme.c +++ /dev/null @@ -1,273 +0,0 @@ -#include -#include -#include -#include -#include - -enum -{ - ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTRE, ALIGN_TOP, ALIGN_BOTTOM, ALIGN_MIDDLE -}; - -typedef struct _MSG -{ - u32 id; - char* msgstr; - struct _MSG *next; -} MSG; -static MSG *baseMSG=0; - - -#define HASHWORDBITS 32 - -/* Defines the so called `hashpjw' function by P.J. Weinberger - [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, - 1986, 1987 Bell Telephone Laboratories, Inc.] */ -static inline u32 hash_string (const char *str_param) -{ - u32 hval, g; - const char *str = str_param; - - /* Compute the hash value for the given string. */ - hval = 0; - while (*str != '\0') - { - hval <<= 4; - hval += (u8) *str++; - g = hval & ((u32) 0xf << (HASHWORDBITS - 4)); - if (g != 0) - { - hval ^= g >> (HASHWORDBITS - 8); - hval ^= g; - } - } - return hval; -} - - -static MSG *findMSG(u32 id) -{ - MSG *msg; - for(msg=baseMSG; msg; msg=msg->next) - { - if(msg->id == id) - return msg; - } - return NULL; -} - -static MSG *setMSG(const char *msgid, const char *msgstr) -{ - u32 id = hash_string(msgid); - MSG *msg = findMSG(id); - if(!msg) - { - msg = (MSG *)malloc(sizeof(MSG)); - msg->id = id; - msg->msgstr = NULL; - msg->next = baseMSG; - baseMSG = msg; - } - if(msg) - { - if(msgstr) - { - if(msg->msgstr) free(msg->msgstr); - msg->msgstr = strdup(msgstr); - } - return msg; - } - return NULL; -} - -static inline void ClearPrefixes(char * msg) -{ - if(!msg) - return; - - const char * ptr = msg; - - int i = 0; - - while(ptr[0] != '\0') - { - if(ptr[0] == '\\' && (ptr[1] == '\\' || ptr[1] == '"')) - { - ++ptr; - } - - msg[i] = ptr[0]; - - ++i; - ++ptr; - } - - msg[i] = '\0'; -} - -void ThemeCleanUp(void) -{ - while(baseMSG) - { - MSG *nextMsg =baseMSG->next; - free(baseMSG->msgstr); - free(baseMSG); - baseMSG = nextMsg; - } -} - -bool LoadTheme(const char* themeFile) -{ - FILE *f; - char line[200]; - char *lastID=NULL; - - ThemeCleanUp(); - f = fopen(themeFile, "r"); - if(!f) - return false; - - while (fgets(line, sizeof(line), f)) - { - // lines starting with # are comments - if (line[0] == '#') - continue; - else if (strncmp(line, "msgid \"", 7) == 0) - { - char *msgid, *end; - if(lastID) { free(lastID); lastID=NULL;} - msgid = &line[7]; - end = strrchr(msgid, '"'); - if(end && end-msgid>1) - { - *end = 0; - ClearPrefixes(msgid); - lastID = strdup(msgid); - } - } - else if (strncmp(line, "msgstr \"", 8) == 0) - { - char *msgstr, *end; - - if(lastID == NULL) - continue; - - msgstr = &line[8]; - end = strrchr(msgstr, '"'); - if(end && end-msgstr>1) - { - *end = 0; - ClearPrefixes(msgstr); - setMSG(lastID, msgstr); - } - free(lastID); - lastID=NULL; - } - } - - fclose(f); - return true; -} - -int getThemeInt(const char *msgid) -{ - MSG *msg = findMSG(hash_string(msgid)); - if(msg) return atoi(msg->msgstr); - return atoi(msgid); -} - -int getThemeAlignment(const char *msgid) -{ - MSG *msg = findMSG(hash_string(msgid)); - - const char * string = msgid; - if(msg) - string = msg->msgstr; - - while(*string == ' ') string++; - - if(strncasecmp(string, "left", strlen("left")) == 0) - return ALIGN_LEFT; - - else if(strncasecmp(string, "right", strlen("right")) == 0) - return ALIGN_RIGHT; - - else if(strncasecmp(string, "center", strlen("center")) == 0) - return ALIGN_CENTRE; - - else if(strncasecmp(string, "top", strlen("top")) == 0) - return ALIGN_TOP; - - else if(strncasecmp(string, "bottom", strlen("bottom")) == 0) - return ALIGN_BOTTOM; - - else if(strncasecmp(string, "middle", strlen("middle")) == 0) - return ALIGN_MIDDLE; - - return -1; -} - -GXColor getThemeColor(const char *msgid) -{ - MSG *msg = findMSG(hash_string(msgid)); - - const char * string = msgid; - if(msg) - string = msg->msgstr; - - GXColor color = (GXColor) {0, 0, 0, 0}; - - while(*string == ' ') string++; - - while(*string != '\0') - { - if(*string == 'r') - { - string++; - while(*string == ' ' || *string == '=' || *string == ',') string++; - - if(*string == '\0') - break; - - color.r = atoi(string) & 0xFF; - } - else if(*string == 'g') - { - string++; - while(*string == ' ' || *string == '=' || *string == ',') string++; - - if(*string == '\0') - break; - - color.g = atoi(string) & 0xFF; - } - else if(*string == 'b') - { - string++; - while(*string == ' ' || *string == '=' || *string == ',') string++; - - if(*string == '\0') - break; - - color.b = atoi(string) & 0xFF; - } - else if(*string == 'a') - { - string++; - while(*string == ' ' || *string == '=' || *string == ',') string++; - - if(*string == '\0') - break; - - color.a = atoi(string) & 0xFF; - } - else if(*string == '-') - { - break; - } - - ++string; - } - - return color; -} diff --git a/source/themes/gettheme.h b/source/themes/gettheme.h deleted file mode 100644 index ada1154b..00000000 --- a/source/themes/gettheme.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef GETTHEME_H_ -#define GETTHEME_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -int getThemeInt(const char *msgid); -int getThemeAlignment(const char *msgid); -GXColor getThemeColor(const char *msgid); -bool LoadTheme(const char* themeFile); -void ThemeCleanUp(void); - -#define thInt(s) getThemeInt(s) -#define thAlign(s) getThemeAlignment(s) -#define thColor(s) getThemeColor(s) - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/usbloader/AlternateDOLOffsets.cpp b/source/usbloader/AlternateDOLOffsets.cpp deleted file mode 100644 index c8cccfd1..00000000 --- a/source/usbloader/AlternateDOLOffsets.cpp +++ /dev/null @@ -1,240 +0,0 @@ -#include "prompts/PromptWindows.h" -#include "language/gettext.h" -#include "gecko.h" - -static int defaultDolSelected = 0; - -void defaultDolPrompt(const char *gameid) -{ - char id[7]; - snprintf(id, sizeof(id), gameid); - defaultDolSelected = 0; - - //Metroid Prime Trilogy - if (strcmp(id, "R3ME01") == 0) - { - int choice = WindowPrompt(tr( "Select a DOL" ), 0, "Metroid Prime", "Metroid Prime 2", "Metroid Prime 3", tr("Pick from a list")); - if(choice == 1) - defaultDolSelected = 780; - - else if(choice == 2) - defaultDolSelected = 781; - - else if(choice == 3) - defaultDolSelected = 782; - } - //Metroid Prime Trilogy - else if (strcmp(id, "R3MP01") == 0) - { - int choice = WindowPrompt(tr( "Select a DOL" ), 0, "Metroid Prime", "Metroid Prime 2", "Metroid Prime 3", tr("Pick from a list")); - if(choice == 1) - defaultDolSelected = 782; - - else if(choice == 2) - defaultDolSelected = 783; - - else if(choice == 3) - defaultDolSelected = 784; - } -} - -int defaultAltDol(const char *gameid) -{ - //! If one dol was selected in the defaultDolPrompt on game start - //! return that dol offset - if(defaultDolSelected) - return defaultDolSelected; - - char id[7]; - snprintf(id, sizeof(id), gameid); - - //Boogie - if (strcmp(id, "RBOP69") == 0) return 675;//previous value was 657 - if (strcmp(id, "RBOE69") == 0) return 675;//starstremr - - //Fifa 08 - if (strcmp(id, "RF8E69") == 0) return 439;//from isostar - if (strcmp(id, "RF8P69") == 0) return 463;//from isostar - if (strcmp(id, "RF8X69") == 0) return 464;//from isostar - - //Madden NFL07 - if (strcmp(id, "RMDP69") == 0) return 39;//from isostar - - //Madden NFL08 - if (strcmp(id, "RNFP69") == 0) return 1079;//from isostar - - //Medal of Honor: Heroes 2 - if (strcmp(id, "RM2X69") == 0) return 601;//dj_skual - if (strcmp(id, "RM2P69") == 0) return 517;//MZottel - if (strcmp(id, "RM2E69") == 0) return 492;//Old8oy - - //Mortal Kombat - if (strcmp(id, "RKMP5D") == 0) return 290;//from isostar - if (strcmp(id, "RKME5D") == 0) return 290;//starstremr - - //NBA 08 - if (strcmp(id, "RNBX69") == 0) return 964;//from isostar - - //Pangya! Golf with Style - if (strcmp(id, "RPYP9B") == 0) return 12490;//from isostar - - //Redsteel - if (strncmp(id, "RED", 3) == 0) return 1957;//from isostar - - //SSX - if (strcmp(id, "RSXP69") == 0) return 377;//previous value was 337 - if (strcmp(id, "RSXE69") == 0) return 377;//previous value was 337 - - //Madden NFL 07 - if (strcmp(id, "RMDE69") == 0) return 39; //from TwEbErIs - - //Madden NFL 08 - if (strcmp(id, "RNFE69") == 0) return 1079; //from TwEbErIs - - //Super Swing Golf - if (strcmp(id, "RPYE9B") == 0) return 10617; //from TwEbErIs - - //NBA Live 08 - if (strcmp(id, "RNBE69") == 0) return 936; //from TwEbErIs - - return 0; //none found -} - -int autoSelectDolPrompt(const char *gameid) -{ - char id[7]; - snprintf(id, sizeof(id), gameid); - - //Indiana Jones and the Staff of Kings (Fate of Atlantis) - if (strcmp(id, "RJ8E64") == 0 || strcmp(id, "RJ8P64") == 0) - { - int choice = WindowPrompt(tr( "Select a DOL" ), 0, "Fate of Atlantis", tr("Pick from a list"), tr( "Cancel" )); - if(choice == 1) - return 8; //from starstremr - else if(choice == 0) - return 0; - } - //Metal Slug Anthology (Metal Slug 6) - else if (strcmp(id, "RMLEH4") == 0) - { - int choice = WindowPrompt(tr( "Select a DOL" ), 0, "Metal Slug 6", tr("Pick from a list"), tr( "Cancel" )); - if(choice == 1) - return 54; - else if(choice == 0) - return 0; - } - //Metal Slug Anthology (Metal Slug 6) - else if (strcmp(id, "RMLP7U") == 0) - { - int choice = WindowPrompt(tr( "Select a DOL" ), 0, "Metal Slug 6", tr("Pick from a list"), tr( "Cancel" )); - if(choice == 1) - return 56; - else if(choice == 0) - return 0; - } - //Rampage: Total Destruction (M1.dol=Rampage, jarvos.dol=Rampage World Tour) - else if (strcmp(id, "RPGP5D") == 0) - { - int choice = WindowPrompt(tr( "Select a DOL" ), 0, "Rampage", "World Tour", tr("Pick from a list"), tr( "Cancel" )); - if(choice == 1) - return 369; - - else if(choice == 2) - return 368; - - else if(choice == 0) - return 0; - } - //The House Of The Dead 2 & 3 Return (only to play 2) - else if (strcmp(id, "RHDE8P") == 0 || strcmp(id, "RHDP8P") == 0) - { - int choice = WindowPrompt(tr( "Select a DOL" ), 0, "HotD 2", tr("Pick from a list"), tr( "Cancel" )); - if(choice == 1) - return 149; - else if(choice == 2) - return 0; - else if(choice == 0) - return 0; - } - //Grand Slam Tennis - else if (strcmp(id, "R5TP69") == 0 || strcmp(id, "R5TE69") == 0) - { - int choice = WindowPrompt(tr( "Select a DOL" ), 0, tr("Motion+ Video"), tr("Pick from a list"), tr( "Cancel" )); - if(choice == 1) - return 1493;//from isostar - else if(choice == 0) - return 0; - } - //Medal of Honor Heroes - else if (strcmp(id, "RMZX69") == 0 || strcmp(id, "RMZP69") == 0 || strcmp(id, "RMZE69") == 0) - { - int choice = WindowPrompt(tr( "Select a DOL" ), 0, tr("Motion+ Video"), tr("Pick from a list"), tr( "Cancel" )); - if(choice == 1) - return 492;//from isostar - else if(choice == 0) - return 0; - } - //Tiger Woods 10 - else if(strcmp(id, "R9OP69") == 0) - { - int choice = WindowPrompt(tr( "Select a DOL" ), 0, tr("Motion+ Video"), tr("Pick from a list"), tr( "Cancel" )); - if(choice == 1) - return 1991;//from isostar - else if(choice == 0) - return 0; - } - //Tiger Woods 10 - else if(strcmp(id, "R9OE69") == 0) - { - int choice = WindowPrompt(tr( "Select a DOL" ), 0, tr("Motion+ Video"), tr("Pick from a list"), tr( "Cancel" )); - if(choice == 1) - return 1973;//starstremr - else if(choice == 0) - return 0; - } - //Virtual Tennis 2009 - else if (strcmp(id, "RVUP8P") == 0) - { - int choice = WindowPrompt(tr( "Select a DOL" ), 0, tr("Motion+ Video"), tr("Pick from a list"), tr( "Cancel" )); - if(choice == 1) - return 16426;//from isostar - } - //Virtual Tennis 2009 - else if (strcmp(id, "RVUE8P") == 0) - { - int choice = WindowPrompt(tr( "Select a DOL" ), 0, tr("Motion+ Video"), tr("Pick from a list"), tr( "Cancel" )); - if(choice == 1) - return 16405;//from isostar - else if(choice == 0) - return 0; - } - //Wii Sports Resort - else if (strcmp(id, "RZTP01") == 0) - { - int choice = WindowPrompt(tr( "Select a DOL" ), 0, tr("Motion+ Video"), tr("Pick from a list"), tr( "Cancel" )); - if(choice == 1) - return 952;//from isostar - else if(choice == 0) - return 0; - } - //Wii Sports Resort - else if (strcmp(id, "RZTE01") == 0) - { - int choice = WindowPrompt(tr( "Select a DOL" ), 0, tr("Motion+ Video"), tr("Pick from a list"), tr( "Cancel" )); - if(choice == 1) - return 674;//from starstremr - else if(choice == 0) - return 0; - } - //Red Steel 2 - else if (strcmp(id, "RD2X41") == 0) - { - int choice = WindowPrompt(tr( "Select a DOL" ), 0, tr("Motion+ Video"), tr("Pick from a list"), tr( "Cancel" )); - if(choice == 1) - return 301;//from Cyan - else if(choice == 0) - return 0; - } - - return -1; -} diff --git a/source/usbloader/AlternateDOLOffsets.h b/source/usbloader/AlternateDOLOffsets.h deleted file mode 100644 index a56f5140..00000000 --- a/source/usbloader/AlternateDOLOffsets.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef ALTERNATEDOLOFFSETS_H_ -#define ALTERNATEDOLOFFSETS_H_ - -int defaultAltDol(const char *id); -int defaultDolPrompt(const char *id); -int autoSelectDolPrompt(const char *id); - -#endif diff --git a/source/usbloader/GameBooter.cpp b/source/usbloader/GameBooter.cpp deleted file mode 100644 index 88bbe8c7..00000000 --- a/source/usbloader/GameBooter.cpp +++ /dev/null @@ -1,294 +0,0 @@ -#include "menu/menus.h" -#include "menu/WDMMenu.hpp" -#include "mload/mload.h" -#include "mload/mload_modules.h" -#include "system/IosLoader.h" -#include "Controls/DeviceHandler.hpp" -#include "usbloader/disc.h" -#include "usbloader/apploader.h" -#include "usbloader/usbstorage2.h" -#include "usbloader/wdvd.h" -#include "usbloader/GameList.h" -#include "settings/Settings.h" -#include "settings/CGameSettings.h" -#include "usbloader/frag.h" -#include "usbloader/wbfs.h" -#include "usbloader/playlog.h" -#include "usbloader/MountGamePartition.h" -#include "usbloader/AlternateDOLOffsets.h" -#include "settings/newtitles.h" -#include "patches/fst.h" -#include "patches/gamepatches.h" -#include "patches/wip.h" -#include "system/IosLoader.h" -#include "banner/OpeningBNR.hpp" -#include "wad/nandtitle.h" -#include "menu/menus.h" -#include "memory/memory.h" -#include "GameBooter.hpp" -#include "sys.h" - -//appentrypoint has to be global because of asm -u32 AppEntrypoint = 0; - -struct discHdr *dvdheader = NULL; -extern u32 hdd_sector_size; -extern int mountMethod; - -int GameBooter::BootGCMode() -{ - ExitApp(); - gprintf("\nLoading BC for GameCube"); - WII_Initialize(); - return WII_LaunchTitle(0x0000000100000100ULL); -} - - -u32 GameBooter::BootPartition(char * dolpath, u8 videoselected, u8 languageChoice, u8 cheat, u8 vipatch, u8 patchcountrystring, - u8 alternatedol, u32 alternatedoloffset, u32 returnTo, u8 fix002) -{ - gprintf("booting partition IOS %u r%u\n", IOS_GetVersion(), IOS_GetRevision()); - entry_point p_entry; - s32 ret; - u64 offset; - - /* Find game partition offset */ - ret = __Disc_FindPartition(&offset); - if (ret < 0) - return 0; - - /* Open specified partition */ - ret = WDVD_OpenPartition(offset); - if (ret < 0) - return 0; - - load_wip_code((u8*) Disc_ID); - - /* If a wip file is loaded for this game this does nothing - Dimok */ - PoPPatch(); - NSMBPatch(); - - /* Setup low memory */ - __Disc_SetLowMem(); - - /* Run apploader */ - ret = Apploader_Run(&p_entry, dolpath, cheat, videoselected, languageChoice, vipatch, patchcountrystring, - alternatedol, alternatedoloffset, returnTo, fix002); - - if (ret < 0) - return 0; - - free_wip(); - - return (u32) p_entry; -} - -int GameBooter::FindDiscHeader(const char * gameID, struct discHdr &gameHeader) -{ - gameList.LoadUnfiltered(); - - if(mountMethod == 0 && !gameList.GetDiscHeader(gameID)) - { - gprintf("Game was not found: %s\n", gameID); - return -1; - } - else if(mountMethod && !dvdheader) - { - gprintf("Error: Loading empty disc header from DVD\n"); - return -1; - } - - memcpy(&gameHeader, (mountMethod ? dvdheader : gameList.GetDiscHeader(gameID)), sizeof(struct discHdr)); - - delete dvdheader; - dvdheader = NULL; - - return 0; -} - -void GameBooter::SetupAltDOL(u8 * gameID, u8 &alternatedol, u32 &alternatedoloffset) -{ - if(alternatedol == ALT_DOL_ON_LAUNCH) - { - alternatedol = ALT_DOL_FROM_GAME; - alternatedoloffset = WDMMenu::GetAlternateDolOffset(); - } - else if(alternatedol == ALT_DOL_DEFAULT) - { - alternatedol = ALT_DOL_FROM_GAME; - alternatedoloffset = defaultAltDol((char *) gameID); - } - - if(alternatedol == ALT_DOL_FROM_GAME && alternatedoloffset == 0) - alternatedol = OFF; -} - -int GameBooter::SetupDisc(u8 * gameID) -{ - if (mountMethod) - { - gprintf("\tloading DVD\n"); - return Disc_Open(); - } - - int ret = -1; - - if(((IosLoader::IsWaninkokoIOS() && IOS_GetRevision() < 18) || - hdd_sector_size != 512) && gameList.GetGameFS(gameID) == PART_FS_WBFS) - { - gprintf("Disc_SetUSB..."); - ret = Disc_SetUSB(gameID); - gprintf("%d\n", ret); - if(ret < 0) return ret; - } - else - { - gprintf("Loading fragment list..."); - ret = get_frag_list(gameID); - gprintf("%d\n", ret); - if(ret < 0) return ret; - ret = set_frag_list(gameID); - if(ret < 0) return ret; - gprintf("\tUSB set to game\n"); - } - - gprintf("Disc_Open()..."); - ret = Disc_Open(); - gprintf("%d\n", ret); - - return ret; -} - -bool GameBooter::LoadOcarina(u8 *gameID) -{ - if (ocarina_load_code(gameID) > 0) - { - ocarina_do_code(); - return true; - } - - return false; -} - -int GameBooter::BootGame(const char * gameID) -{ - if(!gameID || strlen(gameID) < 3) - return -1; - - if (mountMethod == 2) - return BootGCMode(); - - AppCleanUp(); - - gprintf("\tSettings.partition: %d\n", Settings.partition); - - struct discHdr gameHeader; - - //! Find disc header in the game list first - int ret = FindDiscHeader(gameID, gameHeader); - if(ret < 0) - return ret; - - //! Setup game configuration from game settings. If no game settings exist use global/default. - GameCFG * game_cfg = GameSettings.GetGameCFG(gameHeader.id); - u8 videoChoice = game_cfg->video; - u8 languageChoice = game_cfg->language; - u8 ocarinaChoice = game_cfg->ocarina; - u8 viChoice = game_cfg->vipatch; - u8 iosChoice = game_cfg->ios; - u8 fix002 = game_cfg->errorfix002; - u8 countrystrings = game_cfg->patchcountrystrings; - u8 alternatedol = game_cfg->loadalternatedol; - u32 alternatedoloffset = game_cfg->alternatedolstart; - u8 reloadblock = game_cfg->iosreloadblock; - u8 returnToLoaderGV = game_cfg->returnTo; - - //! Prepare alternate dol settings - SetupAltDOL(gameHeader.id, alternatedol, alternatedoloffset); - - //! Setup the return to Loader option - u32 channel = 0; - if (returnToLoaderGV) - { - int idx = NandTitles.FindU32(Settings.returnTo); - if (idx >= 0) channel = TITLE_LOWER( NandTitles.At( idx ) ); - } - - //! This is temporary - C <-> C++ transfer - SetCheatFilepath(Settings.Cheatcodespath); - SetBCAFilepath(Settings.BcaCodepath); - - //! Reload game settings cIOS for this game - if(iosChoice != IOS_GetVersion()) - { - gprintf("Reloading into game cIOS: %i...\n", iosChoice); - IosLoader::LoadGameCios(iosChoice); - if(MountGamePartition(false) < 0) - return -1; - } - - //! Setup disc in cIOS and open it - ret = SetupDisc(gameHeader.id); - if (ret < 0) - Sys_BackToLoader(); - - //! Load BCA data for the game - gprintf("Loading BCA data..."); - ret = do_bca_code(gameHeader.id); - gprintf("%d\n", ret); - - //! Setup IOS reload block - only possible on Hermes cIOS - if (reloadblock == ON && IosLoader::IsHermesIOS()) - { - enable_ES_ioctlv_vector(); - if (gameList.GetGameFS(gameHeader.id) == PART_FS_WBFS) - mload_close(); - } - - //! Now we can free up the memory used by the game list - gameList.clear(); - - //! Load main.dol or alternative dol into memory, start the game apploader and get game entrypoint - gprintf("\tDisc_wiiBoot\n"); - AppEntrypoint = BootPartition(Settings.dolpath, videoChoice, languageChoice, ocarinaChoice, viChoice, countrystrings, - alternatedol, alternatedoloffset, channel, fix002); - - //! No entrypoint found...back to HBC/SystemMenu - if(AppEntrypoint == 0) - { - WDVD_ClosePartition(); - Sys_BackToLoader(); - } - - //! Load Ocarina codes - bool enablecheat = false; - if (ocarinaChoice) - enablecheat = LoadOcarina(gameHeader.id); - - //! Shadow mload - Only needed on some games with Hermes v5.1 (Check is inside the function) - shadow_mload(); - - //! Remember game's USB port - int usbport = USBStorage2_GetPort(); - - //! Flush all caches and close up all devices - WBFS_CloseAll(); - DeviceHandler::DestroyInstance(); - USB_Deinitialize(); - - if(Settings.USBPort == 2) - { - //! Reset USB port because device handler changes it for cache flushing - USBStorage2_Init(); - USBStorage2_SetPort(usbport); - USBStorage2_Deinit(); - } - - //! Modify Wii Message Board to display the game starting here - if(Settings.PlaylogUpdate) - Playlog_Update((char *) gameHeader.id, BNRInstance::Instance()->GetIMETTitle(CONF_GetLanguage())); - - //! Jump to the entrypoint of the game - the last function of the USB Loader - gprintf("Jumping to game entrypoint: 0x%08X.\n", AppEntrypoint); - return Disc_JumpToEntrypoint(videoChoice, enablecheat, WDMMenu::GetDolParameter()); -} diff --git a/source/usbloader/GameBooter.hpp b/source/usbloader/GameBooter.hpp deleted file mode 100644 index 5ecb3f8f..00000000 --- a/source/usbloader/GameBooter.hpp +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef GAMEBOOTER_HPP_ -#define GAMEBOOTER_HPP_ - -#include - -class GameBooter -{ - public: - static int BootGame(const char * gameID); - static int BootGCMode(); - private: - static int FindDiscHeader(const char * gameID, struct discHdr &gameHeader); - static void SetupAltDOL(u8 * gameID, u8 &alternatedol, u32 &alternatedoloffset); - static int SetupDisc(u8 *gameID); - static bool LoadOcarina(u8 *gameID); - static u32 BootPartition(char * dolpath, u8 videoselected, u8 languageChoice, u8 cheat, u8 vipatch, - u8 patchcountrystring, u8 alternatedol, u32 alternatedoloffset, u32 returnTo, u8 fix002); -}; - -#endif diff --git a/source/usbloader/GameList.cpp b/source/usbloader/GameList.cpp deleted file mode 100644 index 9ad9b5e8..00000000 --- a/source/usbloader/GameList.cpp +++ /dev/null @@ -1,383 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include -#include -#include -#include -#include "usbloader/wbfs.h" -#include "settings/newtitles.h" -#include "settings/CSettings.h" -#include "settings/CGameSettings.h" -#include "settings/CGameStatistics.h" -#include "settings/GameTitles.h" -#include "xml/xml.h" -#include "FreeTypeGX.h" -#include "GameList.h" -#include "memory/memory.h" - -GameList gameList; - -void GameList::clear() -{ - GameFilter.clear(); - AvailableSearchChars.clear(); - FullGameList.clear(); - GamePartitionList.clear(); - FilteredList.clear(); - //! Clear memory of the vector completely - std::vector().swap(FilteredList); - std::vector().swap(FullGameList); - std::vector().swap(GamePartitionList); -} - -struct discHdr * GameList::GetDiscHeader(const char * gameID) const -{ - if(!gameID) return NULL; - - for (u32 i = 0; i < FilteredList.size(); ++i) - { - if(strncasecmp(gameID, (const char *) FilteredList[i]->id, 6) == 0) - return FilteredList[i]; - } - - return NULL; -} - -int GameList::GetPartitionNumber(const u8 *gameID) const -{ - if(!gameID) return -1; - - for (u32 i = 0; i < FullGameList.size(); ++i) - { - if(strncasecmp((const char *) gameID, (const char *) FullGameList[i].id, 6) == 0) - return GamePartitionList[i]; - } - - return -1; -} - -void GameList::RemovePartition(int part) -{ - for(u32 i = 0; i < GamePartitionList.size(); ++i) - { - if(GamePartitionList[i] == part) - { - FullGameList.erase(FullGameList.begin()+i); - GamePartitionList.erase(GamePartitionList.begin()+i); - --i; - } - } - - if(FullGameList.size() > 0) - { - wString filter(GameFilter); - FilterList(filter.c_str()); - } -} - -int GameList::InternalReadList(int part) -{ - // Retrieve all stuff from WBFS - u32 cnt = 0; - - int ret = WBFS_GetCount(part, &cnt); - if (ret < 0) return -1; - - // We are done here if no games are there - if(cnt == 0) - return 0; - - /* Buffer length */ - u32 len = sizeof(struct discHdr) * cnt; - - /* Allocate memory */ - struct discHdr *buffer = (struct discHdr *) allocate_memory( len ); - if (!buffer) return -1; - - /* Clear buffer */ - memset(buffer, 0, len); - - /* Get header list */ - ret = WBFS_GetHeaders(part, buffer, cnt, sizeof(struct discHdr)); - if (ret < 0) - { - free(buffer); - return -1; - } - - u32 oldSize = FullGameList.size(); - std::vector PartGameList(cnt); - memcpy(&PartGameList[0], buffer, len); - free(buffer); - - for (u32 i = 0; i < PartGameList.size(); i++) - { - for(u32 j = 0; j < FullGameList.size(); j++) - { - if(strncasecmp((const char *) PartGameList[i].id, (const char *) FullGameList[j].id, 6) == 0) - { - PartGameList.erase(PartGameList.begin()+i); - --i; - break; - } - } - } - FullGameList.resize(oldSize+PartGameList.size()); - memcpy(&FullGameList[oldSize], &PartGameList[0], PartGameList.size()*sizeof(struct discHdr)); - - GamePartitionList.resize(oldSize+PartGameList.size()); - - for(u32 i = oldSize; i < GamePartitionList.size(); ++i) - GamePartitionList[i] = part; - - return PartGameList.size(); -} - -int GameList::ReadGameList() -{ - // Clear list - clear(); - - if(!Settings.MultiplePartitions) - { - int ret = InternalReadList(Settings.partition); - if(ret <= 0) return ret; - } - else - { - PartitionHandle * usbHandle = DeviceHandler::Instance()->GetUSBHandle(); - int cnt = 0; - - for(int part = 0; part < usbHandle->GetPartitionTotalCount(); ++part) - { - int ret = InternalReadList(part); - if(ret > 0) cnt += ret; - } - - if(!cnt) return cnt; - } - - return LoadUnfiltered(); -} - -static bool WCharSortCallback(const wchar_t char1, const wchar_t char2) -{ - if (char2 == 0) return true; - if (char1 == 0) return false; - - return char2 > char1; -} - -int GameList::FilterList(const wchar_t * gameFilter) -{ - if (FullGameList.size() == 0) ReadGameList(); - if (gameFilter) GameFilter.assign(gameFilter); - - FilteredList.clear(); - AvailableSearchChars.clear(); - - for (u32 i = 0; i < FullGameList.size(); ++i) - { - struct discHdr *header = &FullGameList[i]; - - /* Register game */ - NewTitles::Instance()->CheckGame(header->id); - - /* Filters */ - if (Settings.GameSort & SORT_FAVORITE) - { - GameStatus * GameStats = GameStatistics.GetGameStatus(header->id); - if (Settings.marknewtitles) - { - bool isNew = NewTitles::Instance()->IsNew(header->id); - if (!isNew && (!GameStats || GameStats->FavoriteRank == 0)) continue; - } - else - { - if (!GameStats || GameStats->FavoriteRank == 0) continue; - } - } - - //ignore uLoader cfg "iso". i was told it is "__CFG_" but not confirmed - if (strncasecmp((char*) header->id, "__CFG_", 6) == 0) - continue; - - GameCFG * GameConfig = GameSettings.GetGameCFG(header); - - /* Rating based parental control method */ - if (Settings.parentalcontrol != PARENTAL_LVL_ADULT && !Settings.godmode) - { - if (GameConfig && GameConfig->parentalcontrol > Settings.parentalcontrol) - continue; - - // Check game rating in WiiTDB, since the default Wii parental control setting is enabled - int rating = GameTitles.GetParentalRating((char *) header->id); - if (rating > Settings.parentalcontrol) - continue; - } - - //! Per game lock method - if(!Settings.godmode && GameConfig && GameConfig->Locked) - continue; - - wchar_t *gameName = charToWideChar(GameTitles.GetTitle(header)); - if (gameName && *GameFilter.c_str()) - { - if (wcsnicmp(gameName, GameFilter.c_str(), GameFilter.size()) != 0) - { - delete [] gameName; - continue; - } - } - - if (gameName) - { - if (wcslen(gameName) > GameFilter.size() && - AvailableSearchChars.find(towupper(gameName[GameFilter.size()])) == std::string::npos && - AvailableSearchChars.find(towlower(gameName[GameFilter.size()])) == std::string::npos) - { - AvailableSearchChars.push_back(gameName[GameFilter.size()]); - } - - delete [] gameName; - } - - FilteredList.push_back(header); - } - - NewTitles::Instance()->Save(); - - AvailableSearchChars.push_back(L'\0'); - - if (FilteredList.size() < 2) - AvailableSearchChars.clear(); - - SortList(); - - return FilteredList.size(); -} - -int GameList::LoadUnfiltered() -{ - if (FullGameList.size() == 0) ReadGameList(); - - GameFilter.clear(); - AvailableSearchChars.clear(); - FilteredList.clear(); - - for (u32 i = 0; i < FullGameList.size(); ++i) - { - struct discHdr *header = &FullGameList[i]; - - /* Register game */ - NewTitles::Instance()->CheckGame(header->id); - - wchar_t *gameName = charToWideChar(GameTitles.GetTitle(header)); - if (gameName) - { - if (wcslen(gameName) > GameFilter.size() && - AvailableSearchChars.find(towupper(gameName[GameFilter.size()])) == std::string::npos && - AvailableSearchChars.find(towlower(gameName[GameFilter.size()])) == std::string::npos) - { - AvailableSearchChars.push_back(gameName[GameFilter.size()]); - } - - delete [] gameName; - } - - FilteredList.push_back(header); - } - - NewTitles::Instance()->Save(); - - AvailableSearchChars.push_back(L'\0'); - - if (FilteredList.size() < 2) - AvailableSearchChars.clear(); - - SortList(); - - return FilteredList.size(); -} - -void GameList::SortList() -{ - if (FilteredList.size() < 2) return; - - if (Settings.GameSort & SORT_PLAYCOUNT) - { - std::sort(FilteredList.begin(), FilteredList.end(), PlaycountSortCallback); - } - else if(Settings.GameSort & SORT_RANKING) - { - std::sort(FilteredList.begin(), FilteredList.end(), RankingSortCallback); - } - else if(Settings.GameSort & SORT_PLAYERS) - { - std::sort(FilteredList.begin(), FilteredList.end(), PlayersSortCallback); - } - else - { - std::sort(FilteredList.begin(), FilteredList.end(), NameSortCallback); - } - - if (AvailableSearchChars.size() > 1) - std::sort(AvailableSearchChars.begin(), AvailableSearchChars.end(), WCharSortCallback); - -} - -bool GameList::NameSortCallback(const struct discHdr *a, const struct discHdr *b) -{ - return (strcasecmp(GameTitles.GetTitle((struct discHdr *) a), GameTitles.GetTitle((struct discHdr *) b)) < 0); -} - -bool GameList::PlaycountSortCallback(const struct discHdr *a, const struct discHdr *b) -{ - int count1 = GameStatistics.GetPlayCount(a->id); - int count2 = GameStatistics.GetPlayCount(b->id); - - if (count1 == count2) return NameSortCallback(a, b); - - return (count1 > count2); -} - -bool GameList::RankingSortCallback(const struct discHdr *a, const struct discHdr *b) -{ - int fav1 = GameStatistics.GetFavoriteRank(a->id); - int fav2 = GameStatistics.GetFavoriteRank(b->id); - - if (fav1 == fav2) return NameSortCallback(a, b); - - return (fav1 > fav2); -} - -bool GameList::PlayersSortCallback(const struct discHdr *a, const struct discHdr *b) -{ - int count1 = GameTitles.GetPlayersCount((const char *) a->id); - int count2 = GameTitles.GetPlayersCount((const char *) b->id); - - if (count1 == count2) return NameSortCallback(a, b); - - return (count1 > count2); -} diff --git a/source/usbloader/GameList.h b/source/usbloader/GameList.h deleted file mode 100644 index 13ecd782..00000000 --- a/source/usbloader/GameList.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef GAME_LIST_H_ -#define GAME_LIST_H_ - -#include -#include "Controls/DeviceHandler.hpp" -#include "wstring.hpp" -#include "usbloader/disc.h" - -class GameList -{ - public: - GameList() : selectedGame(0) { }; - int ReadGameList(); - int size() const { return FilteredList.size(); } - int GameCount() const { return FullGameList.size(); } - int FilterList(const wchar_t * gameFilter = NULL); - int LoadUnfiltered(); - struct discHdr * at(int i) const { return operator[](i); } - struct discHdr * operator[](int i) const { if (i < 0 || i >= (int) FilteredList.size()) return NULL; return FilteredList[i]; } - struct discHdr * GetDiscHeader(const char * gameID) const; - const wchar_t * GetCurrentFilter() const { return GameFilter.c_str(); } - const wchar_t * GetAvailableSearchChars() const { return AvailableSearchChars.c_str(); } - void SortList(); - void clear(); - bool operator!() const { return (FullGameList.size() == 0); } - //! Gamelist scrolling operators - int operator+=(int i) { return (selectedGame = (selectedGame+i) % FilteredList.size()); } - int operator-=(int i) { return (selectedGame = (selectedGame-i+FilteredList.size()) % FilteredList.size()); } - int operator++() { return (selectedGame = (selectedGame+1) % FilteredList.size()); } - int operator--() { return (selectedGame = (selectedGame-1+FilteredList.size()) % FilteredList.size()); } - int operator++(int i) { return operator++(); } - int operator--(int i) { return operator--(); } - struct discHdr * GetCurrentSelected() const { return operator[](selectedGame); } - int GetPartitionNumber(const u8 *gameid) const; - int GetGameFS(const u8 *gameID) const { return DeviceHandler::Instance()->GetUSBFilesystemType(GetPartitionNumber(gameID)); } - void RemovePartition(int part_num); - protected: - int InternalReadList(int part); - static bool NameSortCallback(const struct discHdr *a, const struct discHdr *b); - static bool PlaycountSortCallback(const struct discHdr *a, const struct discHdr *b); - static bool RankingSortCallback(const struct discHdr *a, const struct discHdr *b); - static bool PlayersSortCallback(const struct discHdr *a, const struct discHdr *b); - - wString AvailableSearchChars; - wString GameFilter; - int selectedGame; - std::vector FilteredList; - std::vector FullGameList; - std::vector GamePartitionList; -}; - -extern GameList gameList; - -#endif diff --git a/source/usbloader/GetMissingGameFiles.cpp b/source/usbloader/GetMissingGameFiles.cpp deleted file mode 100644 index 3d148356..00000000 --- a/source/usbloader/GetMissingGameFiles.cpp +++ /dev/null @@ -1,60 +0,0 @@ -#include -#include -#include -#include "FileOperations/fileops.h" -#include "usbloader/GameList.h" -#include "wstring.hpp" -#include "gecko.h" - -/************************************************************************************** - * FindMissingFiles - * Inputs: - * path - Path to search in with. example "SD:/covers/" - * fileext - the file extension. example ".png" - * MissingFilesList - string vector where the IDs of missing game files will be put in. - **************************************************************************************/ -int GetMissingGameFiles(const char * path, const char * fileext, std::vector & MissingFilesList) -{ - char gameID[7]; - char filepath[512]; - MissingFilesList.clear(); - wString oldFilter(gameList.GetCurrentFilter()); - - //! make sure that all games are added to the gamelist - gameList.LoadUnfiltered(); - - for (int i = 0; i < gameList.size(); ++i) - { - struct discHdr* header = gameList[i]; - snprintf(gameID, sizeof(gameID), "%s", (char *) header->id); - snprintf(filepath, sizeof(filepath), "%s/%s%s", path, gameID, fileext); - - if (CheckFile(filepath)) - continue; - - //! Not found. Try 4 ID path. - gameID[4] = '\0'; - snprintf(filepath, sizeof(filepath), "%s/%s%s", path, gameID, fileext); - - if (CheckFile(filepath)) - continue; - - //! Not found. Try 3 ID path. - gameID[3] = '\0'; - snprintf(filepath, sizeof(filepath), "%s/%s%s", path, gameID, fileext); - - if (CheckFile(filepath)) - continue; - - //! Not found add to missing list - snprintf(gameID, sizeof(gameID), "%s", (char *) header->id); - MissingFilesList.push_back(std::string(gameID)); - } - - //! Bring game list to the old state - gameList.FilterList(oldFilter.c_str()); - - gprintf(" = %i", MissingFilesList.size()); - - return MissingFilesList.size(); -} diff --git a/source/usbloader/GetMissingGameFiles.hpp b/source/usbloader/GetMissingGameFiles.hpp deleted file mode 100644 index 1b08a7f6..00000000 --- a/source/usbloader/GetMissingGameFiles.hpp +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef GETMISSINGGAMEFILES_HPP_ -#define GETMISSINGGAMEFILES_HPP_ - -/************************************************************************************** - * FindMissingFiles - * This function can be used for any files that are game related: .png, .wip, .gct, ... - * Inputs: - * path - Path to search in with. example "SD:/covers/" - * fileext - the file extension. example ".png" - * List - string vector where the IDs of missing game files will be put in. - **************************************************************************************/ -int GetMissingGameFiles(const char * path, const char * fileext, std::vector & List); - -#endif diff --git a/source/usbloader/MountGamePartition.cpp b/source/usbloader/MountGamePartition.cpp deleted file mode 100644 index 3a45eece..00000000 --- a/source/usbloader/MountGamePartition.cpp +++ /dev/null @@ -1,152 +0,0 @@ -#include -#include - -#include "FileOperations/fileops.h" -#include "Controls/DeviceHandler.hpp" -#include "wad/nandtitle.h" -#include "system/IosLoader.h" -#include "menu/menus.h" -#include "wpad.h" -#include "usbloader/wbfs.h" -#include "usbloader/GameList.h" -#include "settings/GameTitles.h" -#include "xml/WiiTDB.hpp" - -static int FindGamePartition() -{ - PartitionHandle * usbHandle = DeviceHandler::Instance()->GetUSBHandle(); - // Loop through all WBFS partitions first to check them in case IOS249 Rev < 18 - for(int i = 0; i < usbHandle->GetPartitionCount(); ++i) - { - if(strncmp(usbHandle->GetFSName(i), "WBFS", 4) != 0) - continue; - - if (WBFS_OpenPart(i) == 0) - { - Settings.partition = i; - return 0; - } - } - - - if(IosLoader::IsWaninkokoIOS() && NandTitles.VersionOf(TITLE_ID(1, IOS_GetVersion())) < 18) - return -1; - - // Loop through FAT/NTFS/EXT partitions, and find the first partition with games on it (if there is one) - for(int i = 0; i < usbHandle->GetPartitionCount(); ++i) - { - if(strncmp(usbHandle->GetFSName(i), "NTFS", 4) != 0 && - strncmp(usbHandle->GetFSName(i), "FAT", 3) != 0 && - strncmp(usbHandle->GetFSName(i), "LINUX", 5) != 0) - { - continue; - } - - if (WBFS_OpenPart(i) != 0) - continue; - - u32 count; - // Get the game count... - WBFS_GetCount(i, &count); - - if (count > 0) - { - Settings.partition = i; - return 0; - } - - WBFS_Close(i); - } - - return -1; -} - -static int PartitionChoice() -{ - int ret = -1; - PartitionHandle * usbHandle = DeviceHandler::Instance()->GetUSBHandle(); - - int choice = WindowPrompt(tr( "No WBFS or FAT/NTFS/EXT partition found" ), - tr( "You need to select or format a partition" ), tr( "Select" ), tr( "Format" ), tr( "Return" )); - - if (choice == 0) - { - Sys_LoadMenu(); - } - else if(choice == 1) - { - int part_num = SelectPartitionMenu(); - if(part_num >= 0) - { - if(IosLoader::IsWaninkokoIOS() && NandTitles.VersionOf(TITLE_ID(1, IOS_GetVersion())) < 18 && - (strncmp(usbHandle->GetFSName(part_num), "NTFS", 4) == 0 || - strncmp(usbHandle->GetFSName(part_num), "FAT", 3) == 0 || - strncmp(usbHandle->GetFSName(part_num), "LINUX", 5) == 0)) - { - WindowPrompt(tr("Warning:"), tr("You are trying to select a FAT32/NTFS/EXT partition with cIOS 249 Rev < 18. This is not supported. Continue on your own risk."), tr("OK")); - } - - ret = WBFS_OpenPart(part_num); - - Settings.partition = part_num; - Settings.Save(); - } - } - else if(choice == 2) - { - while(ret < 0 || ret == -666) - { - int part_num = SelectPartitionMenu(); - if(part_num >= 0) - ret = FormatingPartition(tr( "Formatting, please wait..." ), part_num); - } - } - - return ret; -} - -/**************************************************************************** - * MountGamePartition - ***************************************************************************/ -int MountGamePartition(bool ShowGUI) -{ - gprintf("MountGamePartition()\n"); - - s32 wbfsinit = MountWBFS(ShowGUI); - if (wbfsinit < 0) - { - if(ShowGUI) WindowPrompt(tr( "Error !" ), tr( "USB Device not found" ), tr( "OK" )); - Sys_LoadMenu(); - } - - s32 ret = -1; - - if(Settings.MultiplePartitions) - ret = WBFS_OpenAll(); - else - ret = WBFS_OpenPart(Settings.partition); - - if(ret < 0) - ret = FindGamePartition(); - - if (ret < 0 && ShowGUI) - ret = PartitionChoice(); - - if(ret < 0) - Sys_LoadMenu(); - - gprintf("\tDisc_Init\n"); - ret = Disc_Init(); - if (ret < 0) - { - if(ShowGUI) - WindowPrompt(tr( "Error !" ), tr( "Could not initialize DIP module!" ), tr( "OK" )); - Sys_LoadMenu(); - } - - gprintf("LoadTitlesFromWiiTDB\n"); - - GameTitles.LoadTitlesFromWiiTDB(Settings.titlestxt_path); - - return ret; -} diff --git a/source/usbloader/MountGamePartition.h b/source/usbloader/MountGamePartition.h deleted file mode 100644 index 4782bedb..00000000 --- a/source/usbloader/MountGamePartition.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef MOUNTGAMEPARTITION_H_ -#define MOUNTGAMEPARTITION_H_ - -int MountGamePartition(bool ShowGUI = true); - -#endif diff --git a/source/usbloader/WDMFile.cpp b/source/usbloader/WDMFile.cpp deleted file mode 100644 index 59850898..00000000 --- a/source/usbloader/WDMFile.cpp +++ /dev/null @@ -1,75 +0,0 @@ -#include -#include -#include "WDMFile.hpp" - -static inline int GetNumber(const char * line) -{ - while(*line == ' ') line++; - - if(line[0] == '0' && (line[1] == 'x' || line[1] == 'X')) - return strtol(line, 0, 16); - else - return strtol(line, 0, 10); -} - -WDMFile::WDMFile(const char * path) -{ - FILE * file = fopen(path, "rb"); - if(!file) - return; - - char line[255]; - int entry_number = 0; - int counter = 0; - WDMEntry Entry; - - while (fgets(line, sizeof(line), file)) - { - if(line[0] == '#' || line[0] == '\0') - continue; - - entry_number++; - - if(entry_number < 3) - continue; - - if(counter == 0) - { - int strlength = strlen(line); - while(strlength > 0 && (line[strlength-1] == '\n' || line[strlength-1] == '\r' || line[strlength-1] == ' ')) - { - line[strlength-1] = '\0'; - strlength--; - } - - Entry.ReplaceName = line; - } - else if(counter == 1) - { - int strlength = strlen(line); - while(strlength > 0 && (line[strlength-1] == '\n' || line[strlength-1] == '\r' || line[strlength-1] == ' ')) - { - line[strlength-1] = '\0'; - strlength--; - } - - Entry.DolName = line; - } - else if(counter == 2) - { - Entry.Parameter = GetNumber(line); - WDMEntries.push_back(Entry); - } - else if(counter == 3) - { - //This is actually the place where submenus are described - //But we skip it because its never used - counter = 0; - continue; - } - - counter++; - } - - fclose(file); -} diff --git a/source/usbloader/WDMFile.hpp b/source/usbloader/WDMFile.hpp deleted file mode 100644 index 5d30bc34..00000000 --- a/source/usbloader/WDMFile.hpp +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef WDMFILE_HPP_ -#define WDMFILE_HPP_ - -#include -#include -#include -#include - -using namespace std; - -class WDMFile -{ - public: - WDMFile(const char * filepath); - const char * GetDolName(int pos) const { if(pos >= 0 && pos < (int) WDMEntries.size()) return WDMEntries[pos].DolName.c_str(); else return NULL; }; - const char * GetReplaceName(int pos) const { if(pos >= 0 && pos < (int) WDMEntries.size()) return WDMEntries[pos].ReplaceName.c_str(); else return NULL; }; - int GetParameter(int pos) const { if(pos >= 0 && pos < (int) WDMEntries.size()) return WDMEntries[pos].Parameter; else return 0; }; - int size() const { return WDMEntries.size(); }; - private: - struct WDMEntry - { - string DolName; - string ReplaceName; - int Parameter; - }; - - vector WDMEntries; -}; - -#endif diff --git a/source/usbloader/alternatedol.c b/source/usbloader/alternatedol.c deleted file mode 100644 index 3022e0a7..00000000 --- a/source/usbloader/alternatedol.c +++ /dev/null @@ -1,197 +0,0 @@ -#include -#include -#include -#include -#include - -#include "apploader.h" -#include "wdvd.h" -#include "fstfile.h" - -typedef struct _dolheader -{ - u32 text_pos[7]; - u32 data_pos[11]; - u32 text_start[7]; - u32 data_start[11]; - u32 text_size[7]; - u32 data_size[11]; - u32 bss_start; - u32 bss_size; - u32 entry_point; -} dolheader; - -static bool Remove_001_Protection(void *Address, int Size) -{ - u8 SearchPattern[16] = { 0x40, 0x82, 0x00, 0x0C, 0x38, 0x60, 0x00, 0x01, 0x48, 0x00, 0x02, 0x44, 0x38, 0x61, 0x00, 0x18 }; - u8 PatchData[16] = { 0x40, 0x82, 0x00, 0x04, 0x38, 0x60, 0x00, 0x01, 0x48, 0x00, 0x02, 0x44, 0x38, 0x61, 0x00, 0x18 }; - - void *Addr = Address; - void *Addr_end = Address + Size; - - while (Addr <= Addr_end - sizeof(SearchPattern)) - { - if (memcmp(Addr, SearchPattern, sizeof(SearchPattern)) == 0) - { - memcpy(Addr, PatchData, sizeof(PatchData)); - return true; - } - Addr += 4; - } - return false; -} - -bool Load_Dol(void **buffer, int* dollen, const char * filepath) -{ - int ret; - FILE* file; - void* dol_buffer; - - char fullpath[200]; - char gameidbuffer6[7]; - memset(gameidbuffer6, 0, 7); - memcpy(gameidbuffer6, (char*) 0x80000000, 6); - snprintf(fullpath, 200, "%s%s.dol", filepath, gameidbuffer6); - - file = fopen(fullpath, "rb"); - if (file == NULL) - { - fclose(file); - return false; - } - - int filesize; - fseek(file, 0, SEEK_END); - filesize = ftell(file); - fseek(file, 0, SEEK_SET); - - dol_buffer = malloc(filesize); - if (dol_buffer == NULL) - { - fclose(file); - return false; - } - ret = fread(dol_buffer, 1, filesize, file); - if (ret != filesize) - { - free(dol_buffer); - fclose(file); - return false; - } - fclose(file); - - *buffer = dol_buffer; - *dollen = filesize; - return true; -} - -u32 load_dol_image(void *dolstart, u8 videoSelected, u8 languageChoice, u8 patchcountrystring, u8 vipatch, u8 cheat, u8 fix002, u32 returnTo) -{ - if (!dolstart) - return 0; - - u32 i; - dolheader *dolfile = (dolheader *) dolstart; - - for (i = 0; i < 7; i++) - { - if ((!dolfile->text_size[i]) || (dolfile->text_start[i] < 0x100)) continue; - - memmove((void *) dolfile->text_start[i], dolstart + dolfile->text_pos[i], dolfile->text_size[i]); - gamepatches((void *) dolfile->text_start[i], dolfile->text_size[i], videoSelected, languageChoice, patchcountrystring, - vipatch, cheat, returnTo, fix002); - Remove_001_Protection((void *) dolfile->data_start[i], dolfile->data_size[i]); - DCFlushRange((void *) dolfile->data_start[i], dolfile->data_size[i]); - ICInvalidateRange((void *) dolfile->text_start[i], dolfile->text_size[i]); - } - - for (i = 0; i < 11; i++) - { - if ((!dolfile->data_size[i]) || (dolfile->data_start[i] < 0x100)) continue; - - memmove((void *) dolfile->data_start[i], dolstart + dolfile->data_pos[i], dolfile->data_size[i]); - gamepatches((void *) dolfile->data_start[i], dolfile->data_size[i], videoSelected, languageChoice, patchcountrystring, - vipatch, cheat, returnTo, fix002); - Remove_001_Protection((void *) dolfile->data_start[i], dolfile->data_size[i]); - DCFlushRange((void *) dolfile->data_start[i], dolfile->data_size[i]); - } - - return dolfile->entry_point; -} - -u32 Load_Dol_from_disc(u32 offset, u8 videoSelected, u8 languageChoice, u8 patchcountrystring, u8 vipatch, u8 cheat, u8 fix002, u32 returnTo) -{ - s32 ret; - dolheader * dolfile; - u8 * buffer; - u32 pos, size; - u32 i; - u32 entrypoint; - u64 doloffset = ((u64) offset) << 2; - - dolfile = (dolheader *) memalign(32, sizeof(dolheader)); - if (dolfile == NULL) - return 0; - - memset(dolfile, 0, sizeof(dolheader)); - - ret = WDVD_Read(dolfile, sizeof(dolheader), doloffset); - if(ret < 0) - { - free(dolfile); - return 0; - } - - entrypoint = dolfile->entry_point; - if (entrypoint == 0) - { - free(dolfile); - return 0; - } - - for (i = 0; i < 7; ++i) - { - if ((!dolfile->text_size[i]) || (dolfile->text_start[i] < 0x100)) continue; - - buffer = (u8 *) dolfile->text_start[i]; - size = dolfile->text_size[i]; - pos = dolfile->text_pos[i]; - - ret = WDVD_Read(buffer, size, doloffset+pos); - if(ret < 0) - { - free(dolfile); - return 0; - } - - gamepatches(buffer, size, videoSelected, languageChoice, patchcountrystring, vipatch, cheat, returnTo, fix002); - Remove_001_Protection(buffer, size); - DCFlushRange(buffer, size); - ICInvalidateRange(buffer, size); - } - - for (i = 0; i < 11; ++i) - { - if ((!dolfile->data_size[i]) || (dolfile->data_start[i] < 0x100)) continue; - - buffer = (u8 *) dolfile->data_start[i]; - size = dolfile->data_size[i]; - pos = dolfile->data_pos[i]; - - ret = WDVD_Read(buffer, size, doloffset+pos); - if(ret < 0) - { - free(dolfile); - return 0; - } - - gamepatches(buffer, size, videoSelected, languageChoice, patchcountrystring, vipatch, cheat, returnTo, fix002); - Remove_001_Protection(buffer, size); - DCFlushRange(buffer, size); - } - - free(dolfile); - - return entrypoint; - -} diff --git a/source/usbloader/alternatedol.h b/source/usbloader/alternatedol.h deleted file mode 100644 index 3c434c46..00000000 --- a/source/usbloader/alternatedol.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef _ALTERNATEDOL_H_ -#define _ALTERNATEDOL_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* not the full path is needed here, the path where the dol is */ -bool Load_Dol(void **buffer, int* dollen, const char * filepath); -u32 load_dol_image(void *dolstart, u8 videoSelected, u8 languageChoice, u8 patchcountrystring, u8 vipatch, u8 cheat, u8 fix002, u32 returnTo); -u32 Load_Dol_from_disc(u32 offset, u8 videoSelected, u8 languageChoice, u8 patchcountrystring, u8 vipatch, u8 cheat, u8 fix002, u32 returnTo); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/usbloader/apploader.c b/source/usbloader/apploader.c deleted file mode 100644 index 51bf6201..00000000 --- a/source/usbloader/apploader.c +++ /dev/null @@ -1,148 +0,0 @@ -#include -#include -#include -#include - -#include "patches/patchcode.h" -#include "apploader.h" -#include "wdvd.h" -#include "wpad.h" -#include "disc.h" -#include "alternatedol.h" -#include "fstfile.h" -#include "gecko.h" -#include "patches/wip.h" -#include "patches/dolpatcher.h" -#include "patches/gamepatches.h" -#include "settings/SettingsEnums.h" - -extern bool geckoinit; - -/* Apploader function pointers */ -typedef int (*app_main)(void **dst, int *size, int *offset); -typedef void (*app_init)(void(*report)(const char *fmt, ...)); -typedef void *(*app_final)(); -typedef void (*app_entry)(void(**init)(void(*report)(const char *fmt, ...)), int(**main)(), void *(**final)()); - -/* Apploader pointers */ -static u8 *appldr = (u8 *) 0x81200000; - -/* Constants */ -#define APPLDR_OFFSET 0x2440 - -/* Variables */ -static u32 buffer[0x20] ATTRIBUTE_ALIGN( 32 ); - -void gamepatches( u8 * dst, int len, u8 videoSelected, u8 languageChoice, u8 patchcountrystring, u8 vipatch, u8 cheat, u32 returnTo, u8 fix002 ) -{ - VideoModePatcher( dst, len, videoSelected ); - - if ( cheat ) - dogamehooks( dst, len ); - - if ( vipatch ) - vidolpatcher( dst, len ); - - /*LANGUAGE PATCH - FISHEARS*/ - langpatcher( dst, len, languageChoice ); - - /*Thanks to WiiPower*/ - if ( patchcountrystring == 1 ) - PatchCountryStrings( dst, len ); - - do_wip_code( ( u8 * ) dst, len ); - - if ( fix002 == 2 ) - Anti_002_fix( dst, len ); - - PatchReturnTo( dst, len, returnTo ); -} - -s32 Apploader_Run(entry_point *entry, char * dolpath, u8 cheat, u8 videoSelected, u8 languageChoice, u8 vipatch, u8 patchcountrystring, - u8 alternatedol, u32 alternatedoloffset, u32 returnTo, u8 fix002) -{ - app_entry appldr_entry; - app_init appldr_init; - app_main appldr_main; - app_final appldr_final; - - u32 appldr_len; - s32 ret; - gprintf("\nApploader_Run() started\n"); - - /* Read apploader header */ - ret = WDVD_Read(buffer, 0x20, APPLDR_OFFSET); - if (ret < 0) return ret; - - /* Calculate apploader length */ - appldr_len = buffer[5] + buffer[6]; - - /* Read apploader code */ - ret = WDVD_Read(appldr, appldr_len, APPLDR_OFFSET + 0x20); - if (ret < 0) return ret; - - /* Set apploader entry function */ - appldr_entry = (app_entry) buffer[4]; - - /* Call apploader entry */ - appldr_entry(&appldr_init, &appldr_main, &appldr_final); - - /* Initialize apploader */ - appldr_init(gprintf); - - if (fix002 != 0) - { - /* ERROR 002 fix (thanks to WiiPower for sharing this)*/ - *(u32 *) 0x80003188 = *(u32 *) 0x80003140; - } - - for (;;) - { - void *dst = NULL; - int len = 0, offset = 0; - - /* Run apploader main function */ - ret = appldr_main(&dst, &len, &offset); - if (!ret) break; - - /* Read data from DVD */ - WDVD_Read(dst, len, (u64) (offset << 2)); - - if( !alternatedol ) - gamepatches(dst, len, videoSelected, languageChoice, patchcountrystring, vipatch, cheat, returnTo, fix002 ); - - DCFlushRange(dst, len); - } - - *entry = appldr_final(); - - /** Load alternate dol if set **/ - if (alternatedol == ALT_DOL_FROM_SD_USB) - { - wip_reset_counter(); - void *dolbuffer = NULL; - int dollen = 0; - - bool dolloaded = Load_Dol(&dolbuffer, &dollen, dolpath); - if (dolloaded) - { - *entry = (entry_point) load_dol_image(dolbuffer, videoSelected, languageChoice, patchcountrystring, vipatch, cheat, fix002, returnTo); - } - - if (dolbuffer) free(dolbuffer); - } - else if (alternatedol == ALT_DOL_FROM_GAME && alternatedoloffset != 0) - { - wip_reset_counter(); - FST_ENTRY *fst = (FST_ENTRY *) *(u32 *) 0x80000038; - - //! Check if it's inside the limits - if(alternatedoloffset >= fst[0].filelen) - return 0; - - *entry = (entry_point) Load_Dol_from_disc(fst[alternatedoloffset].fileoffset, videoSelected, languageChoice, - patchcountrystring, vipatch, cheat, fix002, returnTo); - } - - return 0; -} diff --git a/source/usbloader/apploader.h b/source/usbloader/apploader.h deleted file mode 100644 index 477a4884..00000000 --- a/source/usbloader/apploader.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef _APPLOADER_H_ -#define _APPLOADER_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - - /* Entry point */ - typedef void (*entry_point)(void); - - /* Prototypes */ - s32 Apploader_Run(entry_point *entry, char * dolpath, u8 cheat, u8 videoSelected, u8 languageChoice, u8 vipatch, - u8 patchcountrystring, u8 alternatedol, u32 alternatedoloffset, u32 returnTo, u8 fix002); - void gamepatches( u8 * dst, int len, u8 videoSelected, u8 languageChoice, u8 patchcountrystring, u8 vipatch, u8 cheat, u32 returnTo, u8 fix002 ); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/usbloader/disc.c b/source/usbloader/disc.c deleted file mode 100644 index 2fb998ce..00000000 --- a/source/usbloader/disc.c +++ /dev/null @@ -1,405 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#include "patches/fst.h" -#include "patches/gamepatches.h" -#include "patches/wip.h" -#include "apploader.h" -#include "disc.h" -#include "video.h" -#include "wdvd.h" -#include "frag.h" -#include "alternatedol.h" -#include "memory/memory.h" -#include "wbfs.h" -#include "../settings/SettingsEnums.h" -#include "../gecko.h" - -/* Constants */ -#define PTABLE_OFFSET 0x40000 -#define WII_MAGIC 0x5D1C9EA3 - -/* Disc pointers */ -static u32 *buffer = (u32 *) 0x93000000; -static u8 *diskid = (u8 *) Disc_ID; - -void __Disc_SetLowMem(void) -{ - - *Sys_Magic = 0x0D15EA5E; // Standard Boot Code - *Version = 0x00000001; // Version - *Arena_L = 0x00000000; // Arena Low - *BI2 = 0x817E5480; // BI2 - *Bus_Speed = 0x0E7BE2C0; // Console Bus Speed - *CPU_Speed = 0x2B73A840; // Console CPU Speed - - /* Setup low memory */ - *Assembler = 0x38A00040; // Assembler - *(u32 *) 0x800000E4 = 0x80431A80; - *Dev_Debugger = 0x81800000; // Dev Debugger Monitor Address - *Simulated_Mem = 0x01800000; // Simulated Memory Size - *(vu32 *) 0xCD00643C = 0x00000000; // 32Mhz on Bus - - //If the game is sam & max: season 1 put this shit in - if ((strncmp((char*) Disc_ID, "R3XE6U", 6) == 0) || (strncmp((char*) Disc_ID, "R3XP6V", 6) == 0)) - { - *GameID_Address = 0x80000000; // Game ID Address - } - - /* Copy disc ID */ - memcpy((void *) Online_Check, (void *) Disc_ID, 4); - - /* Flush cache */ - DCFlushRange((void *) Disc_ID, 0x3F00); -} - -void __Disc_SetVMode(u8 videoselected) -{ - GXRModeObj *vmode = NULL; - - u32 progressive, tvmode, vmode_reg = 0; - - /* Get video mode configuration */ - progressive = (CONF_GetProgressiveScan() > 0) && VIDEO_HaveComponentCable(); - tvmode = CONF_GetVideo(); - - /* Select video mode register */ - switch (tvmode) - { - case CONF_VIDEO_PAL: - vmode_reg = (CONF_GetEuRGB60() > 0) ? 5 : 1; - break; - - case CONF_VIDEO_MPAL: - vmode_reg = 4; - break; - - case CONF_VIDEO_NTSC: - vmode_reg = 0; - break; - } - - switch (videoselected) - { - case VIDEO_MODE_PAL50: - vmode = &TVPal528IntDf; - vmode_reg = (vmode->viTVMode) >> 2; - break; - - case VIDEO_MODE_PAL60: - vmode = (progressive) ? &TVNtsc480Prog : &TVEurgb60Hz480IntDf; - vmode_reg = (vmode->viTVMode) >> 2; - break; - - case VIDEO_MODE_NTSC: - vmode = (progressive) ? &TVNtsc480Prog : &TVNtsc480IntDf; - vmode_reg = (vmode->viTVMode) >> 2; - break; - - default: - case VIDEO_MODE_SYSDEFAULT: - // vmode = VIDEO_GetPreferredMode(NULL); - break; - - case VIDEO_MODE_DISCDEFAULT: - /* Select video mode */ - switch (diskid[3]) - { - /* PAL */ - case 'P': - case 'D': - case 'F': - case 'I': - case 'S': - case 'H': - case 'X': - case 'Y': - case 'Z': - if (tvmode != CONF_VIDEO_PAL) - { - vmode_reg = 5; - vmode = (progressive) ? &TVNtsc480Prog : &TVEurgb60Hz480IntDf; - } - break; - - /* NTSC or unknown */ - case 'E': - case 'J': - case 'K': - case 'W': - if (tvmode != CONF_VIDEO_NTSC) - { - vmode_reg = 0; - vmode = (progressive) ? &TVNtsc480Prog : &TVNtsc480IntDf; - } - break; - } - break; - } - - /* Set video mode register */ - *Video_Mode = vmode_reg; - - /* Set video mode */ - if (vmode) - { - - VIDEO_Configure(vmode); - - /* Setup video */ - VIDEO_SetBlack(FALSE); - VIDEO_Flush(); - VIDEO_WaitVSync(); - - if (vmode->viTVMode & VI_NON_INTERLACE) VIDEO_WaitVSync(); - } - gprintf("Video mode - %s\n", ((progressive) ? "progressive" : "interlaced")); - -} - -void __Disc_SetTime(void) -{ - /* Extern */ - extern void settime(u64); - - /* Set proper time */ - settime(secs_to_ticks( time( NULL ) - 946684800 )); -} - -s32 __Disc_FindPartition(u64 *outbuf) -{ - u64 offset = 0, table_offset = 0; - - u32 cnt, nb_partitions; - s32 ret; - - /* Read partition info */ - ret = WDVD_UnencryptedRead(buffer, 0x20, PTABLE_OFFSET); - if (ret < 0) return ret; - - /* Get data */ - nb_partitions = buffer[0]; - table_offset = buffer[1] << 2; - - /* Read partition table */ - ret = WDVD_UnencryptedRead(buffer, 0x20, table_offset); - if (ret < 0) return ret; - - /* Find game partition */ - for (cnt = 0; cnt < nb_partitions; cnt++) - { - u32 type = buffer[cnt * 2 + 1]; - - /* Game partition */ - if (!type) offset = buffer[cnt * 2] << 2; - } - - /* No game partition found */ - if (!offset) return -1; - - /* Set output buffer */ - *outbuf = offset; - - return 0; -} - -s32 Disc_Init(void) -{ - /* Init DVD subsystem */ - return WDVD_Init(); -} - -s32 Disc_Open(void) -{ - s32 ret; - - /* Reset drive */ - ret = WDVD_Reset(); - if (ret < 0) return ret; - - /* Read disc ID */ - return WDVD_ReadDiskId(diskid); -} - -s32 Disc_Wait(void) -{ - u32 cover = 0; - s32 ret; - - /* Wait for disc */ - while (!(cover & 0x2)) - { - /* Get cover status */ - ret = WDVD_GetCoverStatus(&cover); - if (ret < 0) return ret; - } - - return 0; -} - -s32 Disc_SetUSB(const u8 *id) -{ - /* Set USB mode */ - return WDVD_SetUSBMode((u8 *) id, -1); -} - -s32 Disc_ReadHeader(void *outbuf) -{ - /* Read disc header */ - return WDVD_UnencryptedRead(outbuf, sizeof(struct discHdr), 0); -} - -s32 Disc_IsWii(void) -{ - struct discHdr *header = (struct discHdr *) buffer; - - s32 ret; - - /* Read disc header */ - ret = Disc_ReadHeader(header); - if (ret < 0) return ret; - - /* Check magic word */ - if (header->magic != WII_MAGIC) return -1; - - return 0; -} - -s32 Disc_JumpToEntrypoint(u8 videoselected, bool enablecheat, u32 dolparameter) -{ - /* Set an appropiate video mode */ - __Disc_SetVMode(videoselected); - - /* Set time */ - __Disc_SetTime(); - - // Anti-green screen fix - VIDEO_SetBlack(TRUE); - VIDEO_Flush(); - VIDEO_WaitVSync(); - VIDEO_WaitVSync(); - gprintf("USB Loader GX is done.\n"); - - /* Shutdown IOS subsystems */ - extern void __exception_closeall(); - u32 level = IRQ_Disable(); - __IOS_ShutdownSubsystems(); - __exception_closeall(); - - /* Originally from tueidj - taken from NeoGamme (thx) */ - *(vu32*)0xCC003024 = dolparameter != 0 ? dolparameter : 1; - - if (enablecheat) - { - __asm__( - "lis %r3, AppEntrypoint@h\n" - "ori %r3, %r3, AppEntrypoint@l\n" - "lwz %r3, 0(%r3)\n" - "mtlr %r3\n" - "lis %r3, 0x8000\n" - "ori %r3, %r3, 0x18A8\n" - "mtctr %r3\n" - "bctr\n" - ); - } - else - { - __asm__( - "lis %r3, AppEntrypoint@h\n" - "ori %r3, %r3, AppEntrypoint@l\n" - "lwz %r3, 0(%r3)\n" - "mtlr %r3\n" - "blr\n" - ); - } - - IRQ_Restore(level); - - return 0; -} - -void PatchCountryStrings(void *Address, int Size) -{ - u8 SearchPattern[4] = { 0x00, 0x00, 0x00, 0x00 }; - u8 PatchData[4] = { 0x00, 0x00, 0x00, 0x00 }; - u8 *Addr = (u8*) Address; - - int wiiregion = CONF_GetRegion(); - - switch (wiiregion) - { - case CONF_REGION_JP: - SearchPattern[0] = 0x00; - SearchPattern[1] = 0x4A; // J - SearchPattern[2] = 0x50; // P - break; - case CONF_REGION_EU: - SearchPattern[0] = 0x02; - SearchPattern[1] = 0x45; // E - SearchPattern[2] = 0x55; // U - break; - case CONF_REGION_KR: - SearchPattern[0] = 0x04; - SearchPattern[1] = 0x4B; // K - SearchPattern[2] = 0x52; // R - break; - case CONF_REGION_CN: - SearchPattern[0] = 0x05; - SearchPattern[1] = 0x43; // C - SearchPattern[2] = 0x4E; // N - break; - case CONF_REGION_US: - default: - SearchPattern[0] = 0x01; - SearchPattern[1] = 0x55; // U - SearchPattern[2] = 0x53; // S - } - - switch (diskid[3]) - { - case 'J': - PatchData[1] = 0x4A; // J - PatchData[2] = 0x50; // P - break; - - case 'D': - case 'F': - case 'P': - case 'X': - case 'Y': - PatchData[1] = 0x45; // E - PatchData[2] = 0x55; // U - break; - - case 'E': - default: - PatchData[1] = 0x55; // U - PatchData[2] = 0x53; // S - } - - while (Size >= 4) - { - if (Addr[0] == SearchPattern[0] && Addr[1] == SearchPattern[1] && Addr[2] == SearchPattern[2] && Addr[3] - == SearchPattern[3]) - { - //*Addr = PatchData[0]; - Addr += 1; - *Addr = PatchData[1]; - Addr += 1; - *Addr = PatchData[2]; - Addr += 1; - //*Addr = PatchData[3]; - Addr += 1; - Size -= 4; - } - else - { - Addr += 4; - Size -= 4; - } - } -} diff --git a/source/usbloader/disc.h b/source/usbloader/disc.h deleted file mode 100644 index 68f42e73..00000000 --- a/source/usbloader/disc.h +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef _DISC_H_ -#define _DISC_H_ - -#include /* for define ATTRIBUTE_PACKED */ - -#ifdef __cplusplus -extern "C" -{ -#endif - - /* Disc header structure */ - struct discHdr - { - /* Game ID */ - u8 id[6]; - - /* Game version */ - u16 version; - - /* Audio streaming */ - u8 streaming; - u8 bufsize; - - /* Padding */ - u8 is_ciso; - u8 unused1[13]; - - /* Magic word */ - u32 magic; - - /* Padding */ - u8 unused2[4]; - - /* Game title */ - char title[64]; - - /* Encryption/Hashing */ - u8 encryption; - u8 h3_verify; - - /* Padding */ - u8 unused3[30]; - } ATTRIBUTE_PACKED; - - /* Prototypes */ - s32 Disc_Init(void); - s32 Disc_Open(void); - s32 Disc_Wait(void); - void __Disc_SetLowMem(void); - s32 Disc_SetUSB(const u8 *); - s32 Disc_ReadHeader(void *); - s32 Disc_IsWii(void); - s32 __Disc_FindPartition(u64 *outbuf); - void PatchCountryStrings(void *Address, int Size); - s32 __Disc_FindPartition(u64 *outbuf); - s32 Disc_JumpToEntrypoint(u8 videoselected, bool enablecheat, u32 dolparameter); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/usbloader/frag.c b/source/usbloader/frag.c deleted file mode 100644 index 94bcc2c1..00000000 --- a/source/usbloader/frag.c +++ /dev/null @@ -1,291 +0,0 @@ -#include -#include -#include -#include -#include - -#include "libs/libwbfs/libwbfs.h" -#include "libs/libfat/fatfile_frag.h" -#include "libs/libntfs/ntfsfile_frag.h" -#include "libs/libext2fs/ext2_frag.h" - -#include "usbloader/wbfs.h" -#include "usbloader/wdvd.h" -#include "usbloader/usbstorage2.h" -#include "frag.h" -#include "sys.h" -#include "gecko.h" - -#define SAFE_FREE(x) if(x) { free(x); x = NULL; } - -static FragList *frag_list = NULL; - -void frag_init(FragList *ff, int maxnum) -{ - memset(ff, 0, sizeof(Fragment) * (maxnum+1)); - ff->maxnum = maxnum; -} - -void frag_dump(FragList *ff) -{ - u32 i; - gprintf("frag list: %d %d 0x%x\n", ff->num, ff->size, ff->size); - for (i=0; inum; i++) { - if (i>10) { - gprintf("...\n"); - break; - } - gprintf(" %d : %8x %8x %8x\n", i, - ff->frag[i].offset, - ff->frag[i].count, - ff->frag[i].sector); - } -} - -int frag_append(void *f, u32 offset, u32 sector, u32 count) -{ - FragList *ff = (FragList *) f; - 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_concat(FragList *ff, FragList *src) -{ - u32 i; - int ret; - u32 size = ff->size; - //printf("concat: %d %d <- %d %d\n", ff->num, ff->size, src->num, src->size); - for (i=0; inum; 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) -{ - u32 i; - u32 delta; - //printf("frag_get(%u %u)\n", offset, count); - for (i=0; inum; 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) -{ - u32 i; - int ret; - u32 offset; - u32 sector; - u32 count; - u32 delta; - for (i=0; inum; i++) { - delta = 0; - count = 0; - do { - ret = frag_get(phy, - log->frag[i].sector + delta + count, - log->frag[i].count - delta - count, - &offset, §or, &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_for_file(char *fname, u8 *id, const u8 wbfs_part_fs, const u32 lba_offset) -{ - struct stat st; - FragList *fs = NULL; - FragList *fa = NULL; - FragList *fw = NULL; - int ret; - u32 i, j; - int is_wbfs = 0; - int ret_val = -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; - } - if (wbfs_part_fs == PART_FS_FAT) { - ret = _FAT_get_fragments(fname, &frag_append, fs); - if (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) { - ret_val = ret; - goto out; - } - // offset to start of partition - for (j=0; jnum; j++) { - fs->frag[j].sector += lba_offset; - } - } else if (wbfs_part_fs == PART_FS_EXT) { - ret = _EXT2_get_fragments(fname, &frag_append, fs); - if (ret) { - ret_val = ret; - goto out; - } - // offset to start of partition - for (j=0; jnum; j++) { - fs->frag[j].sector += lba_offset; - } - } else if (wbfs_part_fs == PART_FS_WBFS) { - // if wbfs file format, remap. - wbfs_disc_t *d = WBFS_OpenDisc(id); - if (!d) { ret_val = -4; WBFS_CloseDisc(d); goto out; } - ret = wbfs_get_fragments(d, &frag_append, fs); - WBFS_CloseDisc(d); - if (ret) { ret_val = -5; goto out; } - } - frag_concat(fa, fs); - } - - frag_list = memalign(32, (sizeof(FragList)+31)&(~31)); - frag_init(frag_list, MAX_FRAG); - if (is_wbfs) { - // if wbfs file format, remap. - wbfs_disc_t *d = WBFS_OpenDisc(id); - if (!d) { ret_val = -4; goto out; } - frag_init(fw, MAX_FRAG); - ret = wbfs_get_fragments(d, &frag_append, fw); - if (ret) { ret_val = -5; goto out; } - WBFS_CloseDisc(d); - // DEBUG: frag_list->num = MAX_FRAG-10; // stress test - ret = frag_remap(frag_list, fw, fa); - if (ret) { ret_val = -6; goto out; } - } else { - // .iso does not need remap just copy - 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 get_frag_list(u8 *id) -{ - return WBFS_GetFragList(id); -} - -int set_frag_list(u8 *id) -{ - if (frag_list == NULL) { - return -2; - } - - // (+1 for header which is same size as fragment) - int size = sizeof(Fragment) * (frag_list->num + 1); - - gprintf("Calling WDVD_SetFragList, frag list size %d\n", size); - int ret = WDVD_SetFragList(WBFS_MIN_DEVICE, frag_list, size); - - free(frag_list); - frag_list = NULL; - - if (ret) - return ret; - - // verify id matches - char discid[8]; - memset(discid, 0, sizeof(discid)); - ret = WDVD_UnencryptedRead(discid, 8, 0); - gprintf("Reading ID after setting fraglist: %s (expected: %s)\n", discid, id); - return (strncasecmp((char *) id, discid, 6) != 0) ? -3 : 0; -} diff --git a/source/usbloader/frag.h b/source/usbloader/frag.h deleted file mode 100644 index f2d60082..00000000 --- a/source/usbloader/frag.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef _FRAG_H_ -#define _FRAG_H_ -// 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 "gctypes.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; - -void frag_init(FragList *ff, int maxnum); -void frag_dump(FragList *ff); -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_for_file(char *fname, u8 *id, const u8 wbfs_part_fs, const u32 lba_offset); -int get_frag_list(u8 *id); -int set_frag_list(u8 *id); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/usbloader/fstfile.c b/source/usbloader/fstfile.c deleted file mode 100644 index 116f1b34..00000000 --- a/source/usbloader/fstfile.c +++ /dev/null @@ -1,48 +0,0 @@ -#include - -#include "fstfile.h" - -char *fstfiles(FST_ENTRY *fst, u32 index) -{ - u32 count = fst[0].filelen; - u32 stringoffset; - if (index < count) - { - stringoffset = *(u32 *) &(fst[index]) % (256 * 256 * 256); - return (char *) ((u32) fst + count * 12 + stringoffset); - } - else - { - return NULL; - } -} - -char *fstfilename(u32 index) -{ - FST_ENTRY *fst = (FST_ENTRY *) *(u32 *) 0x80000038; - u32 count = fst[0].filelen; - u32 stringoffset; - if (index < count) - { - stringoffset = *(u32 *) &(fst[index]) % (256 * 256 * 256); - return (char *) (*(u32 *) 0x80000038 + count * 12 + stringoffset); - } - else - { - return NULL; - } -} - -u32 fstfileoffset(u32 index) -{ - FST_ENTRY *fst = (FST_ENTRY *) *(u32 *) 0x80000038; - u32 count = fst[0].filelen; - if (index < count) - { - return fst[index].fileoffset; - } - else - { - return 0; - } -} diff --git a/source/usbloader/fstfile.h b/source/usbloader/fstfile.h deleted file mode 100644 index dc72b14b..00000000 --- a/source/usbloader/fstfile.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef _FSTFILE_H_ -#define _FSTFILE_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - - typedef struct - { - u8 filetype; - char name_offset[3]; - u32 fileoffset; - u32 filelen; - }__attribute__( ( packed ) ) FST_ENTRY; - - char *fstfiles(FST_ENTRY *fst, u32 index); - char *fstfilename(u32 index); - u32 fstfileoffset(u32 index); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/usbloader/playlog.c b/source/usbloader/playlog.c deleted file mode 100644 index 35c78fa9..00000000 --- a/source/usbloader/playlog.c +++ /dev/null @@ -1,163 +0,0 @@ -/* - PLAYLOG.C - This code allows to modify play_rec.dat in order to store the - game time in Wii's log correctly. - - by Marc - Thanks to tueidj for giving me some hints on how to do it :) - Most of the code was taken from here: - http://forum.wiibrew.org/read.php?27,22130 - - Modified by Dimok -*/ - -#include -#include -#include -#include -#include "gecko.h" -#include "utils/tools.h" - -#define SECONDS_TO_2000 946684800LL -#define TICKS_PER_SECOND 60750000LL - -//! Should be 32 byte aligned -static const char PLAYRECPATH[] ATTRIBUTE_ALIGN(32) = "/title/00000001/00000002/data/play_rec.dat"; - -typedef struct _PlayRec -{ - u32 checksum; - union - { - u32 data[31]; - struct - { - u16 name[42]; - u64 ticks_boot; - u64 ticks_last; - char title_id[6]; - char unknown[18]; - } ATTRIBUTE_PACKED; - }; -} PlayRec; - -// Thanks to Dr. Clipper -static u64 getWiiTime(void) -{ - time_t uTime = time(NULL); - return TICKS_PER_SECOND * (uTime - SECONDS_TO_2000); -} - -int Playlog_Create(void) -{ - s32 fd = IOS_Open(PLAYRECPATH, IPC_OPEN_RW); - if(fd >= 0) - { - //exists - IOS_Close(fd); - return 0; - } - - ISFS_Initialize(); - - //In case the play_rec.dat wasn´t found create one and try again - int ret = ISFS_CreateFile(PLAYRECPATH, 0, 3, 3, 3); - if(ret >= 0) - ISFS_SetAttr(PLAYRECPATH, 0x1000, 1, 0, 3, 3, 3); - - ISFS_Deinitialize(); - - return ret; -} - -int Playlog_Update(const char * ID, const u16 * title) -{ - if(!ID || !title) - return -1; - - s32 fd = -1, res = -1; - u32 sum = 0; - u8 i; - - //Open play_rec.dat - fd = IOS_Open(PLAYRECPATH, IPC_OPEN_RW); - if(fd == -106) - { - //In case the play_rec.dat wasn´t found create one and try again - int ret = Playlog_Create(); - if(ret < 0) - return ret; - - fd = IOS_Open(PLAYRECPATH, IPC_OPEN_RW); - } - - if(fd < 0) - return res; - - PlayRec * playrec_buf = memalign(32, ALIGN32(sizeof(PlayRec))); //! Should be 32 byte aligned - if(!playrec_buf) - { - IOS_Close(fd); - return res; - } - - memset(playrec_buf, 0, sizeof(PlayRec)); - - u64 stime = getWiiTime(); - playrec_buf->ticks_boot = stime; - playrec_buf->ticks_last = stime; - - //Update channel name and ID - memcpy(playrec_buf->name, title, 84); - memcpy(playrec_buf->title_id, ID, 6); - - //Calculate and update checksum - for(i = 0; i < 31; i++) - sum += playrec_buf->data[i]; - - playrec_buf->checksum = sum; - - //Write play_rec.dat - if(IOS_Write(fd, playrec_buf, sizeof(PlayRec)) == sizeof(PlayRec)) - res = 0; - - IOS_Close(fd); - - free(playrec_buf); - - return res; -} - -int Playlog_Delete(void) -{ - s32 res = -1; - - //Open play_rec.dat - s32 fd = IOS_Open(PLAYRECPATH, IPC_OPEN_RW); - if(fd < 0) - return fd; - - PlayRec * playrec_buf = memalign(32, ALIGN32(sizeof(PlayRec))); - if(!playrec_buf) - goto cleanup; - - //Read play_rec.dat - if(IOS_Read(fd, playrec_buf, sizeof(PlayRec)) != sizeof(PlayRec)) - goto cleanup; - - if(IOS_Seek(fd, 0, 0) < 0) - goto cleanup; - - // invalidate checksum - playrec_buf->checksum = 0; - - if(IOS_Write(fd, playrec_buf, sizeof(PlayRec)) != sizeof(PlayRec)) - goto cleanup; - - res = 0; - -cleanup: - free(playrec_buf); - IOS_Close(fd); - return res; -} diff --git a/source/usbloader/playlog.h b/source/usbloader/playlog.h deleted file mode 100644 index 7a13f64b..00000000 --- a/source/usbloader/playlog.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef PLAYLOG_H_ -#define PLAYLOG_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -int Playlog_Create(void); -int Playlog_Update(const char * ID, const u16 * title); -int Playlog_Delete(void); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/usbloader/sdhc.c b/source/usbloader/sdhc.c deleted file mode 100644 index 249fe790..00000000 --- a/source/usbloader/sdhc.c +++ /dev/null @@ -1,215 +0,0 @@ -#include -#include -#include -#include - -#include "sdhc.h" - -/* IOCTL comamnds */ -#define IOCTL_SDHC_INIT 0x01 -#define IOCTL_SDHC_READ 0x02 -#define IOCTL_SDHC_WRITE 0x03 -#define IOCTL_SDHC_ISINSERTED 0x04 - -#define SDHC_HEAPSIZE 0x8000 -#define SDHC_MEM2_SIZE 0x10000 - -int sdhc_mode_sd = 0; - -/* Variables */ -static char fs[] ATTRIBUTE_ALIGN( 32 ) = "/dev/sdio/sdhc"; - -static s32 hid = -1, fd = -1; -static u32 sector_size = SDHC_SECTOR_SIZE; -static void *sdhc_buf2; - -extern void* SYS_AllocArena2MemLo(u32 size, u32 align); - -bool SDHC_Init(void) -{ - s32 ret; - - if (sdhc_mode_sd) - { - return __io_wiisd.startup(); - } - - /* Already open */ - if (fd >= 0) return true; - - /* Create heap */ - if (hid < 0) - { - hid = iosCreateHeap(SDHC_HEAPSIZE); - if (hid < 0) goto err; - } - - // allocate buf2 - if (sdhc_buf2 == NULL) - { - sdhc_buf2 = SYS_AllocArena2MemLo(SDHC_MEM2_SIZE, 32); - } - - /* Open SDHC device */ - fd = IOS_Open(fs, 0); - if (fd < 0) goto err; - - /* Initialize SDHC */ - ret = IOS_IoctlvFormat(hid, fd, IOCTL_SDHC_INIT, ":"); - if (ret) goto err; - - return true; - - err: - /* Close SDHC device */ - if (fd >= 0) - { - IOS_Close(fd); - fd = -1; - } - - return false; -} - -bool SDHC_Close(void) -{ - if (sdhc_mode_sd) - { - return __io_wiisd.shutdown(); - } - - /* Close SDHC device */ - if (fd >= 0) - { - IOS_Close(fd); - fd = -1; - } - - /*if (hid > 0) { - iosDestroyHeap(hid); - hid = -1; - }*/ - - return true; -} - -bool SDHC_IsInserted(void) -{ - s32 ret; - if (sdhc_mode_sd) - { - return __io_wiisd.isInserted(); - } - - /* Check if SD card is inserted */ - ret = IOS_IoctlvFormat(hid, fd, IOCTL_SDHC_ISINSERTED, ":"); - - return (!ret) ? true : false; -} - -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; - u32 len = (sector_size * count); - - s32 ret; - - /* Device not opened */ - if (fd < 0) return false; - - /* Buffer not aligned */ - if ((u32) buffer & 0x1F) - { - /* Allocate memory */ - //buf = iosAlloc(hid, len); - buf = sdhc_buf2; - if (!buf) return false; - } - - /* Read data */ - ret = IOS_IoctlvFormat(hid, fd, IOCTL_SDHC_READ, "ii:d", sector, count, buf, len); - - /* Copy data */ - if (buf != buffer) - { - memcpy(buffer, buf, len); - //iosFree(hid, buf); - } - - return (!ret) ? true : false; -} - -bool SDHC_WriteSectors(u32 sector, u32 count, void *buffer) -{ - if (sdhc_mode_sd) - { - return __io_wiisd.writeSectors(sector, count, buffer); - } - - void *buf = (void *) buffer; - u32 len = (sector_size * count); - - s32 ret; - - /* Device not opened */ - if (fd < 0) return false; - - /* Buffer not aligned */ - if ((u32) buffer & 0x1F) - { - /* Allocate memory */ - //buf = iosAlloc(hid, len); - buf = sdhc_buf2; - if (!buf) return false; - - /* Copy data */ - memcpy(buf, buffer, len); - } - - /* Read data */ - ret = IOS_IoctlvFormat(hid, fd, IOCTL_SDHC_WRITE, "ii:d", sector, count, buf, len); - - /* Free memory */ - //if (buf != buffer) - // iosFree(hid, buf); - - return (!ret) ? true : false; -} - -bool SDHC_ClearStatus(void) -{ - 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 = { DEVICE_TYPE_WII_SD, FEATURE_MEDIUM_CANREAD | FEATURE_MEDIUM_CANWRITE - | FEATURE_WII_SD, (FN_MEDIUM_STARTUP) &SDHC_Init, (FN_MEDIUM_ISINSERTED) &SDHC_IsInserted, - (FN_MEDIUM_READSECTORS) &SDHC_ReadSectors, (FN_MEDIUM_WRITESECTORS) &SDHC_WriteSectors, - (FN_MEDIUM_CLEARSTATUS) &SDHC_ClearStatus, - //(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 }; - diff --git a/source/usbloader/sdhc.h b/source/usbloader/sdhc.h deleted file mode 100644 index 7c405fed..00000000 --- a/source/usbloader/sdhc.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef _SDHC_H_ -#define _SDHC_H_ - -/* Constants */ -#define SDHC_SECTOR_SIZE 0x200 - -#ifdef __cplusplus -extern "C" -{ -#endif - - /* Prototypes */ - bool SDHC_Init(void); - bool SDHC_Close(void); - bool SDHC_ReadSectors(u32, u32, void *); - bool SDHC_WriteSectors(u32, u32, void *); - extern int sdhc_mode_sd; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/usbloader/splits.c b/source/usbloader/splits.c deleted file mode 100644 index 732a59bf..00000000 --- a/source/usbloader/splits.c +++ /dev/null @@ -1,348 +0,0 @@ -// by oggzee - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "splits.h" - -#define off64_t off_t -#define FMT_llu "%llu" -#define FMT_lld "%lld" - -#define split_error(x) do { printf("\nsplit error: %s\n\n",x); } while(0) - -// 1 cluster less than 4gb -u64 OPT_split_size = (u64) 4LL * 1024 * 1024 * 1024 - 32 * 1024; -// 1 cluster less than 2gb -//u64 OPT_split_size = (u64)2LL * 1024 * 1024 * 1024 - 32 * 1024; - -//split_info_t split; - -void split_get_fname(split_info_t *s, int idx, char *fname) -{ - strcpy(fname, s->fname); - if (idx == 0 && s->create_mode) - { - strcat(fname, ".tmp"); - } - else if (idx > 0) - { - char *c = fname + strlen(fname) - 1; - *c = '0' + idx; - } -} - -int split_open_file(split_info_t *s, int idx) -{ - int fd = s->fd[idx]; - if (fd >= 0) return fd; - char fname[1024]; - split_get_fname(s, idx, fname); - //char *mode = s->create_mode ? "wb+" : "rb+"; - int mode = s->create_mode ? (O_CREAT | O_RDWR) : O_RDWR; - //printf("SPLIT OPEN %s %s %d\n", fname, mode, idx); //Wpad_WaitButtons(); - //f = fopen(fname, mode); - fd = open(fname, mode); - if (fd < 0) return -1; - if (idx > 0 && s->create_mode) - { - printf("%s Split: %d %s \n", s->create_mode ? "Create" : "Read", idx, fname); - } - s->fd[idx] = fd; - return fd; -} - -// faster as it uses larger chunks than ftruncate internally -int write_zero(int fd, off_t size) -{ - int buf[0x4000]; //64kb - int chunk; - int ret; - memset(buf, 0, sizeof(buf)); - while (size) - { - chunk = size; - if (chunk > (int) sizeof(buf)) chunk = sizeof(buf); - ret = write(fd, buf, chunk); - //printf("WZ %d %d / %lld \n", ret, chunk, size); - size -= chunk; - if (ret < 0) return ret; - } - return 0; -} - -int split_fill(split_info_t *s, int idx, u64 size) -{ - int fd = split_open_file(s, idx); - off64_t fsize = lseek(fd, 0, SEEK_END); - if (fsize < (s64) size) - { - //printf("TRUNC %d "FMT_lld"\n", idx, size); Wpad_WaitButtons(); - //ftruncate(fd, size); - write_zero(fd, size - fsize); - return 1; - } - return 0; -} - -int split_get_file(split_info_t *s, u32 lba, u32 *sec_count, int fill) -{ - int fd; - if (lba >= s->total_sec) - { - fprintf(stderr, "SPLIT: invalid sector %u / %u\n", lba, (u32) s->total_sec); - return -1; - } - int idx; - idx = lba / s->split_sec; - if (idx >= s->max_split) - { - fprintf(stderr, "SPLIT: invalid split %d / %d\n", idx, s->max_split - 1); - return -1; - } - fd = s->fd[idx]; - if (fd < 0) - { - // opening new, make sure all previous are full - int i; - for (i = 0; i < idx; i++) - { - if (split_fill(s, i, s->split_size)) - { - printf("FILL %d\n", i); - } - } - fd = split_open_file(s, idx); - } - if (fd < 0) - { - fprintf(stderr, "SPLIT %d: no file\n", idx); - return -1; - } - u32 sec = lba % s->split_sec; // inside file - off64_t off = (off64_t ) sec * 512; - // num sectors till end of file - u32 to_end = s->split_sec - sec; - if (*sec_count > to_end) *sec_count = to_end; - if (s->create_mode) - { - if (fill) - { - // extend, so that read will be succesfull - split_fill(s, idx, off + 512 * (*sec_count)); - } - else - { - // fill up so that write continues from end of file - // shouldn't be necessary, but libfat looks buggy - // and this is faster - split_fill(s, idx, off); - } - } - lseek(fd, off, SEEK_SET); - return fd; -} - -int split_read_sector(void *_fp, u32 lba, u32 count, void*buf) -{ - split_info_t *s = _fp; - int fd; - u64 off = lba; - off *= 512ULL; - int i; - u32 chunk; - size_t ret; - //fprintf(stderr,"READ %d %d\n", lba, count); - for (i = 0; i < (int) count; i += chunk) - { - chunk = count - i; - fd = split_get_file(s, lba + i, &chunk, 1); - if (fd < 0) - { - fprintf(stderr, "\n\n"FMT_lld" %d %p\n", off, count, _fp); - split_error( "error seeking in disc partition" ); - return 1; - } - void *ptr = ((u8 *) buf) + (i * 512); - ret = read(fd, ptr, chunk * 512); - if (ret != chunk * 512) - { - fprintf(stderr, "error reading %u %u [%u] %u = %u\n", lba, count, i, chunk, ret); - split_error( "error reading disc" ); - return 1; - } - } - return 0; -} - -int split_write_sector(void *_fp, u32 lba, u32 count, void*buf) -{ - split_info_t *s = _fp; - int fd; - u64 off = lba; - off *= 512ULL; - int i; - u32 chunk; - size_t ret; - //printf("WRITE %d %d %p \n", lba, count, buf); - for (i = 0; i < (int) count; i += chunk) - { - chunk = count - i; - fd = split_get_file(s, lba + i, &chunk, 0); - //if (chunk != count) - // fprintf(stderr, "WRITE CHUNK %d %d/%d\n", lba+i, chunk, count); - if (fd < 0 || !chunk) - { - fprintf(stderr, "\n\n"FMT_lld" %d %p\n", off, count, _fp); - split_error( "error seeking in disc partition" ); - return 1; - } - //if (fwrite(buf+i*512, 512ULL, chunk, f) != chunk) { - //printf("write %d %p %d \n", fd, buf+i*512, chunk * 512); - void *ptr = ((u8 *) buf) + (i * 512); - ret = write(fd, ptr, chunk * 512); - //printf("write ret = %d \n", ret); - if (ret != chunk * 512) - { - split_error( "error writing disc" ); - return 1; - } - } - return 0; -} - -void split_init(split_info_t *s, char *fname) -{ - int i; - char *p; - //fprintf(stderr, "SPLIT_INIT %s\n", fname); - memset(s, 0, sizeof(*s)); - for (i = 0; i < MAX_SPLIT; i++) - { - s->fd[i] = -1; - } - strcpy(s->fname, fname); - s->max_split = 1; - p = strrchr(fname, '.'); - if (p && (strcasecmp(p, ".wbfs") == 0)) - { - s->max_split = MAX_SPLIT; - } -} - -void split_set_size(split_info_t *s, u64 split_size, u64 total_size) -{ - s->total_size = total_size; - s->split_size = split_size; - s->total_sec = total_size / 512; - s->split_sec = split_size / 512; -} - -void split_close(split_info_t *s) -{ - int i; - char fname[1024]; - char tmpname[1024]; - for (i = 0; i < s->max_split; i++) - { - if (s->fd[i] >= 0) - { - close(s->fd[i]); - } - } - if (s->create_mode) - { - split_get_fname(s, -1, fname); - split_get_fname(s, 0, tmpname); - rename(tmpname, fname); - } - memset(s, 0, sizeof(*s)); -} - -int split_create(split_info_t *s, char *fname, u64 split_size, u64 total_size, bool overwrite) -{ - int i; - int fd; - char sname[1024]; - int error = 0; - split_init(s, fname); - s->create_mode = 1; - // check if any file already exists - for (i = -1; i < s->max_split; i++) - { - split_get_fname(s, i, sname); - if (overwrite) - { - remove(sname); - } - else - { - fd = open(sname, O_RDONLY); - if (fd >= 0) - { - fprintf(stderr, "Error: file already exists: %s\n", sname); - close(fd); - error = 1; - } - } - } - if (error) - { - split_init(s, ""); - return -1; - } - split_set_size(s, split_size, total_size); - return 0; -} - -int split_open(split_info_t *s, char *fname) -{ - int i; - u64 size = 0; - u64 total_size = 0; - u64 split_size = 0; - int fd; - split_init(s, fname); - for (i = 0; i < s->max_split; i++) - { - fd = split_open_file(s, i); - if (fd < 0) - { - if (i == 0) goto err; - break; - } - // check previous size - all splits except last must be same size - if (i > 0 && size != split_size) - { - fprintf(stderr, "split %d: invalid size "FMT_lld"", i, size); - goto err; - } - // get size - //fseeko(f, 0, SEEK_END); - //size = ftello(f); - size = lseek(fd, 0, SEEK_END); - // check sector alignment - if (size % 512) - { - fprintf(stderr, "split %d: size ("FMT_lld") not sector (512) aligned!", i, size); - } - // first sets split size - if (i == 0) - { - split_size = size; - } - total_size += size; - } - split_set_size(s, split_size, total_size); - return 0; - err: split_close(s); - return -1; -} - diff --git a/source/usbloader/splits.h b/source/usbloader/splits.h deleted file mode 100644 index 5bd01aa6..00000000 --- a/source/usbloader/splits.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _SPLITS_H -#define _SPLITS_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -#define MAX_SPLIT 10 - - typedef struct split_info - { - char fname[1024]; - //FILE *f[MAX_SPLIT]; - int fd[MAX_SPLIT]; - //u64 fsize[MAX_SPLIT]; - u32 split_sec; - u32 total_sec; - u64 split_size; - u64 total_size; - int create_mode; - int max_split; - } split_info_t; - - void split_get_fname(split_info_t *s, int idx, char *fname); - //FILE *split_open_file(split_info_t *s, int idx); - //FILE *split_get_file(split_info_t *s, u32 lba, u32 *sec_count, int fill); - int split_open_file(split_info_t *s, int idx); - int split_get_file(split_info_t *s, u32 lba, u32 *sec_count, int fill); - int split_fill(split_info_t *s, int idx, u64 size); - int split_read_sector(void *_fp, u32 lba, u32 count, void*buf); - int split_write_sector(void *_fp, u32 lba, u32 count, void*buf); - void split_init(split_info_t *s, char *fname); - void split_set_size(split_info_t *s, u64 split_size, u64 total_size); - void split_close(split_info_t *s); - int split_open(split_info_t *s, char *fname); - int split_create(split_info_t *s, char *fname, u64 split_size, u64 total_size, bool overwrite); - -#ifdef __cplusplus -} -#endif - -#endif //_SPLITS_H diff --git a/source/usbloader/usbstorage2.c b/source/usbloader/usbstorage2.c deleted file mode 100644 index 29007ad8..00000000 --- a/source/usbloader/usbstorage2.c +++ /dev/null @@ -1,315 +0,0 @@ -/*------------------------------------------------------------- - - usbstorage_starlet.c -- USB mass storage support, inside starlet - Copyright (C) 2011 Dimok - Copyright (C) 2011 Rodries - Copyright (C) 2009 Kwiirk - - If this driver is linked before libogc, this will replace the original - usbstorage driver by svpe from libogc - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any - damages arising from the use of this software. - - Permission is granted to anyone to use this software for any - purpose, including commercial applications, and to alter it and - redistribute it freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you - must not claim that you wrote the original software. If you use - this software in a product, an acknowledgment in the product - documentation would be appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and - must not be misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source - distribution. - - -------------------------------------------------------------*/ - -#include -#include -#include -#include -#include "usbstorage2.h" -#include "memory/mem2.h" -#include "gecko.h" - - -/* IOCTL commands */ -#define UMS_BASE (('U'<<24)|('M'<<16)|('S'<<8)) -#define USB_IOCTL_UMS_INIT (UMS_BASE+0x1) -#define USB_IOCTL_UMS_GET_CAPACITY (UMS_BASE+0x2) -#define USB_IOCTL_UMS_READ_SECTORS (UMS_BASE+0x3) -#define USB_IOCTL_UMS_WRITE_SECTORS (UMS_BASE+0x4) -#define USB_IOCTL_UMS_READ_STRESS (UMS_BASE+0x5) -#define USB_IOCTL_UMS_SET_VERBOSE (UMS_BASE+0x6) -#define USB_IOCTL_UMS_UMOUNT (UMS_BASE+0x10) -#define USB_IOCTL_UMS_WATCHDOG (UMS_BASE+0x80) - -#define USB_IOCTL_UMS_TESTMODE (UMS_BASE+0x81) -#define USB_IOCTL_SET_PORT (UMS_BASE+0x83) - -#define WBFS_BASE (('W'<<24)|('F'<<16)|('S'<<8)) -#define USB_IOCTL_WBFS_OPEN_DISC (WBFS_BASE+0x1) -#define USB_IOCTL_WBFS_READ_DISC (WBFS_BASE+0x2) -#define USB_IOCTL_WBFS_SET_DEVICE (WBFS_BASE+0x50) -#define USB_IOCTL_WBFS_SET_FRAGLIST (WBFS_BASE+0x51) - -#define isMEM2Buffer(p) (((u32) p & 0x10000000) != 0) - -#define MAX_BUFFER_SECTORS 256 -#define UMS_HEAPSIZE 0x1000 - -/* Variables */ -static char fs[] ATTRIBUTE_ALIGN(32) = "/dev/usb2"; -static char fs2[] ATTRIBUTE_ALIGN(32) = "/dev/usb123"; -static char fs3[] ATTRIBUTE_ALIGN(32) = "/dev/usb/ehc"; - -static u8 * mem2_ptr = NULL; -static s32 hid = -1, fd = -1; -static u32 usb2_port = 0; //autodetect mode (works only with hermes ios & rodries ehcmodule) -u32 hdd_sector_size = 512; - -s32 USBStorage2_Init(void) -{ - s32 ret; - - /* Already open */ - if (fd >= 0) return 0; - - /* Create heap */ - if (hid < 0) - { - hid = iosCreateHeap(UMS_HEAPSIZE); - if (hid < 0) return IPC_ENOMEM; - } - - /* Open USB device */ - fd = IOS_Open(fs, 0); - if (fd < 0) fd = IOS_Open(fs2, 0); - if (fd < 0) fd = IOS_Open(fs3, 0); - if (fd < 0) return fd; - - IOS_IoctlvFormat(hid, fd, USB_IOCTL_SET_PORT, "i:", usb2_port); - - /* Initialize USB storage */ - ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_UMS_INIT, ":"); - if (ret < 0) goto err; - - /* Get device capacity */ - if (USBStorage2_GetCapacity(&hdd_sector_size) == 0) - { - ret = IPC_ENOENT; - goto err; - } - - return ret; // 0->HDD, 1->DVD - - err: - /* Close USB device */ - if (fd >= 0) - { - IOS_Close(fd); - fd = -1; - } - - return ret; -} - -void USBStorage2_Deinit(void) -{ - /* Close USB device */ - if (fd >= 0) - { - IOS_Close(fd); - fd = -1; - } - - hdd_sector_size = 512; -} - -s32 USBStorage2_SetPort(u32 port) -{ - //! Port = 2 is handle in the loader, no need to handle it in cIOS - if(port > 1) - return -1; - - if(port == usb2_port) - return 0; - - s32 ret = -1; - usb2_port = port; - - gprintf("Changing USB port to port %i....\n", port); - //must be called before USBStorage2_Init (default port 0) - if (fd >= 0) - ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_SET_PORT, "i:", usb2_port); - - return ret; -} - -s32 USBStorage2_GetPort() -{ - return usb2_port; -} - -s32 USBStorage2_Watchdog(u32 on_off) -{ - if (fd >= 0) - { - s32 ret; - - ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_UMS_WATCHDOG, "i:", on_off); - - return ret; - } - - return IPC_ENOENT; -} - -s32 USBStorage2_GetCapacity(u32 *_sector_size) -{ - if (fd >= 0) - { - s32 ret; - - ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_UMS_GET_CAPACITY, ":i", &hdd_sector_size); - - if (ret && _sector_size) *_sector_size = hdd_sector_size; - - return ret; - } - - return IPC_ENOENT; -} - -s32 USBStorage2_ReadSectors(u32 sector, u32 numSectors, void *buffer) -{ - u8 *buf = (u8 *) buffer; - s32 ret = -1; - - /* Device not opened */ - if (fd < 0) return fd; - - if (!mem2_ptr) - mem2_ptr = (u8 *) MEM2_alloc(hdd_sector_size * MAX_BUFFER_SECTORS); - - s32 read_secs, read_size; - - while(numSectors > 0) - { - read_secs = numSectors > MAX_BUFFER_SECTORS ? MAX_BUFFER_SECTORS : numSectors; - read_size = read_secs*hdd_sector_size; - - // Do not read more than MAX_BUFFER_SECTORS sectors at once and create a mem overflow! - if (!isMEM2Buffer(buffer)) - { - ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_UMS_READ_SECTORS, "ii:d", sector, read_secs, mem2_ptr, read_size); - if(ret < 0) - return ret; - - memcpy(buf, mem2_ptr, read_size); - } - else - { - /* Read data */ - ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_UMS_READ_SECTORS, "ii:d", sector, read_secs, buf, read_size); - if(ret < 0) - return ret; - } - - sector += read_secs; - numSectors -= read_secs; - buf += read_size; - } - - return ret; -} - -s32 USBStorage2_WriteSectors(u32 sector, u32 numSectors, const void *buffer) -{ - u8 *buf = (u8 *) buffer; - s32 ret = -1; - - /* Device not opened */ - if (fd < 0) return fd; - - /* Device not opened */ - if (!mem2_ptr) - mem2_ptr = (u8 *) MEM2_alloc(hdd_sector_size * MAX_BUFFER_SECTORS); - - s32 write_size, write_secs; - - while(numSectors > 0) - { - write_secs = numSectors > MAX_BUFFER_SECTORS ? MAX_BUFFER_SECTORS : numSectors; - write_size = write_secs*hdd_sector_size; - - /* MEM1 buffer */ - if (!isMEM2Buffer(buffer)) - { - // Do not read more than MAX_BUFFER_SECTORS sectors at once and create a mem overflow! - memcpy(mem2_ptr, buf, write_size); - - ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_UMS_WRITE_SECTORS, "ii:d", sector, write_secs, mem2_ptr, write_size); - if(ret < 0) - return ret; - } - else - { - /* Write data */ - ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_UMS_WRITE_SECTORS, "ii:d", sector, write_secs, buf, write_size); - if(ret < 0) - return ret; - } - - sector += write_secs; - numSectors -= write_secs; - buf += write_size; - } - - return ret; -} - -static bool __usbstorage_Startup(void) -{ - return USBStorage2_Init() >= 0; -} - -static bool __usbstorage_IsInserted(void) -{ - return (USBStorage2_GetCapacity(NULL) != 0); -} - -static bool __usbstorage_ReadSectors(u32 sector, u32 numSectors, void *buffer) -{ - return (USBStorage2_ReadSectors(sector, numSectors, buffer) >= 0); -} - -static bool __usbstorage_WriteSectors(u32 sector, u32 numSectors, const void *buffer) -{ - return (USBStorage2_WriteSectors(sector, numSectors, buffer) >= 0); -} - -static bool __usbstorage_ClearStatus(void) -{ - return true; -} - -static bool __usbstorage_Shutdown(void) -{ - USBStorage2_Deinit(); - return true; -} - -const DISC_INTERFACE __io_usbstorage2 = { - DEVICE_TYPE_WII_UMS, FEATURE_MEDIUM_CANREAD | FEATURE_MEDIUM_CANWRITE | FEATURE_WII_USB, - (FN_MEDIUM_STARTUP) &__usbstorage_Startup, - (FN_MEDIUM_ISINSERTED) &__usbstorage_IsInserted, - (FN_MEDIUM_READSECTORS) &__usbstorage_ReadSectors, - (FN_MEDIUM_WRITESECTORS) &__usbstorage_WriteSectors, - (FN_MEDIUM_CLEARSTATUS) &__usbstorage_ClearStatus, - (FN_MEDIUM_SHUTDOWN) &__usbstorage_Shutdown -}; diff --git a/source/usbloader/usbstorage2.h b/source/usbloader/usbstorage2.h deleted file mode 100644 index d47dcdb4..00000000 --- a/source/usbloader/usbstorage2.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef _USBSTORAGE2_H_ -#define _USBSTORAGE2_H_ - -#include "ogc/disc_io.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - - /* Prototypes */ - s32 USBStorage2_Init(void); - void USBStorage2_Deinit(void); - s32 USBStorage2_Umount(void); - s32 USBStorage2_GetCapacity(u32 *); - - s32 USBStorage2_ReadSectors(u32, u32, void *); - s32 USBStorage2_WriteSectors(u32, u32, const void *); - - s32 USBStorage2_Watchdog(u32 on_off); - - s32 USBStorage2_SetPort(u32 port); - s32 USBStorage2_GetPort(); - -#define DEVICE_TYPE_WII_UMS (('W'<<24)|('U'<<16)|('M'<<8)|'S') - - extern const DISC_INTERFACE __io_usbstorage2; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/usbloader/utils.c b/source/usbloader/utils.c deleted file mode 100644 index d7e46448..00000000 --- a/source/usbloader/utils.c +++ /dev/null @@ -1,7 +0,0 @@ -#include -#include - -u32 swap32(u32 x) -{ - return (x >> 24) | ((x << 8) & 0x00FF0000UL) | ((x >> 8) & 0x0000FF00UL) | (x << 24); -} diff --git a/source/usbloader/utils.h b/source/usbloader/utils.h deleted file mode 100644 index fd1e7ef1..00000000 --- a/source/usbloader/utils.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef _UTILS_H_ -#define _UTILS_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - - /* Constants */ -#define KB_SIZE 1024.0 -#define MB_SIZE 1048576.0 -#define GB_SIZE 1073741824.0 - - /* Macros */ -#define round_up(x,n) (-(-(x) & -(n))) - -#define SAFE_FREE(P) if(P){free(P);P=NULL;} - - /* Prototypes */ - u32 swap32(u32); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/usbloader/wbfs.cpp b/source/usbloader/wbfs.cpp deleted file mode 100644 index d47e6c99..00000000 --- a/source/usbloader/wbfs.cpp +++ /dev/null @@ -1,294 +0,0 @@ -#include -#include -#include -#include - -#include "Controls/DeviceHandler.hpp" -#include "usbloader/usbstorage2.h" -#include "wbfs.h" -#include "usbloader/wbfs/wbfs_base.h" -#include "usbloader/wbfs/wbfs_wbfs.h" -#include "usbloader/wbfs/wbfs_fat.h" -#include "usbloader/wbfs/wbfs_ntfs.h" -#include "usbloader/wbfs/wbfs_ext.h" - -#include "usbloader/GameList.h" -#include "menu/menus.h" -#include "gecko.h" - -#define VALID(x) (x >= 0 && x < (int) WbfsList.size() && WbfsList[x] != NULL) - -static std::vector WbfsList; - -wbfs_disc_t* WBFS_OpenDisc(u8 *discid) -{ - if(!discid) return NULL; - - int part = gameList.GetPartitionNumber(discid); - if(!VALID(part)) - return NULL; - - DeviceHandler::SetUSBPortFromPartition(part); - - return WbfsList[part]->OpenDisc(discid); -} - -void WBFS_CloseDisc(wbfs_disc_t *disc) -{ - if(!disc) return; - - struct discHdr * header = (struct discHdr *) disc->header; - int part_num = gameList.GetPartitionNumber(header->id); - if(!VALID(part_num)) - return; - - DeviceHandler::SetUSBPortFromPartition(part_num); - - WbfsList[part_num]->CloseDisc(disc); -} - -s32 WBFS_Init(u32 device) -{ - return Wbfs::Init(device); -} - -s32 WBFS_OpenAll() -{ - int ret = -1; - - PartitionHandle * usbHandle = DeviceHandler::Instance()->GetUSBHandle(); - - for(int i = 0; i < usbHandle->GetPartitionTotalCount(); ++i) - { - if(WBFS_OpenPart(i) == 0) - ret = 0; - } - - return ret; -} - -s32 WBFS_OpenPart(int part_num) -{ - PartitionHandle * usbHandle = DeviceHandler::Instance()->GetUSBHandle(); - if(part_num < 0 || part_num >= usbHandle->GetPartitionTotalCount()) - return -1; - - //! No need to switch ports on other partitions than WBFS - //! the open() function does not actually read from drive there. - if(strncmp(usbHandle->GetFSName(part_num), "WBFS", 4) == 0) - DeviceHandler::SetUSBPortFromPartition(part_num); - - // close - WBFS_Close(part_num); - - if(part_num >= (int) WbfsList.size()) - WbfsList.resize(part_num+1); - - gprintf("\tWBFS_OpenPart: filesystem: %s, start sector %u, sector count: %u\n", usbHandle->GetFSName(part_num), usbHandle->GetLBAStart(part_num), usbHandle->GetSecCount(part_num)); - - if (strncmp(usbHandle->GetFSName(part_num), "FAT", 3) == 0) - { - WbfsList[part_num] = new Wbfs_Fat(usbHandle->GetLBAStart(part_num), usbHandle->GetSecCount(part_num), part_num); - } - else if (strncmp(usbHandle->GetFSName(part_num), "NTFS", 4) == 0) - { - WbfsList[part_num] = new Wbfs_Ntfs(usbHandle->GetLBAStart(part_num), usbHandle->GetSecCount(part_num), part_num); - } - else if (strncmp(usbHandle->GetFSName(part_num), "LINUX", 5) == 0) - { - WbfsList[part_num] = new Wbfs_Ext(usbHandle->GetLBAStart(part_num), usbHandle->GetSecCount(part_num), part_num); - } - else if (strncmp(usbHandle->GetFSName(part_num), "WBFS", 4) == 0) - { - WbfsList[part_num] = new Wbfs_Wbfs(usbHandle->GetLBAStart(part_num), usbHandle->GetSecCount(part_num), part_num); - } - else - { - return -1; - } - - if (WbfsList[part_num]->Open() != 0) - { - delete WbfsList[part_num]; - WbfsList[part_num] = NULL; - return -1; - } - - return 0; -} - -bool WBFS_Close(int part_num) -{ - if(!VALID(part_num)) - return false; - - //! No need to switch ports on other partitions than WBFS - //! the close() function does not actually write to drive there. - if(WbfsList[part_num]->GetFSType() == PART_FS_WBFS) - DeviceHandler::SetUSBPortFromPartition(part_num); - - delete WbfsList[part_num]; - WbfsList[part_num] = NULL; - - gameList.RemovePartition(part_num); - - return true; -} - -void WBFS_CloseAll() -{ - gameList.clear(); - - for(u32 i = 0; i < WbfsList.size(); ++i) - WBFS_Close(i); -} - -s32 WBFS_Format(u32 lba, u32 size) -{ - Wbfs_Wbfs Part(WBFS_MIN_DEVICE, lba, size); - - return Part.Format(); -} - -s32 WBFS_GetCount(int part_num, u32 *count) -{ - if(!VALID(part_num)) - return -1; - - DeviceHandler::SetUSBPortFromPartition(part_num); - int ret = WbfsList[part_num]->GetCount(count); - - return ret; -} - -s32 WBFS_GetHeaders(int part_num, struct discHdr *outbuf, u32 cnt, u32 len) -{ - if(!VALID(part_num)) - return -1; - - DeviceHandler::SetUSBPortFromPartition(part_num); - - return WbfsList[part_num]->GetHeaders(outbuf, cnt, len); -} - -s32 WBFS_CheckGame(u8 *discid) -{ - int part_num = gameList.GetPartitionNumber(discid); - if(!VALID(part_num)) - return 0; - - DeviceHandler::SetUSBPortFromPartition(part_num); - - return WbfsList[part_num]->CheckGame(discid); -} - -s32 WBFS_AddGame(void) -{ - if(!VALID(Settings.partition)) - return -1; - - DeviceHandler::SetUSBPortFromPartition(Settings.partition); - - return WbfsList[Settings.partition]->AddGame(); -} - -s32 WBFS_RemoveGame(u8 *discid) -{ - int part_num = gameList.GetPartitionNumber(discid); - if(!VALID(part_num)) - return -1; - - DeviceHandler::SetUSBPortFromPartition(part_num); - - return WbfsList[part_num]->RemoveGame(discid); -} - -s32 WBFS_GameSize(u8 *discid, f32 *size) -{ - int part_num = gameList.GetPartitionNumber(discid); - if(!VALID(part_num)) - return -1; - - DeviceHandler::SetUSBPortFromPartition(part_num); - - return WbfsList[part_num]->GameSize(discid, size); -} - -s32 WBFS_DiskSpace(f32 *used, f32 *free) -{ - if(!VALID(Settings.partition)) - return -1; - - DeviceHandler::SetUSBPortFromPartition(Settings.partition); - - return WbfsList[Settings.partition]->DiskSpace(used, free); -} - -s32 WBFS_RenameGame(u8 *discid, const void *newname) -{ - int part_num = gameList.GetPartitionNumber(discid); - if(!VALID(part_num)) - return -1; - - DeviceHandler::SetUSBPortFromPartition(part_num); - - return WbfsList[part_num]->RenameGame(discid, newname); -} - -s32 WBFS_ReIDGame(u8 *discid, const void *newID) -{ - int part_num = gameList.GetPartitionNumber(discid); - if(!VALID(part_num)) - return -1; - - DeviceHandler::SetUSBPortFromPartition(part_num); - - return WbfsList[part_num]->ReIDGame(discid, newID); -} - -u64 WBFS_EstimeGameSize(void) -{ - if(!VALID(Settings.partition)) - return 0; - - DeviceHandler::SetUSBPortFromPartition(Settings.partition); - - return WbfsList[Settings.partition]->EstimateGameSize(); -} - -int WBFS_GetFragList(u8 *id) -{ - int part_num = gameList.GetPartitionNumber(id); - if(!VALID(part_num)) - return -1; - - DeviceHandler::SetUSBPortFromPartition(part_num); - - return WbfsList[part_num]->GetFragList(id); -} - -int MountWBFS(bool ShowGUI) -{ - if(ShowGUI) - return WBFS_Init(WBFS_DEVICE_USB); - - int ret = -1; - time_t currTime = time(0); - - while (time(0) - currTime < 30) - { - ret = WBFS_Init(WBFS_DEVICE_USB); - printf("%i...", int(time(0) - currTime)); - if (ret < 0) - sleep(1); - else - break; - - DeviceHandler::Instance()->UnMountAllUSB(); - DeviceHandler::Instance()->MountAllUSB(); - } - - printf("\n"); - - return ret; -} diff --git a/source/usbloader/wbfs.h b/source/usbloader/wbfs.h deleted file mode 100644 index 1e9f2f73..00000000 --- a/source/usbloader/wbfs.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef _WBFS_H_ -#define _WBFS_H_ - -#include "libs/libwbfs/libwbfs.h" -#include "usbloader/disc.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -#define PART_FS_WBFS 0 -#define PART_FS_FAT 1 -#define PART_FS_NTFS 2 -#define PART_FS_EXT 3 - - /* Macros */ -#define WBFS_MIN_DEVICE 1 -#define WBFS_MAX_DEVICE 2 - - /* Prototypes */ - s32 WBFS_Init(u32 device); - s32 WBFS_Format(u32 lba, u32 size); - s32 WBFS_GetCount(int part, u32 *count); - s32 WBFS_GetHeaders(int part, struct discHdr *, u32, u32); - s32 WBFS_CheckGame(u8 *gameid); - s32 WBFS_AddGame(void); - s32 WBFS_RemoveGame(u8 *gameid); - s32 WBFS_GameSize(u8 *gameid, f32 *size); - s32 WBFS_DiskSpace(f32 *used, f32 *free); - s32 WBFS_RenameGame(u8 *gameid, const void *newname); - s32 WBFS_ReIDGame(u8 *discid, const void *newID); - u64 WBFS_EstimeGameSize(void); - - int WBFS_GetFragList(u8 *id); - - s32 WBFS_OpenAll(); - s32 WBFS_OpenPart(int part_num); - wbfs_disc_t* WBFS_OpenDisc(u8 *discid); - void WBFS_CloseDisc(wbfs_disc_t *disc); - bool WBFS_Close(int part); - void WBFS_CloseAll(); - bool WBFS_Selected(); - int MountWBFS(bool ShowGUI); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/usbloader/wbfs/wbfs_base.cpp b/source/usbloader/wbfs/wbfs_base.cpp deleted file mode 100644 index ee811704..00000000 --- a/source/usbloader/wbfs/wbfs_base.cpp +++ /dev/null @@ -1,98 +0,0 @@ -#include -#include -#include -#include -#include - -#include "Controls/DeviceHandler.hpp" -#include "usbloader/sdhc.h" -#include "usbloader/usbstorage2.h" -#include "usbloader/wbfs.h" -#include "wbfs_rw.h" - -#include "wbfs_base.h" - -Wbfs::Wbfs(u32 l, u32 s, u32 part) - : hdd(NULL), lba(l), size(s), partition(part) -{ -} - -s32 Wbfs::Init(u32 device) -{ - s32 ret; - const DISC_INTERFACE * handle = DeviceHandler::GetUSBInterface(); - - switch (WBFS_DEVICE_USB) - { - case WBFS_DEVICE_USB: - /* Initialize USB storage */ - ret = handle->startup(); - if (ret) - { - currentHandle = handle; - /* Setup callbacks */ - readCallback = __ReadUSB; - writeCallback = __WriteUSB; - } - else - return -1; - break; - case WBFS_DEVICE_SDHC: - /* Initialize SDHC */ - ret = SDHC_Init(); - - if (ret) - { - /* Setup callbacks */ - readCallback = __ReadSDHC; - writeCallback = __WriteSDHC; - } - else return -1; - break; - } - - return 0; -} - -// Default behavior: can't format -s32 Wbfs::Format() -{ - return -1; -} - -s32 Wbfs::CheckGame(u8 *discid) -{ - wbfs_disc_t *disc = NULL; - - /* Try to open game disc */ - disc = OpenDisc(discid); - if (disc) - { - /* Close disc */ - CloseDisc(disc); - - return 1; - } - - return 0; -} - -s32 Wbfs::GameSize(u8 *discid, f32 *size) -{ - if(!discid) return 0; - - /* Open disc */ - wbfs_disc_t *disc = OpenDisc(discid); - if (!disc) return -2; - - u32 sectors = wbfs_disc_sector_used(disc); - - /* Copy value */ - if(size) - *size = (disc->p->wbfs_sec_sz / GB_SIZE) * sectors; - - /* Close disc */ - CloseDisc(disc); - - return 0; -} diff --git a/source/usbloader/wbfs/wbfs_base.h b/source/usbloader/wbfs/wbfs_base.h deleted file mode 100644 index f8d892d4..00000000 --- a/source/usbloader/wbfs/wbfs_base.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef _H -#define _H - -#include "libs/libwbfs/libwbfs.h" -#include "usbloader/utils.h" -#include "usbloader/frag.h" -#include "usbloader/wbfs.h" - -#define CACHE_SIZE 32 -#define CACHED_SECTORS 64 - -class Wbfs -{ - public: - Wbfs(u32 lba, u32 size, u32 part); - ~Wbfs() { Close(); }; - static s32 Init(u32); - s32 CheckGame(u8 *); - s32 GameSize(u8 *, f32 *); - bool IsMounted() { return hdd == 0; }; - virtual int GetFragList(u8 *id) { return 0; }; - - virtual s32 Open() = 0; - virtual void Close() {}; - virtual wbfs_disc_t* OpenDisc(u8 *discid) = 0; - virtual void CloseDisc(wbfs_disc_t *disc) = 0; - virtual s32 Format(); - virtual s32 GetCount(u32 *) = 0; - virtual s32 GetHeaders(struct discHdr *, u32, u32) = 0; - virtual s32 AddGame(void) = 0; - virtual s32 RemoveGame(u8 *) = 0; - virtual s32 DiskSpace(f32 *, f32 *) = 0; - virtual s32 RenameGame(u8 *, const void *) = 0; - virtual s32 ReIDGame(u8 *discid, const void *newID) = 0; - virtual u64 EstimateGameSize(void) = 0; - virtual u8 GetFSType(void) const { return PART_FS_WBFS; } - const wbfs_t *GetHDDHandle(void) { return hdd; } - protected: - wbfs_t *hdd; - const u32 lba; - const u32 size; - const u32 partition; -}; - -#endif //_H diff --git a/source/usbloader/wbfs/wbfs_ext.h b/source/usbloader/wbfs/wbfs_ext.h deleted file mode 100644 index 8822a0e0..00000000 --- a/source/usbloader/wbfs/wbfs_ext.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef _WBFS_EXT_H -#define _WBFS_EXT_H - -#include "wbfs_fat.h" - -class Wbfs_Ext: public Wbfs_Fat -{ - public: - Wbfs_Ext(u32 lba, u32 size, u32 part) : - Wbfs_Fat(lba, size, part) - { - } - virtual u8 GetFSType(void) { return PART_FS_EXT; } -}; - -#endif //_WBFS_NTFS_H diff --git a/source/usbloader/wbfs/wbfs_fat.cpp b/source/usbloader/wbfs/wbfs_fat.cpp deleted file mode 100644 index 12b0c265..00000000 --- a/source/usbloader/wbfs/wbfs_fat.cpp +++ /dev/null @@ -1,810 +0,0 @@ -// WBFS FAT by oggzee - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "Controls/DeviceHandler.hpp" -#include "FileOperations/fileops.h" -#include "settings/CSettings.h" -#include "settings/GameTitles.h" -#include "usbloader/disc.h" -#include "usbloader/usbstorage2.h" -#include "language/gettext.h" -#include "libs/libfat/fatfile_frag.h" -#include "utils/ShowError.h" -#include "wbfs_fat.h" -#include "prompts/ProgressWindow.h" -#include "usbloader/wbfs.h" -#include "usbloader/GameList.h" -#include "wbfs_rw.h" - -#include "gecko.h" - -#define MAX_FAT_PATH 1024 -#define TITLE_LEN 64 - -using namespace std; - -static const char wbfs_fat_dir[] = "/wbfs"; -static const char invalid_path[] = "/\\:|<>?*\"'"; -extern u32 hdd_sector_size; - -Wbfs_Fat::Wbfs_Fat(u32 lba, u32 size, u32 part) : - Wbfs(lba, size, part), fat_hdr_list(NULL), fat_hdr_count(0) -{ - memset(wbfs_fs_drive, 0, sizeof(wbfs_fs_drive)); -} - -s32 Wbfs_Fat::Open() -{ - Close(); - - PartitionHandle * usbHandle = DeviceHandler::Instance()->GetUSBHandle(); - - if(partition < (u32) usbHandle->GetPartitionTotalCount()) - { - if (lba == usbHandle->GetLBAStart(partition)) - { - sprintf(wbfs_fs_drive, "%s:", usbHandle->MountName(partition)); - return 0; - } - } - - return -1; -} - -void Wbfs_Fat::Close() -{ - if (hdd) - { - wbfs_close(hdd); - hdd = NULL; - } - - memset(wbfs_fs_drive, 0, sizeof(wbfs_fs_drive)); -} - -wbfs_disc_t* Wbfs_Fat::OpenDisc(u8 *discid) -{ - char fname[MAX_FAT_PATH]; - - // wbfs 'partition' file - if (!FindFilename(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 = (wbfs_disc_t *) 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 = (wbfs_disc_info_t*) malloc(sizeof(wbfs_disc_info_t)); - if(!iso_file->header) - { - free(iso_file); - return NULL; - } - read(fd, iso_file->header, sizeof(wbfs_disc_info_t)); - iso_file->i = fd; - return iso_file; - } - - wbfs_t *part = OpenPart(fname); - if (!part) return NULL; - - wbfs_disc_t *disc = wbfs_open_disc(part, discid); - if(!disc) - { - ClosePart(part); - return NULL; - } - - return disc; -} - -void Wbfs_Fat::CloseDisc(wbfs_disc_t* disc) -{ - if (!disc) return; - wbfs_t *part = disc->p; - - // is this really a .iso file? - if (part == &wbfs_iso_file) - { - close(disc->i); - free(disc->header); - free(disc); - return; - } - - wbfs_close_disc(disc); - ClosePart(part); - return; -} - -s32 Wbfs_Fat::GetCount(u32 *count) -{ - GetHeadersCount(); - *count = fat_hdr_count; - return 0; -} - -s32 Wbfs_Fat::GetHeaders(struct discHdr *outbuf, u32 cnt, u32 len) -{ - if(cnt*len > fat_hdr_count*sizeof(struct discHdr)) - return -1; - - memcpy(outbuf, fat_hdr_list, cnt*len); - - SAFE_FREE(fat_hdr_list); - fat_hdr_count = 0; - - return 0; -} - -s32 Wbfs_Fat::AddGame(void) -{ - static struct discHdr header ATTRIBUTE_ALIGN( 32 ); - char path[MAX_FAT_PATH]; - wbfs_t *part = NULL; - s32 ret; - - // read ID from DVD - Disc_ReadHeader(&header); - // path - GetDir(&header, path); - // create wbfs 'partition' file - part = CreatePart(header.id, path); - if (!part) return -1; - /* Add game to device */ - partition_selector_t part_sel = (partition_selector_t) Settings.InstallPartitions; - - ret = wbfs_add_disc(part, __ReadDVD, NULL, ShowProgress, part_sel, 0); - wbfs_trim(part); - ClosePart(part); - - if (ret < 0) return ret; - - return 0; -} - -s32 Wbfs_Fat::RemoveGame(u8 *discid) -{ - char fname[MAX_FAT_PATH]; - int loc; - // wbfs 'partition' file - loc = FindFilename(discid, fname, sizeof(fname)); - if (!loc) return -1; - split_create(&split, fname, 0, 0, true); - split_close(&split); - if (loc == 1) return 0; - - // game is in subdir - // remove optional .txt file - DIR *dir = NULL; - struct dirent *dirent = NULL; - char path[MAX_FAT_PATH]; - char name[MAX_FAT_PATH]; - strncpy(path, fname, sizeof(path)); - char *p = strrchr(path, '/'); - if (p) *p = 0; - dir = opendir(path); - if (!dir) return 0; - while ((dirent = readdir(dir)) != 0) - { - snprintf(name, sizeof(name), dirent->d_name); - if (name[0] == '.') continue; - if (name[6] != '_') continue; - if (strncmp(name, (char*) discid, 6) != 0) continue; - p = strrchr(name, '.'); - if (!p) continue; - if (strcasecmp(p, ".txt") != 0) continue; - snprintf(fname, sizeof(fname), "%s/%s", path, name); - remove(fname); - break; - } - closedir(dir); - // remove game subdir - unlink(path); - - return 0; -} - -s32 Wbfs_Fat::DiskSpace(f32 *used, f32 *free) -{ - static f32 used_cached = 0.0; - static f32 free_cached = 0.0; - static int game_count = 0; - - //! Since it's freaken slow, only refresh on new gamecount - if(used_cached == 0.0 || game_count != gameList.GameCount()) - { - game_count = gameList.GameCount(); - } - else - { - *used = used_cached; - *free = free_cached; - return 0; - } - - f32 size; - int ret; - struct statvfs wbfs_fat_vfs; - - *used = used_cached = 0.0; - *free = free_cached = 0.0; - ret = statvfs(wbfs_fs_drive, &wbfs_fat_vfs); - if (ret) return -1; - - /* FS size in GB */ - size = (f32) wbfs_fat_vfs.f_frsize * (f32) wbfs_fat_vfs.f_blocks / GB_SIZE; - *free = free_cached = (f32) wbfs_fat_vfs.f_frsize * (f32) wbfs_fat_vfs.f_bfree / GB_SIZE; - *used = used_cached = size - *free; - - return 0; -} - -s32 Wbfs_Fat::RenameGame(u8 *discid, const void *newname) -{ - wbfs_t *part = OpenPart((char *) discid); - if (!part) return -1; - - s32 ret = wbfs_ren_disc(part, discid, (u8*) newname); - - ClosePart(part); - - return ret; -} - -s32 Wbfs_Fat::ReIDGame(u8 *discid, const void *newID) -{ - wbfs_t *part = OpenPart((char *) discid); - if (!part) return -1; - - s32 ret = wbfs_rID_disc(part, discid, (u8*) newID); - - ClosePart(part); - - if (ret == 0) - { - char fname[100]; - char fnamenew[100]; - s32 cnt = 0x31; - - Filename(discid, fname, sizeof(fname), NULL); - Filename((u8*) newID, fnamenew, sizeof(fnamenew), NULL); - - int stringlength = strlen(fname); - - while (rename(fname, fnamenew) == 0) - { - fname[stringlength] = cnt; - fname[stringlength + 1] = 0; - fnamenew[stringlength] = cnt; - fnamenew[stringlength + 1] = 0; - cnt++; - } - } - - return ret; -} - -u64 Wbfs_Fat::EstimateGameSize() -{ - wbfs_t *part = NULL; - u64 size = (u64) 143432 * 2 * 0x8000ULL; - u32 n_sector = size / hdd_sector_size; - u32 wii_sec_sz; - - // init a temporary dummy part - // as a placeholder for wbfs_size_disc - part = wbfs_open_partition(nop_rw_sector, nop_rw_sector, NULL, hdd_sector_size, n_sector, 0, 1); - if (!part) return -1; - wii_sec_sz = part->wii_sec_sz; - - partition_selector_t part_sel = (partition_selector_t) Settings.InstallPartitions; - - u64 estimated_size = wbfs_estimate_disc(part, __ReadDVD, NULL, part_sel); - - wbfs_close(part); - - return estimated_size; -} - -// TITLE [GAMEID] -bool Wbfs_Fat::CheckLayoutB(char *fname, int len, u8* id, char *fname_title) -{ - if (len <= 8) return false; - if (fname[len - 8] != '[' || fname[len - 1] != ']') return false; - if (!is_gameid(&fname[len - 7])) return false; - strncpy(fname_title, fname, TITLE_LEN); - // cut at '[' - fname_title[len - 8] = 0; - int n = strlen(fname_title); - if (n == 0) return false; - // cut trailing _ or ' ' - if (fname_title[n - 1] == ' ' || fname_title[n - 1] == '_') - { - fname_title[n - 1] = 0; - } - if (strlen(fname_title) == 0) return false; - if (id) - { - memcpy(id, &fname[len - 7], 6); - id[6] = 0; - } - return true; -} - -s32 Wbfs_Fat::GetHeadersCount() -{ - char path[MAX_FAT_PATH]; - char fname[MAX_FAT_PATH]; - char fpath[MAX_FAT_PATH]; - struct discHdr tmpHdr; - struct stat st; - u8 id[8]; - int is_dir; - int len; - char fname_title[TITLE_LEN]; - const char *title; - DIR *dir_iter; - struct dirent *dirent; - - SAFE_FREE( fat_hdr_list ); - fat_hdr_count = 0; - - strcpy(path, wbfs_fs_drive); - strcat(path, wbfs_fat_dir); - - dir_iter = opendir(path); - if (!dir_iter) return 0; - - while ((dirent = readdir(dir_iter)) != 0) - { - if (dirent->d_name[0] == '.') continue; - - snprintf(fname, sizeof(fname), dirent->d_name); - - // reset id and title - memset(id, 0, sizeof(id)); - *fname_title = 0; - - const char * fileext = strrchr(fname, '.'); - if(fileext && (strcasecmp(fileext, ".wbfs") == 0 || - strcasecmp(fileext, ".iso") == 0 || strcasecmp(fileext, ".ciso") == 0)) - { - // usb:/wbfs/GAMEID.wbfs - // or usb:/wbfs/GAMEID.iso - // or usb:/wbfs/GAMEID.ciso - int n = fileext - fname; // length withouth .wbfs - sprintf((char *) id, "%.6s", fname); - if (n != 6) - { - // TITLE [GAMEID].wbfs - if (!CheckLayoutB(fname, n, id, fname_title)) continue; - } - snprintf(fpath, sizeof(fpath), "%s/%s", path, fname); - is_dir = 0; - } - else - { - snprintf(fname, sizeof(fname), "%s/%s", path, dirent->d_name); - - if(stat(fname, &st) != 0) - continue; - - is_dir = S_ISDIR( st.st_mode ); - if(!is_dir) continue; - - snprintf(fname, sizeof(fname), dirent->d_name); - - len = strlen(fname); - if (len < 8) continue; // "GAMEID_x" - - int lay_a = 0; - int lay_b = 0; - if (CheckLayoutB(fname, len, id, fname_title)) - { - // usb:/wbfs/TITLE[GAMEID]/GAMEID.wbfs - lay_b = 1; - } - else if (fname[6] == '_' && is_gameid((char*) id)) - { - // usb:/wbfs/GAMEID_TITLE/GAMEID.wbfs - lay_a = 1; - memcpy(id, fname, 6); - snprintf(fname_title, sizeof(fname_title), &fname[7]); - } - - if (!lay_a && !lay_b) continue; - - // check ahead, make sure it succeeds - snprintf(fpath, sizeof(fpath), "%s/%s/%.6s.wbfs", path, fname, (char *) id); - } - - // if we have titles.txt entry use that - title = GameTitles.GetTitle(id); - // if no titles.txt get title from dir or file name - if (!title && *fname_title) - title = fname_title; - - if (title) - { - memset(&tmpHdr, 0, sizeof(tmpHdr)); - memcpy(tmpHdr.id, id, 6); - snprintf(tmpHdr.title, sizeof(tmpHdr.title), title); - tmpHdr.magic = 0x5D1C9EA3; - goto add_hdr; - } - - if(is_dir) - { - if (stat(fpath, &st) != 0) - { - // look for direct .iso file - sprintf(strrchr(fpath, '.'), ".iso"); // replace .wbfs with .iso - if (stat(fpath, &st) != 0) - { - // look for direct .ciso file - sprintf(strrchr(fpath, '.'), ".ciso"); // replace .iso with .ciso - if (stat(fpath, &st) != 0) continue; - } - } - } - - // else read it from file directly - if (strcasecmp(strrchr(fpath, '.'), ".wbfs") == 0) - { - // wbfs file directly - FILE *fp = fopen(fpath, "rb"); - if (fp != NULL) - { - fseek(fp, 512, SEEK_SET); - fread(&tmpHdr, sizeof(struct discHdr), 1, fp); - fclose(fp); - tmpHdr.is_ciso = 0; - if ((tmpHdr.magic == 0x5D1C9EA3) && (memcmp(tmpHdr.id, id, 6) == 0)) - { - goto add_hdr; - } - } - // no title found, read it from wbfs file - // but this is a little bit slower - // open 'partition' file - wbfs_t *part = OpenPart(fpath); - if (!part) - continue; - - u32 size; - // Get header - int ret = wbfs_get_disc_info(part, 0, (u8*) &tmpHdr, sizeof(struct discHdr), &size); - ClosePart(part); - if (ret == 0) - 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); - tmpHdr.is_ciso = 0; - if ((tmpHdr.magic == 0x5D1C9EA3) && (memcmp(tmpHdr.id, id, 6) == 0)) - { - goto add_hdr; - } - } - } - else if (strcasecmp(strrchr(fpath, '.'), ".ciso") == 0) - { - // ciso file - FILE *fp = fopen(fpath, "rb"); - if (fp != NULL) - { - fseek(fp, 0x8000, SEEK_SET); - fread(&tmpHdr, sizeof(struct discHdr), 1, fp); - fclose(fp); - tmpHdr.is_ciso = 1; - if ((tmpHdr.magic == 0x5D1C9EA3) && (memcmp(tmpHdr.id, id, 6) == 0)) - { - goto add_hdr; - } - } - } - // fail: - continue; - - // success: add tmpHdr to list: - add_hdr: - - //! First allocate before reallocating - if(!fat_hdr_list) - fat_hdr_list = (struct discHdr *) malloc(sizeof(struct discHdr)); - - fat_hdr_count++; - struct discHdr *tmpList = (struct discHdr *) realloc(fat_hdr_list, fat_hdr_count * sizeof(struct discHdr)); - if(!tmpList) - break; //out of memory, keep the list until now and stop - - fat_hdr_list = tmpList; - memcpy(&fat_hdr_list[fat_hdr_count - 1], &tmpHdr, sizeof(struct discHdr)); - } - - closedir(dir_iter); - - return 0; -} - -int Wbfs_Fat::FindFilename(u8 *id, char *fname, int len) -{ - struct stat st; - // look for direct .wbfs file - Filename(id, fname, len, NULL); - 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; - // look for direct .ciso file - strcpy(strrchr(fname, '.'), ".ciso"); // replace .iso with .ciso - if (stat(fname, &st) == 0) return 1; - - // direct file not found, check subdirs - *fname = 0; - DIR *dir_iter; - struct dirent *dirent; - char gameID[7]; - snprintf(gameID, sizeof(gameID), (char *) id); - char path[MAX_FAT_PATH]; - strcpy(path, wbfs_fs_drive); - strcat(path, wbfs_fat_dir); - - dir_iter = opendir(path); - if (!dir_iter) - return 0; - - while ((dirent = readdir(dir_iter)) != 0) - { - if(strcasestr(dirent->d_name, gameID) == NULL) continue; - - if (dirent->d_name[0] == '.') continue; - int n = strlen(dirent->d_name); - if (n < 8) continue; - - const char *fileext = strrchr(dirent->d_name, '.'); - if(fileext && (strcasecmp(fileext, ".wbfs") == 0 || - strcasecmp(fileext, ".iso") == 0 || strcasecmp(fileext, ".ciso") == 0)) - { - // TITLE [GAMEID].wbfs - char fn_title[TITLE_LEN]; - u8 fn_id[8]; - int n = fileext - dirent->d_name; // length withouth .wbfs - if (!CheckLayoutB(dirent->d_name, n, fn_id, fn_title)) continue; - if (strncmp((char*) fn_id, gameID, 6) != 0) continue; - snprintf(fname, len, "%s/%s", path, dirent->d_name); - if (stat(fname, &st) == 0) break; - } - - snprintf(fname, sizeof(fname), "%s/%s", path, dirent->d_name); - - if(stat(fname, &st) != 0) - { - *fname = 0; - continue; - } - - if (S_ISDIR( st.st_mode )) - { - // look for .wbfs file - snprintf(fname, len, "%s/%s/%.6s.wbfs", path, dirent->d_name, gameID); - if (stat(fname, &st) == 0) break; - // look for .iso file - snprintf(fname, len, "%s/%s/%.6s.iso", path, dirent->d_name, gameID); - if (stat(fname, &st) == 0) break; - // look for .ciso file - snprintf(fname, len, "%s/%s/%.6s.ciso", path, dirent->d_name, gameID); - if (stat(fname, &st) == 0) break; - } - - *fname = 0; - } - closedir(dir_iter); - - if (*fname) - return 2; - - return 0; -} - -wbfs_t* Wbfs_Fat::OpenPart(char *fname) -{ - wbfs_t *part = NULL; - int ret; - - // wbfs 'partition' file - ret = split_open(&split, fname); - if (ret) return NULL; - part = wbfs_open_partition(split_read_sector, nop_rw_sector, //readonly //split_write_sector, - &split, hdd_sector_size, split.total_sec, 0, 0); - if (!part) - { - split_close(&split); - } - return part; -} - -void Wbfs_Fat::ClosePart(wbfs_t* part) -{ - if (!part) return; - split_info_t *s = (split_info_t*) part->callback_data; - wbfs_close(part); - if (s) split_close(s); -} - -void Wbfs_Fat::Filename(u8 *id, char *fname, int len, char *path) -{ - if (path == NULL) - { - snprintf(fname, len, "%s%s/%.6s.wbfs", wbfs_fs_drive, wbfs_fat_dir, id); - } - else - { - snprintf(fname, len, "%s/%.6s.wbfs", path, id); - } -} - -void Wbfs_Fat::GetDir(struct discHdr *header, char *path) -{ - strcpy(path, wbfs_fs_drive); - strcat(path, wbfs_fat_dir); - if (Settings.InstallToDir) - { - strcat(path, "/"); - int layout = 0; - if (Settings.InstallToDir == 2) layout = 1; - mk_gameid_title(header, path + strlen(path), 0, layout); - } -} - -wbfs_t* Wbfs_Fat::CreatePart(u8 *id, char *path) -{ - char fname[MAX_FAT_PATH]; - wbfs_t *part = NULL; - u64 size = (u64) 143432 * 2 * 0x8000ULL; - u32 n_sector = size / 512; - int ret; - - if(!CreateSubfolder(path)) // game subdir - { - ProgressStop(); - ShowError(tr("Error creating path: %s"), path); - return NULL; - } - - // 1 cluster less than 4gb - u64 OPT_split_size = 4LL * 1024 * 1024 * 1024 - 32 * 1024; - - if(Settings.GameSplit == GAMESPLIT_NONE && gameList.GetGameFS(id) != PART_FS_FAT) - OPT_split_size = (u64) 100LL * 1024 * 1024 * 1024 - 32 * 1024; - - else if(Settings.GameSplit == GAMESPLIT_2GB) - // 1 cluster less than 2gb - OPT_split_size = (u64)2LL * 1024 * 1024 * 1024 - 32 * 1024; - - Filename(id, fname, sizeof(fname), path); - printf("Writing to %s\n", fname); - ret = split_create(&split, fname, OPT_split_size, size, true); - if (ret) return NULL; - - // force create first file - u32 scnt = 0; - int fd = split_get_file(&split, 0, &scnt, 0); - if (fd < 0) - { - printf("ERROR creating file\n"); - sleep(2); - split_close(&split); - return NULL; - } - - part = wbfs_open_partition(split_read_sector, split_write_sector, &split, hdd_sector_size, n_sector, 0, 1); - if (!part) - { - split_close(&split); - } - return part; -} - -void Wbfs_Fat::mk_gameid_title(struct discHdr *header, char *name, int re_space, int layout) -{ - int i, len; - char title[100]; - char id[7]; - - snprintf(id, sizeof(id), (char *) header->id); - snprintf(title, sizeof(title), header->title); - title_filename(title); - - if (layout == 0) - { - sprintf(name, "%s_%s", id, title); - } - else - { - sprintf(name, "%s [%s]", title, id); - } - - // replace space with '_' - if (re_space) - { - len = strlen(name); - for (i = 0; i < len; i++) - { - if (name[i] == ' ') name[i] = '_'; - } - } -} - -void Wbfs_Fat::title_filename(char *title) -{ - int i, len; - // trim leading space - len = strlen(title); - while (*title == ' ') - { - memmove(title, title + 1, len); - len--; - } - // trim trailing space - not allowed on windows directories - while (len && title[len - 1] == ' ') - { - title[len - 1] = 0; - len--; - } - // replace silly chars with '_' - for (i = 0; i < len; i++) - { - if (strchr(invalid_path, title[i]) || iscntrl((int) title[i])) - { - title[i] = '_'; - } - } -} - -bool Wbfs_Fat::is_gameid(char *id) -{ - int i; - for (i = 0; i < 6; i++) - { - if (!isalnum((u32) id[i])) return false; - } - return true; -} - -int Wbfs_Fat::GetFragList(u8 *id) -{ - char fname[1024]; - - int ret = FindFilename(id, fname, sizeof(fname)); - if (!ret) return -1; - - return get_frag_list_for_file(fname, id, GetFSType(), lba); -} diff --git a/source/usbloader/wbfs/wbfs_fat.h b/source/usbloader/wbfs/wbfs_fat.h deleted file mode 100644 index 54b6a9cd..00000000 --- a/source/usbloader/wbfs/wbfs_fat.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef _WBFS_FAT_H -#define _WBFS_FAT_H - -#include - -#include "usbloader/splits.h" -#include "usbloader/wbfs.h" -#include "wbfs_base.h" - -class Wbfs_Fat: public Wbfs -{ - public: - Wbfs_Fat(u32 lba, u32 size, u32 part); - - virtual s32 Open(); - virtual void Close(); - wbfs_disc_t* OpenDisc(u8 *); - void CloseDisc(wbfs_disc_t *); - - s32 GetCount(u32 *); - s32 GetHeaders(struct discHdr *, u32, u32); - - s32 AddGame(); - s32 RemoveGame(u8 *); - - s32 DiskSpace(f32 *, f32 *); - - s32 RenameGame(u8 *, const void *); - s32 ReIDGame(u8 *, const void *); - - u64 EstimateGameSize(); - - virtual int GetFragList(u8 *); - virtual u8 GetFSType(void) { return PART_FS_FAT; } - - protected: - split_info_t split; - - struct discHdr *fat_hdr_list; - u32 fat_hdr_count; - char wbfs_fs_drive[16]; - - wbfs_t* OpenPart(char *fname); - void ClosePart(wbfs_t* part); - wbfs_t* CreatePart(u8 *id, char *path); - int FindFilename(u8 *id, char *fname, int len); - void Filename(u8 *id, char *fname, int len, char *path); - bool CheckLayoutB(char *fname, int len, u8* id, char *fname_title); - s32 GetHeadersCount(); - void GetDir(struct discHdr *header, char *path); - - void mk_gameid_title(struct discHdr *header, char *name, int re_space, int layout); - void title_filename(char *title); - bool is_gameid(char *id); - - static int nop_rw_sector(void *_fp, u32 lba, u32 count, void* buf) { return 0; } -}; - -#endif //_WBFS_FAT_H diff --git a/source/usbloader/wbfs/wbfs_ntfs.h b/source/usbloader/wbfs/wbfs_ntfs.h deleted file mode 100644 index ca8479f3..00000000 --- a/source/usbloader/wbfs/wbfs_ntfs.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef _WBFS_NTFS_H -#define _WBFS_NTFS_H - -#include "wbfs_fat.h" - -class Wbfs_Ntfs: public Wbfs_Fat -{ - public: - Wbfs_Ntfs(u32 lba, u32 size, u32 part) : - Wbfs_Fat(lba, size, part) - { - } - virtual u8 GetFSType(void) { return PART_FS_NTFS; } -}; - -#endif //_WBFS_NTFS_H diff --git a/source/usbloader/wbfs/wbfs_rw.c b/source/usbloader/wbfs/wbfs_rw.c deleted file mode 100644 index f759f065..00000000 --- a/source/usbloader/wbfs/wbfs_rw.c +++ /dev/null @@ -1,175 +0,0 @@ -#include -#include -#include - -#include "usbloader/sdhc.h" -#include "usbloader/usbstorage2.h" -#include "usbloader/wdvd.h" -#include "wbfs_rw.h" - -/* Constants */ -#define MAX_NB_SECTORS 32 - -rw_sector_callback_t readCallback = NULL; -rw_sector_callback_t writeCallback = NULL; -const DISC_INTERFACE * currentHandle = NULL; - -s32 __ReadDVD(void *fp, u32 lba, u32 len, void *iobuf) -{ - void *buffer = NULL; - - u64 offset; - u32 mod, size; - s32 ret; - - /* Calculate offset */ - offset = ((u64) lba) << 2; - - /* Calcualte sizes */ - mod = len % 32; - size = len - mod; - - /* Read aligned data */ - if (size) - { - ret = WDVD_UnencryptedRead(iobuf, size, offset); - if (ret < 0) goto out; - } - - /* Read non-aligned data */ - if (mod) - { - /* Allocate memory */ - buffer = memalign(32, 0x20); - if (!buffer) return -1; - - /* Read data */ - ret = WDVD_UnencryptedRead(buffer, 0x20, offset + size); - if (ret < 0) goto out; - - /* Copy data */ - void *ptr = ((u8 *) iobuf) + size; - memcpy(ptr, buffer, mod); - } - - /* Success */ - ret = 0; - - out: - /* Free memory */ - if (buffer) free(buffer); - - return ret; -} - -s32 __ReadUSB(void *fp, u32 lba, u32 count, void *iobuf) -{ - WBFS_PartInfo * info = (WBFS_PartInfo *) fp; - u32 cnt = 0; - s32 ret; - u32 partition_offset = info->partition_lba + (lba-info->partition_lba)*(info->wbfs_sector_size/info->hdd_sector_size); - count *= (info->wbfs_sector_size/info->hdd_sector_size); - - /* Do reads */ - while (cnt < count) - { - u8 *ptr = ((u8 *) iobuf) + (cnt * info->hdd_sector_size); - u32 sectors = (count - cnt); - - /* Read sectors is too big */ - if (sectors > MAX_NB_SECTORS) sectors = MAX_NB_SECTORS; - - /* USB read */ - ret = currentHandle->readSectors(partition_offset + cnt, sectors, ptr); - if (!ret) return -1; - - /* Increment counter */ - cnt += sectors; - } - - return 0; -} - -s32 __WriteUSB(void *fp, u32 lba, u32 count, void *iobuf) -{ - WBFS_PartInfo * info = (WBFS_PartInfo *) fp; - u32 cnt = 0; - s32 ret; - u32 partition_offset = info->partition_lba + (lba-info->partition_lba)*(info->wbfs_sector_size/info->hdd_sector_size); - count *= (info->wbfs_sector_size/info->hdd_sector_size); - - /* Do writes */ - while (cnt < count) - { - u8 *ptr = ((u8 *) iobuf) + (cnt * info->hdd_sector_size); - u32 sectors = (count - cnt); - - /* Write sectors is too big */ - if (sectors > MAX_NB_SECTORS) sectors = MAX_NB_SECTORS; - - /* USB write */ - ret = currentHandle->writeSectors(partition_offset + cnt, sectors, ptr); - if (!ret) return -1; - - /* Increment counter */ - cnt += sectors; - } - - return 0; -} - -s32 __ReadSDHC(void *fp, u32 lba, u32 count, void *iobuf) -{ - WBFS_PartInfo * info = (WBFS_PartInfo *) fp; - u32 cnt = 0; - s32 ret; - u32 partition_offset = info->partition_lba + (lba-info->partition_lba)*(info->wbfs_sector_size/info->hdd_sector_size); - count *= info->wbfs_sector_size/info->hdd_sector_size; - - /* Do reads */ - while (cnt < count) - { - void *ptr = ((u8 *) iobuf) + (cnt * info->wbfs_sector_size); - u32 sectors = (count - cnt); - - /* Read sectors is too big */ - if (sectors > MAX_NB_SECTORS) sectors = MAX_NB_SECTORS; - - /* SDHC read */ - ret = SDHC_ReadSectors(partition_offset + cnt, sectors, ptr); - if (!ret) return -1; - - /* Increment counter */ - cnt += sectors; - } - - return 0; -} - -s32 __WriteSDHC(void *fp, u32 lba, u32 count, void *iobuf) -{ - WBFS_PartInfo * info = (WBFS_PartInfo *) fp; - u32 cnt = 0; - s32 ret; - u32 partition_offset = info->partition_lba + (lba-info->partition_lba)*(info->wbfs_sector_size/info->hdd_sector_size); - count *= info->wbfs_sector_size/info->hdd_sector_size; - - /* Do writes */ - while (cnt < count) - { - void *ptr = ((u8 *) iobuf) + (cnt * info->wbfs_sector_size); - u32 sectors = (count - cnt); - - /* Write sectors is too big */ - if (sectors > MAX_NB_SECTORS) sectors = MAX_NB_SECTORS; - - /* SDHC write */ - ret = SDHC_WriteSectors(partition_offset + cnt, sectors, ptr); - if (!ret) return -1; - - /* Increment counter */ - cnt += sectors; - } - - return 0; -} diff --git a/source/usbloader/wbfs/wbfs_rw.h b/source/usbloader/wbfs/wbfs_rw.h deleted file mode 100644 index 98ae31e5..00000000 --- a/source/usbloader/wbfs/wbfs_rw.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef _WBFS_RW_H -#define _WBFS_RW_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include "libs/libwbfs/libwbfs.h" - - typedef struct _WBFS_PartInfo - { - u32 wbfs_sector_size; - u32 hdd_sector_size; - u32 partition_lba; - u32 partition_num_sec; - } WBFS_PartInfo; - - extern rw_sector_callback_t readCallback; - extern rw_sector_callback_t writeCallback; - extern const DISC_INTERFACE * currentHandle; - - s32 __ReadDVD(void *fp, u32 lba, u32 len, void *iobuf); - s32 __ReadUSB(void *fp, u32 lba, u32 count, void *iobuf); - s32 __WriteUSB(void *fp, u32 lba, u32 count, void *iobuf); - s32 __ReadSDHC(void *fp, u32 lba, u32 count, void *iobuf); - s32 __WriteSDHC(void *fp, u32 lba, u32 count, void *iobuf); - -#ifdef __cplusplus -} -#endif - -#endif //_WBFS_RW_H diff --git a/source/usbloader/wbfs/wbfs_wbfs.cpp b/source/usbloader/wbfs/wbfs_wbfs.cpp deleted file mode 100644 index 6fa15c17..00000000 --- a/source/usbloader/wbfs/wbfs_wbfs.cpp +++ /dev/null @@ -1,225 +0,0 @@ -#include "wbfs_wbfs.h" -#include "prompts/ProgressWindow.h" -#include "settings/CSettings.h" -#include "usbloader/wbfs.h" -#include "wbfs_rw.h" - -#define MAX_WBFS_SECTORSIZE 4096 - -extern u32 hdd_sector_size; - -s32 Wbfs_Wbfs::Open() -{ - wbfs_t *part = NULL; - - PartInfo.wbfs_sector_size = MAX_WBFS_SECTORSIZE; - PartInfo.hdd_sector_size = hdd_sector_size; - PartInfo.partition_lba = lba; - PartInfo.partition_num_sec = size; - - u8 * buffer = (u8 *) malloc(MAX_WBFS_SECTORSIZE); - memset(buffer, 0, MAX_WBFS_SECTORSIZE); - - if(readCallback(&PartInfo, lba, 1, buffer) < 0) - { - free(buffer); - return -1; - } - - wbfs_head_t head; - memcpy(&head, buffer, sizeof(wbfs_head_t)); - free(buffer); - - if (head.magic != wbfs_htonl(WBFS_MAGIC)) - return -1; - - /* Set correct sector values for wbfs read/write */ - PartInfo.wbfs_sector_size = 1 << head.hd_sec_sz_s; - PartInfo.partition_num_sec = head.n_hd_sec; - - /* Open partition */ - part = wbfs_open_partition(readCallback, writeCallback, &PartInfo, - PartInfo.wbfs_sector_size, PartInfo.partition_num_sec, - lba, 0); - if (!part) return -1; - - /* Close current hard disk */ - Close(); - hdd = part; - - return 0; -} - -void Wbfs_Wbfs::Close() -{ - if (hdd) - { - wbfs_close(hdd); - hdd = NULL; - } -} - -wbfs_disc_t* Wbfs_Wbfs::OpenDisc(u8 *discid) -{ - /* No device open */ - if (!hdd) return NULL; - - /* Open disc */ - return wbfs_open_disc(hdd, discid); -} - -void Wbfs_Wbfs::CloseDisc(wbfs_disc_t *disc) -{ - /* No device open */ - if (!hdd || !disc) return; - - /* Close disc */ - wbfs_close_disc(disc); -} - -s32 Wbfs_Wbfs::Format() -{ - WBFS_PartInfo HDD_Inf; - HDD_Inf.wbfs_sector_size = hdd_sector_size; - HDD_Inf.hdd_sector_size = hdd_sector_size; - HDD_Inf.partition_lba = lba; - HDD_Inf.partition_num_sec = size; - - //! If size is over 500GB in sectors and sector size is 512 - //! set 2048 as hdd sector size - if(size > 1048576000 && hdd_sector_size == 512) - { - HDD_Inf.wbfs_sector_size = 2048; - HDD_Inf.partition_num_sec = size/(2048/hdd_sector_size); - } - - wbfs_t *partition = NULL; - - /* Reset partition */ - partition = wbfs_open_partition(readCallback, writeCallback, &HDD_Inf, HDD_Inf.wbfs_sector_size, HDD_Inf.partition_num_sec, lba, 1); - if (!partition) return -1; - - /* Free memory */ - wbfs_close(partition); - - return 0; -} - -s32 Wbfs_Wbfs::GetCount(u32 *count) -{ - /* No device open */ - if (!hdd) return -1; - - /* Get list length */ - *count = wbfs_count_discs(hdd); - - return 0; -} - -s32 Wbfs_Wbfs::GetHeaders(struct discHdr *outbuf, u32 cnt, u32 len) -{ - u32 idx, size; - s32 ret; - - /* No device open */ - if (!hdd) return -1; - - for (idx = 0; idx < cnt; idx++) - { - u8 *ptr = ((u8 *) outbuf) + (idx * len); - - /* Get header */ - ret = wbfs_get_disc_info(hdd, idx, ptr, len, &size); - if (ret < 0) return ret; - } - - return 0; -} - -s32 Wbfs_Wbfs::AddGame() -{ - s32 ret; - - /* No device open */ - if (!hdd) return -1; - - partition_selector_t part_sel = (partition_selector_t) Settings.InstallPartitions; - - /* Add game to device */ - ret = wbfs_add_disc(hdd, __ReadDVD, NULL, ShowProgress, part_sel, 0); - if (ret < 0) return ret; - - return 0; -} - -s32 Wbfs_Wbfs::RemoveGame(u8 *discid) -{ - s32 ret; - - /* No device open */ - if (!hdd) return -1; - - /* Remove game from USB device */ - ret = wbfs_rm_disc(hdd, discid); - if (ret < 0) return ret; - - return 0; -} - -s32 Wbfs_Wbfs::DiskSpace(f32 *used, f32 *free) -{ - f32 ssize; - u32 cnt; - - /* No device open */ - if (!hdd) return -1; - - /* Count used blocks */ - cnt = wbfs_count_usedblocks(hdd); - - /* Sector size in GB */ - ssize = hdd->wbfs_sec_sz / GB_SIZE; - - /* Copy values */ - *free = ssize * cnt; - *used = ssize * (hdd->n_wbfs_sec - cnt); - - return 0; -} - -s32 Wbfs_Wbfs::RenameGame(u8 *discid, const void *newname) -{ - s32 ret; - - /* No USB device open */ - if (!hdd) return -1; - ret = wbfs_ren_disc(hdd, discid, (u8*) newname); - if (ret < 0) return ret; - - return 0; -} - -s32 Wbfs_Wbfs::ReIDGame(u8 *discid, const void *newID) -{ - s32 ret; - - /* No USB device open */ - if (!hdd) return -1; - ret = wbfs_rID_disc(hdd, discid, (u8*) newID); - if (ret < 0) return ret; - - return 0; -} - -u64 Wbfs_Wbfs::EstimateGameSize() -{ - partition_selector_t part_sel = (partition_selector_t) Settings.InstallPartitions; - return wbfs_estimate_disc(hdd, __ReadDVD, NULL, part_sel); -} - -s32 Wbfs_Wbfs::GetFragList(u8 *id) -{ - //! Doesn't have to be called ".iso" just something different than .wbfs but with a dot. - //! So that the code doesn't fail. - return get_frag_list_for_file((char *) ".iso", id, GetFSType(), lba); -} diff --git a/source/usbloader/wbfs/wbfs_wbfs.h b/source/usbloader/wbfs/wbfs_wbfs.h deleted file mode 100644 index ae23f431..00000000 --- a/source/usbloader/wbfs/wbfs_wbfs.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef _WBFS_WBFS_H -#define _WBFS_WBFS_H - -#include "wbfs_base.h" -#include "libs/libwbfs/libwbfs.h" -#include "usbloader/wbfs.h" -#include "wbfs_rw.h" - -class Wbfs_Wbfs: public Wbfs -{ - public: - Wbfs_Wbfs(u32 device, u32 lba, u32 size) : - Wbfs(device, lba, size) - { - } - - s32 Open(); - virtual void Close(); - wbfs_disc_t* OpenDisc(u8 *); - void CloseDisc(wbfs_disc_t *); - - s32 Format(); - s32 GetCount(u32 *); - s32 GetHeaders(struct discHdr *, u32, u32); - - s32 AddGame(); - s32 RemoveGame(u8 *); - - s32 DiskSpace(f32 *, f32 *); - - s32 RenameGame(u8 *, const void *); - s32 ReIDGame(u8 *, const void *); - - u64 EstimateGameSize(); - int GetFragList(u8 *id); - private: - WBFS_PartInfo PartInfo; -}; - -#endif //_WBFS_WBFS_H diff --git a/source/usbloader/wdvd.c b/source/usbloader/wdvd.c deleted file mode 100644 index 2676ab52..00000000 --- a/source/usbloader/wdvd.c +++ /dev/null @@ -1,437 +0,0 @@ -#include -#include -#include -#include -#include "gecko.h" -#include "wbfs.h" - -/* Constants */ -#define IOCTL_DI_READID 0x70 -#define IOCTL_DI_READ 0x71 -#define IOCTL_DI_WAITCVRCLOSE 0x79 -#define IOCTL_DI_GETCOVER 0x88 -#define IOCTL_DI_RESET 0x8A -#define IOCTL_DI_OPENPART 0x8B -#define IOCTL_DI_CLOSEPART 0x8C -#define IOCTL_DI_UNENCREAD 0x8D -#define IOCTL_DI_SEEK 0xAB -#define IOCTL_DI_STOPLASER 0xD2 -#define IOCTL_DI_OFFSET 0xD9 -#define IOCTL_DI_DISC_BCA 0xDA -#define IOCTL_DI_STOPMOTOR 0xE3 -#define IOCTL_DI_SETWBFSMODE 0xF4 -#define IOCTL_DI_GETWBFSMODE 0xF5 // odip -#define IOCTL_DI_DISABLERESET 0xF6 // odip - -/** Hermes IOS222 **/ -#define DI_SETWBFSMODE 0xfe - -#define IOCTL_DI_SETFRAG 0xF9 -#define IOCTL_DI_GETMODE 0xFA - -/* Variables */ -static u32 inbuf[8] ATTRIBUTE_ALIGN(32); -static u32 outbuf[8] ATTRIBUTE_ALIGN(32); - -static const char di_fs[] ATTRIBUTE_ALIGN(32) = "/dev/di"; -static s32 _di_fd = -1; - - -s32 WDVD_Init(void) -{ - /* Open "/dev/di" */ - if (_di_fd < 0) { - _di_fd = IOS_Open(di_fs, 0); - if (_di_fd < 0) - return _di_fd; - } - - return 0; -} - -s32 WDVD_Close(void) -{ - /* Close "/dev/di" */ - if (_di_fd >= 0) { - IOS_Close(_di_fd); - _di_fd = -1; - } - - return 0; -} - -s32 WDVD_GetHandle(void) -{ - /* Return di handle */ - return _di_fd; -} - -s32 WDVD_Reset(void) -{ - if (_di_fd < 0) - return _di_fd; - - s32 ret; - - memset(inbuf, 0, sizeof(inbuf)); - - /* Reset drive */ - inbuf[0] = IOCTL_DI_RESET << 24; - inbuf[1] = 1; - - - ret = IOS_Ioctl(_di_fd, IOCTL_DI_RESET, inbuf, sizeof(inbuf), outbuf, sizeof(outbuf)); - if (ret < 0) - return ret; - - return (ret == 1) ? 0 : -ret; -} - -s32 WDVD_ReadDiskId(void *id) -{ - if (_di_fd < 0) - return _di_fd; - - s32 ret; - - memset(inbuf, 0, sizeof(inbuf)); - - /* Read disc ID */ - inbuf[0] = IOCTL_DI_READID << 24; - - ret = IOS_Ioctl(_di_fd, IOCTL_DI_READID, inbuf, sizeof(inbuf), outbuf, sizeof(outbuf)); - if (ret < 0) - return ret; - - if (ret == 1) { - memcpy(id, outbuf, sizeof(dvddiskid)); - return 0; - } - - return -ret; -} - -s32 WDVD_Seek(u64 offset) -{ - if (_di_fd < 0) - return _di_fd; - - s32 ret; - - memset(inbuf, 0, sizeof(inbuf)); - - /* Drive seek */ - inbuf[0] = IOCTL_DI_SEEK << 24; - inbuf[1] = (u32)(offset >> 2); - - ret = IOS_Ioctl(_di_fd, IOCTL_DI_SEEK, inbuf, sizeof(inbuf), outbuf, sizeof(outbuf)); - if (ret < 0) - return ret; - - return (ret == 1) ? 0 : -ret; - -} - -s32 WDVD_Offset(u64 offset) -{ - if (_di_fd < 0) - return _di_fd; - - //u32 *off = (u32 *)((void *)&offset); - union { u64 off64; u32 off32[2]; } off;off.off64 = offset; - s32 ret; - - memset(inbuf, 0, sizeof(inbuf)); - - /* Set offset */ - inbuf[0] = IOCTL_DI_OFFSET << 24; - inbuf[1] = (off.off32[0]) ? 1: 0; - inbuf[2] = (off.off32[1] >> 2); - - ret = IOS_Ioctl(_di_fd, IOCTL_DI_OFFSET, inbuf, sizeof(inbuf), outbuf, sizeof(outbuf)); - if (ret < 0) - return ret; - - return (ret == 1) ? 0 : -ret; -} - -s32 WDVD_StopLaser(void) -{ - if (_di_fd < 0) - return _di_fd; - - s32 ret; - - memset(inbuf, 0, sizeof(inbuf)); - - /* Stop laser */ - inbuf[0] = IOCTL_DI_STOPLASER << 24; - - ret = IOS_Ioctl(_di_fd, IOCTL_DI_STOPLASER, inbuf, sizeof(inbuf), outbuf, sizeof(outbuf)); - if (ret < 0) - return ret; - - return (ret == 1) ? 0 : -ret; -} - -s32 WDVD_StopMotor(void) -{ - if (_di_fd < 0) - return _di_fd; - - s32 ret; - - memset(inbuf, 0, sizeof(inbuf)); - - /* Stop motor */ - inbuf[0] = IOCTL_DI_STOPMOTOR << 24; - - ret = IOS_Ioctl(_di_fd, IOCTL_DI_STOPMOTOR, inbuf, sizeof(inbuf), outbuf, sizeof(outbuf)); - if (ret < 0) - return ret; - - return (ret == 1) ? 0 : -ret; -} - -s32 WDVD_OpenPartition(u64 offset) -{ - if (_di_fd < 0) - return _di_fd; - - static u8 Tmd_Buffer[0x4A00] ATTRIBUTE_ALIGN(32); - static ioctlv Vectors[5] ATTRIBUTE_ALIGN(32); - s32 ret; - - memset(inbuf, 0, sizeof inbuf); - memset(outbuf, 0, sizeof outbuf); - - inbuf[0] = IOCTL_DI_OPENPART << 24; - inbuf[1] = offset >> 2; - - Vectors[0].data = inbuf; - Vectors[0].len = 0x20; - Vectors[1].data = 0; - Vectors[1].len = 0; - Vectors[2].data = 0; - Vectors[2].len = 0; - Vectors[3].data = Tmd_Buffer; - Vectors[3].len = 0x49e4; - Vectors[4].data = outbuf; - Vectors[4].len = 0x20; - - ret = IOS_Ioctlv(_di_fd, IOCTL_DI_OPENPART, 3, 2, (ioctlv *)Vectors); - - if (ret < 0) - return ret; - - return (ret == 1) ? 0 : -ret; -} - -s32 WDVD_ClosePartition(void) -{ - if (_di_fd < 0) - return _di_fd; - - s32 ret; - - memset(inbuf, 0, sizeof(inbuf)); - - /* Close partition */ - inbuf[0] = IOCTL_DI_CLOSEPART << 24; - - ret = IOS_Ioctl(_di_fd, IOCTL_DI_CLOSEPART, inbuf, sizeof(inbuf), NULL, 0); - if (ret < 0) - return ret; - - return (ret == 1) ? 0 : -ret; -} - -s32 WDVD_UnencryptedRead(void *buf, u32 len, u64 offset) -{ - if (_di_fd < 0) - return _di_fd; - - s32 ret; - - memset(inbuf, 0, sizeof(inbuf)); - - /* Unencrypted read */ - inbuf[0] = IOCTL_DI_UNENCREAD << 24; - inbuf[1] = len; - inbuf[2] = (u32)(offset >> 2); - - ret = IOS_Ioctl(_di_fd, IOCTL_DI_UNENCREAD, inbuf, sizeof(inbuf), buf, len); - if (ret < 0) - return ret; - - return (ret == 1) ? 0 : -ret; -} - -s32 WDVD_Read(void *buf, u32 len, u64 offset) -{ - if (_di_fd < 0) - return _di_fd; - - s32 ret; - - memset(inbuf, 0, sizeof(inbuf)); - - /* Disc read */ - inbuf[0] = IOCTL_DI_READ << 24; - inbuf[1] = len; - inbuf[2] = (u32)(offset >> 2); - - ret = IOS_Ioctl(_di_fd, IOCTL_DI_READ, inbuf, sizeof(inbuf), buf, len); - if (ret < 0) - return ret; - - return (ret == 1) ? 0 : -ret; -} - -s32 WDVD_WaitForDisc(void) -{ - if (_di_fd < 0) - return _di_fd; - - s32 ret; - - memset(inbuf, 0, sizeof(inbuf)); - - /* Wait for disc */ - inbuf[0] = IOCTL_DI_WAITCVRCLOSE << 24; - - ret = IOS_Ioctl(_di_fd, IOCTL_DI_WAITCVRCLOSE, inbuf, sizeof(inbuf), outbuf, sizeof(outbuf)); - if (ret < 0) - return ret; - - return (ret == 1) ? 0 : -ret; -} - -s32 WDVD_GetCoverStatus(u32 *status) -{ - if (_di_fd < 0) - return _di_fd; - - s32 ret; - - memset(inbuf, 0, sizeof(inbuf)); - - /* Get cover status */ - inbuf[0] = IOCTL_DI_GETCOVER << 24; - - ret = IOS_Ioctl(_di_fd, IOCTL_DI_GETCOVER, inbuf, sizeof(inbuf), outbuf, sizeof(outbuf)); - if (ret < 0) - return ret; - - if (ret == 1) { - /* Copy cover status */ - memcpy(status, outbuf, sizeof(u32)); - - return 0; - } - - return -ret; -} - -s32 WDVD_SetUSBMode(const u8 *id, s32 partition) -{ - if (_di_fd < 0) - return _di_fd; - - s32 ret; - - memset(inbuf, 0, sizeof(inbuf)); - - /* Set USB mode */ - inbuf[0] = IOCTL_DI_SETWBFSMODE << 24; - inbuf[1] = (id) ? WBFS_DEVICE_USB : 0; - - /* Copy ID */ - if (id) { - memcpy(&inbuf[2], id, 6); - if(partition >= 0) { - inbuf[5] = partition; - } - } - - ret = IOS_Ioctl(_di_fd, IOCTL_DI_SETWBFSMODE, inbuf, sizeof(inbuf), outbuf, sizeof(outbuf)); - if (ret!=1) { - // Try old cIOS 222 - /* Set USB mode */ - inbuf[0] = DI_SETWBFSMODE << 24; - ret = IOS_Ioctl(_di_fd, DI_SETWBFSMODE, inbuf, sizeof(inbuf), outbuf, sizeof(outbuf)); - } - - if (ret < 0) - return ret; - - return (ret == 1) ? 0 : -ret; -} - -s32 WDVD_Read_Disc_BCA(void *buf) -{ - if (_di_fd < 0) - return _di_fd; - - s32 ret; - - memset(inbuf, 0, sizeof(inbuf)); - - /* Disc read */ - inbuf[0] = IOCTL_DI_DISC_BCA << 24; - //inbuf[1] = 64; - - ret = IOS_Ioctl(_di_fd, IOCTL_DI_DISC_BCA, inbuf, sizeof(inbuf), buf, 64); - if (ret < 0) - return ret; - - return (ret == 1) ? 0 : -ret; -} - -// frag - -s32 WDVD_SetFragList(int device, void *fraglist, int size) -{ - if (_di_fd < 0) - return _di_fd; - - s32 ret; - - memset(inbuf, 0, sizeof(inbuf)); - memset(outbuf, 0, sizeof(outbuf)); - - /* Set FRAG mode */ - inbuf[0] = IOCTL_DI_SETFRAG << 24; - inbuf[1] = device; - inbuf[2] = (u32)fraglist; - inbuf[3] = size; - - DCFlushRange(fraglist, size); - ret = IOS_Ioctl(_di_fd, IOCTL_DI_SETFRAG, inbuf, sizeof(inbuf), outbuf, sizeof(outbuf)); - - if (ret < 0) - return ret; - - return (ret == 1) ? 0 : -ret; -} - -s32 WDVD_Eject(void) -{ - if (_di_fd < 0) - return _di_fd; - - s32 ret; - - memset(inbuf, 0, sizeof(inbuf)); - - /* Stop motor */ - inbuf[0] = IOCTL_DI_STOPMOTOR << 24; - /* Eject DVD */ - inbuf[1] = 1; - - ret = IOS_Ioctl(_di_fd, IOCTL_DI_STOPMOTOR, inbuf, sizeof(inbuf), outbuf, sizeof(outbuf)); - if (ret < 0) - return ret; - - return (ret == 1) ? 0 : -ret; -} diff --git a/source/usbloader/wdvd.h b/source/usbloader/wdvd.h deleted file mode 100644 index 295a9975..00000000 --- a/source/usbloader/wdvd.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef _WDVD_H_ -#define _WDVD_H_ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* Prototypes */ -s32 WDVD_Init(void); -s32 WDVD_Close(void); -s32 WDVD_GetHandle(void); -s32 WDVD_Reset(void); -s32 WDVD_ReadDiskId(void *); -s32 WDVD_Seek(u64); -s32 WDVD_Offset(u64); -s32 WDVD_StopLaser(void); -s32 WDVD_StopMotor(void); -s32 WDVD_OpenPartition(u64 offset); -s32 WDVD_ClosePartition(void); -s32 WDVD_UnencryptedRead(void *, u32, u64); -s32 WDVD_Read(void *, u32, u64); -s32 WDVD_WaitForDisc(void); -s32 WDVD_GetCoverStatus(u32 *); -s32 WDVD_SetUSBMode(const u8 *, s32); -s32 WDVD_Eject(void); -s32 WDVD_Read_Disc_BCA(void *); -s32 WDVD_SetFragList(int device, void *fraglist, int size); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif - diff --git a/source/utils/Callback.hpp b/source/utils/Callback.hpp deleted file mode 100644 index ab76dccd..00000000 --- a/source/utils/Callback.hpp +++ /dev/null @@ -1,62 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * WiiXplorer 2010 - ***************************************************************************/ -#ifndef _CPP_CALLBACK_HPP -#define _CPP_CALLBACK_HPP - -class cCallback -{ - public: - virtual void Execute(void * arg) const =0; -}; - -template -class TCallback : public cCallback -{ - public: - TCallback() : cInst(0), pFunction(0) // constructor - { - } - - typedef void (cInstance::*tFunction)(void * arg); - - virtual void Execute(void * arg) const - { - if (pFunction) - (cInst->*pFunction)(arg); - } - - void SetCallback (cInstance * cInstancePointer, tFunction pFunctionPointer) - { - cInst = cInstancePointer; - pFunction = pFunctionPointer; - } - - private: - cInstance *cInst; - tFunction pFunction; -}; - -#endif diff --git a/source/utils/MD5.c b/source/utils/MD5.c deleted file mode 100644 index c672db10..00000000 --- a/source/utils/MD5.c +++ /dev/null @@ -1,608 +0,0 @@ -/* ========================================================================== ** - * - * MD5.c - * - * Copyright: - * Copyright (C) 2003-2005 by Christopher R. Hertel - * - * Email: crh@ubiqx.mn.org - * - * $Id: MD5.c,v 0.6 2005/06/08 18:35:59 crh Exp $ - * - * - * Modifications and additions by dimok - * - * -------------------------------------------------------------------------- ** - * - * Description: - * Implements the MD5 hash algorithm, as described in RFC 1321. - * - * -------------------------------------------------------------------------- ** - * - * License: - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * -------------------------------------------------------------------------- ** - * - * Notes: - * - * None of this will make any sense unless you're studying RFC 1321 as you - * read the code. - * - * MD5 is described in RFC 1321. - * The MD*4* algorithm is described in RFC 1320 (that's 1321 - 1). - * MD5 is very similar to MD4, but not quite similar enough to justify - * putting the two into a single module. Besides, I wanted to add a few - * extra functions to this one to expand its usability. - * - * There are three primary motivations for this particular implementation. - * 1) Programmer's pride. I wanted to be able to say I'd done it, and I - * wanted to learn from the experience. - * 2) Portability. I wanted an implementation that I knew to be portable - * to a reasonable number of platforms. In particular, the algorithm is - * designed with little-endian platforms in mind, but I wanted an - * endian-agnostic implementation. - * 3) Compactness. While not an overriding goal, I thought it worth-while - * to see if I could reduce the overall size of the result. This is in - * keeping with my hopes that this library will be suitable for use in - * some embedded environments. - * Beyond that, cleanliness and clarity are always worth pursuing. - * - * As mentioned above, the code really only makes sense if you are familiar - * with the MD5 algorithm or are using RFC 1321 as a guide. This code is - * quirky, however, so you'll want to be reading carefully. - * - * Yeah...most of the comments are cut-and-paste from my MD4 implementation. - * - * -------------------------------------------------------------------------- ** - * - * References: - * IETF RFC 1321: The MD5 Message-Digest Algorithm - * Ron Rivest. IETF, April, 1992 - * - * ========================================================================== ** - */ - -#include -#include -#include -#include -#include -#include -#include - -#include "MD5.h" - -/* -------------------------------------------------------------------------- ** - * Static Constants: - * - * K[][] - In round one, the values of k (which are used to index - * particular four-byte sequences in the input) are simply - * sequential. In later rounds, however, they are a bit more - * varied. Rather than calculate the values of k (which may - * or may not be possible--I haven't though about it) the - * values are stored in this array. - * - * S[][] - In each round there is a left rotate operation performed as - * part of the 16 permutations. The number of bits varies in - * a repeating patter. This array keeps track of the patterns - * used in each round. - * - * T[][] - There are four rounds of 16 permutations for a total of 64. - * In each of these 64 permutation operations, a different - * constant value is added to the mix. The constants are - * based on the sine function...read RFC 1321 for more detail. - * In any case, the correct constants are stored in the T[][] - * array. They're divided up into four groups of 16. - */ - -static const uint8_t K[3][16] = { -/* Round 1: skipped (since it is simply sequential). */ -{ 1, 6, 11, 0, 5, 10, 15, 4, 9, 14, 3, 8, 13, 2, 7, 12 }, /* R2 */ -{ 5, 8, 11, 14, 1, 4, 7, 10, 13, 0, 3, 6, 9, 12, 15, 2 }, /* R3 */ -{ 0, 7, 14, 5, 12, 3, 10, 1, 8, 15, 6, 13, 4, 11, 2, 9 } /* R4 */ -}; - -static const uint8_t S[4][4] = { { 7, 12, 17, 22 }, /* Round 1 */ -{ 5, 9, 14, 20 }, /* Round 2 */ -{ 4, 11, 16, 23 }, /* Round 3 */ -{ 6, 10, 15, 21 } /* Round 4 */ -}; - -static const uint32_t T[4][16] = { { 0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, /* Round 1 */ -0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501, 0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be, 0x6b901122, 0xfd987193, - 0xa679438e, 0x49b40821 }, - -{ 0xf61e2562, 0xc040b340, 0x265e5a51, 0xe9b6c7aa, /* Round 2 */ -0xd62f105d, 0x02441453, 0xd8a1e681, 0xe7d3fbc8, 0x21e1cde6, 0xc33707d6, 0xf4d50d87, 0x455a14ed, 0xa9e3e905, 0xfcefa3f8, - 0x676f02d9, 0x8d2a4c8a }, - -{ 0xfffa3942, 0x8771f681, 0x6d9d6122, 0xfde5380c, /* Round 3 */ -0xa4beea44, 0x4bdecfa9, 0xf6bb4b60, 0xbebfbc70, 0x289b7ec6, 0xeaa127fa, 0xd4ef3085, 0x04881d05, 0xd9d4d039, 0xe6db99e5, - 0x1fa27cf8, 0xc4ac5665 }, - -{ 0xf4292244, 0x432aff97, 0xab9423a7, 0xfc93a039, /* Round 4 */ -0x655b59c3, 0x8f0ccc92, 0xffeff47d, 0x85845dd1, 0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1, 0xf7537e82, 0xbd3af235, - 0x2ad7d2bb, 0xeb86d391 }, }; - -/* -------------------------------------------------------------------------- ** - * Macros: - * md5F(), md5G(), md5H(), and md5I() are described in RFC 1321. - * All of these operations are bitwise, and so not impacted by endian-ness. - * - * GetLongByte() - * Extract one byte from a (32-bit) longword. A value of 0 for - * indicates the lowest order byte, while 3 indicates the highest order - * byte. - * - */ - -#define md5F( X, Y, Z ) ( ((X) & (Y)) | ((~(X)) & (Z)) ) -#define md5G( X, Y, Z ) ( ((X) & (Z)) | ((Y) & (~(Z))) ) -#define md5H( X, Y, Z ) ( (X) ^ (Y) ^ (Z) ) -#define md5I( X, Y, Z ) ( (Y) ^ ((X) | (~(Z))) ) - -#define GetLongByte( L, idx ) ((unsigned char)(( L >> (((idx) & 0x03) << 3) ) & 0xFF)) - -#define STR2HEX(x) ((x >= 0x30) && (x <= 0x39)) ? x - 0x30 : toupper((int)x)-0x37 - -/* -------------------------------------------------------------------------- ** - * Static Functions: - */ - -static void Permute(uint32_t ABCD[4], const unsigned char block[64]) -/* ------------------------------------------------------------------------ ** - * Permute the ABCD "registers" using the 64-byte as a driver. - * - * Input: ABCD - Pointer to an array of four unsigned longwords. - * block - An array of bytes, 64 bytes in size. - * - * Output: none. - * - * Notes: The MD5 algorithm operates on a set of four longwords stored - * (conceptually) in four "registers". It is easy to imagine a - * simple MD4/5 chip that would operate this way. In any case, - * the mangling of the contents of those registers is driven by - * the input message. The message is chopped and finally padded - * into 64-byte chunks and each chunk is used to manipulate the - * contents of the registers. - * - * The MD5 Algorithm calls for padding the input to ensure that - * it is a multiple of 64 bytes in length. The last 16 bytes - * of the padding space are used to store the message length - * (the length of the original message, before padding, expressed - * in terms of bits). If there is not enough room for 16 bytes - * worth of bitcount (eg., if the original message was 122 bytes - * long) then the block is padded to the end with zeros and - * passed to this function. Then *another* block is filled with - * zeros except for the last 16 bytes which contain the length. - * - * Oh... and the algorithm requires that there be at least one - * padding byte. The first padding byte has a value of 0x80, - * and any others are 0x00. - * - * ------------------------------------------------------------------------ ** - */ -{ - int round; - int i, j; - uint8_t s; - uint32_t a, b, c, d; - uint32_t KeepABCD[4]; - uint32_t X[16]; - - /* Store the current ABCD values for later re-use. - */ - for (i = 0; i < 4; i++) - KeepABCD[i] = ABCD[i]; - - /* Convert the input block into an array of unsigned longs, taking care - * to read the block in Little Endian order (the algorithm assumes this). - * The uint32_t values are then handled in host order. - */ - for (i = 0, j = 0; i < 16; i++) - { - X[i] = (uint32_t) block[j++]; - X[i] |= ((uint32_t) block[j++] << 8); - X[i] |= ((uint32_t) block[j++] << 16); - X[i] |= ((uint32_t) block[j++] << 24); - } - - /* This loop performs the four rounds of permutations. - * The rounds are each very similar. The differences are in three areas: - * - The function (F, G, H, or I) used to perform bitwise permutations - * on the registers, - * - The order in which values from X[] are chosen. - * - Changes to the number of bits by which the registers are rotated. - * This implementation uses a switch statement to deal with some of the - * differences between rounds. Other differences are handled by storing - * values in arrays and using the round number to select the correct set - * of values. - * - * (My implementation appears to be a poor compromise between speed, size, - * and clarity. Ugh. [crh]) - */ - for (round = 0; round < 4; round++) - { - for (i = 0; i < 16; i++) - { - j = (4 - (i % 4)) & 0x3; /* handles the rotation of ABCD. */ - s = S[round][i % 4]; /* is the bit shift for this iteration. */ - - b = ABCD[(j + 1) & 0x3]; /* Copy the b,c,d values per ABCD rotation. */ - c = ABCD[(j + 2) & 0x3]; /* This isn't really necessary, it just looks */ - d = ABCD[(j + 3) & 0x3]; /* clean & will hopefully be optimized away. */ - - /* The actual perumation function. - * This is broken out to minimize the code within the switch(). - */ - switch (round) - { - case 0: - /* round 1 */ - a = md5F( b, c, d ) + X[i]; - break; - case 1: - /* round 2 */ - a = md5G( b, c, d ) + X[K[0][i]]; - break; - case 2: - /* round 3 */ - a = md5H( b, c, d ) + X[K[1][i]]; - break; - default: - /* round 4 */ - a = md5I( b, c, d ) + X[K[2][i]]; - break; - } - a = 0xFFFFFFFF & (ABCD[j] + a + T[round][i]); - ABCD[j] = b + (0xFFFFFFFF & ((a << s) | (a >> (32 - s)))); - } - } - - /* Use the stored original A, B, C, D values to perform - * one last convolution. - */ - for (i = 0; i < 4; i++) - ABCD[i] = 0xFFFFFFFF & (ABCD[i] + KeepABCD[i]); - -} /* Permute */ - -/* -------------------------------------------------------------------------- ** - * Functions: - */ - -auth_md5Ctx *auth_md5InitCtx(auth_md5Ctx *ctx) -/* ------------------------------------------------------------------------ ** - * Initialize an MD5 context. - * - * Input: ctx - A pointer to the MD5 context structure to be initialized. - * Contexts are typically created thusly: - * ctx = (auth_md5Ctx *)malloc( sizeof(auth_md5Ctx) ); - * - * Output: A pointer to the initialized context (same as ). - * - * Notes: The purpose of the context is to make it possible to generate - * an MD5 Message Digest in stages, rather than having to pass a - * single large block to a single MD5 function. The context - * structure keeps track of various bits of state information. - * - * Once the context is initialized, the blocks of message data - * are passed to the function. Once the - * final bit of data has been handed to the - * context can be closed out by calling , - * which also calculates the final MD5 result. - * - * Don't forget to free an allocated context structure when - * you've finished using it. - * - * See Also: , - * - * ------------------------------------------------------------------------ ** - */ -{ - ctx->len = 0; - ctx->b_used = 0; - - ctx->ABCD[0] = 0x67452301; /* The array ABCD[] contains the four 4-byte */ - ctx->ABCD[1] = 0xefcdab89; /* "registers" that are manipulated to */ - ctx->ABCD[2] = 0x98badcfe; /* produce the MD5 digest. The input acts */ - ctx->ABCD[3] = 0x10325476; /* upon the registers, not the other way */ - /* 'round. The initial values are those */ - /* given in RFC 1321 (pg. 4). Note, however, that RFC 1321 */ - /* provides these values as bytes, not as longwords, and the */ - /* bytes are arranged in little-endian order as if they were */ - /* the bytes of (little endian) 32-bit ints. That's */ - /* confusing as all getout (to me, anyway). The values given */ - /* here are provided as 32-bit values in C language format, */ - /* so they are endian-agnostic. */ - return (ctx); -} /* auth_md5InitCtx */ - -auth_md5Ctx *auth_md5SumCtx(auth_md5Ctx *ctx, const unsigned char *src, const int len) -/* ------------------------------------------------------------------------ ** - * Build an MD5 Message Digest within the given context. - * - * Input: ctx - Pointer to the context in which the MD5 sum is being - * built. - * src - A chunk of source data. This will be used to drive - * the MD5 algorithm. - * len - The number of bytes in . - * - * Output: A pointer to the updated context (same as ). - * - * See Also: , , - * - * ------------------------------------------------------------------------ ** - */ -{ - int i; - - /* Add the new block's length to the total length. - */ - ctx->len += (uint32_t) len; - - /* Copy the new block's data into the context block. - * Call the Permute() function whenever the context block is full. - */ - for (i = 0; i < len; i++) - { - ctx->block[ctx->b_used] = src[i]; - (ctx->b_used)++; - if (64 == ctx->b_used) - { - Permute(ctx->ABCD, ctx->block); - ctx->b_used = 0; - } - } - - /* Return the updated context. - */ - return (ctx); -} /* auth_md5SumCtx */ - -auth_md5Ctx *auth_md5CloseCtx(auth_md5Ctx *ctx, unsigned char *dst) -/* ------------------------------------------------------------------------ ** - * Close an MD5 Message Digest context and generate the final MD5 sum. - * - * Input: ctx - Pointer to the context in which the MD5 sum is being - * built. - * dst - A pointer to at least 16 bytes of memory, which will - * receive the finished MD5 sum. - * - * Output: A pointer to the closed context (same as ). - * You might use this to free a malloc'd context structure. :) - * - * Notes: The context () is returned in an undefined state. - * It must be re-initialized before re-use. - * - * See Also: , - * - * ------------------------------------------------------------------------ ** - */ -{ - int i; - uint32_t l; - - /* Add the required 0x80 padding initiator byte. - * The auth_md5SumCtx() function always permutes and resets the context - * block when it gets full, so we know that there must be at least one - * free byte in the context block. - */ - ctx->block[ctx->b_used] = 0x80; - (ctx->b_used)++; - - /* Zero out any remaining free bytes in the context block. - */ - for (i = ctx->b_used; i < 64; i++) - ctx->block[i] = 0; - - /* We need 8 bytes to store the length field. - * If we don't have 8, call Permute() and reset the context block. - */ - if (56 < ctx->b_used) - { - Permute(ctx->ABCD, ctx->block); - for (i = 0; i < 64; i++) - ctx->block[i] = 0; - } - - /* Add the total length and perform the final perumation. - * Note: The 60'th byte is read from the *original* len> value - * and shifted to the correct position. This neatly avoids - * any MAXINT numeric overflow issues. - */ - l = ctx->len << 3; - for (i = 0; i < 4; i++) - ctx->block[56 + i] |= GetLongByte( l, i ); - ctx->block[60] = ((GetLongByte( ctx->len, 3 ) & 0xE0) >> 5); /* See Above! */ - Permute(ctx->ABCD, ctx->block); - - /* Now copy the result into the output buffer and we're done. - */ - for (i = 0; i < 4; i++) - { - dst[0 + i] = GetLongByte( ctx->ABCD[0], i ); - dst[4 + i] = GetLongByte( ctx->ABCD[1], i ); - dst[8 + i] = GetLongByte( ctx->ABCD[2], i ); - dst[12 + i] = GetLongByte( ctx->ABCD[3], i ); - } - - /* Return the context. - * This is done for compatibility with the other auth_md5*Ctx() functions. - */ - return (ctx); -} /* auth_md5CloseCtx */ - -unsigned char * MD5(unsigned char *dst, const unsigned char *src, const int len) -/* ------------------------------------------------------------------------ ** - * Compute an MD5 message digest. - * - * Input: dst - Destination buffer into which the result will be written. - * Must be 16 bytes, minimum. - * src - Source data block to be MD5'd. - * len - The length, in bytes, of the source block. - * (Note that the length is given in bytes, not bits.) - * - * Output: A pointer to , which will contain the calculated 16-byte - * MD5 message digest. - * - * Notes: This function is a shortcut. It takes a single input block. - * For more drawn-out operations, see . - * - * This function is interface-compatible with the - * function in the MD4 module. - * - * The MD5 algorithm is designed to work on data with an - * arbitrary *bit* length. Most implementations, this one - * included, handle the input data in byte-sized chunks. - * - * The MD5 algorithm does much of its work using four-byte - * words, and so can be tuned for speed based on the endian-ness - * of the host. This implementation is intended to be - * endian-neutral, which may make it a teeny bit slower than - * others. ...maybe. - * - * See Also: - * - * ------------------------------------------------------------------------ ** - */ -{ - auth_md5Ctx ctx[1]; - - (void) auth_md5InitCtx(ctx); /* Open a context. */ - (void) auth_md5SumCtx(ctx, src, len); /* Pass only one block. */ - (void) auth_md5CloseCtx(ctx, dst); /* Close the context. */ - - return (dst); /* Makes life easy. */ -} /* auth_md5Sum */ - -unsigned char * MD5fromFile(unsigned char *dst, const char *src) -/* ------------------------------------------------------------------------ ** - * Compute an MD5 message digest. - * - * Input: dst - Destination buffer into which the result will be written. - * Must be 16 bytes, minimum. - * src - filepath of the file to be checked - * - * Output: A pointer to , which will contain the calculated 16-byte - * MD5 message digest. - * - * Notes: This function is a shortcut. It takes a single input block. - * For more drawn-out operations, see . - * - * This function is interface-compatible with the - * function in the MD4 module. - * - * The MD5 algorithm is designed to work on data with an - * arbitrary *bit* length. Most implementations, this one - * included, handle the input data in byte-sized chunks. - * - * The MD5 algorithm does much of its work using four-byte - * words, and so can be tuned for speed based on the endian-ness - * of the host. This implementation is intended to be - * endian-neutral, which may make it a teeny bit slower than - * others. ...maybe. - * - * See Also: - * - * ------------------------------------------------------------------------ ** - */ -{ - auth_md5Ctx ctx[1]; - - FILE * file; - unsigned int blksize = 0; - unsigned int read = 0; - - file = fopen(src, "rb"); - - if (file == NULL) - { - return NULL; - } - - (void) auth_md5InitCtx(ctx); /* Open a context. */ - - fseek(file, 0, SEEK_END); - unsigned long long filesize = ftell(file); - rewind(file); - - if (filesize < 1048576) //1MB cache for files bigger than 1 MB - blksize = filesize; - else blksize = 1048576; - - unsigned char * buffer = malloc(blksize); - - if (buffer == NULL) - { - //no memory - fclose(file); - return NULL; - } - - do - { - read = fread(buffer, 1, blksize, file); - (void) auth_md5SumCtx(ctx, buffer, read); /* Pass only one block. */ - - } while (read > 0); - - fclose(file); - free(buffer); - - (void) auth_md5CloseCtx(ctx, dst); /* Close the context. */ - - return (dst); /* Makes life easy. */ -} /* auth_md5Sum */ - -const char * MD5ToString(const unsigned char * hash, char * dst) -{ - char hexchar[3]; - short i = 0, n = 0; - - for (i = 0; i < 16; i++) - { - sprintf(hexchar, "%02X", hash[i]); - - dst[n++] = hexchar[0]; - dst[n++] = hexchar[1]; - } - - dst[n] = 0x00; - - return dst; -} - -unsigned char * StringToMD5(const char * hash, unsigned char * dst) -{ - char hexchar[2]; - short i = 0, n = 0; - - for (i = 0; i < 16; i++) - { - hexchar[0] = hash[n++]; - hexchar[1] = hash[n++]; - - dst[i] = STR2HEX( hexchar[0] ); - dst[i] <<= 4; - dst[i] += STR2HEX( hexchar[1] ); - } - - return dst; -} - -/* ========================================================================== */ diff --git a/source/utils/MD5.h b/source/utils/MD5.h deleted file mode 100644 index 07902c2b..00000000 --- a/source/utils/MD5.h +++ /dev/null @@ -1,241 +0,0 @@ -#ifndef MD5_H -#define MD5_H - -#ifdef __cplusplus -extern "C" -{ -#endif - - /* ========================================================================== ** - * - * MD5.h - * - * Copyright: - * Copyright (C) 2003-2005 by Christopher R. Hertel - * - * Email: crh@ubiqx.mn.org - * - * $Id: MD5.h,v 0.6 2005/06/08 18:35:59 crh Exp $ - * - * Modifications and additions by dimok - * - * -------------------------------------------------------------------------- ** - * - * Description: - * Implements the MD5 hash algorithm, as described in RFC 1321. - * - * -------------------------------------------------------------------------- ** - * - * License: - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * -------------------------------------------------------------------------- ** - * - * Notes: - * - * None of this will make any sense unless you're studying RFC 1321 as you - * read the code. - * - * MD5 is described in RFC 1321. - * The MD*4* algorithm is described in RFC 1320 (that's 1321 - 1). - * MD5 is very similar to MD4, but not quite similar enough to justify - * putting the two into a single module. Besides, I wanted to add a few - * extra functions to this one to expand its usability. - * - * There are three primary motivations for this particular implementation. - * 1) Programmer's pride. I wanted to be able to say I'd done it, and I - * wanted to learn from the experience. - * 2) Portability. I wanted an implementation that I knew to be portable - * to a reasonable number of platforms. In particular, the algorithm is - * designed with little-endian platforms in mind, but I wanted an - * endian-agnostic implementation. - * 3) Compactness. While not an overriding goal, I thought it worth-while - * to see if I could reduce the overall size of the result. This is in - * keeping with my hopes that this library will be suitable for use in - * some embedded environments. - * Beyond that, cleanliness and clarity are always worth pursuing. - * - * As mentioned above, the code really only makes sense if you are familiar - * with the MD5 algorithm or are using RFC 1321 as a guide. This code is - * quirky, however, so you'll want to be reading carefully. - * - * Yeah...most of the comments are cut-and-paste from my MD4 implementation. - * - * -------------------------------------------------------------------------- ** - * - * References: - * IETF RFC 1321: The MD5 Message-Digest Algorithm - * Ron Rivest. IETF, April, 1992 - * - * ========================================================================== ** - */ - /* -------------------------------------------------------------------------- ** - * Typedefs: - */ - - typedef struct - { - unsigned int len; - unsigned int ABCD[4]; - int b_used; - unsigned char block[64]; - } auth_md5Ctx; - - /* -------------------------------------------------------------------------- ** - * Functions: - */ - - auth_md5Ctx *auth_md5InitCtx(auth_md5Ctx *ctx); - /* ------------------------------------------------------------------------ ** - * Initialize an MD5 context. - * - * Input: ctx - A pointer to the MD5 context structure to be initialized. - * Contexts are typically created thusly: - * ctx = (auth_md5Ctx *)malloc( sizeof(auth_md5Ctx) ); - * - * Output: A pointer to the initialized context (same as ). - * - * Notes: The purpose of the context is to make it possible to generate - * an MD5 Message Digest in stages, rather than having to pass a - * single large block to a single MD5 function. The context - * structure keeps track of various bits of state information. - * - * Once the context is initialized, the blocks of message data - * are passed to the function. Once the - * final bit of data has been handed to the - * context can be closed out by calling , - * which also calculates the final MD5 result. - * - * Don't forget to free an allocated context structure when - * you've finished using it. - * - * See Also: , - * - * ------------------------------------------------------------------------ ** - */ - - auth_md5Ctx *auth_md5SumCtx(auth_md5Ctx *ctx, const unsigned char *src, const int len); - /* ------------------------------------------------------------------------ ** - * Build an MD5 Message Digest within the given context. - * - * Input: ctx - Pointer to the context in which the MD5 sum is being - * built. - * src - A chunk of source data. This will be used to drive - * the MD5 algorithm. - * len - The number of bytes in . - * - * Output: A pointer to the updated context (same as ). - * - * See Also: , , - * - * ------------------------------------------------------------------------ ** - */ - - auth_md5Ctx *auth_md5CloseCtx(auth_md5Ctx *ctx, unsigned char *dst); - /* ------------------------------------------------------------------------ ** - * Close an MD5 Message Digest context and generate the final MD5 sum. - * - * Input: ctx - Pointer to the context in which the MD5 sum is being - * built. - * dst - A pointer to at least 16 bytes of memory, which will - * receive the finished MD5 sum. - * - * Output: A pointer to the closed context (same as ). - * You might use this to free a malloc'd context structure. :) - * - * Notes: The context () is returned in an undefined state. - * It must be re-initialized before re-use. - * - * See Also: , - * - * ------------------------------------------------------------------------ ** - */ - - unsigned char * MD5(unsigned char * hash, const unsigned char *src, const int len); - /* ------------------------------------------------------------------------ ** - * Compute an MD5 message digest. - * - * Input: dst - Destination buffer into which the result will be written. - * Must be 16 bytes, minimum. - * src - Source data block to be MD5'd. - * len - The length, in bytes, of the source block. - * (Note that the length is given in bytes, not bits.) - * - * Output: A pointer to , which will contain the calculated 16-byte - * MD5 message digest. - * - * Notes: This function is a shortcut. It takes a single input block. - * For more drawn-out operations, see . - * - * This function is interface-compatible with the - * function in the MD4 module. - * - * The MD5 algorithm is designed to work on data with an - * arbitrary *bit* length. Most implementations, this one - * included, handle the input data in byte-sized chunks. - * - * The MD5 algorithm does much of its work using four-byte - * words, and so can be tuned for speed based on the endian-ness - * of the host. This implementation is intended to be - * endian-neutral, which may make it a teeny bit slower than - * others. ...maybe. - * - * See Also: - * - * ------------------------------------------------------------------------ ** - */ - - unsigned char * MD5fromFile(unsigned char *dst, const char *src); - /* ------------------------------------------------------------------------ ** - * Compute an MD5 message digest. - * - * Input: dst - Destination buffer into which the result will be written. - * Must be 16 bytes, minimum. - * src - filepath to the file to be MD5'd. - * - * Output: A pointer to , which will contain the calculated 16-byte - * MD5 message digest. - * - * Notes: This function is a shortcut. It takes a single input block. - * For more drawn-out operations, see . - * - * This function is interface-compatible with the - * function in the MD4 module. - * - * The MD5 algorithm is designed to work on data with an - * arbitrary *bit* length. Most implementations, this one - * included, handle the input data in byte-sized chunks. - * - * The MD5 algorithm does much of its work using four-byte - * words, and so can be tuned for speed based on the endian-ness - * of the host. This implementation is intended to be - * endian-neutral, which may make it a teeny bit slower than - * others. ...maybe. - * - * See Also: - * - * ------------------------------------------------------------------------ ** - */ - - const char * MD5ToString(const unsigned char *hash, char *dst); - unsigned char * StringToMD5(const char * hash, unsigned char * dst); - -/* ========================================================================== */ - -#ifdef __cplusplus -} -#endif -#endif /* AUTH_MD5_H */ diff --git a/source/utils/PasswordCheck.cpp b/source/utils/PasswordCheck.cpp deleted file mode 100644 index a0ceb595..00000000 --- a/source/utils/PasswordCheck.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#include "prompts/PromptWindows.h" - -int PasswordCheck(const char * password) -{ - if(!password || strcmp(password, "") == 0 || strcmp(password, "not set") == 0) - return 2; - - char entered[100]; - memset(entered, 0, sizeof(entered)); - - int result = OnScreenKeyboard(entered, 20, 0); - if (result == 1) - { - if (strcmp(entered, password) == 0) //if password correct - return 1; - else - return -1; - } - - return 0; -} diff --git a/source/utils/PasswordCheck.h b/source/utils/PasswordCheck.h deleted file mode 100644 index 9df6cc22..00000000 --- a/source/utils/PasswordCheck.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef PASSWORD_CHECK_H_ -#define PASSWORD_CHECK_H_ - -int PasswordCheck(const char * password); - -#endif diff --git a/source/utils/ResourceManager.cpp b/source/utils/ResourceManager.cpp deleted file mode 100644 index a18881f7..00000000 --- a/source/utils/ResourceManager.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include "ResourceManager.h" - -ResourceManager * ResourceManager::instance = NULL; - -ResourceManager * ResourceManager::Instance() -{ - if (instance == NULL) - { - instance = new ResourceManager(); - } - return instance; -} - -void ResourceManager::DestroyInstance() -{ - if (instance != NULL) - { - delete instance; - instance = NULL; - } -} - -ResourceManager::~ResourceManager() -{ - // Delete all images... - std::map::iterator imgitr; - for (imgitr = images.begin(); imgitr != images.end(); imgitr++) - { - if(imgitr->second.data) - free(imgitr->second.data); - } - images.clear(); - imageCount.clear(); -} - -void ResourceManager::AddImageData(const u8 *img, ImageData & Data) -{ - ResourceManager::Instance()->InternalAddImageData(img, Data); -} - -ImageData * ResourceManager::GetImageData(const u8 *img) -{ - return ResourceManager::Instance()->InternalGetImageData(img); -} - -void ResourceManager::Remove(u8 * img) -{ - ResourceManager::Instance()->InternalRemoveImageData(img); -} - -void ResourceManager::InternalAddImageData(const u8 * img, ImageData & Data) -{ - std::map::iterator itr = images.find(img); - if (itr != images.end()) - return; - - images[img] = Data; - imageCount[Data.data] = 1; -} - -ImageData * ResourceManager::InternalGetImageData(const u8 *img) -{ - std::map::iterator itr = images.find(img); - if (itr == images.end()) - return NULL; - - imageCount[itr->second.data]++; - - return &itr->second; -} - -void ResourceManager::InternalRemoveImageData(u8 * img) -{ - std::map::iterator itr = imageCount.find(img); - if (itr != imageCount.end()) - { - itr->second--; - - if (itr->second == 0) // Remove the resource - { - imageCount.erase(itr); - - std::map::iterator iitr; - for (iitr = images.begin(); iitr != images.end(); iitr++) - { - if (iitr->second.data == img) - { - if(iitr->second.data) - free(iitr->second.data); - images.erase(iitr); - break; - } - } - } - } - else if(img) - { - //! This case should actually never accur - free(img); - } -} diff --git a/source/utils/ResourceManager.h b/source/utils/ResourceManager.h deleted file mode 100644 index e1897087..00000000 --- a/source/utils/ResourceManager.h +++ /dev/null @@ -1,63 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#ifndef _RESOURCE_MANAGER_H -#define _RESOURCE_MANAGER_H - -#include - -#include "libwiigui/gui.h" - -#include - -typedef struct _ImageData -{ - u8 * data; - int width; - int height; - u8 format; -} ImageData; - -class ResourceManager -{ - public: - static ResourceManager *Instance(); - static void DestroyInstance(); - - static void AddImageData(const u8 *img, ImageData & data); - static ImageData * GetImageData(const u8 *img); - static void Remove(u8 * img); - private: - void InternalAddImageData(const u8 * img, ImageData & Data); - ImageData *InternalGetImageData(const u8 *img); - void InternalRemoveImageData(u8 * img); - - ~ResourceManager(); - - static ResourceManager *instance; - - std::map images; - std::map imageCount; -}; - -#endif //_ResourceManager_H diff --git a/source/utils/ShowError.cpp b/source/utils/ShowError.cpp deleted file mode 100644 index ad9c8e09..00000000 --- a/source/utils/ShowError.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#include -#include -#include - -#include "language/gettext.h" -#include "prompts/PromptWindows.h" - -extern "C" void ShowError(const char * format, ...) -{ - char *tmp=0; - va_list va; - va_start(va, format); - if((vasprintf(&tmp, format, va)>=0) && tmp) - { - WindowPrompt(tr("Error:"), tmp, tr("OK")); - } - va_end(va); - - if(tmp) - free(tmp); -} diff --git a/source/utils/ShowError.h b/source/utils/ShowError.h deleted file mode 100644 index 20f64aed..00000000 --- a/source/utils/ShowError.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef SHOWERROR_H_ -#define SHOWERROR_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -void ShowError(const char * format, ...); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/utils/StringTools.c b/source/utils/StringTools.c deleted file mode 100644 index 1f19dcd9..00000000 --- a/source/utils/StringTools.c +++ /dev/null @@ -1,146 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#include -#include -#include -#include -#include -#include - -const char * fmt(const char * format, ...) -{ - static char strChar[512]; - strChar[0] = 0; - char * tmp = NULL; - - va_list va; - va_start(va, format); - if((vasprintf(&tmp, format, va) >= 0) && tmp) - { - snprintf(strChar, sizeof(strChar), tmp); - free(tmp); - va_end(va); - return (const char *) strChar; - } - va_end(va); - - if(tmp) - free(tmp); - - return NULL; -} - -const wchar_t * wfmt(const char * format, ...) -{ - static wchar_t strWChar[512]; - strWChar[0] = 0; - - if(!format) - return (const wchar_t *) strWChar; - - if(strcmp(format, "") == 0) - return (const wchar_t *) strWChar; - - char * tmp = NULL; - - va_list va; - va_start(va, format); - if((vasprintf(&tmp, format, va) >= 0) && tmp) - { - int bt; - int strlength = strlen(tmp); - bt = mbstowcs(strWChar, tmp, (strlength < 512) ? strlength : 512 ); - free(tmp); - tmp = 0; - - if(bt > 0) - { - strWChar[bt] = 0; - return (const wchar_t *) strWChar; - } - } - va_end(va); - - if(tmp) - free(tmp); - - return NULL; -} - -bool char2wchar_t(const char * strChar, wchar_t * dest) -{ - if(!strChar || !dest) - return false; - - int bt; - bt = mbstowcs(dest, strChar, strlen(strChar)); - if (bt > 0) { - dest[bt] = 0; - return true; - } - - return false; -} - -int strtokcmp(const char * string, const char * compare, const char * separator) -{ - if(!string || !compare) - return -1; - - char TokCopy[512]; - strcpy(TokCopy, compare); - - char * strTok = strtok(TokCopy, separator); - - while (strTok != NULL) - { - if (strcasecmp(string, strTok) == 0) - { - return 0; - } - strTok = strtok(NULL,separator); - } - - return -1; -} - -inline const char * FullpathToFilename(const char *path) -{ - if(!path) return path; - - const char * ptr = path; - const char * Filename = ptr; - - while(*ptr != '\0') - { - if(*ptr == '/' && ptr[1] != '\0') - Filename = ptr+1; - - ++ptr; - } - - return Filename; -} diff --git a/source/utils/StringTools.h b/source/utils/StringTools.h deleted file mode 100644 index d9c0a856..00000000 --- a/source/utils/StringTools.h +++ /dev/null @@ -1,46 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#ifndef __STRING_TOOLS_H -#define __STRING_TOOLS_H - -#ifdef __cplusplus -extern "C" { -#endif - -//! fmt and wfmt can only be used once at a session and the strings needs -//! to be copied afterwards. A second use overwrites the first string. -const char * fmt(const char * format, ...); -const wchar_t * wfmt(const char * format, ...); -bool char2wchar_t(const char * src, wchar_t * dest); -int strtokcmp(const char * string, const char * compare, const char * separator); -const char * FullpathToFilename(const char *path); - -#ifdef __cplusplus -} -#endif //__cplusplus - -#endif /* __STRING_TOOLS_H */ - diff --git a/source/utils/ThreadedTask.cpp b/source/utils/ThreadedTask.cpp deleted file mode 100644 index 65f7d702..00000000 --- a/source/utils/ThreadedTask.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include "ThreadedTask.hpp" - -ThreadedTask * ThreadedTask::instance = NULL; - -ThreadedTask::ThreadedTask() - : ExitRequested(false) -{ - LWP_CreateThread (&Thread, ThreadCallback, this, NULL, 16384, 80); -} - -ThreadedTask::~ThreadedTask() -{ - ExitRequested = true; - Execute(); - LWP_JoinThread(Thread, NULL); -} - -void * ThreadedTask::ThreadCallback(void *arg) -{ - ThreadedTask * myInstance = (ThreadedTask *) arg; - - while(!myInstance->ExitRequested) - { - LWP_SuspendThread(myInstance->Thread); - - while(!myInstance->CallbackList.empty()) - { - if(myInstance->CallbackList[0].first) - myInstance->CallbackList[0].first->Execute(myInstance->ArgList[0]); - - else if(myInstance->CallbackList[0].second) - myInstance->CallbackList[0].second(myInstance->ArgList[0]); - - myInstance->CallbackList.erase(myInstance->CallbackList.begin()); - myInstance->ArgList.erase(myInstance->ArgList.begin()); - } - } - - return NULL; -} diff --git a/source/utils/ThreadedTask.hpp b/source/utils/ThreadedTask.hpp deleted file mode 100644 index 168fa021..00000000 --- a/source/utils/ThreadedTask.hpp +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#ifndef THREADED_TASK_HPP_ -#define THREADED_TASK_HPP_ - -#include -#include -#include "Callback.hpp" - -class ThreadedTask -{ - public: - static ThreadedTask * Instance() { if(!instance) instance = new ThreadedTask(); return instance; }; - static void DestroyInstance() { delete instance; instance = NULL; }; - - //! This callback is used for C-Like callbacks - typedef void (*Callback)(void * arg); - void AddCallback(ThreadedTask::Callback C_Standard, void * arg = 0) - { - CallbackList.push_back(std::pair(0, C_Standard)); - ArgList.push_back(arg); - } - //! This callback is used for C++-Like class callbacks - void AddCallback(cCallback * classCallback, void * arg = 0) - { - CallbackList.push_back(std::pair(classCallback, 0)); - ArgList.push_back(arg); - } - //! Start the threaded task thread and execute one callback after another - FIFO style - void Execute() { LWP_ResumeThread(Thread); }; - private: - ThreadedTask(); - ~ThreadedTask(); - void ThreadLoop(void *arg); - static void * ThreadCallback(void *arg); - - static ThreadedTask *instance; - lwp_t Thread; - bool ExitRequested; - std::vector > CallbackList; - std::vector ArgList; -}; - -#endif diff --git a/source/utils/encrypt.c b/source/utils/encrypt.c deleted file mode 100644 index 53cadbe1..00000000 --- a/source/utils/encrypt.c +++ /dev/null @@ -1,57 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by dude, Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#include -#include - -//! No need for high security crap. It's a simple encrypter/decrypter -//! with a constant sid. -const char * sid = "USBLoaderGX"; - -void EncryptString(const char *src, char *dst) -{ - unsigned int i; - char tmp[3]; - dst[0] = 0; - - for (i = 0; i < strlen(src); i++) - { - sprintf(tmp, "%02x", src[i] ^ sid[i%10]); - strcat(dst, tmp); - } -} - -void DecryptString(const char *src, char *dst) -{ - unsigned int i; - for (i = 0; i < strlen(src); i += 2) - { - char c = (src[i] >= 'a' ? (src[i] - 'a') + 10 : (src[i] - '0')) << 4; - c += (src[i+1] >= 'a' ? (src[i+1] - 'a') + 10 : (src[i+1] - '0')); - dst[i>>1] = c ^ sid[(i>>1)%10]; - } - dst[strlen(src)>>1] = 0; -} - diff --git a/source/utils/encrypt.h b/source/utils/encrypt.h deleted file mode 100644 index 6c8139de..00000000 --- a/source/utils/encrypt.h +++ /dev/null @@ -1,41 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by dude - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#ifndef __ENCRYPT_H -#define __ENCRYPT_H - -#ifdef __cplusplus -extern "C" { -#endif - -void EncryptString(const char *src, char *dst); -void DecryptString(const char *src, char *dst); - -#ifdef __cplusplus -} -#endif //__cplusplus - -#endif /* __ENCRYPT_H */ - diff --git a/source/utils/minizip/miniunz.c b/source/utils/minizip/miniunz.c deleted file mode 100644 index c54725c7..00000000 --- a/source/utils/minizip/miniunz.c +++ /dev/null @@ -1,299 +0,0 @@ -/* - miniunz.c - Version 1.01e, February 12th, 2005 - - Copyright (C) 1998-2005 Gilles Vollant - */ - -#include -#include -#include -#include -#include -#include -# include -# include - -#include "miniunz.h" - -#define CASESENSITIVITY (0) -#define WRITEBUFFERSIZE (8192) -#define MAXFILENAME (256) - -static int mymkdir(const char* dirname) -{ - int ret = 0; - ret = mkdir(dirname, 0775); - return ret; -} - -int makedir(char *newdir) -{ - char *buffer; - char *p; - int len = (int) strlen(newdir); - - if (len <= 0) return 0; - - buffer = (char*) malloc(len + 1); - strcpy(buffer, newdir); - - if (buffer[len - 1] == '/') - { - buffer[len - 1] = '\0'; - } - if (mymkdir(buffer) == 0) - { - free(buffer); - return 1; - } - - p = buffer + 1; - while (1) - { - char hold; - - while (*p && *p != '\\' && *p != '/') - p++; - hold = *p; - *p = 0; - if ((mymkdir(buffer) == -1) && (errno == ENOENT)) - { - // printf("couldn't create directory %s\n",buffer); - free(buffer); - return 0; - } - if (hold == 0) break; - *p++ = hold; - } - free(buffer); - return 1; -} - -static char *fullfilename(const char *basedir, char *filename) -{ - char *file = (char *) malloc(strlen(basedir) + strlen(filename) + 1); - if (basedir == NULL) - { - strcpy(file, filename); - } - else - { - if (basedir[strlen(basedir) - 1] == '/') - { - sprintf(file, "%s%s", basedir, filename); - } - else - { - sprintf(file, "%s/%s", basedir, filename); - } - } - return file; -} - -static int do_extract_currentfile(unzFile uf, const int* popt_extract_without_path, int* popt_overwrite, - const char* password, const char *basedir) -{ - char filename_inzip[256]; - char* filename_withoutpath; - char* filename_withpath; - char* p; - int err = UNZ_OK; - FILE *fout = NULL; - void* buf; - uInt size_buf; - - unz_file_info file_info; - err = unzGetCurrentFileInfo(uf, &file_info, filename_inzip, sizeof(filename_inzip), NULL, 0, NULL, 0); - - if (err != UNZ_OK) - { - // printf("error %d with zipfile in unzGetCurrentFileInfo\n",err); - return err; - } - - size_buf = WRITEBUFFERSIZE; - buf = (void*) malloc(size_buf); - if (buf == NULL) - { - // printf("Error allocating memory\n"); - return UNZ_INTERNALERROR; - } - - p = filename_withoutpath = filename_inzip; - filename_withpath = fullfilename(basedir, filename_inzip); - while ((*p) != '\0') - { - if (((*p) == '/') || ((*p) == '\\')) filename_withoutpath = p + 1; - p++; - } - - if ((*filename_withoutpath) == '\0') - { - if ((*popt_extract_without_path) == 0) - { - - // Fix the path, this will fail if the directoryname is the same as the first filename in the zip - char *path = (char *) malloc(strlen(filename_withpath)); - strcpy(path, filename_withpath); - char *ptr = strstr(path, filename_withoutpath); - *ptr = '\0'; - - // printf("creating directory: %s\n",path); - mymkdir(path); - - free(path); - } - } - else - { - char* write_filename; - int skip = 0; - - if ((*popt_extract_without_path) == 0) - write_filename = filename_withpath; - else write_filename = filename_withoutpath; - - err = unzOpenCurrentFilePassword(uf, password); - if (err != UNZ_OK) - { - // printf("error %d with zipfile in unzOpenCurrentFilePassword\n",err); - } - - if (((*popt_overwrite) == 0) && (err == UNZ_OK)) - { - char rep = 0; - FILE* ftestexist; - ftestexist = fopen(write_filename, "rb"); - if (ftestexist != NULL) - { - fclose(ftestexist); - do - { - char answer[128]; - int ret; - - // printf("The file %s exists. Overwrite ? [y]es, [n]o, [A]ll: ",write_filename); - ret = scanf("%1s", answer); - if (ret != 1) - { - exit(EXIT_FAILURE); - } - rep = answer[0]; - if ((rep >= 'a') && (rep <= 'z')) rep -= 0x20; - } while ((rep != 'Y') && (rep != 'N') && (rep != 'A')); - } - - if (rep == 'N') skip = 1; - - if (rep == 'A') *popt_overwrite = 1; - } - - if ((skip == 0) && (err == UNZ_OK)) - { - fout = fopen(write_filename, "wb"); - - /* some zipfile don't contain directory alone before file */ - if ((fout == NULL) && ((*popt_extract_without_path) == 0) && (filename_withoutpath - != (char*) filename_inzip)) - { - char c = *(filename_withoutpath - 1); - *(filename_withoutpath - 1) = '\0'; - - // Fix the path, this will fail if the directoryname is the same as the first filename in the zip - char *path = (char *) malloc(strlen(write_filename)); - strcpy(path, write_filename); - char *ptr = strstr(path, filename_withoutpath); - *ptr = '\0'; - makedir(path); - free(path); - - *(filename_withoutpath - 1) = c; - fout = fopen(write_filename, "wb"); - } - - if (fout == NULL) - { - // printf("error opening %s\n",write_filename); - } - } - - if (fout != NULL) - { - // printf(" extracting: %s\n",write_filename); - - do - { - err = unzReadCurrentFile(uf, buf, size_buf); - if (err < 0) - { - // printf("error %d with zipfile in unzReadCurrentFile\n",err); - break; - } - if (err > 0) if (fwrite(buf, err, 1, fout) != 1) - { - // printf("error in writing extracted file\n"); - err = UNZ_ERRNO; - break; - } - } while (err > 0); - if (fout) fclose(fout); - - } - - if (err == UNZ_OK) - { - err = unzCloseCurrentFile(uf); - if (err != UNZ_OK) - { - // printf("error %d with zipfile in unzCloseCurrentFile\n",err); - } - } - else unzCloseCurrentFile(uf); /* don't lose the error */ - } - free(filename_withpath); - free(buf); - return err; -} - -int extractZip(unzFile uf, int opt_extract_without_path, int opt_overwrite, const char* password, const char *basedir) -{ - uLong i; - unz_global_info gi; - int err; - - err = unzGetGlobalInfo(uf, &gi); - if (err != UNZ_OK) - // printf("error %d with zipfile in unzGetGlobalInfo \n",err); - - for (i = 0; i < gi.number_entry; i++) - { - if (do_extract_currentfile(uf, &opt_extract_without_path, &opt_overwrite, password, basedir) != UNZ_OK) break; - - if ((i + 1) < gi.number_entry) - { - err = unzGoToNextFile(uf); - if (err != UNZ_OK) - { - // printf("error %d with zipfile in unzGoToNextFile\n",err); - break; - } - } - } - - return 0; -} - -int extractZipOnefile(unzFile uf, const char* filename, int opt_extract_without_path, int opt_overwrite, - const char* password) -{ - if (unzLocateFile(uf, filename, CASESENSITIVITY) != UNZ_OK) - { - // printf("file %s not found in the zipfile\n",filename); - return 2; - } - - if (do_extract_currentfile(uf, &opt_extract_without_path, &opt_overwrite, password, NULL) == UNZ_OK) - return 0; - else return 1; -} diff --git a/source/utils/minizip/miniunz.h b/source/utils/minizip/miniunz.h deleted file mode 100644 index 216d31bd..00000000 --- a/source/utils/minizip/miniunz.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef _miniunz_H -#define _miniunz_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include - - int extractZip(unzFile uf, int opt_extract_without_path, int opt_overwrite, const char* password, - const char *basedir); - int extractZipOnefile(unzFile uf, const char* filename, int opt_extract_without_path, int opt_overwrite, - const char* password); - int makedir(char *newdir); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/utils/rockout.cpp b/source/utils/rockout.cpp deleted file mode 100644 index 5391cdb9..00000000 --- a/source/utils/rockout.cpp +++ /dev/null @@ -1,40 +0,0 @@ -#include "libwiigui/gui.h" -#include "themes/CTheme.h" -#include "usbloader/GameList.h" -#include "settings/GameTitles.h" -#include "menu/menus.h" - -extern GuiImageData * pointer[4]; - -void rockout(int gameSelected, int f) -{ - static bool rockoutSet = false; - - HaltGui(); - - if (gameSelected >= 0 && gameSelected < gameList.size() && !rockoutSet && (strcasestr(GameTitles.GetTitle(gameList[gameSelected]), "guitar") - || strcasestr(GameTitles.GetTitle(gameList[gameSelected]), "band") || strcasestr(GameTitles.GetTitle(gameList[gameSelected]), - "rock"))) - { - for (int i = 0; i < 4; i++) - delete pointer[i]; - pointer[0] = Resources::GetImageData("rplayer1_point.png"); - pointer[1] = Resources::GetImageData("rplayer2_point.png"); - pointer[2] = Resources::GetImageData("rplayer3_point.png"); - pointer[3] = Resources::GetImageData("rplayer4_point.png"); - - rockoutSet = true; - } - else if(rockoutSet) - { - for (int i = 0; i < 4; i++) - delete pointer[i]; - pointer[0] = Resources::GetImageData("player1_point.png"); - pointer[1] = Resources::GetImageData("player2_point.png"); - pointer[2] = Resources::GetImageData("player3_point.png"); - pointer[3] = Resources::GetImageData("player4_point.png"); - - rockoutSet = false; - } - ResumeGui(); -} diff --git a/source/utils/rockout.h b/source/utils/rockout.h deleted file mode 100644 index 3d4904da..00000000 --- a/source/utils/rockout.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef ROCKOUT_H_ -#define ROCKOUT_H_ - -void rockout(int gameSelected, int f = 0); - -#endif diff --git a/source/utils/timer.c b/source/utils/timer.c deleted file mode 100644 index c8b82021..00000000 --- a/source/utils/timer.c +++ /dev/null @@ -1,119 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#include -#include -#include "timer.h" - -bool TimePassed(int limit) -{ - static time_t starttime = 0; - time_t timer = time(NULL); - - if (starttime == 0) - starttime = timer; - - if(difftime(timer, starttime) >= limit) - { - starttime = 0; - return true; - } - - return false; -} - -#define PERIOD_4 (4 * 365 + 1) -#define PERIOD_100 (PERIOD_4 * 25 - 1) -#define PERIOD_400 (PERIOD_100 * 4 + 1) -void ConvertNTFSDate(u64 ulNTFSDate, TimeStruct * ptm) -{ - unsigned year, mon, day, hour, min, sec; - u64 v64 = ulNTFSDate; - u8 ms[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; - unsigned temp; - u32 v; - v64 /= 10000000; - sec = (unsigned)(v64 % 60); - v64 /= 60; - min = (unsigned)(v64 % 60); - v64 /= 60; - hour = (unsigned)(v64 % 24)+1; - v64 /= 24; - - v = (u32)v64; - - year = (unsigned)(1601 + v / PERIOD_400 * 400); - v %= PERIOD_400; - - temp = (unsigned)(v / PERIOD_100); - if (temp == 4) - temp = 3; - year += temp * 100; - v -= temp * PERIOD_100; - - temp = v / PERIOD_4; - if (temp == 25) - temp = 24; - year += temp * 4; - v -= temp * PERIOD_4; - - temp = v / 365; - if (temp == 4) - temp = 3; - year += temp; - v -= temp * 365; - - if (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)) - ms[1] = 29; - for (mon = 1; mon <= 12; mon++) - { - unsigned s = ms[mon - 1]; - if (v < s) - break; - v -= s; - } - day = (unsigned)v + 1; - - ptm->tm_mday = (u32)day; - ptm->tm_mon = (u32)mon; - ptm->tm_year = (u32)year; - - ptm->tm_hour = (u32)hour; - ptm->tm_min = (u32)min; - ptm->tm_sec = (u32)sec; -} - -void ConvertDosDate(u64 ulDosDate, TimeStruct * ptm) -{ - u32 uDate; - uDate = (u32)(ulDosDate>>16); - ptm->tm_mday = (u32)(uDate&0x1f) ; - ptm->tm_mon = (u32)((((uDate)&0x1E0)/0x20)) ; - ptm->tm_year = (u32)(((uDate&0x0FE00)/0x0200)+1980) ; - - ptm->tm_hour = (u32) ((ulDosDate &0xF800)/0x800); - ptm->tm_min = (u32) ((ulDosDate&0x7E0)/0x20) ; - ptm->tm_sec = (u32) (2*(ulDosDate&0x1f)) ; -} diff --git a/source/utils/timer.h b/source/utils/timer.h deleted file mode 100644 index 9180a331..00000000 --- a/source/utils/timer.h +++ /dev/null @@ -1,68 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#ifndef __TIMER_H -#define __TIMER_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -typedef struct _TimeStruct -{ - u32 tm_sec; /* seconds after the minute - [0,59] */ - u32 tm_min; /* minutes after the hour - [0,59] */ - u32 tm_hour; /* hours since midnight - [0,23] */ - u32 tm_mday; /* day of the month - [1,31] */ - u32 tm_mon; /* months since January - [0,11] */ - u32 tm_year; /* years - [1980..2044] */ -} TimeStruct; - -bool TimePassed(int limit); -void ConvertDosDate(u64 ulDosDate, TimeStruct * ptm); -void ConvertNTFSDate(u64 ulNTFSDate, TimeStruct * ptm); - - -#ifdef __cplusplus -} - -class Timer -{ - public: - Timer() { starttick = gettime(); }; - ~Timer() { }; - float elapsed() { return (float) (gettime()-starttick)/(1000.0f*TB_TIMER_CLOCK); }; - float elapsed_millisecs() { return 1000.0f*elapsed(); }; - void reset() { starttick = gettime(); }; - protected: - u64 starttick; -}; - -#endif //__cplusplus - -#endif //__TIMER_H diff --git a/source/utils/tools.h b/source/utils/tools.h deleted file mode 100644 index ec72dafc..00000000 --- a/source/utils/tools.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef TOOLS_H_ -#define TOOLS_H_ - -#define cut_bounds(x, min, max) ( ((x) < (min)) ? (min) : ((x) > (max)) ? (max) : (x) ) -#define ALIGN(x) (((x) + 3) & ~3) -#define ALIGN32(x) (((x) + 31) & ~31) - -#endif diff --git a/source/utils/uncompress.c b/source/utils/uncompress.c deleted file mode 100644 index 049b0386..00000000 --- a/source/utils/uncompress.c +++ /dev/null @@ -1,185 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#include -#include - -#include "uncompress.h" - -struct _LZ77Info -{ - u16 length : 4; - u16 offset : 12; -} __attribute__((packed)); - -typedef struct _LZ77Info LZ77Info; - -u8 * uncompressLZ77(const u8 *inBuf, u32 inLength, u32 * size) -{ - u8 *buffer = NULL; - if (inLength <= 0x8 || *((const u32 *)inBuf) != 0x4C5A3737 /*"LZ77"*/ || inBuf[4] != 0x10) - return NULL; - - u32 uncSize = le32(((const u32 *)inBuf)[1] << 8); - - const u8 *inBufEnd = inBuf + inLength; - inBuf += 8; - - buffer = (u8 *) malloc(uncSize); - - if (!buffer) - return buffer; - - u8 *bufCur = buffer; - u8 *bufEnd = buffer + uncSize; - - while (bufCur < bufEnd && inBuf < inBufEnd) - { - u8 flags = *inBuf; - ++inBuf; - int i = 0; - for (i = 0; i < 8 && bufCur < bufEnd && inBuf < inBufEnd; ++i) - { - if ((flags & 0x80) != 0) - { - const LZ77Info * info = (const LZ77Info *)inBuf; - inBuf += sizeof (LZ77Info); - int length = info->length + 3; - if (bufCur - info->offset - 1 < buffer || bufCur + length > bufEnd) - return buffer; - memcpy(bufCur, bufCur - info->offset - 1, length); - bufCur += length; - } - else - { - *bufCur = *inBuf; - ++inBuf; - ++bufCur; - } - flags <<= 1; - } - } - - *size = uncSize; - - return buffer; -} - -//Thanks to _demo_ for this function -//src points to the yaz0 source data (to the "real" source data, not at the header!) -//dst points to a buffer uncompressedSize bytes large (you get uncompressedSize from -//the second 4 bytes in the Yaz0 header). -void uncompressYaz0(const u8* srcBuf, u8* dst, int uncompressedSize) -{ - const u8 * src = srcBuf; - - if(memcmp(src, "Yaz0", 4) == 0) - { - src += sizeof(Yaz0_Header); - } - - int srcPlace = 0, dstPlace = 0; //current read/write positions - - u32 validBitCount = 0; //number of valid bits left in "code" byte - u8 currCodeByte = 0; - - while(dstPlace < uncompressedSize) - { - //read new "code" byte if the current one is used up - if(validBitCount == 0) - { - currCodeByte = src[srcPlace]; - ++srcPlace; - validBitCount = 8; - } - - if((currCodeByte & 0x80) != 0) - { - //straight copy - dst[dstPlace] = src[srcPlace]; - dstPlace++; - srcPlace++; - } - else - { - //RLE part - u8 byte1 = src[srcPlace]; - u8 byte2 = src[srcPlace + 1]; - srcPlace += 2; - - u32 dist = ((byte1 & 0xF) << 8) | byte2; - u32 copySource = dstPlace - (dist + 1); - - u32 numBytes = byte1 >> 4; - if(numBytes == 0) - { - numBytes = src[srcPlace] + 0x12; - srcPlace++; - } - else - numBytes += 2; - - //copy run - u32 i = 0; - for(i = 0; i < numBytes; ++i) - { - dst[dstPlace] = dst[copySource]; - copySource++; - dstPlace++; - } - } - - //use next bit from "code" byte - currCodeByte <<= 1; - validBitCount-=1; - } -} - - -u32 CheckIMD5Type(const u8 * buffer, int length) -{ - if(*((u32 *) buffer) != 'IMD5') - { - return *((u32 *) buffer); - } - - const u8 * file = buffer+32; - - if(*((u32 *) file) != 'LZ77') - { - return *((u32 *) file); - } - - u32 uncSize = 0; - u8 * uncompressed_data = uncompressLZ77(file, length-32, &uncSize); - if(!uncompressed_data) - return 0; - - u32 * magic = (u32 *) uncompressed_data; - u32 Type = magic[0]; - free(uncompressed_data); - - return Type; -} diff --git a/source/utils/uncompress.h b/source/utils/uncompress.h deleted file mode 100644 index 9ba58f21..00000000 --- a/source/utils/uncompress.h +++ /dev/null @@ -1,55 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#ifndef __UNCOMPRESS_H -#define __UNCOMPRESS_H - -#include - -#define le16(i) ((((u16) ((i) & 0xFF)) << 8) | ((u16) (((i) & 0xFF00) >> 8))) -#define le32(i) ((((u32)le16((i) & 0xFFFF)) << 16) | ((u32)le16(((i) & 0xFFFF0000) >> 16))) -#define le64(i) ((((u64)le32((i) & 0xFFFFFFFFLL)) << 32) | ((u64)le32(((i) & 0xFFFFFFFF00000000LL) >> 32))) - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct -{ - u32 magic; //Yaz0 - u32 decompressed_size; - u8 zeros[8]; -} Yaz0_Header; - -u8 * uncompressLZ77(const u8 *inBuf, u32 inLength, u32 * uncSize); -void uncompressYaz0(const u8* srcBuf, u8* dst, int uncompressedSize); -u32 CheckIMD5Type(const u8 * buffer, int length); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/utils/wifi_gecko.c b/source/utils/wifi_gecko.c deleted file mode 100644 index ec6e649f..00000000 --- a/source/utils/wifi_gecko.c +++ /dev/null @@ -1,113 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#include -#include -#include -#include -#include -#include - -#define DESTINATION_IP "192.168.178.3" -#define DESTINATION_PORT 4405 - -static int connection = -1; - -void WifiGecko_Close() -{ - if(connection >= 0) - net_close(connection); - - connection = -1; -} - -int WifiGecko_Connect() -{ - if(!(connection < 0)) - return connection; - - connection = net_socket(AF_INET, SOCK_STREAM, IPPROTO_IP); - if (connection < 0) - return connection; - - struct sockaddr_in connect_addr; - memset(&connect_addr, 0, sizeof(connect_addr)); - connect_addr.sin_family = AF_INET; - connect_addr.sin_port = htons(DESTINATION_PORT); - inet_aton(DESTINATION_IP, &connect_addr.sin_addr); - - if(net_connect(connection, (struct sockaddr*)&connect_addr, sizeof(connect_addr)) < 0) - { - WifiGecko_Close(); - return -1; - } - - return connection; -} - -int WifiGecko_Send(const char * data, int datasize) -{ - if(WifiGecko_Connect() < 0) - return connection; - - int ret = 0, done = 0, blocksize = 1024; - - while (done < datasize) - { - if(blocksize > datasize-done) - blocksize = datasize-done; - - ret = net_send(connection, data+done, blocksize, 0); - if (ret < 0) - { - WifiGecko_Close(); - return ret; - } - else if(ret == 0) - { - break; - } - - done += ret; - usleep (1000); - } - - return ret; -} - -void wifi_printf(const char * format, ...) -{ - char * tmp = NULL; - va_list va; - va_start(va, format); - if((vasprintf(&tmp, format, va) >= 0) && tmp) - { - WifiGecko_Send(tmp, strlen(tmp)); - } - va_end(va); - - if(tmp) - free(tmp); -} diff --git a/source/utils/wifi_gecko.h b/source/utils/wifi_gecko.h deleted file mode 100644 index ef97e470..00000000 --- a/source/utils/wifi_gecko.h +++ /dev/null @@ -1,42 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - * for WiiXplorer 2010 - ***************************************************************************/ -#ifndef WIFI_GECKO_H_ -#define WIFI_GECKO_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -int WifiGecko_Connect(); -void WifiGecko_Close(); -int WifiGecko_Send(const char * data, int datasize); -void wifi_printf(const char * format, ...); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/video.cpp b/source/video.cpp deleted file mode 100644 index 3f5a4e4a..00000000 --- a/source/video.cpp +++ /dev/null @@ -1,467 +0,0 @@ -/**************************************************************************** - * libwiigui Template - * Tantric 2009 - * - * video.cpp - * Video routines - ***************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "input.h" -#include "gecko.h" -#include "libwiigui/gui.h" - -#define DEFAULT_FIFO_SIZE 256 * 1024 -static unsigned int *xfb[2] = { NULL, NULL }; // Double buffered -static int whichfb = 0; // Switch -static GXRModeObj *vmode; // Menu video mode -static unsigned char gp_fifo[DEFAULT_FIFO_SIZE] ATTRIBUTE_ALIGN ( 32 ); -static Mtx GXmodelView2D; -static Mtx44 projection; -int screenheight; -int screenwidth; -u32 frameCount = 0; - -u8 * gameScreenTex = NULL; // a GX texture screen capture of the game -u8 * gameScreenTex2 = NULL; // a GX texture screen capture of the game (copy) - -/**************************************************************************** - * ResetVideo_Menu - * - * Reset the video/rendering mode for the menu - ****************************************************************************/ -void ResetVideo_Menu() -{ - f32 yscale; - u32 xfbHeight; - - VIDEO_Configure(vmode); - VIDEO_Flush(); - VIDEO_WaitVSync(); - if (vmode->viTVMode & VI_NON_INTERLACE) - VIDEO_WaitVSync(); - else while (VIDEO_GetNextField()) - VIDEO_WaitVSync(); - - // clears the bg to color and clears the z buffer - GXColor background = { 0, 0, 0, 255 }; - GX_SetCopyClear(background, 0x00ffffff); - - yscale = GX_GetYScaleFactor(vmode->efbHeight, vmode->xfbHeight); - xfbHeight = GX_SetDispCopyYScale(yscale); - GX_SetScissor(0, 0, vmode->fbWidth, vmode->efbHeight); - GX_SetDispCopySrc(0, 0, vmode->fbWidth, vmode->efbHeight); - GX_SetDispCopyDst(vmode->fbWidth, xfbHeight); - GX_SetCopyFilter(vmode->aa, vmode->sample_pattern, GX_TRUE, vmode->vfilter); - GX_SetFieldMode(vmode->field_rendering, ((vmode->viHeight == 2 * vmode->xfbHeight) ? GX_ENABLE : GX_DISABLE)); - - if (vmode->aa) - GX_SetPixelFmt(GX_PF_RGB565_Z16, GX_ZC_LINEAR); - else - GX_SetPixelFmt(GX_PF_RGB8_Z24, GX_ZC_LINEAR); - - // setup the vertex descriptor - // tells the flipper to expect direct data - GX_ClearVtxDesc(); - GX_InvVtxCache(); - GX_InvalidateTexAll(); - - GX_SetVtxDesc(GX_VA_TEX0, GX_NONE); - GX_SetVtxDesc(GX_VA_POS, GX_DIRECT); - GX_SetVtxDesc(GX_VA_CLR0, GX_DIRECT); - - GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0); - GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGBA, GX_RGBA8, 0); - GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0); - GX_SetZMode(GX_FALSE, GX_LEQUAL, GX_TRUE); - - GX_SetNumChans(1); - GX_SetNumTexGens(1); - GX_SetTevOp(GX_TEVSTAGE0, GX_PASSCLR); - GX_SetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR0A0); - GX_SetTexCoordGen(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, GX_IDENTITY); - - guMtxIdentity(GXmodelView2D); - guMtxTransApply(GXmodelView2D, GXmodelView2D, 0.0F, 0.0F, -200.0F); - GX_LoadPosMtxImm(GXmodelView2D, GX_PNMTX0); - - guOrtho(projection, 0, 479, 0, 639, 0, 300); - GX_LoadProjectionMtx(projection, GX_ORTHOGRAPHIC); - - GX_SetViewport(0.0f, 0.0f, vmode->fbWidth, vmode->efbHeight, 0.0f, 1.0f); - GX_SetBlendMode(GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_CLEAR); - GX_SetAlphaUpdate(GX_TRUE); -} - -/**************************************************************************** - * InitVideo - * - * This function MUST be called at startup. - * - also sets up menu video mode - ***************************************************************************/ - -void InitVideo() -{ - VIDEO_Init(); - vmode = VIDEO_GetPreferredMode(NULL); // get default video mode - - if (CONF_GetAspectRatio() == CONF_ASPECT_16_9) - { - // widescreen fix - vmode->viWidth = VI_MAX_WIDTH_PAL - 12; - vmode->viXOrigin = ((VI_MAX_WIDTH_PAL - vmode->viWidth) / 2) + 2; - } - - VIDEO_Configure(vmode); - - screenheight = 480; - screenwidth = vmode->fbWidth; - - // Allocate the video buffers - xfb[0] = (u32 *) MEM_K0_TO_K1 ( SYS_AllocateFramebuffer ( vmode ) ); - xfb[1] = (u32 *) MEM_K0_TO_K1 ( SYS_AllocateFramebuffer ( vmode ) ); - - // Clear framebuffers etc. - VIDEO_ClearFrameBuffer(vmode, xfb[0], COLOR_BLACK); - VIDEO_ClearFrameBuffer(vmode, xfb[1], COLOR_BLACK); - VIDEO_SetNextFramebuffer(xfb[0]); - - VIDEO_Flush(); - VIDEO_WaitVSync(); - if (vmode->viTVMode & VI_NON_INTERLACE) VIDEO_WaitVSync(); - - // Initialize GX - GXColor background = { 0, 0, 0, 0xff }; - memset (&gp_fifo, 0, DEFAULT_FIFO_SIZE); - GX_Init (&gp_fifo, DEFAULT_FIFO_SIZE); - GX_SetCopyClear (background, 0x00ffffff); - GX_SetDispCopyGamma (GX_GM_1_0); - GX_SetCullMode (GX_CULL_NONE); - - ResetVideo_Menu(); - - VIDEO_SetBlack(FALSE); - // Finally, the video is up and ready for use :) - - // A console is always useful while debugging - //console_init(xfb[0], 80, 100, 500, 350, vmode->fbWidth * 2); -} - -void VIDEO_SetWidescreen(bool widescreen) -{ - if (widescreen) - { - // widescreen fix - vmode->viWidth = VI_MAX_WIDTH_PAL - 12; - vmode->viXOrigin = ((VI_MAX_WIDTH_PAL - vmode->viWidth) / 2) + 2; - } - else - { - VIDEO_GetPreferredMode(NULL); - } - - VIDEO_Configure(vmode); -} -/**************************************************************************** - * StopGX - * - * Stops GX (when exiting) - ***************************************************************************/ -void StopGX() -{ - GX_AbortFrame(); - GX_Flush(); - - VIDEO_SetBlack(TRUE); - VIDEO_Flush(); -} - -/**************************************************************************** - * Menu_Render - * - * Renders everything current sent to GX, and flushes video - ***************************************************************************/ -void Menu_Render() -{ - whichfb ^= 1; // flip framebuffer - GX_SetZMode(GX_TRUE, GX_LEQUAL, GX_TRUE); - GX_SetColorUpdate(GX_TRUE); - GX_CopyDisp(xfb[whichfb], GX_TRUE); - GX_DrawDone(); - VIDEO_SetNextFramebuffer(xfb[whichfb]); - VIDEO_Flush(); - VIDEO_WaitVSync(); - frameCount++; -} - -/**************************************************************************** - * Menu_DrawImg - * - * Draws the specified image on screen using GX - ***************************************************************************/ -void Menu_DrawImg(f32 xpos, f32 ypos, f32 zpos, f32 width, f32 height, u8 data[], f32 degrees, f32 scaleX, f32 scaleY, - u8 alpha, int XX1, int YY1, int XX2, int YY2, int XX3, int YY3, int XX4, int YY4) -{ - if (data == NULL) return; - - GX_LoadProjectionMtx(projection, GX_ORTHOGRAPHIC); - - GXTexObj texObj; - - GX_InitTexObj(&texObj, data, width, height, GX_TF_RGBA8, GX_CLAMP, GX_CLAMP, GX_FALSE); - GX_LoadTexObj(&texObj, GX_TEXMAP0); - GX_InvalidateTexAll(); - - GX_SetTevOp(GX_TEVSTAGE0, GX_MODULATE); - GX_SetVtxDesc(GX_VA_TEX0, GX_DIRECT); - - Mtx m, m1, m2, mv; - width *= 0.5f; - height *= 0.5f; - guMtxIdentity(m1); - guMtxScaleApply(m1, m1, scaleX, scaleY, 1.0f); - guVector axis = ( guVector ) - { - 0 , 0, 1 - }; - guMtxRotAxisDeg ( m2, &axis, degrees ); - // guMtxConcat(m2,m1,m); - guMtxConcat(m1, m2, m); - - guMtxTransApply(m, m, xpos + width + 0.5f, ypos + height + 0.5f, zpos); - guMtxConcat(GXmodelView2D, m, mv); - GX_LoadPosMtxImm(mv, GX_PNMTX0); - // - - GX_Begin(GX_QUADS, GX_VTXFMT0, 4); - GX_Position3f32(-width + XX1, -height + YY1, 0); - GX_Color4u8(0xFF, 0xFF, 0xFF, alpha); - GX_TexCoord2f32(0, 0); - - GX_Position3f32(width + XX2, -height + YY2, 0); - GX_Color4u8(0xFF, 0xFF, 0xFF, alpha); - GX_TexCoord2f32(1, 0); - - GX_Position3f32(width + XX3, height + YY3, 0); - GX_Color4u8(0xFF, 0xFF, 0xFF, alpha); - GX_TexCoord2f32(1, 1); - - GX_Position3f32(-width + XX4, height + YY4, 0); - GX_Color4u8(0xFF, 0xFF, 0xFF, alpha); - GX_TexCoord2f32(0, 1); - - // - - GX_End(); - GX_LoadPosMtxImm(GXmodelView2D, GX_PNMTX0); - - GX_SetTevOp(GX_TEVSTAGE0, GX_PASSCLR); - GX_SetVtxDesc(GX_VA_TEX0, GX_NONE); -} - -/**************************************************************************** - * Menu_DrawRectangle - * - * Draws a rectangle at the specified coordinates using GX - ***************************************************************************/ -void Menu_DrawRectangle(f32 x, f32 y, f32 width, f32 height, GXColor color, u8 filled) -{ - GX_LoadProjectionMtx(projection, GX_ORTHOGRAPHIC); - - u8 fmt; - long n; - int i; - f32 x2 = x + width; - f32 y2 = y + height; - guVector v[] = { { x, y, 0.0f }, { x2, y, 0.0f }, { x2, y2, 0.0f }, { x, y2, 0.0f }, { x, y, 0.0f } }; - - if (!filled) - { - fmt = GX_LINESTRIP; - n = 5; - } - else - { - fmt = GX_TRIANGLEFAN; - n = 4; - } - - GX_Begin(fmt, GX_VTXFMT0, n); - for (i = 0; i < n; i++) - { - GX_Position3f32(v[i].x, v[i].y, v[i].z); - GX_Color4u8(color.r, color.g, color.b, color.a); - } - GX_End(); -} - -void Menu_DrawDiskCover(f32 xpos, f32 ypos, f32 zpos, u16 width, u16 height, u16 distance, u8 data[], f32 deg_alpha, - f32 deg_beta, f32 scaleX, f32 scaleY, u8 alpha, bool shadow) -{ - if (data == NULL) return; - - GX_LoadProjectionMtx(projection, GX_ORTHOGRAPHIC); - - GXTexObj texObj; - - GX_InitTexObj(&texObj, data, width, height, GX_TF_RGBA8, GX_CLAMP, GX_CLAMP, GX_FALSE); - GX_LoadTexObj(&texObj, GX_TEXMAP0); - GX_InvalidateTexAll(); - - GX_SetTevOp(GX_TEVSTAGE0, GX_MODULATE); - GX_SetVtxDesc(GX_VA_TEX0, GX_DIRECT); - - f32 cos_beta = cos(DegToRad( deg_beta )); - f32 s_offset_y = (zpos + (cos_beta * distance)) * tan(DegToRad( 5 )); - f32 s_offset_x = (cos_beta < 0 ? -cos_beta : cos_beta) * s_offset_y; - f32 s_offset_z = (s_offset_y < 0 ? 0 : s_offset_y) * 2; - - Mtx m, m1, m2, m3, m4, mv; - width *= .5; - height *= .5; - guMtxIdentity(m4); - guMtxTransApply(m4, m4, 0, 0, distance); - - guMtxIdentity(m1); - guMtxScaleApply(m1, m1, scaleX, scaleY, 1.0); - guVector axis2 = ( guVector ) - { - 0 , 1, 0 - }; - guMtxRotAxisDeg ( m2, &axis2, deg_beta ); - guVector axis = ( guVector ) - { - 0 , 0, 1 - }; - guMtxRotAxisDeg ( m3, &axis, deg_alpha ); - // guMtxConcat(m2,m1,m); - guMtxConcat(m3, m4, m3); // move distance then rotate z-axis - guMtxConcat(m2, m3, m2); // rotate y-axis - guMtxConcat(m1, m2, m); // scale - - if (shadow) - guMtxTransApply(m, m, xpos + width + 0.5 + s_offset_x, ypos + height + 0.5 + s_offset_y, zpos - s_offset_z); - else - guMtxTransApply(m, m, xpos + width + 0.5, ypos + height + 0.5, zpos); - - guMtxConcat(GXmodelView2D, m, mv); - GX_LoadPosMtxImm(mv, GX_PNMTX0); - - if (shadow) - { - GX_Begin(GX_QUADS, GX_VTXFMT0, 4); - GX_Position3f32(-width, -height, 0); - GX_Color4u8(0, 0, 0, alpha); - GX_TexCoord2f32(0, 0); - - GX_Position3f32(width, -height, 0); - GX_Color4u8(0, 0, 0, alpha); - GX_TexCoord2f32(1, 0); - - GX_Position3f32(width, height, 0); - GX_Color4u8(0, 0, 0, alpha); - GX_TexCoord2f32(1, 1); - - GX_Position3f32(-width, height, 0); - GX_Color4u8(0, 0, 0, alpha); - GX_TexCoord2f32(0, 1); - } - else - { - GX_Begin(GX_QUADS, GX_VTXFMT0, 4); - GX_Position3f32(-width, -height, 0); - GX_Color4u8(0xFF, 0xFF, 0xFF, alpha); - GX_TexCoord2f32(0, 0); - - GX_Position3f32(width, -height, 0); - GX_Color4u8(0xFF, 0xFF, 0xFF, alpha); - GX_TexCoord2f32(1, 0); - - GX_Position3f32(width, height, 0); - GX_Color4u8(0xFF, 0xFF, 0xFF, alpha); - GX_TexCoord2f32(1, 1); - - GX_Position3f32(-width, height, 0); - GX_Color4u8(0xFF, 0xFF, 0xFF, alpha); - GX_TexCoord2f32(0, 1); - } - - GX_End(); - GX_LoadPosMtxImm(GXmodelView2D, GX_PNMTX0); - - GX_SetTevOp(GX_TEVSTAGE0, GX_PASSCLR); - GX_SetVtxDesc(GX_VA_TEX0, GX_NONE); -} - -void Menu_DrawTPLImg(f32 xpos, f32 ypos, f32 zpos, f32 width, f32 height, GXTexObj *texObj, f32 degrees, f32 scaleX, - f32 scaleY, u8 alpha, int XX1, int YY1, int XX2, int YY2, int XX3, int YY3, int XX4, int YY4) -{ - GX_LoadProjectionMtx(projection, GX_ORTHOGRAPHIC); - - GX_LoadTexObj(texObj, GX_TEXMAP0); - GX_InvalidateTexAll(); - - GX_SetTevOp(GX_TEVSTAGE0, GX_REPLACE); - GX_SetVtxDesc(GX_VA_TEX0, GX_DIRECT); - - Mtx m, m1, m2, mv; - width *= .5; - height *= .5; - guMtxIdentity(m1); - guMtxScaleApply(m1, m1, scaleX, scaleY, 1.0); - guVector axis = ( guVector ) - { - 0 , 0, 1 - }; - guMtxRotAxisDeg ( m2, &axis, degrees ); - guMtxConcat(m1, m2, m); - - guMtxTransApply(m, m, xpos + width + 0.5, ypos + height + 0.5, zpos); - guMtxConcat(GXmodelView2D, m, mv); - GX_LoadPosMtxImm(mv, GX_PNMTX0); - - GX_Begin(GX_QUADS, GX_VTXFMT0, 4); - GX_Position3f32(-width + XX1, -height + YY1, 0); - GX_Color4u8(0xFF, 0xFF, 0xFF, alpha); - GX_TexCoord2f32(0, 0); - - GX_Position3f32(width + XX2, -height + YY2, 0); - GX_Color4u8(0xFF, 0xFF, 0xFF, alpha); - GX_TexCoord2f32(1, 0); - - GX_Position3f32(width + XX3, height + YY3, 0); - GX_Color4u8(0xFF, 0xFF, 0xFF, alpha); - GX_TexCoord2f32(1, 1); - - GX_Position3f32(-width + XX4, height + YY4, 0); - GX_Color4u8(0xFF, 0xFF, 0xFF, alpha); - GX_TexCoord2f32(0, 1); - - GX_End(); - GX_LoadPosMtxImm(GXmodelView2D, GX_PNMTX0); - - GX_SetTevOp(GX_TEVSTAGE0, GX_PASSCLR); - GX_SetVtxDesc(GX_VA_TEX0, GX_NONE); -} -/**************************************************************************** - * TakeScreenshot - * - * Copies the current screen into a file "path" - ***************************************************************************/ -s32 TakeScreenshot(const char *path) -{ - gprintf("\nTakeScreenshot(%s)", path); - IMGCTX ctx = PNGU_SelectImageFromDevice(path); - s32 ret = PNGU_EncodeFromYCbYCr(ctx, vmode->fbWidth, vmode->efbHeight, xfb[whichfb], 0); - PNGU_ReleaseImageContext(ctx); - gprintf(":%d", ret); - return 1; -} diff --git a/source/video.h b/source/video.h deleted file mode 100644 index 902dd4fc..00000000 --- a/source/video.h +++ /dev/null @@ -1,31 +0,0 @@ -/**************************************************************************** - * libwiigui Template - * Tantric 2009 - * - * video.h - * Video routines - ***************************************************************************/ - -#ifndef _VIDEO_H_ -#define _VIDEO_H_ - -#include - -void InitVideo(); -void InitVideodebug(); -void StopGX(); -void ResetVideo_Menu(); -void Menu_Render(); -void Menu_DrawImg(f32 xpos, f32 ypos, f32 zpos, f32 width, f32 height, u8 data[], f32 degrees, f32 scaleX, f32 scaleY, - u8 alphaF, int XX1, int YY1, int XX2, int YY2, int XX3, int YY3, int XX4, int YY4); -void Menu_DrawTPLImg(f32 xpos, f32 ypos, f32 zpos, f32 width, f32 height, GXTexObj *texObj, f32 degrees, f32 scaleX, - f32 scaleY, u8 alpha, int XX1, int YY1, int XX2, int YY2, int XX3, int YY3, int XX4, int YY4); -void Menu_DrawRectangle(f32 x, f32 y, f32 width, f32 height, GXColor color, u8 filled); -s32 TakeScreenshot(const char *path); -void VIDEO_SetWidescreen(bool widescreen); - -extern int screenheight; -extern int screenwidth; -extern u32 frameCount; - -#endif diff --git a/source/wad/nandtitle.cpp b/source/wad/nandtitle.cpp deleted file mode 100644 index 7cfe0f4c..00000000 --- a/source/wad/nandtitle.cpp +++ /dev/null @@ -1,435 +0,0 @@ -#include "nandtitle.h" -#include "usbloader/playlog.h" -#include "gecko.h" - -NandTitle NandTitles; - -static u8 tmd_buf[MAX_SIGNED_TMD_SIZE] ATTRIBUTE_ALIGN( 32 ); - -//based on one from comex's nand formatter -static u64 atoi_hex(const char *s) -{ - u64 ret = 0; - u32 n = strlen(s); - - for (u32 i = 0; i < n; i++) - { - if (s[i] > 0x39) - { - ret += (s[i] & ~0x20) - 0x37; - } - else - { - ret += (s[i] - 0x30); - } - if (i != (n - 1)) ret *= 16; - } - - return ret; -} - -NandTitle::NandTitle() -{ - currentIndex = 0; - currentType = 0; -} - -NandTitle::~NandTitle() -{ - titleIds.clear(); - NameList.clear(); -} - -s32 NandTitle::Get() -{ - s32 ret; - u64 *list = NULL; - u32 numTitles = 0; - - titleIds.clear(); - NameList.clear(); - - ret = ES_GetNumTitles(&numTitles); - if (ret < 0) return WII_EINTERNAL; - - list = (u64*) memalign(32, numTitles * sizeof(u64)); - if (!list) - { - return -1; - } - - ret = ES_GetTitles(list, numTitles); - if (ret < 0) - { - free(list); - return WII_EINTERNAL; - } - - for (u32 i = 0; i < numTitles; i++) - { - titleIds.push_back(list[i]); - } - - free(list); - - int language = CONF_GetLanguage(); - ISFS_Initialize(); - - wchar_t name[IMET_MAX_NAME_LEN]; - - for (u32 i = 0; i < titleIds.size(); i++) - { - bool r = GetName(titleIds.at(i), language, name); - if (r) - { - wString wsname(name); - NameList[titleIds.at(i)] = wsname.toUTF8(); - } - } - - ISFS_Deinitialize(); - //If not started from SystemMenu, create playlog while we got nand access. - Playlog_Create(); - return 1; -} - -tmd* NandTitle::GetTMD(u64 tid) -{ - //gprintf("GetTMD( %016llx ): ", tid ); - signed_blob *s_tmd = (signed_blob *) tmd_buf; - u32 tmd_size; - - if (ES_GetStoredTMDSize(tid, &tmd_size) < 0) - { - //gprintf("!size\n"); - return NULL; - } - - s32 ret = ES_GetStoredTMD(tid, s_tmd, tmd_size); - if (ret < 0) - { - //gprintf("!tmd - %04x\n", ret ); - return NULL; - } - - tmd *t = (tmd*) SIGNATURE_PAYLOAD(s_tmd); - //gprintf("ok\n"); - - return t; -} - -bool NandTitle::GetName(u64 tid, int language, wchar_t* name) -{ - if (TITLE_UPPER( tid ) != 0x10001 && TITLE_UPPER( tid ) != 0x10002 && TITLE_UPPER( tid ) != 0x10004) return false; - //gprintf("GetName( %016llx ): ", tid ); - char app[ISFS_MAXPATH] ATTRIBUTE_ALIGN(32); - IMET *imet = (IMET*) memalign(32, sizeof(IMET)); - - tmd* titleTmd = GetTMD(tid); - if (!titleTmd) - { - //gprintf("no TMD\n"); - free(imet); - return false; - } - - u16 i; - bool ok = false; - for (i = 0; i < titleTmd->num_contents; i++) - { - if (!titleTmd->contents[i].index) - { - ok = true; - break; - } - } - if (!ok) - { - free(imet); - return false; - } - - snprintf(app, sizeof(app), "/title/%08x/%08x/content/%08x.app", TITLE_UPPER( tid ), TITLE_LOWER( tid ), - titleTmd->contents[i].cid); - //gprintf("%s\n", app ); - - if (language > CONF_LANG_KOREAN) language = CONF_LANG_ENGLISH; - - s32 fd = ISFS_Open(app, ISFS_OPEN_READ); - if (fd < 0) - { - //gprintf("fd: %d\n", fd ); - free(imet); - return false; - } - - if (ISFS_Seek(fd, IMET_OFFSET, SEEK_SET) != IMET_OFFSET) - { - ISFS_Close(fd); - free(imet); - return false; - } - - if (ISFS_Read(fd, imet, sizeof(IMET)) != sizeof(IMET)) - { - ISFS_Close(fd); - free(imet); - return false; - } - - ISFS_Close(fd); - - if (imet->sig != IMET_SIGNATURE) - { - free(imet); - return false; - } - - if (imet->name_japanese[language * IMET_MAX_NAME_LEN] == 0) - { - // channel name is not available in system language - if (imet->name_english[0] != 0) - { - language = CONF_LANG_ENGLISH; - } - else - { - // channel name is also not available on english, get ascii name - for (int i = 0; i < 4; i++) - { - name[i] = (TITLE_LOWER( tid ) >> (24 - i * 8)) & 0xFF; - } - name[4] = 0; - free(imet); - return true; - } - } - - // retrieve channel name in system language or on english - for (int i = 0; i < IMET_MAX_NAME_LEN; i++) - { - name[i] = imet->name_japanese[i + (language * IMET_MAX_NAME_LEN)]; - } - - free(imet); - - return true; -} - -bool NandTitle::Exists(u64 tid) -{ - char app[ISFS_MAXPATH] ATTRIBUTE_ALIGN(32); - tmd* titleTmd = GetTMD(tid); - if (!titleTmd) return false; - - u16 i; - bool ok = false; - for (i = 0; i < titleTmd->num_contents; i++) - { - if (!titleTmd->contents[i].index) - { - ok = true; - break; - } - } - if (!ok) return false; - - snprintf(app, sizeof(app), "/title/%08x/%08x/content/%08x.app", TITLE_UPPER( tid ), TITLE_LOWER( tid ), - titleTmd->contents[i].cid); - s32 fd = ISFS_Open(app, ISFS_OPEN_READ); - if (fd >= 0) ISFS_Close(fd); - - //gprintf(" fd: %d\n", fd ); - return fd >= 0 || fd == -102; //102 means it exists, but we dont have permission to open it - -} - -bool NandTitle::ExistsFromIndex(u32 i) -{ - if (i > titleIds.size()) return false; - - return Exists(titleIds.at(i)); -} - -u64 NandTitle::At(u32 i) -{ - if (i > titleIds.size()) return 0; - - return titleIds.at(i); -} - -int NandTitle::IndexOf(u64 tid) -{ - for (u32 i = 0; i < titleIds.size(); i++) - { - if (titleIds.at(i) == tid) return i; - } - - return WII_EINSTALL; -} - -const char* NandTitle::NameOf(u64 tid) -{ - map::iterator itr = NameList.find(tid); - if (itr != NameList.end()) return itr->second.c_str(); - - return NULL; -} - -const char* NandTitle::NameFromIndex(u32 i) -{ - if (i > titleIds.size()) return NULL; - - map::iterator itr = NameList.find(titleIds.at(i)); - if (itr != NameList.end()) return itr->second.c_str(); - - return NULL; -} - -u16 NandTitle::VersionOf(u64 tid) -{ - for (u32 i = 0; i < titleIds.size(); i++) - { - if (titleIds.at(i) == tid) - { - tmd* Tmd = GetTMD(tid); - if (!Tmd) break; - - return Tmd->title_version; - } - } - return 0; - -} - -u16 NandTitle::VersionFromIndex(u32 i) -{ - if (i > titleIds.size()) return 0; - - tmd* Tmd = GetTMD(titleIds.at(i)); - if (!Tmd) return 0; - - return Tmd->title_version; -} - -u32 NandTitle::CountType(u32 type) -{ - u32 ret = 0; - for (u32 i = 0; i < titleIds.size(); i++) - { - if (TITLE_UPPER( titleIds.at( i ) ) == type) - { - ret++; - } - } - return ret; -} - -u32 NandTitle::SetType(u32 upper) -{ - currentType = upper; - currentIndex = 0; - - return CountType(upper); -} - -u64 NandTitle::Next() -{ - u64 ret = 0; - //gprintf("Next( %08x, %u )\n", currentType, currentIndex ); - u32 i; - for (i = currentIndex; i < titleIds.size(); i++) - { - if (currentType) - { - if (currentType == TITLE_UPPER( titleIds.at( i ) )) - { - ret = titleIds.at(i); - break; - } - } - else - { - ret = titleIds.at(i); - break; - } - } - currentIndex = i + 1; - - return ret; -} - -void NandTitle::ResetCounter() -{ - currentIndex = 0; -} - -void NandTitle::AsciiTID(u64 tid, char* out) -{ - //gprintf("AsciiTID( %016llx ): "); - out[0] = ascii(TITLE_3( tid )); - out[1] = ascii(TITLE_2( tid )); - out[2] = ascii(TITLE_1( tid )); - out[3] = ascii((u8) (tid)); - out[4] = 0; - //gprintf("%s\n", out ); -} - -void NandTitle::AsciiFromIndex(u32 i, char* out) -{ - if (i > titleIds.size()) - { - out[0] = 0; - return; - } - - AsciiTID(titleIds.at(i), out); -} - -s32 NandTitle::GetTicketViews(u64 tid, tikview **outbuf, u32 *outlen) -{ - tikview *views = NULL; - - u32 nb_views; - s32 ret; - - /* Get number of ticket views */ - ret = ES_GetNumTicketViews(tid, &nb_views); - if (ret < 0) return ret; - - /* Allocate memory */ - views = (tikview *) memalign(32, sizeof(tikview) * nb_views); - if (!views) return -1; - - /* Get ticket views */ - ret = ES_GetTicketViews(tid, views, nb_views); - if (ret < 0) goto err; - - /* Set values */ - *outbuf = views; - *outlen = nb_views; - - return 0; - - err: - /* Free memory */ - if (views) free(views); - - return ret; -} - -int NandTitle::FindU64(const char *s) -{ - u64 tid = atoi_hex(s); - return IndexOf(tid); -} - -int NandTitle::FindU32(const char *s) -{ - u64 tid = atoi_hex(s); - for (u32 i = 0; i < titleIds.size(); i++) - { - if (TITLE_LOWER( titleIds.at( i ) ) == TITLE_LOWER( tid )) return i; - } - return WII_EINSTALL; -} diff --git a/source/wad/nandtitle.h b/source/wad/nandtitle.h deleted file mode 100644 index 27584314..00000000 --- a/source/wad/nandtitle.h +++ /dev/null @@ -1,113 +0,0 @@ -#ifndef NANDTITLE_H -#define NANDTITLE_H - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "wstring.hpp" -using namespace std; - -#define TITLE_ID(x,y) (((u64)(x) << 32) | (y)) -#define TITLE_UPPER(x) ((u32)((x) >> 32)) -#define TITLE_LOWER(x) ((u32)(x)) - -#define TITLE_1(x) ((u8)((x) >> 8)) -#define TITLE_2(x) ((u8)((x) >> 16)) -#define TITLE_3(x) ((u8)((x) >> 24)) -#define TITLE_4(x) ((u8)((x) >> 32)) -#define TITLE_5(x) ((u8)((x) >> 40)) -#define TITLE_6(x) ((u8)((x) >> 48)) -#define TITLE_7(x) ((u8)((x) >> 56)) - -#define IMET_MAX_NAME_LEN 0x2a - -#define IMET_OFFSET 0x40 -#define IMET_SIGNATURE 0x494d4554 -#define DOWNLOADED_CHANNELS 0x00010001 -#define SYSTEM_CHANNELS 0x00010002 -#define RF_NEWS_CHANNEL 0x48414741 -#define RF_FORECAST_CHANNEL 0x48414641 - -typedef struct -{ - u8 zeroes1[0x40]; - u32 sig; // "IMET" - u32 unk1; - u32 unk2; - u32 filesizes[3]; - u32 unk3; - u16 name_japanese[IMET_MAX_NAME_LEN]; - u16 name_english[IMET_MAX_NAME_LEN]; - u16 name_german[IMET_MAX_NAME_LEN]; - u16 name_french[IMET_MAX_NAME_LEN]; - u16 name_spanish[IMET_MAX_NAME_LEN]; - u16 name_italian[IMET_MAX_NAME_LEN]; - u16 name_dutch[IMET_MAX_NAME_LEN]; - u16 name_simp_chinese[IMET_MAX_NAME_LEN]; - u16 name_trad_chinese[IMET_MAX_NAME_LEN]; - u16 name_korean[IMET_MAX_NAME_LEN]; - u8 zeroes2[0x24c]; - u8 md5[0x10]; -} IMET; - -class NandTitle -{ - public: - NandTitle(); - ~NandTitle(); - - s32 Get(); - u64 At(u32 i); - int IndexOf(u64 tid); - u32 Count() - { - return titleIds.size(); - } - - const char* NameOf(u64 tid); - const char* NameFromIndex(u32 i); - - u16 VersionOf(u64 tid); - u16 VersionFromIndex(u32 i); - - u32 CountType(u32 type); - - u32 SetType(u32 upper); - u64 Next(); - void ResetCounter(); - - void AsciiTID(u64 tid, char* out); - void AsciiFromIndex(u32 i, char* out); - - bool Exists(u64 tid); - bool ExistsFromIndex(u32 i); - - int FindU64(const char *s); - int FindU32(const char *s); - - s32 GetTicketViews(u64 tid, tikview **outbuf, u32 *outlen); - - u64 operator[](u32 i) - { - return At(i); - } - - private: - std::vector titleIds; - std::map NameList; - bool GetName(u64 tid, int language, wchar_t* name); - tmd* GetTMD(u64 tid); - - u32 currentIndex; - u32 currentType; -}; - -extern NandTitle NandTitles; - -#endif // NANDTITLE_H diff --git a/source/wad/utils.h b/source/wad/utils.h deleted file mode 100644 index 29584b23..00000000 --- a/source/wad/utils.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef _UTILS_H_ -#define _UTILS_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - /* Constants */ -#define KB_SIZE 1024.0 -#define MB_SIZE 1048576.0 -#define GB_SIZE 1073741824.0 - - /* Macros */ -#define round_up(x,n) (-(-(x) & -(n))) - - /* Prototypes */ - u32 swap32(u32); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/wad/wad.cpp b/source/wad/wad.cpp deleted file mode 100644 index 831c1d13..00000000 --- a/source/wad/wad.cpp +++ /dev/null @@ -1,623 +0,0 @@ -#include -#include -#include -#include -#include - -#include "utils.h" -#include "video.h" -#include "wad.h" - -#include "nandtitle.h" - -#include "prompts/PromptWindows.h" -#include "libwiigui/gui.h" -#include "language/gettext.h" -#include "menu.h" -#include "themes/CTheme.h" - -/* 'WAD Header' structure */ -typedef struct -{ - /* Header length */ - u32 header_len; - - /* WAD type */ - u16 type; - - u16 padding; - - /* Data length */ - u32 certs_len; - u32 crl_len; - u32 tik_len; - u32 tmd_len; - u32 data_len; - u32 footer_len; -}ATTRIBUTE_PACKED wadHeader; - -/* Variables */ -static u8 wadBuffer[BLOCK_SIZE] ATTRIBUTE_ALIGN( 32 ); - -s32 __Wad_ReadFile(FILE *fp, void *outbuf, u32 offset, u32 len) -{ - s32 ret; - - /* Seek to offset */ - fseek(fp, offset, SEEK_SET); - - /* Read data */ - ret = fread(outbuf, len, 1, fp); - if (ret < 0) return ret; - - return 0; -} - -s32 __Wad_ReadAlloc(FILE *fp, void **outbuf, u32 offset, u32 len) -{ - void *buffer = NULL; - s32 ret; - - /* Allocate memory */ - buffer = memalign(32, len); - if (!buffer) return -1; - - /* Read file */ - ret = __Wad_ReadFile(fp, buffer, offset, len); - if (ret < 0) - { - free(buffer); - return ret; - } - - /* Set pointer */ - *outbuf = buffer; - return 0; -} - -s32 __Wad_GetTitleID(FILE *fp, wadHeader *header, u64 *tid) -{ - //signed_blob *p_tik = NULL; - void *p_tik = NULL; - tik *tik_data = NULL; - - u32 offset = 0; - s32 ret; - - /* Ticket offset */ - offset += round_up( header->header_len, 64 ); - offset += round_up( header->certs_len, 64 ); - offset += round_up( header->crl_len, 64 ); - - /* Read ticket */ - ret = __Wad_ReadAlloc(fp, &p_tik, offset, header->tik_len); - if (ret < 0) goto out; - - /* Ticket data */ - tik_data = (tik *) SIGNATURE_PAYLOAD((signed_blob *) p_tik); - - /* Copy title ID */ - *tid = tik_data->titleid; - - out: - /* Free memory */ - if (p_tik) free(p_tik); - - return ret; -} - -s32 Wad_Install(FILE *fp) -{ - //////start the gui shit - GuiWindow promptWindow(472, 320); - promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - promptWindow.SetPosition(0, -10); - - GuiImageData btnOutline(Resources::GetFile("button_dialogue_box.png"), Resources::GetFileSize("button_dialogue_box.png")); - GuiImageData dialogBox(Resources::GetFile("dialogue_box.png"), Resources::GetFileSize("dialogue_box.png")); - GuiTrigger trigA; - trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - - GuiImage dialogBoxImg(&dialogBox); - if (Settings.wsprompt) - { - dialogBoxImg.SetWidescreen(Settings.widescreen); - } - - GuiText btn1Txt(tr( "OK" ), 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - GuiImage btn1Img(&btnOutline); - if (Settings.wsprompt) - { - btn1Txt.SetWidescreen(Settings.widescreen); - btn1Img.SetWidescreen(Settings.widescreen); - } - GuiButton btn1(&btn1Img, &btn1Img, 2, 4, 0, -35, &trigA, btnSoundOver, btnSoundClick2, 1); - btn1.SetLabel(&btn1Txt); - btn1.SetState(STATE_SELECTED); - - GuiImageData progressbarOutline(Resources::GetFile("progressbar_outline.png"), Resources::GetFileSize("progressbar_outline.png")); - GuiImage progressbarOutlineImg(&progressbarOutline); - if (Settings.wsprompt) - { - progressbarOutlineImg.SetWidescreen(Settings.widescreen); - } - progressbarOutlineImg.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - progressbarOutlineImg.SetPosition(25, 50); - - GuiImageData progressbarEmpty(Resources::GetFile("progressbar_empty.png"), Resources::GetFileSize("progressbar_empty.png")); - GuiImage progressbarEmptyImg(&progressbarEmpty); - progressbarEmptyImg.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - progressbarEmptyImg.SetPosition(25, 50); - progressbarEmptyImg.SetTile(100); - - GuiImageData progressbar(Resources::GetFile("progressbar.png"), Resources::GetFileSize("progressbar.png")); - GuiImage progressbarImg(&progressbar); - progressbarImg.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); - progressbarImg.SetPosition(25, 50); - - char title[50]; - sprintf(title, "%s", tr( "Installing wad" )); - GuiText titleTxt(title, 26, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - titleTxt.SetPosition(0, 40); - char msg[50]; - sprintf(msg, " "); - // sprintf(msg, "%s", tr("Initializing Network")); - GuiText msg1Txt((char*) NULL, 20, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - msg1Txt.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - msg1Txt.SetPosition(50, 75); - // char msg2[50] = " "; - GuiText msg2Txt((char*) NULL, 20, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - msg2Txt.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - msg2Txt.SetPosition(50, 98); - - GuiText msg3Txt((char*) NULL, 20, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - msg3Txt.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - msg3Txt.SetPosition(50, 121); - - GuiText msg4Txt((char*) NULL, 20, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - msg4Txt.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - msg4Txt.SetPosition(50, 144); - - GuiText msg5Txt((char*) NULL, 20, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - msg5Txt.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - msg5Txt.SetPosition(50, 167); - - GuiText prTxt((char*) NULL, 26, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - prTxt.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - prTxt.SetPosition(0, 50); - - if ((Settings.wsprompt) && (Settings.widescreen)) /////////////adjust for widescreen - { - progressbarOutlineImg.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - progressbarOutlineImg.SetPosition(0, 50); - progressbarEmptyImg.SetPosition(80, 50); - progressbarEmptyImg.SetTile(78); - progressbarImg.SetPosition(80, 50); - - msg1Txt.SetPosition(90, 75); - msg2Txt.SetPosition(90, 98); - msg3Txt.SetPosition(90, 121); - msg4Txt.SetPosition(90, 144); - msg5Txt.SetPosition(90, 167); - - } - promptWindow.Append(&dialogBoxImg); - promptWindow.Append(&titleTxt); - promptWindow.Append(&msg5Txt); - promptWindow.Append(&msg4Txt); - promptWindow.Append(&msg3Txt); - promptWindow.Append(&msg1Txt); - promptWindow.Append(&msg2Txt); - - //promptWindow.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 50); - - HaltGui(); - mainWindow->SetState(STATE_DISABLED); - mainWindow->Append(&promptWindow); - mainWindow->ChangeFocus(&promptWindow); - //sleep(1); - - - ///start the wad shit - bool fail = false; - wadHeader *header = NULL; - void *pvoid; - signed_blob *p_certs = NULL, *p_crl = NULL, *p_tik = NULL, *p_tmd = NULL; - - tmd *tmd_data = NULL; - - u32 cnt, offset = 0; - s32 ret = 666; - - ResumeGui(); - msg1Txt.SetText(tr( ">> Reading WAD data..." )); - HaltGui(); -#define SetPointer(a, p) a=(typeof(a))p - // WAD header - //ret = __Wad_ReadAlloc(fp, (void *)header, offset, sizeof(wadHeader)); - ret = __Wad_ReadAlloc(fp, &pvoid, offset, sizeof(wadHeader)); - - if (ret < 0) goto err; - SetPointer( header, pvoid ); - offset += round_up( header->header_len, 64 ); - - // WAD certificates - //ret = __Wad_ReadAlloc(fp, (void *)&p_certs, offset, header->certs_len); - ret = __Wad_ReadAlloc(fp, &pvoid, offset, header->certs_len); - if (ret < 0) goto err; - SetPointer( p_certs, pvoid ); - offset += round_up( header->certs_len, 64 ); - - // WAD crl - - if (header->crl_len) - { - //ret = __Wad_ReadAlloc(fp, (void *)&p_crl, offset, header->crl_len); - ret = __Wad_ReadAlloc(fp, &pvoid, offset, header->crl_len); - if (ret < 0) goto err; - SetPointer( p_crl, pvoid ); - offset += round_up( header->crl_len, 64 ); - } - - // WAD ticket - //ret = __Wad_ReadAlloc(fp, (void *)&p_tik, offset, header->tik_len); - ret = __Wad_ReadAlloc(fp, &pvoid, offset, header->tik_len); - if (ret < 0) goto err; - SetPointer( p_tik, pvoid ); - offset += round_up( header->tik_len, 64 ); - - // WAD TMD - //ret = __Wad_ReadAlloc(fp, (void *)&p_tmd, offset, header->tmd_len); - ret = __Wad_ReadAlloc(fp, &pvoid, offset, header->tmd_len); - if (ret < 0) goto err; - SetPointer( p_tmd, pvoid ); - offset += round_up( header->tmd_len, 64 ); - - ResumeGui(); - msg1Txt.SetText(tr( "Reading WAD data... Ok!" )); - msg2Txt.SetText(tr( ">> Installing ticket..." )); - HaltGui(); - // Install ticket - ret = ES_AddTicket(p_tik, header->tik_len, p_certs, header->certs_len, p_crl, header->crl_len); - if (ret < 0) goto err; - - ResumeGui(); - msg2Txt.SetText(tr( "Installing ticket... Ok!" )); - msg3Txt.SetText(tr( ">> Installing title..." )); - //WindowPrompt(">> Installing title...",0,0,0,0,0,200); - HaltGui(); - // Install title - ret = ES_AddTitleStart(p_tmd, header->tmd_len, p_certs, header->certs_len, p_crl, header->crl_len); - if (ret < 0) goto err; - - // Get TMD info - tmd_data = (tmd *) SIGNATURE_PAYLOAD(p_tmd); - - char imgPath[150]; - - // Install contents - //ResumeGui(); - //HaltGui(); - promptWindow.Append(&progressbarEmptyImg); - promptWindow.Append(&progressbarImg); - promptWindow.Append(&progressbarOutlineImg); - promptWindow.Append(&prTxt); - ResumeGui(); - msg3Txt.SetText(tr( "Installing title... Ok!" )); - for (cnt = 0; cnt < tmd_data->num_contents; cnt++) - { - - tmd_content *content = &tmd_data->contents[cnt]; - - u32 idx = 0, len; - s32 cfd; - ResumeGui(); - - //printf("\r\t\t>> Installing content #%02d...", content->cid); - // Encrypted content size - len = round_up( content->size, 64 ); - - // Install content - cfd = ES_AddContentStart(tmd_data->title_id, content->cid); - if (cfd < 0) - { - ret = cfd; - goto err; - } - snprintf(imgPath, sizeof(imgPath), "%s%d...", tr( ">> Installing content #" ), content->cid); - msg4Txt.SetText(imgPath); - // Install content data - while (idx < len) - { - - //VIDEO_WaitVSync (); - - u32 size; - - // Data length - size = (len - idx); - if (size > BLOCK_SIZE) size = BLOCK_SIZE; - - // Read data - ret = __Wad_ReadFile(fp, &wadBuffer, offset, size); - if (ret < 0) goto err; - - // Install data - ret = ES_AddContentData(cfd, wadBuffer, size); - if (ret < 0) goto err; - - // Increase variables - idx += size; - offset += size; - - //snprintf(imgPath, sizeof(imgPath), "%s%d (%d)...",tr(">> Installing content #"),content->cid,idx); - - //msg4Txt.SetText(imgPath); - - prTxt.SetTextf("%i%%", 100 * (cnt * len + idx) / (tmd_data->num_contents * len)); - if ((Settings.wsprompt) && (Settings.widescreen)) - { - progressbarImg.SetTile(78 * (cnt * len + idx) / (tmd_data->num_contents * len)); - } - else - { - progressbarImg.SetTile(100 * (cnt * len + idx) / (tmd_data->num_contents * len)); - } - - } - - // Finish content installation - ret = ES_AddContentFinish(cfd); - if (ret < 0) goto err; - } - - msg4Txt.SetText(tr( "Installing content... Ok!" )); - msg5Txt.SetText(tr( ">> Finishing installation..." )); - - // Finish title install - ret = ES_AddTitleFinish(); - if (ret >= 0) - { - // printf(" OK!\n"); - goto out; - } - - err: - //char titties[100]; - ResumeGui(); - prTxt.SetTextf("%s%d", tr( "Error..." ), ret); - promptWindow.Append(&prTxt); - fail = true; - //snprintf(titties, sizeof(titties), "%d", ret); - //printf(" ERROR! (ret = %d)\n", ret); - //WindowPrompt("ERROR!",titties,"Back",0,0); - // Cancel install - ES_AddTitleCancel(); - goto exit; - //return ret; - - out: - // Free memory - if (header) free(header); - if (p_certs) free(p_certs); - if (p_crl) free(p_crl); - if (p_tik) free(p_tik); - if (p_tmd) free(p_tmd); - goto exit; - - exit: if (!fail) msg5Txt.SetText(tr( "Finishing installation... Ok!" )); - promptWindow.Append(&btn1); - while (btn1.GetState() != STATE_CLICKED) - { - } - - HaltGui(); - mainWindow->Remove(&promptWindow); - mainWindow->SetState(STATE_DEFAULT); - ResumeGui(); - - return ret; -} - -s32 Wad_Uninstall(FILE *fp) -{ - //////start the gui shit - GuiWindow promptWindow(472, 320); - promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); - promptWindow.SetPosition(0, -10); - - GuiImageData btnOutline(Resources::GetFile("button_dialogue_box.png"), Resources::GetFileSize("button_dialogue_box.png")); - GuiImageData dialogBox(Resources::GetFile("dialogue_box.png"), Resources::GetFileSize("dialogue_box.png")); - GuiTrigger trigA; - trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); - - GuiImage dialogBoxImg(&dialogBox); - if (Settings.wsprompt) - { - dialogBoxImg.SetWidescreen(Settings.widescreen); - } - - GuiText btn1Txt(tr( "OK" ), 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - GuiImage btn1Img(&btnOutline); - if (Settings.wsprompt) - { - btn1Txt.SetWidescreen(Settings.widescreen); - btn1Img.SetWidescreen(Settings.widescreen); - } - GuiButton btn1(&btn1Img, &btn1Img, 2, 4, 0, -55, &trigA, btnSoundOver, btnSoundClick2, 1); - btn1.SetLabel(&btn1Txt); - btn1.SetState(STATE_SELECTED); - - char title[50]; - sprintf(title, "%s", tr( "Uninstalling wad" )); - GuiText titleTxt(title, 26, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); - titleTxt.SetPosition(0, 40); - - GuiText msg1Txt((char*) NULL, 18, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - msg1Txt.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - msg1Txt.SetPosition(50, 75); - - GuiText msg2Txt((char*) NULL, 18, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - msg2Txt.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - msg2Txt.SetPosition(50, 98); - - GuiText msg3Txt((char*) NULL, 18, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - msg3Txt.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - msg3Txt.SetPosition(50, 121); - - GuiText msg4Txt((char*) NULL, 18, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - msg4Txt.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - msg4Txt.SetPosition(50, 144); - - GuiText msg5Txt((char*) NULL, 18, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); - msg5Txt.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - msg5Txt.SetPosition(50, 167); - - if ((Settings.wsprompt) && (Settings.widescreen)) /////////////adjust for widescreen - { - - msg1Txt.SetPosition(70, 95); - msg2Txt.SetPosition(70, 118); - msg3Txt.SetPosition(70, 141); - msg4Txt.SetPosition(70, 164); - msg5Txt.SetPosition(70, 187); - - } - promptWindow.Append(&dialogBoxImg); - promptWindow.Append(&titleTxt); - promptWindow.Append(&msg5Txt); - promptWindow.Append(&msg4Txt); - promptWindow.Append(&msg3Txt); - promptWindow.Append(&msg1Txt); - promptWindow.Append(&msg2Txt); - - HaltGui(); - mainWindow->SetState(STATE_DISABLED); - mainWindow->Append(&promptWindow); - mainWindow->ChangeFocus(&promptWindow); - ResumeGui(); - //sleep(3); - - ///start the wad shit - wadHeader *header = NULL; - void *pvoid = NULL; - tikview *viewData = NULL; - - u64 tid; - u32 viewCnt; - s32 ret; - - msg1Txt.SetText(tr( ">> Reading WAD data..." )); - - // WAD header - ret = __Wad_ReadAlloc(fp, &pvoid, 0, sizeof(wadHeader)); - if (ret < 0) - { - char errTxt[50]; - sprintf(errTxt, "%sret = %d", tr( ">> Reading WAD data...ERROR! " ), ret); - msg1Txt.SetText(errTxt); - //printf(" ERROR! (ret = %d)\n", ret); - goto out; - } - SetPointer( header, pvoid ); - - // Get title ID - ret = __Wad_GetTitleID(fp, header, &tid); - if (ret < 0) - { - //printf(" ERROR! (ret = %d)\n", ret); - char errTxt[50]; - sprintf(errTxt, "%sret = %d", tr( ">> Reading WAD data...ERROR! " ), ret); - msg1Txt.SetText(errTxt); - goto out; - } - - msg1Txt.SetText(tr( ">> Reading WAD data...Ok!" )); - msg2Txt.SetText(tr( ">> Deleting tickets..." )); - - // Get ticket views - ret = NandTitles.GetTicketViews(tid, &viewData, &viewCnt); - if (ret < 0) - { - char errTxt[50]; - sprintf(errTxt, "%sret = %d", tr( ">> Deleting tickets...ERROR! " ), ret); - msg2Txt.SetText(errTxt); - //printf(" ERROR! (ret = %d)\n", ret); - } - // Delete tickets - if (ret >= 0) - { - u32 cnt; - - // Delete all tickets - for (cnt = 0; cnt < viewCnt; cnt++) - { - ret = ES_DeleteTicket(&viewData[cnt]); - if (ret < 0) break; - } - - if (ret < 0) - { - char errTxt[50]; - sprintf(errTxt, "%sret = %d", tr( ">> Deleting tickets...ERROR! " ), ret); - msg2Txt.SetText(errTxt); - } - //printf(" ERROR! (ret = %d\n", ret); - else - //printf(" OK!\n"); - msg2Txt.SetText(tr( ">> Deleting tickets...Ok! " )); - - } - - msg3Txt.SetText(tr( ">> Deleting title contents..." )); - //WindowPrompt(">> Deleting title contents...",0,"Back",0,0); - - // Delete title contents - ret = ES_DeleteTitleContent(tid); - if (ret < 0) - { - char errTxt[50]; - sprintf(errTxt, "%sret = %d", tr( ">> Deleting title contents...ERROR! " ), ret); - msg3Txt.SetText(errTxt); - } - //printf(" ERROR! (ret = %d)\n", ret); - else - //printf(" OK!\n"); - msg3Txt.SetText(tr( ">> Deleting title contents...Ok!" )); - - msg4Txt.SetText(tr( ">> Deleting title..." )); - // Delete title - ret = ES_DeleteTitle(tid); - if (ret < 0) - { - char errTxt[50]; - sprintf(errTxt, "%sret = %d", tr( ">> Deleting title ...ERROR! " ), ret); - msg4Txt.SetText(errTxt); - } - //printf(" ERROR! (ret = %d)\n", ret); - else - //printf(" OK!\n"); - msg4Txt.SetText(tr( ">> Deleting title ...Ok!" )); - - out: - // Free memory - if (header) free(header); - - goto exit; - - exit: msg5Txt.SetText(tr( "Done!" )); - promptWindow.Append(&btn1); - while (btn1.GetState() != STATE_CLICKED) - { - } - - HaltGui(); - mainWindow->Remove(&promptWindow); - mainWindow->SetState(STATE_DEFAULT); - ResumeGui(); - - return ret; -} - diff --git a/source/wad/wad.h b/source/wad/wad.h deleted file mode 100644 index 89dd7358..00000000 --- a/source/wad/wad.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef _WAD_H_ -#define _WAD_H_ - -/* Prototypes */ - -#define BLOCK_SIZE 1024 - -s32 Wad_Install(FILE *); -s32 Wad_Uninstall(FILE *); - -#endif diff --git a/source/wpad.c b/source/wpad.c deleted file mode 100644 index a7464952..00000000 --- a/source/wpad.c +++ /dev/null @@ -1,93 +0,0 @@ -#include -#include -#include - -#include "sys.h" -#include "wpad.h" - -/* Constants */ -#define MAX_WIIMOTES 4 - -extern u8 shutdown; - -void __Wpad_PowerCallback(s32 chan) -{ - /* Poweroff console */ - shutdown = 1; -} - -s32 Wpad_Init(void) -{ - s32 ret; - - /* Initialize Wiimote subsystem */ - ret = WPAD_Init(); - if (ret < 0) return ret; - - /* Set POWER button callback */ - WPAD_SetPowerButtonCallback(__Wpad_PowerCallback); - - return ret; -} - -void Wpad_Disconnect(void) -{ - u32 cnt; - - /* Disconnect Wiimotes */ - for (cnt = 0; cnt < MAX_WIIMOTES; cnt++) - WPAD_Disconnect(cnt); - - /* Shutdown Wiimote subsystem */ - WPAD_Shutdown(); -} - -bool IsWpadConnected() -{ - int i = 0; - u32 test = 0; - int notconnected = 0; - for (i = 0; i < 4; i++) - { - if (WPAD_Probe(i, &test) == WPAD_ERR_NO_CONTROLLER) - { - notconnected++; - } - } - if (notconnected < 4) - return true; - else return false; -} - -u32 ButtonsHold(void) -{ - - int i; - u32 buttons = 0; - - WPAD_ScanPads(); - PAD_ScanPads(); - - for (i = 3; i >= 0; i--) - { - buttons |= PAD_ButtonsHeld(i); - buttons |= WPAD_ButtonsHeld(i); - } - return buttons; -} - -u32 ButtonsPressed(void) -{ - int i; - u32 buttons = 0; - - WPAD_ScanPads(); - PAD_ScanPads(); - - for (i = 3; i >= 0; i--) - { - buttons |= PAD_ButtonsDown(i); - buttons |= WPAD_ButtonsDown(i); - } - return buttons; -} diff --git a/source/wpad.h b/source/wpad.h deleted file mode 100644 index 9e2ca57e..00000000 --- a/source/wpad.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef _WPAD_H_ -#define _WPAD_H_ - -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - - /* Prototypes */ - s32 Wpad_Init(void); - void Wpad_Disconnect(void); - u32 ButtonsPressed(void); - u32 ButtonsHold(void); - bool IsWpadConnected(); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/wstring.cpp b/source/wstring.cpp deleted file mode 100644 index 06fc8082..00000000 --- a/source/wstring.cpp +++ /dev/null @@ -1,162 +0,0 @@ -#include -#include "wstring.hpp" - -using namespace std; - -wString::wString(const wchar_t *s) : - std::basic_string, std::allocator >(s) -{ -} - -wString::wString(const basic_string , allocator > &ws) : - basic_string , allocator > (ws) -{ -} - -wString::wString(const string &s) -{ - std::string::size_type size; - - size = s.size(); - resize(size); - for (std::string::size_type i = 0; i < size; ++i) - (*this)[i] = (unsigned char) s[i]; -} - -wString &wString::operator=(const string & s) -{ - std::string::size_type size; - - size = s.size(); - this->resize(size); - for (std::string::size_type i = 0; i < size; ++i) - (*this)[i] = (unsigned char) s[i]; - return *this; -} - -void wString::fromUTF8(const char *s) -{ - size_t len = utf8Len(s); - - clear(); - if (len == 0) return; - reserve(len); - for (int i = 0; s[i] != 0;) - { - if ((s[i] & 0xF8) == 0xF0) - { - push_back(((wchar_t) (s[i] & 0x07) << 18) | ((wchar_t) (s[i + 1] & 0x3F) << 12) | ((wchar_t) (s[i + 2] - & 0x3F) << 6) | (wchar_t) (s[i + 3] & 0x3F)); - i += 4; - } - else if ((s[i] & 0xF0) == 0xE0) - { - push_back(((wchar_t) (s[i] & 0x0F) << 12) | ((wchar_t) (s[i + 1] & 0x3F) << 6) - | (wchar_t) (s[i + 2] & 0x3F)); - i += 3; - } - else if ((s[i] & 0xE0) == 0xC0) - { - push_back(((wchar_t) (s[i] & 0x1F) << 6) | (wchar_t) (s[i + 1] & 0x3F)); - i += 2; - } - else - { - push_back((wchar_t) s[i]); - ++i; - } - } -} - -string wString::toUTF8(void) const -{ - string s; - size_t len = 0; - wchar_t wc; - - for (size_t i = 0; i < size(); ++i) - { - wc = operator[](i); - if (wc < 0x80) - ++len; - else if (wc < 0x800) - len += 2; - else if (wc < 0x10000) - len += 3; - else len += 4; - } - s.reserve(len); - for (size_t i = 0; i < size(); ++i) - { - wc = operator[](i); - if (wc < 0x80) - s.push_back((char) wc); - else if (wc < 0x800) - { - s.push_back((char) ((wc >> 6) | 0xC0)); - s.push_back((char) ((wc & 0x3F) | 0x80)); - } - else if (wc < 0x10000) - { - s.push_back((char) ((wc >> 12) | 0xE0)); - s.push_back((char) (((wc >> 6) & 0x3F) | 0x80)); - s.push_back((char) ((wc & 0x3F) | 0x80)); - } - else - { - s.push_back((char) (((wc >> 18) & 0x07) | 0xF0)); - s.push_back((char) (((wc >> 12) & 0x3F) | 0x80)); - s.push_back((char) (((wc >> 6) & 0x3F) | 0x80)); - s.push_back((char) ((wc & 0x3F) | 0x80)); - } - } - return s; -} - -size_t utf8Len(const char *s) -{ - size_t len = 0; - - for (int i = 0; s[i] != 0;) - { - if ((s[i] & 0xF8) == 0xF0) - { - if (((s[i + 1] & 0xC0) != 0x80) || ((s[i + 2] & 0xC0) != 0x80) || ((s[i + 3] & 0xC0) != 0x80)) return 0; - ++len; - i += 4; - } - else if ((s[i] & 0xF0) == 0xE0) - { - if (((s[i + 1] & 0xC0) != 0x80) || ((s[i + 2] & 0xC0) != 0x80)) return 0; - ++len; - i += 3; - } - else if ((s[i] & 0xE0) == 0xC0) - { - if (((s[i + 1] & 0xC0) != 0x80)) return 0; - ++len; - i += 2; - } - else if ((s[i] & 0x80) == 0x00) - { - ++len; - ++i; - } - else return 0; - } - return len; -} - -int wcsnicmp(const wchar_t *s1, const wchar_t *s2, int len) -{ - if (len <= 0) return (0); - - do - { - int r = towupper(*s1) - towupper(*s2++); - if (r) return r; - if (*s1++ == 0) break; - } while (--len != 0); - - return (0); -} diff --git a/source/wstring.hpp b/source/wstring.hpp deleted file mode 100644 index e2d79b86..00000000 --- a/source/wstring.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/**************************************************************************** - * wstring Class - * by Hibernatus - ***************************************************************************/ -#ifndef __WSTRING_HPP -#define __WSTRING_HPP - -#include - -class wString: public std::basic_string, std::allocator > -{ - public: - wString(void) - { - } - wString(const wchar_t *s); - wString(const std::basic_string, std::allocator > &ws); - wString(const std::string &s); - wString &operator=(const std::string &s); - void fromUTF8(const char *s); - std::string toUTF8(void) const; -}; - -size_t utf8Len(const char *s); -int wcsnicmp(const wchar_t *s1, const wchar_t *s2, int len); - -#endif // !defined(__WSTRING_HPP) diff --git a/source/xml/WiiTDB.cpp b/source/xml/WiiTDB.cpp deleted file mode 100644 index d8a2d1fc..00000000 --- a/source/xml/WiiTDB.cpp +++ /dev/null @@ -1,998 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#include -#include -#include -#include -#include "WiiTDB.hpp" - -#define NAME_OFFSET_DB "wiitdb_offsets.bin" -#define MAXREADSIZE 1024*1024 // Cache size only for parsing the offsets: 1MB - -typedef struct _ReplaceStruct -{ - const char * orig; - char replace; - short size; -} ReplaceStruct; - -//! More replacements can be added if needed -static const ReplaceStruct Replacements[] = -{ - { ">", '>', 4 }, - { "<", '<', 4 }, - { """, '\"', 6 }, - { "'", '\'', 6 }, - { "&", '&', 5 }, - { NULL, '\0', 0 } -}; - -WiiTDB::WiiTDB() - : file(0), LangCode("EN"), GameNodeCache(0) -{ -} - -WiiTDB::WiiTDB(const char * filepath) - : file(0), LangCode("EN"), GameNodeCache(0) -{ - OpenFile(filepath); -} - -WiiTDB::~WiiTDB() -{ - CloseFile(); -} - -bool WiiTDB::OpenFile(const char * filepath) -{ - if(!filepath) - return false; - - file = fopen(filepath, "rb"); - if(file) - { - int pos; - string OffsetsPath = filepath; - if((pos = OffsetsPath.find_last_of('/')) != (int) string::npos) - OffsetsPath[pos] = '\0'; - else - OffsetsPath.clear(); //! Relative path - - LoadGameOffsets(OffsetsPath.c_str()); - } - - return (file != NULL); -} - -void WiiTDB::CloseFile() -{ - OffsetMap.clear(); - vector().swap(OffsetMap); - - if(GameNodeCache) - delete [] GameNodeCache; - GameNodeCache = NULL; - - if(file) - fclose(file); - file = NULL; -} - -bool WiiTDB::LoadGameOffsets(const char * path) -{ - if(!path) - return false; - - string OffsetDBPath = path; - if(strlen(path) > 0 && path[strlen(path)-1] != '/') - OffsetDBPath += '/'; - OffsetDBPath += NAME_OFFSET_DB; - - FILE * fp = fopen(OffsetDBPath.c_str(), "rb"); - if(!fp) - { - bool result = ParseFile(); - if(result) - SaveGameOffsets(OffsetDBPath.c_str()); - - return result; - } - - unsigned long long ExistingVersion = GetWiiTDBVersion(); - unsigned long long Version = 0; - unsigned int NodeCount = 0; - - fread(&Version, 1, sizeof(Version), fp); - - if(ExistingVersion != Version) - { - fclose(fp); - bool result = ParseFile(); - if(result) - SaveGameOffsets(OffsetDBPath.c_str()); - - return result; - } - - fread(&NodeCount, 1, sizeof(NodeCount), fp); - - if(NodeCount == 0) - { - fclose(fp); - bool result = ParseFile(); - if(result) - SaveGameOffsets(OffsetDBPath.c_str()); - - return result; - } - - OffsetMap.resize(NodeCount); - - if((int) fread(&OffsetMap[0], 1, NodeCount*sizeof(GameOffsets), fp) < 0) - { - fclose(fp); - bool result = ParseFile(); - if(result) - SaveGameOffsets(OffsetDBPath.c_str()); - - return result; - } - - fclose(fp); - - return true; -} - -bool WiiTDB::SaveGameOffsets(const char * path) -{ - if(OffsetMap.size() == 0 || !path) - return false; - - FILE * fp = fopen(path, "wb"); - if(!fp) - return false; - - unsigned long long ExistingVersion = GetWiiTDBVersion(); - unsigned int NodeCount = OffsetMap.size(); - - if(fwrite(&ExistingVersion, 1, sizeof(ExistingVersion), fp) != sizeof(ExistingVersion)) - { - fclose(fp); - return false; - } - - if(fwrite(&NodeCount, 1, sizeof(NodeCount), fp) != sizeof(NodeCount)) - { - fclose(fp); - return false; - } - - if(fwrite(&OffsetMap[0], 1, NodeCount*sizeof(GameOffsets), fp) != NodeCount*sizeof(GameOffsets)) - { - fclose(fp); - return false; - } - - fclose(fp); - - return true; -} - -unsigned long long WiiTDB::GetWiiTDBVersion() -{ - if(!file) - return 0; - - char TmpText[1024]; - - if(GetData(TmpText, 0, sizeof(TmpText)) < 0) - return 0; - - char * VersionText = GetNodeText(TmpText, ""); - if(!VersionText) - return 0; - - return strtoull(VersionText, NULL, 10); -} - -int WiiTDB::GetData(char * data, int offset, int size) -{ - if(!file || !data) - return -1; - - fseek(file, offset, SEEK_SET); - - return fread(data, 1, size, file); -} - -char * WiiTDB::LoadGameNode(const char * id) -{ - unsigned int read = 0; - - GameOffsets * offset = this->GetGameOffset(id); - if(!offset) - return NULL; - - char * data = new (std::nothrow) char[offset->nodesize+1]; - if(!data) - return NULL; - - if((read = GetData(data, offset->gamenode, offset->nodesize)) != offset->nodesize) - { - delete [] data; - return NULL; - } - - data[read] = '\0'; - - return data; -} - -char * WiiTDB::GetGameNode(const char * id) -{ - char * data = NULL; - - if(GameNodeCache != 0 && strncmp(id, GameIDCache, strlen(GameIDCache)) == 0) - { - data = new (std::nothrow) char[strlen(GameNodeCache)+1]; - if(data) - strcpy(data, GameNodeCache); - } - else - { - if(GameNodeCache) - delete [] GameNodeCache; - - GameNodeCache = LoadGameNode(id); - - if(GameNodeCache) - { - snprintf(GameIDCache, sizeof(GameIDCache), id); - data = new (std::nothrow) char[strlen(GameNodeCache)+1]; - if(data) - strcpy(data, GameNodeCache); - } - } - - return data; -} - -GameOffsets * WiiTDB::GetGameOffset(const char * gameID) -{ - for(unsigned int i = 0; i < OffsetMap.size(); ++i) - { - if(strncmp(gameID, OffsetMap[i].gameID, strlen(OffsetMap[i].gameID)) == 0) - return &OffsetMap[i]; - } - - return 0; -} - -static inline char * CleanText(char * in_text) -{ - if(!in_text) - return NULL; - - const char * ptr = in_text; - char * text = in_text; - - while(*ptr != '\0') - { - for(int i = 0; Replacements[i].orig != 0; ++i) - { - if(strncmp(ptr, Replacements[i].orig, Replacements[i].size) == 0) - { - ptr += Replacements[i].size; - *text = Replacements[i].replace; - ++text; - i = 0; - continue; - } - } - - if(*ptr == '\r') - { - ++ptr; - continue; - } - - *text = *ptr; - ++ptr; - ++text; - } - - *text = '\0'; - - return in_text; -} - -char * WiiTDB::GetNodeText(char * data, const char * nodestart, const char * nodeend) -{ - if(!data || !nodestart || !nodeend) - return NULL; - - char * position = strstr(data, nodestart); - if(!position) - return NULL; - - position += strlen(nodestart); - - char * end = strstr(position, nodeend); - if(!end) - return NULL; - - *end = '\0'; - - return CleanText(position); -} - -char * WiiTDB::SeekLang(char * text, const char * langcode) -{ - if(!text || !langcode) return NULL; - - char * ptr = text; - while((ptr = strstr(ptr, ""); - if(!end) - return NULL; - - end += strlen(""); - *end = '\0'; - - return ptr; - } - } - - return NULL; -} - -bool WiiTDB::ParseFile() -{ - OffsetMap.clear(); - - if(!file) - return false; - - char * Line = new (std::nothrow) char[MAXREADSIZE+1]; - if(!Line) - return false; - - bool readnew = false; - int i, currentPos = 0; - int read = 0; - const char * gameNode = NULL; - const char * idNode = NULL; - const char * gameEndNode = NULL; - - while((read = GetData(Line, currentPos, MAXREADSIZE)) > 0) - { - gameNode = Line; - readnew = false; - - //! Ensure the null termination at the end - Line[read] = '\0'; - - while((gameNode = strstr(gameNode, ""); - gameEndNode = strstr(gameNode, ""); - if(!idNode || !gameEndNode) - { - //! We are in the middle of the game node, reread complete node and more - currentPos += (gameNode-Line); - fseek(file, currentPos, SEEK_SET); - readnew = true; - break; - } - - idNode += strlen(""); - gameEndNode += strlen(""); - - int size = OffsetMap.size(); - OffsetMap.resize(size+1); - - for(i = 0; i < 7 && *idNode != '<'; ++i, ++idNode) - OffsetMap[size].gameID[i] = *idNode; - OffsetMap[size].gameID[i] = '\0'; - OffsetMap[size].gamenode = currentPos+(gameNode-Line); - OffsetMap[size].nodesize = (gameEndNode-gameNode); - gameNode = gameEndNode; - } - - if(readnew) - continue; - - currentPos += read; - } - - delete [] Line; - - return true; -} - -bool WiiTDB::GetTitle(const char * id, string & title) -{ - if(!id) - return false; - - char * data = GetGameNode(id); - if(!data) - return false; - - char * language = SeekLang(data, LangCode.c_str()); - if(!language) - { - language = SeekLang(data, "EN"); - if(!language) - { - delete [] data; - return false; - } - } - - char * the_title = GetNodeText(language, "", ""); - if(!the_title) - { - delete [] data; - return false; - } - - title = the_title; - - delete [] data; - - return true; -} - -bool WiiTDB::GetSynopsis(const char * id, string & synopsis) -{ - if(!id) - return false; - - char * data = GetGameNode(id); - if(!data) - return false; - - char * language = SeekLang(data, LangCode.c_str()); - if(!language) - { - language = SeekLang(data, "EN"); - if(!language) - { - delete [] data; - return false; - } - } - - char * the_synopsis = GetNodeText(language, "", ""); - if(!the_synopsis) - { - delete [] data; - return false; - } - - synopsis = the_synopsis; - - delete [] data; - - return true; -} - -bool WiiTDB::GetRegion(const char * id, string & region) -{ - if(!id) - return false; - - char * data = GetGameNode(id); - if(!data) - return false; - - char * the_region = GetNodeText(data, "", ""); - if(!the_region) - { - delete [] data; - return false; - } - - region = the_region; - - delete [] data; - - return true; -} - -bool WiiTDB::GetDeveloper(const char * id, string & dev) -{ - if(!id) - return false; - - char * data = GetGameNode(id); - if(!data) - return false; - - char * the_dev = GetNodeText(data, "", ""); - if(!the_dev) - { - delete [] data; - return false; - } - - dev = the_dev; - - delete [] data; - - return true; -} - -bool WiiTDB::GetPublisher(const char * id, string & pub) -{ - if(!id) - return false; - - char * data = GetGameNode(id); - if(!data) - return false; - - char * the_pub = GetNodeText(data, "", ""); - if(!the_pub) - { - delete [] data; - return false; - } - - pub = the_pub; - - delete [] data; - - return true; -} - -unsigned int WiiTDB::GetPublishDate(const char * id) -{ - if(!id) - return 0; - - char * data = GetGameNode(id); - if(!data) - return 0; - - char * year_string = GetNodeText(data, ""); - if(!year_string) - { - delete [] data; - return 0; - } - - unsigned int year, day, month; - - year = atoi(year_string); - - char * month_string = strstr(year_string, "month=\""); - if(!month_string) - { - delete [] data; - return 0; - } - - month_string += strlen("month=\""); - - month = atoi(month_string); - - char * day_string = strstr(month_string, "day=\""); - if(!day_string) - { - delete [] data; - return 0; - } - - day_string += strlen("day=\""); - - day = atoi(day_string); - - delete [] data; - - return ((year & 0xFFFF) << 16 | (month & 0xFF) << 8 | (day & 0xFF)); -} - -bool WiiTDB::GetGenreList(const char * id, vector & genre) -{ - if(!id) - return false; - - char * data = GetGameNode(id); - if(!data) - return false; - - char * the_genre = GetNodeText(data, "", ""); - if(!the_genre) - { - delete [] data; - return false; - } - - unsigned int genre_num = 0; - const char * ptr = the_genre; - - while(*ptr != '\0') - { - if(genre_num >= genre.size()) - genre.resize(genre_num+1); - - if(*ptr == ',' || *ptr == '/' || *ptr == ';') - { - ptr++; - while(*ptr == ' ') ptr++; - genre[genre_num].push_back('\0'); - genre_num++; - continue; - } - - if(genre[genre_num].size() == 0) - genre[genre_num].push_back(toupper((int)*ptr)); - else - genre[genre_num].push_back(*ptr); - - ++ptr; - } - genre[genre_num].push_back('\0'); - - delete [] data; - - return true; -} - -const char * WiiTDB::RatingToString(int rating) -{ - switch(rating) - { - case 0: - return "CERO"; - case 1: - return "ESRB"; - case 2: - return "PEGI"; - default: - break; - } - - return NULL; -} - -int WiiTDB::GetRating(const char * id) -{ - int rating = -1; - - if(!id) - return rating; - - char * data = GetGameNode(id); - if(!data) - return rating; - - char * rating_text = GetNodeText(data, ""); - if(!rating_text) - { - delete [] data; - return rating; - } - - if(strncmp(rating_text, "CERO", 4) == 0) - rating = 0; - - else if(strncmp(rating_text, "ESRB", 4) == 0) - rating = 1; - - else if(strncmp(rating_text, "PEGI", 4) == 0) - rating = 2; - - delete [] data; - - return rating; -} - -bool WiiTDB::GetRatingValue(const char * id, string & rating_value) -{ - if(!id) - return false; - - char * data = GetGameNode(id); - if(!data) - return false; - - char * rating_text = GetNodeText(data, ""); - if(!rating_text) - { - delete [] data; - return false; - } - - char * value_text = GetNodeText(rating_text, "value=\"", "\""); - if(!value_text) - { - delete [] data; - return false; - } - - rating_value = value_text; - - delete [] data; - - return true; -} - -int WiiTDB::GetRatingDescriptorList(const char * id, vector & desc_list) -{ - if(!id) - return -1; - - char * data = GetGameNode(id); - if(!data) - return -1; - - char * descriptor_text = GetNodeText(data, "", ""); - if(!descriptor_text) - { - delete [] data; - return -1; - } - - unsigned int list_num = 0; - desc_list.clear(); - - while(*descriptor_text != '\0') - { - if(strncmp(descriptor_text, "", strlen("")) == 0) - { - desc_list[list_num].push_back('\0'); - descriptor_text = strstr(descriptor_text, ""); - if(!descriptor_text) - break; - - descriptor_text += strlen(""); - list_num++; - } - - if(list_num >= desc_list.size()) - desc_list.resize(list_num+1); - - desc_list[list_num].push_back(*descriptor_text); - ++descriptor_text; - } - - delete [] data; - - return desc_list.size(); -} - -int WiiTDB::GetWifiPlayers(const char * id) -{ - int players = -1; - - if(!id) - return players; - - char * data = GetGameNode(id); - if(!data) - return players; - - char * PlayersNode = GetNodeText(data, ""); - if(!PlayersNode) - { - delete [] data; - return players; - } - - players = atoi(PlayersNode); - - return players; -} - -int WiiTDB::GetWifiFeatureList(const char * id, vector & feat_list) -{ - if(!id) - return -1; - - char * data = GetGameNode(id); - if(!data) - return -1; - - char * feature_text = GetNodeText(data, "", ""); - if(!feature_text) - { - delete [] data; - return -1; - } - - unsigned int list_num = 0; - feat_list.clear(); - - while(*feature_text != '\0') - { - if(strncmp(feature_text, "", strlen("")) == 0) - { - feat_list[list_num].push_back('\0'); - feature_text = strstr(feature_text, ""); - if(!feature_text) - break; - - feature_text += strlen(""); - list_num++; - } - - if(list_num >= feat_list.size()) - feat_list.resize(list_num+1); - - - if(feat_list[list_num].size() == 0) - feat_list[list_num].push_back(toupper((int)*feature_text)); - else - feat_list[list_num].push_back(*feature_text); - - ++feature_text; - } - - delete [] data; - - return feat_list.size(); -} - -int WiiTDB::GetPlayers(const char * id) -{ - int players = -1; - - if(!id) - return players; - - char * data = GetGameNode(id); - if(!data) - return players; - - char * PlayersNode = GetNodeText(data, ""); - if(!PlayersNode) - { - delete [] data; - return players; - } - - players = atoi(PlayersNode); - - return players; -} - -int WiiTDB::GetAccessoirList(const char * id, vector & acc_list) -{ - if(!id) - return -1; - - char * data = GetGameNode(id); - if(!data) - return -1; - - char * ControlsNode = GetNodeText(data, ""); - if(!ControlsNode) - { - delete [] data; - return -1; - } - - unsigned int list_num = 0; - acc_list.clear(); - - while(ControlsNode && *ControlsNode != '\0') - { - if(list_num >= acc_list.size()) - acc_list.resize(list_num+1); - - for(const char * ptr = ControlsNode; *ptr != '"' && *ptr != '\0'; ptr++) - { - acc_list[list_num].Name.push_back(*ptr); - } - acc_list[list_num].Name.push_back('\0'); - - char * requiredField = strstr(ControlsNode, "required=\""); - if(!requiredField) - { - delete [] data; - return -1; - } - - requiredField += strlen("required=\""); - - if(strncmp(requiredField, "true", 4) == 0) - { - acc_list[list_num].Required = true; - } - else - { - acc_list[list_num].Required = false; - } - - ControlsNode = strstr(requiredField, ""); - if(!ColorNode) - { - delete [] data; - return color; - } - - color = strtoul(ColorNode, NULL, 16); - - return color; -} - -bool WiiTDB::GetGameXMLInfo(const char * id, GameXMLInfo * gameInfo) -{ - if(!id || !gameInfo) - return false; - - for(int i = 0; i < 6 && id[i] != 0; ++i) - gameInfo->GameID.push_back(id[i]); - gameInfo->GameID.push_back('\0'); - - GetTitle(id, gameInfo->Title); - GetSynopsis(id, gameInfo->Synopsis); - GetRegion(id, gameInfo->Region); - GetDeveloper(id, gameInfo->Developer); - GetPublisher(id, gameInfo->Publisher); - gameInfo->PublishDate = GetPublishDate(id); - GetGenreList(id, gameInfo->GenreList); - gameInfo->RatingType = GetRating(id); - GetRatingValue(id, gameInfo->RatingValue); - GetRatingDescriptorList(id, gameInfo->RatingDescriptorList); - gameInfo->WifiPlayers = GetWifiPlayers(id); - GetWifiFeatureList(id, gameInfo->WifiFeatureList); - gameInfo->Players = GetPlayers(id); - GetAccessoirList(id, gameInfo->AccessoirList); - gameInfo->CaseColor = GetCaseColor(id); - - return true; -} diff --git a/source/xml/WiiTDB.hpp b/source/xml/WiiTDB.hpp deleted file mode 100644 index 1ca93d82..00000000 --- a/source/xml/WiiTDB.hpp +++ /dev/null @@ -1,150 +0,0 @@ -/**************************************************************************** - * Copyright (C) 2010 - * by Dimok - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any - * damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any - * purpose, including commercial applications, and to alter it and - * redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you - * must not claim that you wrote the original software. If you use - * this software in a product, an acknowledgment in the product - * documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and - * must not be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - ***************************************************************************/ -#ifndef WIITDB_HPP_ -#define WIITDB_HPP_ - -#include -#include - -using namespace std; - -typedef struct _Accessoir -{ - string Name; - bool Required; -} Accessoir; - -typedef struct _GameXMLInfo -{ - string GameID; - string Region; - string Title; - string Synopsis; - string Developer; - string Publisher; - unsigned int PublishDate; - vector GenreList; - int RatingType; - string RatingValue; - vector RatingDescriptorList; - int WifiPlayers; - vector WifiFeatureList; - int Players; - vector AccessoirList; - long CaseColor; - -} GameXMLInfo; - -typedef struct _GameOffsets -{ - char gameID[7]; - unsigned int gamenode; - unsigned int nodesize; -} __attribute__((__packed__)) GameOffsets; - -class WiiTDB -{ - public: - //! Constructor - WiiTDB(); - //! Constructor - //! If filepath is passed the xml file is opened and the node offsets are loaded - WiiTDB(const char * filepath); - //! Destructor - ~WiiTDB(); - //! If filepath is passed the xml file is opened and the node offsets are loaded - bool OpenFile(const char * filepath); - //! Closes the WiiTDB xml file - void CloseFile(); - //! Set the language code which should be use to find the appropriate language - //! If the language code is not found, the language code defaults to EN - void SetLanguageCode(const char * code) { if(code) LangCode = code; }; - //! Get the current set language code - const char * GetLanguageCode() { return LangCode.c_str(); }; - //! Get the title of a specific game id in the language defined in LangCode - bool GetTitle(const char * id, string & title); - //! Get the synopsis of a specific game id in the language defined in LangCode - bool GetSynopsis(const char * id, string & synopsis); - //! Get the region of a game for a specific game id - bool GetRegion(const char * id, string & region); - //! Get the developer of a game for a specific game id - bool GetDeveloper(const char * id, string & dev); - //! Get the publisher of a game for a specific game id - bool GetPublisher(const char * id, string & pub); - //! Get the publish date of a game for a specific game id - //! First 1 byte is the day, than 1 byte month and last 2 bytes is the year - //! year = (return >> 16), month = (return >> 8) & 0xFF, day = return & 0xFF - unsigned int GetPublishDate(const char * id); - //! Get the genre list of a game for a specific game id - bool GetGenreList(const char * id, vector & genre); - //! Get the rating type for a specific game id - //! The rating type can be converted to a string with WiiTDB::RatingToString(rating) - int GetRating(const char * id); - //! Get the rating value for a specific game id - bool GetRatingValue(const char * id, string & rating_value); - //! Get the rating descriptor list inside a vector for a specific game id - //! Returns the amount of descriptors found or -1 if failed - int GetRatingDescriptorList(const char * id, vector & desc_list); - //! Get the wifi player count for a specific game id - //! Returns the amount of wifi players or -1 if failed - int GetWifiPlayers(const char * id); - //! Get the wifi feature list inside a vector for a specific game id - //! Returns the amount of wifi features found or -1 if failed - int GetWifiFeatureList(const char * id, vector & feat_list); - //! Get the player count for a specific game id - //! Returns the amount of players or -1 if failed - int GetPlayers(const char * id); - //! Returns the amount of accessoirs found or -1 if failed - //! Get the accessoir (inputs) list inside a vector for a specific game id - int GetAccessoirList(const char * id, vector & acc_list); - //! Get the box (case) color for a specific game id - //! Returns the color in RGB (first 3 bytes) - int GetCaseColor(const char * id); - //! Get the complete game info in the GameXMLInfo struct - bool GetGameXMLInfo(const char * id, GameXMLInfo * gameInfo); - //! Convert a specific game rating to a string - static const char * RatingToString(int rating); - //! Get the version of the wiitdb xml database - unsigned long long GetWiiTDBVersion(); - //! Get the entry count in the xml database - inline size_t GetEntryCount() { return OffsetMap.size(); }; - private: - bool ParseFile(); - bool LoadGameOffsets(const char * path); - bool SaveGameOffsets(const char * path); - inline int GetData(char * data, int offset, int size); - inline char * LoadGameNode(const char * id); - inline char * GetGameNode(const char * id); - inline GameOffsets * GetGameOffset(const char * id); - inline char * SeekLang(char * text, const char * langcode); - inline char * GetNodeText(char * data, const char * nodestart, const char * nodeend); - - vector OffsetMap; - FILE * file; - string LangCode; - char * GameNodeCache; - char GameIDCache[7]; -}; - -#endif diff --git a/source/xml/xml.cpp b/source/xml/xml.cpp deleted file mode 100644 index 2d62def1..00000000 --- a/source/xml/xml.cpp +++ /dev/null @@ -1,451 +0,0 @@ -/* - Load game information from XML - Lustar - - Mini-XML by Michael Sweet - - MiniZip adapted by Tantric - */ - -#include -#include -#include "settings/CSettings.h" -#include "settings/CGameSettings.h" -#include "settings/GameTitles.h" -#include "xml/xml.h" - -extern char game_partition[6]; - -/* config */ -static char xmlcfg_filename[100] = "wiitdb"; -static int xmlmaxsize = 1572864; - -static char langlist[11][22] = { { "Console Default" }, { "Japanese" }, { "English" }, { "German" }, { "French" }, { - "Spanish" }, { "Italian" }, { "Dutch" }, { "S. Chinese" }, { "T. Chinese" }, { "Korean" } }; - -static char langcodes[11][5] = { { "" }, { "JA" }, { "EN" }, { "DE" }, { "FR" }, { "ES" }, { "IT" }, { "NL" }, - { "ZHCN" }, // People's Republic of China - { "ZHTW" }, // Taiwan - { "KO" } }; - -static char element_text[5000]; -static mxml_node_t *nodetree = NULL; -static mxml_node_t *nodedata = NULL; -static mxml_node_t *nodeid = NULL; -static mxml_node_t *nodeidtmp = NULL; -static mxml_node_t *nodefound = NULL; -static mxml_index_t *nodeindex = NULL; -static mxml_index_t *nodeindextmp = NULL; -int xmlloadtime = 0; -char * get_nodetext(mxml_node_t *node, char *buffer, int buflen); -bool xml_loaded = false; - -/* load renamed titles from proper names and game info XML, needs to be after cfg_load_games */ -bool OpenXMLDatabase(char* xmlfilepath, char* argdblang, bool argJPtoEN, bool openfile, bool loadtitles, bool keepopen) -{ - if (!xml_loaded) - { - bool opensuccess = false; - char pathname[200]; - snprintf(pathname, sizeof(pathname), "%s", xmlfilepath); - if (xmlfilepath[strlen(xmlfilepath) - 1] != '/') snprintf(pathname, sizeof(pathname), "%s/", pathname); - snprintf(pathname, sizeof(pathname), "%s%s_%s.zip", pathname, xmlcfg_filename, game_partition); - if (openfile) opensuccess = OpenXMLFile(pathname); - if (!opensuccess) - { - snprintf(pathname, sizeof(pathname), "%s", xmlfilepath); - if (xmlfilepath[strlen(xmlfilepath) - 1] != '/') snprintf(pathname, sizeof(pathname), "%s/", pathname); - snprintf(pathname, sizeof(pathname), "%swiitdb.zip", pathname); - if (openfile) opensuccess = OpenXMLFile(pathname); - } - if (!opensuccess && openfile) - { - CloseXMLDatabase(); - return false; - } - if (loadtitles) LoadTitlesFromXML(argdblang, argJPtoEN); - if (!keepopen) CloseXMLDatabase(); - } - else - { - if (loadtitles) LoadTitlesFromXML(argdblang, argJPtoEN); - if (!keepopen) CloseXMLDatabase(); - } - return true; -} - -void CloseXMLDatabase() -{ - /* free memory */ - if (xml_loaded) - { - mxmlDelete(nodedata); - mxmlDelete(nodetree); - xml_loaded = false; - } -} - -void GetTextFromNode(mxml_node_t *currentnode, mxml_node_t *topnode, const char *nodename, const char *attributename, - char *value, int descend, char *dest, int destsize) -{ - *element_text = 0; - nodefound = mxmlFindElement(currentnode, topnode, nodename, attributename, value, descend); - if (nodefound != NULL) - { - if (attributename != NULL) - { - strlcpy(dest, mxmlElementGetAttr(nodefound, attributename), destsize); - } - else - { - get_nodetext(nodefound, element_text, sizeof(element_text)); - strlcpy(dest, element_text, destsize); - } - } - else - { - strcpy(dest, ""); - } -} - -bool OpenXMLFile(char *filename) -{ - //if (xmldebug) dbg_time1(); - - if (xml_loaded) return false; - - nodedata = NULL; - nodetree = NULL; - nodeid = NULL; - nodeidtmp = NULL; - nodefound = NULL; - - char* strresult = strstr(filename, ".zip"); - if (strresult == NULL) - { - /* Load XML file */ - FILE *filexml; - filexml = fopen(filename, "rb"); - if (!filexml) return false; - - nodetree = mxmlLoadFile(NULL, filexml, MXML_OPAQUE_CALLBACK); - fclose(filexml); - - } - else - { - /* load zipped XML file */ - unzFile unzfile = unzOpen(filename); - if (unzfile == NULL) return false; - unzOpenCurrentFile(unzfile); - - unz_file_info zipfileinfo; - unzGetCurrentFileInfo(unzfile, &zipfileinfo, NULL, 0, NULL, 0, NULL, 0); - int zipfilebuffersize = zipfileinfo.uncompressed_size; - if (zipfilebuffersize >= xmlmaxsize) - { - unzCloseCurrentFile(unzfile); - unzClose(unzfile); - return false; - } - - char * zipfilebuffer = (char *) malloc(zipfilebuffersize); - memset(zipfilebuffer, 0, zipfilebuffersize); - if (zipfilebuffer == NULL) - { - unzCloseCurrentFile(unzfile); - unzClose(unzfile); - return false; - } - - unzReadCurrentFile(unzfile, zipfilebuffer, zipfilebuffersize); - unzCloseCurrentFile(unzfile); - unzClose(unzfile); - - nodetree = mxmlLoadString(NULL, zipfilebuffer, MXML_OPAQUE_CALLBACK); - free(zipfilebuffer); - } - - if (nodetree == NULL) return false; - - nodedata = mxmlFindElement(nodetree, nodetree, "datafile", NULL, NULL, MXML_DESCEND); - if (nodedata == NULL) - { - return false; - } - else - { - //if (xmldebug) xmlloadtime = dbg_time2(NULL); - xml_loaded = true; - return true; - } -} - -char *GetLangSettingFromGame(char *gameid) -{ - int langcode; - GameCFG *game_cfg = GameSettings.GetGameCFG((u8*) gameid); - if (game_cfg) - { - langcode = game_cfg->language; - } - else - { - //langcode = CFG.language; // for Configurable Loader - langcode = Settings.language; // for Loader GX - } - char *langtxt = langlist[langcode]; - return langtxt; -} - -/* convert language text into ISO 639 two-letter language code (+ZHTW/ZHCN) */ -const char *ConvertLangTextToCode(char *languagetxt) -{ - // do not convert if languagetext seems to be a language code (can be 2 or 4 letters) - if (strlen(languagetxt) <= 4) return languagetxt; - int i; - for (i = 0; i <= 10; i++) - { - if (!strcasecmp(languagetxt, langlist[i])) // case insensitive comparison - return langcodes[i]; - } - return ""; -} - -char ConvertRatingToIndex(char *ratingtext) -{ - int type = -1; - if (!strcmp(ratingtext, "CERO")) - { - type = 0; - } - if (!strcmp(ratingtext, "ESRB")) - { - type = 1; - } - if (!strcmp(ratingtext, "PEGI")) - { - type = 2; - } - return type; -} - -int ConvertRating(const char *ratingvalue, const char *fromrating, const char *torating) -{ - if (!strcmp(fromrating, torating)) - { - int ret = atoi(ratingvalue); - if(ret < 7) - return 0; - else if(ret < 12) - return 1; - else if(ret < 16) - return 2; - else if(ret < 18) - return 3; - else - return 4; - } - - int type = -1; - int desttype = -1; - - type = ConvertRatingToIndex((char *) fromrating); - desttype = ConvertRatingToIndex((char *) torating); - if (type == -1 || desttype == -1) return -1; - - /* rating conversion table */ - /* the list is ordered to pick the most likely value first: */ - /* EC and AO are less likely to be used so they are moved down to only be picked up when converting ESRB to PEGI or CERO */ - /* the conversion can never be perfect because ratings can differ between regions for the same game */ - char ratingtable[12][3][5] = - { - { { "A" }, { "E" }, { "3" } }, - { { "A" }, { "E" }, { "4" } }, - { { "A" }, { "E" }, { "6" } }, - { { "A" }, { "E" }, { "7" } }, - { { "A" }, { "EC" }, { "3" } }, - { { "A" }, { "E10+" }, { "7" } }, - { { "B" }, { "T" }, { "12" } }, - { { "D" }, { "M" }, { "18" } }, - { { "D" }, { "M" }, { "16" } }, - { { "C" }, { "T" }, { "16" } }, - { { "C" }, { "T" }, { "15" } }, - { { "Z" }, { "AO" }, { "18" } }, - }; - - int i; - for (i = 0; i <= 11; i++) - { - if (!strcmp(ratingtable[i][type], ratingvalue)) - { - int ret = atoi(ratingtable[i][desttype]); - if(ret < 7) - return 0; - else if(ret < 12) - return 1; - else if(ret < 16) - return 2; - else if(ret < 18) - return 3; - else - return 4; - } - } - - return -1; -} - -void LoadTitlesFromXML(char *langtxt, bool forcejptoen) -/* langtxt: set to "English","French","German", to force language for all titles, or "" to load title depending on each game's setting */ -/* forcejptoen: set to true to load English title instead of Japanese title when game is set to Japanese */ -{ - if (nodedata == NULL) return; - - bool forcelang = false; - if (strcmp(langtxt, "")) forcelang = true; - - char langcode[10] = ""; - if (forcelang) strcpy(langcode, ConvertLangTextToCode(langtxt)); /* convert language text into ISO 639 two-letter language code */ - - /* create index of elements */ - nodeindex = mxmlIndexNew(nodedata, "id", NULL); - nodeid = mxmlIndexReset(nodeindex); - *element_text = 0; - char id_text[10]; - char title_text[200] = ""; - char title_text_EN[200] = ""; - - /* search index of id elements, load all id/titles text */ - while (nodeid != NULL) - { - nodeid = mxmlIndexFind(nodeindex, "id", NULL); - if (nodeid != NULL) - { - strcpy(title_text, ""); - strcpy(title_text_EN, ""); - - get_nodetext(nodeid, element_text, sizeof(element_text)); - snprintf(id_text, 7, "%s", element_text); - - // if language is not forced, use game language setting from config - if (!forcelang) - { - langtxt = GetLangSettingFromGame(id_text); - strcpy(langcode, ConvertLangTextToCode(langtxt)); - } - - /* if enabled, force English title for all games set to Japanese */ - if (forcejptoen && (strcmp(langcode, "JA")) == 0) strcpy(langcode, "EN"); - - /* load title from nodes */ - nodefound = mxmlFindElement(nodeid, nodedata, "locale", "lang", "EN", MXML_NO_DESCEND); - if (nodefound != NULL) - { - GetTextFromNode(nodefound, nodedata, "title", NULL, NULL, MXML_DESCEND, title_text_EN, - sizeof(title_text_EN)); - } - nodefound = mxmlFindElement(nodeid, nodedata, "locale", "lang", langcode, MXML_NO_DESCEND); - if (nodefound != NULL) - { - GetTextFromNode(nodefound, nodedata, "title", NULL, NULL, MXML_DESCEND, title_text, sizeof(title_text)); - } - - /* fall back to English title if prefered language was not found */ - if (!strcmp(title_text, "")) - { - strcpy(title_text, title_text_EN); - } - - snprintf(id_text, 7, "%s", id_text); - GameTitles.SetGameTitle(id_text, title_text); - } - } - - // free memory - mxmlIndexDelete(nodeindex); - - //if (xmldebug) xmlloadtime = dbg_time2(NULL); -} - -void GetPublisherFromGameid(char *idtxt, char *dest, int destsize) -{ - /* guess publisher from company list using last two characters from game id */ - nodeindextmp = mxmlIndexNew(nodedata, "company", NULL); - nodeidtmp = mxmlIndexReset(nodeindextmp); - - *element_text = 0; - char publishercode[3]; - sprintf(publishercode, "%c%c", idtxt[4], idtxt[5]); - - while (strcmp(element_text, publishercode) != 0) - { - nodeidtmp = mxmlIndexFind(nodeindextmp, "company", NULL); - if (nodeidtmp != NULL) - { - strlcpy(element_text, mxmlElementGetAttr(nodeidtmp, "code"), sizeof(element_text)); - } - else - { - break; - } - } - if (!strcmp(element_text, publishercode)) - { - strlcpy(dest, mxmlElementGetAttr(nodeidtmp, "name"), destsize); - } - else - { - strcpy(dest, ""); - } - - // free memory - mxmlIndexDelete(nodeindextmp); -} - -char *MemInfo() -{ - char linebuf[300] = ""; - char memtotal[20]; - char memused[20]; - char memnotinuse[20]; - char memcanbefreed[20]; - struct mallinfo mymallinfo = mallinfo(); - sprintf(memtotal, "%d", mymallinfo.arena / 1024); - sprintf(memused, "%d", mymallinfo.uordblks / 1024); - sprintf(memnotinuse, "%d", mymallinfo.fordblks / 1024); - sprintf(memcanbefreed, "%d", mymallinfo.keepcost / 1024); - snprintf(linebuf, sizeof(linebuf), "all:%sKB used:%sKB notused:%sKB canfree:%sKB", memtotal, memused, memnotinuse, - memcanbefreed); - char *minfo[300]; - *minfo = linebuf; - return *minfo; -} - -/*-------------------------------------------------------------------------------------*/ -/* get_nodetext() - Get the text for a node, taken from mini-mxml example mxmldoc.c */ -char * get_nodetext(mxml_node_t *node, char *buffer, int buflen) /* O - Text in node, I - Node to get, I - Buffer, I - Size of buffer */ -{ - char *ptr, *end; /* Pointer into buffer, End of buffer */ - int len; /* Length of node */ - mxml_node_t *current; /* Current node */ - ptr = buffer; - end = buffer + buflen - 1; - for (current = node->child; current && ptr < end; current = current->next) - { - if (current->type == MXML_TEXT) - { - if (current->value.text.whitespace) *ptr++ = ' '; - len = (int) strlen(current->value.text.string); - if (len > (int) (end - ptr)) len = (int) (end - ptr); - memcpy(ptr, current->value.text.string, len); - ptr += len; - } - else if (current->type == MXML_OPAQUE) - { - len = (int) strlen(current->value.opaque); - if (len > (int) (end - ptr)) len = (int) (end - ptr); - memcpy(ptr, current->value.opaque, len); - ptr += len; - } - } - *ptr = '\0'; - return (buffer); -} diff --git a/source/xml/xml.h b/source/xml/xml.h deleted file mode 100644 index cd40b089..00000000 --- a/source/xml/xml.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef _XML_H_ -#define _XML_H_ - -#include - -// open database, close database, load info for a game -bool OpenXMLDatabase(char* xmlfilepath, char* argdblang, bool argJPtoEN, bool openfile, bool loadtitles, bool keepopen); -void CloseXMLDatabase(); - -#define XML_ELEMMAX 15 - -bool OpenXMLFile(char* filename); -void LoadTitlesFromXML(char *langcode, bool forcejptoen); -void GetPublisherFromGameid(char *idtxt, char *dest, int destsize); -const char *ConvertLangTextToCode(char *langtext); -int ConvertRating(const char *ratingvalue, const char *fromrating, const char *torating); -char *MemInfo(); -void GetTextFromNode(mxml_node_t *currentnode, mxml_node_t *topnode, const char *nodename, const char *attributename, - char *value, int descend, char *dest, int destsize); -char * get_nodetext(mxml_node_t *node, char *buffer, int buflen); - -#endif - diff --git a/stripios/MakeIt.bat b/stripios/MakeIt.bat new file mode 100644 index 00000000..1c4c717e --- /dev/null +++ b/stripios/MakeIt.bat @@ -0,0 +1,4 @@ +path=%path%;C:\Dev-Cpp\bin +make + +pause diff --git a/stripios/Makefile b/stripios/Makefile new file mode 100644 index 00000000..bced68a6 --- /dev/null +++ b/stripios/Makefile @@ -0,0 +1,5 @@ +stripios.exe:main.cpp + g++ main.cpp -o stripios.exe +clean: + @echo "clean ..." + @rm -f stripios.exe \ No newline at end of file diff --git a/stripios/main.cpp b/stripios/main.cpp new file mode 100644 index 00000000..34426a25 --- /dev/null +++ b/stripios/main.cpp @@ -0,0 +1,371 @@ +/* + IOS ELF stripper, converts traditional ELF files into the format IOS wants. + Copyright (C) 2008 neimod. + Copyright (C) 2009-2010 Hermes + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include +#include +#include + +#define ELF_NIDENT 16 + +typedef struct +{ + unsigned long ident0; + unsigned long ident1; + unsigned long ident2; + unsigned long ident3; + unsigned long machinetype; + unsigned long version; + unsigned long entry; + unsigned long phoff; + unsigned long shoff; + unsigned long flags; + unsigned short ehsize; + unsigned short phentsize; + unsigned short phnum; + unsigned short shentsize; + unsigned short shnum; + unsigned short shtrndx; +} elfheader; + +typedef struct +{ + unsigned long type; + unsigned long offset; + unsigned long vaddr; + unsigned long paddr; + unsigned long filesz; + unsigned long memsz; + unsigned long flags; + unsigned long align; +} elfphentry; + +typedef struct +{ + unsigned long offset; + unsigned long size; +} offset_size_pair; + +unsigned short getbe16(void* pvoid) +{ + unsigned char* p = (unsigned char*)pvoid; + + return (p[0] << 8) | (p[1] << 0); +} + +unsigned long getbe32(void* pvoid) +{ + unsigned char* p = (unsigned char*)pvoid; + + return (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | (p[3] << 0); +} + +void putbe16(void* pvoid, unsigned short val) +{ + unsigned char* p = (unsigned char*)pvoid; + + p[0] = val >> 8; + p[1] = val >> 0; +} + +void putbe32(void* pvoid, unsigned long val) +{ + unsigned char* p = (unsigned char*)pvoid; + + p[0] = val >> 24; + p[1] = val >> 16; + p[2] = val >> 8; + p[3] = val >> 0; +} + +int main(int argc, char* argv[]) +{ + int result = 0; + +unsigned long strip=0; + + fprintf(stdout, "stripios - IOS ELF stripper - by neimod\n"); + if (argc < 3 || argc==4) + { + fprintf(stderr,"Usage: %s [strip addr]\n", argv[0]); + + return -1; + } + else + if(argc==5) + { + if(!strcmp(argv[3],"strip")) + { + sscanf( argv[4], "%x",&strip ); + + printf("strip: %x\n",strip); + } + else + { + fprintf(stderr,"Usage: %s [strip addr]\n", argv[0]); + + return -1; + } + } + + FILE* fin = fopen(argv[1], "rb"); + FILE* fout = fopen(argv[2], "wb"); + + if (fin == 0 || fout == 0) + { + if (fin == 0) + fprintf(stderr,"ERROR opening file %s\n", argv[1]); + if (fout == 0) + fprintf(stderr,"ERROR opening file %s\n", argv[2]); + return 1; + } + + elfheader header; + + if (fread(&header, sizeof(elfheader), 1, fin) != 1) + { + fprintf(stderr,"ERROR reading ELF header\n"); + return 1; + } + + unsigned long elfmagicword = getbe32(&header.ident0); + + if (elfmagicword != 0x7F454C46) + { + fprintf(stderr,"ERROR not a valid ELF\n"); + return 1; + } + + unsigned long phoff = getbe32(&header.phoff); + unsigned short phnum = getbe16(&header.phnum); + unsigned long memsz = 0, filesz = 0; + unsigned long vaddr = 0, paddr = 0; + + putbe32(&header.ident1, 0x01020161); + putbe32(&header.ident2, 0x01000000); + putbe32(&header.ident3, 0); + putbe32(&header.machinetype, 0x20028); + putbe32(&header.version, 1); + putbe32(&header.flags, 0x606); + putbe16(&header.ehsize, 0x34); + putbe16(&header.phentsize, 0x20); + putbe16(&header.shentsize, 0); + putbe16(&header.shnum, 0); + putbe16(&header.shtrndx, 0); + putbe32(&header.phoff, 0x34); + putbe32(&header.shoff, 0); + + putbe16(&header.phnum, phnum + 2); + + elfphentry* origentries = new elfphentry[phnum]; + + fseek(fin, phoff, SEEK_SET); + if (fread(origentries, sizeof(elfphentry), phnum, fin) != phnum) + { + fprintf(stderr,"ERROR reading program header\n"); + return 1; + } + + + elfphentry* iosphentry = 0; + + + // Find zero-address phentry + for(int i=0; ipaddr) == 0) + { + iosphentry = phentry; + } + } + + if (0 == iosphentry) + { + fprintf(stderr,"ERROR IOS table not found in program header\n"); + return 1; + } + + + elfphentry* entries = new elfphentry[phnum+2]; + offset_size_pair* offsetsizes = new offset_size_pair[phnum]; + + elfphentry* q = entries; + phoff = 0x34; + + for(int i=0; ioffset); + offsetsizes[i].size = getbe32(&p->filesz); + + if (p == iosphentry) + { + unsigned long startoffset = phoff; + unsigned long startvaddr = vaddr; + unsigned long startpaddr = paddr; + unsigned long totalsize = 0; + + filesz = memsz = (phnum+2) * 0x20; + + // PHDR + putbe32(&phentry.type, 6); + putbe32(&phentry.offset, phoff); + putbe32(&phentry.vaddr, paddr); + putbe32(&phentry.paddr, vaddr); + putbe32(&phentry.filesz, filesz); + putbe32(&phentry.memsz, memsz); + putbe32(&phentry.flags, 0x00F00000); + putbe32(&phentry.align, 0x4); + + *q++ = phentry; + + phoff += memsz; + paddr += memsz; + vaddr += memsz; + totalsize += memsz; + + filesz = memsz = getbe32(&p->memsz); + + + + // NOTE + putbe32(&phentry.type, 4); + putbe32(&phentry.offset, phoff); + putbe32(&phentry.vaddr, vaddr); + putbe32(&phentry.paddr, paddr); + putbe32(&phentry.filesz, filesz); + putbe32(&phentry.memsz, memsz); + putbe32(&phentry.flags, 0x00F00000); + putbe32(&phentry.align, 0x4); + + + + *q++ = phentry; + + phoff += memsz; + paddr += memsz; + vaddr += memsz; + totalsize += memsz; + + filesz = memsz = totalsize; + + // LOAD + putbe32(&phentry.type, 1); + putbe32(&phentry.offset, startoffset); + putbe32(&phentry.vaddr, startvaddr); + putbe32(&phentry.paddr, startpaddr); + putbe32(&phentry.filesz, totalsize); + putbe32(&phentry.memsz, totalsize); + putbe32(&phentry.flags, 0x00F00000); + putbe32(&phentry.align, 0x4000); + + *q++ = phentry; + } + else + { + + filesz = getbe32(&p->filesz); + memsz = getbe32(&p->memsz); + //printf("flags %x\n",getbe32(&p->flags)); + if(strip==getbe32(&p->vaddr) && strip!=0) // strip zeroes + { + filesz=1; + putbe32(&p->filesz,filesz); + } + + + putbe32(&phentry.type, getbe32(&p->type)); + putbe32(&phentry.offset, phoff); + putbe32(&phentry.vaddr, getbe32(&p->vaddr)); + putbe32(&phentry.paddr, getbe32(&p->paddr)); + putbe32(&phentry.filesz, filesz); + putbe32(&phentry.memsz, memsz); + putbe32(&phentry.flags, (getbe32(&p->flags) | 0xf00000)); + putbe32(&phentry.align, 0x4); + + *q++ = phentry; + + phoff += filesz; + } + } + + if (fwrite(&header, sizeof(elfheader), 1, fout) != 1) + { + fprintf(stderr,"ERROR writing ELF header\n"); + return 1; + } + + if (fwrite(entries, sizeof(elfphentry), phnum+2, fout) != (phnum+2)) + { + fprintf(stderr,"ERROR writing ELF program header\n"); + return 1; + } + + for(int i=0; ioffset); + unsigned long filesz = getbe32(&p->filesz); + + if (filesz) + { + fseek(fin, offset, SEEK_SET); + + fprintf(stdout,"Writing segment 0x%08X to 0x%08X (%d bytes) - %x %s\n", getbe32(&p->vaddr), ftell(fout), filesz,getbe32(&p->memsz), + (strip==getbe32(&p->vaddr) && strip!=0 )? "- Stripped" : ""); + + unsigned char* data = new unsigned char[filesz]; + + + if (fread(data, filesz, 1, fin) != 1 || fwrite(data, filesz, 1, fout) != 1) + { + fprintf(stderr,"ERROR writing segment\n"); + delete[] data; + return 1; + } + + delete[] data; + } + else + { + fprintf(stdout,"Skipping segment 0x%08X\n", getbe32(&p->vaddr)); + } + } + +cleanup: + if (offsetsizes) + delete[] offsetsizes; + if (entries) + delete[] entries; + if (origentries) + delete[] origentries; + if (fout) + fclose(fout); + + if (fin) + fclose(fin); + + return result; +} + diff --git a/stripios/stripios.exe b/stripios/stripios.exe new file mode 100644 index 00000000..d0a4b749 Binary files /dev/null and b/stripios/stripios.exe differ diff --git a/svnrev.sh b/svnrev.sh deleted file mode 100644 index 43596c97..00000000 --- a/svnrev.sh +++ /dev/null @@ -1,90 +0,0 @@ -#! /bin/bash -# -rev_new_raw=$(svnversion -n . 2>/dev/null | tr '\n' ' ' | tr -d '\r') -[ -n "$rev_new_raw" ] || rev_new_raw=$(SubWCRev . 2>/dev/null | tr '\n' ' ' | tr -d '\r') - - -rev_new_raw=$(echo $rev_new_raw | sed 's/[^0-9]*\([0-9]*\)\(.*\)/\1 \2/') -rev_new=0 -a=$(echo $rev_new_raw | sed 's/\([0-9]*\).*/\1/') -let "a+=0" -#find max rev -while [ "$a" ]; do - [ "$a" -gt "$rev_new" ] && rev_new=$a - rev_new_raw=$(echo -n $rev_new_raw | sed 's/[0-9]*[^0-9]*\([0-9]*\)\(.*\)/\1 \2/') - a=$(echo $rev_new_raw | sed 's/\([0-9]*\).*/\1/') -done - -rev_old=$(cat ./source/svnrev.c 2>/dev/null | tr -d '\n' | sed 's/[^0-9]*\([0-9]*\).*/\1/') - -if [ "$rev_new" != "$rev_old" ] || [ ! -f ./source/svnrev.c ]; then - - cat < ./source/svnrev.c -#define SVN_REV "$rev_new" - -const char *GetRev() -{ - return SVN_REV; -} -EOF - - if [ -n "$rev_new" ]; then - echo "Changed Rev $rev_old to $rev_new" >&2 - else - echo "svnrev.c created" >&2 - fi - echo >&2 - - rev_new=`expr $rev_new + 1` - rev_date=`date +%Y%m%d%H%M -u` - - cat < ./HBC/META.XML - - - USB Loader GX - USB Loader GX Team - 2.0 r$rev_new - $rev_date - - Loads games from USB-devices - 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. -Features are automatic widescreen detection, coverdownload, parental control, theme support and many more. - -Credits: -Coding: Dimok, nIxx, giantpune, ardi, Hungyip84, DrayX7, Lustar, r-win, WiiShizzza -Artworks: cyrex, NeoRame -WiiTDB / Hosting covers: Lustar -Hosting updates files: CorneliousJD -USBLoader sources: Waninkoko, Kwiirk, Hermes -Languages files updates: Kinyo and translaters -Hosting themes: Deak Phreak - -Libwiigui: Tantric -Libogc/Devkit: Shagkur and Wintermute -FreeTypeGX: Armin Tamzarian. - -Links: -USB Loader GX Project Page and Support Site: -http://code.google.com/p/usbloader-gui/ -Help Website: -http://usbloadergx.koureio.net/ -WiiTDB Site: -http://wiitdb.com -Themes Site: -http://wii.spiffy360.com -Languages Translaters Page: -http://gbatemp.net/index.php?showtopic=155252 - -Libwiigui Website: -http://wiibrew.org/wiki/Libwiigui/ -FreeTypeGX Project Page: -http://code.google.com/p/freetypegx/ -Gettext Official Page: -http://www.gnu.org/software/gettext/gettext.html - - -EOF - -fi -echo $a diff --git a/tinyehci/Makefile b/tinyehci/Makefile new file mode 100644 index 00000000..13dd59b1 --- /dev/null +++ b/tinyehci/Makefile @@ -0,0 +1,6 @@ +clean: + find . -name \*~ -exec rm -f {} \; + find . -type l -exec rm -f {} \; + make -C linux clean + make -C base clean + rm linux/modules.order diff --git a/tinyehci/ehci-mem.c b/tinyehci/ehci-mem.c new file mode 100644 index 00000000..6d7bb83f --- /dev/null +++ b/tinyehci/ehci-mem.c @@ -0,0 +1,82 @@ +/* + * Original Copyright (c) 2001 by David Brownell + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/* this file is part of ehci.c */ + + +static inline void ehci_qtd_init(struct ehci_qtd *qtd + ) +{ + dma_addr_t dma = ehci_virt_to_dma(qtd); + memset (qtd, 0, sizeof *qtd); + qtd->qtd_dma = dma; + qtd->hw_token = (QTD_STS_HALT); + qtd->hw_next = EHCI_LIST_END(); + qtd->hw_alt_next = EHCI_LIST_END(); +} + +int qtd_alt_mem=0; // double buffer qtd + +static inline struct ehci_qtd * ehci_qtd_alloc(void) +{ + struct ehci_qtd *qtd ; + //debug_printf("ehci_qtd used=%x\n",ehci->qtd_used); + if(ehci->qtd_used>=(EHCI_MAX_QTD)) return NULL; + //qtd = ehci->qtds[ehci->qtd_used++]; + qtd = (void *) (((char *) ehci->qtds[0])+(ehci->qtd_used+EHCI_MAX_QTD*qtd_alt_mem)*((sizeof(struct ehci_qtd)+31) & ~31)); + ehci->qtd_used++; + ehci_qtd_init(qtd); + return qtd; +} + + + + + +int ehci_mem_init (void) +{ + int i; +#if 1 + ehci->periodic = ehci_maligned(DEFAULT_I_TDPS * sizeof(__le32),32,4096); + ehci->periodic_dma = ehci_virt_to_dma(ehci->periodic); + + for (i = 0; i < DEFAULT_I_TDPS; i++) + ehci->periodic [i] = EHCI_LIST_END(); + ehci_writel(ehci->periodic_dma, &ehci->regs->frame_list); +#else + debug_printf("ehci periodic:%x\n",ehci_readl(ehci, &ehci->regs->frame_list)); + debug_printf("ehci *periodic:%x\n",*(u32*)ehci_readl(ehci, &ehci->regs->frame_list)); +#endif + for(i=0;iqtds[i] = ehci_maligned(sizeof(struct ehci_qtd),(i==0) ? 4096 : 32,4096); + ehci->qtd_used = 0; + + ehci->async = ehci_maligned(sizeof(struct ehci_qh),/*32*/4096,4096); + ehci->async->ehci = ehci; + ehci->async->qh_dma = ehci_virt_to_dma(ehci->async); + ehci->async->qtd_head = NULL; + + ehci->asyncqh = ehci_maligned(sizeof(struct ehci_qh),32,4096); + ehci->asyncqh->ehci = ehci; + ehci->asyncqh->qh_dma = ehci_virt_to_dma(ehci->asyncqh); + ehci->asyncqh->qtd_head = NULL; + + + + return 0; +} diff --git a/tinyehci/ehci.c b/tinyehci/ehci.c new file mode 100644 index 00000000..caddc158 --- /dev/null +++ b/tinyehci/ehci.c @@ -0,0 +1,1697 @@ +/* simplest usb-ehci driver which features: + + control and bulk transfers only + only one transfer pending + driver is synchronous (waiting for the end of the transfer) + endianess independant + no uncached memory allocation needed + + this driver is originally based on the GPL linux ehci-hcd driver + + * Original Copyright (c) 2001 by David Brownell + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +extern char use_usb_port1; + +/* magic numbers that can affect system performance */ +#define EHCI_TUNE_CERR 0 /* 0-3 qtd retries; 0 == don't stop */ /* by Hermes: i have replaced 3 by 0 and now it dont hang when i extract the device*/ +#define EHCI_TUNE_RL_HS 4 //4 /* nak throttle; see 4.9 */ +#define EHCI_TUNE_RL_TT 0 +#define EHCI_TUNE_MULT_HS 1 /* 1-3 transactions/uframe; 4.10.3 */ +#define EHCI_TUNE_MULT_TT 1 +#define EHCI_TUNE_FLS 2 /* (small) 256 frame schedule */ + +void s_printf(char *format,...); +//#define s_printf(a...) +bool enable_urb_debug=false; + +int ehci_release_port(int); +void ehci_close_devices(void); + + +extern int verbose; +#ifdef DEBUG +static int num_command_before_no_verbose = 100; +#endif +static void +dbg_qtd (const char *label, struct ehci_qtd *qtd) +{ + ehci_dbg( "%s td %p n%08x %08x t%08x p0=%08x\n", label, qtd, + hc32_to_cpup( &qtd->hw_next), + hc32_to_cpup( &qtd->hw_alt_next), + hc32_to_cpup( &qtd->hw_token), + hc32_to_cpup( &qtd->hw_buf [0])); + if (qtd->hw_buf [1]) + ehci_dbg( " p1=%08x p2=%08x p3=%08x p4=%08x\n", + hc32_to_cpup( &qtd->hw_buf[1]), + hc32_to_cpup( &qtd->hw_buf[2]), + hc32_to_cpup( &qtd->hw_buf[3]), + hc32_to_cpup( &qtd->hw_buf[4])); +} + +static void +dbg_qh (const char *label, struct ehci_qh *qh) +{ + ehci_dbg ( "%s qh %p n%08x info %x %x qtd %x\n", label, + qh, + hc32_to_cpu(qh->hw_next), + hc32_to_cpu(qh->hw_info1), + hc32_to_cpu(qh->hw_info2), + hc32_to_cpu(qh->hw_current)); + dbg_qtd ("overlay", (struct ehci_qtd *) &qh->hw_qtd_next); +} + +static void +dbg_command (void) +{ +#ifdef DEBUG + u32 command=ehci_readl( &ehci->regs->command); + u32 async=ehci_readl( &ehci->regs->async_next); + + ehci_dbg ("async_next: %08x\n",async); + ehci_dbg ( + "command %06x %s=%d ithresh=%d%s%s%s%s %s %s\n", + command, + (command & CMD_PARK) ? "park" : "(park)", + CMD_PARK_CNT (command), + (command >> 16) & 0x3f, + (command & CMD_LRESET) ? " LReset" : "", + (command & CMD_IAAD) ? " IAAD" : "", + (command & CMD_ASE) ? " Async" : "", + (command & CMD_PSE) ? " Periodic" : "", + (command & CMD_RESET) ? " Reset" : "", + (command & CMD_RUN) ? "RUN" : "HALT" + ); +#endif +} +static void +dbg_status (void) +{ +#ifdef DEBUG + u32 status=ehci_readl( &ehci->regs->status); + ehci_dbg ( + "status %04x%s%s%s%s%s%s%s%s%s%s\n", + status, + (status & STS_ASS) ? " Async" : "", + (status & STS_PSS) ? " Periodic" : "", + (status & STS_RECL) ? " Recl" : "", + (status & STS_HALT) ? " Halt" : "", + (status & STS_IAA) ? " IAA" : "", + (status & STS_FATAL) ? " FATAL" : "", + (status & STS_FLR) ? " FLR" : "", + (status & STS_PCD) ? " PCD" : "", + (status & STS_ERR) ? " ERR" : "", + (status & STS_INT) ? " INT" : "" + ); +#endif +} + +void debug_qtds(void) +{ + struct ehci_qh *qh = ehci->async; + struct ehci_qtd *qtd; + dbg_qh ("qh",qh); + dbg_command (); + dbg_status (); + for(qtd = qh->qtd_head; qtd; qtd = qtd->next) + { + ehci_dma_unmap_bidir(qtd->qtd_dma,sizeof(struct ehci_qtd)); + dbg_qtd("qtd",qtd); + ehci_dma_map_bidir(qtd,sizeof(struct ehci_qtd)); + } + +} +void dump_qh(struct ehci_qh *qh) +{ + struct ehci_qtd *qtd; + dbg_command (); + dbg_status (); + ehci_dma_unmap_bidir(qh->qh_dma,sizeof(struct ehci_qh)); + dbg_qh("qh",qh); + print_hex_dump_bytes("qh:",DUMP_PREFIX_OFFSET,(void*)qh,12*4); + for(qtd = qh->qtd_head; qtd; qtd = qtd->next){ + u32 *buf; + ehci_dma_unmap_bidir(qtd->qtd_dma,sizeof(struct ehci_qtd)); + dbg_qtd("qtd",qtd); + print_hex_dump_bytes("qtd:",DUMP_PREFIX_OFFSET,(void*)qtd,8*4); + buf = (u32*)hc32_to_cpu(qtd->hw_buf[0]); + if(buf) + print_hex_dump_bytes("qtd buf:",DUMP_PREFIX_OFFSET,(void*)(buf),8*4); + + } +} + +/*-------------------------------------------------------------------------*/ + +/* + * handshake - spin reading hc until handshake completes or fails + * @ptr: address of hc register to be read + * @mask: bits to look at in result of read + * @done: value of those bits when handshake succeeds + * @usec: timeout in microseconds + * + * Returns negative errno, or zero on success + * + * Success happens when the "mask" bits have the specified value (hardware + * handshake done). There are two failure modes: "usec" have passed (major + * hardware flakeout), or the register reads as all-ones (hardware removed). + * + * That last failure should_only happen in cases like physical cardbus eject + * before driver shutdown. But it also seems to be caused by bugs in cardbus + * bridge shutdown: shutting down the bridge before the devices using it. + */ + +int unplug_device=0; + +#define INTR_MASK (STS_IAA | STS_FATAL | STS_PCD | STS_ERR | STS_INT) + +void ehci_clear_flags_interrupt(void) +{ + + +ehci_writel(INTR_MASK, &ehci->regs->status); + +} + + +#define get_timer() (*(((volatile u32*)0x0D800010))) + +void ehci_mdelay(int msec); + + +void ehci_udelay(u32); + +static int handshake(void __iomem * null, void __iomem *ptr, + u32 mask, u32 done, int usec) +{ + u32 result; + + u32 tmr,diff=0; + + + + tmr = get_timer(); + usec<<=1; + + + do { + ehci_usleep(10); + + result = ehci_readl( ptr); + + result &= mask; + + + if (result == done) return 0; + + + diff=get_timer(); + diff-=tmr; + + if(((int)diff)<0) + { + // error en diferencial: teoricamente imposible, pero... + tmr=get_timer(); + } + } while (diff < usec/*usec > 0*/); + + +return -ETIMEDOUT; +} + +static struct ehci_qh cached_qh __attribute__ ((aligned (32))); +static struct ehci_qh temp_qh __attribute__ ((aligned (32))); + +#include "ehci-mem.c" + +/* one-time init, only for memory state */ +static int ehci_init(void) +{ +// int retval; +/* if ((retval = ehci_mem_init()) < 0) + return retval;*/ +static void *my_buff=0; + +if(!my_buff) my_buff=ehci->ctrl_buffer; + /* + * dedicate a qh for the async ring head, since we couldn't unlink + * a 'real' qh without stopping the async schedule [4.8]. use it + * as the 'reclamation list head' too. + * its dummy is used in hw_alt_next of many tds, to prevent the qh + * from automatically advancing to the next td after short reads. + */ + ehci->async->hw_next = QH_NEXT( ehci->async->qh_dma); + ehci->async->hw_info1 = cpu_to_hc32( QH_HEAD); + ehci->async->hw_token = cpu_to_hc32( QTD_STS_HALT); + ehci->async->hw_qtd_next = EHCI_LIST_END(); + ehci->async->hw_alt_next = EHCI_LIST_END();//QTD_NEXT( ehci->async->dummy->qtd_dma); + ehci->ctrl_buffer = my_buff; //USB_Alloc(sizeof(usbctrlrequest)); + ehci->command = 0; + + ehci_writel( 0x000000000, &ehci->regs->command); + ehci_writel( 0, &ehci->regs->configured_flag); + ehci_writel( ehci->periodic_dma, &ehci->regs->frame_list); + ehci_writel( ehci->async->qh_dma, &ehci->regs->async_next); + ehci_writel( 0x00010001, &ehci->regs->command); + ehci_writel( 1, &ehci->regs->configured_flag); + ehci_writel( 0x00010021, &ehci->regs->command); + + + return 0; +} + +/* fill a qtd, returning how much of the buffer we were able to queue up */ +static int +qtd_fill(struct ehci_qtd *qtd, dma_addr_t buf, + size_t len, int token, int maxpacket) +{ + int i, count; + u64 addr = buf; + //ehci_dbg("fill qtd with dma %X len %X\n",buf,len); + /* one buffer entry per 4K ... first might be short or unaligned */ + qtd->hw_buf[0] = cpu_to_hc32( (u32)addr); + qtd->hw_buf_hi[0] = 0; + count = 0x1000 - (buf & 0x0fff); /* rest of that page */ + if (likely (len < count)) /* ... iff needed */ + count = len; + else { + buf += 0x1000; + buf &= ~0x0fff; + + /* per-qtd limit: from 16K to 20K (best alignment) */ + for (i = 1; count < len && i < 5; i++) { + addr = buf; + qtd->hw_buf[i] = cpu_to_hc32( (u32)addr); + qtd->hw_buf_hi[i] = cpu_to_hc32( + (u32)(addr >> 32)); + buf += 0x1000; + if ((count + 0x1000) < len) + count += 0x1000; + else + count = len; + } + + /* short packets may only terminate transfers */ + if (count != len) + count -= (count % maxpacket); + + } + qtd->hw_token = cpu_to_hc32( (count << 16) | token); + qtd->length = count; + +// aadido por mi + qtd->hw_next=EHCI_LIST_END(); + qtd->hw_alt_next=EHCI_LIST_END(); + + return count; +} + +// high bandwidth multiplier, as encoded in highspeed endpoint descriptors +#define hb_mult(wMaxPacketSize) (1 + (((wMaxPacketSize) >> 11) & 0x03)) +// ... and packet size, for any kind of endpoint descriptor +#define max_packet(wMaxPacketSize) ((wMaxPacketSize) & 0x07ff) + +/* + * reverse of qh_urb_transaction: free a list of TDs. + * also count the actual transfer length. + * + */ + +static int qh_end_transfer ( struct ehci_qtd *qtd_head) +{ + struct ehci_qtd *qtd; + u32 token; + int error = 0; + for(qtd = qtd_head; qtd; qtd = qtd->next){ + token = hc32_to_cpu( qtd->hw_token); + + + if (likely (QTD_PID (token) != 2)) + qtd->urb->actual_length += qtd->length - QTD_LENGTH (token); + + if (/*!(qtd->length ==0 && ((token & 0xff)==QTD_STS_HALT)) &&*/ + qtd->length !=0 && (token & QTD_STS_HALT)) { + ehci_dbg("\nqtd error!:"); + if(enable_urb_debug)s_printf("\nqtd error!:"); + if (token & QTD_STS_BABBLE) { + ehci_dbg(" BABBLE"); + if(enable_urb_debug)s_printf(" BABBLE"); + } + if (token & QTD_STS_MMF) { + /* fs/ls interrupt xfer missed the complete-split */ + ehci_dbg(" missed micro frame"); + if(enable_urb_debug)s_printf(" missed micro frame"); + } + if (token & QTD_STS_DBE) { + ehci_dbg(" databuffer error"); + if(enable_urb_debug)s_printf(" databuffer error"); + } + if (token & QTD_STS_XACT) { + ehci_dbg(" wrong ack"); + if(enable_urb_debug)s_printf(" wrong ack"); + } + if (QTD_CERR (token)==0) + ehci_dbg(" too many errors"); + if(enable_urb_debug)s_printf(" too many errors"); + ehci_dbg("\n"); + if(enable_urb_debug)s_printf("\n"); + error = -1; + break; + } + + + } + + if(error){ + + qtd->urb->actual_length = error; + } + + ehci->qtd_used = 0; +return error; +} + +/* + * create a list of filled qtds for this URB; won't link into qh. + */ + +struct ehci_qtd *qh_urb_transaction ( + struct ehci_urb *urb +) { + struct ehci_qtd *qtd, *qtd_prev; + struct ehci_qtd *head; + dma_addr_t buf; + int len, maxpacket; + int is_input; + u32 token; + + /* + * URBs map to sequences of QTDs: one logical transaction + */ + + //create_qtd_dummy(); + + head = qtd = qtd_prev= ehci_qtd_alloc (); + + + if(!head) return NULL; + + qtd->urb = urb; + + urb->actual_length = 0; + token = QTD_STS_ACTIVE; + token |= (EHCI_TUNE_CERR << 10); + /* for split transactions, SplitXState initialized to zero */ + + + len = urb->transfer_buffer_length; + is_input = urb->input; + if (urb->ep==0) {/* is control */ + /* SETUP pid */ + qtd_fill( qtd, urb->setup_dma, + sizeof (usbctrlrequest), + token | (2 /* "setup" */ << 8), 8); + + /* ... and always at least one more pid */ + token ^= QTD_TOGGLE; + qtd_prev = qtd; + qtd = ehci_qtd_alloc (); + if(!qtd) goto cleanup; + qtd->urb = urb; + qtd_prev->hw_next = QTD_NEXT( qtd->qtd_dma); + qtd_prev->next = qtd; + + /* for zero length DATA stages, STATUS is always IN */ + if (len == 0) + token |= (1 /* "in" */ << 8); + } + + /* + * data transfer stage: buffer setup + */ + buf = urb->transfer_dma; + + if (is_input) + token |= (1 /* "in" */ << 8); + /* else it's already initted to "out" pid (0 << 8) */ + + maxpacket = max_packet(urb->maxpacket); + + + /* + * buffer gets wrapped in one or more qtds; + * last one may be "short" (including zero len) + * and may serve as a control status ack + */ + for (;;) { + int this_qtd_len; + + this_qtd_len = qtd_fill( qtd, buf, len, token, maxpacket); + len -= this_qtd_len; + buf += this_qtd_len; + + /* + * short reads advance to a "magic" dummy instead of the next + * qtd ... that forces the queue to stop, for manual cleanup. + * (this will usually be overridden later.) + */ + if (is_input) + qtd->hw_alt_next =EHCI_LIST_END();// QTD_NEXT(get_qtd_dummy()); + + /* qh makes control packets use qtd toggle; maybe switch it */ + if ((maxpacket & (this_qtd_len + (maxpacket - 1))) == 0) + token ^= QTD_TOGGLE; + + if (likely (len <= 0)) + break; + + qtd_prev = qtd; + qtd = ehci_qtd_alloc (); + if(!qtd) goto cleanup; + qtd->urb = urb; + qtd_prev->hw_next = QTD_NEXT( qtd->qtd_dma); + qtd_prev->next = qtd; + } + + /* unless the bulk/interrupt caller wants a chance to clean + * up after short reads, hc should advance qh past this urb + */ + + qtd->hw_alt_next =EHCI_LIST_END(); + + /* + * control requests may need a terminating data "status" ack; + * bulk ones may need a terminating short packet (zero length). + */ + + if (likely (urb->transfer_buffer_length != 0)) { + int one_more = 0; + + if (urb->ep==0) { + one_more = 1; + token ^= 0x0100; /* "in" <--> "out" */ + token |= QTD_TOGGLE; /* force DATA1 */ + } + else if(!(urb->transfer_buffer_length % maxpacket) && !is_input) { + //one_more = 1; + } + if (one_more) { + qtd_prev = qtd; + qtd = ehci_qtd_alloc (); + if(!qtd) goto cleanup; + qtd->urb = urb; + + qtd_prev->hw_next = QTD_NEXT( qtd->qtd_dma); + + qtd_prev->next = qtd; + + /* never any data in such packets */ + qtd_fill( qtd, 0, 0, token, 0); + } + } + + /* by default, enable interrupt on urb completion */ + + qtd->hw_token |= cpu_to_hc32( QTD_IOC); + // qtd->hw_alt_next =QTD_NEXT(get_qtd_dummy()); + + return head; + +cleanup: + return NULL; +} + +u32 usb_timeout=1000*1000; + +int mode_int=0; + + +u32 current_port=0; + +struct ehci_qh *in_qh=NULL; // bulk in +struct ehci_qh *out_qh=NULL; // bulk out +struct ehci_qh *dummy_qh=NULL; // next qh (dummy) + +extern struct ehci_qh * qh_pointer[64]; + + +void read_cache_data(char *in, int len); + + + +void inline ehci_stop(void) +{ +u32 temp; + +temp=ehci_readl( &ehci->regs->command); + while(temp & CMD_ASE) + { + temp&= ~CMD_ASE; + ehci_writel(temp, &ehci->regs->command); + ehci_usleep(10); + temp=ehci_readl( &ehci->regs->command); + + } + //while(temp & CMD_ASE); +} + + + +void inline ehci_run(void) +{ +u32 temp; +temp=ehci_readl( &ehci->regs->command); + + while(!(temp & CMD_ASE)) + { + temp|= CMD_ASE; + ehci_writel(temp, &ehci->regs->command); + ehci_usleep(10); + temp=ehci_readl( &ehci->regs->command); + } + //while(!(temp & CMD_ASE)); +} + + +int ehci_wait(u32 mode, struct ehci_qh *qh) +{ +u32 temp; +u32 time_count=0; + + if(mode==0) + { + + while(1) + { + + temp=ehci_readl(&ehci->regs->async_next); + + if((temp>= (u32) qh_pointer[4]->qh_dma && temp<= (u32) qh_pointer[5]->qh_dma)) + {ehci_stop();break;} + ehci_usleep(10);time_count++;if(time_count>=5000) break; + } + } + else + if(mode==1) + { + while(ehci_readl(&ehci->regs->async_next)==qh->qh_dma) + {ehci_usleep(10);time_count++;if(time_count>=5000) break;} + } + +return 0; +} + + +// WARNING!: this routine works in Interrupt Mode +// off_callback_hand when you disables ehcmodule access + +void off_callback_hand(u32 flags) +{ +int n; +u32 temp; + + if(flags & STS_PCD) + { + + for(n=0;n<2;n++) + { + temp=ehci_readl(&ehci->regs->port_status[n]); + + + if((temp & 0x2003)==3) // on + { + ehci_writel(PORT_OWNER /*| PORT_CSC*/, &ehci->regs->port_status[n]); + } + } + } +} + +// WARNING!: this routine works in Interrupt Mode +// passive_callback is used when EHCI driver is waiting to transfer datas + +void passive_callback_hand(u32 flags) +{ +int n; +u32 temp; + + if(flags & STS_PCD) + { + + for(n=0;n<4;n++) + { + temp=ehci_readl(&ehci->regs->port_status[n]); + + if(n==current_port) + { + if((temp & 1)!=1) // off + { + unplug_device=2; +// *((volatile u32 *)0x0d8000c0) &=~0x20; // LED OFF (you can do it in Interrupt mode) + + } + //if(temp & 2) ehci_writel(0x1001 | PORT_CSC, &ehci->regs->port_status[n]); + } + else + if((temp & 0x2003)==3) // on + { + if(n!=current_port) {ehci_writel(PORT_OWNER /*| PORT_CSC*/, &ehci->regs->port_status[n]);} + } + } + } +} + +// WARNING!: this routine works in Interrupt Mode + +// interrupt_callback is used when EHCI driver is working +void direct_os_sync_before_read(void* ptr, int size); +void direct_os_sync_after_write(void* ptr, int size); + +//static struct ehci_qh int_temp_qh __attribute__ ((aligned (32))); + +struct ehci_qtd * int_qtd=NULL; +struct ehci_qh *int_qh=NULL; + +u32 int_toggles=0; + +static int interrupt_callback_hand(u32 flags) +{ +int n; +int ret=-9; // do nothing +u32 temp; + + if(flags & STS_INT) + { + struct ehci_qtd * qtd; + ret=0; // done + + if(enable_urb_debug)s_printf("interrupt_callback_hand STS_INT\n"); + + if(int_qtd) + { + for(qtd=int_qtd; qtd; qtd = qtd->next) + { + direct_os_sync_before_read((void *) qtd->qtd_dma,sizeof(struct ehci_qtd)); + read_cache_data((void *) qtd->qtd_dma,sizeof(struct ehci_qtd)); + } + } + if(int_qh) + { + direct_os_sync_before_read((void *) int_qh->qh_dma, 32); + read_cache_data((void *) int_qh->qh_dma, 32); + + int_qh->hw_qtd_next = /*get_qtd_dummy();*/EHCI_LIST_END(); + int_qh->hw_alt_next = get_qtd_dummy();//EHCI_LIST_END(); + + direct_os_sync_after_write((void *) int_qh->qh_dma, 32); + + + int_toggles=int_qh->hw_token; + } + if(qh_end_transfer(int_qtd)!=0) + { + ehci->qtd_used = 0; + ret=-EBADDATA; + + } + #if 0 + ehci_stop(); + direct_os_sync_before_read(ehci->async, 32); + read_cache_data((void *)ehci->async, 32); + ehci->async->hw_next = QH_NEXT(dummy_qh->qh_dma); + //ehci->async->hw_next = QH_NEXT(dummy_qh->qh_dma/* ehci->async->qh_dma*/); + direct_os_sync_after_write(ehci->async, 32); + ehci_run(); + #endif + + } + + if(flags & STS_PCD) + { + ret=1; + if(enable_urb_debug)s_printf("interrupt_callback_hand STS_PCD\n"); + for(n=0;n<4;n++) + { + temp=ehci_readl(&ehci->regs->port_status[n]); + if(n==current_port) + { + if((temp & 1)!=1) // off + { + + + unplug_device=1; +// *((volatile u32 *)0x0d8000c0) &=~0x20; // LED OFF (you can do it in Interrupt mode) + ret=-ENODEV; + + } + //if(temp & 2) ehci_writel(0x1001 | PORT_CSC, &ehci->regs->port_status[n]); + } + else + if((temp & 0x2003)==3) // on + { + if(n!=current_port) {ehci_writel(PORT_OWNER /*| PORT_CSC*/, &ehci->regs->port_status[n]);} + } + } + } + + if(ret!=0) + if(flags & (STS_FATAL | STS_ERR)) ret=-ETRANSERR; + +return ret; +} + +/* + +struct ehci_qtd * update_qtd(struct ehci_urb *urb, void *null) +{ +struct ehci_qtd * qtd, *ret; + + qtd= ret=qh_urb_transaction ( urb); + + for(; qtd; qtd = qtd->next) + direct_os_sync_after_write(qtd,sizeof(struct ehci_qtd)); + +return ret; +} +*/ + +extern int qtd_alt_mem; + int ehci_do_urb ( + struct ehci_device *dev, + struct ehci_urb *urb) + { + struct ehci_qh *qh; + struct ehci_qtd *qtd; + u32 info1 = 0, info2 = 0; + int is_input; + int maxp = 0; + int retval; + + + + + //swi_mload_call_func((void *) ehci_wait, (void *) 0, (void *) 0); + //disable_OHCI1_IRQ(); + ehci_wait( 0, (void *) 0); + //enable_OHCI1_IRQ(); + + + + + if(urb->ep==0) //control message + { + unplug_device=0; + urb->setup_dma = ehci_dma_map_to(urb->setup_buffer,sizeof (usbctrlrequest)); + } + + if(urb->transfer_buffer_length){ + if(urb->input) + urb->transfer_dma = ehci_dma_map_to(urb->transfer_buffer,urb->transfer_buffer_length); + else + urb->transfer_dma = ehci_dma_map_from(urb->transfer_buffer,urb->transfer_buffer_length); + } + + if(urb->ep==0) + qh = ehci->asyncqh; + else if(urb->input!=0) + qh = in_qh; + else + qh = out_qh; + + + int_qh=qh; + //ehci_dma_unmap_bidir(qh->qh_dma,sizeof(struct ehci_qh)); + swi_mload_memcpy_from_uncached(&cached_qh, qh, 96/*sizeof(struct ehci_qh)*/); + + //ehci_dma_unmap_bidir(qh->qh_dma,32/*sizeof(struct ehci_qh)*/); + + memset(qh,0,12*4); + //disable_OHCI1_IRQ(); + ehci->qtd_used = 0;qtd_alt_mem^=1; + qtd =qh_urb_transaction ( urb); + //qtd=(void *) swi_mload_call_func ((void *) update_qtd, (void *) urb, NULL); + cached_qh.qtd_head = int_qtd=qtd; + + + + + info1 |= ((urb->ep)&0xf)<<8; + info1 |= dev->id; + is_input = urb->input; + maxp = urb->maxpacket; + + info1 |= (2 << 12); /* EPS "high" */ + if(urb->ep==0)// control + { + info1 |= (EHCI_TUNE_RL_HS << 28); + info1 |= 64 << 16; /* usb2 fixed maxpacket */ + info1 |= 1 << 14; /* toggle from qtd */ + info2 |= (EHCI_TUNE_MULT_HS << 30) ; + }else//bulk + { + info1 |= (EHCI_TUNE_RL_HS << 28); + /* The USB spec says that high speed bulk endpoints + * always use 512 byte maxpacket. But some device + * vendors decided to ignore that, and MSFT is happy + * to help them do so. So now people expect to use + * such nonconformant devices with Linux too; sigh. + */ + info1 |= max_packet(maxp) << 16; + info2 |= (EHCI_TUNE_MULT_HS << 30); + + } + //ehci_dbg("HW info: %08X\n",info1); + cached_qh.hw_info1 = cpu_to_hc32( info1); + cached_qh.hw_info2 = cpu_to_hc32( info2); + + + cached_qh.hw_next =QH_NEXT(dummy_qh->qh_dma); + cached_qh.hw_qtd_next = QTD_NEXT( qtd->qtd_dma); + cached_qh.hw_alt_next =EHCI_LIST_END();// QTD_NEXT(get_qtd_dummy());// + + + if(urb->ep!=0){ + if(get_toggle(dev,urb->ep)) + cached_qh.hw_token |= cpu_to_hc32(QTD_TOGGLE); + else + cached_qh.hw_token &= ~cpu_to_hc32( QTD_TOGGLE); + + //ehci_dbg("toggle for ep %x: %d %x\n",urb->ep,get_toggle(dev,urb->ep),qh->hw_token); + } + + cached_qh.hw_token &= cpu_to_hc32( QTD_TOGGLE | QTD_STS_PING); + + #if 1 + + ehci_dma_map_bidir(&cached_qh,sizeof(struct ehci_qh)); + for(qtd = cached_qh.qtd_head; qtd; qtd = qtd->next) + ehci_dma_map_bidir(qtd,sizeof(struct ehci_qtd)); + + + + //enable_OHCI1_IRQ(); + #endif +// ehci->async->hw_next = QH_NEXT(cached_qh.qh_dma); +// ehci_dma_map_bidir((void *) ehci->async, 32); + + + swi_mload_memcpy(qh, &cached_qh, 96); + + if(enable_urb_debug) s_printf("ehci_int_working_callback_part1, timeout: %u\n",usb_timeout); + mode_int=1; + int cnt=0; + do{ + cnt++; + ehci_int_working_callback_part1(interrupt_callback_hand, usb_timeout); + + + // start (link qh) + + //disable_OHCI1_IRQ(); + ehci_dma_unmap_bidir((dma_addr_t) ehci->async, 32); + ehci->async->hw_next = QH_NEXT(cached_qh.qh_dma); + ehci_dma_map_bidir((void *) ehci->async, 32); + //enable_OHCI1_IRQ(); + + + ehci_run(); + + + + + retval=ehci_int_working_callback_part2(); + if(cnt>3) break; + if(retval==-9) s_printf("retry\n"); + }while(retval==-9); + mode_int=0; + if(enable_urb_debug) s_printf("urb retval: %i\n",retval); + if(retval!=0 || unplug_device!=0) + { + if((ehci_readl(&ehci->regs->port_status[current_port]) & 5) !=5) unplug_device=1; + //retval=-ETIMEDOUT; + } + + + + if(retval==0 || retval==-EBADDATA) + { + + ehci_stop(); + os_sync_before_read(ehci->async, 32); + read_cache_data((void *)ehci->async, 32); + ehci->async->hw_next = QH_NEXT(dummy_qh->qh_dma); + //ehci->async->hw_next = QH_NEXT(dummy_qh->qh_dma/* ehci->async->qh_dma*/); + os_sync_after_write(ehci->async, 32); + ehci_run(); + + if(urb->ep!=0) + { + set_toggle(dev,urb->ep,(int_toggles /*qh->hw_token*/ & cpu_to_hc32(QTD_TOGGLE))?1:0); + } + /* + if(qh_end_transfer(cached_qh.qtd_head)!=0) + { + ehci->qtd_used = 0; + retval=-EBADDATA; + + }*/ + + } + else + { + ehci_stop(); + for(qtd = cached_qh.qtd_head; qtd; qtd = qtd->next) + { + ehci_dma_unmap_bidir(qtd->qtd_dma,sizeof(struct ehci_qtd)); + } + + swi_mload_memcpy_from_uncached(&cached_qh, qh, 32); + + if(urb->ep!=0) + { + set_toggle(dev,urb->ep,(cached_qh.hw_token & cpu_to_hc32(QTD_TOGGLE))?1:0); + } + + os_sync_before_read(ehci->async, 32); + read_cache_data((void *)ehci->async, 32); + ehci->async->hw_next = QH_NEXT(dummy_qh->qh_dma); + + os_sync_after_write(ehci->async, 32); + + ehci_run(); + //swi_mload_call_func((void *) ehci_wait, (void *) 1, &cached_qh); + //ehci_wait( 1, (void *) &cached_qh); + + } + + ehci_wait( 1, (void *) &cached_qh); + + + + + if(urb->transfer_buffer_length){ + if(urb->input) + ehci_dma_unmap_to(urb->transfer_dma,urb->transfer_buffer_length); + else + ehci_dma_unmap_from(urb->transfer_dma,urb->transfer_buffer_length); + } + if(urb->ep==0) //control message + ehci_dma_unmap_to(urb->setup_dma,sizeof (usbctrlrequest)); + if(retval==0){ + + return urb->actual_length; + } + + return retval; + } + +s32 ehci_control_message(struct ehci_device *dev,u8 bmRequestType,u8 bmRequest,u16 wValue,u16 wIndex,u16 wLength,void *buf) +{ + struct ehci_urb urb; + usbctrlrequest *req = ehci->ctrl_buffer; + if(verbose) + ehci_dbg ( "control msg: rt%02X r%02X v%04X i%04X s%04x %p\n", bmRequestType, bmRequest, wValue, wIndex,wLength,buf); + req->bRequestType = bmRequestType; + req->bRequest = bmRequest; + req->wValue = swab16(wValue); + req->wIndex = swab16(wIndex); + req->wLength = swab16(wLength); + urb.setup_buffer = req; + urb.ep = 0; + urb.input = (bmRequestType&USB_CTRLTYPE_DIR_DEVICE2HOST)!=0; + urb.maxpacket = 64; + urb.transfer_buffer_length = wLength; + if (((u32)buf) > 0x13880000){// HW cannot access this buffer, we allow this for convenience + int ret; + urb.transfer_buffer = USB_Alloc(wLength); + if (verbose) + ehci_dbg("alloc another buffer %p %p\n",buf,urb.transfer_buffer); + memcpy(urb.transfer_buffer,buf,wLength); + ret = ehci_do_urb(dev,&urb); + memcpy(buf,urb.transfer_buffer,wLength); + USB_Free(urb.transfer_buffer); + return ret; + } + else{ + urb.transfer_buffer = buf; + return ehci_do_urb(dev,&urb); + } +} +s32 ehci_bulk_message(struct ehci_device *dev,u8 bEndpoint,u32 wLength,void *rpData) +{ + struct ehci_urb urb; + s32 ret; + urb.setup_buffer = NULL; + urb.ep = bEndpoint; + urb.input = (bEndpoint&0x80)!=0; + urb.maxpacket = 512; + urb.transfer_buffer_length = wLength; + urb.transfer_buffer = rpData; + if(verbose) + ehci_dbg ( "bulk msg: ep:%02X size:%02X addr:%04X", bEndpoint, wLength, rpData); + ret= ehci_do_urb(dev,&urb); + if(verbose) + ehci_dbg ( "==>%d\n", ret); + return ret; +} + + + +int ehci_reset_port_old(int port) +{ + u32 __iomem *status_reg = &ehci->regs->port_status[port]; + struct ehci_device *dev = &ehci->devices[port]; + u32 status ;//= ehci_readl(status_reg); + int retval = 0,i; + u32 g_status; + dev->id = 0; + + g_status=ehci_readl(&ehci->regs->status); + + + + // clear status flags + + //ehci_writel( g_status & INTR_MASK,&ehci->regs->status); + //g_status=ehci_readl (&ehci->regs->command); + + status = ehci_readl(status_reg); + + if ((PORT_OWNER&status) || !(PORT_CONNECT&status)) + { + // ehci_writel( PORT_OWNER,status_reg); + ehci_dbg ( "port %d had no usb2 device connected at startup %X \n", port,ehci_readl(status_reg)); + return -ENODEV;// no USB2 device connected + } + ehci_dbg ( "port %d has usb2 device connected! reset it...\n", port); + + + for(i=0;i<4;i++) //4 retries + { + u32 status; + ehci_writel( 0x1803,status_reg); + ehci_msleep(10); + ehci_writel( 0x1903,status_reg); + ehci_msleep(100);// wait 100ms for the reset sequence + ehci_writel( 0x1001,status_reg); + retval = handshake(status_reg, status_reg, + PORT_RESET, 0, 2*1000); + + /* + for(n=0;n<10;n++) + { + ehci_msleep(50); + status = ehci_readl(status_reg); + if((status & PORT_PE) || (status & 1)==0) break; + }*/ + status = ehci_readl(status_reg); + if ((PORT_OWNER&status) || !(PORT_CONNECT&status) || !(status & PORT_PE) || PORT_USB11(status)) + { + retval=-1; + continue; + } + //ehci_writel( PORT_OWNER|PORT_POWER|PORT_RESET,status_reg); + + + //ehci_writel( ehci_readl(status_reg)& (~PORT_RESET),status_reg); + + + if (retval == 0) + { + int old_time; + /* ehci_dbg ( "port %d reset error %d\n", + port, retval);*/ + + ehci_dbg ( "port %d reseted status:%04x...\n", port,ehci_readl(status_reg)); + ehci_msleep(100); + + old_time=usb_timeout; + usb_timeout=400*1000; + // now the device has the default device id + retval = ehci_control_message(dev,USB_CTRLTYPE_DIR_DEVICE2HOST, + USB_REQ_GETDESCRIPTOR,USB_DT_DEVICE<<8,0,sizeof(dev->desc),&dev->desc); + + if (retval >= 0) + { + + + retval = ehci_control_message(dev,USB_CTRLTYPE_DIR_HOST2DEVICE, + USB_REQ_SETADDRESS,port+1,0,0,0); + + } + usb_timeout=old_time; + if(retval>=0) break; + } + } + + + if (retval < 0) { + + return retval; + } + + dev->toggles = 0; + + dev->id = port+1; + // ehci_dbg ( "device %d: %X %X...\n", dev->id,le16_to_cpu(dev->desc.idVendor),le16_to_cpu(dev->desc.idProduct)); + return retval; +} + +#if 1 +void ehci_adquire_port(int port) +{ + u32 __iomem *status_reg = &ehci->regs->port_status[port]; + u32 status = ehci_readl(status_reg); + + //change owner, port disabled + if(!(status & PORT_OWNER)) + status ^= PORT_OWNER; + status &= ~(PORT_PE | PORT_RWC_BITS); + ehci_writel(status, status_reg); + ehci_mdelay(5); + status = ehci_readl(status_reg); + if(status & PORT_OWNER) + status ^= PORT_OWNER; + status &= ~(PORT_PE | PORT_RWC_BITS); + ehci_writel(status, status_reg); + ehci_mdelay(5); + + + //enable port + ehci_writel( 0x1801,status_reg); + ehci_mdelay(5); +} +int ehci_reset_usb_port(int port) +{ + u32 __iomem *status_reg = &ehci->regs->port_status[port]; + u32 status = ehci_readl(status_reg); + + int i, retval = 0; + + if ((PORT_OWNER&status) || !(PORT_CONNECT&status)) + { + if(PORT_OWNER&status) + { + ehci_adquire_port(port); + } + // ehci_writel( PORT_OWNER,status_reg); + return -ENODEV;// no USB2 device connected + } + + + for(i=0;i<4;i++) //4 retries + { + status &= ~PORT_PE; + status |= PORT_RESET | PORT_POWER; + ehci_writel( status,status_reg); + ehci_msleep(60);// wait 60ms for the reset sequence + status=ehci_readl(status_reg); + status &= ~(PORT_RWC_BITS | PORT_RESET); /* force reset to complete */ + ehci_writel( status,status_reg); + ehci_msleep(50); + + retval = handshake(status_reg, status_reg, + PORT_RESET, 0, 5*1000); + + if (retval != 0) { + status=ehci_readl(status_reg); + + return -2000; + } + status=ehci_readl(status_reg); + if (status & PORT_PE) break; //port enabled + } + + if (!(status & PORT_PE)) { + // that means is low speed device so release + status |= PORT_OWNER; + status &= ~PORT_RWC_BITS; + ehci_writel( status, status_reg); + ehci_writel( PORT_OWNER, status_reg); + ehci_msleep(10); + //status = ehci_readl(status_reg); + return -1119; + } + return retval; +} + + +int ehci_init_port(int port) +{ + struct ehci_device *dev = &ehci->devices[port]; + int retval = 0; + dev->id = 0; + int i; + ehci_msleep(50); + for(i=0;i<3;i++) + { + + + s_printf("getting USB_REQ_GETDESCRIPTOR\n");ehci_msleep(50); + // sdlog("getting USB_REQ_GETDESCRIPTOR\n"); + // now the device has the default device id + retval = ehci_control_message(dev,USB_CTRLTYPE_DIR_DEVICE2HOST, + USB_REQ_GETDESCRIPTOR,USB_DT_DEVICE<<8,0,sizeof(dev->desc),&dev->desc); + //retval=-1; + if (retval < 0) { + s_printf("unable to get device desc...\n");ehci_msleep(50); + // sdlog("error getting USB_REQ_GETDESCRIPTOR\n"); + //ehci_dbg ( "unable to get device desc...\n"); + retval=-2201; + ehci_msleep(100); + //return retval; + } + else + { + if(dev->desc.idProduct==0x2077 && dev->desc.idVendor==0x950b) + { + /* + u32 __iomem *status_reg = &ehci->regs->port_status[port]; + u32 status=ehci_readl(status_reg); + //s_printf("usblan detected 0, release\n"); + status |= PORT_OWNER; + status &= ~PORT_RWC_BITS; + ehci_writel( status, status_reg); + */ + ehci_release_port( port); + return -1120; + } + break; + } + } + if (retval < 0) + { + for(i=0;i<3;i++) + { + + if(ehci_reset_usb_port(port)==-1119) return -1119; + ehci_msleep(100); + //my_sprint("getting USB_REQ_GETDESCRIPTOR",NULL);ehci_msleep(50); + s_printf("getting USB_REQ_GETDESCRIPTOR - reset\n"); + // now the device has the default device id + retval = ehci_control_message(dev,USB_CTRLTYPE_DIR_DEVICE2HOST, + USB_REQ_GETDESCRIPTOR,USB_DT_DEVICE<<8,0,sizeof(dev->desc),&dev->desc); + if (retval < 0) { + //my_sprint("unable to get device desc...",NULL);ehci_msleep(50); + s_printf("error getting USB_REQ_GETDESCRIPTOR\n"); + //ehci_dbg ( "unable to get device desc...\n"); + retval=-2201; + + //return retval; + } + else + { + if(dev->desc.idProduct==0x2077 && dev->desc.idVendor==0x950b) + { + /*u32 __iomem *status_reg = &ehci->regs->port_status[port]; + u32 status=ehci_readl(status_reg); + //s_printf("usblan detected 0, release\n"); + status |= PORT_OWNER; + status &= ~PORT_RWC_BITS; + ehci_writel( status, status_reg);*/ + ehci_release_port( port); + return -1120; + } + break; + } + } + } + + if (retval < 0) + { + for(i=0;i<3;i++) + { + ehci_adquire_port(port); + ehci_msleep(100); + if(ehci_reset_usb_port(port)==-1119) return -1119; + ehci_msleep(100); + //my_sprint("getting USB_REQ_GETDESCRIPTOR",NULL);ehci_msleep(50); + s_printf("getting USB_REQ_GETDESCRIPTOR - adquire - reset\n"); + // now the device has the default device id + retval = ehci_control_message(dev,USB_CTRLTYPE_DIR_DEVICE2HOST, + USB_REQ_GETDESCRIPTOR,USB_DT_DEVICE<<8,0,sizeof(dev->desc),&dev->desc); + if (retval < 0) { + //my_sprint("unable to get device desc...",NULL);ehci_msleep(50); + s_printf("error getting USB_REQ_GETDESCRIPTOR\n"); + //ehci_dbg ( "unable to get device desc...\n"); + retval=-2201; + + //return retval; + } + else break; + } + } + + if (retval < 0) return -2201; + + s_printf("USB_REQ_GETDESCRIPTOR ok\n"); + + int cnt=0; + do{ + ehci_msleep(50); + s_printf("trying USB_REQ_SETADDRESS: %d\n",cnt); + retval = ehci_control_message(dev,USB_CTRLTYPE_DIR_HOST2DEVICE, + USB_REQ_SETADDRESS,port+1,0,0,0); + if (retval < 0) { + //my_sprint("unable to set device addr...",NULL); + ehci_dbg ( "unable to set device addr...\n"); + retval=-8000-cnt; + s_printf("unable to set device addr: %d\n",cnt); + //return retval; + cnt++; + } + + else s_printf("USB_REQ_SETADDRESS ok: %d\n",cnt); + + dev->toggles = 0; + + dev->id = port+1; + + if(retval>=0) break; + + USB_ClearHalt(dev, 0); + //USB_ClearHalt(dev, 0x80); + ehci_msleep(50); + s_printf("checking USB_REQ_GETDESCRIPTOR\n"); + retval = ehci_control_message(dev,USB_CTRLTYPE_DIR_DEVICE2HOST, + USB_REQ_GETDESCRIPTOR,USB_DT_DEVICE<<8,0,sizeof(dev->desc),&dev->desc); + + + if (retval < 0) { + //my_sprint("unable to get device desc...",NULL); + ehci_dbg ( "unable to get device desc...\n"); + s_printf("error checking USB_REQ_GETDESCRIPTOR\n"); + retval=-2242; + dev->id =0; + //return retval; + } + + else s_printf("ok checking USB_REQ_GETDESCRIPTOR\n"); + cnt++; + }while(retval<0 && cnt<5); + + if(retval>=0)s_printf("init ok\n"); + return retval; +} + +#endif +int ehci_reset_port(int port) +{ + int retval; + //retval=ehci_reset_port_old(port); + + ehci_writel (STS_INT, &ehci->regs->intr_enable); + + retval=ehci_reset_usb_port(port); + if(retval>=0)retval=ehci_init_port(port); + //if(retval<0) ehci_release_port(port); + + ehci_writel (STS_PCD, &ehci->regs->intr_enable); + + return retval; +} + +int ehci_reset_port2(int port) +{ +u32 __iomem *status_reg = &ehci->regs->port_status[port]; +//int n; +u32 g_mstatus; +u32 command; + +ehci_writel (STS_INT, &ehci->regs->intr_enable); + +int ret=ehci_reset_port_old(port); +if(ret<0/*==-ENODEV || ret==-ETIMEDOUT*/) + { + + + g_mstatus=ehci_readl(&ehci->regs->status) & INTR_MASK; + ehci_writel (g_mstatus, &ehci->regs->status); + + + command=ehci_readl( &ehci->regs->command); + + + ehci_msleep(10); // power off + ehci_writel( 0x1803,status_reg); + ehci_msleep(50); + ehci_writel( 0x1903,status_reg); + ehci_msleep(100); + ehci_writel( 0x1001,status_reg); + /* + for(n=0;n<10;n++) + { + u32 status; + ehci_msleep(50); + status = ehci_readl(status_reg); + if((status & PORT_PE) || (status & 1)==0) break; + } + */ + + } + +g_mstatus=ehci_readl(&ehci->regs->status) & INTR_MASK; +ehci_writel (g_mstatus, &ehci->regs->status); +ehci_writel (STS_PCD, &ehci->regs->intr_enable); +command=ehci_readl( &ehci->regs->command); + +return ret; +} + +int ehci_reset_device(struct ehci_device *dev) +{ + return ehci_reset_port(dev->port); +} +#include "usbstorage.h" + +int ehci_adquire_usb_port(int port) +{ + u32 __iomem *status_reg = &ehci->regs->port_status[port]; + u32 status = ehci_readl(status_reg); + + //if(!(PORT_CONNECT&status)) return -1; //port not connected + + //change owner, port disabled + if(!(status & PORT_OWNER)) + status ^= PORT_OWNER; + status &= ~(PORT_PE | PORT_RWC_BITS); + ehci_writel(status, status_reg); + ehci_mdelay(5); + status = ehci_readl(status_reg); + if(status & PORT_OWNER) + status ^= PORT_OWNER; + status &= ~(PORT_PE | PORT_RWC_BITS); + ehci_writel(status, status_reg); + ehci_mdelay(5); + + + //enable port + ehci_writel( 0x1801,status_reg); + ehci_mdelay(60); + return 1; +} + +int ehci_discover(void) +{ + int i,ret,from,to; + u32 status; + ret=-1; + return 0; + + //current_port=use_usb_port1!=0; + current_port=from=to=0; + //if(use_usb_port1==0)from=to=0; + if(use_usb_port1==1)from=to=1; + else if(use_usb_port1==2) + { + from=0; + to=1; + } + + // precondition: the ehci should be halted + + for(i = from;i<=to; i++) + { + + struct ehci_device *dev = &ehci->devices[i]; + dev->port = i; + + status = ehci_readl(&ehci->regs->port_status[i]); + if(!(status & 1)) + ehci_adquire_usb_port(i); + + status = ehci_readl(&ehci->regs->port_status[i]); + + + if(status & 1) + { + ret=ehci_reset_port2(i); + ehci_msleep(20); + status=ehci_readl(&ehci->regs->port_status[i]); + + if(ret<0 || (status & 0x3905)!=0x1005) + ret=ehci_reset_port(i); + + if(ret==-1) ret= -101; + } + + } + return ret; +} +int ehci_release_port(int port) +{ + u32 __iomem *status_reg = &ehci->regs->port_status[port]; +// u32 status = ehci_readl(status_reg); + ehci_writel( PORT_OWNER,status_reg); + return 0; +} + +/* wii: quickly release non ehci or not connected ports, + as we can't kick OHCI drivers laters if we discover a device for them. +*/ +int ehci_release_ports(void) +{ + int i; + u32 __iomem *status_reg ; + for(i = 0;i<2; i++){ + status_reg = &ehci->regs->port_status[i]; + ehci_writel( PORT_OWNER,status_reg); // release port. + } + return 0; +} + +#if 0 +int ehci_release_ports(void) +{ + int i; + u32 __iomem *status_reg = &ehci->regs->port_status[2]; + while(ehci_readl(&ehci->regs->port_status[2]) == 0x1000) ehci_usleep(100);// wait port 2 to init + ehci_msleep(100);// wait another msec.. + for(i = 0;inum_port; i++){ + status_reg = &ehci->regs->port_status[i]; + u32 status = ehci_readl(status_reg); + if (i==2 || !(PORT_CONNECT&status) || PORT_USB11(status)) + ehci_writel( PORT_OWNER,status_reg); // release port. + } + return 0; +} +#endif +int ehci_release_externals_usb_ports(void) +{ + int i; + u32 __iomem *status_reg = &ehci->regs->port_status[2]; + + for(i = 0;i<2; i++){ + status_reg = &ehci->regs->port_status[i]; + u32 status = ehci_readl(status_reg); + if(!(status & PORT_OWNER)) ehci_writel( PORT_OWNER,status_reg); // release port. + } + return 0; +} + +int ehci_open_device(int vid,int pid,int fd) +{ + int i; + // for(i=0;inum_port;i++) + // { + + i=use_usb_port1!=0; + + //ehci_dbg("try device: %d\n",i); + if(ehci->devices[i].fd == 0 && + le16_to_cpu(ehci->devices[i].desc.idVendor) == vid && + le16_to_cpu(ehci->devices[i].desc.idProduct) == pid) + { + //ehci_dbg("found device: %x %x\n",vid,pid); + ehci->devices[i].fd = fd; + return fd; + } + //} + return -6; +} +int ehci_close_device(struct ehci_device *dev) +{ + if (dev) + dev->fd = -1; + return 0; +} + +void ehci_close_devices() +{ + struct ehci_device *dev = + dev = &ehci->devices[0]; + dev->id=0; + dev->fd=-1; + dev = &ehci->devices[1]; + dev->id=0; + dev->fd=-1; + +} + + void * ehci_fd_to_dev(int fd) +{ + int i; + // for(i=0;inum_port;i++) + current_port=use_usb_port1!=0; + + i=use_usb_port1!=0; + + + { + + struct ehci_device *dev = &ehci->devices[i]; + + return dev; // return always device[0] + + #if 0 + //ehci_dbg ( "device %d:fd:%d %X %X...\n", dev->id,dev->fd,le16_to_cpu(dev->desc.idVendor),le16_to_cpu(dev->desc.idProduct)); + if(dev->fd == fd){ + return dev; + + } + #endif + } + ehci_dbg("unknown fd! %d\n",fd); + return 0; +} +#define g_ehci #error +int ehci_get_device_list(u8 maxdev,u8 b0,u8*num,u16*buf) +{ + int i,j = 0; + // for(i=0;inum_port && jdevices[i]; + if(dev->id != 0){ + //ehci_dbg ( "device %d: %X %X...\n", dev->id,le16_to_cpu(dev->desc.idVendor),le16_to_cpu(dev->desc.idProduct)); + buf[j*4] = 0; + buf[j*4+1] = 0; + buf[j*4+2] = le16_to_cpu(dev->desc.idVendor); + buf[j*4+3] = le16_to_cpu(dev->desc.idProduct); + j++; + } + } + //ehci_dbg("found %d devices\n",j); + *num = j; + return 0; +} + + + +#include "usb.c" +#include "usbstorage.c" diff --git a/tinyehci/ehci.h b/tinyehci/ehci.h new file mode 100644 index 00000000..27412da0 --- /dev/null +++ b/tinyehci/ehci.h @@ -0,0 +1,288 @@ +/* + * Copyright (c) 2009 Kwiirk + * Original Copyright (c) 2001-2002 by David Brownell + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef __LINUX_EHCI_HCD_H +#define __LINUX_EHCI_HCD_H +/* definitions used for the EHCI driver */ + +/* + * __hc32 and __hc16 are "Host Controller" types, they may be equivalent to + * __leXX (normally) or __beXX (given EHCI_BIG_ENDIAN_DESC), depending on + * the host controller implementation. + * + * To facilitate the strongest possible byte-order checking from "sparse" + * and so on, we use __leXX unless that's not practical. + */ +#ifdef CONFIG_USB_EHCI_BIG_ENDIAN_DESC +typedef __u32 __bitwise __hc32; +typedef __u16 __bitwise __hc16; +#else +#define __hc32 __le32 +#define __hc16 __le16 +#endif + + +#define EHCI_MAX_ROOT_PORTS 4 /* see HCS_N_PORTS */ +#define EHCI_MAX_QTD 8 +#include "usb.h" + +struct ehci_device{ + usb_devdesc desc; + int id; + int port; + int fd; + u32 toggles; +}; +#define ep_bit(ep) (((ep)&0xf)+(((ep)>>7)?16:0)) +#define get_toggle(dev,ep) (((dev)->toggles>>ep_bit(ep))&1) +#define set_toggle(dev,ep,v) (dev)->toggles = ((dev)->toggles &(~(1<>16) & 0x7fff) +#define QTD_IOC (1 << 15) /* interrupt on complete */ +#define QTD_CERR(tok) (((tok)>>10) & 0x3) +#define QTD_PID(tok) (((tok)>>8) & 0x3) +#define QTD_STS_ACTIVE (1 << 7) /* HC may execute this */ +#define QTD_STS_HALT (1 << 6) /* halted on error */ +#define QTD_STS_DBE (1 << 5) /* data buffer error (in HC) */ +#define QTD_STS_BABBLE (1 << 4) /* device was babbling (qtd halted) */ +#define QTD_STS_XACT (1 << 3) /* device gave illegal response */ +#define QTD_STS_MMF (1 << 2) /* incomplete split transaction */ +#define QTD_STS_STS (1 << 1) /* split transaction state */ +#define QTD_STS_PING (1 << 0) /* issue PING? */ + +#define ACTIVE_BIT(ehci) cpu_to_hc32( QTD_STS_ACTIVE) +#define HALT_BIT(ehci) cpu_to_hc32( QTD_STS_HALT) +#define STATUS_BIT(ehci) cpu_to_hc32( QTD_STS_STS) + + __hc32 hw_buf [5]; /* see EHCI 3.5.4 */ + __hc32 hw_buf_hi [5]; /* Appendix B */ + + /* the rest is HCD-private */ + dma_addr_t qtd_dma; /* qtd address */ + struct ehci_qtd *next; /* sw qtd list */ + struct ehci_urb *urb; /* qtd's urb */ + size_t length; /* length of buffer */ +} __attribute__ ((aligned (32))); + +/* mask NakCnt+T in qh->hw_alt_next */ +#define QTD_MASK(ehci) cpu_to_hc32 ( ~0x1f) + +#define IS_SHORT_READ(token) (QTD_LENGTH (token) != 0 && QTD_PID (token) == 1) + +/*-------------------------------------------------------------------------*/ + +/* type tag from {qh,itd,sitd,fstn}->hw_next */ +#define Q_NEXT_TYPE(dma) ((dma) & cpu_to_hc32( 3 << 1)) + +/* + * Now the following defines are not converted using the + * __constant_cpu_to_le32() macro anymore, since we have to support + * "dynamic" switching between be and le support, so that the driver + * can be used on one system with SoC EHCI controller using big-endian + * descriptors as well as a normal little-endian PCI EHCI controller. + */ +/* values for that type tag */ +#define Q_TYPE_ITD (0 << 1) +#define Q_TYPE_QH (1 << 1) +#define Q_TYPE_SITD (2 << 1) +#define Q_TYPE_FSTN (3 << 1) + +/* next async queue entry, or pointer to interrupt/periodic QH */ +#define QH_NEXT(dma) (cpu_to_hc32( (((u32)dma)&~0x01f)|Q_TYPE_QH)) + +/* for periodic/async schedules and qtd lists, mark end of list */ +#define EHCI_LIST_END() cpu_to_hc32( 1) /* "null pointer" to hw */ + +/* + * Entries in periodic shadow table are pointers to one of four kinds + * of data structure. That's dictated by the hardware; a type tag is + * encoded in the low bits of the hardware's periodic schedule. Use + * Q_NEXT_TYPE to get the tag. + * + * For entries in the async schedule, the type tag always says "qh". + */ +union ehci_shadow { + struct ehci_qh *qh; /* Q_TYPE_QH */ + struct ehci_itd *itd; /* Q_TYPE_ITD */ + struct ehci_sitd *sitd; /* Q_TYPE_SITD */ + struct ehci_fstn *fstn; /* Q_TYPE_FSTN */ + __hc32 *hw_next; /* (all types) */ + void *ptr; +}; + +/*-------------------------------------------------------------------------*/ + +/* + * EHCI Specification 0.95 Section 3.6 + * QH: describes control/bulk/interrupt endpoints + * See Fig 3-7 "Queue Head Structure Layout". + * + * These appear in both the async and (for interrupt) periodic schedules. + */ + +struct ehci_qh { + /* first part defined by EHCI spec */ + __hc32 hw_next; /* see EHCI 3.6.1 */ + __hc32 hw_info1; /* see EHCI 3.6.2 */ +#define QH_HEAD 0x00008000 + __hc32 hw_info2; /* see EHCI 3.6.2 */ +#define QH_SMASK 0x000000ff +#define QH_CMASK 0x0000ff00 +#define QH_HUBADDR 0x007f0000 +#define QH_HUBPORT 0x3f800000 +#define QH_MULT 0xc0000000 + __hc32 hw_current; /* qtd list - see EHCI 3.6.4 */ + + /* qtd overlay (hardware parts of a struct ehci_qtd) */ + __hc32 hw_qtd_next; + __hc32 hw_alt_next; + __hc32 hw_token; + __hc32 hw_buf [5]; + __hc32 hw_buf_hi [5]; + + /* the rest is HCD-private */ + dma_addr_t qh_dma; /* address of qh */ + struct ehci_qtd *qtd_head; /* sw qtd list */ + + struct ehci_hcd *ehci; + +#define NO_FRAME ((unsigned short)~0) /* pick new start */ +} __attribute__ ((aligned (32))); + +/*-------------------------------------------------------------------------*/ + + + +/*-------------------------------------------------------------------------*/ + +/* cpu to ehci */ +#define cpu_to_hc32(b) cpu_to_le32(b) +#define hc32_to_cpu(b) le32_to_cpu(b) +#define hc32_to_cpup(b) le32_to_cpu(*(b)) + +/*-------------------------------------------------------------------------*/ + +/* os specific functions */ +void*ehci_maligned(int size,int alignement,int crossing); +dma_addr_t ehci_virt_to_dma(void *); +dma_addr_t ehci_dma_map_to(void *buf,size_t len); +dma_addr_t ehci_dma_map_from(void *buf,size_t len); +dma_addr_t ehci_dma_map_bidir(void *buf,size_t len); +void ehci_dma_unmap_to(dma_addr_t buf,size_t len); +void ehci_dma_unmap_from(dma_addr_t buf,size_t len); +void ehci_dma_unmap_bidir(dma_addr_t buf,size_t len); + +inline dma_addr_t get_qtd_dummy(void); + +void create_qtd_dummy(void); + +/* extern API */ + +s32 ehci_control_message(struct ehci_device *dev,u8 bmRequestType,u8 bmRequest,u16 wValue,u16 wIndex,u16 wLength,void *buf); +s32 ehci_bulk_message(struct ehci_device *dev,u8 bEndpoint,u32 wLength,void *rpData); +int ehci_discover(void); +int ehci_get_device_list(u8 maxdev,u8 b0,u8*num,u16*buf); + +int ehci_reset_port2(int port); + +extern struct ehci_hcd *ehci; /* @todo put ehci as a static global and remove ehci from APIs.. */ +extern int ehci_open_device(int vid,int pid,int fd); +extern int ehci_close_device(struct ehci_device *dev); +extern void * ehci_fd_to_dev(int fd); +extern int ehci_release_ports(void); + +/* UMS API */ + +s32 USBStorage_Init(void); +u32 USBStorage_Get_Capacity(u32*sector_size); +s32 USBStorage_Read_Sectors(u32 sector, u32 numSectors, void *buffer); +s32 USBStorage_Read_Stress(u32 sector, u32 numSectors, void *buffer); +s32 USBStorage_Write_Sectors(u32 sector, u32 numSectors, const void *buffer); + +#ifndef DEBUG +#define STUB_DEBUG_FILES +#endif /* DEBUG */ + +#include "swi_mload.h" + +/*-------------------------------------------------------------------------*/ + +#endif /* __LINUX_EHCI_HCD_H */ diff --git a/tinyehci/ehci_defs.h b/tinyehci/ehci_defs.h new file mode 100644 index 00000000..5b88e36c --- /dev/null +++ b/tinyehci/ehci_defs.h @@ -0,0 +1,160 @@ +/* + * Copyright (c) 2001-2002 by David Brownell + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef __LINUX_USB_EHCI_DEF_H +#define __LINUX_USB_EHCI_DEF_H + +/* EHCI register interface, corresponds to EHCI Revision 0.95 specification */ + +/* Section 2.2 Host Controller Capability Registers */ +struct ehci_caps { + /* these fields are specified as 8 and 16 bit registers, + * but some hosts can't perform 8 or 16 bit PCI accesses. + */ + u32 hc_capbase; +#define HC_LENGTH(p) (((p)>>00)&0x00ff) /* bits 7:0 */ +#define HC_VERSION(p) (((p)>>16)&0xffff) /* bits 31:16 */ + u32 hcs_params; /* HCSPARAMS - offset 0x4 */ +#define HCS_DEBUG_PORT(p) (((p)>>20)&0xf) /* bits 23:20, debug port? */ +#define HCS_INDICATOR(p) ((p)&(1 << 16)) /* true: has port indicators */ +#define HCS_N_CC(p) (((p)>>12)&0xf) /* bits 15:12, #companion HCs */ +#define HCS_N_PCC(p) (((p)>>8)&0xf) /* bits 11:8, ports per CC */ +#define HCS_PORTROUTED(p) ((p)&(1 << 7)) /* true: port routing */ +#define HCS_PPC(p) ((p)&(1 << 4)) /* true: port power control */ +#define HCS_N_PORTS(p) (((p)>>0)&0xf) /* bits 3:0, ports on HC */ + + u32 hcc_params; /* HCCPARAMS - offset 0x8 */ +#define HCC_EXT_CAPS(p) (((p)>>8)&0xff) /* for pci extended caps */ +#define HCC_ISOC_CACHE(p) ((p)&(1 << 7)) /* true: can cache isoc frame */ +#define HCC_ISOC_THRES(p) (((p)>>4)&0x7) /* bits 6:4, uframes cached */ +#define HCC_CANPARK(p) ((p)&(1 << 2)) /* true: can park on async qh */ +#define HCC_PGM_FRAMELISTLEN(p) ((p)&(1 << 1)) /* true: periodic_size changes*/ +#define HCC_64BIT_ADDR(p) ((p)&(1)) /* true: can use 64-bit addr */ + u8 portroute [8]; /* nibbles for routing - offset 0xC */ +} __attribute__ ((packed)); + + +/* Section 2.3 Host Controller Operational Registers */ +struct ehci_regs { + + /* USBCMD: offset 0x00 */ + u32 command; +/* 23:16 is r/w intr rate, in microframes; default "8" == 1/msec */ +#define CMD_PARK (1<<11) /* enable "park" on async qh */ +#define CMD_PARK_CNT(c) (((c)>>8)&3) /* how many transfers to park for */ +#define CMD_LRESET (1<<7) /* partial reset (no ports, etc) */ +#define CMD_IAAD (1<<6) /* "doorbell" interrupt async advance */ +#define CMD_ASE (1<<5) /* async schedule enable */ +#define CMD_PSE (1<<4) /* periodic schedule enable */ +/* 3:2 is periodic frame list size */ +#define CMD_RESET (1<<1) /* reset HC not bus */ +#define CMD_RUN (1<<0) /* start/stop HC */ + + /* USBSTS: offset 0x04 */ + u32 status; +#define STS_ASS (1<<15) /* Async Schedule Status */ +#define STS_PSS (1<<14) /* Periodic Schedule Status */ +#define STS_RECL (1<<13) /* Reclamation */ +#define STS_HALT (1<<12) /* Not running (any reason) */ +/* some bits reserved */ + /* these STS_* flags are also intr_enable bits (USBINTR) */ +#define STS_IAA (1<<5) /* Interrupted on async advance */ +#define STS_FATAL (1<<4) /* such as some PCI access errors */ +#define STS_FLR (1<<3) /* frame list rolled over */ +#define STS_PCD (1<<2) /* port change detect */ +#define STS_ERR (1<<1) /* "error" completion (overflow, ...) */ +#define STS_INT (1<<0) /* "normal" completion (short, ...) */ + + /* USBINTR: offset 0x08 */ + u32 intr_enable; + + /* FRINDEX: offset 0x0C */ + u32 frame_index; /* current microframe number */ + /* CTRLDSSEGMENT: offset 0x10 */ + u32 segment; /* address bits 63:32 if needed */ + /* PERIODICLISTBASE: offset 0x14 */ + u32 frame_list; /* points to periodic list */ + /* ASYNCLISTADDR: offset 0x18 */ + u32 async_next; /* address of next async queue head */ + + u32 reserved [9]; + + /* CONFIGFLAG: offset 0x40 */ + u32 configured_flag; +#define FLAG_CF (1<<0) /* true: we'll support "high speed" */ + + /* PORTSC: offset 0x44 */ + u32 port_status [0]; /* up to N_PORTS */ +/* 31:23 reserved */ +#define PORT_WKOC_E (1<<22) /* wake on overcurrent (enable) */ +#define PORT_WKDISC_E (1<<21) /* wake on disconnect (enable) */ +#define PORT_WKCONN_E (1<<20) /* wake on connect (enable) */ +/* 19:16 for port testing */ +#define PORT_LED_OFF (0<<14) +#define PORT_LED_AMBER (1<<14) +#define PORT_LED_GREEN (2<<14) +#define PORT_LED_MASK (3<<14) +#define PORT_OWNER (1<<13) /* true: companion hc owns this port */ +#define PORT_POWER (1<<12) /* true: has power (see PPC) */ +#define PORT_USB11(x) (((x)&(3<<10)) == (1<<10)) /* USB 1.1 device */ +/* 11:10 for detecting lowspeed devices (reset vs release ownership) */ +/* 9 reserved */ +#define PORT_RESET (1<<8) /* reset port */ +#define PORT_SUSPEND (1<<7) /* suspend port */ +#define PORT_RESUME (1<<6) /* resume it */ +#define PORT_OCC (1<<5) /* over current change */ +#define PORT_OC (1<<4) /* over current active */ +#define PORT_PEC (1<<3) /* port enable change */ +#define PORT_PE (1<<2) /* port enable */ +#define PORT_CSC (1<<1) /* connect status change */ +#define PORT_CONNECT (1<<0) /* device connected */ +#define PORT_RWC_BITS (PORT_CSC | PORT_PEC | PORT_OCC) +} __attribute__ ((packed)); + +#define USBMODE 0x68 /* USB Device mode */ +#define USBMODE_SDIS (1<<3) /* Stream disable */ +#define USBMODE_BE (1<<2) /* BE/LE endianness select */ +#define USBMODE_CM_HC (3<<0) /* host controller mode */ +#define USBMODE_CM_IDLE (0<<0) /* idle state */ + +/* Appendix C, Debug port ... intended for use with special "debug devices" + * that can help if there's no serial console. (nonstandard enumeration.) + */ +struct ehci_dbg_port { + u32 control; +#define DBGP_OWNER (1<<30) +#define DBGP_ENABLED (1<<28) +#define DBGP_DONE (1<<16) +#define DBGP_INUSE (1<<10) +#define DBGP_ERRCODE(x) (((x)>>7)&0x07) +# define DBGP_ERR_BAD 1 +# define DBGP_ERR_SIGNAL 2 +#define DBGP_ERROR (1<<6) +#define DBGP_GO (1<<5) +#define DBGP_OUT (1<<4) +#define DBGP_LEN(x) (((x)>>0)&0x0f) + u32 pids; +#define DBGP_PID_GET(x) (((x)>>16)&0xff) +#define DBGP_PID_SET(data, tok) (((data)<<8)|(tok)) + u32 data03; + u32 data47; + u32 address; +#define DBGP_EPADDR(dev, ep) (((dev)<<8)|(ep)) +} __attribute__ ((packed)); + +#endif /* __LINUX_USB_EHCI_DEF_H */ diff --git a/tinyehci/ehci_types.h b/tinyehci/ehci_types.h new file mode 100644 index 00000000..61301702 --- /dev/null +++ b/tinyehci/ehci_types.h @@ -0,0 +1,48 @@ +#ifndef EHCI_TYPES_H +#define EHCI_TYPES_H +/* linux kernel types needed by our code */ +#define __iomem + +//typedef unsigned long uint32_t; + +#include "types.h" + +#define __u32 u32 +#define __le32 u32 +#define dma_addr_t u32 +#define __GNUG__ +#define size_t u32 +typedef u32 spinlock_t; +typedef enum +{ + GFP_KERNEL=1 +}gfp_t; +struct timer_list +{ + int time; +}; + +enum{ + ENODEV =1, + ETIMEDOUT, + EINVAL, + ENOMEM, + EBADDATA, + ETRANSERR, + EPORTDOWN, + +}; +#define jiffies 0 +#define likely(x) __builtin_expect(!!(x), 1) +#define unlikely(x) __builtin_expect(!!(x), 0) +#define container_of(ptr, type, member) ({ \ + const typeof( ((type *)0)->member ) *__mptr = (ptr); \ + (type *)( (char *)__mptr - offsetof(type,member) );}) + +#undef offsetof +#ifdef __compiler_offsetof +#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER) +#else +#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) +#endif +#endif diff --git a/tinyehci/usb.c b/tinyehci/usb.c new file mode 100644 index 00000000..2ac90cd1 --- /dev/null +++ b/tinyehci/usb.c @@ -0,0 +1,222 @@ +/* + This file implements libogc usb API, but with ehci direct call + + most of the file credit goes to libogc devs +*/ + +#define __usb_control_message(fd, b, c,d, e, f, g, h, i) ehci_control_message(fd,b,c,d,e,f,g) + +static s32 __usb_getdesc(struct ehci_device * fd, u8 *buffer, u8 type, u8 index, u8 size) +{ + printk("usb_get desc %X %X %p\n",type,index,buffer); + return __usb_control_message(fd, USB_ENDPOINT_IN ,USB_REQ_GETDESCRIPTOR, (type << 8) | index, 0, size, buffer, NULL, NULL); +} + +static u32 __find_next_endpoint(u8 *buffer,u32 size) +{ + u8 *ptr = buffer; + + while(size>0) { + if(buffer[1]==USB_DT_ENDPOINT || buffer[1]==USB_DT_INTERFACE) break; + + size -= buffer[0]; + buffer += buffer[0]; + } + + return (buffer - ptr); +} + +s32 USB_GetDescriptors(struct ehci_device * fd, usb_devdesc *udd) +{ + u8 *buffer = NULL; + u8 *ptr = NULL; + usb_configurationdesc *ucd = NULL; + usb_interfacedesc *uid = NULL; + usb_endpointdesc *ued = NULL; + s32 retval = 0; + u32 size,i; + u32 iConf, iInterface, iEndpoint; + + buffer = USB_Alloc(sizeof(*udd)); + if(buffer == NULL) + { + retval = -ENOMEM; + goto free_and_error; + } + + retval = __usb_getdesc(fd, buffer, USB_DT_DEVICE, 0, USB_DT_DEVICE_SIZE); + if(retval < 0) + goto free_and_error; + memcpy(udd, buffer, USB_DT_DEVICE_SIZE); + USB_Free(buffer); + + udd->bcdUSB = cpu_to_le16(udd->bcdUSB); + udd->idVendor = cpu_to_le16(udd->idVendor); + udd->idProduct = cpu_to_le16(udd->idProduct); + udd->bcdDevice = cpu_to_le16(udd->bcdDevice); + + udd->configurations = USB_Alloc(udd->bNumConfigurations* sizeof(*udd->configurations)); + if(udd->configurations == NULL) + { + retval = -ENOMEM; + goto free_and_error; + } + memset(udd->configurations,0,udd->bNumConfigurations* sizeof(*udd->configurations)); + for(iConf = 0; iConf < udd->bNumConfigurations; iConf++) + { + buffer = USB_Alloc( USB_DT_CONFIG_SIZE); + if(buffer == NULL) + { + retval = -ENOMEM; + goto free_and_error; + } + + retval = __usb_getdesc(fd, buffer, USB_DT_CONFIG, iConf, USB_DT_CONFIG_SIZE); + ucd = &udd->configurations[iConf]; + memcpy(ucd, buffer, USB_DT_CONFIG_SIZE); + USB_Free( buffer); + + ucd->wTotalLength = cpu_to_le16(ucd->wTotalLength); + size = ucd->wTotalLength; + buffer = USB_Alloc( ucd->wTotalLength); + if(buffer == NULL) + { + retval = -ENOMEM; + goto free_and_error; + } + + retval = __usb_getdesc(fd, buffer, USB_DT_CONFIG, iConf, ucd->wTotalLength); + if(retval < 0) + goto free_and_error; + + ptr = buffer; + ptr += ucd->bLength; + size -= ucd->bLength; + + retval = -ENOMEM; + ucd->interfaces = USB_Alloc(ucd->bNumInterfaces* sizeof(*ucd->interfaces)); + if(ucd->interfaces == NULL) + goto free_and_error; + memset(ucd->interfaces,0,ucd->bNumInterfaces* sizeof(*ucd->interfaces)); + for(iInterface = 0; iInterface < ucd->bNumInterfaces; iInterface++) + { + uid = &ucd->interfaces[iInterface]; + memcpy(uid, ptr, USB_DT_INTERFACE_SIZE); + ptr += uid->bLength; + size -= uid->bLength; + + uid->endpoints = USB_Alloc(uid->bNumEndpoints* sizeof(*uid->endpoints)); + if(uid->endpoints == NULL) + goto free_and_error; + memset(uid->endpoints,0,uid->bNumEndpoints* sizeof(*uid->endpoints)); + + // This skips vendor and class specific descriptors + i = __find_next_endpoint(ptr, size); + uid->extra_size = i; + if(i>0) + { + uid->extra = USB_Alloc(i); + if(uid->extra == NULL) + goto free_and_error; + memcpy(uid->extra, ptr, i); + ptr += i; + size -= i; + } + + for(iEndpoint = 0; iEndpoint < uid->bNumEndpoints; iEndpoint++) + { + ued = &uid->endpoints[iEndpoint]; + memcpy(ued, ptr, USB_DT_ENDPOINT_SIZE); + ptr += ued->bLength; + ued->wMaxPacketSize = cpu_to_le16(ued->wMaxPacketSize); + } + } + USB_Free( buffer); + buffer = NULL; + } + retval = 0; + +free_and_error: + if(buffer != NULL) + USB_Free(buffer); + if(retval < 0) + USB_FreeDescriptors(udd); + return retval; +} + +void USB_FreeDescriptors(usb_devdesc *udd) +{ + int iConf, iInterface; + usb_configurationdesc *ucd; + usb_interfacedesc *uid; + if(udd->configurations != NULL) + { + for(iConf = 0; iConf < udd->bNumConfigurations; iConf++) + { + ucd = &udd->configurations[iConf]; + if(ucd->interfaces != NULL) + { + for(iInterface = 0; iInterface < ucd->bNumInterfaces; iInterface++) + { + uid = &ucd->interfaces[iInterface]; + if(uid->endpoints != NULL) + USB_Free(uid->endpoints); + if(uid->extra != NULL) + USB_Free(uid->extra); + } + USB_Free(ucd->interfaces); + } + } + USB_Free(udd->configurations); + } +} + + +s32 USB_WriteBlkMsg(struct ehci_device *fd,u8 bEndpoint,u32 wLength,void *rpData) +{ + return ehci_bulk_message(fd,bEndpoint,wLength,rpData); +} + +s32 USB_WriteCtrlMsg(struct ehci_device *fd,u8 bmRequestType,u8 bmRequest,u16 wValue,u16 wIndex,u16 wLength,void *rpData) +{ + return __usb_control_message(fd,bmRequestType,bmRequest,wValue,wIndex,wLength,rpData,NULL,NULL); +} + +s32 USB_GetConfiguration(struct ehci_device *fd, u8 *configuration) +{ + u8 *_configuration; + s32 retval; + + _configuration = USB_Alloc( 1); + if(_configuration == NULL) + return -ENOMEM; + + retval = __usb_control_message(fd, (USB_CTRLTYPE_DIR_DEVICE2HOST | USB_CTRLTYPE_TYPE_STANDARD | USB_CTRLTYPE_REC_DEVICE), USB_REQ_GETCONFIG, 0, 0, 1, _configuration, NULL, NULL); + if(retval >= 0) + *configuration = *_configuration; + USB_Free( _configuration); + + return retval; +} +s32 USB_SetConfiguration(struct ehci_device *fd, u8 configuration) +{ + return __usb_control_message(fd, (USB_CTRLTYPE_DIR_HOST2DEVICE | USB_CTRLTYPE_TYPE_STANDARD | USB_CTRLTYPE_REC_DEVICE), USB_REQ_SETCONFIG, configuration, 0, 0, NULL, NULL, NULL); +} +s32 USB_SetAlternativeInterface(struct ehci_device *fd, u8 interface, u8 alternateSetting) +{ +// if(alternateSetting == 0) +// return -EINVAL; + return __usb_control_message(fd, (USB_CTRLTYPE_DIR_HOST2DEVICE | USB_CTRLTYPE_TYPE_STANDARD | USB_CTRLTYPE_REC_INTERFACE), + USB_REQ_SETINTERFACE, alternateSetting, interface, 0, NULL, NULL, NULL); + +} +s32 USB_ClearHalt(struct ehci_device *fd, u8 endpoint) +{ +s32 ret; + + ret=__usb_control_message(fd, (USB_CTRLTYPE_DIR_HOST2DEVICE | USB_CTRLTYPE_TYPE_STANDARD | USB_CTRLTYPE_REC_ENDPOINT), + USB_REQ_CLEARFEATURE, USB_FEATURE_ENDPOINT_HALT, endpoint, 0, NULL, NULL, NULL); + + + return ret; +} diff --git a/tinyehci/usb.h b/tinyehci/usb.h new file mode 100644 index 00000000..8961c3b1 --- /dev/null +++ b/tinyehci/usb.h @@ -0,0 +1,160 @@ +#ifndef __USB_H__ +#define __USB_H__ + + +#define USB_MAXPATH IPC_MAXPATH_LEN + +#define USB_OK 0 +#define USB_FAILED 1 + +/* Descriptor types */ +#define USB_DT_DEVICE 0x01 +#define USB_DT_CONFIG 0x02 +#define USB_DT_STRING 0x03 +#define USB_DT_INTERFACE 0x04 +#define USB_DT_ENDPOINT 0x05 + +/* Standard requests */ +#define USB_REQ_GETSTATUS 0x00 +#define USB_REQ_CLEARFEATURE 0x01 +#define USB_REQ_SETFEATURE 0x03 +#define USB_REQ_SETADDRESS 0x05 +#define USB_REQ_GETDESCRIPTOR 0x06 +#define USB_REQ_SETDESCRIPTOR 0x07 +#define USB_REQ_GETCONFIG 0x08 +#define USB_REQ_SETCONFIG 0x09 +#define USB_REQ_GETINTERFACE 0x0a +#define USB_REQ_SETINTERFACE 0x0b +#define USB_REQ_SYNCFRAME 0x0c + +/* Descriptor sizes per descriptor type */ +#define USB_DT_DEVICE_SIZE 18 +#define USB_DT_CONFIG_SIZE 9 +#define USB_DT_INTERFACE_SIZE 9 +#define USB_DT_ENDPOINT_SIZE 7 +#define USB_DT_ENDPOINT_AUDIO_SIZE 9 /* Audio extension */ +#define USB_DT_HUB_NONVAR_SIZE 7 + +/* control message request type bitmask */ +#define USB_CTRLTYPE_DIR_HOST2DEVICE (0<<7) +#define USB_CTRLTYPE_DIR_DEVICE2HOST (1<<7) +#define USB_CTRLTYPE_TYPE_STANDARD (0<<5) +#define USB_CTRLTYPE_TYPE_CLASS (1<<5) +#define USB_CTRLTYPE_TYPE_VENDOR (2<<5) +#define USB_CTRLTYPE_TYPE_RESERVED (3<<5) +#define USB_CTRLTYPE_REC_DEVICE 0 +#define USB_CTRLTYPE_REC_INTERFACE 1 +#define USB_CTRLTYPE_REC_ENDPOINT 2 +#define USB_CTRLTYPE_REC_OTHER 3 + +#define USB_FEATURE_ENDPOINT_HALT 0 + +#define USB_ENDPOINT_IN 0x80 +#define USB_ENDPOINT_OUT 0x00 + + +#ifdef __cplusplus + extern "C" { +#endif /* __cplusplus */ +# define ATTRIBUTE_PACKED __attribute__((packed)) + +typedef struct _usbctrlrequest { + u8 bRequestType; + u8 bRequest; + u16 wValue; + u16 wIndex; + u16 wLength; +} ATTRIBUTE_PACKED usbctrlrequest; + +typedef struct _usbendpointdesc +{ + u8 bLength; + u8 bDescriptorType; + u8 bEndpointAddress; + u8 bmAttributes; + u16 wMaxPacketSize; + u8 bInterval; +} ATTRIBUTE_PACKED usb_endpointdesc; + +typedef struct _usbinterfacedesc +{ + u8 bLength; + u8 bDescriptorType; + u8 bInterfaceNumber; + u8 bAlternateSetting; + u8 bNumEndpoints; + u8 bInterfaceClass; + u8 bInterfaceSubClass; + u8 bInterfaceProtocol; + u8 iInterface; + u8 *extra; + u8 extra_size; + struct _usbendpointdesc *endpoints; +} ATTRIBUTE_PACKED usb_interfacedesc; + +typedef struct _usbconfdesc +{ + u8 bLength; + u8 bDescriptorType; + u16 wTotalLength; + u8 bNumInterfaces; + u8 bConfigurationValue; + u8 iConfiguration; + u8 bmAttributes; + u8 bMaxPower; + struct _usbinterfacedesc *interfaces; +} ATTRIBUTE_PACKED usb_configurationdesc; + +typedef struct _usbdevdesc +{ + u8 bLength; + u8 bDescriptorType; + u16 bcdUSB; + u8 bDeviceClass; + u8 bDeviceSubClass; + u8 bDeviceProtocol; + u8 bMaxPacketSize0; + u16 idVendor; + u16 idProduct; + u16 bcdDevice; + u8 iManufacturer; + u8 iProduct; + u8 iSerialNumber; + u8 bNumConfigurations; + struct _usbconfdesc *configurations; +} ATTRIBUTE_PACKED usb_devdesc; + +struct ehci_device; + + + +s32 USB_GetDescriptors(struct ehci_device *fd, usb_devdesc *udd); +void USB_FreeDescriptors(usb_devdesc *udd); + + + +s32 USB_ReadBlkMsg(struct ehci_device *fd,u8 bEndpoint,u16 wLength,void *rpData); + +s32 USB_ReadCtrlMsg(struct ehci_device *fd,u8 bmRequestType,u8 bmRequest,u16 wValue,u16 wIndex,u16 wLength,void *rpData); + + +s32 USB_WriteBlkMsg(struct ehci_device *fd,u8 bEndpoint,u32 wLength,void *rpData); + +s32 USB_WriteCtrlMsg(struct ehci_device *fd,u8 bmRequestType,u8 bmRequest,u16 wValue,u16 wIndex,u16 wLength,void *rpData); + +s32 USB_GetConfiguration(struct ehci_device *fd, u8 *configuration); +s32 USB_SetConfiguration(struct ehci_device *fd, u8 configuration); +s32 USB_SetAlternativeInterface(struct ehci_device *fd, u8 interface, u8 alternateSetting); +s32 USB_ClearHalt(struct ehci_device *fd, u8 endpointAddress); +s32 USB_GetDeviceList(const char *devpath,void *descr_buffer,u8 num_descr,u8 b0,u8 *cnt_descr); + +/* alloc memory from the USB subsystem */ +void * USB_Alloc(int size); +void USB_Free(void *ptr); + +#ifdef __cplusplus + } +#endif /* __cplusplus */ + + +#endif diff --git a/tinyehci/usbstorage.c b/tinyehci/usbstorage.c new file mode 100644 index 00000000..9948a567 --- /dev/null +++ b/tinyehci/usbstorage.c @@ -0,0 +1,2166 @@ +/*------------------------------------------------------------- + +usbstorage.c -- Bulk-only USB mass storage support + +Copyright (C) 2008 +Sven Peter (svpe) + +quick port to ehci/ios: Kwiirk + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you +must not claim that you wrote the original software. If you use +this software in a product, an acknowledgment in the product +documentation would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. + +-------------------------------------------------------------*/ + +#define ROUNDDOWN32(v) (((u32)(v)-0x1f)&~0x1f) + +//#define HEAP_SIZE (32*1024) +//#define TAG_START 0x22112211 + +#define TAG_START 0x2C0DE001 + +#define CBW_SIZE 31 +#define CBW_SIGNATURE 0x43425355 +#define CBW_IN (1 << 7) +#define CBW_OUT 0 + + +#define CSW_SIZE 13 +#define CSW_SIGNATURE 0x53425355 + +#define SCSI_TEST_UNIT_READY 0x00 +#define SCSI_INQUIRY 0x12 +#define SCSI_REQUEST_SENSE 0x03 +#define SCSI_START_STOP 0x1b +#define SCSI_READ_CAPACITY 0x25 +#define SCSI_READ_10 0x28 +#define SCSI_WRITE_10 0x2A + +#define SCSI_SENSE_REPLY_SIZE 18 +#define SCSI_SENSE_NOT_READY 0x02 +#define SCSI_SENSE_MEDIUM_ERROR 0x03 +#define SCSI_SENSE_HARDWARE_ERROR 0x04 + +#define USB_CLASS_MASS_STORAGE 0x08 +#define USB_CLASS_HUB 0x09 + +#define MASS_STORAGE_RBC_COMMANDS 0x01 +#define MASS_STORAGE_ATA_COMMANDS 0x02 +#define MASS_STORAGE_QIC_COMMANDS 0x03 +#define MASS_STORAGE_UFI_COMMANDS 0x04 +#define MASS_STORAGE_SFF8070_COMMANDS 0x05 +#define MASS_STORAGE_SCSI_COMMANDS 0x06 + +#define MASS_STORAGE_BULK_ONLY 0x50 + +#define USBSTORAGE_GET_MAX_LUN 0xFE +#define USBSTORAGE_RESET 0xFF + +#define USB_ENDPOINT_BULK 0x02 + +#define USBSTORAGE_CYCLE_RETRIES 10 + + +#define MAX_TRANSFER_SIZE 0x1000 + +#define DEVLIST_MAXSIZE 8 + + +extern char use_reset_bulk; +/* force_flags 1 ->force GetMaxLun, 2-> force SetConfiguration */ +extern char force_flags; +extern char use_alternative_timeout; + +int is_dvd=0; + +int ums_init_done = 0; + +static usbstorage_handle __usbfd; +static u8 __lun = 16; +static u8 __mounted = 0; +static u16 __vid = 0; +static u16 __pid = 0; +extern u32 current_port; + +void reinit_ehci_headers(void); +void ehci_stop(void); +void ehci_run(void); + + + +#define MEM_PRINT 1 + +#ifdef MEM_PRINT + +char mem_cad[32]; + + +#include // for the s_printf function + +extern int verbose; + +void int_char(int num) +{ +int sign=num<0; +int n,m; + + if(num==0) + { + mem_cad[0]='0';mem_cad[1]=0; + return; + } + + for(n=0;n<10;n++) + { + m=num % 10;num/=10;if(m<0) m=-m; + mem_cad[25-n]=48+m; + } + + mem_cad[26]=0; + + n=0;m=16; + if(sign) {mem_cad[n]='-';n++;} + + while(mem_cad[m]=='0') m++; + + if(mem_cad[m]==0) m--; + + while(mem_cad[m]) + { + mem_cad[n]=mem_cad[m]; + n++;m++; + } + mem_cad[n]=0; + +} + +void uint_char(unsigned int num) +{ +int n,m; + + if(num==0) + { + mem_cad[0]='0';mem_cad[1]=0; + return; + } + + for(n=0;n<10;n++) + { + m=num % 10;num/=10; + mem_cad[25-n]=48+m; + } + + mem_cad[26]=0; + + n=0;m=16; + + while(mem_cad[m]=='0') m++; + + if(mem_cad[m]==0) m--; + + while(mem_cad[m]) + { + mem_cad[n]=mem_cad[m]; + n++;m++; + } + mem_cad[n]=0; + +} + +void hex_char(u32 num) +{ +int n,m; + + if(num==0) + { + mem_cad[0]='0';mem_cad[1]=0; + return; + } + + for(n=0;n<8;n++) + { + m=num & 15;num>>=4; + if(m>=10) m+=7; + mem_cad[23-n]=48+m; + } + + mem_cad[24]=0; + + n=0;m=16; + + mem_cad[n]='0';n++; + mem_cad[n]='x';n++; + + while(mem_cad[m]=='0') m++; + + if(mem_cad[m]==0) m--; + + while(mem_cad[m]) + { + mem_cad[n]=mem_cad[m]; + n++;m++; + } + mem_cad[n]=0; + +} + + +void s_printf(char *format,...) +{ + va_list opt; + + char out[2]=" "; + + int val; + + char *s; +static int cnt=0; + va_start(opt, format); + + while(format[0]) + { + if(format[0]!='%') {out[0]=*format++;cnt+=strlen(out);if(cnt<3500)os_puts(out);} + else + { + format++; + switch(format[0]) + { + case 'd': + case 'i': + val=va_arg(opt,int); + int_char(val); + + cnt+=strlen(mem_cad);if(cnt<3500)os_puts(mem_cad); + + break; + + case 'u': + val=va_arg(opt, unsigned); + uint_char(val); + + cnt+=strlen(mem_cad);if(cnt<3500)os_puts(mem_cad); + + break; + + case 'x': + val=va_arg(opt,int); + hex_char((u32) val); + cnt+=strlen(mem_cad);if(cnt<3500)os_puts(mem_cad); + + break; + + case 's': + s=va_arg(opt,char *); + cnt+=strlen(s);if(cnt<3500)os_puts(s); + break; + + } + format++; + } + + } + + va_end(opt); + + +} + +void log_status(char *s) +{ +return; +u32 status=ehci_readl( &ehci->regs->status); +u32 statusp=ehci_readl(&ehci->regs->port_status[current_port]); + +s_printf(" log_status (%s)\n",s); + +s_printf(" status: %x %s%s%s%s%s%s%s%s%s%s\n", + status, + (status & STS_ASS) ? " Async" : "", + (status & STS_PSS) ? " Periodic" : "", + (status & STS_RECL) ? " Recl" : "", + (status & STS_HALT) ? " Halt" : "", + (status & STS_IAA) ? " IAA" : "", + (status & STS_FATAL) ? " FATAL" : "", + (status & STS_FLR) ? " FLR" : "", + (status & STS_PCD) ? " PCD" : "", + (status & STS_ERR) ? " ERR" : "", + (status & STS_INT) ? " INT" : "" + ); + + s_printf(" status port: %x\n", statusp); +} + +#else + +//#define s_printf(a...) do{}while(0) +#define s_printf(a...) +#define log_status(a) + + + + +#endif + + +static s32 __usbstorage_reset(usbstorage_handle *dev,int hard_reset); +static s32 __usbstorage_clearerrors(usbstorage_handle *dev, u8 lun); +static s32 __usbstorage_start_stop(usbstorage_handle *dev, u8 lun, u8 start_stop); + +// ehci driver has its own timeout. +static s32 __USB_BlkMsgTimeout(usbstorage_handle *dev, u8 bEndpoint, u32 wLength, void *rpData) +{ + return USB_WriteBlkMsg(dev->usb_fd, bEndpoint, wLength, rpData); +} + +static s32 __USB_CtrlMsgTimeout(usbstorage_handle *dev, u8 bmRequestType, u8 bmRequest, u16 wValue, u16 wIndex, u16 wLength, void *rpData) +{ + return USB_WriteCtrlMsg(dev->usb_fd, bmRequestType, bmRequest, wValue, wIndex, wLength, rpData); +} + + + +static s32 __send_cbw(usbstorage_handle *dev, u8 lun, u32 len, u8 flags, const u8 *cb, u8 cbLen) +{ + s32 retval = USBSTORAGE_OK; + + if(cbLen == 0 || cbLen > 16 || !dev->buffer) + return -EINVAL; + memset(dev->buffer, 0, CBW_SIZE); + + ((u32*)dev->buffer)[0]=cpu_to_le32(CBW_SIGNATURE); + ((u32*)dev->buffer)[1]=cpu_to_le32(dev->tag); + ((u32*)dev->buffer)[2]=cpu_to_le32(len); + dev->buffer[12] = flags; + dev->buffer[13] = lun; + + // linux usb/storage/protocol.c seems to say only difference is padding + // and fixed cw size + /* + if(dev->ata_protocol) + dev->buffer[14] = 12; + else + dev->buffer[14] = (cbLen > 6 ? 0x10 : 6); + + dev->buffer[14] = (cb[0] > 0x1f ? 0x0A : 0x06); + */ + dev->buffer[14] = (cbLen > 6 ? 10 : 6); + //debug_printf("send cb of size %d\n",dev->buffer[14]); + memcpy(dev->buffer + 15, cb, cbLen); + //hexdump(dev->buffer,CBW_SIZE); + retval = __USB_BlkMsgTimeout(dev, dev->ep_out, CBW_SIZE, (void *)dev->buffer); + + if(retval == CBW_SIZE) return USBSTORAGE_OK; + else if(retval >= 0) return USBSTORAGE_ESHORTWRITE; + + return retval; +} + + +static s32 __read_csw(usbstorage_handle *dev, u8 *status, u32 *dataResidue) +{ + s32 retval = USBSTORAGE_OK; + u32 signature, tag, _dataResidue, _status; + + + memset(dev->buffer, 0xff, CSW_SIZE); + + retval = __USB_BlkMsgTimeout(dev, dev->ep_in, CSW_SIZE, dev->buffer); + //print_hex_dump_bytes("csv resp:",DUMP_PREFIX_OFFSET,dev->buffer,CSW_SIZE); + + + if(retval >= 0 && retval != CSW_SIZE) return USBSTORAGE_ESHORTREAD; + if(retval < 0) return retval; + + signature = le32_to_cpu(((u32*)dev->buffer)[0]); + tag = le32_to_cpu(((u32*)dev->buffer)[1]); + _dataResidue = le32_to_cpu(((u32*)dev->buffer)[2]); + _status = dev->buffer[12]; + //debug_printf("csv status: %d\n",_status); + if(signature != CSW_SIGNATURE) { + // BUG(); + return USBSTORAGE_ESIGNATURE; + } + + if(dataResidue != NULL) + *dataResidue = _dataResidue; + if(status != NULL) + *status = _status; + + if(tag != dev->tag) return USBSTORAGE_ETAG; + + dev->tag=((dev->tag+2) & 0xffff) | (dev->tag & 0xffff0000); + //dev->tag++; + + return USBSTORAGE_OK; +} + +extern u32 usb_timeout; + +static int is_read_write=0; + + +static s32 __cycle(usbstorage_handle *dev, u8 lun, u8 *buffer, u32 len, u8 *cb, u8 cbLen, u8 write, u8 *_status, u32 *_dataResidue, s8 retries) +{ + s32 retval = USBSTORAGE_OK; + + u8 status = 0; + u32 dataResidue = 0; + u32 thisLen; + u32 pstatus; + + u8 *buffer2=buffer; + u32 len2=len; + + int retries2=0; + int t; + + +// s8 retries = USBSTORAGE_CYCLE_RETRIES + 1; + + unplug_device=0; + + + do + { + +// if(unplug_device) {return -ENODEV;} + if(retval==-ETIMEDOUT || retval==-ENODEV) {unplug_device=1;break;} + + + if(retval < 0 /*&& retval!=USBSTORAGE_ESTATUS*/) + { + + retval=__usbstorage_reset(dev,0); + + + if(retval >=0) ehci_msleep(5); else ehci_msleep(60); + pstatus = ehci_readl(&ehci->regs->port_status[current_port]); + + retries2++; + if(retval<0) + { + if(retries2>2) {unplug_device=1;break;} else {ehci_msleep(10);continue;} + } else retries2=0; + + ///// + + //if(retval==-ENODEV) {unplug_device=1;return -ENODEV;} + } + retries--; + //if(retval<0) continue; // nuevo + + buffer=buffer2; + len=len2; + + if(write) + { + t=usb_timeout; + + if(use_alternative_timeout) usb_timeout=1000*1000; + else usb_timeout=200*1000; + + retval = __send_cbw(dev, lun, len, CBW_OUT, cb, cbLen); + + usb_timeout=t; + + if(retval==-ETIMEDOUT || retval==-ENODEV) + break; + + if(retval < 0) + continue;//reset+retry + + while(len > 0) + { + thisLen=len; + + retval = __USB_BlkMsgTimeout(dev, dev->ep_out, thisLen, buffer); + + if(retval==-ETIMEDOUT || retval==-ENODEV) break; + + if(retval<0) { retval = USBSTORAGE_EDATARESIDUE;break;} + + if(retval != thisLen && len>0) + { + retval = USBSTORAGE_EDATARESIDUE; + break; + } + + len -= retval; + buffer += retval; + } + + if(retval < 0) + continue; + } + else + { + t=usb_timeout; + + if(use_alternative_timeout) usb_timeout=1000*1000; + else usb_timeout=200*1000; + + retval = __send_cbw(dev, lun, len, CBW_IN, cb, cbLen); + + usb_timeout=t; + + + + if(retval<0) + { + s_printf("__send_cbw ret %i\n", retval); + log_status("_send_cbw"); + } + + + if(retval==-ETIMEDOUT || retval==-ENODEV) + break; + + if(retval < 0) + continue; //reset+retry + + while(len > 0) + { + thisLen=len; //if(thisLen>8192) thisLen=8192; + + retval = __USB_BlkMsgTimeout(dev, dev->ep_in, thisLen, buffer); + + + if(retval<0) + { + s_printf("__USB_BlkMsgTimeout %i\n", retval); + log_status("__USB_BlkMsgTimeout"); + } + + + if(retval==-ETIMEDOUT || retval==-ENODEV) break; + if(retval<0) { retval = USBSTORAGE_EDATARESIDUE;break;} + + + + if(retval != thisLen) + { + retval = USBSTORAGE_EDATARESIDUE; + break; + } + + len -= retval; + buffer += retval; + } + + if(retval < 0) + continue; + } + + t=usb_timeout; + + if(use_alternative_timeout) usb_timeout=1000*1000; + else usb_timeout=200*1000; + + retval = __read_csw(dev, &status, &dataResidue); + + + if(retval<0) + { + s_printf("__read_csw %i\n", retval); + log_status("__read_csw"); + } + + + if(retval==-ENODEV) {usb_timeout=t;break;} + + if(retval<0) + { + USB_ClearHalt(dev->usb_fd, dev->ep_in); + set_toggle(dev->usb_fd, dev->ep_in,0); + + retval = __read_csw(dev, &status, &dataResidue); + } + + usb_timeout=t; + + if(retval==-ETIMEDOUT || retval==-ENODEV) break; + + if(dataResidue && is_read_write) + { + status=1; + } + + + if(retval>=0 && is_read_write!=0 && status!=0) + { + retval = USBSTORAGE_ESTATUS; // if read/write bad status repeat the read/write + } + + + if(retval < 0) + continue; + + retval = USBSTORAGE_OK; + } while(retval < 0 && retries > 0); + + // force unplug + if(retval < 0) {unplug_device=1;} + + + if(retval>=0) unplug_device=0; + + + if(_status != NULL) + *_status = status; + if(_dataResidue != NULL) + *_dataResidue = dataResidue; + + return retval; +} + +static s32 __usbstorage_start_stop(usbstorage_handle *dev, u8 lun, u8 start_stop) +{ + #if 0 + s32 retval; + u8 cmd[16]; + + u8 status = 0; + + memset(cmd, 0, sizeof(cmd)); + cmd[0] = SCSI_START_STOP; + cmd[1] = (lun << 5) | 1; + cmd[4] = start_stop & 3; + cmd[5] = 0; + //memset(sense, 0, SCSI_SENSE_REPLY_SIZE); + retval = __cycle(dev, lun, NULL, 0, cmd, 6, 0, &status, NULL, USBSTORAGE_CYCLE_RETRIES); +// if(retval < 0) goto error; + + +//error: + return retval; + #else + return 0; + #endif +} + + +static s32 __usbstorage_clearerrors(usbstorage_handle *dev, u8 lun) +{ + s32 retval; + u8 cmd[16]; + u8 *sense= ((u8 *)dev->buffer)+2048;//USB_Alloc(SCSI_SENSE_REPLY_SIZE); + u8 status = 0; + memset(cmd, 0, sizeof(cmd)); + cmd[0] = SCSI_TEST_UNIT_READY; + //int n; + + if(!sense) return -ENOMEM; + + + retval = __cycle(dev, lun, NULL, 0, cmd, 6, 1, &status, NULL, USBSTORAGE_CYCLE_RETRIES); + //retval = __cycle(dev, lun, NULL, 0, cmd, 1, 1, &status, NULL, USBSTORAGE_CYCLE_RETRIES); + + + if(retval<0) s_printf(" SCSI_TEST_UNIT_READY ret %i\n", retval); + + + + if(retval==-ENODEV) goto error; + //if(retval<0) goto error; + + if(status != 0 || retval<0 ) + { + cmd[0] = SCSI_REQUEST_SENSE; + cmd[1] = lun << 5; + cmd[4] = SCSI_SENSE_REPLY_SIZE; + cmd[5] = 0; + memset(sense, 0, SCSI_SENSE_REPLY_SIZE); + if(retval == USBSTORAGE_ETIMEDOUT) usb_timeout=2500*1000; + else usb_timeout=10000*1000; + + retval = __cycle(dev, lun, sense, SCSI_SENSE_REPLY_SIZE, cmd, 6, 0, NULL, NULL, USBSTORAGE_CYCLE_RETRIES); + + + s_printf(" SCSI_REQUEST_SENSE ret %i\n", retval); + + + if(retval < 0) goto error; + + status = sense[2] & 0x0F; + + s_printf(" SCSI_REQUEST_SENSE status %x\n", status); + + + if(status == SCSI_SENSE_NOT_READY || status == SCSI_SENSE_MEDIUM_ERROR || status == SCSI_SENSE_HARDWARE_ERROR) + retval = USBSTORAGE_ESENSE; + } +error: + // USB_Free(sense); + return retval; +} + + + +static s32 __usbstorage_reset(usbstorage_handle *dev,int hard_reset) +{ + s32 retval=-1; + u32 old_usb_timeout=usb_timeout; + + if(use_alternative_timeout) usb_timeout=1000*1000; + else usb_timeout=200*1000; + + u32 status; + u8 conf; + + + status = ehci_readl(&ehci->regs->port_status[dev->usb_fd->port]); + + // device unplugged + if (!(PORT_CONNECT & status)) + { + unplug_device=1; + usb_timeout=old_usb_timeout; + return -ENODEV; + } + + if(use_alternative_timeout) usb_timeout=1000*1000; + else usb_timeout=200*1000; + + + if(use_reset_bulk) + { + retval = __USB_CtrlMsgTimeout(dev, + (USB_CTRLTYPE_DIR_HOST2DEVICE | USB_CTRLTYPE_TYPE_CLASS | USB_CTRLTYPE_REC_INTERFACE), + USBSTORAGE_RESET, 0, dev->interface, 0, NULL); + + s_printf("usbstorage reset: BULK RESET %i\n",retval); + + /* gives device enough time to process the reset */ + ehci_msleep(60); + } + else + { + USB_ClearHalt(dev->usb_fd, 0); + ehci_msleep(5); + retval=0; + } + + + + if(use_alternative_timeout) usb_timeout=1000*1000; + else usb_timeout=200*1000; + /* FIXME?: some devices return -7004 here which definitely violates the usb ms protocol but they still seem to be working... */ + if(retval < 0) + { + ehci_msleep(50); + USB_ClearHalt(dev->usb_fd, 0); + ehci_msleep(5); + goto end; + } + + + retval = USB_ClearHalt(dev->usb_fd, dev->ep_in); + ehci_msleep(5); + + + s_printf("usbstorage reset: clearhalt in ret %i\n",retval); + + + if(retval < 0) + goto end; + + retval = USB_ClearHalt(dev->usb_fd, dev->ep_out); + ehci_msleep(5); + + + s_printf("usbstorage reset: clearhalt out ret %i\n",retval); + + + if(retval < 0) + goto end; + + ehci_msleep(10); + retval=USB_GetConfiguration(dev->usb_fd, &conf); // for test it works + + + s_printf("usbstorage reset: USB_GetConfiguration ret %i\n",retval); + + + if(retval < 0) + goto end; + + + s_printf("reset ok\n"); + + + usb_timeout=old_usb_timeout; + return retval; + +end: + + usb_timeout=old_usb_timeout; + + unplug_device=1; // force the unplug method + + return retval; +} + + + +int my_memcmp(char *a, char *b, int size_b) +{ +int n; + +for(n=0;ntag = TAG_START; + + dev->usb_fd = fd; + + + udd.configurations=NULL; + + retval = USB_GetDescriptors(dev->usb_fd, &udd); + + + s_printf("USBStorage_Open(): USB_GetDescriptors %i\n",retval); + + log_status("after USB_GetDescriptors"); + + + + if(retval < 0) + goto free_and_return; + + // test device changed without unmount (prevent device write corruption) + if(ums_init_done) + { + if(_old_device.bDeviceClass!=udd.bDeviceClass || + _old_device.bDeviceSubClass!=udd.bDeviceSubClass || + _old_device.idVendor!=udd.idVendor || + _old_device.idProduct!=udd.idProduct || + _old_device.iManufacturer!=udd.iManufacturer || + _old_device.iProduct!=udd.iProduct || + _old_device.iSerialNumber!=udd.iSerialNumber) + { + //USB_Free(max_lun); + USB_FreeDescriptors(&udd); + #ifdef MEM_PRINT + s_printf("USBStorage_Open(): device changed!!!\n"); + + #endif + return -ENODEV; + } + } + + _old_device.bDeviceClass=udd.bDeviceClass; + _old_device.bDeviceSubClass=udd.bDeviceSubClass; + _old_device.idVendor=udd.idVendor; + _old_device.idProduct=udd.idProduct; + _old_device.iManufacturer=udd.iManufacturer; + _old_device.iProduct=udd.iProduct; + _old_device.iSerialNumber=udd.iSerialNumber; + + + try_status=-128; + for(iConf = 0; iConf < udd.bNumConfigurations; iConf++) + { + ucd = &udd.configurations[iConf]; + #ifdef MEM_PRINT + s_printf("USBStorage_Open(): ucd %i Power %i mA\n",iConf, ((u32) ucd->bMaxPower)*2); + + #endif + for(iInterface = 0; iInterface < ucd->bNumInterfaces; iInterface++) + { + uid = &ucd->interfaces[iInterface]; + // debug_printf("interface %d, class:%x subclass %x protocol %x\n",iInterface,uid->bInterfaceClass,uid->bInterfaceSubClass, uid->bInterfaceProtocol); + if(uid->bInterfaceClass == USB_CLASS_MASS_STORAGE && /* + (uid->bInterfaceSubClass == MASS_STORAGE_SCSI_COMMANDS + || uid->bInterfaceSubClass == MASS_STORAGE_RBC_COMMANDS + || uid->bInterfaceSubClass == MASS_STORAGE_ATA_COMMANDS + || uid->bInterfaceSubClass == MASS_STORAGE_QIC_COMMANDS + || uid->bInterfaceSubClass == MASS_STORAGE_UFI_COMMANDS + || uid->bInterfaceSubClass == MASS_STORAGE_SFF8070_COMMANDS) && */ + uid->bInterfaceProtocol == MASS_STORAGE_BULK_ONLY && uid->bNumEndpoints>=2) + { + + dev->ata_protocol = 0; + if(uid->bInterfaceSubClass != MASS_STORAGE_SCSI_COMMANDS || uid->bInterfaceSubClass != MASS_STORAGE_RBC_COMMANDS) + dev->ata_protocol = 1; + + + s_printf("USBStorage_Open(): interface subclass %i ata_prot %i \n",uid->bInterfaceSubClass, dev->ata_protocol); + + + dev->ep_in = dev->ep_out = 0; + for(iEp = 0; iEp < uid->bNumEndpoints; iEp++) + { + ued = &uid->endpoints[iEp]; + if(ued->bmAttributes != USB_ENDPOINT_BULK) + continue; + + if((ued->bEndpointAddress & USB_ENDPOINT_IN) && !dev->ep_in && ued->bEndpointAddress!=0) + {dev->ep_in = ued->bEndpointAddress; + #ifdef MEM_PRINT + s_printf("In Point: %i\n", (u32) ued->wMaxPacketSize); + #endif + } + else + if(!dev->ep_out && ued->bEndpointAddress!=0) + { + dev->ep_out = ued->bEndpointAddress; + + s_printf("Out Point: %i\n", (u32) ued->wMaxPacketSize); + + } + } + if(dev->ep_in != 0 && dev->ep_out != 0) + { + #ifdef MEM_PRINT + s_printf("ep_in %x ep_out %x\n", (u32) dev->ep_in, (u32) dev->ep_out); + + #endif + _old_device.ep_in=dev->ep_in; + _old_device.ep_out=dev->ep_out; + + dev->configuration = ucd->bConfigurationValue; + dev->interface = uid->bInterfaceNumber; + _old_device.interface=dev->interface; + dev->altInterface = uid->bAlternateSetting; + + goto found; + } + } + else + { + + + if(uid->endpoints != NULL) + USB_Free(uid->endpoints);uid->endpoints= NULL; + if(uid->extra != NULL) + USB_Free(uid->extra);uid->extra=NULL; + + if(uid->bInterfaceClass == USB_CLASS_HUB) + { + retval = USBSTORAGE_ENOINTERFACE; + try_status= -20000; + + USB_FreeDescriptors(&udd); + + goto free_and_return; + } + + if(uid->bInterfaceClass == USB_CLASS_MASS_STORAGE && + uid->bInterfaceProtocol == MASS_STORAGE_BULK_ONLY && uid->bNumEndpoints>=2) + { + try_status= -(10000+uid->bInterfaceSubClass); + } + } + } + } + + + s_printf("USBStorage_Open(): cannot find any interface!!!\n"); + + + USB_FreeDescriptors(&udd); + retval = USBSTORAGE_ENOINTERFACE; + //debug_printf("cannot find any interface\n"); + goto free_and_return; + +found: + USB_FreeDescriptors(&udd); + + retval = USBSTORAGE_EINIT; + + + try_status=-1201; + + + s_printf("USBStorage_Open(): conf: %x altInterface: %x\n", dev->configuration, dev->altInterface); + + if(USB_GetConfiguration(dev->usb_fd, &conf) < 0) + { + s_printf("USB_GetConfiguration() Error\n"); + goto free_and_return; + } + s_printf("Actual conf: %x next conf: %x\n",conf, dev->configuration); + try_status=-1202; + if(USB_SetConfiguration(dev->usb_fd, dev->configuration) < 0) + { + s_printf("USB_SetConfiguration() Error\n"); + //goto free_and_return; + } + + try_status=-1203; + if(/*dev->altInterface != 0 &&*/ USB_SetAlternativeInterface(dev->usb_fd, dev->interface, dev->altInterface) < 0) + { + s_printf("USB_SetAlternativeInterface() Error. Continue\n"); + //goto free_and_return; + } + s_printf("USB_SetConfiguration() & USB_SetAlternativeInterface() OK\n"); +/* + if(USB_GetConfiguration(dev->usb_fd, &conf) < 0) + goto free_and_return; + try_status=-1202; + + #ifdef MEM_PRINT + log_status("after USB_GetConfiguration"); + #endif + + #ifdef MEM_PRINT + if(conf != dev->configuration) + s_printf("USBStorage_Open(): changing conf from %x\n", conf); + + #endif + +usb_timeout=10000*1000; + if((conf != dev->configuration || (force_flags & 2)) && USB_SetConfiguration(dev->usb_fd, dev->configuration) < 0) + goto free_and_return; + + try_status=-1203; + if(dev->altInterface != 0 && USB_SetAlternativeInterface(dev->usb_fd, dev->interface, dev->altInterface) < 0) + goto free_and_return; + +usb_timeout=1000*1000; + try_status=-1204; + + #ifdef MEM_PRINT + log_status("Before USBStorage_Reset"); + #endif + retval = USBStorage_Reset(dev); + //retval=0; + //retval =__usbstorage_reset(dev, 1); + #ifdef MEM_PRINT + log_status("After USBStorage_Reset"); + #endif + if(retval < 0) + goto free_and_return; +*/ + u8 max_lun=0; + retval = __USB_CtrlMsgTimeout(dev, (USB_CTRLTYPE_DIR_DEVICE2HOST | USB_CTRLTYPE_TYPE_CLASS | USB_CTRLTYPE_REC_INTERFACE), USBSTORAGE_GET_MAX_LUN, 0, dev->interface, sizeof(max_lun), &max_lun); + if(retval < 0 ) + { + s_printf("Get_Max_Lun(): err, default max_lun=8\n"); + dev->max_lun = 8; + } + else + { + dev->max_lun = (max_lun+1); + s_printf("Get_Max_Lun(): OK: %i\n",dev->max_lun); + } + + +/* if(retval == USBSTORAGE_ETIMEDOUT)*/ + + /* NOTE: from usbmassbulk_10.pdf "Devices that do not support multiple LUNs may STALL this command." */ +// dev->max_lun = 8; // max_lun can be from 1 to 16, but some devices do not support lun + + retval = USBSTORAGE_OK; + + /*if(dev->max_lun == 0) + dev->max_lun++;*/ + + /* taken from linux usbstorage module (drivers/usb/storage/transport.c) */ + /* + * Some devices (i.e. Iomega Zip100) need this -- apparently + * the bulk pipes get STALLed when the GetMaxLUN request is + * processed. This is, in theory, harmless to all other devices + * (regardless of if they stall or not). + */ + //USB_ClearHalt(dev->usb_fd, dev->ep_in); + //USB_ClearHalt(dev->usb_fd, dev->ep_out); + + if(dev->buffer == NULL) + dev->buffer = (void *) ((((u32) USB_Alloc(MAX_TRANSFER_SIZE+32))+31) & ~31); + + if(dev->buffer == NULL) {retval = -ENOMEM;try_status=-1205;} + else retval = USBSTORAGE_OK; + +free_and_return: + +usb_timeout=1000*1000; + + if(retval < 0) + { + /* + // Never free dev->buffer or destroy the dev info + if(dev->buffer != NULL) + USB_Free(dev->buffer); + memset(dev, 0, sizeof(*dev)); + */ + + + s_printf("USBStorage_Open(): try_status %i\n",try_status); + + + return retval; + } + + + s_printf("USBStorage_Open(): OK, return 0\n"); + + + + return 0; +} + + +void my_sprint(char *cad, char *s); + +s32 USBStorage_Close(usbstorage_handle *dev) +{ + + // Never free dev->buffer or destroy the dev info + + /*if(dev->buffer != NULL) + USB_Free(dev->buffer); + dev->buffer=NULL; + */ + //memset(dev, 0, sizeof(*dev)); + + //my_sprint("USBStorage_Close()", NULL); + return 0; +} + +s32 USBStorage_Reset(usbstorage_handle *dev) +{ + s32 retval; + + retval = __usbstorage_reset(dev,0); + + return retval; +} + +s32 USBStorage_GetMaxLUN(usbstorage_handle *dev) +{ + + return dev->max_lun; +} + + +s32 USBStorage_MountLUN(usbstorage_handle *dev, u8 lun) +{ + s32 retval; + + + if(lun >= dev->max_lun) + return -EINVAL; + usb_timeout=1000*1000; + + + retval= __usbstorage_start_stop(dev, lun, 1); + + #ifdef MEM_PRINT + s_printf(" start_stop cmd ret %i\n",retval); + #endif + if(retval < 0) + goto ret; + usb_timeout=20000*1000; + retval = __usbstorage_clearerrors(dev, lun); + if(retval < 0) + goto ret; + usb_timeout=1000*1000; + + retval = USBStorage_Inquiry(dev, lun); + + s_printf(" Inquiry ret %i\n",retval); + + if(retval>=0) + { + s_printf(" Device Type: %x\n", *(((u8 *)dev->buffer)+2048) & 31); + } + + if(retval < 0) + goto ret; + retval = USBStorage_ReadCapacity(dev, lun, &dev->sector_size[lun], &dev->n_sector[lun]); + + s_printf(" ReadCapacity ret %i sector_size: %u sectors: %u\n",retval,dev->sector_size[lun],dev->n_sector[lun]); + + if(dev->sector_size[lun]<512 || dev->n_sector[lun]<10) retval=-33; + +ret: + usb_timeout=1000*1000; + + return retval; +} + +s32 USBStorage_Inquiry(usbstorage_handle *dev, u8 lun) +{ + int n; + s32 retval; + u8 cmd[] = {SCSI_INQUIRY, lun << 5,0,0,36,0}; + u8 *response = ((u8 *)dev->buffer)+2048; //USB_Alloc(36); + + if(!response) return -ENOMEM; + for(n=0;n<2;n++) + { + + + memset(response,0,36); + + retval = __cycle(dev, lun, response, 36, cmd, 6, 0, NULL, NULL, USBSTORAGE_CYCLE_RETRIES); + if(retval>=0) break; + + } + if(retval>=0) + { + switch(*response & 31) + { + // info from http://en.wikipedia.org/wiki/SCSI_Peripheral_Device_Type + case 5: // CDROM + case 7: // optical memory device (e.g., some optical disks) + is_dvd=1; + break; + default: + is_dvd=0; + break; + } + } + //USB_Free(response); + + return retval; +} +s32 USBStorage_ReadCapacity(usbstorage_handle *dev, u8 lun, u32 *sector_size, u32 *n_sectors) +{ + s32 retval; + u8 cmd[] = {SCSI_READ_CAPACITY, lun << 5}; + u8 *response = ((u8 *)dev->buffer)+2048; //USB_Alloc(8); + u32 val; + if(!response) return -ENOMEM; + + retval = __cycle(dev, lun, response, 8, cmd, 2, 0, NULL, NULL, USBSTORAGE_CYCLE_RETRIES); + if(retval >= 0) + { + + memcpy(&val, response, 4); + if(n_sectors != NULL) + *n_sectors = be32_to_cpu(val); + memcpy(&val, response + 4, 4); + if(sector_size != NULL) + *sector_size = be32_to_cpu(val); + if(be32_to_cpu(val)==2048)is_dvd=1; + retval = USBSTORAGE_OK; + } + // USB_Free(response); + return retval; +} + + + +static s32 __USBStorage_Read(usbstorage_handle *dev, u8 lun, u32 sector, u16 n_sectors, u8 *buffer) +{ + u8 status = 0; + s32 retval; + u8 cmd[] = { + SCSI_READ_10, + (lun << 5), + sector >> 24, + sector >> 16, + sector >> 8, + sector, + 0, + n_sectors >> 8, + n_sectors, + 0 + }; + + if(lun >= dev->max_lun || dev->sector_size[lun] == 0 || !dev) + return -EINVAL; + is_read_write=1; + retval = __cycle(dev, lun, buffer, ((u32) n_sectors) * dev->sector_size[lun], cmd, sizeof(cmd), 0, &status, NULL, 6); + is_read_write=0; + if(retval > 0 && status != 0) + retval = USBSTORAGE_ESTATUS; + return retval; +} + +static s32 __USBStorage_Write(usbstorage_handle *dev, u8 lun, u32 sector, u16 n_sectors, const u8 *buffer) +{ + u8 status = 0; + s32 retval; + u8 cmd[] = { + SCSI_WRITE_10, + (lun << 5) | 8, // LUN & FUA (Force Unit Access to avoid the cache), + sector >> 24, + sector >> 16, + sector >> 8, + sector, + 0, + n_sectors >> 8, + n_sectors, + 0 + }; + + if(lun >= dev->max_lun || dev->sector_size[lun] == 0) + return -EINVAL; + + is_read_write=1; + retval = __cycle(dev, lun, (u8 *)buffer, ((u32) n_sectors )* dev->sector_size[lun], cmd, sizeof(cmd), 1, &status, NULL,6); + is_read_write=0; + if(retval > 0 && status != 0) + retval = USBSTORAGE_ESTATUS; + return retval; +} + +s32 USBStorage_Read(usbstorage_handle *dev, u8 lun, u32 sector, u16 n_sectors, u8 *buffer) +{ +u32 max_sectors=n_sectors; +u32 sectors; +s32 ret=-1; + + if(((u32) n_sectors) * dev->sector_size[lun]>64*1024) max_sectors= 64*1024/dev->sector_size[lun]; // surely it fix a problem with some devices... + + while(n_sectors>0) + { + + sectors=n_sectors>max_sectors ? max_sectors: n_sectors; + ret=__USBStorage_Read(dev, lun, sector, sectors, buffer); + if(ret<0) return ret; + + n_sectors-=sectors; + sector+=sectors; + buffer+=sectors * dev->sector_size[lun]; + } + +return ret; +} + +s32 USBStorage_Write(usbstorage_handle *dev, u8 lun, u32 sector, u16 n_sectors, const u8 *buffer) +{ +u32 max_sectors=n_sectors; +u32 sectors; +s32 ret=-1; + + if(((u32) n_sectors) * dev->sector_size[lun]>64*1024) max_sectors=64*1024/dev->sector_size[lun]; // surely it fix a problem with some devices... + + while(n_sectors>0) + { + + sectors=n_sectors>max_sectors ? max_sectors: n_sectors; + ret=__USBStorage_Write(dev, lun, sector, sectors, buffer); + if(ret<0) return ret; + + n_sectors-=sectors; + sector+=sectors; + buffer+=sectors * dev->sector_size[lun]; + } + +return ret; +} + +/* +The following is for implementing the ioctl interface inpired by the disc_io.h +as used by libfat + +This opens the first lun of the first usbstorage device found. +*/ + + + +// temp function before libfat is available */ +s32 USBStorage_Try_Device(struct ehci_device *fd) +{ + int maxLun,j,retval; + int test_max_lun=1; + + __vid=0; + __pid=0; + __mounted = 0; + __lun = 0; + + try_status=-120; +// swi_mload_led_on(); + if(USBStorage_Open(&__usbfd, fd) < 0) + return -EINVAL; + + + maxLun= 1; + __usbfd.max_lun = 1; + + j=0; + + // fast re-mount + if(_old_device.mounted) + { + if(_old_device.use_maxlun || (force_flags & 1)) + { + __usbfd.max_lun = 0; + usb_timeout=10000*1000; + retval = __USB_CtrlMsgTimeout(&__usbfd, (USB_CTRLTYPE_DIR_DEVICE2HOST | USB_CTRLTYPE_TYPE_CLASS | USB_CTRLTYPE_REC_INTERFACE), + USBSTORAGE_GET_MAX_LUN, 0, __usbfd.interface, 1, &__usbfd.max_lun); + usb_timeout=1000*1000; + if(retval < 0) + { + __usbfd.max_lun = 1; + goto bad_mount; + } + else {__usbfd.max_lun++;} + + + + } + j=_old_device.lun; + + #ifdef MEM_PRINT + s_printf("Fast USBStorage_MountLUN %i#\n", j); + #endif + retval = USBStorage_MountLUN(&__usbfd, j); + #ifdef MEM_PRINT + s_printf("USBStorage_MountLUN: ret %i\n", retval); + #endif + if(retval == USBSTORAGE_ETIMEDOUT || retval==-ENODEV /*&& test_max_lun==0*/) + { + USBStorage_Reset(&__usbfd); + try_status=-121; + __mounted = 0; + USBStorage_Close(&__usbfd); + return -EINVAL; + + } + + if(retval < 0) goto bad_mount; + + __mounted = 1; + __lun = j; + usb_timeout=1000*1000; + try_status=0; +// swi_mload_led_off(); + + return 0; + } + + _old_device.use_maxlun=0; + //for(j = 0; j < maxLun; j++) + while(1) + { + if(!(force_flags & 1) || j!=0 || !test_max_lun) + { + #ifdef MEM_PRINT + s_printf("USBStorage_MountLUN %i#\n", j); + #endif + retval = USBStorage_MountLUN(&__usbfd, j); + #ifdef MEM_PRINT + s_printf("USBStorage_MountLUN: ret %i\n", retval); + #endif + + + if((retval == USBSTORAGE_ETIMEDOUT || retval==-ENODEV) && j!=0) + { + usb_timeout=1000*1000; + USBStorage_Reset(&__usbfd); + try_status=-121; + __mounted = 0; + USBStorage_Close(&__usbfd); + return -EINVAL; + // break; + } + } + else + {retval=-1;} // force get max lun before Mount LUN + + if(retval < 0) + { + if(test_max_lun) + { + unplug_device=0; + __usbfd.max_lun = 0; + + usb_timeout=10000*1000; + retval = __USB_CtrlMsgTimeout(&__usbfd, + (USB_CTRLTYPE_DIR_DEVICE2HOST | USB_CTRLTYPE_TYPE_CLASS | USB_CTRLTYPE_REC_INTERFACE), + USBSTORAGE_GET_MAX_LUN, 0, __usbfd.interface, 1, &__usbfd.max_lun); + usb_timeout=1000*1000; + if(retval < 0 ) + {__usbfd.max_lun = 1;unplug_device=0;} + else {__usbfd.max_lun++;_old_device.use_maxlun=1;} + maxLun = __usbfd.max_lun; + + #ifdef MEM_PRINT + s_printf("USBSTORAGE_GET_MAX_LUN ret %i maxlun %i\n", retval,maxLun); + #endif + if(!(force_flags & 1)) test_max_lun=0; + else if(retval >= 0 ) test_max_lun=0; + } + else j++; + + if(j>=maxLun) break; + continue; + } + + _old_device.mounted=1; + _old_device.lun=j; + + __vid=fd->desc.idVendor; + __pid=fd->desc.idProduct; + __mounted = 1; + __lun = j; + usb_timeout=1000*1000; + try_status=0; +// swi_mload_led_off(); + return 0; + } +bad_mount: + try_status=-122; + + USBStorage_Reset(&__usbfd); + __mounted = 0; + USBStorage_Close(&__usbfd); + + #ifdef MEM_PRINT + s_printf("USBStorage_MountLUN fail!!!\n"); + #endif + + return -EINVAL; +} + +void USBStorage_Umount(void) +{ +if(!ums_init_done) return; + /* + if(__mounted && !unplug_device) + { + if(__usbstorage_start_stop(&__usbfd, __lun, 0x0)==0) // stop + ehci_msleep(1000); + } +*/ + USBStorage_Close(&__usbfd);__lun= 16; + __mounted=0; + ums_init_done=0; + unplug_device=0; + memset(&_old_device,0,sizeof(_old_device)); +} + + +s32 USBStorage_Init(void) +{ + int i; + u32 status; + int ret; + + int from=0,to=0; + + //debug_printf("usbstorage init %d\n", ums_init_done); + + if(ums_init_done) + return 0; + + ehci_writel (0, &ehci->regs->intr_enable); + ehci_int_passive_callback(NULL); // interrupt port changes detection + + + + try_status=-1; + unplug_device=1; + __mounted=0; + use_alternative_timeout=1; + +#ifdef MEM_PRINT +s_printf("\n***************************************************\nRodries ehcmodule 1.0\nUSBStorage_Init()\n***************************************************\n\n"); + +#endif + +/*if(use_usb_port1!=0) + { + + struct ehci_device *dev = &ehci->devices[0]; + + + dev->port=0; + dev->id=0; + ret=ehci_reset_port(0); + } +*/ + if(use_usb_port1==1)from=to=1; + else if(use_usb_port1==2) + { + from=0; + to=1; + } + //current_port=use_usb_port1!=0; + //for(i = use_usb_port1!=0;i<(1+(use_usb_port1!=0))/*ehci->num_port*/; i++){ + for(i = from;i<=to; i++){ + + struct ehci_device *dev = &ehci->devices[i]; + + + + dev->port=i; + current_port=i; + + if(dev->id == 0) + { + + status = ehci_readl(&ehci->regs->port_status[i]); + if(!(status & 1)) + ehci_adquire_usb_port(i); + + status = ehci_readl(&ehci->regs->port_status[i]); + + + if(status & 1) + { + ret=ehci_reset_port(i); + if(ret==-1119 || ret==-1120) + { + try_status=ret; + continue; + } + ret=ehci_reset_port2(i); + ehci_msleep(20); + status=ehci_readl(&ehci->regs->port_status[i]); + + if(ret<0 || (status & 0x3905)!=0x1005) + ret=ehci_reset_port(i); + + + } + + } + if(dev->id != 0) + { + unplug_device=1; +/* + ret=ehci_reset_port(i); + if(ret==-1119 || ret==-1120) + { + try_status=ret; + continue; + } + ehci_msleep(20); + status=ehci_readl(&ehci->regs->port_status[i]); + + if(ret<0 || (status & 0x3105)!=0x1005) + { + ret=ehci_reset_port2(i); + ehci_msleep(20); + status=ehci_readl(&ehci->regs->port_status[i]); + } +*/ + unplug_device=1; + + //if(ret>=0 && (status & 0x3105)==0x1005 ) + // { + + if(USBStorage_Try_Device(dev)==0) + { + ums_init_done = 1;unplug_device=0; + ehci_int_passive_callback(passive_callback_hand); // interrupt port changes detection + ehci_writel (STS_PCD, &ehci->regs->intr_enable); + + s_printf("USBStorage_Init() Ok\n"); + ehci_msleep(100); + u8 *buf; + buf = (u8 *) USB_Alloc(2048); + usb_timeout=10000*1000; + extern bool enable_urb_debug; + enable_urb_debug=true; + ehci_writel (0, &ehci->regs->intr_enable); + ehci_int_passive_callback(NULL); + s_printf("Reading sector 0\n"); + ret=USBStorage_Read(&__usbfd, __lun, 0, 1, buf); + ehci_int_passive_callback(passive_callback_hand); + ehci_writel (STS_PCD, &ehci->regs->intr_enable); + enable_urb_debug=false; + usb_timeout=1000*1000; + USB_Free(buf); + if(ret<0) + s_printf("Error Reading sector 0\n"); + else + s_printf("OK Reading sector 0\n"); + if(ret<0) + { + ehci_release_port(i); + return -1118; + } + if(is_dvd) return i+2; // is DVD medium + return i; + // 0 -> port0 1 -> port1 2 -> dvdport0 3 -> dvdport1 + } + else ehci_release_port(i); + } + // } + /* + else + { + unplug_device=1; + status = ehci_readl(&ehci->regs->port_status[i]); + if(!(status & 1)) + { + ehci_adquire_usb_port(i); + s_printf("adquire port: %i\n",i); + } + status = ehci_readl(&ehci->regs->port_status[i]); + + #ifdef MEM_PRINT + s_printf("USBStorage_Init() status %x\n",status); + + #endif + + if(status & 1) + { + ret=ehci_reset_port2(i); + ehci_msleep(20); + status=ehci_readl(&ehci->regs->port_status[i]); + + if(ret<0 || (status & 0x3105)!=0x1005) + { + + ret=ehci_reset_port(i); + //status=ehci_readl(&ehci->regs->port_status[current_port]); + } + + + try_status=-101; + } + else + { + if(try_status==-1) try_status=-100; + } + }*/ + } + + ehci_int_passive_callback(passive_callback_hand); // interrupt port changes detection + ehci_writel (STS_PCD, &ehci->regs->intr_enable); + + return try_status; +} + +u32 USBStorage_Get_Capacity(u32*sector_size) +{ +if(sector_size) *sector_size = 0; + if(__mounted == 1 && __lun!=16) + { + if(sector_size){ + *sector_size = __usbfd.sector_size[__lun]; + } + return __usbfd.n_sector[__lun]; + } + return 0; +} + + +int fast_remount(void) +{ +int retval; +//u8 conf=0; +usb_devdesc udd; + +if(!ums_init_done) return -1009; + +// swi_mload_led_on(); + retval=0; + + __lun=16; + + if(use_alternative_timeout) usb_timeout=1000*1000; + else usb_timeout=200*1000; + + udd.configurations=NULL; + retval = USB_GetDescriptors(__usbfd.usb_fd, &udd); + + + if(_old_device.bDeviceClass!=udd.bDeviceClass || + _old_device.bDeviceSubClass!=udd.bDeviceSubClass || + _old_device.idVendor!=udd.idVendor || + _old_device.idProduct!=udd.idProduct || + _old_device.iManufacturer!=udd.iManufacturer || + _old_device.iProduct!=udd.iProduct || + _old_device.iSerialNumber!=udd.iSerialNumber) + { + + USB_FreeDescriptors(&udd); + #ifdef MEM_PRINT + s_printf("USBStorage_Open(): device changed!!!\n"); + + #endif + return -1009; + } + + + USB_FreeDescriptors(&udd); + + //if(USB_GetConfiguration(__usbfd.usb_fd, &conf) <0) return -1000; + + usb_timeout=10000*1000; + + if(USB_SetConfiguration(__usbfd.usb_fd, __usbfd.configuration) < 0) return -1001; + + if(__usbfd.altInterface != 0 && USB_SetAlternativeInterface(__usbfd.usb_fd, __usbfd.interface, __usbfd.altInterface) < 0) return -1002; + /* + + if((conf != __usbfd.configuration || (force_flags & 2)) && USB_SetConfiguration(__usbfd.usb_fd, __usbfd.configuration) < 0) return -1001; + + if(__usbfd.altInterface != 0 && USB_SetAlternativeInterface(__usbfd.usb_fd, __usbfd.interface, __usbfd.altInterface) < 0) return -1002; + */ + if(use_alternative_timeout) usb_timeout=1000*1000; + else usb_timeout=200*1000; + + //if( __usbstorage_reset(&__usbfd,0)<0) return -1003; + + usb_timeout=1000*1000; + + //if(_old_device.use_maxlun || (force_flags & 1)) + { + __usbfd.max_lun = 0; + + usb_timeout=10000*1000; + retval = __USB_CtrlMsgTimeout(&__usbfd, (USB_CTRLTYPE_DIR_DEVICE2HOST | USB_CTRLTYPE_TYPE_CLASS | USB_CTRLTYPE_REC_INTERFACE), + USBSTORAGE_GET_MAX_LUN, 0, __usbfd.interface, 1, &__usbfd.max_lun); + usb_timeout=1000*1000; + if(retval < 0) + { + __usbfd.max_lun = 1; + __usbstorage_reset(&__usbfd,0); + return -1004; + } + else {__usbfd.max_lun++;} + + + } + //retval = USBStorage_MountLUN(&__usbfd, _old_device.lun); + + usb_timeout=20000*1000; + retval = __usbstorage_clearerrors(&__usbfd, _old_device.lun); + #ifdef MEM_PRINT + // s_printf(" Clear error ret %i\n",retval); + #endif + usb_timeout=1000*1000; + if(retval<0) return -1005; + + + retval = USBStorage_Inquiry(&__usbfd, _old_device.lun); + #ifdef MEM_PRINT + // s_printf(" Inquiry ret %i\n",retval); + #endif + + + if(retval<0) return -1006; + + __lun=_old_device.lun; + __mounted=1; + + +return retval; +} + + +int unplug_procedure(void) +{ +int retval=1; +u32 status; + +current_port=use_usb_port1!=0; + if(unplug_device!=0 ) + { + + // unplug detection method + + status=ehci_readl(&ehci->regs->port_status[current_port]); + if(!(status & 1)) + { + /* + int n; + for(n=0;n<3;n++) + { + swi_mload_led_on();ehci_msleep(100);swi_mload_led_off();ehci_msleep(100); + } + ehci_msleep(500); +*/ + return 1; + } + + ehci_writel (0, &ehci->regs->intr_enable); // disable interrupts + ehci_int_passive_callback(NULL); + + + if(1) + { + int ret; + + + ret=ehci_reset_port2(current_port); + //if(ret<0) ehci_reset_port(current_port); + + if(ret<0) ret=ehci_reset_port2(current_port); + + + ehci_msleep(60); + status=ehci_readl(&ehci->regs->port_status[current_port]); + + #ifdef MEM_PRINT + + //s_printf("Unplug: reset_port ret %i port status %x\n", ret, status); + s_printf("Unplug: reset %i status %x\n", ret, status); + + #endif + + unplug_device=1; + + if(ret>=0 && (status & 0x3105)==0x1005 ) + { + + + /*if(__usbfd.buffer != NULL) + USB_Free(__usbfd.buffer); + __usbfd.buffer= NULL;*/ + __mounted=0;unplug_device=0; + USBStorage_Close(&__usbfd); + + + retval=fast_remount(); + usb_timeout=1000*1000; + if(retval>=0) + { + #ifdef MEM_PRINT + + //s_printf("fast_remount OK\n"); + + #endif + +// swi_mload_led_off(); + retval=0;unplug_device=0;__mounted=1; + ehci_int_passive_callback(passive_callback_hand); // interrupt port changes detection + ehci_writel (STS_PCD, &ehci->regs->intr_enable); + } + else { + unplug_device=1; + #ifdef MEM_PRINT + + s_printf("fast_remount KO ret %i\n", ret); + + #endif + __mounted=0; + retval=1; + //swi_mload_led_off(); + ehci_msleep(100); + ehci_int_passive_callback(passive_callback_hand); + ehci_writel (STS_PCD, &ehci->regs->intr_enable); + } + //if(USBStorage_Try_Device(&ehci->devices[0])==0) {retval=0;unplug_device=0;} else unplug_device=1; + + } + } + ehci_msleep(100); + } + +return retval; +} + +int USBStorage_DVD_Test(void) +{ + +int retval; + + if(!ums_init_done) return 0; + unplug_procedure(); + if(unplug_device!=0 || __mounted==0) return 0; + +// usb_timeout=1000*1000; +// retval = __usbstorage_clearerrors(&__usbfd, _old_device.lun); +// if(retval<0) return 0; + usb_timeout=1000*1000; + retval = USBStorage_Inquiry(&__usbfd, _old_device.lun); + if(retval<0) return 0; + usb_timeout=1000*1000; + retval = USBStorage_ReadCapacity(&__usbfd, _old_device.lun, &__usbfd.sector_size[_old_device.lun], &__usbfd.n_sector[_old_device.lun]); + if(retval<0) return 0; + // sector size check for USB DVD mode (must be 2048 bytes) + + if(retval>=0 && is_dvd) + { + if(__usbfd.sector_size[_old_device.lun]!=2048) return 0; + } + + + if(!is_dvd) return 0; + +return 1; +} + +int is_watchdog_read_sector=0; + + +extern int test_mode; + +extern int last_sector; + +s32 USBStorage_Read_Sectors(u32 sector, u32 numSectors, void *buffer) +{ + s32 retval=0; + int retry; + + + if(!is_watchdog_read_sector && is_dvd) last_sector=(int) (sector & 0x7fffffff);//return false; + + if(test_mode && unplug_device>=2) + { + unplug_device=1; + return false; + } + + + for(retry=0;retry<4;retry++) + { + //if(!is_watchdog_read_sector && !is_dvd) retry=0; // infinite loop except for watchdog + + + if(!unplug_procedure()) + { + retval=0; + } + + if(test_mode && unplug_device==3) break; + + if(retval<0 || __mounted != 1) + { + unplug_device=1; + retval=-1; + } + + if(unplug_device!=0 ) { continue;} + + if(is_dvd) + usb_timeout=10000*1000; + else + usb_timeout=3000*1000; + + if(retval >= 0) + { + + ehci_int_passive_callback(NULL); + ehci_writel (0, &ehci->regs->intr_enable); + + retval = USBStorage_Read(&__usbfd, __lun, sector, numSectors, buffer); + + ehci_int_passive_callback(passive_callback_hand); + ehci_writel (STS_PCD, &ehci->regs->intr_enable); + } + + + usb_timeout=1000*1000; + + if(retval<0) unplug_device=1; + + if(test_mode && unplug_device!=0 ) {retval=-1;/*__mounted=0;*/break;} + + if(unplug_device!=0 || __mounted != 1) continue; + + if(retval>=0) break; + + } + + if(retval < 0) + return false; + return true; +} + + +s32 USBStorage_Write_Sectors(u32 sector, u32 numSectors, const void *buffer) +{ + s32 retval=0; + + if(is_dvd) return false; // quieto!!! + + while(1) + { + + if(!unplug_procedure()) + { + retval=0; + } + + if(retval<0 || __mounted != 1) + { + unplug_device=1; + retval=-1; + } + + if(unplug_device!=0 ) continue; + + usb_timeout=3000*1000; + + if(retval >=0) + { + ehci_writel (0, &ehci->regs->intr_enable); + ehci_int_passive_callback(NULL); + + retval = USBStorage_Write(&__usbfd, __lun, sector, numSectors, buffer); + + ehci_int_passive_callback(passive_callback_hand); + ehci_writel (STS_PCD, &ehci->regs->intr_enable); + } + + usb_timeout=1000*1000; + if(retval<0) unplug_device=1; + + if(unplug_device!=0 ) continue; + if(retval>=0) break; + } + + + if(retval < 0) + return false; + return true; +} + diff --git a/tinyehci/usbstorage.h b/tinyehci/usbstorage.h new file mode 100644 index 00000000..4ed87ddf --- /dev/null +++ b/tinyehci/usbstorage.h @@ -0,0 +1,78 @@ +#ifndef __USBSTORAGE_H__ +#define __USBSTORAGE_H__ + + +#ifdef __cplusplus + extern "C" { +#endif /* __cplusplus */ + +#include "ehci.h" + + +#define USBSTORAGE_OK 0 +#define USBSTORAGE_ENOINTERFACE -10000 +#define USBSTORAGE_ESENSE -10001 +#define USBSTORAGE_ESHORTWRITE -10002 +#define USBSTORAGE_ESHORTREAD -10003 +#define USBSTORAGE_ESIGNATURE -10004 +#define USBSTORAGE_ETAG -10005 +#define USBSTORAGE_ESTATUS -10006 +#define USBSTORAGE_EDATARESIDUE -10007 +#define USBSTORAGE_ETIMEDOUT -ETIMEDOUT +#define USBSTORAGE_EINIT -10009 + +typedef struct +{ + u8 configuration; + u32 interface; + u32 altInterface; + + u8 ep_in; + u8 ep_out; + + u8 max_lun; + u32 sector_size[16]; + u32 n_sector[16]; + + struct ehci_device * usb_fd; + + //mutex_t lock; + //cond_t cond; + s32 retval; + + u32 tag; + u8 ata_protocol; + + u8 *buffer; +} usbstorage_handle; + +s32 USBStorage_Init(void); +void USBStorage_Umount(void); + +s32 USBStorage_Open(usbstorage_handle *dev, struct ehci_device *fd); +s32 USBStorage_Close(usbstorage_handle *dev); +s32 USBStorage_Reset(usbstorage_handle *dev); + +s32 USBStorage_GetMaxLUN(usbstorage_handle *dev); +s32 USBStorage_MountLUN(usbstorage_handle *dev, u8 lun); +s32 USBStorage_Suspend(usbstorage_handle *dev); + +s32 USBStorage_ReadCapacity(usbstorage_handle *dev, u8 lun, u32 *sector_size, u32 *n_sectors); +s32 USBStorage_Read(usbstorage_handle *dev, u8 lun, u32 sector, u16 n_sectors, u8 *buffer); +s32 USBStorage_Write(usbstorage_handle *dev, u8 lun, u32 sector, u16 n_sectors, const u8 *buffer); +s32 USBStorage_Inquiry(usbstorage_handle *dev, u8 lun); + +s32 USBStorage_Read_Sectors(u32 sector, u32 numSectors, void *buffer); +s32 USBStorage_Write_Sectors(u32 sector, u32 numSectors, const void *buffer); + +#define DEVICE_TYPE_WII_USB (('W'<<24)|('U'<<16)|('S'<<8)|'B') + +s32 USBStorage_Try_Device(struct ehci_device *fd); + + +#ifdef __cplusplus + } +#endif /* __cplusplus */ + + +#endif /* __USBSTORAGE_H__ */ diff --git a/wii_wbfs/libwbfs.c b/wii_wbfs/libwbfs.c new file mode 100644 index 00000000..c9f41294 --- /dev/null +++ b/wii_wbfs/libwbfs.c @@ -0,0 +1,486 @@ +// Copyright 2009 Kwiirk +// Licensed under the terms of the GNU GPL, version 2 +// http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt + +#include "libwbfs.h" + + +#define likely(x) __builtin_expect(!!(x), 1) +#define unlikely(x) __builtin_expect(!!(x), 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))) +static int force_mode=0; +void wbfs_set_force_mode(int force) +{ + force_mode = force; +} +static u8 size_to_shift(u32 size) +{ + u8 ret = 0; + while(size) + { + ret++; + size>>=1; + } + return ret-1; +} +#define read_le32_unaligned(x) ((x)[0]|((x)[1]<<8)|((x)[2]<<16)|((x)[3]<<24)) + +static u8 *last_sect_buff=0; + +static u32 last_sect=0xffffffff; +static int my_hd_sector_size=0; + +wbfs_t*wbfs_open_hd(rw_sector_callback_t read_hdsector, + rw_sector_callback_t write_hdsector, + void *callback_data, + int hd_sector_size, int num_hd_sector __attribute((unused)), int partition, int reset) +{ + int i=num_hd_sector,ret; + u8 *ptr,*tmp_buffer = wbfs_ioalloc(hd_sector_size); + u8 part_table[16*4]; + u32 last_lba=0xFFFFFFFF; + int l=0; + last_sect=0xffffffff; + if(!last_sect_buff) last_sect_buff = wbfs_ioalloc(hd_sector_size); + my_hd_sector_size=hd_sector_size; + ret = read_hdsector(callback_data,0,1,tmp_buffer); + if(ret) + { + wbfs_iofree(tmp_buffer); + return 0; + } + //find wbfs partition + if(tmp_buffer[0x1fe]!=0x55 || tmp_buffer[0x1ff]!=0xaa + || !strncmp((void *) &tmp_buffer[3],"NTFS",4) + || !strncmp((void *) &tmp_buffer[0x36],"FAT",3) + || !strncmp((void *) &tmp_buffer[0x52],"FAT",3) + ) wbfs_memset(part_table,0,16*4); + else wbfs_memcpy(part_table,tmp_buffer+0x1be,16*4); + + ptr = part_table; + + + + for(i=0;i<4;i++,ptr+=16) + { + u32 part_lba = read_le32_unaligned(ptr+0x8); + wbfs_head_t *head = (wbfs_head_t *)tmp_buffer; + + #if 1 + if(head->magic != wbfs_htonl(WBFS_MAGIC)) if(ptr[4]==0) continue; + + if(ptr[4]==0xf) + { + u32 part_lba2=part_lba; + u32 next_lba2=0; + int n; + + for(n=0;n<8;n++) // max 8 logic partitions (i think it is sufficient!) + { + ret = read_hdsector(callback_data,part_lba+next_lba2 ,1,tmp_buffer); + if(ret) + { + wbfs_iofree(tmp_buffer); + return 0; + } + + part_lba2=part_lba+next_lba2+read_le32_unaligned(tmp_buffer+0x1C6); + next_lba2=read_le32_unaligned(tmp_buffer+0x1D6); + + ret = read_hdsector(callback_data,part_lba2,1,tmp_buffer); + if(ret) + { + wbfs_iofree(tmp_buffer); + return 0; + } + // verify there is the magic. + if (head->magic == wbfs_htonl(WBFS_MAGIC)) + { + + if(l==partition) + { + wbfs_t*p = wbfs_open_partition(read_hdsector,write_hdsector, + callback_data,hd_sector_size,0,part_lba2,reset); + wbfs_iofree(tmp_buffer); + return p; + } + else + { + if(part_lba2!=last_lba) {l++;last_lba=part_lba2;} + } + } + + if(next_lba2==0) break; + } + } + else + #endif + { + ret = read_hdsector(callback_data,part_lba,1,tmp_buffer); + + if(ret) + { + wbfs_iofree(tmp_buffer); + return 0; + } + // verify there is the magic. + if (head->magic == wbfs_htonl(WBFS_MAGIC)) + { + + if(l==partition) + { + wbfs_t*p = wbfs_open_partition(read_hdsector,write_hdsector, + callback_data,hd_sector_size,0,part_lba,reset); + wbfs_iofree(tmp_buffer); + return p; + } + else + { + if(part_lba!=last_lba) {l++;last_lba=part_lba;} + } + + } + } + } + if(reset)// XXX make a empty hd partition.. + { + } + wbfs_iofree(tmp_buffer); + return 0; +} + + +wbfs_t*wbfs_open_partition(rw_sector_callback_t read_hdsector, + rw_sector_callback_t write_hdsector, + void *callback_data, + int hd_sector_size, int num_hd_sector, u32 part_lba, int reset) +{ + wbfs_t *p = wbfs_malloc(sizeof(wbfs_t)); + + wbfs_head_t *head = wbfs_ioalloc(hd_sector_size?hd_sector_size:512); + + //constants, but put here for consistancy + p->wii_sec_sz = 0x8000; + p->wii_sec_sz_s = size_to_shift(0x8000); + // p->n_wii_sec = (num_hd_sector/0x8000)*hd_sector_size; + p->n_wii_sec_per_disc = 143432*2;//support for double layers discs.. + p->head = head; + p->part_lba = part_lba; + + my_hd_sector_size=hd_sector_size; + + p->n_wii_sec =(u32) ((u64) num_hd_sector)/ ((u64) 0x8000); + p->n_wii_sec=(u32) ( ((u64) p->n_wii_sec) * ((u64) hd_sector_size) ); + + // init the partition + if (reset) + { + u8 sz_s; + wbfs_memset(head,0,hd_sector_size); + head->magic = wbfs_htonl(WBFS_MAGIC); + head->hd_sec_sz_s = size_to_shift(hd_sector_size); + head->n_hd_sec = wbfs_htonl(num_hd_sector); + // choose minimum wblk_sz that fits this partition size + for(sz_s=6;sz_s<11;sz_s++) + { + // ensure that wbfs_sec_sz is big enough to address every blocks using 16 bits + if(p->n_wii_sec <((1U<<16)*(1<wbfs_sec_sz_s = sz_s+p->wii_sec_sz_s; + }else + read_hdsector(callback_data,p->part_lba,1,head); + if (head->magic != wbfs_htonl(WBFS_MAGIC)) + ERROR("bad magic"); + if(!force_mode && hd_sector_size && head->hd_sec_sz_s != size_to_shift(hd_sector_size)) + ERROR("hd sector size doesn't match"); + if(!force_mode && num_hd_sector && head->n_hd_sec != wbfs_htonl(num_hd_sector)) + ERROR("hd num sector doesn't match"); + p->hd_sec_sz = 1<hd_sec_sz_s; + p->hd_sec_sz_s = head->hd_sec_sz_s; + p->n_hd_sec = wbfs_ntohl(head->n_hd_sec); + + p->n_wii_sec = (p->n_hd_sec/p->wii_sec_sz)*(p->hd_sec_sz); + + p->wbfs_sec_sz_s = head->wbfs_sec_sz_s; + p->wbfs_sec_sz = 1<wbfs_sec_sz_s; + p->n_wbfs_sec = p->n_wii_sec >> (p->wbfs_sec_sz_s - p->wii_sec_sz_s); + p->n_wbfs_sec_per_disc = p->n_wii_sec_per_disc >> (p->wbfs_sec_sz_s - p->wii_sec_sz_s); + p->disc_info_sz = ALIGN_LBA(sizeof(wbfs_disc_info_t) + p->n_wbfs_sec_per_disc*2); + + //printf("hd_sector_size %X wii_sector size %X wbfs sector_size %X\n",p->hd_sec_sz,p->wii_sec_sz,p->wbfs_sec_sz); + p->read_hdsector = read_hdsector; + p->write_hdsector = write_hdsector; + p->callback_data = callback_data; + + p->freeblks_lba = (p->wbfs_sec_sz - p->n_wbfs_sec/8)>>p->hd_sec_sz_s; + + if(!reset) + p->freeblks = 0; // will alloc and read only if needed + else + { + // init with all free blocks + p->freeblks = wbfs_ioalloc(ALIGN_LBA(p->n_wbfs_sec/8)); + wbfs_memset(p->freeblks,0xff,p->n_wbfs_sec/8); + } + p->max_disc = (p->freeblks_lba-1)/(p->disc_info_sz>>p->hd_sec_sz_s); + if(p->max_disc > p->hd_sec_sz - sizeof(wbfs_head_t)) + p->max_disc = p->hd_sec_sz - sizeof(wbfs_head_t); + + p->tmp_buffer = wbfs_ioalloc(p->hd_sec_sz); + p->n_disc_open = 0; + return p; +error: + wbfs_free(p); + wbfs_iofree(head); + return 0; + +} + + + +void wbfs_close(wbfs_t*p) +{ + + if(p->n_disc_open) + ERROR("trying to close wbfs while discs still open"); + + wbfs_iofree(p->head); + wbfs_iofree(p->tmp_buffer); + if(p->freeblks) + wbfs_iofree(p->freeblks); + + wbfs_free(p); + +error: + return; +} + + +wbfs_disc_t *wbfs_open_disc(wbfs_t* p, u8 *discid) +{ + u32 i; + int disc_info_sz_lba = p->disc_info_sz>>p->hd_sec_sz_s; + wbfs_disc_t *d = 0; + last_sect=0xffffffff; + for(i=0;imax_disc;i++) + { + if (p->head->disc_table[i]){ + p->read_hdsector(p->callback_data, + p->part_lba+1+i*disc_info_sz_lba,1,p->tmp_buffer); + if(wbfs_memcmp(discid,p->tmp_buffer,6)==0){ + d = wbfs_malloc(sizeof(*d)); + if(!d) + ERROR("allocating memory"); + d->p = p; + d->i = i; + d->header = wbfs_ioalloc(p->disc_info_sz); + if(!d->header) + ERROR("allocating memory"); + p->read_hdsector(p->callback_data, + p->part_lba+1+i*disc_info_sz_lba, + disc_info_sz_lba,d->header); + p->n_disc_open ++; +// for(i=0;in_wbfs_sec_per_disc;i++) +// printf("%d,",wbfs_ntohs(d->header->wlba_table[i])); + return d; + } + } + } + return 0; +error: + if(d) + wbfs_iofree(d); + return 0; + +} +void wbfs_close_disc(wbfs_disc_t*d) +{ + d->p->n_disc_open --; + wbfs_iofree(d->header); + wbfs_free(d); +} +// 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, u8 *data, u32 len) +{ + + wbfs_t *p = d->p; + u16 wlba = offset>>(p->wbfs_sec_sz_s-2); + u32 iwlba_shift = p->wbfs_sec_sz_s - p->hd_sec_sz_s; + u32 lba_mask = (p->wbfs_sec_sz-1)>>(p->hd_sec_sz_s); + u32 lba = (offset>>(p->hd_sec_sz_s-2))&lba_mask; + u32 off = offset&((p->hd_sec_sz>>2)-1); + u16 iwlba = wbfs_ntohs(d->header->wlba_table[wlba]); + u32 len_copied; + int err = 0; + u8 *ptr = data; + if(unlikely(iwlba==0)) + return 1; + if(unlikely(off)){ + off*=4; + + if(last_sect==(p->part_lba + (iwlba<tmp_buffer, last_sect_buff, my_hd_sector_size); + } + else + { + err = p->read_hdsector(p->callback_data, + p->part_lba + (iwlba<tmp_buffer); + if(err) + return err; + + last_sect=(p->part_lba + (iwlba<tmp_buffer, my_hd_sector_size); + } + + len_copied = p->hd_sec_sz - off; + if(likely(len < len_copied)) + len_copied = len; + wbfs_memcpy(ptr, p->tmp_buffer + off, len_copied); + len -= len_copied; + ptr += len_copied; + lba++; + if(unlikely(lba>lba_mask && len)){ + lba=0; + iwlba = wbfs_ntohs(d->header->wlba_table[++wlba]); + if(unlikely(iwlba==0)) + return 1; + } + } + while(likely(len>=p->hd_sec_sz)) + { + u32 nlb = len>>(p->hd_sec_sz_s); + + if(unlikely(lba + nlb > p->wbfs_sec_sz)) // dont cross wbfs sectors.. + nlb = p->wbfs_sec_sz-lba; + err = p->read_hdsector(p->callback_data, + p->part_lba + (iwlba<hd_sec_sz_s; + ptr += nlb<hd_sec_sz_s; + lba += nlb; + if(unlikely(lba>lba_mask && len)){ + lba = 0; + iwlba =wbfs_ntohs(d->header->wlba_table[++wlba]); + if(unlikely(iwlba==0)) + return 1; + } + } + if(unlikely(len)){ + err = p->read_hdsector(p->callback_data, + p->part_lba + (iwlba<tmp_buffer); + if(err) + return err; + last_sect=(p->part_lba + (iwlba<tmp_buffer, my_hd_sector_size); + wbfs_memcpy(ptr, p->tmp_buffer, len); + } + return 0; +} +// hermes +int wbfs_disc_read2(wbfs_disc_t*d,u32 offset, u8 *data, u32 len) +{ + + wbfs_t *p = d->p; + u16 wlba = offset>>(p->wbfs_sec_sz_s-2); + u32 iwlba_shift = p->wbfs_sec_sz_s - p->hd_sec_sz_s; + u32 lba_mask = (p->wbfs_sec_sz-1)>>(p->hd_sec_sz_s); + u32 lba = (offset>>(p->hd_sec_sz_s-2))&lba_mask; + u32 off = offset&((p->hd_sec_sz>>2)-1); + u16 iwlba = wbfs_ntohs(d->header->wlba_table[wlba]); + u32 len_copied; + int err = 0; + u8 *ptr = data; + + + if(unlikely(off)){ + off*=4; + + if(unlikely(iwlba==0)) + { + len_copied = p->hd_sec_sz - off; + + if(likely(len < len_copied)) + len_copied = len; + wbfs_memset(ptr, 0, len_copied); + len -= len_copied; + ptr += len_copied; + lba++; + } + else + { + err = p->read_hdsector(p->callback_data, + p->part_lba + (iwlba<tmp_buffer); + if(err) + return err; + len_copied = p->hd_sec_sz - off; + if(likely(len < len_copied)) + len_copied = len; + wbfs_memcpy(ptr, p->tmp_buffer + off, len_copied); + len -= len_copied; + ptr += len_copied; + lba++; + if(unlikely(lba>lba_mask && len && unlikely(iwlba!=0))){ + lba=0; + iwlba = wbfs_ntohs(d->header->wlba_table[++wlba]); + //if(unlikely(iwlba==0)) + // return 1; + } + } + } + + while(likely(len>=p->hd_sec_sz)) + { + u32 nlb = len>>(p->hd_sec_sz_s); + + + if(unlikely(lba + nlb > p->wbfs_sec_sz)) // dont cross wbfs sectors.. + nlb = p->wbfs_sec_sz-lba; + + if(unlikely(iwlba==0)) + { + wbfs_memset(ptr, 0, nlb<hd_sec_sz_s); + } + else + { + err = p->read_hdsector(p->callback_data, + p->part_lba + (iwlba<hd_sec_sz_s; + ptr += nlb<hd_sec_sz_s; + lba += nlb; + if(!unlikely(iwlba==0)) + { + + if(unlikely(lba>lba_mask && len && unlikely(iwlba!=0))){ + lba = 0; + iwlba =wbfs_ntohs(d->header->wlba_table[++wlba]); + /* if(unlikely(iwlba==0)) + return 1;*/ + } + } + } + if(unlikely(len)){ + if(!unlikely(iwlba==0)) + { + err = p->read_hdsector(p->callback_data, + p->part_lba + (iwlba<tmp_buffer); + if(err) + return err; + wbfs_memcpy(ptr, p->tmp_buffer, len); + } + else wbfs_memset(ptr, 0, len); + + } + return 0; +} + + + diff --git a/wii_wbfs/libwbfs.h b/wii_wbfs/libwbfs.h new file mode 100644 index 00000000..7526ad40 --- /dev/null +++ b/wii_wbfs/libwbfs.h @@ -0,0 +1,216 @@ +#ifndef LIBWBFS_H +#define LIBWBFS_H + +#include "libwbfs_os.h" // this file is provided by the project wanting to compile libwbfs +#include "wiidisc.h" + +#ifdef __cplusplus + extern "C" { +#endif /* __cplusplus */ + +typedef u32 be32_t; +typedef u16 be16_t; + + + +typedef struct wbfs_head +{ + be32_t magic; + // parameters copied in the partition for easy dumping, and bug reports + be32_t n_hd_sec; // total number of hd_sec in this partition + u8 hd_sec_sz_s; // sector size in this partition + u8 wbfs_sec_sz_s; // size of a wbfs sec + u8 padding3[2]; + u8 disc_table[0]; // size depends on hd sector size +}__attribute((packed)) wbfs_head_t ; + +typedef struct wbfs_disc_info +{ + u8 disc_header_copy[0x100]; + be16_t wlba_table[0]; +}wbfs_disc_info_t; + +// WBFS first wbfs_sector structure: +// +// ----------- +// | wbfs_head | (hd_sec_sz) +// ----------- +// | | +// | disc_info | +// | | +// ----------- +// | | +// | disc_info | +// | | +// ----------- +// | | +// | ... | +// | | +// ----------- +// | | +// | disc_info | +// | | +// ----------- +// | | +// |freeblk_tbl| +// | | +// ----------- +// + +// callback definition. Return 1 on fatal error (callback is supposed to make retries until no hopes..) +typedef int (*rw_sector_callback_t)(void*fp,u32 lba,u32 count,void*iobuf); +typedef void (*progress_callback_t)(int status,int total); + + +typedef struct wbfs_s +{ + wbfs_head_t *head; + + /* hdsectors, the size of the sector provided by the hosting hard drive */ + u32 hd_sec_sz; + u8 hd_sec_sz_s; // the power of two of the last number + u32 n_hd_sec; // the number of hd sector in the wbfs partition + + /* standard wii sector (0x8000 bytes) */ + u32 wii_sec_sz; + u8 wii_sec_sz_s; + u32 n_wii_sec; + u32 n_wii_sec_per_disc; + + /* The size of a wbfs sector */ + u32 wbfs_sec_sz; + u32 wbfs_sec_sz_s; + u16 n_wbfs_sec; // this must fit in 16 bit! + u16 n_wbfs_sec_per_disc; // size of the lookup table + + u32 part_lba; + /* virtual methods to read write the partition */ + rw_sector_callback_t read_hdsector; + rw_sector_callback_t write_hdsector; + void *callback_data; + + u16 max_disc; + u32 freeblks_lba; + u32 *freeblks; + u16 disc_info_sz; + + u8 *tmp_buffer; // pre-allocated buffer for unaligned read + + u32 n_disc_open; + +}wbfs_t; + +typedef struct wbfs_disc_s +{ + wbfs_t *p; + wbfs_disc_info_t *header; // pointer to wii header + int i; // disc index in the wbfs header (disc_table) +}wbfs_disc_t; + + +#define WBFS_MAGIC (('W'<<24)|('B'<<16)|('F'<<8)|('S')) + +/*! @brief open a MSDOS partitionned harddrive. This tries to find a wbfs partition into the harddrive + @param read_hdsector,write_hdsector: accessors to a harddrive + @hd_sector_size: size of the hd sector. Can be set to zero if the partition in already initialized + @num_hd_sector: number of sectors in this disc. Can be set to zero if the partition in already initialized + @reset: not implemented, This will format the whole harddrive with one wbfs partition that fits the whole disk. + calls wbfs_error() to have textual meaning of errors + @return NULL in case of error +*/ +wbfs_t*wbfs_open_hd(rw_sector_callback_t read_hdsector, + rw_sector_callback_t write_hdsector, + void *callback_data, + int hd_sector_size, int num_hd_sector, int partition, int reset); + +/*! @brief open a wbfs partition + @param read_hdsector,write_hdsector: accessors to the partition + @hd_sector_size: size of the hd sector. Can be set to zero if the partition in already initialized + @num_hd_sector: number of sectors in this partition. Can be set to zero if the partition in already initialized + @partition_lba: The partitio offset if you provided accessors to the whole disc. + @reset: initialize the partition with an empty wbfs. + calls wbfs_error() to have textual meaning of errors + @return NULL in case of error +*/ +wbfs_t*wbfs_open_partition(rw_sector_callback_t read_hdsector, + rw_sector_callback_t write_hdsector, + void *callback_data, + int hd_sector_size, int num_hd_sector, u32 partition_lba, int reset); + + +/*! @brief close a wbfs partition, and sync the metadatas to the disc */ +void wbfs_close(wbfs_t*); + +/*! @brief open a disc inside a wbfs partition use a 6 char discid+vendorid + @return NULL if discid is not present +*/ +wbfs_disc_t *wbfs_open_disc(wbfs_t* p, u8 *diskid); + +/*! @brief close a already open disc inside a wbfs partition */ +void wbfs_close_disc(wbfs_disc_t*d); + +u32 wbfs_sector_used(wbfs_t *p,wbfs_disc_info_t *di); + +/*! @brief accessor to the wii disc + @param d: a pointer to already open disc + @param offset: an offset inside the disc, *points 32bit words*, allowing to access 16GB data + @param len: The length of the data to fetch, 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, u8 *data, u32 len); +int wbfs_disc_write(wbfs_disc_t*d,u32 offset, u8 *data, u32 len); +/*! @return the number of discs inside the paritition */ +u32 wbfs_count_discs(wbfs_t*p); +/*! get the disc info of ith disc inside the partition. It correspond to the first 0x100 bytes of the wiidvd + http://www.wiibrew.org/wiki/Wiidisc#Header + @param i: index of the disc inside the partition + @param header: pointer to 0x100 bytes to write the header + @size: optional pointer to a 32bit word that will get the size in 32bit words of the DVD taken on the partition. +*/ +u32 wbfs_get_disc_info(wbfs_t*p, u32 i,u8 *header,int header_size,u32 *size); + +/*! get the number of used block of the partition. + to be multiplied by p->wbfs_sec_sz (use 64bit multiplication) to have the number in bytes +*/ +u32 wbfs_count_usedblocks(wbfs_t*p); + +/******************* write access ******************/ + +/*! add a wii dvd inside the partition + @param read_src_wii_disc: a callback to access the wii dvd. offsets are in 32bit, len in bytes! + @callback_data: private data passed to the callback + @spinner: a pointer to a function that is regulary called to update a progress bar. + @sel: selects which partitions to copy. + @copy_1_1: makes a 1:1 copy, whenever a game would not use the wii disc format, and some data is hidden outside the filesystem. + */ +u32 wbfs_add_disc(wbfs_t*p,read_wiidisc_callback_t read_src_wii_disc, void *callback_data, + progress_callback_t spinner,partition_selector_t sel,int copy_1_1); + + +/*! remove a wiidvd inside a partition */ +u32 wbfs_rm_disc(wbfs_t*p, u8* discid); + + +/*! trim the file-system to its minimum size + This allows to use wbfs as a wiidisc container + */ +u32 wbfs_trim(wbfs_t*p); + +/*! extract a disc from the wbfs, unused sectors are just untouched, allowing descent filesystem to only really usefull space to store the disc. +Even if the filesize is 4.7GB, the disc usage will be less. + */ +u32 wbfs_extract_disc(wbfs_disc_t*d, rw_sector_callback_t write_dst_wii_sector,void *callback_data,progress_callback_t spinner); + +/*! extract a file from the wii disc filesystem. + E.G. Allows to extract the opening.bnr to install a game as a system menu channel + */ +u32 wbfs_extract_file(wbfs_disc_t*d, char *path); + +// remove some sanity checks +void wbfs_set_force_mode(int force); + +#ifdef __cplusplus + } +#endif /* __cplusplus */ + +#endif diff --git a/wii_wbfs/rijndael.c b/wii_wbfs/rijndael.c new file mode 100644 index 00000000..baf8c871 --- /dev/null +++ b/wii_wbfs/rijndael.c @@ -0,0 +1,398 @@ +/* Rijndael Block Cipher - rijndael.c + + Written by Mike Scott 21st April 1999 + mike@compapp.dcu.ie + + Permission for free direct or derivative use is granted subject + to compliance with any conditions that the originators of the + algorithm place on its exploitation. + +*/ + +#include +#include + +#define u8 unsigned char /* 8 bits */ +#define u32 unsigned long /* 32 bits */ +#define u64 unsigned long long + +/* rotates x one bit to the left */ + +#define ROTL(x) (((x)>>7)|((x)<<1)) + +/* Rotates 32-bit word left by 1, 2 or 3 byte */ + +#define ROTL8(x) (((x)<<8)|((x)>>24)) +#define ROTL16(x) (((x)<<16)|((x)>>16)) +#define ROTL24(x) (((x)<<24)|((x)>>8)) + +/* Fixed Data */ + +static u8 InCo[4]={0xB,0xD,0x9,0xE}; /* Inverse Coefficients */ + +static u8 fbsub[256]; +static u8 rbsub[256]; +static u8 ptab[256],ltab[256]; +static u32 ftable[256]; +static u32 rtable[256]; +static u32 rco[30]; + +/* Parameter-dependent data */ + +int Nk,Nb,Nr; +u8 fi[24],ri[24]; +u32 fkey[120]; +u32 rkey[120]; + +static u32 pack(u8 *b) +{ /* pack bytes into a 32-bit Word */ + return ((u32)b[3]<<24)|((u32)b[2]<<16)|((u32)b[1]<<8)|(u32)b[0]; +} + +static void unpack(u32 a,u8 *b) +{ /* unpack bytes from a word */ + b[0]=(u8)a; + b[1]=(u8)(a>>8); + b[2]=(u8)(a>>16); + b[3]=(u8)(a>>24); +} + +static u8 xtime(u8 a) +{ + u8 b; + if (a&0x80) b=0x1B; + else b=0; + a<<=1; + a^=b; + return a; +} + +static u8 bmul(u8 x,u8 y) +{ /* x.y= AntiLog(Log(x) + Log(y)) */ + if (x && y) return ptab[(ltab[x]+ltab[y])%255]; + else return 0; +} + +static u32 SubByte(u32 a) +{ + u8 b[4]; + unpack(a,b); + b[0]=fbsub[b[0]]; + b[1]=fbsub[b[1]]; + b[2]=fbsub[b[2]]; + b[3]=fbsub[b[3]]; + return pack(b); +} + +static u8 product(u32 x,u32 y) +{ /* dot product of two 4-byte arrays */ + u8 xb[4],yb[4]; + unpack(x,xb); + unpack(y,yb); + return bmul(xb[0],yb[0])^bmul(xb[1],yb[1])^bmul(xb[2],yb[2])^bmul(xb[3],yb[3]); +} + +static u32 InvMixCol(u32 x) +{ /* matrix Multiplication */ + u32 y,m; + u8 b[4]; + + m=pack(InCo); + b[3]=product(m,x); + m=ROTL24(m); + b[2]=product(m,x); + m=ROTL24(m); + b[1]=product(m,x); + m=ROTL24(m); + b[0]=product(m,x); + y=pack(b); + return y; +} + +u8 ByteSub(u8 x) +{ + u8 y=ptab[255-ltab[x]]; /* multiplicative inverse */ + x=y; x=ROTL(x); + y^=x; x=ROTL(x); + y^=x; x=ROTL(x); + y^=x; x=ROTL(x); + y^=x; y^=0x63; + return y; +} + +void gentables(void) +{ /* generate tables */ + int i; + u8 y,b[4]; + + /* use 3 as primitive root to generate power and log tables */ + + ltab[0]=0; + ptab[0]=1; ltab[1]=0; + ptab[1]=3; ltab[3]=1; + for (i=2;i<256;i++) + { + ptab[i]=ptab[i-1]^xtime(ptab[i-1]); + ltab[ptab[i]]=i; + } + + /* affine transformation:- each bit is xored with itself shifted one bit */ + + fbsub[0]=0x63; + rbsub[0x63]=0; + for (i=1;i<256;i++) + { + y=ByteSub((u8)i); + fbsub[i]=y; rbsub[y]=i; + } + + for (i=0,y=1;i<30;i++) + { + rco[i]=y; + y=xtime(y); + } + + /* calculate forward and reverse tables */ + for (i=0;i<256;i++) + { + y=fbsub[i]; + b[3]=y^xtime(y); b[2]=y; + b[1]=y; b[0]=xtime(y); + ftable[i]=pack(b); + + y=rbsub[i]; + b[3]=bmul(InCo[0],y); b[2]=bmul(InCo[1],y); + b[1]=bmul(InCo[2],y); b[0]=bmul(InCo[3],y); + rtable[i]=pack(b); + } +} + +void gkey(int nb,int nk,char *key) +{ /* blocksize=32*nb bits. Key=32*nk bits */ + /* currently nb,bk = 4, 6 or 8 */ + /* key comes as 4*Nk bytes */ + /* Key Scheduler. Create expanded encryption key */ + int i,j,k,m,N; + int C1,C2,C3; + u32 CipherKey[8]; + + Nb=nb; Nk=nk; + + /* Nr is number of rounds */ + if (Nb>=Nk) Nr=6+Nb; + else Nr=6+Nk; + + C1=1; + if (Nb<8) { C2=2; C3=3; } + else { C2=3; C3=4; } + + /* pre-calculate forward and reverse increments */ + for (m=j=0;j>8)])^ + ROTL16(ftable[(u8)(x[fi[m+1]]>>16)])^ + ROTL24(ftable[x[fi[m+2]]>>24]); + } + t=x; x=y; y=t; /* swap pointers */ + } + +/* Last Round - unroll if possible */ + for (m=j=0;j>8)])^ + ROTL16((u32)fbsub[(u8)(x[fi[m+1]]>>16)])^ + ROTL24((u32)fbsub[x[fi[m+2]]>>24]); + } + for (i=j=0;i>8)])^ + ROTL16(rtable[(u8)(x[ri[m+1]]>>16)])^ + ROTL24(rtable[x[ri[m+2]]>>24]); + } + t=x; x=y; y=t; /* swap pointers */ + } + +/* Last Round - unroll if possible */ + for (m=j=0;j>8)])^ + ROTL16((u32)rbsub[(u8)(x[ri[m+1]]>>16)])^ + ROTL24((u32)rbsub[x[ri[m+2]]>>24]); + } + for (i=j=0;i +#include "libwbfs_os.h" // this file is provided by the project wanting to compile libwbfs and wiidisc + +#ifdef __cplusplus + extern "C" { +#endif /* __cplusplus */ +#if 0 //removes extra automatic indentation by editors + } +#endif +// callback definition. Return 1 on fatal error (callback is supposed to make retries until no hopes..) +// offset points 32bit words, count counts bytes +typedef int (*read_wiidisc_callback_t)(void*fp,u32 offset,u32 count,void*iobuf); + +typedef enum{ + UPDATE_PARTITION_TYPE=0, + GAME_PARTITION_TYPE, + OTHER_PARTITION_TYPE, + // value in between selects partition types of that value + ALL_PARTITIONS=0xffffffff-3, + REMOVE_UPDATE_PARTITION, // keeps game + channel installers + ONLY_GAME_PARTITION, +}partition_selector_t; + +typedef struct wiidisc_s +{ + read_wiidisc_callback_t read; + void *fp; + u8 *sector_usage_table; + + // everything points 32bit words. + u32 disc_raw_offset; + u32 partition_raw_offset; + u32 partition_data_offset; + u32 partition_data_size; + u32 partition_block; + + u8 *tmp_buffer; + u8 *tmp_buffer2; + u8 disc_key[16]; + int dont_decrypt; + + partition_selector_t part_sel; + + char *extract_pathname; + u8 *extracted_buffer; +}wiidisc_t; + +wiidisc_t *wd_open_disc(read_wiidisc_callback_t read,void*fp); +void wd_close_disc(wiidisc_t *); +// returns a buffer allocated with wbfs_ioalloc() or NULL if not found of alloc error +u8 * wd_extract_file(wiidisc_t *d, partition_selector_t partition_type, char *pathname); + +void wd_build_disc_usage(wiidisc_t *d, partition_selector_t selector, u8* usage_table); + +// effectively remove not copied partition from the partition table. +void wd_fix_partition_table(wiidisc_t *d, partition_selector_t selector, u8* partition_table); + +#if 0 +{ +#endif +#ifdef __cplusplus + } +#endif /* __cplusplus */ + +#endif