The Sparse Jit Function Table sizes now depend on the LowPowerPTC setting. This means lower power devices won't be impacted as hard by the higher ram speed requirement of GiantBlock. Also added functionality to the PPTC Initializer so it now supports different PPTC Profiles simultaneously, which makes switching between TinyBlock/LowPower and GiantBlock/HighPower seamless. This also opens the door for the potential of PPTC cache with exefs mods enabled in the future. Default (aka HighPower) currently has an Avalonia bug that causes a crash when starting a game, it can be bypassed be clicking the window multiple times durring loading until the window unfreezes.
73 lines
2.0 KiB
C#
73 lines
2.0 KiB
C#
namespace ARMeilleure.Common
|
|
{
|
|
public static class AddressTablePresets
|
|
{
|
|
private static readonly AddressTableLevel[] _levels64Bit =
|
|
new AddressTableLevel[]
|
|
{
|
|
new(31, 17),
|
|
new(23, 8),
|
|
new(15, 8),
|
|
new( 7, 8),
|
|
new( 2, 5),
|
|
};
|
|
|
|
private static readonly AddressTableLevel[] _levels32Bit =
|
|
new AddressTableLevel[]
|
|
{
|
|
new(31, 17),
|
|
new(23, 8),
|
|
new(15, 8),
|
|
new( 7, 8),
|
|
new( 1, 6),
|
|
};
|
|
|
|
private static readonly AddressTableLevel[] _levels64BitSparseTiny =
|
|
new AddressTableLevel[]
|
|
{
|
|
new( 11, 28),
|
|
new( 2, 9),
|
|
};
|
|
|
|
private static readonly AddressTableLevel[] _levels32BitSparseTiny =
|
|
new AddressTableLevel[]
|
|
{
|
|
new( 10, 22),
|
|
new( 1, 9),
|
|
};
|
|
|
|
private static readonly AddressTableLevel[] _levels64BitSparseGiant =
|
|
new AddressTableLevel[]
|
|
{
|
|
new( 38, 1),
|
|
new( 2, 36),
|
|
};
|
|
|
|
private static readonly AddressTableLevel[] _levels32BitSparseGiant =
|
|
new AddressTableLevel[]
|
|
{
|
|
new( 31, 1),
|
|
new( 1, 30),
|
|
};
|
|
|
|
public static AddressTableLevel[] GetArmPreset(bool for64Bits, bool sparse, bool lowPower = false)
|
|
{
|
|
if (sparse)
|
|
{
|
|
if (lowPower)
|
|
{
|
|
return for64Bits ? _levels64BitSparseTiny : _levels32BitSparseTiny;
|
|
}
|
|
else
|
|
{
|
|
return for64Bits ? _levels64BitSparseGiant : _levels32BitSparseGiant;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
return for64Bits ? _levels64Bit : _levels32Bit;
|
|
}
|
|
}
|
|
}
|
|
}
|