Beispiel #1
0
        public static void load(Filesystem fs)
        {
            filename = fs.getRomPath();
            FS       = fs;
            if (fs is NitroROMFilesystem)
            {
                romfile = new System.IO.FileInfo(filename);
            }

            arm9binFile = FS.getFileByName("arm9.bin");
            arm9ovFile  = FS.getFileByName("arm9ovt.bin");
            arm9ovs     = loadOvTable(arm9ovFile);
            arm7binFile = FS.getFileByName("arm7.bin");
            arm7ovFile  = FS.getFileByName("arm7ovt.bin");
            arm7ovs     = loadOvTable(arm7ovFile);
            rsaSigFile  = FS.getFileByName("rsasig.bin");
            headerFile  = FS.getFileByName("header.bin");

            arm9RAMAddress = headerFile.getUintAt(0x28);

            ByteArrayInputStream header = new ByteArrayInputStream(headerFile.getContents());

            romInternalName = header.ReadString(12);
            romGamecode     = header.ReadString(4);

            if (romGamecode == "A2DE")
            {
                Region = Origin.US;
            }
            else if (romGamecode == "A2DP")
            {
                Region = Origin.EU;
            }
            else if (romGamecode == "A2DJ")
            {
                Region = Origin.JP;
            }
            else if (romGamecode == "A2DK")
            {
                Region = Origin.KR;
            }
            else
            {
                isNSMBRom = false;
                Region    = Origin.UNK;
            }

            if (isNSMBRom)
            {
                UserInfo = new ROMUserInfo(filename);
                LoadOverlay0();
            }
        }
Beispiel #2
0
        public static void load(Filesystem fs)
        {
            filename = fs.getRomPath();
            FS = fs;
            if(fs is NitroROMFilesystem)
                romfile = new System.IO.FileInfo(filename);

            arm9binFile = FS.getFileByName("arm9.bin");
            arm9ovFile = FS.getFileByName("arm9ovt.bin");
            arm9ovs = loadOvTable(arm9ovFile);
            arm7binFile = FS.getFileByName("arm7.bin");
            arm7ovFile = FS.getFileByName("arm7ovt.bin");
            arm7ovs = loadOvTable(arm7ovFile);
            rsaSigFile = FS.getFileByName("rsasig.bin");
            headerFile = FS.getFileByName("header.bin");

            ByteArrayInputStream header = new ByteArrayInputStream(headerFile.getContents());
            romInternalName = header.ReadString(12);
            romGamecode = header.ReadString(4);

            if (romGamecode == "A2DE")
                Region = Origin.US;
            else if (romGamecode == "A2DP")
                Region = Origin.EU;
            else if (romGamecode == "A2DJ")
                Region = Origin.JP;
            else if (romGamecode == "A2DK")
                Region = Origin.KR;
            else
            {
                isNSMBRom = false;
                Region = Origin.UNK;
            }

            if (isNSMBRom)
            {
                UserInfo = new ROMUserInfo(filename);
                LoadOverlay0();
            }
        }
Beispiel #3
0
        public static void load(String filename)
        {
            ROM.filename = filename;
            FS = new NitroROMFilesystem(filename);
            romfile = new System.IO.FileInfo(filename);

            ByteArrayInputStream header = new ByteArrayInputStream(FS.headerFile.getContents());
            romInternalName = header.ReadString(12);
            romGamecode = header.ReadString(4);

            if (romGamecode == "A2DE")
                Region = Origin.US;
            else if (romGamecode == "A2DP")
                Region = Origin.EU;
            else if (romGamecode == "A2DJ")
                Region = Origin.JP;
            else if (romGamecode == "A2DK")
                Region = Origin.KR;
            else
            {
                isNSMBRom = false;
                Region = Origin.UNK;
            }

            if (isNSMBRom)
            {
                UserInfo = new ROMUserInfo(filename);
                LoadOverlay0();
            }
        }