Example #1
0
        //エラーチェック
        public static void MakeCheckError(List <FELint.ErrorSt> errors)
        {
            uint[] pointers = GetPointers();

            InputFormRef InputFormRef = Init(null);

            for (int n = 0; n < pointers.Length; n++)
            {
                if (pointers[n] == 0)
                {
                    continue;
                }

                InputFormRef.ReInitPointer(pointers[n]);
                uint p = InputFormRef.BaseAddress;
                for (uint i = 0; i < InputFormRef.DataCount; i++, p += InputFormRef.BlockSize)
                {
                    string name = "MenuDef" + i + "_";
                    uint   paddr;

                    paddr = Program.ROM.p32(8 + p);
                    if (!U.isSafetyOffset(paddr))
                    {
                        continue;
                    }
                    FELint.CheckPointer(U.toPointer(paddr), errors, FELint.Type.MENU_DEFINE, p, i);
                    MenuCommandForm.MakeCheckError(errors, 8 + p);

                    paddr = Program.ROM.u32(12 + p);
                    FELint.CheckASMPointerOrNull(paddr, errors, FELint.Type.MENU_DEFINE, p, i);

                    paddr = Program.ROM.u32(16 + p);
                    FELint.CheckASMPointerOrNull(paddr, errors, FELint.Type.MENU_DEFINE, p, i);

                    paddr = Program.ROM.u32(20 + p);
                    FELint.CheckASMPointerOrNull(paddr, errors, FELint.Type.MENU_DEFINE, p, i);

                    paddr = Program.ROM.u32(24 + p);
                    FELint.CheckASMPointerOrNull(paddr, errors, FELint.Type.MENU_DEFINE, p, i);

                    paddr = Program.ROM.u32(28 + p);
                    FELint.CheckASMPointerOrNull(paddr, errors, FELint.Type.MENU_DEFINE, p, i);

                    paddr = Program.ROM.u32(32 + p);
                    FELint.CheckASMPointerOrNull(paddr, errors, FELint.Type.MENU_DEFINE, p, i);
                }
            }
        }
Example #2
0
        public static void MakeCheckError(List <FELint.ErrorSt> errors, uint pointer)
        {
            InputFormRef InputFormRef = Init(null);

            InputFormRef.ReInitPointer(pointer);

            uint p = InputFormRef.BaseAddress;

            for (uint i = 0; i < InputFormRef.DataCount; i++, p += InputFormRef.BlockSize)
            {
                uint paddr;
                paddr = Program.ROM.u32(0 + p);
                FELint.CheckPointerOrNull(paddr, errors, FELint.Type.MENU, p, i);

                if (Program.ROM.RomInfo.is_multibyte() == false)
                {
                    uint name = Program.ROM.u16(4 + p);
                    FELint.CheckText(name, "MENUNAME1", errors, FELint.Type.MENU, p, i);
                }

                uint detail = Program.ROM.u16(6 + p);
                FELint.CheckText(detail, "MENUDETAIL3", errors, FELint.Type.MENU, p, i);

                paddr = Program.ROM.u32(12 + p);
                FELint.CheckASMPointerOrNull(paddr, errors, FELint.Type.MENU, p, i);

                paddr = Program.ROM.u32(16 + p);
                FELint.CheckASMPointerOrNull(paddr, errors, FELint.Type.MENU, p, i);

                paddr = Program.ROM.u32(20 + p);
                FELint.CheckASMPointerOrNull(paddr, errors, FELint.Type.MENU, p, i);

                paddr = Program.ROM.u32(24 + p);
                FELint.CheckASMPointerOrNull(paddr, errors, FELint.Type.MENU, p, i);

                paddr = Program.ROM.u32(28 + p);
                FELint.CheckASMPointerOrNull(paddr, errors, FELint.Type.MENU, p, i);

                paddr = Program.ROM.u32(32 + p);
                FELint.CheckASMPointerOrNull(paddr, errors, FELint.Type.MENU, p, i);
            }
        }