mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2024-06-02 16:41:33 +00:00
Merge branch 'master' of https://github.com/MoleskiCoder/EightBitNet
This commit is contained in:
commit
08111f8590
|
@ -191,67 +191,83 @@ namespace EightBit.GameBoy
|
||||||
|
|
||||||
public void PressRight()
|
public void PressRight()
|
||||||
{
|
{
|
||||||
this.p14 = this.p10 = false;
|
this.ControlRightLines(false);
|
||||||
this.TriggerKeypadInterrupt();
|
this.TriggerKeypadInterrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ReleaseRight() => this.p14 = this.p10 = true;
|
public void ReleaseRight() => this.ControlRightLines(true);
|
||||||
|
|
||||||
public void PressLeft()
|
public void PressLeft()
|
||||||
{
|
{
|
||||||
this.p14 = this.p11 = false;
|
this.ControlLeftLines(false);
|
||||||
this.TriggerKeypadInterrupt();
|
this.TriggerKeypadInterrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ReleaseLeft() => this.p14 = this.p11 = true;
|
public void ReleaseLeft() => this.ControlLeftLines(true);
|
||||||
|
|
||||||
public void PressUp()
|
public void PressUp()
|
||||||
{
|
{
|
||||||
this.p14 = this.p12 = false;
|
this.ControlUpLines(false);
|
||||||
this.TriggerKeypadInterrupt();
|
this.TriggerKeypadInterrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ReleaseUp() => this.p14 = this.p12 = true;
|
public void ReleaseUp() => this.ControlUpLines(true);
|
||||||
|
|
||||||
public void PressDown()
|
public void PressDown()
|
||||||
{
|
{
|
||||||
this.p14 = this.p13 = false;
|
this.ControlDownLines(false);
|
||||||
this.TriggerKeypadInterrupt();
|
this.TriggerKeypadInterrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ReleaseDown() => this.p14 = this.p13 = true;
|
public void ReleaseDown() => this.ControlDownLines(true);
|
||||||
|
|
||||||
public void PressA()
|
public void PressA()
|
||||||
{
|
{
|
||||||
this.p15 = this.p10 = false;
|
this.ControlALines(false);
|
||||||
this.TriggerKeypadInterrupt();
|
this.TriggerKeypadInterrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ReleaseA() => this.p15 = this.p10 = true;
|
public void ReleaseA() => this.ControlALines(true);
|
||||||
|
|
||||||
public void PressB()
|
public void PressB()
|
||||||
{
|
{
|
||||||
this.p15 = this.p11 = false;
|
this.ControlBLines(false);
|
||||||
this.TriggerKeypadInterrupt();
|
this.TriggerKeypadInterrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ReleaseB() => this.p15 = this.p11 = true;
|
public void ReleaseB() => this.ControlBLines(true);
|
||||||
|
|
||||||
public void PressSelect()
|
public void PressSelect()
|
||||||
{
|
{
|
||||||
this.p15 = this.p12 = false;
|
this.ControlSelectLines(false);
|
||||||
this.TriggerKeypadInterrupt();
|
this.TriggerKeypadInterrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ReleaseSelect() => this.p15 = this.p12 = true;
|
public void ReleaseSelect() => this.ControlSelectLines(true);
|
||||||
|
|
||||||
public void PressStart()
|
public void PressStart()
|
||||||
{
|
{
|
||||||
this.p15 = this.p13 = false;
|
this.ControlStartLines(false);
|
||||||
this.TriggerKeypadInterrupt();
|
this.TriggerKeypadInterrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ReleaseStart() => this.p15 = this.p13 = true;
|
public void ReleaseStart() => this.ControlStartLines(true);
|
||||||
|
|
||||||
|
private void ControlRightLines(bool value) => this.p14 = this.p10 = value;
|
||||||
|
|
||||||
|
private void ControlLeftLines(bool value) => this.p14 = this.p11 = value;
|
||||||
|
|
||||||
|
private void ControlUpLines(bool value) => this.p14 = this.p12 = value;
|
||||||
|
|
||||||
|
private void ControlDownLines(bool value) => this.p14 = this.p13 = value;
|
||||||
|
|
||||||
|
private void ControlALines(bool value) => this.p15 = this.p10 = value;
|
||||||
|
|
||||||
|
private void ControlBLines(bool value) => this.p15 = this.p11 = value;
|
||||||
|
|
||||||
|
private void ControlSelectLines(bool value) => this.p15 = this.p12 = value;
|
||||||
|
|
||||||
|
private void ControlStartLines(bool value) => this.p15 = this.p13 = value;
|
||||||
|
|
||||||
private void OnDisplayStatusModeUpdated(LcdStatusMode mode) => this.DisplayStatusModeUpdated?.Invoke(this, new LcdStatusModeEventArgs(mode));
|
private void OnDisplayStatusModeUpdated(LcdStatusMode mode) => this.DisplayStatusModeUpdated?.Invoke(this, new LcdStatusModeEventArgs(mode));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user