using BizHawk.Common;
namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
{
///
/// Represents a spectrum keyboard
///
public interface IKeyboard
{
///
/// The calling spectrumbase class
///
SpectrumBase _machine { get; }
///
/// The keyboard matrix for a particular spectrum model
///
string[] KeyboardMatrix { get; set; }
///
/// Other keyboard keys that are not in the matrix
/// (usually keys derived from key combos)
///
string[] NonMatrixKeys { get; set; }
///
/// Represents the spectrum key state
///
int[] KeyLine { get; set; }
///
/// Resets the line status
///
void ResetLineStatus();
///
/// There are some slight differences in how PortIN and PortOUT functions
/// between Issue2 and Issue3 keyboards (16k/48k spectrum only)
/// It is possible that some very old games require Issue2 emulation
///
bool IsIssue2Keyboard { get; set; }
///
/// Sets the spectrum key status
///
///
///
void SetKeyStatus(string key, bool isPressed);
///
/// Gets the status of a spectrum key
///
///
///
bool GetKeyStatus(string key);
///
/// Returns the query byte
///
///
///
byte GetLineStatus(byte lines);
///
/// Reads a keyboard byte
///
///
///
byte ReadKeyboardByte(ushort addr);
///
/// Looks up a key in the keyboard matrix and returns the relevent byte value
///
///
///
byte GetByteFromKeyMatrix(string key);
void SyncState(Serializer ser);
}
}