Ejemplo n.º 1
0
        public Disassembly(USBGecko UGecko, String UVdappPath, ListBox UMainBox,
            VScrollBar UScroll,TextBox UAInput,TextBox UASAddress,TextBox UASText,ExceptionHandler UEXCHandler)
        {
            gecko = UGecko;
            exceptionHandling = UEXCHandler;
            vdappPath = UVdappPath;
            if (!GlobalFunctions.tryToHex(GeckoApp.Properties.Settings.Default.MemViewAddr, out cAddress))
            {
                // If the restored value is corrupt, use this instead
                cAddress = 0x80003100;
            }
            scrollbar = UScroll;
            mainBox = UMainBox;
            adressInput = UAInput;
            asAddress = UASAddress;
            asText = UASText;

            mainBox.SelectedIndexChanged += MainBoxClick;
            mainBox.DoubleClick += MainBoxDoubleClick;
            mainBox.KeyDown += MainBoxKeyDown;
            scrollbar.Scroll += Scrolling;
            
#if MONO
			GAs = "powerpc-eabi-as";
			GLd = "powerpc-eabi-ld";
			GOc = "powerpc-eabi-objcopy";
#else
            GAs = "powerpc-gekko-as.exe";
            GLd = "powerpc-gekko-ld.exe";
            GOc = "powerpc-gekko-objcopy.exe";
#endif
        }
Ejemplo n.º 2
0
        public MemoryViewer(TCPGecko UGecko, UInt32 initAddress,DataGridView UGView,
            TextBox UPokeAddress,TextBox UPokeValue,Label UFPValue, ExceptionHandler UExpHandler)
        {
            gecko = UGecko;
            exceptionHandling = UExpHandler;

            cAddress = initAddress;
            gView = UGView;
            pokeAddress = UPokeAddress;
            pokeValue = UPokeValue;
            fpValue = UFPValue;
            gView.CellClick += CellClick;
            gView.SelectionChanged += CellSelectionChange;
        }
Ejemplo n.º 3
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            this.Icon = Icon.ExtractAssociatedIcon(System.Reflection.Assembly.GetEntryAssembly().Location);

            int i;
            SettingsFile = new Xml("gecko.xml");
            SettingsFile.RootName = "gecko";

            gamename = "";
            gecko = new USBGecko();
            gecko.chunkUpdate += transfer;

            exceptionHandling = new ExceptionHandler(this);

            if (!Directory.Exists("DumpHistory"))
                Directory.CreateDirectory("DumpHistory");

            search = new MemSearch(gecko, SearchResults,
                PrvPage, NxtPage, ResList, UpDownSearchResultPage, exceptionHandling);

            viewer = new MemoryViewer(gecko, ValidMemory.ValidAreas[0].low, memViewGrid,
                memViewPAddress, memViewPValue, MemViewFPValue, exceptionHandling);

#if MONO
            disassembler = new Disassembly(gecko, "./vdappc", DisAssBox, DisScroll,
                DisRegion, AsAddress, AsText, exceptionHandling);
#else
            disassembler = new Disassembly(gecko, "vdappc.exe", DisAssBox, DisScroll,
                DisRegion, AsAddress, AsText, exceptionHandling);
