HLE: Fix Mii crc generation and minor issues (#5766)
* HLE: Fix Mii crc generation Validating CRCs for data and device involves calculating the crc of all data including the crc being checked, which should then be 0. The crc should be _generated_ on all data _before_ the crc in the struct. It shouldn't include the crcs themselves. This fixes all generated miis (eg. default) having invalid crcs. This does not affect mii maker, as that generates its own charinfo. Does not fix MK8D crash. * Fix other mii issues * Fully define all fields for Nickname and Ver3StoreData Fixes an issue where the nickname for a mii would only have the first character on some method calls. * Add Array96 type
This commit is contained in:
parent
b6ac45d36d
commit
086564c3c8
6 changed files with 33 additions and 12 deletions
|
@ -756,6 +756,18 @@ namespace Ryujinx.Common.Memory
|
|||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||
}
|
||||
|
||||
public struct Array96<T> : IArray<T> where T : unmanaged
|
||||
{
|
||||
T _e0;
|
||||
Array64<T> _other;
|
||||
Array31<T> _other2;
|
||||
public readonly int Length => 96;
|
||||
public ref T this[int index] => ref AsSpan()[index];
|
||||
|
||||
[Pure]
|
||||
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
||||
}
|
||||
|
||||
public struct Array127<T> : IArray<T> where T : unmanaged
|
||||
{
|
||||
T _e0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue