예제 #1
0
        public void MakeTextIDArray(List <UseTextID> list)
        {
            AsmMapFile map = GetAsmMapFile();

            map.MakeTextIDArray(list);
        }
예제 #2
0
        AsmMapFile MakeFullLow()
        {
            AsmMapFile map = MakeInstant();

            if (IsStopFlag)
            {
                return(map);
            }

            //LDRマップのクリア
            this.LDRMapCache = new List <DisassemblerTrumb.LDRPointer>();
            this.FELintCache = new Dictionary <uint, List <FELint.ErrorSt> >();

            List <DisassemblerTrumb.LDRPointer> ldrmap;

#if !DEBUG
            try
            {
#endif
            ldrmap           = DisassemblerTrumb.MakeLDRMap(Program.ROM.Data, 0x100);
            this.LDRMapCache = ldrmap;
            if (IsStopFlag)
            {
                return(map);
            }
#if !DEBUG
        }

        catch (Exception e)
        {
            Log.Error(e.ToString());
            return(map);
        }
#endif
#if !DEBUG
            try
            {
#endif
            MakeHardCodeWarning(); //ハードコーディングされているデータの警告
            if (IsStopFlag)
            {
                return(map);
            }
#if !DEBUG
        }
        catch (Exception e)
        {
            Log.Error(e.ToString());
        }
#endif
#if !DEBUG
            try
            {
#endif
            ScanFELintByThread(ldrmap);
            if (IsStopFlag)
            {
                return(map);
            }
#if !DEBUG
        }
        catch (Exception e)
        {
            Log.Error(e.ToString());
            return(map);
        }
#endif
            List <Address> structlist;
#if !DEBUG
            try
            {
#endif
            structlist = U.MakeAllStructPointersList(false); //既存の構造体
            if (IsStopFlag)
            {
                return(map);
            }
#if !DEBUG
        }
        catch (Exception e)
        {
            Log.Error(e.ToString());
            return(map);
        }
#endif

#if !DEBUG
            try
            {
#endif
            PatchForm.MakePatchStructDataList(structlist, true, true, false); //パッチが知っている領域.
            if (IsStopFlag)
            {
                return(map);
            }
#if !DEBUG
        }
        catch (Exception e)
        {
            Log.Error(e.ToString());
        }
#endif
#if !DEBUG
            try
            {
#endif
            map.MakeTextIDArray(); //全テキストIDの検出
            if (IsStopFlag)
            {
                return(map);
            }
#if !DEBUG
        }
        catch (Exception e)
        {
            Log.Error(e.ToString());
        }
#endif
#if !DEBUG
            try
            {
#endif
            GraphicsToolForm.MakeLZ77DataList(structlist); //lz77で圧縮されたもの(主に画像)
            if (IsStopFlag)
            {
                return(map);
            }
#if !DEBUG
        }
        catch (Exception e)
        {
            Log.Error(e.ToString());
        }
#endif
#if !DEBUG
            try
            {
#endif
            ProcsScriptForm.MakeAllDataLength(structlist, ldrmap);
            if (IsStopFlag)
            {
                return(map);
            }
#if !DEBUG
        }
        catch (Exception e)
        {
            Log.Error(e.ToString());
        }
#endif


#if !DEBUG
            try
            {
#endif
            OAMSPForm.MakeAllDataLength(structlist, structlist, ldrmap);
            if (IsStopFlag)
            {
                return(map);
            }
#if !DEBUG
        }
        catch (Exception e)
        {
            Log.Error(e.ToString());
        }
#endif
#if !DEBUG
            try
            {
#endif
            AsmMapFile.MakeFreeDataList(structlist, 0x100, 0x00, 16); //フリー領域
            if (IsStopFlag)
            {
                return(map);
            }
#if !DEBUG
        }
        catch (Exception e)
        {
            Log.Error(e.ToString());
        }
#endif
#if !DEBUG
            try
            {
#endif
            AsmMapFile.MakeFreeDataList(structlist, 0x100, 0xFF, 16); //フリー領域
            if (IsStopFlag)
            {
                return(map);
            }
#if !DEBUG
        }
        catch (Exception e)
        {
            Log.Error(e.ToString());
        }
#endif
#if !DEBUG
            try
            {
#endif
            map.AppendMAP(structlist);
            if (IsStopFlag)
            {
                return(map);
            }
#if !DEBUG
        }
        catch (Exception e)
        {
            Log.Error(e.ToString());
        }
#endif
            Dictionary <uint, uint> ldrtable = new Dictionary <uint, uint>();  //LDR参照データがある位置を記録します. コードの末尾などにあります. 数が多くなるのでマップする.
#if !DEBUG
            try
            {
#endif

            AsmMapFile.MakeSwitchDataList(ldrtable, 0x100, 0);
            if (IsStopFlag)
            {
                return(map);
            }
#if !DEBUG
        }
        catch (Exception e)
        {
            Log.Error(e.ToString());
        }
#endif
#if !DEBUG
            try
            {
#endif

            map.AppendMAP(ldrtable);
            if (IsStopFlag)
            {
                return(map);
            }
#if !DEBUG
        }
        catch (Exception e)
        {
            Log.Error(e.ToString());
        }
#endif

            //近場リスト生成.
            map.MakeNearSearchSortedList();

            return(map);
        }