parent
275d363aaf
commit
9cdede4e5b
7 changed files with 9 additions and 147 deletions
|
@ -341,9 +341,7 @@ void main(void) {
|
||||||
protected override void OnRenderFrame(FrameEventArgs e)
|
protected override void OnRenderFrame(FrameEventArgs e)
|
||||||
{
|
{
|
||||||
GL.Viewport(0, 0, 1280, 720);
|
GL.Viewport(0, 0, 1280, 720);
|
||||||
|
|
||||||
Title = $"Ryujinx Screen - (Vsync: {VSync} - FPS: {1f / e.Time:0})";
|
|
||||||
|
|
||||||
GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
|
GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
|
||||||
|
|
||||||
RenderFb();
|
RenderFb();
|
||||||
|
|
13
Program.cs
13
Program.cs
|
@ -9,8 +9,6 @@ namespace Ryujinx
|
||||||
{
|
{
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
Console.Title = "RyujiNX";
|
|
||||||
|
|
||||||
IGalRenderer Renderer = new OpenGLRenderer();
|
IGalRenderer Renderer = new OpenGLRenderer();
|
||||||
|
|
||||||
Switch Ns = new Switch(Renderer);
|
Switch Ns = new Switch(Renderer);
|
||||||
|
@ -23,30 +21,27 @@ namespace Ryujinx
|
||||||
|
|
||||||
if (RomFsFiles.Length > 0)
|
if (RomFsFiles.Length > 0)
|
||||||
{
|
{
|
||||||
Logging.Info("Loading as cart with RomFS.");
|
Console.WriteLine("Loading as cart with RomFS.");
|
||||||
|
|
||||||
Console.Title += " - Cart (with RomFS) - " + args[0];
|
|
||||||
Ns.Os.LoadCart(args[0], RomFsFiles[0]);
|
Ns.Os.LoadCart(args[0], RomFsFiles[0]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Logging.Info("Loading as cart WITHOUT RomFS.");
|
Console.WriteLine("Loading as cart WITHOUT RomFS.");
|
||||||
|
|
||||||
Console.Title += " - Cart (without RomFS) - " + args[0];
|
|
||||||
Ns.Os.LoadCart(args[0]);
|
Ns.Os.LoadCart(args[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (File.Exists(args[0]))
|
else if (File.Exists(args[0]))
|
||||||
{
|
{
|
||||||
Logging.Info("Loading as homebrew.");
|
Console.WriteLine("Loading as homebrew.");
|
||||||
|
|
||||||
Console.Title += " - Homebrew - " + args[0];
|
|
||||||
Ns.Os.LoadProgram(args[0]);
|
Ns.Os.LoadProgram(args[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Logging.Error("Please specify the folder with the NSOs/IStorage or a NSO/NRO.");
|
Console.WriteLine("Please specify the folder with the NSOs/IStorage or a NSO/NRO.");
|
||||||
}
|
}
|
||||||
|
|
||||||
using (GLScreen Screen = new GLScreen(Ns, Renderer))
|
using (GLScreen Screen = new GLScreen(Ns, Renderer))
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
using ChocolArm64.Exceptions;
|
using ChocolArm64.Exceptions;
|
||||||
using Ryujinx;
|
using System;
|
||||||
|
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
namespace ChocolArm64.Memory
|
namespace ChocolArm64.Memory
|
||||||
|
@ -262,7 +261,7 @@ namespace ChocolArm64.Memory
|
||||||
{
|
{
|
||||||
if (Position < 0x08000000)
|
if (Position < 0x08000000)
|
||||||
{
|
{
|
||||||
Logging.Warn($"HACK: Ignoring bad access at {Position:x16}");
|
Console.WriteLine($"HACK: Ignoring bad access at {Position:x16}");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,128 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.IO;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Ryujinx
|
|
||||||
{
|
|
||||||
public static class Logging
|
|
||||||
{
|
|
||||||
private static Stopwatch ExecutionTime = new Stopwatch();
|
|
||||||
private static string LogFileName = "Ryujinx.log";
|
|
||||||
|
|
||||||
public static bool EnableInfo = true;
|
|
||||||
public static bool EnableTrace = true;
|
|
||||||
public static bool EnableDebug = true;
|
|
||||||
public static bool EnableWarn = true;
|
|
||||||
public static bool EnableError = true;
|
|
||||||
public static bool EnableFatal = true;
|
|
||||||
public static bool EnableLogFile = false;
|
|
||||||
|
|
||||||
static Logging()
|
|
||||||
{
|
|
||||||
ExecutionTime.Start();
|
|
||||||
|
|
||||||
if (File.Exists(LogFileName)) File.Delete(LogFileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetExecutionTime()
|
|
||||||
{
|
|
||||||
return ExecutionTime.ElapsedMilliseconds.ToString().PadLeft(8, '0') + "ms";
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void LogFile(string Message)
|
|
||||||
{
|
|
||||||
if (EnableLogFile)
|
|
||||||
{
|
|
||||||
using (StreamWriter Writer = File.AppendText(LogFileName))
|
|
||||||
{
|
|
||||||
Writer.WriteLine(Message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Info(string Message)
|
|
||||||
{
|
|
||||||
if (EnableInfo)
|
|
||||||
{
|
|
||||||
string Text = $"{GetExecutionTime()} | INFO > {Message}";
|
|
||||||
|
|
||||||
Console.ForegroundColor = ConsoleColor.White;
|
|
||||||
Console.WriteLine(Text.PadLeft(Text.Length + 1, ' '));
|
|
||||||
Console.ResetColor();
|
|
||||||
|
|
||||||
LogFile(Text);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Trace(string Message)
|
|
||||||
{
|
|
||||||
if (EnableTrace)
|
|
||||||
{
|
|
||||||
string Text = $"{GetExecutionTime()} | TRACE > {Message}";
|
|
||||||
|
|
||||||
Console.ForegroundColor = ConsoleColor.DarkGray;
|
|
||||||
Console.WriteLine(Text.PadLeft(Text.Length + 1, ' '));
|
|
||||||
Console.ResetColor();
|
|
||||||
|
|
||||||
LogFile(Text);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Debug(string Message)
|
|
||||||
{
|
|
||||||
if (EnableDebug)
|
|
||||||
{
|
|
||||||
string Text = $"{GetExecutionTime()} | DEBUG > {Message}";
|
|
||||||
|
|
||||||
Console.ForegroundColor = ConsoleColor.Gray;
|
|
||||||
Console.WriteLine(Text.PadLeft(Text.Length + 1, ' '));
|
|
||||||
Console.ResetColor();
|
|
||||||
|
|
||||||
LogFile(Text);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Warn(string Message)
|
|
||||||
{
|
|
||||||
if (EnableWarn)
|
|
||||||
{
|
|
||||||
string Text = $"{GetExecutionTime()} | WARN > {Message}";
|
|
||||||
|
|
||||||
Console.ForegroundColor = ConsoleColor.Yellow;
|
|
||||||
Console.WriteLine(Text.PadLeft(Text.Length + 1, ' '));
|
|
||||||
Console.ResetColor();
|
|
||||||
|
|
||||||
LogFile(Text);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Error(string Message)
|
|
||||||
{
|
|
||||||
if (EnableError)
|
|
||||||
{
|
|
||||||
string Text = $"{GetExecutionTime()} | ERROR > {Message}";
|
|
||||||
|
|
||||||
Console.ForegroundColor = ConsoleColor.Red;
|
|
||||||
Console.WriteLine(Text.PadLeft(Text.Length + 1, ' '));
|
|
||||||
Console.ResetColor();
|
|
||||||
|
|
||||||
LogFile(Text);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Fatal(string Message)
|
|
||||||
{
|
|
||||||
if (EnableFatal)
|
|
||||||
{
|
|
||||||
string Text = $"{GetExecutionTime()} | FATAL > {Message}";
|
|
||||||
|
|
||||||
Console.ForegroundColor = ConsoleColor.Magenta;
|
|
||||||
Console.WriteLine(Text.PadLeft(Text.Length + 1, ' '));
|
|
||||||
Console.ResetColor();
|
|
||||||
|
|
||||||
LogFile(Text);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -262,8 +262,6 @@ namespace Ryujinx.OsHle.Ipc
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Logging.Debug($"IpcMessage: {DbgServiceName}");
|
|
||||||
|
|
||||||
if (ProcReq != null)
|
if (ProcReq != null)
|
||||||
{
|
{
|
||||||
using (MemoryStream ResMS = new MemoryStream())
|
using (MemoryStream ResMS = new MemoryStream())
|
||||||
|
|
|
@ -563,7 +563,7 @@ namespace Ryujinx.OsHle.Services
|
||||||
NvMap.Kind = Kind;
|
NvMap.Kind = Kind;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logging.Info($"NvMapIocAlloc at {NvMap.Address:x16}");
|
Console.WriteLine($"NvMapIocAlloc at {NvMap.Address:x16}");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,7 +121,7 @@ namespace Ryujinx.OsHle.Svc
|
||||||
|
|
||||||
string Str = AMemoryHelper.ReadAsciiString(Memory, Position, (int)Size);
|
string Str = AMemoryHelper.ReadAsciiString(Memory, Position, (int)Size);
|
||||||
|
|
||||||
Logging.Info($"SvcOutputDebugString: {Str}");
|
Console.WriteLine($"SvcOutputDebugString: {Str}");
|
||||||
|
|
||||||
Registers.X0 = (int)SvcResult.Success;
|
Registers.X0 = (int)SvcResult.Success;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue