added support for Pokemon Ranger: Shadows of Almia

This commit is contained in:
FIX94 2016-11-29 18:29:55 +01:00
parent e95c51fc1b
commit 3b4e51b809
5 changed files with 29 additions and 18 deletions

View File

@ -28,6 +28,7 @@ The following games right now are supported by the installer:
|Super Mario 64 DS|101C3300|101C3400|101C3500|
|Zelda Phantom Hourglass|101C3600|101C3700|101C3800|
|Kirby Mass Attack|101C8600|101C8700|101C8800|
|Pokemon Ranger: Shadows of Almia|101E0F00|101E1000|101E1100|
## Dependencies

View File

@ -162,6 +162,7 @@ zeldast.nds:
@armips haxchi_rop.s
@armips haxchi.s
@mv rom.nds zeldast.nds
@cp zeldast.nds shadowsofalmia.nds
brainage.zip:
$(ZIP) -JXjq9 ../installer/data/brainage.zip brainage.nds
@ -206,6 +207,7 @@ zeldaph.zip:
zeldast.zip:
$(ZIP) -JXjq9 ../installer/data/zeldast.zip zeldast.nds
$(ZIP) -JXjq9 ../installer/data/shadowsofalmia.zip shadowsofalmia.nds
clean:
@rm -f *.bin *.nds ../installer/data/*.zip defines.s

View File

@ -79,6 +79,10 @@ gList_t GameList[] = {
{ 0x101C8600, "Kirby Mass Attack [JPN]", kirbymassattack_zip, &kirbymassattack_zip_size },
{ 0x101C8700, "Kirby Mass Attack [USA]", kirbymassattack_zip, &kirbymassattack_zip_size },
{ 0x101C8800, "Kirby Mass Attack [PAL]", kirbymassattack_zip, &kirbymassattack_zip_size },
{ 0x101E0F00, "Pokemon Ranger: Shadows of Almia [JPN]", shadowsofalmia_zip, &shadowsofalmia_zip_size },
{ 0x101E1000, "Pokemon Ranger: Shadows of Almia [USA]", shadowsofalmia_zip, &shadowsofalmia_zip_size },
{ 0x101E1100, "Pokemon Ranger: Shadows of Almia [PAL]", shadowsofalmia_zip, &shadowsofalmia_zip_size },
};
static const int GameListSize = sizeof(GameList) / sizeof(gList_t);

View File

@ -244,7 +244,7 @@ int Menu_Main(void)
{
OSScreenClearBufferEx(0, 0);
OSScreenClearBufferEx(1, 0);
println_noflip(0,"Haxchi v2.0u1 by FIX94");
println_noflip(0,"Haxchi v2.1 by FIX94");
println_noflip(1,"Credits to smea, plutoo, yellows8, naehrwert, derrek and dimok");
println_noflip(2,"Please select the game for the Installation from the list below.");
// Starting position.
@ -266,7 +266,7 @@ int Menu_Main(void)
{
OSScreenClearBufferEx(0, 0);
OSScreenClearBufferEx(1, 0);
println_noflip(0,"Haxchi v2.0u1 by FIX94");
println_noflip(0,"Haxchi v2.1 by FIX94");
println_noflip(1,"Credits to smea, plutoo, yellows8, naehrwert, derrek and dimok");
println_noflip(2,"You have selected the following game:");
println_noflip(3,SelectedGame->name);
@ -415,23 +415,26 @@ int Menu_Main(void)
xmlDocDumpFormatMemoryEnc(doc, &newXml, &newSize, "utf-8", 0);
xmlFreeDoc(doc);
free(metaBuf);
//libxml2 adds in extra \n at the end
if(newXml != NULL && newSize > 0 && newXml[newSize-1] == '\n')
if(newXml != NULL && newSize > 0)
{
newXml[newSize-1] = '\0';
newSize--;
}
//write back to nand
if(IOSUHAX_FSA_OpenFile(fsaFd, path, "wb", &mlcFd) >= 0)
{
println(line++,"Changing game title...");
//UTF-8 BOM
char bom[3] = { 0xEF, 0xBB, 0xBF };
if(memcmp(newXml, bom, 3) != 0)
fsa_write(fsaFd, mlcFd, bom, 0x03);
fsa_write(fsaFd, mlcFd, newXml, newSize);
IOSUHAX_FSA_CloseFile(fsaFd, mlcFd);
mlcFd = -1;
//libxml2 adds in extra \n at the end
if(newXml[newSize-1] == '\n')
{
newXml[newSize-1] = '\0';
newSize--;
}
//write back to nand
if(IOSUHAX_FSA_OpenFile(fsaFd, path, "wb", &mlcFd) >= 0)
{
println(line++,"Changing game title...");
//UTF-8 BOM
char bom[3] = { 0xEF, 0xBB, 0xBF };
if(memcmp(newXml, bom, 3) != 0)
fsa_write(fsaFd, mlcFd, bom, 0x03);
fsa_write(fsaFd, mlcFd, newXml, newSize);
IOSUHAX_FSA_CloseFile(fsaFd, mlcFd);
mlcFd = -1;
}
free(newXml);
}
}

View File

@ -13,6 +13,7 @@ extern u8 masterofdisguise_zip[]; extern u32 masterofdisguise_zip_size;
extern u8 newsmb_zip[]; extern u32 newsmb_zip_size;
extern u8 newsmb_eur_zip[]; extern u32 newsmb_eur_zip_size;
extern u8 partnersintime_zip[]; extern u32 partnersintime_zip_size;
extern u8 shadowsofalmia_zip[]; extern u32 shadowsofalmia_zip_size;
extern u8 sfcommand_zip[]; extern u32 sfcommand_zip_size;
extern u8 sm64ds_zip[]; extern u32 sm64ds_zip_size;
extern u8 wwtouched_zip[]; extern u32 wwtouched_zip_size;