* Fixed issue 1169

* Implemented WIP patches
* Updated language files
* Possible fix for Peppa Pig (untested, issue 1212)
* Updated Wii parental controls to work nicelly with USB GX Parental Controls
This commit is contained in:
e.bovendeur 2009-12-15 06:04:14 +00:00
parent 6688697780
commit f19285cd0d
35 changed files with 377 additions and 65 deletions

View File

@ -2,8 +2,8 @@
<app version="1">
<name> USB Loader GX</name>
<coder>USB Loader GX Team</coder>
<version>1.0 r863</version>
<release_date>200912131438</release_date>
<version>1.0 r864</version>
<release_date>200912131607</release_date>
<short_description>Loads games from USB-devices</short_description>
<long_description>USB Loader GX is a libwiigui based USB iso loader with a wii-like GUI. You can install games to your HDDs and boot them with shorter loading times.
The interactive GUI is completely controllable with WiiMote, Classic Controller or GC Controller.

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-12 20:22+0100\n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: David Jelinek (djelinek@hotmail.com) \n"
"Language-Team: r823 - last version on http://djelinek.sweb.cz/_USBLoderGX/czech.lang \n"
@ -1209,6 +1209,12 @@ msgstr "Verze: %s"
msgid "Video Mode"
msgstr "Video mód"
msgid "WIP Patches Path"
msgstr ""
msgid "WIP Patches Path changed"
msgstr ""
msgid "Waiting for USB Device"
msgstr "Cekám na zarízení USB"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-12 20:22+0100\n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: dorf[dk]\n"
"Language-Team: dorf[dk]\n"
@ -1209,6 +1209,12 @@ msgstr ""
msgid "Video Mode"
msgstr "Video-mode"
msgid "WIP Patches Path"
msgstr ""
msgid "WIP Patches Path changed"
msgstr ""
msgid "Waiting for USB Device"
msgstr "Venter på USB-enhed"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-12 20:22+0100\n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: glowy\n"
"Language-Team: tj_cool, glowy\n"
@ -1209,6 +1209,12 @@ msgstr "Versie: %s"
msgid "Video Mode"
msgstr ""
msgid "WIP Patches Path"
msgstr ""
msgid "WIP Patches Path changed"
msgstr ""
msgid "Waiting for USB Device"
msgstr "Wachten op USB apparaat"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-12 20:22+0100\n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -1209,6 +1209,12 @@ msgstr ""
msgid "Video Mode"
msgstr ""
msgid "WIP Patches Path"
msgstr ""
msgid "WIP Patches Path changed"
msgstr ""
msgid "Waiting for USB Device"
msgstr ""

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-12 20:22+0100\n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: c64rmx\n"
"Language-Team: \n"
@ -1209,6 +1209,12 @@ msgstr "Versio: %s"
msgid "Video Mode"
msgstr "Videotila"
msgid "WIP Patches Path"
msgstr ""
msgid "WIP Patches Path changed"
msgstr ""
msgid "Waiting for USB Device"
msgstr "Odottaa USB-laitetta..."

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-12 20:22+0100\n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: Kin8\n"
"Language-Team: Badablek, Amour, ikya, dj_skual & Kin8\n"
@ -1209,6 +1209,12 @@ msgstr ""
msgid "Video Mode"
msgstr "Mode vidéo"
msgid "WIP Patches Path"
msgstr ""
msgid "WIP Patches Path changed"
msgstr ""
msgid "Waiting for USB Device"
msgstr "Attente d'un périphérique USB"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-13 15:38+0100\n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: ZEN.13\n"
"Language-Team: Snoozer, wishmasterf, Bertilax, ZEN.13\n"
@ -1230,6 +1230,12 @@ msgstr ""
msgid "Video Mode"
msgstr "Video Modus"
msgid "WIP Patches Path"
msgstr ""
msgid "WIP Patches Path changed"
msgstr ""
msgid "Waiting for USB Device"
msgstr "Warte auf USB Gerät"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-12 20:22+0100\n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n"
"PO-Revision-Date: 2009-12-01 13:23+0100\n"
"Last-Translator: Springdale\n"
"Language-Team: Tusk, Springdale\n"
@ -1209,6 +1209,12 @@ msgstr "Verzió: %s"
msgid "Video Mode"
msgstr "Videó Mód"
msgid "WIP Patches Path"
msgstr ""
msgid "WIP Patches Path changed"
msgstr ""
msgid "Waiting for USB Device"
msgstr "Várakozás az USB Meghajtóra"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-12 20:22+0100\n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: Cambo \n"
"Language-Team: FoxeJoe, Cambo\n"
@ -1209,6 +1209,12 @@ msgstr "Versione: %s"
msgid "Video Mode"
msgstr "Modalità Video"
msgid "WIP Patches Path"
msgstr ""
msgid "WIP Patches Path changed"
msgstr ""
msgid "Waiting for USB Device"
msgstr "Caricamento Dispositivo USB"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-12 20:22+0100\n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: hosigumayuugi\n"
"Language-Team: hosigumayuugi\n"
@ -1209,6 +1209,12 @@ msgstr "バージョン: %s"
msgid "Video Mode"
msgstr "映像の出力方法"
msgid "WIP Patches Path"
msgstr ""
msgid "WIP Patches Path changed"
msgstr ""
msgid "Waiting for USB Device"
msgstr "USBデバイスの応答待ち"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-12 20:22+0100\n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: nextos@korea.com\n"
"Language-Team: \n"
@ -1209,6 +1209,12 @@ msgstr "버전: %s"
msgid "Video Mode"
msgstr "비디오 모드"
msgid "WIP Patches Path"
msgstr ""
msgid "WIP Patches Path changed"
msgstr ""
msgid "Waiting for USB Device"
msgstr "USB 장치를 기다리는 중"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-12 20:22+0100\n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: raschi\n"
"Language-Team: raschi\n"
@ -1209,6 +1209,12 @@ msgstr "Versjon: %s"
msgid "Video Mode"
msgstr "Video modus"
msgid "WIP Patches Path"
msgstr ""
msgid "WIP Patches Path changed"
msgstr ""
msgid "Waiting for USB Device"
msgstr "Venter på USB enhet"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-12 20:22+0100\n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: ziom666 (zadania_prog@vp.pl)\n"
"Language-Team: \n"
@ -1209,6 +1209,12 @@ msgstr "Wersja: %s"
msgid "Video Mode"
msgstr "Tryb video"
msgid "WIP Patches Path"
msgstr ""
msgid "WIP Patches Path changed"
msgstr ""
msgid "Waiting for USB Device"
msgstr "Oczekiwanie na urzadzenie USB"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-12 20:22+0100\n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n"
"PO-Revision-Date: 2009-10-23 18:52+0200\n"
"Last-Translator: boto12\n"
"Language-Team: boto12\n"
@ -1209,6 +1209,12 @@ msgstr "Versão: %s"
msgid "Video Mode"
msgstr "Modo de Vídeo"
msgid "WIP Patches Path"
msgstr ""
msgid "WIP Patches Path changed"
msgstr ""
msgid "Waiting for USB Device"
msgstr "Aguardando pelo Dispositivo USB"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-12 20:22+0100\n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n"
"PO-Revision-Date: 2009-12-04 16:16-0000\n"
"Last-Translator: Sky8000\n"
"Language-Team: Sky8000 <sky8000@hotmail.com>\n"
@ -1209,6 +1209,12 @@ msgstr "Versão: %s"
msgid "Video Mode"
msgstr "Modo de Vídeo"
msgid "WIP Patches Path"
msgstr ""
msgid "WIP Patches Path changed"
msgstr ""
msgid "Waiting for USB Device"
msgstr "Aguardando pelo Dispositivo USB"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-12 20:22+0100\n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: Kir\n"
"Language-Team: Kir\n"
@ -1209,6 +1209,12 @@ msgstr ""
msgid "Video Mode"
msgstr "Видео режим"
msgid "WIP Patches Path"
msgstr ""
msgid "WIP Patches Path changed"
msgstr ""
msgid "Waiting for USB Device"
msgstr "Ожидание USB устройства"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-12 20:22+0100\n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: knife.hu kavid\n"
"Language-Team: kavid\n"
@ -1209,6 +1209,12 @@ msgstr "版本: %s"
msgid "Video Mode"
msgstr "视频制式"
msgid "WIP Patches Path"
msgstr ""
msgid "WIP Patches Path changed"
msgstr ""
msgid "Waiting for USB Device"
msgstr "等待 USB 设备"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-12 20:22+0100\n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: Penn\n"
"Language-Team: Penn\n"
@ -1209,6 +1209,12 @@ msgstr "Versión %s"
msgid "Video Mode"
msgstr "Modo Video"
msgid "WIP Patches Path"
msgstr ""
msgid "WIP Patches Path changed"
msgstr ""
msgid "Waiting for USB Device"
msgstr "Esperando al Dispositivo USB"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-12 20:22+0100\n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n"
"PO-Revision-Date: 2009-11-24 22:11+0200\n"
"Last-Translator: Katsurou\n"
"Language-Team: Katsurou, pirateX\n"
@ -1209,6 +1209,12 @@ msgstr ""
msgid "Video Mode"
msgstr "Video-läge"
msgid "WIP Patches Path"
msgstr ""
msgid "WIP Patches Path changed"
msgstr ""
msgid "Waiting for USB Device"
msgstr "Väntar på USB-enhet"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-12 20:22+0100\n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: Miller Liang\n"
"Language-Team: kyogc, Miller\n"
@ -1209,6 +1209,12 @@ msgstr "版本: %s"
msgid "Video Mode"
msgstr "影像格式"
msgid "WIP Patches Path"
msgstr ""
msgid "WIP Patches Path changed"
msgstr ""
msgid "Waiting for USB Device"
msgstr "等待 USB 設備"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-12 20:22+0100\n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: Nitro_subzero \n"
"Language-Team: Nitro_subzero\n"
@ -1209,6 +1209,12 @@ msgstr "เวอร์ชั่น: %s"
msgid "Video Mode"
msgstr "โหมดการแสดงผลภาพ"
msgid "WIP Patches Path"
msgstr ""
msgid "WIP Patches Path changed"
msgstr ""
msgid "Waiting for USB Device"
msgstr "กำลังรออุปกรณ์ USB"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-12 20:22+0100\n"
"POT-Creation-Date: 2009-12-13 17:09+0100\n"
"PO-Revision-Date: 2009-10-01 01:00+0200\n"
"Last-Translator: omercigingelini\n"
"Language-Team: omercigingelini\n"
@ -1209,6 +1209,12 @@ msgstr "Vesiyon: %s"
msgid "Video Mode"
msgstr "Video Modu"
msgid "WIP Patches Path"
msgstr ""
msgid "WIP Patches Path changed"
msgstr ""
msgid "Waiting for USB Device"
msgstr "USB Aygıtı için Bekleniyor"

