From 77685f2ea4ab9526fe43f7fb95dcb667a630399f Mon Sep 17 00:00:00 2001 From: "lustar.mii" Date: Sat, 26 Sep 2009 07:14:12 +0000 Subject: [PATCH] Ocarina situation may have improved (issue 827). FIFA 08 should work (issue 943). Updated dip_plugin/mload. Fixed title list after saving .txt/.csv (issue 961), changed known alt dol for Boogie. --- source/libwiigui/gui.h | 3 +- source/libwiigui/gui_keyboard.cpp | 25 +- source/libwiigui/gui_optionbrowser.cpp | 54 +- source/menu.cpp | 8 +- source/mload/dip_plugin.c | 253 +++++---- source/mload/dip_plugin.h | 4 +- source/mload/mload.c | 675 ++++++++++++++----------- source/mload/mload.h | 150 ++++-- source/prompts/DiscBrowser.cpp | 2 +- source/prompts/PromptWindows.cpp | 2 +- source/prompts/gameinfo.cpp | 15 +- source/usbloader/disc.c | 2 + 12 files changed, 670 insertions(+), 523 deletions(-) diff --git a/source/libwiigui/gui.h b/source/libwiigui/gui.h index 51b1f8af..3d7ff25b 100644 --- a/source/libwiigui/gui.h +++ b/source/libwiigui/gui.h @@ -994,12 +994,13 @@ class GuiOptionBrowser : public GuiElement 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]; diff --git a/source/libwiigui/gui_keyboard.cpp b/source/libwiigui/gui_keyboard.cpp index c3bb475e..8892aeff 100644 --- a/source/libwiigui/gui_keyboard.cpp +++ b/source/libwiigui/gui_keyboard.cpp @@ -563,6 +563,8 @@ void GuiKeyboard::Update(GuiTrigger * t) catch (const std::exception& e) { } } + bool update = false; + if(keySpace->GetState() == STATE_CLICKED) { if(strlen(kbtextstr) < kbtextmaxlen) @@ -615,7 +617,9 @@ void GuiKeyboard::Update(GuiTrigger * t) } char txt[2] = { 0, 0 }; - + + startloop: + for(int i=0; i<4; i++) { for(int j=0; j<11; j++) @@ -640,23 +644,14 @@ void GuiKeyboard::Update(GuiTrigger * t) if(shift || caps) { kbtextstr[strlen(kbtextstr)] = keys[i][j].chShift; - if(shift) shift ^= 1; - if(alt) alt ^= 1; - if(alt2) alt2 ^= 1; } else if(alt) { kbtextstr[strlen(kbtextstr)] = keys[i][j].chalt; - if(shift) shift ^= 1; - if(alt) alt ^= 1; - if(alt2) alt2 ^= 1; } else if(alt2) { kbtextstr[strlen(kbtextstr)] = keys[i][j].chalt2; - if(shift) shift ^= 1; - if(alt) alt ^= 1; - if(alt2) alt2 ^= 1; } else { @@ -665,6 +660,16 @@ void GuiKeyboard::Update(GuiTrigger * t) } 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; + goto startloop; + } } } } diff --git a/source/libwiigui/gui_optionbrowser.cpp b/source/libwiigui/gui_optionbrowser.cpp index 9826816c..dd5cffe3 100644 --- a/source/libwiigui/gui_optionbrowser.cpp +++ b/source/libwiigui/gui_optionbrowser.cpp @@ -28,6 +28,7 @@ GuiOptionBrowser::GuiOptionBrowser(int w, int h, OptionList * l, const u8 *image scrollbaron = scrollon; selectable = true; listOffset = this->FindMenuItem(-1, 1); + listChanged = true; // trigger an initial list update selectedItem = 0; focus = 1; // allow focus @@ -105,7 +106,7 @@ GuiOptionBrowser::GuiOptionBrowser(int w, int h, OptionList * l, const u8 *image // optionBg = new GuiImage(bgOptionsEntry); for(int i=0; iname[i], 20, (GXColor){0, 0, 0, 0xff}); + optionTxt[i] = new GuiText(NULL, 20, (GXColor){0, 0, 0, 0xff}); optionTxt[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); optionTxt[i]->SetPosition(24,0); @@ -403,6 +404,12 @@ void GuiOptionBrowser::Draw() this->UpdateEffects(); } + +void GuiOptionBrowser::TriggerUpdate() +{ + listChanged = true; +} + void GuiOptionBrowser::Update(GuiTrigger * t) { LOCK(this); @@ -448,27 +455,32 @@ void GuiOptionBrowser::Update(GuiTrigger * t) } next = listOffset; + if(listChanged) + { + for(int i=0; i= 0) + { + if(optionBtn[i]->GetState() == STATE_DISABLED) + { + optionBtn[i]->SetVisible(true); + optionBtn[i]->SetState(STATE_DEFAULT); + } + + optionTxt[i]->SetText(options->name[next]); + optionVal[i]->SetText(options->value[next]); + optionIndex[i] = next; + next = this->FindMenuItem(next, 1); + } + else + { + optionBtn[i]->SetVisible(false); + optionBtn[i]->SetState(STATE_DISABLED); + } + } + } for(int i=0; i= 0) - { - if(optionBtn[i]->GetState() == STATE_DISABLED) - { - optionBtn[i]->SetVisible(true); - optionBtn[i]->SetState(STATE_DEFAULT); - } - - optionTxt[i]->SetText(options->name[next]); - optionVal[i]->SetText(options->value[next]); - optionIndex[i] = next; - next = this->FindMenuItem(next, 1); - } - else - { - optionBtn[i]->SetVisible(false); - optionBtn[i]->SetState(STATE_DISABLED); - } - if(focus) { if(i != selectedItem && optionBtn[i]->GetState() == STATE_SELECTED) @@ -624,6 +636,7 @@ void GuiOptionBrowser::Update(GuiTrigger * t) { // move list down by 1 listOffset = this->FindMenuItem(listOffset, 1); + listChanged = true; } else if(optionBtn[selectedItem+1]->IsVisible()) { @@ -643,6 +656,7 @@ void GuiOptionBrowser::Update(GuiTrigger * t) { // move list up by 1 listOffset = prev; + listChanged = true; } else { diff --git a/source/menu.cpp b/source/menu.cpp index 498e281d..c7ee33f6 100644 --- a/source/menu.cpp +++ b/source/menu.cpp @@ -810,7 +810,8 @@ int MenuDiscList() { WindowPrompt(0,tr("Saved"), tr("OK")); else WindowPrompt(tr("Error"),tr("Could not save."), tr("OK")); - + menu = MENU_DISCLIST; + break; } else if (choice==2) { @@ -818,7 +819,8 @@ int MenuDiscList() { WindowPrompt(0,tr("Saved"), tr("OK")); else WindowPrompt(tr("Error"),tr("Could not save."), tr("OK")); - + menu = MENU_DISCLIST; + break; } gamecntBtn.ResetState(); @@ -1928,6 +1930,8 @@ int MainMenu(int menu) { delete GameIDTxt; delete cover; delete coverImg; + delete fontClock; + delete fontSystem; ShutdownAudio(); StopGX(); diff --git a/source/mload/dip_plugin.c b/source/mload/dip_plugin.c index a32995b4..019653bd 100644 --- a/source/mload/dip_plugin.c +++ b/source/mload/dip_plugin.c @@ -1,140 +1,117 @@ -#define size_dip_plugin 3700 +#define size_dip_plugin 3080 -unsigned char dip_plugin[3700] __attribute__((aligned (32)))={ - 19, 119, 230, 81, 18, 52, 0, 1, 32, 34, 205, 172, 32, 32, 13, 57, 32, 32, 8, 197, 32, 32, 8, 153, 32, 32, 91, 129, 32, - 32, 0, 73, 32, 32, 40, 117, 32, 32, 54, 93, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 19, 119, 235, 77, 70, 192, 70, 192, 70, 192, 70, 192, 70, 192, 70, 192, 70, 192, 71, 120, 234, 0, 2, 143, 70, 192, 71, - 120, 234, 0, 2, 159, 70, 192, 71, 120, 234, 0, 2, 175, 70, 192, 71, 120, 234, 0, 2, 167, 70, 192, 71, 120, 234, 0, 2, - 141, 70, 192, 71, 120, 234, 0, 2, 127, 70, 192, 71, 120, 234, 0, 2, 165, 70, 192, 71, 120, 234, 0, 2, 161, 70, 192, - 71, 120, 234, 0, 2, 167, 70, 192, 71, 120, 234, 0, 2, 167, 181, 0, 75, 7, 176, 137, 147, 0, 70, 104, 35, 0, 33, 0, 34, - 0, 147, 1, 147, 2, 240, 0, 253, 93, 176, 9, 188, 2, 71, 8, 70, 192, 227, 0, 0, 0, 181, 16, 28, 3, 34, 32, 28, 12, 72, - 13, 28, 25, 247, 255, 255, 206, 33, 32, 72, 11, 247, 255, 255, 198, 73, 10, 34, 1, 104, 11, 66, 19, 209, 253, 34, 32, - 28, 32, 73, 6, 247, 255, 255, 192, 28, 32, 33, 32, 247, 255, 255, 184, 75, 4, 104, 24, 188, 16, 188, 2, 71, 8, 70, 192, - 13, 0, 96, 0, 13, 0, 96, 28, 13, 0, 96, 32, 181, 240, 70, 95, 70, 86, 70, 77, 70, 68, 180, 240, 10, 203, 70, 154, 75, - 20, 176, 137, 37, 0, 28, 7, 28, 14, 70, 145, 70, 108, 70, 155, 70, 168, 70, 91, 96, 35, 70, 67, 96, 99, 96, 163, 70, - 83, 96, 227, 28, 56, 70, 75, 28, 49, 97, 35, 247, 255, 255, 158, 70, 104, 28, 57, 28, 50, 240, 0, 253, 14, 53, 1, 40, - 0, 209, 8, 176, 9, 188, 60, 70, 144, 70, 153, 70, 162, 70, 171, 188, 240, 188, 2, 71, 8, 45, 15, 217, 223, 231, 243, - 208, 0, 0, 0, 181, 112, 176, 136, 75, 8, 28, 6, 28, 13, 70, 108, 147, 0, 96, 97, 146, 2, 247, 255, 255, 125, 28, 49, - 28, 42, 70, 104, 240, 0, 252, 237, 176, 8, 188, 112, 188, 2, 71, 8, 168, 0, 0, 0, 181, 240, 70, 95, 70, 86, 70, 77, - 70, 68, 180, 240, 176, 143, 144, 4, 145, 3, 146, 2, 41, 0, 209, 0, 224, 126, 10, 82, 70, 145, 35, 128, 34, 0, 1, 27, - 70, 147, 34, 255, 147, 1, 3, 210, 171, 6, 146, 0, 70, 152, 224, 7, 154, 3, 68, 179, 69, 90, 217, 62, 154, 5, 24, 179, - 10, 219, 68, 153, 154, 3, 70, 91, 26, 214, 70, 74, 2, 83, 154, 2, 66, 154, 216, 87, 35, 0, 147, 5, 36, 0, 159, 4, 34, - 128, 68, 95, 28, 56, 28, 49, 1, 18, 240, 0, 248, 103, 44, 0, 209, 47, 40, 0, 208, 45, 155, 0, 28, 6, 66, 152, 217, 1, - 38, 255, 3, 246, 10, 242, 70, 146, 36, 0, 75, 43, 70, 66, 96, 19, 35, 0, 96, 83, 96, 147, 70, 83, 96, 211, 70, 75, 97, - 19, 28, 56, 28, 49, 247, 255, 255, 34, 70, 64, 28, 57, 28, 50, 240, 0, 252, 146, 52, 1, 28, 5, 40, 0, 208, 192, 44, - 15, 217, 230, 45, 0, 208, 188, 176, 15, 28, 40, 188, 60, 70, 144, 70, 153, 70, 162, 70, 171, 188, 240, 188, 2, 71, 8, - 154, 5, 25, 147, 154, 1, 66, 147, 217, 1, 155, 5, 26, 214, 32, 128, 1, 0, 33, 32, 247, 255, 254, 247, 28, 4, 40, 0, - 208, 18, 33, 128, 1, 9, 70, 74, 247, 255, 255, 59, 28, 5, 40, 0, 208, 15, 28, 32, 247, 255, 254, 213, 231, 216, 26, - 211, 0, 155, 28, 28, 147, 5, 30, 99, 65, 156, 231, 163, 37, 1, 66, 109, 231, 208, 37, 0, 231, 206, 154, 5, 28, 56, 24, - 161, 28, 50, 247, 255, 254, 210, 28, 56, 28, 49, 247, 255, 254, 202, 231, 228, 70, 192, 208, 0, 0, 0, 181, 48, 28, 13, - 28, 20, 6, 195, 209, 18, 75, 15, 66, 152, 217, 19, 33, 0, 75, 14, 24, 194, 75, 14, 66, 154, 216, 1, 75, 13, 26, 25, - 66, 161, 211, 5, 28, 8, 66, 169, 216, 10, 30, 99, 67, 152, 224, 0, 32, 0, 188, 48, 188, 2, 71, 8, 35, 192, 4, 91, 26, - 25, 231, 232, 28, 40, 30, 99, 67, 152, 231, 244, 1, 127, 255, 255, 240, 0, 0, 0, 3, 97, 127, 255, 19, 97, 128, 0, 181, - 240, 70, 95, 70, 86, 70, 77, 70, 68, 180, 240, 70, 137, 176, 129, 73, 51, 34, 4, 28, 7, 240, 0, 250, 235, 40, 0, 209, - 3, 35, 128, 0, 91, 69, 153, 208, 13, 75, 47, 70, 154, 120, 27, 43, 0, 209, 81, 176, 1, 188, 60, 70, 144, 70, 153, 70, - 162, 70, 171, 188, 240, 188, 1, 71, 0, 74, 40, 35, 10, 70, 146, 112, 19, 38, 243, 75, 38, 74, 39, 37, 0, 70, 152, 70, - 147, 224, 2, 53, 1, 66, 181, 210, 19, 25, 124, 28, 32, 70, 65, 34, 13, 240, 0, 250, 195, 40, 0, 209, 244, 70, 89, 34, - 13, 28, 32, 247, 255, 254, 98, 53, 1, 28, 32, 33, 13, 247, 255, 254, 89, 66, 181, 211, 235, 34, 12, 66, 82, 68, 74, - 70, 144, 42, 0, 208, 27, 75, 23, 37, 0, 78, 23, 70, 153, 224, 2, 53, 1, 69, 69, 210, 19, 25, 124, 28, 32, 28, 49, 34, - 12, 240, 0, 250, 161, 40, 0, 209, 244, 70, 73, 34, 12, 28, 32, 247, 255, 254, 64, 53, 1, 28, 32, 33, 12, 247, 255, 254, - 55, 69, 69, 211, 235, 70, 82, 120, 19, 59, 1, 112, 19, 231, 173, 70, 78, 62, 13, 46, 0, 209, 183, 231, 211, 70, 192, - 19, 119, 235, 176, 19, 119, 238, 128, 19, 119, 235, 217, 19, 119, 235, 204, 19, 119, 235, 180, 19, 119, 235, 192, 181, - 48, 28, 4, 72, 15, 28, 13, 104, 131, 104, 193, 176, 129, 24, 91, 24, 154, 105, 3, 43, 0, 209, 15, 104, 67, 43, 0, 209, - 7, 28, 32, 28, 41, 247, 255, 254, 147, 176, 1, 188, 48, 188, 2, 71, 8, 28, 32, 28, 41, 247, 255, 254, 161, 231, 246, - 28, 32, 28, 41, 240, 0, 250, 118, 231, 241, 70, 192, 19, 119, 238, 132, 181, 240, 70, 95, 70, 86, 70, 77, 70, 68, 180, - 240, 176, 129, 28, 4, 70, 139, 72, 48, 33, 1, 70, 145, 247, 255, 253, 248, 70, 130, 40, 0, 219, 74, 120, 35, 43, 0, - 208, 80, 77, 43, 34, 0, 84, 171, 52, 1, 120, 35, 50, 1, 43, 0, 209, 249, 28, 87, 35, 10, 70, 72, 84, 171, 40, 0, 221, - 45, 35, 15, 38, 0, 70, 152, 224, 24, 28, 122, 28, 81, 28, 59, 28, 79, 32, 48, 84, 232, 70, 88, 93, 131, 70, 64, 64, - 3, 51, 48, 84, 171, 43, 57, 217, 1, 51, 7, 84, 171, 70, 67, 64, 51, 43, 15, 208, 16, 35, 32, 54, 1, 84, 107, 69, 177, - 221, 16, 47, 252, 221, 228, 28, 58, 28, 41, 70, 80, 247, 255, 253, 200, 39, 3, 35, 0, 34, 1, 33, 2, 231, 222, 35, 10, - 54, 1, 84, 107, 69, 177, 220, 238, 28, 32, 28, 57, 247, 255, 253, 166, 70, 80, 28, 41, 28, 58, 247, 255, 253, 181, 70, - 80, 247, 255, 253, 154, 176, 1, 188, 60, 70, 144, 70, 153, 70, 162, 70, 171, 188, 240, 188, 1, 71, 0, 34, 0, 39, 1, - 77, 2, 231, 179, 70, 192, 19, 119, 235, 232, 19, 119, 239, 32, 181, 240, 70, 71, 180, 128, 79, 33, 28, 4, 104, 59, 70, - 152, 43, 0, 209, 17, 35, 1, 96, 59, 33, 32, 247, 255, 253, 142, 104, 227, 43, 8, 208, 12, 28, 32, 240, 0, 250, 241, - 70, 67, 96, 59, 188, 4, 70, 144, 188, 240, 188, 2, 71, 8, 240, 0, 250, 232, 231, 247, 28, 33, 72, 20, 49, 12, 34, 4, - 247, 255, 255, 110, 34, 32, 28, 33, 72, 17, 247, 255, 255, 105, 105, 163, 104, 24, 104, 89, 247, 255, 253, 110, 105, - 163, 36, 197, 104, 27, 1, 164, 28, 32, 33, 8, 104, 93, 104, 30, 247, 255, 253, 100, 75, 9, 4, 45, 64, 30, 67, 53, 28, - 32, 96, 37, 33, 8, 247, 255, 253, 75, 70, 67, 96, 59, 32, 0, 231, 208, 70, 192, 19, 119, 238, 172, 19, 119, 235, 248, - 19, 119, 236, 4, 0, 0, 255, 255, 181, 16, 73, 21, 28, 4, 104, 139, 104, 202, 24, 154, 105, 11, 43, 0, 209, 18, 104, - 75, 43, 0, 209, 11, 33, 32, 247, 255, 253, 183, 40, 0, 219, 3, 105, 162, 75, 13, 66, 154, 208, 10, 188, 16, 188, 2, - 71, 8, 33, 32, 247, 255, 253, 193, 231, 242, 33, 32, 240, 0, 249, 151, 231, 238, 75, 7, 104, 27, 104, 26, 35, 1, 112, - 19, 120, 83, 43, 0, 209, 236, 247, 255, 253, 12, 231, 233, 70, 192, 19, 119, 238, 132, 93, 28, 158, 163, 19, 119, 224, - 8, 181, 240, 70, 87, 70, 70, 180, 192, 28, 4, 120, 0, 176, 129, 28, 14, 28, 23, 40, 224, 208, 24, 77, 133, 35, 0, 98, - 43, 28, 3, 59, 112, 43, 143, 217, 13, 28, 32, 28, 49, 28, 58, 240, 0, 250, 122, 28, 4, 176, 1, 28, 32, 188, 12, 70, - 144, 70, 154, 188, 240, 188, 2, 71, 8, 74, 123, 0, 155, 88, 211, 70, 159, 77, 120, 106, 43, 43, 0, 209, 2, 105, 43, - 43, 0, 208, 230, 28, 48, 33, 0, 28, 58, 240, 0, 248, 240, 106, 43, 224, 143, 104, 107, 43, 0, 209, 2, 105, 43, 43, 0, - 208, 217, 36, 0, 231, 221, 35, 1, 34, 37, 84, 171, 104, 43, 43, 0, 208, 0, 224, 173, 28, 32, 28, 58, 240, 0, 250, 76, - 28, 4, 34, 0, 35, 37, 84, 234, 44, 0, 209, 204, 224, 46, 104, 235, 104, 169, 70, 154, 105, 43, 70, 136, 43, 0, 209, - 0, 224, 176, 32, 0, 34, 0, 70, 67, 70, 81, 67, 11, 209, 2, 42, 0, 209, 0, 224, 176, 28, 3, 30, 90, 65, 147, 96, 107, - 28, 48, 28, 57, 247, 255, 255, 105, 28, 4, 231, 176, 105, 43, 43, 0, 208, 167, 35, 2, 224, 85, 104, 97, 104, 162, 40, - 208, 209, 0, 224, 144, 28, 48, 247, 255, 254, 122, 28, 4, 40, 0, 209, 160, 35, 37, 92, 235, 43, 0, 209, 156, 28, 48, - 28, 57, 247, 255, 253, 243, 231, 151, 35, 36, 92, 234, 42, 0, 209, 179, 105, 41, 84, 234, 35, 37, 96, 42, 96, 106, 96, - 170, 96, 234, 98, 42, 84, 234, 70, 136, 41, 0, 209, 0, 231, 128, 105, 108, 247, 255, 252, 148, 70, 64, 28, 41, 28, 34, - 56, 1, 49, 24, 240, 0, 249, 19, 28, 4, 231, 122, 104, 107, 43, 0, 208, 93, 75, 60, 36, 160, 98, 43, 2, 36, 231, 114, - 104, 107, 43, 0, 209, 3, 105, 43, 43, 0, 209, 0, 231, 101, 104, 99, 104, 162, 7, 155, 67, 19, 74, 53, 36, 0, 64, 19, - 96, 235, 231, 98, 104, 99, 72, 51, 64, 24, 247, 255, 252, 128, 28, 4, 231, 91, 104, 98, 35, 36, 84, 234, 36, 0, 231, - 86, 105, 43, 96, 51, 28, 48, 28, 57, 247, 255, 252, 69, 36, 0, 231, 78, 104, 99, 97, 43, 43, 0, 209, 40, 105, 99, 36, - 0, 97, 107, 231, 70, 104, 43, 231, 238, 104, 99, 36, 0, 96, 43, 231, 64, 104, 171, 231, 232, 104, 99, 36, 0, 96, 171, - 231, 58, 104, 107, 43, 0, 209, 3, 105, 43, 43, 0, 209, 0, 231, 45, 28, 48, 33, 0, 28, 58, 240, 0, 248, 55, 28, 48, 28, - 57, 247, 255, 252, 31, 36, 0, 231, 40, 104, 97, 104, 162, 28, 48, 247, 255, 253, 250, 28, 4, 231, 79, 28, 40, 28, 33, - 49, 8, 34, 6, 48, 24, 247, 255, 252, 19, 231, 206, 105, 43, 43, 0, 209, 158, 231, 15, 2, 201, 2, 82, 231, 107, 28, 58, - 28, 32, 28, 49, 240, 0, 249, 135, 28, 2, 30, 83, 65, 154, 231, 71, 105, 43, 43, 0, 208, 0, 231, 74, 96, 106, 36, 0, - 231, 2, 70, 192, 19, 119, 238, 132, 19, 119, 236, 12, 0, 5, 49, 0, 255, 255, 128, 0, 127, 255, 255, 255, 181, 240, 70, - 87, 70, 78, 70, 69, 180, 224, 70, 128, 28, 14, 70, 148, 42, 0, 208, 51, 33, 3, 28, 2, 64, 10, 35, 4, 26, 155, 28, 24, - 64, 8, 69, 96, 216, 49, 40, 0, 208, 49, 36, 0, 70, 67, 85, 30, 52, 1, 66, 160, 216, 250, 69, 132, 208, 32, 70, 99, 26, - 27, 8, 159, 70, 153, 0, 187, 70, 154, 43, 0, 208, 17, 4, 51, 6, 50, 2, 49, 67, 26, 67, 10, 28, 21, 70, 67, 67, 53, 24, - 26, 33, 0, 0, 139, 49, 1, 80, 213, 66, 185, 211, 250, 68, 84, 69, 209, 208, 6, 70, 67, 25, 24, 52, 1, 112, 6, 48, 1, - 69, 164, 216, 250, 188, 28, 70, 144, 70, 153, 70, 162, 188, 240, 188, 1, 71, 0, 70, 96, 231, 203, 36, 0, 231, 211, 70, - 192, 181, 48, 28, 5, 28, 12, 28, 16, 42, 0, 208, 12, 120, 42, 120, 11, 66, 154, 209, 12, 33, 0, 224, 3, 92, 106, 92, - 99, 66, 154, 209, 6, 49, 1, 66, 136, 216, 248, 32, 0, 188, 48, 188, 2, 71, 8, 32, 1, 66, 64, 231, 249, 181, 112, 76, - 17, 28, 6, 104, 32, 176, 130, 28, 13, 98, 2, 97, 6, 100, 1, 97, 65, 33, 68, 247, 255, 251, 123, 28, 48, 28, 41, 247, - 255, 251, 119, 75, 10, 34, 2, 104, 24, 104, 35, 73, 9, 147, 0, 35, 1, 247, 255, 251, 134, 28, 41, 28, 4, 28, 48, 247, - 255, 251, 121, 176, 2, 28, 32, 188, 112, 188, 2, 71, 8, 19, 119, 238, 176, 19, 119, 238, 180, 87, 70, 83, 2, 181, 240, - 176, 133, 28, 4, 28, 15, 146, 3, 40, 1, 217, 5, 32, 1, 66, 64, 176, 5, 188, 240, 188, 2, 71, 8, 77, 38, 104, 43, 43, - 0, 208, 65, 78, 37, 104, 48, 40, 0, 219, 1, 247, 255, 251, 67, 75, 35, 0, 162, 88, 208, 33, 1, 247, 255, 251, 77, 96, - 48, 40, 0, 219, 232, 104, 40, 28, 57, 34, 6, 48, 32, 247, 255, 251, 60, 104, 40, 169, 3, 34, 4, 48, 64, 247, 255, 251, - 54, 104, 42, 36, 4, 28, 19, 51, 32, 96, 19, 104, 42, 35, 6, 96, 83, 104, 42, 33, 68, 28, 19, 51, 64, 96, 147, 104, 43, - 96, 220, 104, 40, 247, 255, 251, 32, 104, 43, 104, 48, 34, 2, 147, 0, 73, 14, 35, 0, 247, 255, 251, 48, 104, 42, 28, - 19, 51, 32, 96, 19, 104, 43, 96, 92, 104, 42, 28, 19, 51, 64, 96, 147, 104, 43, 96, 220, 231, 181, 75, 7, 78, 3, 96, - 43, 35, 1, 66, 91, 96, 51, 231, 188, 19, 119, 238, 176, 19, 119, 238, 180, 19, 119, 238, 108, 87, 70, 83, 1, 19, 119, - 238, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 233, 45, 64, 128, 229, 159, 112, 248, 229, 151, 112, 0, 235, 0, 0, 45, - 232, 189, 64, 128, 225, 47, 255, 30, 233, 45, 64, 128, 229, 159, 112, 228, 229, 151, 112, 0, 235, 0, 0, 39, 232, 189, - 64, 128, 225, 47, 255, 30, 233, 45, 64, 128, 229, 159, 112, 208, 229, 151, 112, 0, 235, 0, 0, 33, 232, 189, 64, 128, - 225, 47, 255, 30, 233, 45, 64, 128, 229, 159, 112, 188, 229, 151, 112, 0, 235, 0, 0, 27, 232, 189, 64, 128, 225, 47, - 255, 30, 233, 45, 64, 128, 229, 159, 112, 168, 229, 151, 112, 0, 235, 0, 0, 21, 232, 189, 64, 128, 225, 47, 255, 30, - 233, 45, 64, 128, 229, 159, 112, 148, 229, 151, 112, 0, 235, 0, 0, 15, 232, 189, 64, 128, 225, 47, 255, 30, 230, 0, - 8, 16, 225, 47, 255, 30, 230, 0, 7, 240, 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, 80, 225, 47, 255, 30, 225, 47, - 255, 23, 180, 124, 181, 0, 247, 255, 252, 254, 188, 2, 188, 124, 71, 8, 181, 112, 176, 136, 104, 133, 28, 1, 75, 14, - 71, 24, 70, 192, 70, 114, 28, 1, 32, 4, 223, 171, 71, 16, 181, 240, 70, 95, 70, 86, 70, 77, 70, 68, 180, 240, 75, 8, - 104, 27, 71, 24, 19, 119, 224, 16, 19, 119, 224, 20, 19, 119, 224, 24, 19, 119, 224, 28, 19, 119, 224, 32, 19, 119, - 224, 36, 32, 16, 0, 213, 19, 119, 224, 12, 70, 192, 70, 192, 70, 192, 70, 192, 70, 192, 70, 192, 0, 0, 1, 0, 44, 0, - 0, 0, 72, 0, 2, 20, 60, 96, 128, 0, 44, 0, 0, 0, 64, 130, 2, 20, 60, 96, 128, 0, 4, 56, 96, 0, 1, 72, 0, 2, 68, 56, - 97, 0, 24, 12, 56, 96, 0, 1, 72, 0, 2, 68, 56, 97, 0, 24, 0, 0, 47, 100, 101, 118, 47, 102, 97, 116, 47, 108, 111, 103, - 0, 0, 0, 0, 69, 83, 95, 105, 111, 99, 116, 108, 118, 0, 0, 0, 100, 117, 109, 112, 0, 0, 0, 0, 19, 119, 230, 232, 19, - 119, 230, 196, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, - 230, 116, 19, 119, 230, 116, 19, 119, 230, 186, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, - 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, - 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 231, 30, 19, 119, 230, 116, 19, - 119, 231, 80, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 231, 40, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, - 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, - 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, - 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, - 119, 230, 116, 19, 119, 231, 138, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 231, 40, 19, 119, - 230, 116, 19, 119, 230, 116, 19, 119, 230, 180, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, - 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, - 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, - 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, - 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, - 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, - 19, 119, 230, 116, 19, 119, 231, 40, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, - 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 231, 154, 19, 119, 230, 116, 19, 119, - 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 154, 19, 119, 230, - 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 232, 10, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, - 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, - 119, 230, 116, 19, 119, 230, 116, 19, 119, 232, 2, 19, 119, 231, 254, 19, 119, 231, 246, 19, 119, 231, 242, 19, 119, - 231, 226, 19, 119, 231, 210, 19, 119, 231, 200, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, - 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 230, 116, 19, 119, 231, 186, 47, 100, 101, 118, - 47, 117, 115, 98, 47, 101, 104, 99, 0, 0, 0, 0, 47, 100, 101, 118, 47, 115, 100, 105, 111, 47, 115, 100, 104, 99, 0, - 0, 19, 119, 238, 76, 19, 119, 238, 92 +unsigned char dip_plugin[3080] __attribute__((aligned (32)))={ + 19, 119, 228, 85, 18, 52, 0, 1, 32, 34, 205, 172, 32, 32, 13, 57, 32, 32, 8, 197, 32, 32, 8, 153, 32, 32, 91, 129, 32, + 32, 0, 73, 32, 32, 40, 117, 32, 32, 54, 93, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 19, 119, 233, 53, 70, 192, 70, 192, 70, 192, 70, 192, 70, 192, 70, 192, 70, 192, 71, 120, 234, 0, 2, 7, 70, 192, 71, + 120, 234, 0, 2, 23, 70, 192, 71, 120, 234, 0, 2, 39, 70, 192, 71, 120, 234, 0, 2, 31, 70, 192, 71, 120, 234, 0, 2, 5, + 70, 192, 71, 120, 234, 0, 1, 247, 70, 192, 71, 120, 234, 0, 2, 29, 70, 192, 71, 120, 234, 0, 2, 25, 70, 192, 71, 120, + 234, 0, 2, 33, 181, 0, 75, 7, 176, 137, 147, 0, 70, 104, 35, 0, 33, 0, 34, 0, 147, 1, 147, 2, 240, 0, 252, 85, 176, + 9, 188, 2, 71, 8, 70, 192, 227, 0, 0, 0, 181, 16, 28, 3, 34, 32, 28, 12, 72, 13, 28, 25, 247, 255, 255, 210, 33, 32, + 72, 11, 247, 255, 255, 202, 73, 10, 34, 1, 104, 11, 66, 19, 209, 253, 34, 32, 28, 32, 73, 6, 247, 255, 255, 196, 28, + 32, 33, 32, 247, 255, 255, 188, 75, 4, 104, 24, 188, 16, 188, 2, 71, 8, 70, 192, 13, 0, 96, 0, 13, 0, 96, 28, 13, 0, + 96, 32, 181, 240, 70, 95, 70, 86, 70, 77, 70, 68, 180, 240, 10, 203, 70, 154, 75, 20, 176, 137, 37, 0, 28, 7, 28, 14, + 70, 145, 70, 108, 70, 155, 70, 168, 70, 91, 96, 35, 70, 67, 96, 99, 96, 163, 70, 83, 96, 227, 28, 56, 70, 75, 28, 49, + 97, 35, 247, 255, 255, 162, 70, 104, 28, 57, 28, 50, 240, 0, 252, 6, 53, 1, 40, 0, 209, 8, 176, 9, 188, 60, 70, 144, + 70, 153, 70, 162, 70, 171, 188, 240, 188, 2, 71, 8, 45, 15, 217, 223, 231, 243, 208, 0, 0, 0, 181, 112, 176, 136, 75, + 8, 28, 6, 28, 13, 70, 108, 147, 0, 96, 97, 146, 2, 247, 255, 255, 129, 28, 49, 28, 42, 70, 104, 240, 0, 251, 229, 176, + 8, 188, 112, 188, 2, 71, 8, 168, 0, 0, 0, 181, 240, 70, 95, 70, 86, 70, 77, 70, 68, 180, 240, 176, 143, 144, 4, 145, + 3, 146, 2, 41, 0, 209, 0, 224, 126, 10, 82, 70, 145, 35, 128, 34, 0, 1, 27, 70, 147, 34, 255, 147, 1, 3, 210, 171, 6, + 146, 0, 70, 152, 224, 7, 154, 3, 68, 179, 69, 90, 217, 62, 154, 5, 24, 179, 10, 219, 68, 153, 154, 3, 70, 91, 26, 214, + 70, 74, 2, 83, 154, 2, 66, 154, 216, 87, 35, 0, 147, 5, 36, 0, 159, 4, 34, 128, 68, 95, 28, 56, 28, 49, 1, 18, 240, + 0, 248, 103, 44, 0, 209, 47, 40, 0, 208, 45, 155, 0, 28, 6, 66, 152, 217, 1, 38, 255, 3, 246, 10, 242, 70, 146, 36, + 0, 75, 43, 70, 66, 96, 19, 35, 0, 96, 83, 96, 147, 70, 83, 96, 211, 70, 75, 97, 19, 28, 56, 28, 49, 247, 255, 255, 38, + 70, 64, 28, 57, 28, 50, 240, 0, 251, 138, 52, 1, 28, 5, 40, 0, 208, 192, 44, 15, 217, 230, 45, 0, 208, 188, 176, 15, + 28, 40, 188, 60, 70, 144, 70, 153, 70, 162, 70, 171, 188, 240, 188, 2, 71, 8, 154, 5, 25, 147, 154, 1, 66, 147, 217, + 1, 155, 5, 26, 214, 32, 128, 1, 0, 33, 32, 247, 255, 254, 251, 28, 4, 40, 0, 208, 18, 33, 128, 1, 9, 70, 74, 247, 255, + 255, 59, 28, 5, 40, 0, 208, 15, 28, 32, 247, 255, 254, 217, 231, 216, 26, 211, 0, 155, 28, 28, 147, 5, 30, 99, 65, 156, + 231, 163, 37, 1, 66, 109, 231, 208, 37, 0, 231, 206, 154, 5, 28, 56, 24, 161, 28, 50, 247, 255, 254, 214, 28, 56, 28, + 49, 247, 255, 254, 206, 231, 228, 70, 192, 208, 0, 0, 0, 181, 48, 28, 13, 28, 20, 6, 195, 209, 18, 75, 15, 66, 152, + 217, 19, 33, 0, 75, 14, 24, 194, 75, 14, 66, 154, 216, 1, 75, 13, 26, 25, 66, 161, 211, 5, 28, 8, 66, 169, 216, 10, + 30, 99, 67, 152, 224, 0, 32, 0, 188, 48, 188, 2, 71, 8, 35, 192, 4, 91, 26, 25, 231, 232, 28, 40, 30, 99, 67, 152, 231, + 244, 1, 127, 255, 255, 240, 0, 0, 0, 3, 97, 127, 255, 19, 97, 128, 0, 71, 112, 70, 192, 181, 48, 28, 4, 72, 15, 28, + 13, 104, 131, 104, 193, 176, 129, 24, 91, 24, 154, 105, 3, 43, 0, 209, 15, 104, 67, 43, 0, 209, 7, 28, 32, 28, 41, 247, + 255, 255, 13, 176, 1, 188, 48, 188, 2, 71, 8, 28, 32, 28, 41, 247, 255, 255, 27, 231, 246, 28, 32, 28, 41, 240, 0, 249, + 220, 231, 241, 70, 192, 19, 119, 240, 0, 181, 240, 79, 27, 35, 1, 28, 4, 96, 59, 176, 129, 33, 32, 247, 255, 254, 127, + 104, 227, 43, 8, 208, 8, 28, 32, 240, 0, 250, 214, 35, 0, 96, 59, 176, 1, 188, 240, 188, 2, 71, 8, 105, 163, 37, 197, + 104, 24, 104, 89, 247, 255, 254, 109, 105, 163, 1, 173, 104, 27, 28, 40, 33, 8, 104, 92, 104, 30, 247, 255, 254, 100, + 75, 10, 4, 36, 64, 30, 67, 52, 78, 9, 96, 44, 28, 40, 33, 4, 96, 52, 247, 255, 254, 73, 28, 48, 33, 4, 247, 255, 254, + 69, 35, 0, 96, 59, 32, 0, 231, 217, 70, 192, 19, 119, 240, 40, 0, 0, 255, 255, 0, 0, 49, 136, 181, 16, 73, 20, 28, 4, + 104, 139, 104, 202, 24, 154, 105, 11, 43, 0, 209, 18, 104, 75, 43, 0, 209, 11, 33, 32, 247, 255, 254, 175, 40, 0, 219, + 3, 105, 162, 75, 12, 66, 154, 208, 10, 188, 16, 188, 2, 71, 8, 33, 32, 247, 255, 254, 185, 231, 242, 33, 32, 240, 0, + 249, 123, 231, 238, 75, 6, 34, 1, 112, 26, 120, 91, 43, 0, 209, 238, 247, 255, 254, 10, 231, 235, 70, 192, 19, 119, + 240, 0, 93, 28, 158, 163, 32, 34, 205, 172, 181, 240, 70, 87, 70, 70, 180, 192, 28, 4, 120, 0, 176, 129, 28, 14, 28, + 23, 40, 224, 208, 24, 77, 133, 35, 0, 98, 43, 28, 3, 59, 112, 43, 143, 217, 13, 28, 32, 28, 49, 28, 58, 240, 0, 250, + 108, 28, 4, 176, 1, 28, 32, 188, 12, 70, 144, 70, 154, 188, 240, 188, 2, 71, 8, 74, 123, 0, 155, 88, 211, 70, 159, 77, + 120, 106, 43, 43, 0, 209, 2, 105, 43, 43, 0, 208, 230, 28, 48, 33, 0, 28, 58, 240, 0, 248, 240, 106, 43, 224, 143, 104, + 107, 43, 0, 209, 2, 105, 43, 43, 0, 208, 217, 36, 0, 231, 221, 35, 1, 34, 37, 84, 171, 104, 43, 43, 0, 208, 0, 224, + 173, 28, 32, 28, 58, 240, 0, 250, 62, 28, 4, 34, 0, 35, 37, 84, 234, 44, 0, 209, 204, 224, 46, 104, 235, 104, 169, 70, + 154, 105, 43, 70, 136, 43, 0, 209, 0, 224, 176, 32, 0, 34, 0, 70, 67, 70, 81, 67, 11, 209, 2, 42, 0, 209, 0, 224, 176, + 28, 3, 30, 90, 65, 147, 96, 107, 28, 48, 28, 57, 247, 255, 255, 107, 28, 4, 231, 176, 105, 43, 43, 0, 208, 167, 35, + 2, 224, 85, 104, 97, 104, 162, 40, 208, 209, 0, 224, 144, 28, 48, 247, 255, 254, 250, 28, 4, 40, 0, 209, 160, 35, 37, + 92, 235, 43, 0, 209, 156, 28, 48, 28, 57, 247, 255, 254, 237, 231, 151, 35, 36, 92, 234, 42, 0, 209, 179, 105, 41, 84, + 234, 35, 37, 96, 42, 96, 106, 96, 170, 96, 234, 98, 42, 84, 234, 70, 136, 41, 0, 209, 0, 231, 128, 105, 108, 247, 255, + 253, 142, 70, 64, 28, 41, 28, 34, 56, 1, 49, 24, 240, 0, 248, 249, 28, 4, 231, 122, 104, 107, 43, 0, 208, 93, 75, 60, + 36, 160, 98, 43, 2, 36, 231, 114, 104, 107, 43, 0, 209, 3, 105, 43, 43, 0, 209, 0, 231, 101, 104, 99, 104, 162, 7, 155, + 67, 19, 74, 53, 36, 0, 64, 19, 96, 235, 231, 98, 104, 99, 72, 51, 64, 24, 247, 255, 253, 122, 28, 4, 231, 91, 104, 98, + 35, 36, 84, 234, 36, 0, 231, 86, 105, 43, 96, 51, 28, 48, 28, 57, 247, 255, 253, 67, 36, 0, 231, 78, 104, 99, 97, 43, + 43, 0, 209, 40, 105, 99, 36, 0, 97, 107, 231, 70, 104, 43, 231, 238, 104, 99, 36, 0, 96, 43, 231, 64, 104, 171, 231, + 232, 104, 99, 36, 0, 96, 171, 231, 58, 104, 107, 43, 0, 209, 3, 105, 43, 43, 0, 209, 0, 231, 45, 28, 48, 33, 0, 28, + 58, 240, 0, 248, 55, 28, 48, 28, 57, 247, 255, 253, 29, 36, 0, 231, 40, 104, 97, 104, 162, 28, 48, 247, 255, 254, 122, + 28, 4, 231, 79, 28, 40, 28, 33, 49, 8, 34, 6, 48, 24, 247, 255, 253, 17, 231, 206, 105, 43, 43, 0, 209, 158, 231, 15, + 2, 201, 2, 82, 231, 107, 28, 58, 28, 32, 28, 49, 240, 0, 249, 121, 28, 2, 30, 83, 65, 154, 231, 71, 105, 43, 43, 0, + 208, 0, 231, 74, 96, 106, 36, 0, 231, 2, 70, 192, 19, 119, 240, 0, 19, 119, 233, 144, 0, 5, 49, 0, 255, 255, 128, 0, + 127, 255, 255, 255, 181, 240, 70, 87, 70, 78, 70, 69, 180, 224, 70, 128, 28, 14, 70, 148, 42, 0, 208, 51, 33, 3, 28, + 2, 64, 10, 35, 4, 26, 155, 28, 24, 64, 8, 69, 96, 216, 49, 40, 0, 208, 49, 36, 0, 70, 67, 85, 30, 52, 1, 66, 160, 216, + 250, 69, 132, 208, 32, 70, 99, 26, 27, 8, 159, 70, 153, 0, 187, 70, 154, 43, 0, 208, 17, 4, 51, 6, 50, 2, 49, 67, 26, + 67, 10, 28, 21, 70, 67, 67, 53, 24, 26, 33, 0, 0, 139, 49, 1, 80, 213, 66, 185, 211, 250, 68, 84, 69, 209, 208, 6, 70, + 67, 25, 24, 52, 1, 112, 6, 48, 1, 69, 164, 216, 250, 188, 28, 70, 144, 70, 153, 70, 162, 188, 240, 188, 1, 71, 0, 70, + 96, 231, 203, 36, 0, 231, 211, 70, 192, 181, 112, 76, 17, 28, 6, 104, 32, 176, 130, 28, 13, 98, 2, 97, 6, 100, 1, 97, + 65, 33, 68, 247, 255, 252, 147, 28, 48, 28, 41, 247, 255, 252, 143, 75, 10, 34, 2, 104, 24, 104, 35, 73, 9, 147, 0, + 35, 1, 247, 255, 252, 154, 28, 41, 28, 4, 28, 48, 247, 255, 252, 145, 176, 2, 28, 32, 188, 112, 188, 2, 71, 8, 19, 119, + 240, 44, 19, 119, 240, 48, 87, 70, 83, 2, 181, 240, 176, 133, 28, 4, 28, 15, 146, 3, 40, 2, 216, 75, 77, 47, 104, 43, + 43, 0, 208, 74, 78, 46, 104, 48, 40, 0, 219, 1, 247, 255, 252, 97, 74, 44, 0, 163, 88, 152, 33, 1, 247, 255, 252, 107, + 96, 48, 40, 0, 219, 66, 104, 48, 40, 0, 219, 49, 104, 40, 28, 57, 34, 6, 48, 32, 247, 255, 252, 87, 104, 40, 169, 3, + 34, 4, 48, 64, 247, 255, 252, 81, 104, 42, 36, 4, 28, 19, 51, 32, 96, 19, 104, 42, 35, 6, 96, 83, 104, 42, 33, 68, 28, + 19, 51, 64, 96, 147, 104, 43, 96, 220, 104, 40, 247, 255, 252, 59, 104, 43, 104, 48, 34, 2, 147, 0, 73, 22, 35, 0, 247, + 255, 252, 71, 104, 42, 28, 19, 51, 32, 96, 19, 104, 43, 96, 92, 104, 42, 28, 19, 51, 64, 96, 147, 104, 43, 96, 220, + 176, 5, 188, 240, 188, 2, 71, 8, 32, 1, 66, 64, 231, 248, 75, 11, 78, 8, 96, 43, 35, 1, 66, 91, 96, 51, 231, 179, 44, + 0, 209, 186, 72, 8, 33, 1, 247, 255, 252, 31, 96, 48, 231, 180, 70, 192, 19, 119, 240, 44, 19, 119, 240, 48, 19, 119, + 235, 252, 87, 70, 83, 1, 19, 119, 240, 64, 19, 119, 235, 208, 233, 45, 64, 128, 229, 159, 113, 0, 229, 151, 112, 0, + 235, 0, 0, 45, 232, 189, 64, 128, 225, 47, 255, 30, 233, 45, 64, 128, 229, 159, 112, 236, 229, 151, 112, 0, 235, 0, + 0, 39, 232, 189, 64, 128, 225, 47, 255, 30, 233, 45, 64, 128, 229, 159, 112, 216, 229, 151, 112, 0, 235, 0, 0, 33, 232, + 189, 64, 128, 225, 47, 255, 30, 233, 45, 64, 128, 229, 159, 112, 196, 229, 151, 112, 0, 235, 0, 0, 27, 232, 189, 64, + 128, 225, 47, 255, 30, 233, 45, 64, 128, 229, 159, 112, 176, 229, 151, 112, 0, 235, 0, 0, 21, 232, 189, 64, 128, 225, + 47, 255, 30, 233, 45, 64, 128, 229, 159, 112, 156, 229, 151, 112, 0, 235, 0, 0, 15, 232, 189, 64, 128, 225, 47, 255, + 30, 230, 0, 8, 16, 225, 47, 255, 30, 230, 0, 7, 240, 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, 80, 225, 47, 255, + 30, 225, 47, 255, 23, 239, 0, 0, 204, 225, 47, 255, 30, 180, 124, 181, 0, 247, 255, 253, 30, 188, 2, 188, 124, 71, 8, + 181, 112, 176, 136, 104, 133, 28, 1, 75, 14, 71, 24, 70, 192, 70, 114, 28, 1, 32, 4, 223, 171, 71, 16, 181, 240, 70, + 95, 70, 86, 70, 77, 70, 68, 180, 240, 75, 8, 104, 27, 71, 24, 19, 119, 224, 16, 19, 119, 224, 20, 19, 119, 224, 24, + 19, 119, 224, 28, 19, 119, 224, 32, 19, 119, 224, 36, 32, 16, 0, 213, 19, 119, 224, 12, 70, 192, 70, 192, 19, 119, 228, + 236, 19, 119, 228, 200, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, + 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 190, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, + 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, + 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 229, 34, 19, 119, 228, + 120, 19, 119, 229, 84, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 229, 44, 19, 119, 228, 120, 19, 119, 228, 120, + 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, + 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, + 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, + 120, 19, 119, 228, 120, 19, 119, 229, 142, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 229, 44, + 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 184, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, + 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, + 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, + 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, + 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, + 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, + 228, 120, 19, 119, 228, 120, 19, 119, 229, 44, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, + 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 229, 158, 19, 119, 228, 120, + 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 158, 19, + 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 230, 14, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, + 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, + 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 230, 6, 19, 119, 230, 2, 19, 119, 229, 250, 19, 119, 229, 246, 19, + 119, 229, 230, 19, 119, 229, 214, 19, 119, 229, 204, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, + 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 228, 120, 19, 119, 229, 190, 47, 100, 101, + 118, 47, 117, 115, 98, 47, 101, 104, 99, 0, 0, 0, 0, 47, 100, 101, 118, 47, 117, 115, 98, 50, 0, 0, 0, 47, 100, 101, + 118, 47, 115, 100, 105, 111, 47, 115, 100, 104, 99, 0, 0, 19, 119, 235, 224, 19, 119, 235, 236, 19, 119, 235, 208 }; diff --git a/source/mload/dip_plugin.h b/source/mload/dip_plugin.h index 748e4642..39611eaf 100644 --- a/source/mload/dip_plugin.h +++ b/source/mload/dip_plugin.h @@ -1,3 +1,3 @@ -#define size_dip_plugin 3700 +#define size_dip_plugin 3080 -extern unsigned char dip_plugin[3700]; +extern unsigned char dip_plugin[3080]; diff --git a/source/mload/mload.c b/source/mload/mload.c index 46837cd0..2fade148 100644 --- a/source/mload/mload.c +++ b/source/mload/mload.c @@ -1,4 +1,4 @@ -/* mload.c (for PPC) (c) 2009, Hermes +/* 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 @@ -17,70 +17,98 @@ #include "mload.h" #include "ehcmodule.h" +//#include "ehcmodule_elf.h" #include "dip_plugin.h" static const char mload_fs[] ATTRIBUTE_ALIGN(32) = "/dev/mload"; static u32 patch_datas[8] ATTRIBUTE_ALIGN(32); -static s32 mload_fd = -1; +static s32 mload_fd = -1; +static s32 hid = -1; /*--------------------------------------------------------------------------------------------------------------*/ // to init/test if the device is running -int mload_init() { - int n; +int mload_init() +{ +int n; - if (mload_fd>=0) return 0; + if(hid<0) hid = iosCreateHeap(0x800); - for (n=0;n<10;n++) { // try 2.5 seconds - mload_fd=IOS_Open(mload_fs, 0); + if(hid<0) + { + if(mload_fd>=0) + IOS_Close(mload_fd); - if (mload_fd>=0) break; + mload_fd=-1; - usleep(250*1000); - } + return hid; + } - return mload_fd; + 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); + } + + if(mload_fd<0) + { + + if(hid>=0) + { + iosDestroyHeap(hid); + hid=-1; + } + } + +return mload_fd; } /*--------------------------------------------------------------------------------------------------------------*/ // to close the device (remember call it when rebooting the IOS!) -int mload_close() { - int ret; +int mload_close() +{ +int ret; - if (mload_fd<0) return -1; + if(hid>=0) + { + iosDestroyHeap(hid); + hid=-1; + } - ret=IOS_Close(mload_fd); + if(mload_fd<0) return -1; + + ret=IOS_Close(mload_fd); + + mload_fd=-1; - mload_fd=-1; - - return ret; +return ret; } /*--------------------------------------------------------------------------------------------------------------*/ // to get the thread id of mload -int mload_get_thread_id() { - int ret; - s32 hid = -1; +int mload_get_thread_id() +{ +int ret; + if(mload_init()<0) return -1; + + ret= IOS_IoctlvFormat(hid, mload_fd, MLOAD_MLOAD_THREAD_ID, ":"); - if (mload_init()<0) return -1; - - hid = iosCreateHeap(0x800); - - if (hid<0) return hid; - - ret= IOS_IoctlvFormat(hid, mload_fd, MLOAD_MLOAD_THREAD_ID, ":"); - - - iosDestroyHeap(hid); - - return ret; +return ret; } @@ -88,23 +116,15 @@ 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) { - int ret; - s32 hid = -1; +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); - if (mload_init()<0) return -1; - - hid = iosCreateHeap(0x800); - - if (hid<0) return hid; - - ret= IOS_IoctlvFormat(hid, mload_fd, MLOAD_GET_LOAD_BASE, ":ii",starlet_base, size); - - - iosDestroyHeap(hid); - - return ret; +return ret; } @@ -113,43 +133,47 @@ 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) { - int ret; - void *buf=NULL; - s32 hid = -1; - - if (mload_init()<0) return -1; - - hid = iosCreateHeap(len+0x800); - - if (hid<0) return hid; - - buf= iosAlloc(hid, len); - - if (!buf) { - ret= -1; - goto out; - } +int mload_module(void *addr, int len) +{ +int ret; +void *buf=NULL; - memcpy(buf, addr,len); + if(mload_init()<0) return -1; - ret = IOS_IoctlvFormat(hid, mload_fd, MLOAD_LOAD_MODULE, ":d", buf, len); + if(hid>=0) + { + iosDestroyHeap(hid); + hid=-1; + } - if (ret<0) goto out; + hid = iosCreateHeap(len+0x800); + + if(hid<0) return hid; - ret=IOS_IoctlvFormat(hid, mload_fd, MLOAD_RUN_MODULE, ":"); + buf= iosAlloc(hid, len); - if (ret<0) { - ret= -666; - goto out; - } + if(!buf) {ret= -1;goto out;} + + memcpy(buf, addr,len); + + ret = IOS_IoctlvFormat(hid, mload_fd, MLOAD_LOAD_MODULE, ":d", buf, len); + + if(ret<0) goto out; + + ret=IOS_IoctlvFormat(hid, mload_fd, MLOAD_RUN_MODULE, ":"); + + if(ret<0) {ret= -666;goto out;} + out: - - iosDestroyHeap(hid); - - return ret; + if(hid>=0) + { + iosDestroyHeap(hid); + hid=-1; + } + +return ret; } @@ -158,110 +182,103 @@ out: // 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; +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! +if(elf & 3) return -1; // aligned to 4 please! - elfheader *head=(void *) elf; - elfphentry *entries; +elfheader *head=(void *) elf; +elfphentry *entries; - if (head->ident0!=0x7F454C46) return -1; - if (head->ident1!=0x01020161) return -1; - if (head->ident2!=0x01000000) return -1; +if(head->ident0!=0x7F454C46) return -1; +if(head->ident1!=0x01020161) return -1; +if(head->ident2!=0x01000000) return -1; - p=head->phoff; +p=head->phoff; - data_elf->start=(void *) head->entry; +data_elf->start=(void *) head->entry; - for (n=0; nphnum; n++) { - entries=(void *) (elf+p); - p+=sizeof(elfphentry); +for(n=0; nphnum; n++) + { + entries=(void *) (elf+p); + p+=sizeof(elfphentry); - if (entries->type == 4) { - adr=(void *) (elf + entries->offset); + if(entries->type == 4) + { + adr=(void *) (elf + entries->offset); - if (getbe32(0)!=0) return -2; // bad info (sure) + 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; + 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) + { - } 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; + + } + } - 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; +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; - s32 hid = -1; +int mload_run_thread(void *starlet_addr, void *starlet_top_stack, int stack_size, int priority) +{ +int ret; - if (mload_init()<0) return -1; - - hid = iosCreateHeap(0x800); - - if (hid<0) return hid; - - ret= IOS_IoctlvFormat(hid, mload_fd, MLOAD_RUN_THREAD, "iiii:", starlet_addr,starlet_top_stack, stack_size, priority); + if(mload_init()<0) return -1; + + ret= IOS_IoctlvFormat(hid, mload_fd, MLOAD_RUN_THREAD, "iiii:", starlet_addr,starlet_top_stack, stack_size, priority); - iosDestroyHeap(hid); - - return ret; +return ret; } /*--------------------------------------------------------------------------------------------------------------*/ // stops one starlet thread -int mload_stop_thread(int id) { - int ret; - s32 hid = -1; +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); - if (mload_init()<0) return -1; - - hid = iosCreateHeap(0x800); - - if (hid<0) return hid; - - ret= IOS_IoctlvFormat(hid, mload_fd, MLOAD_STOP_THREAD, "i:", id); - - - iosDestroyHeap(hid); - - return ret; +return ret; } @@ -269,203 +286,295 @@ int mload_stop_thread(int id) { // continue one stopped starlet thread -int mload_continue_thread(int id) { - int ret; - s32 hid = -1; +int mload_continue_thread(int id) +{ +int ret; + if(mload_init()<0) return -1; - if (mload_init()<0) return -1; - - hid = iosCreateHeap(0x800); - - if (hid<0) return hid; - - ret= IOS_IoctlvFormat(hid, mload_fd, MLOAD_CONTINUE_THREAD, "i:", id); - - - iosDestroyHeap(hid); - - return ret; + 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); +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); +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); +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; - s32 hid = -1; +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); - if (mload_init()<0) return -1; - - hid = iosCreateHeap(0x800); - - if (hid<0) return hid; - - ret= IOS_IoctlvFormat(hid, mload_fd, MLOAD_MEMSET, "iii:", starlet_addr, set, len); - - - iosDestroyHeap(hid); - - return ret; +return ret; } /*--------------------------------------------------------------------------------------------------------------*/ // get the ehci datas ( ehcmodule.elf uses this address) -void * mload_get_ehci_data() { - int ret; - s32 hid = -1; +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; - if (mload_init()<0) return NULL; - - hid = iosCreateHeap(0x800); - - if (hid<0) return NULL; - - ret= IOS_IoctlvFormat(hid, mload_fd, MLOAD_GET_EHCI_DATA, ":"); - if (ret<0) return NULL; - - iosDestroyHeap(hid); - - return (void *) ret; +return (void *) ret; } /*--------------------------------------------------------------------------------------------------------------*/ // set the dev/es ioctlv in routine -int mload_set_ES_ioctlv_vector(void *starlet_addr) { - int ret; - s32 hid = -1; +int mload_set_ES_ioctlv_vector(void *starlet_addr) +{ +int ret; + if(mload_init()<0) return -1; - if (mload_init()<0) return -1; - - hid = iosCreateHeap(0x800); - - if (hid<0) return hid; - - ret= IOS_IoctlvFormat(hid, mload_fd, MLOAD_SET_ES_IOCTLV, "i:", starlet_addr); - - - iosDestroyHeap(hid); - - return ret; + ret= IOS_IoctlvFormat(hid, mload_fd, MLOAD_SET_ES_IOCTLV, "i:", starlet_addr); + +return ret; } -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) + + +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; + +} + + + +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_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) }; -int load_ehc_module() { - - int is_ios=0; - - if (mload_module(ehcmodule, size_ehcmodule)<0) return -1; - usleep(350*1000); - - - // Test for IOS - - mload_seek(0x20207c84, SEEK_SET); - mload_read(patch_datas, 4); - if (patch_datas[0]==0x6e657665) { - is_ios=38; - } else { - is_ios=36; +int load_ehc_module() +{ + int is_ios=0; + if (mload_module(ehcmodule, size_ehcmodule)<0) return -1; +/* + if (mload_init() >= 0) { + data_elf my_data_elf; + mload_elf((void *) ehcmodule_elf, &my_data_elf); + mload_run_thread(my_data_elf.start, my_data_elf.stack, my_data_elf.size_stack, 0x47); } +*/ + // Test for IOS + mload_seek(0x20207c84, SEEK_SET); + mload_read(patch_datas, 4); + if(patch_datas[0]==0x6e657665) + { + is_ios=38; + } + else + { + is_ios=36; + } - if (is_ios==36) { - // IOS 36 - memcpy(ios_36, dip_plugin, 4); // copy the entry_point - memcpy(dip_plugin, ios_36, 4*10); // copy the adresses from the array + if(is_ios==36) + { + // IOS 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(0x1377E000, SEEK_SET); // copy dip_plugin in the starlet + mload_write(dip_plugin,size_dip_plugin); - mload_seek(0x1377E000, SEEK_SET); // copy dip_plugin in the starlet - mload_write(dip_plugin,size_dip_plugin); + // enables DIP plugin + mload_seek(0x20209040, SEEK_SET); + mload_write(ios_36, 4); + + } + if(is_ios==38) + { + // IOS 38 - // enables DIP plugin - mload_seek(0x20209040, SEEK_SET); - mload_write(ios_36, 4); + 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(0x1377E000, SEEK_SET); // copy dip_plugin in the starlet + mload_write(dip_plugin,size_dip_plugin); - } - if (is_ios==38) { - // IOS 38 + // enables DIP plugin + mload_seek(0x20208030, SEEK_SET); + mload_write(ios_38, 4); - 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(0x1377E000, SEEK_SET); // copy dip_plugin in the starlet - mload_write(dip_plugin,size_dip_plugin); + mload_close(); - // enables DIP plugin - mload_seek(0x20208030, SEEK_SET); - mload_write(ios_38, 4); - - } - - - mload_close(); - - return 0; +return 0; } + int patch_cios_data() { patch_datas[0]=*((u32 *) (dip_plugin+16*4)); mload_set_ES_ioctlv_vector((void *) patch_datas[0]); return 1; } + + + diff --git a/source/mload/mload.h b/source/mload/mload.h index e1f8b90f..f542def4 100644 --- a/source/mload/mload.h +++ b/source/mload/mload.h @@ -1,4 +1,4 @@ -/* mload.c (for PPC) (c) 2009, Hermes +/* 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 @@ -27,6 +27,7 @@ #include "unistd.h" #define MLOAD_MLOAD_THREAD_ID 0x4D4C4400 +#define MLOAD_GET_IOS_BASE 0x4D4C4401 #define MLOAD_LOAD_MODULE 0x4D4C4480 #define MLOAD_RUN_MODULE 0x4D4C4481 #define MLOAD_RUN_THREAD 0x4D4C4482 @@ -38,9 +39,17 @@ #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 + #ifdef __cplusplus extern "C" { #endif @@ -50,11 +59,12 @@ extern "C" { #define getbe32(x) ((adr[x]<<24) | (adr[x+1]<<16) | (adr[x+2]<<8) | (adr[x+3])) - typedef struct { +typedef struct +{ u32 ident0; - u32 ident1; - u32 ident2; - u32 ident3; + u32 ident1; + u32 ident2; + u32 ident3; u32 machinetype; u32 version; u32 entry; @@ -67,125 +77,153 @@ extern "C" { u16 shentsize; u16 shnum; u16 shtrndx; - } elfheader; +} elfheader; - typedef struct { - u32 type; - u32 offset; - u32 vaddr; - u32 paddr; - u32 filesz; - u32 memsz; - u32 flags; - u32 align; - } elfphentry; +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; +typedef struct +{ + void *start; + int prio; + void *stack; + int size_stack; +} data_elf; - /*--------------------------------------------------------------------------------------------------------------*/ +/*--------------------------------------------------------------------------------------------------------------*/ // to init/test if the device is running - int mload_init(); +int mload_init(); - /*--------------------------------------------------------------------------------------------------------------*/ +/*--------------------------------------------------------------------------------------------------------------*/ // to close the device (remember call it when rebooting the IOS!) - int mload_close(); +int mload_close(); - /*--------------------------------------------------------------------------------------------------------------*/ +/*--------------------------------------------------------------------------------------------------------------*/ // to get the thread id of mload - int mload_get_thread_id(); +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); +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); +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); +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); +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); +int mload_stop_thread(int id); - /*--------------------------------------------------------------------------------------------------------------*/ +/*--------------------------------------------------------------------------------------------------------------*/ // continue one stopped starlet thread - int mload_continue_thread(int id); +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); +int mload_seek(int offset, int mode); - /*--------------------------------------------------------------------------------------------------------------*/ +/*--------------------------------------------------------------------------------------------------------------*/ // read bytes from starlet (it update the offset) - int mload_read(void* buf, u32 size); +int mload_read(void* buf, u32 size); - /*--------------------------------------------------------------------------------------------------------------*/ +/*--------------------------------------------------------------------------------------------------------------*/ // write bytes from starlet (it update the offset) - int mload_write(const void * buf, u32 size); +int mload_write(const void * buf, u32 size); - /*--------------------------------------------------------------------------------------------------------------*/ +/*--------------------------------------------------------------------------------------------------------------*/ // fill a block (similar to memset) - int mload_memset(void *starlet_addr, int set, int len); +int mload_memset(void *starlet_addr, int set, int len); - /*--------------------------------------------------------------------------------------------------------------*/ +/*--------------------------------------------------------------------------------------------------------------*/ // get the ehci datas ( ehcmodule.elf uses this address) - void * mload_get_ehci_data(); +void * mload_get_ehci_data(); - /*--------------------------------------------------------------------------------------------------------------*/ +/*--------------------------------------------------------------------------------------------------------------*/ // set the dev/es ioctlv in routine - int mload_set_ES_ioctlv_vector(void *starlet_addr); +int mload_set_ES_ioctlv_vector(void *starlet_addr); - /*--------------------------------------------------------------------------------------------------------------*/ - int load_ehc_module(); - int patch_cios_data(); +/*--------------------------------------------------------------------------------------------------------------*/ + + +// 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_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 load_ehc_module(); +int patch_cios_data(); #ifdef __cplusplus -} + } #endif diff --git a/source/prompts/DiscBrowser.cpp b/source/prompts/DiscBrowser.cpp index 00153dd5..f30473eb 100644 --- a/source/prompts/DiscBrowser.cpp +++ b/source/prompts/DiscBrowser.cpp @@ -240,7 +240,7 @@ int autoSelectDol(const char *id, bool force) { ////// games that can be forced (always need alt dol) //Boogie - if (strcmp(id,"RBOP69") == 0) return 657;//from isostar + if (strcmp(id,"RBOP69") == 0) return 675;//previous value was 657 if (strcmp(id,"RBOE69") == 0) return 675;//starstremr //Fifa 08 diff --git a/source/prompts/PromptWindows.cpp b/source/prompts/PromptWindows.cpp index ad365030..a583cefd 100644 --- a/source/prompts/PromptWindows.cpp +++ b/source/prompts/PromptWindows.cpp @@ -1750,7 +1750,7 @@ bool SearchMissingImages(int choice2) { __Menu_GetEntries(); ResumeGui(); - if (cntMissFiles > 0 && !IsNetworkInit()) { + if (cntMissFiles > 0) { //&& !IsNetworkInit()) { NetworkInitPrompt(); } diff --git a/source/prompts/gameinfo.cpp b/source/prompts/gameinfo.cpp index 94b07167..d67d0674 100644 --- a/source/prompts/gameinfo.cpp +++ b/source/prompts/gameinfo.cpp @@ -1024,8 +1024,7 @@ bool save_gamelist(int txt) { // save gamelist /* Closing and reopening because of a write issue we are having right now */ f = fopen(tmp, "w"); - if (txt==0) - { + 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"); @@ -1039,11 +1038,10 @@ bool save_gamelist(int txt) { // save gamelist 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",get_title(header)); - } - fprintf(f, "\n"); + } + fprintf(f, "\n"); } - } - else { + } else { fprintf(f, "\"ID\",\"Size(GB)\",\"Name\"\n"); @@ -1054,10 +1052,9 @@ bool save_gamelist(int txt) { // save gamelist 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,get_title(header)); //fprintf(f, "\"%.2f\",", size); //fprintf(f, "\"%s\"",get_title(header)); - } - //fprintf(f, "\n"); + } + //fprintf(f, "\n"); } - } fclose(f); diff --git a/source/usbloader/disc.c b/source/usbloader/disc.c index 4a80e255..cc7db4e2 100644 --- a/source/usbloader/disc.c +++ b/source/usbloader/disc.c @@ -103,6 +103,8 @@ void __Disc_SetVMode(u8 videoselected) { /* NTSC or unknown */ case 'E': case 'J': + case 'K': + case 'W': if (tvmode != CONF_VIDEO_NTSC) { vmode_reg = 0; vmode = (progressive) ? &TVNtsc480Prog : &TVNtsc480IntDf;