![]() |
|
(PlayStation 3) Windows 8.1/Windows phone/tablet Real Time Editing APP an… (Tutorial) - Printable Version +- Sick Gaming (https://sickgaming.net) +-- Forum: Console, Mobile, and PC Gaming (https://sickgaming.net/forum-119.html) +--- Forum: Sony Discussion (https://sickgaming.net/forum-12.html) +--- Thread: (PlayStation 3) Windows 8.1/Windows phone/tablet Real Time Editing APP an… (Tutorial) (/thread-114879.html) |
(PlayStation 3) Windows 8.1/Windows phone/tablet Real Time Editing APP an… (Tutorial) - xSicKxBot - 07-28-2014 Windows 8.1/Windows phone/tablet Real Time Editing APP and Tutorial System: PlayStation 3 Description Windows 8 MetroAPP RTE Tool: Black Ops 2 #Description# -) No need to put "PS3Lib" or "CCAPI" libraries into either directory as it's within the app itself. -) This is a more than Beta that of a release. -) THIS WILL WORK ON YOUR WINDOWS 8.1 Desktop/Laptop! I can confirm it working on my Windows 8.1 laptop AND my Windows 8.1 Desktop, as for windows tablet/phone its unconfirmed *Nudge *Nudge. -) First of its kind, no RTE programs built for MetroApps. -) Programmed in C# + XAML. (Visual Studio 2013) #Description# Real Time Editing Windows App [BO2] Download: RTE [BO2] Windows APP *NOTE* You might have to be on WINDOWS 8.1, i don't think this works on Windows 8. How to install: Right click on Add-AppDevPackage Run with Powershell It will ask a few questions, choose Y (if asked) to accept the certification, and hit enter when asked. You may be ask to complete install as administrator, do so to install. After installation, navigate to your apps area and search for "RTE". Or WinKey + S "RTE". Screenshot by Lightshot Screenshot by Lightshot APP Preview: Screenshot by Lightshot Screenshot by Lightshot Screenshot by Lightshot Screenshot by Lightshot Screenshot by Lightshot http://prntscr.com/3x9g1j ------APP Development TUTORIAL------ Part 1 (Setting up): 1) You MUST have windows 8.1 to program applications for Windows 8/Windows Tablet/Windows Phone APPs. Also you will need to get a developers license, don't worry it free and pretty straightforward how to get one. If not... In Visual Studio Navigate to: Project>Store>Acquire Developers license... 2) You need Microsoft Visual Studio (2013). 3) You need these files in your project: BO2.cs TMAPI.cs CCAPI.cs PS3API.cs SelectAPI.cs EndianType.cs Extension.cs Lang.cs Download Here: http://www.mediafire.com/download/3fo71spfgi2e15f/PS3Lib+for+AppDev.zip 4) Open Visual Studio: Create new project: Choose C# Blank App XAML: 5)Right click on your App project in the solution explorer and click 'Add', and 'existing item'. 6) Add the files i provided to your project. (the classes for PS3Lib(.cs files)) *Note* In the developing of the app, it will only be able to connect to your PS3 Console through CCAPI [ONLY]. The libraries i have provided have removed all calls for TMAPI( TMAPI.cs and tmapi_net.dll). 7) Just like the last step, just this time add CCAPI.dll to your project (or drag n drop the file if you prefer). *?* Explanation: What this does is allows the APP use the PS3Lib files i provided to P-Invoke the CCAPI.dll. Without CCAPI.dll it will say CCAPI.dll is not found. *NOTE* Make sure that the build action on CCAPI.dll is "Content". 7a) This is optional, but recommended. If you would like you could make a folder and name it to PS3Lib to tidy your class files up as well as the CCAPI.dll. Part 2 (Developing your application) 1) One of the first things you should notice is your XAML Source View. This is how you will be designing the Graphical User Interface of your Application. It won't be too hard if your wanting to make something basic. 2) Just like C#/VB/.net applications, theirs a toolbar for you to add controls to your APP. Add a button to your APP. 3) Click on the button. You will see the properties for it popup on the rightside of Visual Studio. Navigate to "Common" tab and change the 'Content' to "Connect and attach". Also, change the button name to ConnectButton, this is so XAML has a name for this control. (If it doesn't show up, right click in solution explorer and click "Properties") 3.1) Add a toggleswitch and name it "VSATtoggle". Also change the header to "VSAT". 3.2) Add a textbox and name it "ipaddresstextbox", and put the Content as your PS3IP or blank. *Note: you can change the tooltip and placeholder text. 4) Double click on your Connect & Attach button (or right click>"View Code"). C#! Look familiar. 5) Time to code! *Put this as all your imports for the current C# classview* Code: using System; using System.Text; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices.WindowsRuntime; using Windows.Foundation; using Windows.Foundation.Collections; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Controls.Primitives; using Windows.UI.Xaml.Data; using Windows.UI.Xaml.Input; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Navigation; using Windows.UI.Popups; using System.Runtime.InteropServices; using Windows.System; Put the following code inside your button: Code: try { var dialog1 = new MessageDialog("Connect IP: " + ipaddresstextbox.Text + "?" + Environment.NewLine + "CEX ONLY!", "Connect to PS3"); dialog1.Commands.Add(new UICommand("CEX", new UICommandInvokedHandler(CommandHandler))); dialog1.Commands.Add(new UICommand("DEX", new UICommandInvokedHandler(CommandHandler))); dialog1.Commands.Add(new UICommand("Cancel", new UICommandInvokedHandler(CommandHandler))); dialog1.DefaultCommandIndex = 3; dialog1.CancelCommandIndex = 1; attachbutton.IsEnabled = true; await dialog1.ShowAsync(); } catch { var Mesg = new MessageDialog("Failure Connecting!", "Error!"); await Mesg.ShowAsync(); } You should get an error "The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.", add 'async' to your button like so: Code: private async void Button_Click(object sender, RoutedEventArgs e)//...ETC //(Inbetween 'private' & 'void' of your button, put "async"). 6) Add these constructors somewhere in your code (Within the form boundaries). Code: public PS3Lib.CCAPI CEX = new PS3Lib.CCAPI(); public PS3Lib.Extension EXT = new PS3Lib.Extension(); public PS3Lib.PS3API ps3api = new PS3Lib.PS3API(PS3Lib.SelectAPI.ControlConsole); private void CommandHandler(IUICommand command)//added async { var commandLabel = command.Label; switch (commandLabel) { case "CEX": if (Convert.ToBoolean(CEX.ConnectTarget(ipaddresstextbox.Text))) { CEX.RingBuzzer(PS3Lib.CCAPI.BuzzerMode.Single); CEX.Notify(PS3Lib.CCAPI.NotifyIcon.FRIEND, "Connected!"); MessageDialog CEXConnect = new MessageDialog("SUCCESS!", "Connected to CEX!"); // await CEXConnect.ShowAsync(); <- This doesn't work. Try to find a way around this. } else { MessageDialog CEXConnect = new MessageDialog("Error!", "Failure Connecting to CEX!"); // await CEXConnect.ShowAsync(); <- This doesn't work. Try to find a way around this. } break; case "DEX": //Nothing break; case "Cancel": //Nothing break; } } 7) Add "async" to your switch just like the button & add this code to your switch: async: Code: private async void ToggleSwitch_Toggled(object sender, RoutedEventArgs e) Code: ToggleSwitch toggleswitch = sender as ToggleSwitch; if (toggleswitch.IsOn == true) { MessageDialog MyMessage = new MessageDialog("Activated", "VSAT"); //MessageDialog MyMessage = new MessageDialog(Description text, TITLE TEXT); byte[] buffer = new byte[4]; buffer[0] = 0x60; xmain.CEX.SetMemory(0x33c60, buffer); await MyMessage.ShowAsync(); } else { MessageDialog MyMessage = new MessageDialog("Deactivated", "VSAT"); xmain.CEX.SetMemory(0x33c60, new byte[] { 0x40, 0x81, 0, 0x44 }); await MyMessage.ShowAsync(); } 8) Run your APP *and look keep an eye on the debugger for any errors!* 9) Put your PS3 Ipaddress in, Click connect and attach. *You should hear your PS3 beep, and show a notification 9.1) Click on the switch, and see if it turned VSAT on! 10) That's it! #) When developing your program for RELEASE*, Navigate to: Project>Store>Create App Packages. Afterwords, run the certificate checks (You should get failed on CCAPI.dll because its native C++) Tutorial made by: BaSs_HaXoR Removal of TMAPI and PS3Lib source tweaks: BaSs_HaXoR My App [OPEN SOURCE] Download: http://www.mediafire.com/download/j4o236upesytpio/WINAPP+RTE+[BO2]+SOURCE.zip Credits: Whoever made the BO2.cs classlibrary... let me know and i will add your name here. IMCSx for PS3Lib Enstone for CCAPI.dll |