Example #1
0
        private void dolBrew_Load(object sender, EventArgs e)
        {
            string dollocation = "";
            string dvdroot     = "";
            string apploader   = "";

            if (File.Exists(main.gamesPath + "/rii/" + System.IO.Path.GetFileName(main.gamesPath + "/" + System.IO.Path.GetFileNameWithoutExtension(main.isoPath)) + "/DATA/sys/main.dol"))
            {
                System.IO.File.Copy(main.gamesPath + "/rii/" + System.IO.Path.GetFileName(main.gamesPath + "/" + System.IO.Path.GetFileNameWithoutExtension(main.isoPath)) + "/DATA/sys/main.dol", main.gamesPath + "/rii/" + System.IO.Path.GetFileName(main.gamesPath + "/" + System.IO.Path.GetFileNameWithoutExtension(main.isoPath)) + "/DATA/files/main.dol", true);
                System.IO.File.Copy(main.gamesPath + "/rii/" + System.IO.Path.GetFileName(main.gamesPath + "/" + System.IO.Path.GetFileNameWithoutExtension(main.isoPath)) + "/DATA/sys/apploader.img", main.gamesPath + "/rii/" + System.IO.Path.GetFileName(main.gamesPath + "/" + System.IO.Path.GetFileNameWithoutExtension(main.isoPath)) + "/DATA/files/apploader.img", true);

                dollocation = main.gamesPath + "/rii/" + System.IO.Path.GetFileName(main.gamesPath + "/" + System.IO.Path.GetFileNameWithoutExtension(main.isoPath)) + "/DATA/files/main.dol";
                dvdroot     = main.gamesPath + "/rii/" + System.IO.Path.GetFileName(main.gamesPath + "/" + System.IO.Path.GetFileNameWithoutExtension(main.isoPath)) + "/DATA/files";
                apploader   = main.gamesPath + "/rii/" + System.IO.Path.GetFileName(main.gamesPath + "/" + System.IO.Path.GetFileNameWithoutExtension(main.isoPath)) + "/DATA/files/apploader.img";
            }
            else
            {
                System.IO.File.Copy(main.gamesPath + "/rii/" + System.IO.Path.GetFileName(main.gamesPath + "/" + System.IO.Path.GetFileNameWithoutExtension(main.isoPath)) + "/sys/main.dol", main.gamesPath + "/rii/" + System.IO.Path.GetFileName(main.gamesPath + "/" + System.IO.Path.GetFileNameWithoutExtension(main.isoPath)) + "/files/main.dol", true);
                System.IO.File.Copy(main.gamesPath + "/rii/" + System.IO.Path.GetFileName(main.gamesPath + "/" + System.IO.Path.GetFileNameWithoutExtension(main.isoPath)) + "/sys/apploader.img", main.gamesPath + "/rii/" + System.IO.Path.GetFileName(main.gamesPath + "/" + System.IO.Path.GetFileNameWithoutExtension(main.isoPath)) + "/files/apploader.img", true);

                dollocation = main.gamesPath + "/rii/" + System.IO.Path.GetFileName(main.gamesPath + "/" + System.IO.Path.GetFileNameWithoutExtension(main.isoPath)) + "/files/main.dol";
                dvdroot     = main.gamesPath + "/rii/" + System.IO.Path.GetFileName(main.gamesPath + "/" + System.IO.Path.GetFileNameWithoutExtension(main.isoPath)) + "/files";
                apploader   = main.gamesPath + "/rii/" + System.IO.Path.GetFileName(main.gamesPath + "/" + System.IO.Path.GetFileNameWithoutExtension(main.isoPath)) + "/files/apploader.img";
            }


            dolPatcher idontknowwhyicalleditdolpatcherbecauseonedoesntpatchdolslol = new dolPatcher();

            idontknowwhyicalleditdolpatcherbecauseonedoesntpatchdolslol.patchDol(System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "/Dolphin Emulator", main.isoPath, dvdroot, apploader, dollocation, main.dolphinPath);
        }
        private void btnDebug_Click(object sender, EventArgs e)
        {
            dolPatcher banaan = new dolPatcher();

            MessageBox.Show(banaan.toHex(isoPath));
            //banaan.copySave(banaan.toHex(isoPath), dolphinPath);

            banaan.writeSaveFiles("C:/Documenten/Dolphin Emulator/Wii/title/00010000/524d4750");
        }