コード例 #1
0
        public Breakpoints(TCPGecko UGecko, BPList UBPOut, MainForm UMainForm, Disassembly UDissAss,
                           TextBox UDissBox, TextBox UClassicBox, ListBox conditionList, ExceptionHandler UExcHandler)
        {
            exceptionHandling = UExcHandler;
            gecko             = UGecko;
            bpOutput          = UBPOut;
            mainForm          = UMainForm;
            listSet           = false;
            disassembler      = UDissAss;
            dissBox           = UDissBox;
            classicBox        = UClassicBox;
            stepOver          = false;

            changableRegs = new uint[40];

            regDialog = new RegisterDialog();

            conditions = new BreakpointConditions(conditionList);

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

            ShowFloatsInHex = false;
        }
コード例 #2
0
        public TimerHaxForm(TCPGecko gecko, uint diff)
        {
            InitializeComponent();

            this.gecko = gecko;
            this.diff  = diff;
        }
コード例 #3
0
        public bool Check(Stream regStream, BreakpointType bpType, uint bpAddress, TCPGecko gecko)
        {
            if (!Enabled)
            {
                return(true);
            }
            if (PConditions.Count == 0)
            {
                return(true);
            }
            if (regStream.Length != 0x120)
            {
                return(false);
            }
            List <uint> groups = new List <uint>();

            foreach (BreakpointCondition cond in PConditions)
            {
                if (!groups.Contains(cond.GroupNumber))
                {
                    groups.Add(cond.GroupNumber);
                }
            }

            foreach (BreakpointCondition cond in PConditions)
            {
                if (groups.Contains(cond.GroupNumber) && !cond.Compare(regStream, bpType, bpAddress, gecko))
                {
                    groups.Remove(cond.GroupNumber);
                }
            }

            return(groups.Count != 0);
        }
コード例 #4
0
        public static void setDataUpper(TCPGecko upper)
        {
            uint num1 = upper.OsVersionRequest();

            if (num1 <= 410U)
            {
                if ((int)num1 != 400 && (int)num1 != 410)
                {
                    return;
                }
                uint num2 = upper.peek_kern(4293419420U);
                uint num3 = upper.peek_kern(num2 + 4U);
                uint num4 = upper.peek_kern(num3 + 20U);
                uint low1 = upper.peek_kern((uint)((int)num4 + 0 + 0));
                uint num5 = upper.peek_kern((uint)((int)num4 + 4 + 0));
                uint low2 = upper.peek_kern((uint)((int)num4 + 0 + 16));
                uint num6 = upper.peek_kern((uint)((int)num4 + 4 + 16));
                uint low3 = upper.peek_kern((uint)((int)num4 + 0 + 32));
                uint num7 = upper.peek_kern((uint)((int)num4 + 4 + 32));
                ValidMemory.ValidAreas[0] = new AddressRange(AddressType.Ex, low1, low1 + num5);
                ValidMemory.ValidAreas[1] = new AddressRange(AddressType.Ex, low2, low2 + num6);
                ValidMemory.ValidAreas[2] = new AddressRange(AddressType.Rw, low3, low3 + num7);
            }
            else if ((int)num1 == 500 || (int)num1 == 510)
            {
                ;
            }
        }
コード例 #5
0
ファイル: fsa.cs プロジェクト: wj444/tcp-gecko-dotnet
        public FSA(TCPGecko UGecko, TreeView UTreeView, ToolStripMenuItem UExtractToolStripMenuItem, TextBox UFileSwapCode, ExceptionHandler UExceptionHandling)
        {
            exceptionHandling = UExceptionHandling;
            imgList           = new ImageList();
#if !MONO
            System.Drawing.Icon ni = IconReader.GetFolderIcon(IconReader.IconSize.Small,
                                                              IconReader.FolderType.Closed);
            imgList.Images.Add(ni);
            ni = IconReader.GetFolderIcon(IconReader.IconSize.Small,
                                          IconReader.FolderType.Open);
            imgList.Images.Add(ni);
            ni = IconReader.GetFileIcon("?.?", IconReader.IconSize.Small, false);
            imgList.Images.Add(ni);
#endif
            treeView                           = UTreeView;
            treeView.ImageList                 = imgList;
            treeView.NodeMouseClick           += TreeView_NodeMouseClick;
            treeView.AfterSelect              += treeView_AfterSelect;
            treeView.ContextMenuStrip.Opening += ContextMenuStrip_Opening;

            extractToolStripMenuItem        = UExtractToolStripMenuItem;
            extractToolStripMenuItem.Click += extractToolStripMenuItem_Click;

            gecko = UGecko;

            fileSwapCode = UFileSwapCode;

            selectedFile = -1;
        }
コード例 #6
0
        public MemSearch(TCPGecko uGecko, DataGridView uGView, Button uPrvButton, Button uNxButton,
                         Label UResLab, NumericUpDown UPageUpDown, ExceptionHandler UEHandler)
        {
            exceptionHandling = UEHandler;

            gecko = uGecko;
            gView = uGView;

            prvButton  = uPrvButton;
            nxButton   = uNxButton;
            resLab     = UResLab;
            pageUpDown = UPageUpDown;

            pageUpDown.ValueChanged += UpDownValueChanged;
            nxButton.Click          += nextPage;
            prvButton.Click         += previousPage;

            resultAddressList = new List <uint>();
            undoList          = new List <uint>();

            blockDump = false;

            dumpNum = 0;

            searchHistory = new SearchHistoryManager();
        }
コード例 #7
0
ファイル: MemAreas.cs プロジェクト: vivlim/tcp-gecko-dotnet
        public static void setDataUpper(TCPGecko upper)
        {
            UInt32 mem;

            switch (upper.OsVersionRequest())
            {
            case 400:
            case 410:
                mem = upper.peek_kern(0xffe8619c);
                break;

            case 500:
            case 510:
                return;

            // TODO: This doesn't work for some reason - crashes on connection?
            //mem = upper.peek_kern(0xffe8591c);
            //break;
            default:
                return;
            }
            UInt32 tbl = upper.peek_kern(mem + 4);
            UInt32 lst = upper.peek_kern(tbl + 20);

            UInt32 init_start = upper.peek_kern(lst + 0 + 0x00);
            UInt32 init_len   = upper.peek_kern(lst + 4 + 0x00);
            UInt32 code_start = upper.peek_kern(lst + 0 + 0x10);
            UInt32 code_len   = upper.peek_kern(lst + 4 + 0x10);
            UInt32 data_start = upper.peek_kern(lst + 0 + 0x20);
            UInt32 data_len   = upper.peek_kern(lst + 4 + 0x20);

            ValidAreas[0] = new AddressRange(AddressType.Ex, init_start, init_start + init_len);
            ValidAreas[1] = new AddressRange(AddressType.Ex, code_start, code_start + code_len);
            ValidAreas[2] = new AddressRange(AddressType.Rw, data_start, data_start + data_len);
        }
コード例 #8
0
        public WeaponsForm()
        {
            InitializeComponent();

            WeaponsHax = new WeaponsHax(TCPGecko.Instance(), MemoryUtils.Offset);
            ReloadWeaponsList();
        }
コード例 #9
0
        private void resetAllButton_Click(object sender, EventArgs e)
        {
            var result = MessageBox.Show(Strings.SINGLE_PLAYER_RESET_TITLE, Strings.SINGLE_PLAYER_RESET_TEXT,
                                         MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2);

            if (result == DialogResult.Yes)
            {
                // Reset environment flags
                clearEnvironmentButton_Click(null, null);

                // Reset levels
                LevelDataHax.ClearLevelData();
                ReloadListView();

                // reset power eggs
                powerEggsBox.Value = 0;

                // Reset upgrades
                heroShotBox.SelectedIndex  = 0;
                inkTankBox.SelectedIndex   = 0;
                splatBombBox.SelectedIndex = 0;
                burstBombBox.SelectedIndex = 0;
                seekerBox.SelectedIndex    = 0;

                // Apply levels, upgrades, and power eggs
                OKButton_Click(null, null);

                // Reset single player flags in the Inkopolis progress bits
                ProgressFlags progressFlags = new ProgressFlags(TCPGecko.Instance(), MemoryUtils.Offset);
                progressFlags.HeroSuit           = false; // octo valley intro
                progressFlags.GreatZapfish       = false; // great zapfish returned
                progressFlags.CuttlefishPostGame = false; // credits block available
                progressFlags.Apply();
            }
        }
