-removed dollz compression from external booter
-corrected some licensing stuff
Before Width: | Height: | Size: 78 B After Width: | Height: | Size: 68 B |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 146 KiB |
@ -1,19 +1,30 @@
|
|||||||
/****************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2012 FIX94
|
* Copyright (C) 2010
|
||||||
|
* by dude
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This software is provided 'as-is', without any express or implied
|
||||||
* it under the terms of the GNU General Public License as published by
|
* warranty. In no event will the authors be held liable for any
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* damages arising from the use of this software.
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* Permission is granted to anyone to use this software for any
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* purpose, including commercial applications, and to alter it and
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* redistribute it freely, subject to the following restrictions:
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* 1. The origin of this software must not be misrepresented; you
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* must not claim that you wrote the original software. If you use
|
||||||
****************************************************************************/
|
* this software in a product, an acknowledgment in the product
|
||||||
|
* documentation would be appreciated but is not required.
|
||||||
|
*
|
||||||
|
* 2. Altered source versions must be plainly marked as such, and
|
||||||
|
* must not be misrepresented as being the original software.
|
||||||
|
*
|
||||||
|
* 3. This notice may not be removed or altered from any source
|
||||||
|
* distribution.
|
||||||
|
*
|
||||||
|
* Channel Launcher Class
|
||||||
|
*
|
||||||
|
* for WiiXplorer 2010
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -124,9 +135,6 @@ static u32 MoveDol(u8 *buffer)
|
|||||||
dolchunksize[dolchunkcount] = dolfile->section_size[i];
|
dolchunksize[dolchunkcount] = dolfile->section_size[i];
|
||||||
|
|
||||||
memmove(dolchunkoffset[dolchunkcount], buffer + dolfile->section_pos[i], dolchunksize[dolchunkcount]);
|
memmove(dolchunkoffset[dolchunkcount], buffer + dolfile->section_pos[i], dolchunksize[dolchunkcount]);
|
||||||
DCFlushRange(dolchunkoffset[dolchunkcount], dolchunksize[dolchunkcount]);
|
|
||||||
ICInvalidateRange(dolchunkoffset[dolchunkcount], dolchunksize[dolchunkcount]);
|
|
||||||
|
|
||||||
dolchunkcount++;
|
dolchunkcount++;
|
||||||
}
|
}
|
||||||
return dolfile->entry_point;
|
return dolfile->entry_point;
|
||||||
@ -136,24 +144,18 @@ u32 LoadChannel()
|
|||||||
{
|
{
|
||||||
u32 entry = 0;
|
u32 entry = 0;
|
||||||
|
|
||||||
/* Re-Init ISFS */
|
|
||||||
ISFS_Initialize();
|
|
||||||
|
|
||||||
GetAppNameFromTmd(true, &bootcontent);
|
GetAppNameFromTmd(true, &bootcontent);
|
||||||
u8 *data = GetDol(bootcontent);
|
u8 *data = GetDol(bootcontent);
|
||||||
entry = MoveDol(data);
|
entry = MoveDol(data);
|
||||||
free(data);
|
free(data);
|
||||||
|
|
||||||
/* De-Init ISFS */
|
|
||||||
ISFS_Deinitialize();
|
|
||||||
|
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PatchChannel(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio)
|
void PatchChannel(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio)
|
||||||
{
|
{
|
||||||
bool hook = false;
|
bool hook = false;
|
||||||
for(u32 i = 0; i < dolchunkcount; i++)
|
for(u8 i = 0; i < dolchunkcount; i++)
|
||||||
{
|
{
|
||||||
patchVideoModes(dolchunkoffset[i], dolchunksize[i], vidMode, vmode, patchVidModes);
|
patchVideoModes(dolchunkoffset[i], dolchunksize[i], vidMode, vmode, patchVidModes);
|
||||||
if(vipatch) vidolpatcher(dolchunkoffset[i], dolchunksize[i]);
|
if(vipatch) vidolpatcher(dolchunkoffset[i], dolchunksize[i]);
|
||||||
@ -162,6 +164,8 @@ void PatchChannel(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryStrin
|
|||||||
if(aspectRatio != -1) PatchAspectRatio(dolchunkoffset[i], dolchunksize[i], aspectRatio);
|
if(aspectRatio != -1) PatchAspectRatio(dolchunkoffset[i], dolchunksize[i], aspectRatio);
|
||||||
if(hooktype != 0 && dogamehooks(dolchunkoffset[i], dolchunksize[i], true))
|
if(hooktype != 0 && dogamehooks(dolchunkoffset[i], dolchunksize[i], true))
|
||||||
hook = true;
|
hook = true;
|
||||||
|
DCFlushRange(dolchunkoffset[i], dolchunksize[i]);
|
||||||
|
ICInvalidateRange(dolchunkoffset[i], dolchunksize[i]);
|
||||||
}
|
}
|
||||||
if(hook)
|
if(hook)
|
||||||
ocarina_do_code(conf->title);
|
ocarina_do_code(conf->title);
|
||||||
|
@ -1,4 +1,19 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
* Copyright (C) 2012 FIX94
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
****************************************************************************/
|
||||||
#ifndef _CFG_HPP_
|
#ifndef _CFG_HPP_
|
||||||
#define _CFG_HPP_
|
#define _CFG_HPP_
|
||||||
|
|
||||||
|
@ -81,9 +81,16 @@ int main()
|
|||||||
}
|
}
|
||||||
else if(conf->BootType == TYPE_CHANNEL)
|
else if(conf->BootType == TYPE_CHANNEL)
|
||||||
{
|
{
|
||||||
|
/* Re-Init ISFS */
|
||||||
|
ISFS_Initialize();
|
||||||
|
|
||||||
|
/* Load and Patch Channel */
|
||||||
AppEntrypoint = LoadChannel();
|
AppEntrypoint = LoadChannel();
|
||||||
PatchChannel(conf->vidMode, vmode, conf->vipatch, conf->countryString,
|
PatchChannel(conf->vidMode, vmode, conf->vipatch, conf->countryString,
|
||||||
conf->patchVidMode, conf->aspectRatio);
|
conf->patchVidMode, conf->aspectRatio);
|
||||||
|
|
||||||
|
/* De-Init ISFS */
|
||||||
|
ISFS_Deinitialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set time */
|
/* Set time */
|
||||||
|