mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-14 07:46:39 +00:00
da4e0856c9
* controller image changes depending on the selected controller type the new controller image assets are temporary until i get new ones * Game list scans subdirs for games * Key file existence check * Only shows Program NCAs in Application list * Change shown GUI columns without restarting * Sort by column if you click on the column header Columns are sorted as text so there are inaccuracies on some columns * Fix sort on Time Played, Last Played and File Size columns * Add ability to designate favourite games #1 TODO: - Make fav games persistent - Fix invisible check marks due to theme * Add ability to designate favourite games #2 Also removed default theme * Added a Windows specific build condition and a Linux bug fix * bugfix * Load metadata from JSONs * Temp bug fix for MacOS * lil clean up * requested changes * Misc fixes * edited schema and config * Show the TitleID of games on the title bar * gui column config option have names * Async loading of game list * bugfix and cleanup * thog's requested changes * requested changes and cleanup still need to fix the gtk seizure * Fix issue where an ExeFS as a NSP didn't show up in the application list * Minor fixes * catch glib unhandled exceptions * Make sure to do UI manipulation in the main thread * Print path of invalid files * Ac_k's requested changes * Return of the dark theme * move AboutInfo struct to another file * sort usings * changes - gdkchan's requested changes that have been marked resolved - made some structs internal as they aren't used outside of the GUI - renamed Ryujinx.UI to Ryujinx.Ui to fit naming convention and folder structure - fixed bug where controller type dropdown box is stretched
61 lines
2.3 KiB
C#
61 lines
2.3 KiB
C#
using Ryujinx.HLE.Exceptions;
|
|
using System.IO;
|
|
|
|
namespace Ryujinx.HLE.Loaders.Npdm
|
|
{
|
|
public class Acid
|
|
{
|
|
private const int AcidMagic = 'A' << 0 | 'C' << 8 | 'I' << 16 | 'D' << 24;
|
|
|
|
public byte[] Rsa2048Signature { get; private set; }
|
|
public byte[] Rsa2048Modulus { get; private set; }
|
|
public int Unknown1 { get; private set; }
|
|
public int Flags { get; private set; }
|
|
|
|
public long TitleIdRangeMin { get; private set; }
|
|
public long TitleIdRangeMax { get; private set; }
|
|
|
|
public FsAccessControl FsAccessControl { get; private set; }
|
|
public ServiceAccessControl ServiceAccessControl { get; private set; }
|
|
public KernelAccessControl KernelAccessControl { get; private set; }
|
|
|
|
public Acid(Stream stream, int offset)
|
|
{
|
|
stream.Seek(offset, SeekOrigin.Begin);
|
|
|
|
BinaryReader reader = new BinaryReader(stream);
|
|
|
|
Rsa2048Signature = reader.ReadBytes(0x100);
|
|
Rsa2048Modulus = reader.ReadBytes(0x100);
|
|
|
|
if (reader.ReadInt32() != AcidMagic)
|
|
{
|
|
throw new InvalidNpdmException("ACID Stream doesn't contain ACID section!");
|
|
}
|
|
|
|
// Size field used with the above signature (?).
|
|
Unknown1 = reader.ReadInt32();
|
|
|
|
reader.ReadInt32();
|
|
|
|
// Bit0 must be 1 on retail, on devunit 0 is also allowed. Bit1 is unknown.
|
|
Flags = reader.ReadInt32();
|
|
|
|
TitleIdRangeMin = reader.ReadInt64();
|
|
TitleIdRangeMax = reader.ReadInt64();
|
|
|
|
int fsAccessControlOffset = reader.ReadInt32();
|
|
int fsAccessControlSize = reader.ReadInt32();
|
|
int serviceAccessControlOffset = reader.ReadInt32();
|
|
int serviceAccessControlSize = reader.ReadInt32();
|
|
int kernelAccessControlOffset = reader.ReadInt32();
|
|
int kernelAccessControlSize = reader.ReadInt32();
|
|
|
|
FsAccessControl = new FsAccessControl(stream, offset + fsAccessControlOffset, fsAccessControlSize);
|
|
|
|
ServiceAccessControl = new ServiceAccessControl(stream, offset + serviceAccessControlOffset, serviceAccessControlSize);
|
|
|
|
KernelAccessControl = new KernelAccessControl(stream, offset + kernelAccessControlOffset, kernelAccessControlSize);
|
|
}
|
|
}
|
|
}
|