View File

@ -1 +1 @@
<pd><ViewState><e p="gui\source\mload" x="false"></e><e p="gui\source\settings" x="false"></e><e p="gui\source\images" x="false"></e><e p="gui\source\libfat" x="false"></e><e p="gui\source\prompts" x="false"></e><e p="gui\source\banner" x="false"></e><e p="gui\source\cheats" x="false"></e><e p="gui\source\network" x="false"></e><e p="gui\source\fonts" x="false"></e><e p="gui\source\menu" x="false"></e><e p="gui\source\ramdisk" x="false"></e><e p="gui\source\sounds" x="false"></e><e p="gui\source\wad" x="false"></e><e p="gui" x="true"></e><e p="gui\source\homebrewboot" x="false"></e><e p="gui\source\language" x="false"></e><e p="gui\source" x="true"></e><e p="gui\source\libwbfs" x="false"></e><e p="gui\source\libwiigui" x="true"></e><e p="gui\source\patches" x="false"></e><e p="gui\source\themes" x="false"></e><e p="gui\source\memory" x="false"></e><e p="gui\source\unzip" x="false"></e><e p="gui\source\usbloader" x="false"></e><e p="gui\source\xml" x="false"></e></ViewState></pd>
<pd><ViewState><e p="gui\source\mload" x="false"></e><e p="gui\source\settings" x="true"></e><e p="gui\source\images" x="false"></e><e p="gui\source\libfat" x="false"></e><e p="gui\source\prompts" x="false"></e><e p="gui\source\banner" x="false"></e><e p="gui\source\cheats" x="false"></e><e p="gui\source\network" x="false"></e><e p="gui\source\fonts" x="false"></e><e p="gui\source\menu" x="false"></e><e p="gui\source\ramdisk" x="false"></e><e p="gui\source\sounds" x="false"></e><e p="gui\source\wad" x="false"></e><e p="gui" x="true"></e><e p="gui\source\homebrewboot" x="false"></e><e p="gui\source\language" x="false"></e><e p="gui\source" x="true"></e><e p="gui\source\libwbfs" x="false"></e><e p="gui\source\libwiigui" x="false"></e><e p="gui\source\patches" x="false"></e><e p="gui\source\themes" x="false"></e><e p="gui\source\memory" x="false"></e><e p="gui\source\unzip" x="false"></e><e p="gui\source\usbloader" x="false"></e><e p="gui\source\xml" x="false"></e></ViewState></pd>

View File

@ -65,7 +65,8 @@ int MenuCheck() {
if (Settings.partition != -1 && partitions.num > Settings.partition) {
PartInfo pinfo = partitions.pinfo[Settings.partition];
ret2 = WBFS_OpenPart(pinfo.fs_type == FS_TYPE_FAT32, pinfo.fat_i, partitions.pentry[Settings.partition].sector, partitions.pentry[Settings.partition].size, (char *) &game_partition);
int index = pinfo.fs_type == FS_TYPE_FAT32 ? pinfo.fat_i : pinfo.wbfs_i;
ret2 = WBFS_OpenPart(pinfo.fs_type == FS_TYPE_FAT32, index, partitions.pentry[Settings.partition].sector, partitions.pentry[Settings.partition].size, (char *) &game_partition);
if (ret2 == 0)
{
@ -85,6 +86,7 @@ int MenuCheck() {
} else if (Sys_IsHermes() && partitions.fat_n != 0) {
// Loop through FAT partitions, and find the first partition with games on it (if there is one)
u32 count;
for (int i = 0; i < partitions.num; i++) {
if (partitions.pinfo[i].fs_type == FS_TYPE_FAT32) {
if (!WBFS_OpenPart(1, partitions.pinfo[i].fat_i, partitions.pentry[i].sector, partitions.pentry[i].size, (char *) &game_partition)) {

View File

@ -392,7 +392,7 @@ int MenuDiscList() {
if(unlockBtnImg_g.GetImage() == NULL) { unlockBtnImg_g = unlockBtnImg; unlockBtnImg_g.SetGrayscale(); }
unlockBtnImg_g.SetWidescreen(CFG.widescreen);
if (canUnlock && Settings.parental.is_unlocked)
if (canUnlock && Settings.godmode)
{
lockBtn.SetImage(&unlockBtnImg_g);
lockBtn.SetImageOver(&unlockBtnImg_g);
@ -1103,9 +1103,9 @@ int MenuDiscList() {
if (!canUnlock) {
WindowPrompt(tr("Parental Control"), tr("You don't have Parental Control enabled. If you wish to use Parental Control, enable it in the Wii Settings."), tr("OK"));
} else {
if (Settings.parental.is_unlocked) {
if (Settings.godmode) {
if (WindowPrompt(tr("Parental Control"), tr("Are you sure you want to enable Parent Control?"), tr("Yes"), tr("No")) == 1) {
Settings.parental.is_unlocked = 0;
Settings.godmode = 0;
lockBtn.SetImage(&lockBtnImg_g);
lockBtn.SetImageOver(&lockBtnImg_g);
lockBtn.SetToolTip(&lockBtnTT, 15, 52, 1, 3);
@ -1122,7 +1122,7 @@ int MenuDiscList() {
if (ret == 1) {
if (memcmp(pin, Settings.parental.pin, 4) == 0) {
Settings.parental.is_unlocked = 1;
Settings.godmode = 1;
lockBtn.SetImage(&unlockBtnImg_g);
lockBtn.SetImageOver(&unlockBtnImg_g);
lockBtn.SetToolTip(&unlockBtnTT, 15, 52, 1, 3);

View File

@ -38,6 +38,7 @@
#include "../gecko.h"
#include "mload/mload.h"
#include "mload/dip_plugin.h"
#include "patches/wip.h"
extern struct SSettings Settings;

128
source/patches/wip.c Normal file
View File

@ -0,0 +1,128 @@
#include <gccore.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "settings/cfg.h"
u32 doltableoffset[64];
u32 doltablelength[64];
u32 doltableentries;
void wipreset()
{
doltableentries = 0;
}
void wipregisteroffset(u32 dst, u32 len)
{
doltableoffset[doltableentries] = dst;
doltablelength[doltableentries] = len;
doltableentries++;
}
void patchu8(u32 offset, u8 value)
{
u32 i = 0;
u32 tempoffset = 0;
while ((doltablelength[i] <= offset-tempoffset) && (i+1 < doltableentries))
{
tempoffset+=doltablelength[i];
i++;
}
if (offset-tempoffset < doltablelength[i])
{
*(u8 *)(offset-tempoffset+doltableoffset[i]) = value;
}
}
void wipparsebuffer(u8 *buffer, u32 length)
// The buffer needs a 0 at the end to properly terminate the string functions
{
u32 pos = 0;
u32 offset;
char buf[10];
while (pos < length)
{
if ( *(char *)(buffer + pos) != '#' && *(char *)(buffer + pos) != ';' && *(char *)(buffer + pos) != 10 && *(char *)(buffer + pos) != 13 && *(char *)(buffer + pos) != 32 && *(char *)(buffer + pos) != 0 )
{
memcpy(buf, (char *)(buffer + pos), 8);
buf[8] = 0;
offset = strtol(buf,NULL,16);
pos += (u32)strchr((char *)(buffer + pos), 32)-(u32)(buffer + pos) + 1;
pos += (u32)strchr((char *)(buffer + pos), 32)-(u32)(buffer + pos) + 1;
while (*(char *)(buffer + pos) != 10 && *(char *)(buffer + pos) != 13 && *(char *)(buffer + pos) != 0)
{
memcpy(buf, (char *)(buffer + pos), 2);
buf[2] = 0;
patchu8(offset, strtol(buf,NULL,16));
offset++;
pos +=2;
}
}
if (strchr((char *)(buffer + pos), 10) == NULL)
{
return;
} else
{
pos += (u32)strchr((char *)(buffer + pos), 10)-(u32)(buffer + pos) + 1;
}
}
}
u32 do_wip_code(u8 *gameid)
{
FILE *fp;
u32 filesize;
char filepath[150];
memset(filepath, 0, 150);
u8 *wipCode;
sprintf(filepath, "%s%6s", Settings.WipCodepath, gameid);
filepath[strlen(Settings.WipCodepath)+6] = '.';
filepath[strlen(Settings.WipCodepath)+7] = 'w';
filepath[strlen(Settings.WipCodepath)+8] = 'i';
filepath[strlen(Settings.WipCodepath)+9] = 'p';
fp = fopen(filepath, "rb");
if (!fp) {
memset(filepath, 0, 150);
sprintf(filepath, "%s%3s", Settings.WipCodepath, gameid + 1);
filepath[strlen(Settings.WipCodepath)+3] = '.';
filepath[strlen(Settings.WipCodepath)+4] = 'w';
filepath[strlen(Settings.WipCodepath)+5] = 'i';
filepath[strlen(Settings.WipCodepath)+6] = 'p';
fp = fopen(filepath, "rb");
if (!fp) {
return -1;
}
}
if (fp) {
u32 ret = 0;
fseek(fp, 0, SEEK_END);
filesize = ftell(fp);
wipCode = malloc(filesize + 1);
wipCode[filesize] = 0; // Wip code functions need a 0 termination
fseek(fp, 0, SEEK_SET);
ret = fread(wipCode, 1, filesize, fp);
fclose(fp);
if (ret == filesize)
{
// Apply wip patch
wipparsebuffer(wipCode, filesize + 1);
return 0;
}
}
return -2;
}

6
source/patches/wip.h Normal file
View File

@ -0,0 +1,6 @@
#ifndef __WIP_H__
#define __WIP_H__
u32 do_wip_code(u8 *gameid);
#endif //__WIP_H__

View File

@ -1159,22 +1159,24 @@ int MenuSettings()
if(firstRun) options2.SetName(Idx, "%s",tr("Console"));
if(ret == Idx)
{
if (!strcmp("", Settings.unlockCode))
if (!strcmp("", Settings.unlockCode) && Settings.parental.enabled == 0)
{
Settings.godmode = !Settings.godmode;
}
else if ( Settings.godmode == 0 )
{
char entered[20];
memset(entered, 0, 20);
//password check to unlock Install,Delete and Format
w.Remove(&optionBrowser2);
w.Remove(&backBtn);
char entered[20] = "";
int result = OnScreenKeyboard(entered, 20,0);
int result = Settings.parental.enabled == 0 ? OnScreenKeyboard(entered, 20,0) : OnScreenNumpad(entered, 5);
w.Append(&optionBrowser2);
w.Append(&backBtn);
if ( result == 1 )
{
if (!strcmp(entered, Settings.unlockCode)) { //if password correct
if (!strcmp(entered, Settings.unlockCode) || !memcmp(entered, Settings.parental.pin, 4)) { //if password correct
if (Settings.godmode == 0)
{
WindowPrompt(tr("Correct Password"),tr("All the features of USB Loader GX are unlocked."),tr("OK"));
@ -1887,6 +1889,34 @@ int MenuSettings()
options2.SetValue(Idx, "%s", Settings.BcaCodepath);
}
if(ret == ++Idx || firstRun)
{
if(firstRun) options2.SetName(Idx, "%s", tr("WIP Patches Path"));
if(ret == Idx)
{
w.Remove(&optionBrowser2);
w.Remove(&backBtn);
char entered[100] = "";
strlcpy(entered, Settings.WipCodepath, sizeof(entered));
titleTxt.SetText(tr("WIP Patches Path"));
int result = BrowseDevice(entered, sizeof(entered), FB_DEFAULT, noFILES);
titleTxt.SetText(tr("Custom Paths"));
w.Append(&optionBrowser2);
w.Append(&backBtn);
if ( result == 1 )
{
int len = (strlen(entered)-1);
if (entered[len] !='/')
strncat (entered, "/", 1);
strlcpy(Settings.WipCodepath, entered, sizeof(Settings.WipCodepath));
WindowPrompt(tr("WIP Patches Path changed"),0,tr("OK"));
if (!isInserted(bootDevice))
WindowPrompt(tr("No SD-Card inserted!"),tr("Insert an SD-Card to save."),tr("OK"));
}
}
options2.SetValue(Idx, "%s", Settings.WipCodepath);
}
firstRun = false;
}
}

View File

@ -202,6 +202,7 @@ void CFG_Default(int widescreen) { // -1 = non forced Mode
snprintf(Settings.Cheatcodespath, sizeof(Settings.Cheatcodespath), "%s/codes/", bootDevice);
snprintf(Settings.TxtCheatcodespath, sizeof(Settings.TxtCheatcodespath), "%s/txtcodes/", bootDevice);
snprintf(Settings.BcaCodepath, sizeof(Settings.BcaCodepath), "%s/bca/", bootDevice);
snprintf(Settings.WipCodepath, sizeof(Settings.WipCodepath), "%s/wip/", bootDevice);
snprintf(Settings.dolpath, sizeof(Settings.dolpath), "%s/", bootDevice);
sprintf(Settings.ogg_path, "notset");
}
@ -248,7 +249,6 @@ void CFG_Default(int widescreen) { // -1 = non forced Mode
THEME.clock_x = 0;
THEME.clock_y = 335;//330;
THEME.info = (GXColor) {55, 190, 237, 255};
THEME.show_hddinfo = 1; //default
THEME.hddinfo_align = CFG_ALIGN_CENTRE;
@ -343,7 +343,7 @@ void Global_Default(void) {
Settings.tooltips = TooltipsOn;
char * empty = "";
snprintf(Settings.unlockCode, sizeof(Settings.unlockCode), empty);
Settings.godmode = 1;
// Settings.godmode = 1;
Settings.gamesound = 1;
Settings.parentalcontrol = 0;
Settings.cios = ios249;
@ -381,9 +381,7 @@ void Global_Default(void) {
memcpy(Settings.parental.pin, buf + 3, 4);
memcpy(Settings.parental.answer, buf + 8, 32);
}
if (Settings.parental.enabled == 0) {
Settings.parental.is_unlocked = 1;
}
Settings.godmode = (Settings.parental.enabled == 0) ? 1 : 0;
}
@ -575,6 +573,10 @@ void path_set(char *name, char *val) {
strlcpy(Settings.BcaCodepath, val, sizeof(Settings.BcaCodepath));
return;
}
if (strcmp(name, "WipCodepath") == 0) {
strlcpy(Settings.WipCodepath, val, sizeof(Settings.WipCodepath));
return;
}
return;
@ -1343,11 +1345,6 @@ bool cfg_save_global() { // save global settings
fprintf(f, "oggload_path = %s\n ", Settings.oggload_path);
fprintf(f, "TxtCheatcodespath = %s\n ", Settings.TxtCheatcodespath);
fprintf(f, "titlestxt_path = %s\n ", Settings.titlestxt_path);
if (!strcmp("", Settings.unlockCode)) {
fprintf(f, "godmode = %d\n ", Settings.godmode);
} else {
fprintf(f, "godmode = %d\n ", 0);
}
fprintf(f, "gamesound = %d\n ", Settings.gamesound);
fprintf(f, "dolpath = %s\n ", Settings.dolpath);
fprintf(f, "ogg_path = %s\n ", Settings.ogg_path);
@ -1358,6 +1355,7 @@ bool cfg_save_global() { // save global settings
fprintf(f, "homebrewapps_path = %s\n ", Settings.homebrewapps_path);
fprintf(f, "Cheatcodespath = %s\n ", Settings.Cheatcodespath);
fprintf(f, "BcaCodepath = %s\n", Settings.BcaCodepath);
fprintf(f, "WipCodepath = %s\n", Settings.WipCodepath);
fprintf(f, "titlesOverride = %d\n ", Settings.titlesOverride);
//fprintf(f, "db_url = %s\n ", Settings.db_url);
//fprintf(f, "db_JPtoEN = %d\n ", Settings.db_JPtoEN);

View File

@ -386,7 +386,6 @@ extern "C" {
u8 pin[4];
u8 question;
wchar_t answer[32]; // IS WCHAR!
u8 is_unlocked;
};
struct SSettings {
u8 video;
@ -433,6 +432,8 @@ extern "C" {
char selected_homebrew[200];
char Cheatcodespath[100];
char TxtCheatcodespath[100];
char BcaCodepath[100];
char WipCodepath[100];
short error002;
u8 titlesOverride; // db_titles
char db_url[200];
@ -443,7 +444,6 @@ extern "C" {
u8 discart;
short gamesound;
u8 marknewtitles;
char BcaCodepath[100];
u8 FatInstallToDir;
u8 partitions_to_install;
u8 fullcopy;

View File

@ -13,6 +13,7 @@
#include "fstfile.h"
#include "settings/cfg.h"
#include "gecko.h"
#include "patches/wip.h"
/*KENOBI! - FISHEARS*/
extern const unsigned char kenobiwii[];
@ -345,6 +346,11 @@ void gamepatches(void * dst, int len, u8 videoSelected, u8 patchcountrystring, u
NewSuperMarioBrosPatch(dst, len);
gprintf("\nLoading WIP Patch...");
u32 ret = do_wip_code((u8 *)0x80000000);
gprintf("done\n", ret);
//if(Settings.anti002fix == on)
if (fix002 == 2)
Anti_002_fix(dst, len);

View File

@ -282,13 +282,26 @@ s32 Disc_BootPartition(u64 offset, u8 videoselected, u8 cheat, u8 vipatch, u8 pa
if (ret < 0)
return ret;
char gameid[8];
memset(gameid, 0, 8);
memcpy(gameid, (char*)Disc_ID, 6);
if (cheat == 1) {
/* OCARINA STUFF - FISHEARS*/
do_sd_code(gameid);
}
/* Setup low memory */
__Disc_SetLowMem();
/* Run apploader */
ret = Apploader_Run(&p_entry, cheat, videoselected, vipatch, patchcountrystring, error002fix, alternatedol, alternatedoloffset);
if (ret < 0)
return ret;
/* Setup low memory */
__Disc_SetLowMem();
//kill the USB and SD
USBDevice_deInit();
SDCard_deInit();
/* Set an appropiate video mode */
__Disc_SetVMode(videoselected);
@ -296,29 +309,25 @@ s32 Disc_BootPartition(u64 offset, u8 videoselected, u8 cheat, u8 vipatch, u8 pa
/* Set time */
__Disc_SetTime();
if (cheat == 1) {
char gameid[8];
/* OCARINA STUFF - FISHEARS*/
memset(gameid, 0, 8);
memcpy(gameid, (char*)Disc_ID, 6);
do_sd_code(gameid);
/* OCARINA STUFF - FISHEARS*/
}
//kill the USB and SD
USBDevice_deInit();
SDCard_deInit();
//gprintf("\n\tDe-init SD & USB");
/* Disconnect Wiimote */
WPAD_Flush(0);
WPAD_Disconnect(0);
WPAD_Shutdown();
// Anti-green screen fix
VIDEO_SetBlack(TRUE);
VIDEO_Flush();
VIDEO_WaitVSync();
gprintf("\n\nUSB Loader GX is done.\n\n");
/* Shutdown IOS subsystems */
SYS_ResetSystem(SYS_SHUTDOWN, 0, 0);
// fix for PeppaPig (from NeoGamma)
extern void __exception_closeall();
IRQ_Disable();
__IOS_ShutdownSubsystems();
__exception_closeall();
/* Jump to entry point */
p_entry();

View File

@ -178,7 +178,7 @@ int __Menu_GetPrevFilter(int t, wchar_t* gameFilter, u32 gameFiltered, wchar_t *
continue;
/* Other parental control method */
if (Settings.parentalcontrol == 0 && Settings.parental.is_unlocked == 0 && Settings.parental.enabled == 1)
if (Settings.parentalcontrol == 0 && Settings.godmode == 0 && Settings.parental.enabled == 1)
{
// Check game rating in WiiTDB, since the default Wii parental control setting is enabled
s32 rating = GetRatingForGame((char *) header->id);
@ -507,7 +507,7 @@ int __Menu_GetGameList(int t, wchar_t* gameFilter, discHdr ** PgameList, u32 *Pg
}
/* Other parental control method */
if (Settings.parentalcontrol == 0 && Settings.parental.is_unlocked == 0 && Settings.parental.enabled == 1&& t==0)
if (Settings.parentalcontrol == 0 && Settings.godmode == 0 && Settings.parental.enabled == 1 && t==0)
{
// Check game rating in WiiTDB, since the default Wii parental control setting is enabled
s32 rating = GetRatingForGame((char *) header->id);