コード例 #10
0
 public SinglePlayerForm()
 {
     InitializeComponent();
     LevelDataHax   = new LevelDataHax(TCPGecko.Instance(), MemoryUtils.Offset);
     EnvironmentHax = new EnvironmentHax(TCPGecko.Instance(), MemoryUtils.Offset);
     UpgradesHax    = new UpgradesHax(TCPGecko.Instance(), MemoryUtils.Offset);
 }
コード例 #11
0
        public Disassembly(TCPGecko 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
        }
コード例 #12
0
ファイル: Form1.cs プロジェクト: yahya14/GeckoMapTester
        private void ConnectButton_Click(object sender, EventArgs e)
        {
            Gecko = new TCPGecko(IPBox.Text, 7331);
            try
            {
                Gecko.Connect();
            }
            catch (ETCPGeckoException exc)
            {
                MessageBox.Show("Connection to the TCPGecko failed: \n\n" + exc.Message + "\n\nCheck your network connection/firewall.", "Connection failed", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                return;
            }

            Configuration.currentConfig.lastIp = IPBox.Text;
            Configuration.Save();

            uint JRAddr = Gecko.peek(0x106E975C) + 0x92D8;

            if (Gecko.peek(JRAddr) == 0x000003F2)
            {
                diff = JRAddr - 0x12CDADA0;
            }
            else
            {
                DisconnButton_Click(sender, e);
                MessageBox.Show(Properties.Resources.FIND_DIFF_FAILED_TEXT, "Connection Aborted", MessageBoxButtons.OK, MessageBoxIcon.Hand);
            }

            groupBox2.Enabled     = true;
            DisconnButton.Enabled = true;
            ConnectButton.Enabled = false;
        }
コード例 #13
0
        public bool Compare(Stream regStream, BreakpointType bpType, uint bpAddress, TCPGecko gecko)
        {
            if (regStream.Length != 0x120)
            {
                return(false);
            }

            int spos = PRegister * 4;

            uint val = 0;

            if (spos == 0x120)
            {
                switch (bpType)
                {
                case BreakpointType.Read:
                    val = gecko.peek(bpAddress);
                    break;

                case BreakpointType.ReadWrite:
                case BreakpointType.Write:
                    gecko.Step();
                    val = gecko.peek(bpAddress);
                    break;

                default:
                    return(true);
                }
            }
            else
            {
                regStream.Seek(spos, SeekOrigin.Begin);
                val = GlobalFunctions.ReadStream(regStream);
            }

            switch (PCondition)
            {
            case BreakpointComparison.Equal:
                return(val == value);

            case BreakpointComparison.NotEqual:
                return(val != value);

            case BreakpointComparison.Greater:
                return(val > value);

            case BreakpointComparison.GreaterEqual:
                return(val >= value);

            case BreakpointComparison.Lower:
                return(val < value);

            case BreakpointComparison.LowerEqual:
                return(val <= value);
            }

            return(true);
        }
コード例 #14
0
        private void setEnvironmentButton_Click(object sender, EventArgs e)
        {
            TCPGecko gecko = ((Form1)this.Owner).Gecko;

            gecko.poke32(environmentFlagsAddress, 0x0);
            gecko.poke32(environmentFlagsAddress + 0x4, 0x001FFFFF);
            gecko.poke32(environmentFlagsAddress + 0x8, 0x0);
            gecko.poke32(environmentFlagsAddress + 0xC, 0x0003EFBE);
        }
コード例 #15
0
ファイル: WeaponsForm.cs プロジェクト: thomas3340/Splat-AIO-2
        public WeaponsForm(TCPGecko gecko, uint diff)
        {
            InitializeComponent();

            this.gecko = gecko;
            this.diff  = diff;

            ReloadWeaponsList();
        }
コード例 #16
0
        private void OKButton_Click(object sender, EventArgs e)
        {
            TCPGecko gecko = ((Form1)this.Owner).Gecko;

            // poke save slots in the list into memory
            uint currentPosition = saveSlotsAddress;

            foreach (LevelData data in levelSaveData)
            {
                // poke values
                gecko.poke32(currentPosition, data.levelNumber);
                gecko.poke32(currentPosition + 0x4, data.clearState);
                gecko.poke32(currentPosition + 0x8, Convert.ToUInt32(data.scroll));

                // move to next save slot
                currentPosition += 0xC;
            }

            // fill in the rest of the slots with dummy data
            for (int i = levelSaveData.Count; i < 64; i++)
            {
                // poke values
                gecko.poke32(currentPosition, 0xFFFFFFFF);
                gecko.poke32(currentPosition + 0x4, 0x00000000);
                gecko.poke32(currentPosition + 0x8, 0x00000000);

                // move to next save slot
                currentPosition += 0xC;
            }

            // poke power eggs
            gecko.poke32(powerEggsAddress, Convert.ToUInt32(powerEggsBox.Value));

            // poke upgrades
            gecko.poke32(heroShotAddress, Convert.ToUInt32(heroShotBox.SelectedIndex));
            gecko.poke32(inkTankAddress, Convert.ToUInt32(inkTankBox.SelectedIndex));
            gecko.poke32(splatBombAddress, Convert.ToUInt32(splatBombBox.SelectedIndex));

            // for these upgrades, 0xFFFFFFFF = locked
            if (burstBombBox.SelectedIndex == 0)
            {
                gecko.poke32(burstBombAddress, 0xFFFFFFFF);
            }
            else
            {
                gecko.poke32(burstBombAddress, Convert.ToUInt32(burstBombBox.SelectedIndex - 1));
            }

            if (seekerBox.SelectedIndex == 0)
            {
                gecko.poke32(seekerAddress, 0xFFFFFFFF);
            }
            else
            {
                gecko.poke32(seekerAddress, Convert.ToUInt32(seekerBox.SelectedIndex - 1));
            }
        }
コード例 #17
0
 public UpgradesHax(TCPGecko gecko, uint offset)
 {
     Gecko            = gecko;
     HeroShotAddress  = (uint)WorldAddress.HeroShot + offset;
     InkTankAddress   = (uint)WorldAddress.InkTank + offset;
     SplatBombAddress = (uint)WorldAddress.SplatBomb + offset;
     BurstBombAddress = (uint)WorldAddress.BurstBomb + offset;
     SeekerAddress    = (uint)WorldAddress.Seeker + offset;
     PowerEggsAddress = (uint)WorldAddress.PowerEggs + offset;
 }
コード例 #18
0
ファイル: Form1.cs プロジェクト: darryl47nopra/Splat-AIO-2
        private void connectBox_Click(object sender, EventArgs e)
        {
            Gecko = new TCPGecko(ipBox.Text, 7331);

            try
            {
                Gecko.Connect();
            }
            catch (ETCPGeckoException)
            {
                MessageBox.Show(Properties.Strings.CONNECTION_FAILED_TEXT);
            }
            catch (System.Net.Sockets.SocketException)
            {
                MessageBox.Show(Properties.Strings.INVALID_IP_TEXT);
            }

            if (Gecko.peek(0x12CDADA0) == 0x000003F2)
            {
                diff = 0x0;
            }
            else if (Gecko.peek(0x12CE2DA0) == 0x000003F2)
            {
                diff = 0x8000;
            }
            else if (Gecko.peek(0x12CE3DA0) == 0x000003F2)
            {
                diff = 0x9000;
            }
            else
            {
                MessageBox.Show(Properties.Strings.FIND_DIFF_FAILED_TEXT);

                Gecko.Disconnect();
                return;
            }

            // do a version check using "ToHu" of "ToHuman"
            if (Gecko.peek(0x105EF400) != 0x546F4875)
            {
                MessageBox.Show(Properties.Strings.VERSION_CHECK_FAILED_TEXT);

                Gecko.Disconnect();
                return;
            }

            Configuration.currentConfig.lastIp = ipBox.Text;
            Configuration.Save();

            connectBox.Enabled    = false;
            disconnectBox.Enabled = true;

            load();
        }
コード例 #19
0
ファイル: MemViewer.cs プロジェクト: wj444/tcp-gecko-dotnet
        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;
        }
コード例 #20
0
        public WatchList(TCPGecko UGecko, DataGridView UWatchOut, NumericUpDown UWatchUpDown, ExceptionHandler UEXCHandler)
        {
            exceptionHandling = UEXCHandler;
            addressDebug      = false;

            addressWatchList = new List <WatchEntry>();
            gecko            = UGecko;
            watchOut         = UWatchOut;
            watchUpDown      = UWatchUpDown;
            listEnabled      = true;
            listActive       = true;
            listManager      = new Thread(UpdateListThread);
            listManager.Start();
        }
コード例 #21
0
ファイル: SplatAIOForm.cs プロジェクト: igromanru/Splat-AIO-2
        private void connectBox_Click(object sender, EventArgs e)
        {
            _gecko = TCPGecko.Instance(ipBox.Text);

            try
            {
                _gecko.Connect();
            }
            catch (ETCPGeckoException)
            {
                MessageBox.Show(Strings.CONNECTION_FAILED_TEXT);
            }
            catch (SocketException)
            {
                MessageBox.Show(Strings.INVALID_IP_TEXT);
            }

            //offset difference checker
            var JRAddr = _gecko.peek(0x106E975C) + 0x92D8;

            if (_gecko.peek(JRAddr) == 0x000003F2)
            {
                MemoryUtils.Offset = JRAddr - 0x12CDADA0;
            }
            else
            {
                MessageBox.Show(Strings.FIND_DIFF_FAILED_TEXT);

                _gecko.Disconnect();
                return;
            }

            // do a version check using "ToHu" of "ToHuman"
            if (_gecko.peek((uint)OctohaxAddress.Player00 + 0x50) != 0x546F4875)
            {
                MessageBox.Show(Strings.VERSION_CHECK_FAILED_TEXT);

                _gecko.Disconnect();
                return;
            }

            Configuration.CurrentConfig.LastIp = ipBox.Text;
            Configuration.Save();

            connectBox.Enabled    = false;
            disconnectBox.Enabled = true;

            Reload();
        }
