mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-09-27 18:38:13 +02:00
second attempt at single layer address tables (first attempt https://git.ryujinx.app/projects/Ryubing/pulls/167). should work with all games now. Co-authored-by: LotP1 <68976644+LotP1@users.noreply.github.com>
46 lines
1.1 KiB
C#
46 lines
1.1 KiB
C#
namespace ARMeilleure.Common
|
|
{
|
|
public static class AddressTablePresets
|
|
{
|
|
private static readonly AddressTableLevel[] _levels64Bit =
|
|
[
|
|
new(31, 17),
|
|
new(23, 8),
|
|
new(15, 8),
|
|
new( 7, 8),
|
|
new( 2, 5)
|
|
];
|
|
|
|
private static readonly AddressTableLevel[] _levels32Bit =
|
|
[
|
|
new(31, 17),
|
|
new(23, 8),
|
|
new(15, 8),
|
|
new( 7, 8),
|
|
new( 1, 6)
|
|
];
|
|
|
|
private static readonly AddressTableLevel[] _levels64BitMono =
|
|
[
|
|
new( 2, 37)
|
|
];
|
|
|
|
private static readonly AddressTableLevel[] _levels32BitMono =
|
|
[
|
|
new( 1, 31)
|
|
];
|
|
|
|
public static AddressTableLevel[] GetArmPreset(bool for64Bits, bool mono)
|
|
{
|
|
if (mono)
|
|
{
|
|
return for64Bits ? _levels64BitMono : _levels32BitMono;
|
|
}
|
|
else
|
|
{
|
|
return for64Bits ? _levels64Bit : _levels32Bit;
|
|
}
|
|
}
|
|
}
|
|
}
|