Skip to content

Commit

Permalink
Merge pull request #465 from ogamespec/main
Browse files Browse the repository at this point in the history
IO Subsystem done
  • Loading branch information
ogamespec authored Sep 6, 2023
2 parents 3a8aacf + c4c971e commit 35ef1c9
Show file tree
Hide file tree
Showing 15 changed files with 391 additions and 22 deletions.
80 changes: 66 additions & 14 deletions Breaknes/Breaknes/Build/IOConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,86 @@
"bindings": [
{
"actuator_id": 0,
"binding": "Dummy binding"
"binding": "PointOfViewControllers0_Up"
},
{
"actuator_id": 4,
"binding": "Dummy binding"
"binding": "Buttons6"
},
{
"actuator_id": 1,
"binding": "PointOfViewControllers0_Down"
},
{
"actuator_id": 2,
"binding": "PointOfViewControllers0_Left"
},
{
"actuator_id": 3,
"binding": "PointOfViewControllers0_Right"
},
{
"actuator_id": 5,
"binding": "Buttons7"
},
{
"actuator_id": 6,
"binding": "Buttons0"
},
{
"actuator_id": 7,
"binding": "Buttons1"
}
]
},
{
"device_id": 3,
"name": "NES P1",
"attached": [],
"bindings": []
},
{
"device_id": 65539,
"name": "V1",
"attached": [
{
"board": "NES-001 (PCB rev. -01 to -04)",
"port": 0
}
],
"bindings": [
{
"actuator_id": 0,
"binding": "Up"
},
{
"actuator_id": 1,
"binding": "Down"
},
{
"actuator_id": 2,
"binding": "Left"
},
{
"actuator_id": 3,
"binding": "Right"
},
{
"actuator_id": 4,
"binding": "A"
},
{
"actuator_id": 5,
"binding": "S"
},
{
"actuator_id": 6,
"binding": "Z"
},
{
"actuator_id": 7,
"binding": "X"
}
]
},
{
"device_id": 65539,
"name": "V1",
"attached": [],
"bindings": [
{
"actuator_id": 0,
Expand Down Expand Up @@ -76,12 +133,7 @@
{
"device_id": 65537,
"name": "Fami1",
"attached": [
{
"board": "HVC-CPU-01",
"port": 0
}
],
"attached": [],
"bindings": [
{
"actuator_id": 0,
Expand Down
2 changes: 2 additions & 0 deletions Breaknes/Breaknes/FormBindingDendyController.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Breaknes/Breaknes/FormBindingDendyController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,5 +153,10 @@ private void ShowBindings(int actuator_id)
}
}
}

private void FormBindingDendyController_KeyDown(object sender, KeyEventArgs e)
{
Close();
}
}
}
2 changes: 2 additions & 0 deletions Breaknes/Breaknes/FormBindingFamiController1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Breaknes/Breaknes/FormBindingFamiController1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,5 +153,10 @@ private void ShowBindings(int actuator_id)
}
}
}

private void FormBindingFamiController1_KeyDown(object sender, KeyEventArgs e)
{
Close();
}
}
}
2 changes: 2 additions & 0 deletions Breaknes/Breaknes/FormBindingFamiController2.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Breaknes/Breaknes/FormBindingFamiController2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,5 +153,10 @@ private void ShowBindings(int actuator_id)
}
}
}

private void FormBindingFamiController2_KeyDown(object sender, KeyEventArgs e)
{
Close();
}
}
}
2 changes: 2 additions & 0 deletions Breaknes/Breaknes/FormBindingNESController.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Breaknes/Breaknes/FormBindingNESController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,5 +153,10 @@ private void ShowBindings(int actuator_id)
}
}
}

private void FormBindingNESController_KeyDown(object sender, KeyEventArgs e)
{
Close();
}
}
}
8 changes: 8 additions & 0 deletions Breaknes/Breaknes/FormWaitInputEvent.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions Breaknes/Breaknes/FormWaitInputEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,30 @@ private void FormWaitInputEvent_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Escape)
{
backgroundWorker1.CancelAsync();
bindstr = null;
Close();
}
}

private void backgroundWorker1_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
{
while(!backgroundWorker1.CancellationPending)
{
io.PollDevices();

if (io.event_queue.Count != 0)
{
bindstr = io.event_queue[0].name;
io.event_queue.Clear();
Close();
}
}
}

private void FormWaitInputEvent_Load(object sender, EventArgs e)
{
backgroundWorker1.RunWorkerAsync();
}
}
}
3 changes: 3 additions & 0 deletions Breaknes/Breaknes/FormWaitInputEvent.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="backgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
Loading

0 comments on commit 35ef1c9

Please sign in to comment.