#endif

            bpHandler = new Breakpoints(gecko, BPList, this, disassembler, BPDiss, BPClassic, BPCondList, exceptionHandling);
            //bpHandler = new Breakpoints(gecko, BPList, this, disassembler, richTextBox1, BPClassic, BPCondList, exceptionHandling);
            foreach (String reg in BPList.longRegNames)
                BPConditionRegSelect.Items.Add(reg.Trim());
            BPConditionRegSelect.Items.Add("VoA");

            BPConditionRegSelect.SelectedIndex = 0;
            BPConditionCompare.SelectedIndex = 0;

            bpHandler.BPSkip += BPSkipped;

            watcher = new WatchList(gecko, WatchList, WatchIntervalSet, exceptionHandling);
            addWatchDialog = null;
            watchValueInput = null;

            fst = new FST(gecko, FSTTreeView, FSTCodeData, FSTSetAsSource, FSTSetAsTarget,
                FSTGenSwap, FSTFileSource, FSTFileTarget, FSTSwapCode, FSTSwapNow, exceptionHandling);

            GCTCodeContents = new CodeController(GCTCodeList, GCTCodeValues);
            GCTCodeContents.codesModified += GCTModified;

            bpHandler.BPStop += BPStopped;

            for (i = 0; i < ValidMemory.ValidAreas.Length; i++)
            {
                memRange.Items.Add(
                    GlobalFunctions.toHex(ValidMemory.ValidAreas[i].id, 2));
                MemViewARange.Items.Add(
                    GlobalFunctions.toHex(ValidMemory.ValidAreas[i].id, 2));
                ToolsDumpRegions.Items.Add(
                    GlobalFunctions.toHex(ValidMemory.ValidAreas[i].id, 2));
            }

            codeWizard = new GCTWizard(GCTCodeContents);

            memRange.SelectedIndex = 0;
            MemViewARange.SelectedIndex = 0;
            MemViewShowMode.SelectedIndex = 0;
            MemViewSearchType.SelectedIndex = 0;
            ToolsDumpRegions.SelectedIndex = 0;

            comboBoxSearchDataType.SelectedIndex = 2;

            //UpperEnable.SelectedIndex = 0;


            //BPType.SelectedIndex = 0;
            comboBoxDisplayType.SelectedIndex = 0;

            WasAlreadyDisabled = new List<Control>();
            searchComparisons = new List<SearchComparisonInfo>();
            searchComparisons.Add(new SearchComparisonInfo());
            comboBoxComparisonType.SelectedIndex = 0;
            comboBoxComparisonRHS.SelectedIndex = 0;
            buttonCancelSearch.Enabled = false;
            SteppingOut = false;
            buttonUndoSearch.Enabled = search.CanUndo();

            TabLock = null;
            BPStepLogWriter = null;

            comboBoxPokeOperation.SelectedIndex = 0;

            SetComboboxValue("Screenshots", "Format", 0, ImgFormat);
            SetComboboxValue("Screenshots", "Sizing", 0, ShotSizingType);

            int value = SettingsFile.GetValue("Screenshots", "JPEGQuality", 85);
            if (value < 0 || value > 100)
                value = 85;
            JPGQual.Value = value;

            multiPokeAddr = new List<UInt32>();

            FormStop(false);
            CUSBGecko.Enabled = true;

            codesModified = false;

            AbtText.Text = "gecko dotNET Beta 0.63 by Link and dcx2\n\n"
                          + "Special thanks to:\n\n"
                          + "kenobi: for original WiiRd GUI!\n"
                          + "Nuke: for the USB Gecko!\n"
                          + "brkirch: for continuing Gecko OS!\n"
                          + "Y.S.: for the original code handler!\n"
                          + "Team Twiizers for bringing homebrew to the Wii\n"
                          + "DevKitPro team: No homebrew without them!\n"
                          + "Frank Wille: vdappc developer!\n"
                          + "various beta testers!\n"
                          + "and you!";

            notes = new NoteSheets();

            //Set MEM2 upper to 93400000
            MEM2UpperBoundary.SelectedIndex = 0;

            // Restore previous settings
            checkBoxAlwaysOnTop.Checked = GeckoApp.Properties.Settings.Default.AlwaysOnTop;
            numericUpDownFPS.Value = GeckoApp.Properties.Settings.Default.FPS;
            BPAddress.Text = GeckoApp.Properties.Settings.Default.BPAddr;
            memViewAValue.Text = GeckoApp.Properties.Settings.Default.MemViewAddr;
            BPType.SelectedIndex = GeckoApp.Properties.Settings.Default.BPType;
            checkBoxBPNext.Checked = GeckoApp.Properties.Settings.Default.BPNext;
            checkBoxPauseCodes.Checked = GeckoApp.Properties.Settings.Default.PauseCodes;
            Size = GeckoApp.Properties.Settings.Default.LastSize;
            int oldSplitter = GeckoApp.Properties.Settings.Default.LastSplitterSize;
            // The splitter gets moved when the breakpoint page is entered
            // so artificially force it to move
            MainControl.SelectedTab = BreakpointPage;
            MainControl.SelectedTab = searchPage;
            splitContainerRegASM.SplitterDistance = oldSplitter;
            toolStripTextBoxMemViewFontSize.Text = GeckoApp.Properties.Settings.Default.MemViewFontSize.ToString();
            toolStripTextBoxMemViewFontSize_KeyDown(null, new KeyEventArgs(Keys.Enter));
            viewFloatsInHexToolStripMenuItem.Checked = GeckoApp.Properties.Settings.Default.ViewFloatsInHex;
            //addressTextBox1.CopyStringToHistory(GeckoApp.Properties.Settings.Default.addressHistory);
            //addressTextBox1.AutoHistory = true;

        }
Ejemplo n.º 4
0
        public WatchList(USBGecko UGecko,DataGridView UWatchOut,NumericUpDown UWatchUpDown,ExceptionHandler UEXCHandler)
        {
            exceptionHandling = UEXCHandler;
            PAddressDebug = false;

            addressWatchList = new List<WatchEntry>();
            gecko = UGecko;
            watchOut = UWatchOut;
            watchUpDown = UWatchUpDown;
            listEnabled = true;
            listActive = true;
            listManager = new Thread(UpdateListThread);
            listManager.Start();
        }
Ejemplo n.º 5
0
        public MemoryViewer(USBGecko UGecko, UInt32 initAddress, DataGridView UGView,
                            TextBox UPokeAddress, TextBox UPokeValue, Label UFPValue, ExceptionHandler UExpHandler)
        {
            gecko             = UGecko;
            exceptionHandling = UExpHandler;

            cAddress                = initAddress;
            gView                   = UGView;
            pokeAddress             = UPokeAddress;
            pokeValue               = UPokeValue;
            fpValue                 = UFPValue;
            gView.CellClick        += CellClick;
            gView.SelectionChanged += CellSelectionChange;
        }
Ejemplo n.º 6
0
        public Breakpoints(TCPGecko UGecko, BPList UBPOut, MainForm UMainForm, Disassembly UDissAss,
            //RichTextBox UDissBox, TextBox UClassicBox, ListBox conditionList, ExceptionHandler UExcHandler)
            TextBox UDissBox, TextBox UClassicBox, ListBox conditionList, ExceptionHandler UExcHandler)
        {
            exceptionHandling = UExcHandler;
            gecko = UGecko;
            bpOutput = UBPOut;
            mainForm = UMainForm;
            listSet = false;
            disassembler = UDissAss;
            dissBox = UDissBox;
            classicBox = UClassicBox;
            stepOverPossible = false;

            changableRegs = new UInt32[40];

            regDialog = new RegisterDialog();

            PConditions = new BreakpointConditions(conditionList);

            for (int i = 0; i < 40; i++)
            {
                bpOutput.shortRegTextBox[i].Click += clickReg;
            }

            ShowFloatsInHex = false;
        }