diff --git a/README.md b/README.md index f89fdd8..df46c79 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/dsrom/Makefile b/dsrom/Makefile index 0d7e872..55ec749 100644 --- a/dsrom/Makefile +++ b/dsrom/Makefile @@ -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 diff --git a/installer/src/gameList.h b/installer/src/gameList.h index 6a6e802..3c25f7d 100644 --- a/installer/src/gameList.h +++ b/installer/src/gameList.h @@ -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); diff --git a/installer/src/main.c b/installer/src/main.c index 2f3e402..697e8df 100644 --- a/installer/src/main.c +++ b/installer/src/main.c @@ -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); } } diff --git a/installer/src/zipList.h b/installer/src/zipList.h index c4bf678..651daa2 100644 --- a/installer/src/zipList.h +++ b/installer/src/zipList.h @@ -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;