コード例 #22
0
 public void InitializeTimerHax(TCPGecko Gecko)
 {
     TimerHaxLogic = new TimerHaxLogic(Gecko);
     if (TimerHaxLogic.RecalculatePointer())
     {
         try
         {
             TimerBox.Value = TimerHaxLogic.GetTimer();
         }
         catch (ArgumentOutOfRangeException e)
         {
             // ToDo log
         }
     }
     TimerLabel.Text = "Set timer to: " + FormatTime();
 }
コード例 #23
0
        public static void setDataUpper(TCPGecko upper)
        {
            UInt32[] data = upper.MemoryRegionRequest();

            if (data == null)
            {
                return;
            }

            for (int i = 0, j = 0; i < data.Length; i += 3, j++)
            {
                uint addr = data[i];
                uint size = data[i + 1];
                uint type = data[i + 2];
                ValidAreas[j] = new AddressRange(GetType(type), addr, addr + size);
            }
        }
コード例 #24
0
        private void ConnectButton_Click(object sender, EventArgs e)
        {
            Gecko = new TCPGecko(IPBox.Text, 7331);
            try
            {
                Gecko.Connect();
            }
            catch (ETCPGeckoException exc)
            {
                MessageBox.Show("Connection to the TCPGecko failed: \n\n" + exc.Message + "\n\nCheck your network connection/firewall.", "Connection failed", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                return;
            }

            editingBox.Enabled    = true;
            DisconnButton.Enabled = true;
            ConnectButton.Enabled = false;
        }
コード例 #25
0
ファイル: Form1.cs プロジェクト: BKOOL999/safe_nightpatcher
        private void buttonConnect_Click(object sender, EventArgs e)
        {
            Gecko = new TCPGecko(IPBox.Text, 7331);
            try
            {
                Gecko.Connect();
            }
            catch (ETCPGeckoException)
            {
                MessageBox.Show("Connection to the Gecko client failed!: \n\n" + "\n\nPlease check your network connection/firewall.", "Connection failed", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                return;
            }

            //offset difference checker
            uint JRAddr = Gecko.peek(0x106E975C) + 0x92D8;

            if (Gecko.peek(JRAddr) == 0x000003F2)
            {
                diff = JRAddr - 0x12CDADA0;
            }
            else
            {
                MessageBox.Show("The program cannot find the Splattershot Jr. in memory.  It's possible the program doesn't support the version of Gecko you are using.  Please make sure Splatoon is running and try again using a supported version of Gecko. ", "Unsupported Gecko version found!", MessageBoxButtons.OK, MessageBoxIcon.Hand);

                Gecko.Disconnect();
                return;
            }

            Gecko.poke(0x10014cfc, 0x00000001);
            System.Threading.Thread.Sleep(100);

            groupBox2.Enabled     = true;
            groupBox3.Enabled     = true;
            groupBox4.Enabled     = true;
            buttonDisconn.Enabled = true;
            buttonConnect.Enabled = false;
            if (checkBox1.Checked)
            {
                mapCheckerTimer.Start();
            }

            Configuration.currentConfig.lastIp   = IPBox.Text;
            Configuration.currentConfig.AutoPoke = checkBox1.Checked;
            Configuration.Save();
        }
コード例 #26
0
        public static void setDataUpper(TCPGecko upper)
        {
            uint mem;

            switch (upper.OsVersionRequest())
            {
            case 400:
            case 410:
                mem = upper.peek_kern(0xFFEB902C);
                break;

            case 500:
            case 510:
                mem = upper.peek_kern(0xFFEA9E4C);
                break;

            case 532:
            case 540:
                mem = upper.peek_kern(0xFFEAAA1C);
                break;

            case 551:
                mem = upper.peek_kern(0xFFEAB7AC);
                break;

            default:
                mem = upper.peek_kern();
                break;
            }
            uint tbl = upper.peek_kern(mem + 4);
            uint lst = upper.peek_kern(tbl + 20);

            uint init_start = upper.peek_kern(lst + 0 + 0x00);
            uint init_len   = upper.peek_kern(lst + 4 + 0x00);
            uint code_start = upper.peek_kern(lst + 0 + 0x10);
            uint code_len   = upper.peek_kern(lst + 4 + 0x10);
            uint data_start = upper.peek_kern(lst + 0 + 0x20);
            uint data_len   = upper.peek_kern(lst + 4 + 0x20);

            ValidAreas[0] = new AddressRange(AddressType.Ex, init_start, init_start + init_len);
            ValidAreas[1] = new AddressRange(AddressType.Ex, code_start, code_start + code_len);
            ValidAreas[2] = new AddressRange(AddressType.Rw, data_start, data_start + data_len);
        }
コード例 #27
0
        private void button1_Click(object sender, EventArgs e)
        {
            Gecko = new TCPGecko(IPBox.Text, 7331);
            try
            {
                Gecko.Connect();
            }
            catch (ETCPGeckoException exc)
            {
                MessageBox.Show("Connection to the TCPGecko failed: \n\n" + exc.Message + "\n\nCheck your network connection/firewall.", "Connection failed", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                return;
            }

            Gecko.poke(0x10014cfc, 0x00000001);
            System.Threading.Thread.Sleep(1000);
            if (Gecko.peek(0x10014D00) == 0x00000000)
            {
                /*
                 * MessageBox.Show("register: " + String.Format("{0:x2}", Gecko.peek(0x10014D00)), "info", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                 * MessageBox.Show("✘", "fail", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                 */
                hasExtendedHandlerInstalled = false;
            }
            else
            {
                /*
                 * MessageBox.Show("register: " + String.Format("{0:x2}", Gecko.peek(0x10014D00)), "info", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                 * MessageBox.Show("✓", "good", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                 */
                hasExtendedHandlerInstalled = true;
            }
            Gecko.poke(0x10014cfc, 0x00000000);

            Gecko.poke(0x10613C2C, 0x5F476573);
            Gecko.poke(0x10613C3C, 0x756C6174);
            Gecko.poke(0x10613C4C, 0x68650000);
            Gecko.poke(0x10613C88, 0x63650000);

            groupBox2.Enabled     = true;
            DisconnButton.Enabled = true;
            ConnectButton.Enabled = false;
        }
コード例 #28
0
        public static uint[] DumpSaveSlots(TCPGecko gecko, uint diff, uint start, uint size)
        {
            using (var memoryStream = new MemoryStream())
            {
                // dump all save slots
                gecko.Dump(start + diff, start + diff + size, memoryStream);
                memoryStream.Seek(0, SeekOrigin.Begin);

                // convert to a uint array
                var saveSlots = new uint[size / 4];
                for (var i = 0; i < saveSlots.Length; i++)
                {
                    var buffer = new byte[4];
                    memoryStream.Read(buffer, 0, 4);
                    saveSlots[i] = ByteSwap.Swap(BitConverter.ToUInt32(buffer, 0));
                }

                return(saveSlots);
            }
        }
コード例 #29
0
        private void ProgressBitsForm_Load(object sender, EventArgs e)
        {
            Form1 mainForm = (Form1)this.Owner;

            gecko       = mainForm.Gecko;
            progression = gecko.peek(progressBitsAddress + mainForm.diff);

            tutorialBox.Checked           = (progression & 0x1) != 0;
            splatfestBox.Checked          = (progression & 0x2) != 0;
            rankedNewsBox.Checked         = ((progression & 0x4) != 0);
            lobbyBox.Checked              = (progression & 0x8) != 0;
            heroSuitBox.Checked           = (progression & 0x10) != 0;
            greatZapfishBox.Checked       = (progression & 0x80) != 0;
            cuttlefishPostGameBox.Checked = (progression & 0x100) != 0;
            rankedUnlockedBox.Checked     = (progression & 0x800) != 0;
            rankShownBox.Checked          = (progression & 0x1000) != 0;
            snailsShownBox.Checked        = (progression & 0x10000) != 0;
            levelCapRaisedBox.Checked     = (progression & 0x100000) != 0;
            warningBox.Checked            = (progression & 0x200000) != 0;
        }
コード例 #30
0
ファイル: WeaponsForm.cs プロジェクト: thomas3340/Splat-AIO-2
        public static void PokeWeapons(List <Weapon> weapons, TCPGecko gecko, uint diff)
        {
            uint currentPosition = Form1.weaponsAddress + diff;

            foreach (Weapon weapon in weapons)
            {
                gecko.poke32(currentPosition, weapon.id);
                gecko.poke32(currentPosition + 0x4, weapon.weaponSpecificNumber);
                gecko.poke32(currentPosition + 0x8, (uint)weapon.subWeapon);
                gecko.poke32(currentPosition + 0xc, (uint)weapon.specialWeapon);
                gecko.poke32(currentPosition + 0x10, weapon.turfInked);
                gecko.poke32(currentPosition + 0x18, weapon.lastUsageTimestamp);

                if (weapon.isNew)
                {
                    gecko.poke32(currentPosition + 0x1c, 0x0);
                }
                else
                {
                    gecko.poke32(currentPosition + 0x1c, 0x00010000);
                }

                // move to next slot
                currentPosition += 0x28;
            }

            // fill the rest of the slots with dummy data
            for (int i = weapons.Count; i < 128; i++)
            {
                gecko.poke32(currentPosition, 0xFFFFFFFF);
                gecko.poke32(currentPosition + 0x4, 0xFFFFFFFF);
                gecko.poke32(currentPosition + 0x8, 0xFFFFFFFF);
                gecko.poke32(currentPosition + 0xc, 0xFFFFFFFF);
                gecko.poke32(currentPosition + 0x10, 0x0);
                gecko.poke32(currentPosition + 0x18, 0x0);
                gecko.poke32(currentPosition + 0x1c, 0x0);

                // move to next slot
                currentPosition += 0x28;
            }
        }