public static void captureRAM(int address, int Length) { if (!captureInProgress) { VideoEngine.log_Renamed.warn("Ignoring captureRAM, capture hasn't been started"); return; } if (!Memory.isAddressGood(address)) { return; } try { // write ram fragment CaptureHeader header = new CaptureHeader(CaptureHeader.PACKET_TYPE_RAM); header.write(@out); CaptureRAM captureRAM = new CaptureRAM(address, Length); captureRAM.write(@out); } catch (Exception e) { VideoEngine.log_Renamed.error("Failed to capture RAM: " + e.Message); Console.WriteLine(e.ToString()); Console.Write(e.StackTrace); } }
public static void startCapture(string filename, PspGeList list) { //public static void startCapture(int displayBufferAddress, int displayBufferWidth, int displayBufferPsm, // int drawBufferAddress, int drawBufferWidth, int drawBufferPsm, // int depthBufferAddress, int depthBufferWidth) { if (captureInProgress) { VideoEngine.log_Renamed.error("Ignoring startCapture, capture is already in progress"); return; } // Set the VideoEngine log level to TRACE when capturing, // the information in the log file is also interesting logLevel = VideoEngine.log_Renamed.Level; VideoEngine.Instance.LogLevel = Level.TRACE; capturedImages = new HashSet <int>(); try { VideoEngine.log_Renamed.info("Starting capture... (list=" + list.id + ")"); @out = new BufferedOutputStream(new System.IO.FileStream(filename, System.IO.FileMode.Create, System.IO.FileAccess.Write)); CaptureHeader header; /* * // write render target details * header = new CaptureHeader(CaptureHeader.PACKET_TYPE_DISPLAY_DETAILS); * header.write(out); * CaptureDisplayDetails displayDetails = new CaptureDisplayDetails(); * displayDetails.write(out); */ // write command buffer header = new CaptureHeader(CaptureHeader.PACKET_TYPE_LIST); header.write(@out); CaptureList commandList = new CaptureList(list); commandList.write(@out); captureInProgress = true; listExecuted = false; } catch (Exception e) { VideoEngine.log_Renamed.error("Failed to start capture: " + e.Message); Console.WriteLine(e.ToString()); Console.Write(e.StackTrace); Emulator.PauseEmu(); } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public void write(java.io.OutputStream out) throws java.io.IOException public virtual void write(System.IO.Stream @out) { DataOutputStream data = new DataOutputStream(@out); data.writeInt(packetSize); data.writeInt(list.list_addr); data.writeInt(list.StallAddr); data.writeInt(list.cbid); //VideoEngine.Console.WriteLine("CaptureList write " + (5 * 4)); CaptureHeader header = new CaptureHeader(CaptureHeader.PACKET_TYPE_RAM); header.write(@out); listBuffer.write(@out); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public void write(java.io.OutputStream out) throws java.io.IOException public virtual void write(System.IO.Stream @out) { DataOutputStream data = new DataOutputStream(@out); data.writeInt(packetSize); data.writeInt(fbp); data.writeInt(fbw); data.writeInt(zbp); data.writeInt(zbw); data.writeInt(psm); data.writeInt(topaddrFb); data.writeInt(bufferwidthFb); data.writeInt(pixelformatFb); data.writeInt(sync); //VideoEngine.Console.WriteLine("CaptureDisplayDetails write " + (4 + packetSize)); if (captureRenderTargets) { // write draw buffer CaptureHeader header = new CaptureHeader(CaptureHeader.PACKET_TYPE_RAM); header.write(@out); drawBuffer.write(@out); // write depth buffer header = new CaptureHeader(CaptureHeader.PACKET_TYPE_RAM); header.write(@out); depthBuffer.write(@out); // write display buffer header = new CaptureHeader(CaptureHeader.PACKET_TYPE_RAM); header.write(@out); displayBuffer.write(@out); } }
public static void captureFrameBufDetails() { if (!captureInProgress) { VideoEngine.log_Renamed.warn("Ignoring captureRAM, capture hasn't been started"); return; } try { CaptureHeader header = new CaptureHeader(CaptureHeader.PACKET_TYPE_FRAMEBUF_DETAILS); header.write(@out); CaptureFrameBufDetails details = new CaptureFrameBufDetails(); details.write(@out); } catch (Exception e) { VideoEngine.log_Renamed.error("Failed to capture frame buf details: " + e.Message); Console.WriteLine(e.ToString()); Console.Write(e.StackTrace); Emulator.PauseEmu(); } }