Beispiel #1
0
        private void X_GOTO_GRAPHICS_TOOL_JP_NAME_Click(object sender, EventArgs e)
        {
            uint addr        = U.toOffset((uint)P8.Value);
            uint paletteAddr = Program.ROM.p32(JP_FONT_PALETTE_POINTER);

            GraphicsToolForm f = (GraphicsToolForm)InputFormRef.JumpForm <GraphicsToolForm>(U.NOT_FOUND);

            f.Jump(32 * 8, 4 * 8, addr, 0, 0, 0, paletteAddr, 0, 1, 0);
        }
Beispiel #2
0
        private void GraphicsToolButton_Click(object sender, EventArgs e)
        {
            uint image   = U.toOffset(D12.Value);
            uint palette = U.toOffset(D16.Value);

            int width          = 256;
            int height         = 8 * 4; //32
            GraphicsToolForm f = (GraphicsToolForm)InputFormRef.JumpFormLow <GraphicsToolForm>();

            f.Jump(width
                   , height
                   , image
                   , 0
                   , 0
                   , 0
                   , palette
                   , 0
                   , 0
                   , 0);
            f.Show();
        }
Beispiel #3
0
        private void X_JumpGraphicsTool_Click(object sender, EventArgs e)
        {
            if (this.DisplayImageWidth == 0)
            {
                return;
            }

            GraphicsToolForm f = (GraphicsToolForm)InputFormRef.JumpFormLow <GraphicsToolForm>();

            f.Jump(this.DisplayImageWidth
                   , this.DisplayImageHeight
                   , this.DisplayImageAddress
                   , 0
                   , this.DisplayTSAAddress
                   , 1
                   , this.DisplayPaletteAddress
                   , 0
                   , 0
                   , 0);
            f.Show();
        }
        private void GraphicsToolButton_Click(object sender, EventArgs e)
        {
            uint image   = U.toOffset(D0.Value);
            uint palette = U.toOffset(D8.Value);
            uint tsa     = U.toOffset(D4.Value);

            int width          = 30 * 8;
            int height         = 20 * 8;
            GraphicsToolForm f = (GraphicsToolForm)InputFormRef.JumpFormLow <GraphicsToolForm>();

            f.Jump(width
                   , height
                   , image
                   , 0
                   , tsa
                   , 1
                   , palette
                   , 1
                   , 8
                   , 0);
            f.Show();
        }
Beispiel #5
0
        private void GraphicsToolButton_Click(object sender, EventArgs e)
        {
            uint image   = U.toOffset(P0.Value);
            uint palette = U.toOffset(P4.Value);
            uint tsa     = U.toOffset(P8.Value);

            int width          = 32 * 8;
            int height         = GetThisImageHeight();
            int palette_count  = 8;
            GraphicsToolForm f = (GraphicsToolForm)InputFormRef.JumpFormLow <GraphicsToolForm>();

            f.Jump(width
                   , height
                   , image
                   , 0
                   , tsa
                   , 2
                   , palette
                   , 0
                   , palette_count
                   , 0);
            f.Show();
        }
Beispiel #6
0
        AsmMapFile MakeFullLow()
        {
            AsmMapFile map = new AsmMapFile(this.BaseSymbol);

            if (IsStopFlag)
            {
                return(map);
            }

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

            List <DisassemblerTrumb.LDRPointer> ldrmap;

            try
            {
                ldrmap           = DisassemblerTrumb.MakeLDRMap(Program.ROM.Data, 0x100);
                this.LDRMapCache = ldrmap;
                if (IsStopFlag)
                {
                    return(map);
                }
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
                Debug.Assert(false);
                return(map);
            }

            try
            {
                MakeHardCodeWarning(); //ハードコーディングされているデータの警告
                if (IsStopFlag)
                {
                    return(map);
                }
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
                Debug.Assert(false);
            }

            try
            {
                ScanFELintByThread(ldrmap);
                if (IsStopFlag)
                {
                    return(map);
                }
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
                Debug.Assert(false);
                return(map);
            }

            Dictionary <uint, bool> knownDic = new Dictionary <uint, bool>();
            List <Address>          structlist;

            try
            {
                structlist = U.MakeAllStructPointersList(false); //既存の構造体
                if (IsStopFlag)
                {
                    return(map);
                }
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
                Debug.Assert(false);
                return(map);
            }

            try
            {
                PatchForm.MakePatchStructDataList(structlist, true, true, false); //パッチが知っている領域.
                if (IsStopFlag)
                {
                    return(map);
                }
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
                Debug.Assert(false);
            }

            try
            {
                //参照の逆追跡
                this.VarsIDArray = U.MakeVarsIDArray(map);
                if (IsStopFlag)
                {
                    return(map);
                }
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
                Debug.Assert(false);
            }

            try
            {
                GraphicsToolForm.MakeLZ77DataList(structlist); //lz77で圧縮されたもの(主に画像)
                if (IsStopFlag)
                {
                    return(map);
                }
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
                Debug.Assert(false);
            }

            try
            {
                ProcsScriptForm.MakeAllDataLength(structlist, ldrmap);
                if (IsStopFlag)
                {
                    return(map);
                }
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
                Debug.Assert(false);
            }

            try
            {
                OAMSPForm.MakeAllDataLength(structlist, structlist, ldrmap);
                if (IsStopFlag)
                {
                    return(map);
                }
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
                Debug.Assert(false);
            }

            try
            {
                knownDic = AsmMapFile.MakeKnownListToDic(structlist);
                AsmMapFile.MakeFreeDataList(structlist, knownDic, 0x100, 0x00, 16); //フリー領域
                if (IsStopFlag)
                {
                    return(map);
                }
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
                Debug.Assert(false);
            }

            try
            {
                AsmMapFile.MakeFreeDataList(structlist, knownDic, 0x100, 0xFF, 16); //フリー領域
                if (IsStopFlag)
                {
                    return(map);
                }
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
                Debug.Assert(false);
            }

            try
            {
                map.AppendMAP(structlist);
                if (IsStopFlag)
                {
                    return(map);
                }
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
                Debug.Assert(false);
            }

            Dictionary <uint, uint> ldrtable = new Dictionary <uint, uint>();  //LDR参照データがある位置を記録します. コードの末尾などにあります. 数が多くなるのでマップする.

            try
            {
                AsmMapFile.MakeSwitchDataList(ldrtable, 0x100, 0);
                if (IsStopFlag)
                {
                    return(map);
                }
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
                Debug.Assert(false);
            }

            try
            {
                map.AppendMAP(ldrtable);
                if (IsStopFlag)
                {
                    return(map);
                }
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
                Debug.Assert(false);
            }

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

            return(map);
        }
Beispiel #7
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);
        }