AppleII - State keyboard, fix up csproj

This commit is contained in:
CasualPokePlayer 2022-06-23 22:01:07 -07:00
parent 1c504bfe83
commit 4df256cd6b
4 changed files with 36 additions and 4 deletions

View File

@ -322,6 +322,15 @@ namespace Jellyfish.Virtu
Strobe = false;
}
public void Sync(IComponentSerializer ser)
{
ser.Sync("Latch", ref _latch);
ser.Sync("Strobe", ref _strobe);
ser.Sync("CapsActive", ref _capsActive);
ser.Sync(nameof(_currentCapsLockState), ref _currentCapsLockState);
ser.Sync(nameof(_framesToRepeat), ref _framesToRepeat);
}
/// <summary>
/// true if any of the 56 basic keys are pressed
/// </summary>
@ -330,14 +339,31 @@ namespace Jellyfish.Virtu
/// <summary>
/// the currently latched key; 7 bits.
/// </summary>
public int Latch { get; private set; }
public bool Strobe { get; private set; }
public int Latch
{
get => _latch;
private set => _latch = value;
}
public bool Strobe
{
get => _strobe;
private set => _strobe = value;
}
private int _latch;
private bool _strobe;
/// <summary>
/// true if caps lock is active
/// </summary>
private bool CapsActive { get; set; }
private bool CapsActive
{
get => _capsActive;
set => _capsActive = value;
}
private bool _capsActive;
private bool _currentCapsLockState;
/// <summary>

View File

@ -1,7 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(ProjectDir)../../Common.props" />
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net4.8</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<Nullable>disable</Nullable>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />

Binary file not shown.

View File

@ -56,6 +56,10 @@ namespace BizHawk.Emulation.Cores.Computers.AppleII
_machine.Memory.Sync(ser);
ser.EndSection();
ser.BeginSection("Keyboard");
_machine.Memory.Keyboard.Sync(ser);
ser.EndSection();
ser.BeginSection("NoSlotClock");
_machine.NoSlotClock.Sync(ser);
ser.EndSection();