Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ Table authors add a `DofTriggerComponent` (*DOF Triggers*) to send DOF's numbere

libdof is used as upstream has it, except for what `native/patches/0001-vpe-libdof.patch` changes:

- **Output gate.** A process-wide gate that turns all outputs off while the game is paused or stopping, whatever effects are running. For each change it reports which controllers have sent it, which failed, and whether a later change replaced it before every controller had it. A stop or a fault latches it closed from any thread, without allocating: every controller's updater sends the closing without DOF's main thread (an idle updater checks the gate every 50 ms, its polling interval, which bounds how long it takes to notice; a PacLed64 or PacUIO drops the rest of an opening's update), and an opening still queued for that thread, or any later one, applies as a closing.
- **Output gate.** A process-wide gate that turns all outputs off while the game is paused or stopping, whatever effects are running. For each change it reports which controllers have sent it, which failed, and whether a later change replaced it before every controller had it. A stop or a fault latches it closed from any thread, without allocating: every controller's updater sends the closing without DOF's main thread (an idle updater checks the gate every 50 ms, its polling interval, which bounds how long it takes to notice; a PacLed64 or PacUIO drops the rest of an opening's update, a UMX one the rest of the frame it is sending). An opening still queued for that thread never goes out and reports as superseded, any later change applies as a closing, and when latches race the first one to start counts. A controller whose updater ended on its own reports failed, even for a change it had sent.
- **File confinement.** libdof reads only files inside the configuration folder it was given, and never writes or deletes files. Its log goes to the host instead of a file.
- **Sessions.** `Setup` fails instead of falling back to defaults when the global config cannot be loaded, and instead of auto-configuring when the configured cabinet config is missing or invalid (without a configured cabinet, auto-configuration works as before). It clears what the previous session left in libdof's singletons, and the Art-Net socket reopens for the next session. `Finish` undoes only what `Init` started, applies changes still queued, finishes every controller even when one fails, and fails when a controller could not turn its outputs off.
- **Controllers.** A controller reports a change as sent only after a complete transfer; failed transfers are reported and retried. PinOne owns its serial port inside the process instead of sharing it through a named pipe or socket. Auto-configuration never opens a serial port: the host leases only the ports the configuration names, so a serial PinOne is used where the cabinet configuration names its port, and the auto-configurator neither probes the legacy PinOne port nor scans the others (on Linux it does not even list them, since listing opens some ports). HID PinOne boards are still found. A few shutdown, locking and buffer-size bugs are fixed.
- **Parity with C# DOF.** Fixes for differences the parity harness found. They are listed in the parity [README](Tools~/parity/README.md#differences-found).
- **Sessions.** `Setup` fails instead of falling back to defaults when the global config cannot be loaded, and instead of auto-configuring when the configured cabinet config is missing or invalid (without a configured cabinet, auto-configuration works as before). An output controller it cannot read is skipped, as toys are, so the others still start. Controllers that outlive a session (LedWiz, PacDrive, PacLed64, PacUIO) start the next one from all off and unused. `Finish` applies changes still queued, and fails when a controller could not turn its outputs off, neither with its final update nor with its disconnect blackout.
- **Controllers.** A controller reports a change as sent only after a complete transfer; failed transfers are reported and retried. PinOne owns its serial port inside the process instead of sharing it through a named pipe or socket. Auto-configuration never opens a serial port: the host leases only the ports the configuration names, so a serial PinOne is used where the cabinet configuration names its port, and the auto-configurator neither probes the legacy PinOne port nor scans the others (on Linux it does not even list them, since listing opens some ports). HID PinOne boards are still found. A Dude's Cab board is opened again after a failed write until that works, and one without a serial number stops instead; a UMX device whose configuration cannot be read is skipped, so the other controllers are still set up.
- **Parity with C# DOF.** The differences the parity harness found are fixed in libdof itself. They are listed in the parity [README](Tools~/parity/README.md#differences-found).

## License

Expand Down
2 changes: 1 addition & 1 deletion THIRD-PARTY-NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The complete corresponding source of every release is attached to the release as

| Component | Version | Licence | Licence text |
| --- | --- | --- | --- |
| [libdof](https://github.com/vpinball/libdof), C++ port of the [DirectOutput Framework](https://github.com/DirectOutput/DirectOutput), with VPE's patches (`native/patches`) | 0.5.4 (d92f8fc) | GPL-3.0-or-later | `third-party/libdof/LICENSE` |
| [libdof](https://github.com/vpinball/libdof), C++ port of the [DirectOutput Framework](https://github.com/DirectOutput/DirectOutput), with VPE's patches (`native/patches`) | 0.5.4 (49b6947) | GPL-3.0-or-later | `third-party/libdof/LICENSE` |
| [hidapi](https://github.com/libusb/hidapi) | 0.15.0 (d6b2a97) | BSD-3-Clause (one of its three licence options, chosen here) | `third-party/hidapi/LICENSE-bsd.txt`, below |
| [libusb](https://github.com/libusb/libusb) | 1.0.29 (15a7ebb) | LGPL-2.1-or-later | `third-party/libusb/COPYING` |
| [libserialport](https://github.com/sigrokproject/libserialport) | 21b3dfe | LGPL-3.0-or-later | `third-party/libserialport/COPYING` |
Expand Down
2 changes: 1 addition & 1 deletion Tools~/parity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ The engines run in different processes with their own timers, so a sample in the

## Differences found

Against libdof d92f8fc (0.5.4). Each one was fixed in the patch unless noted.
Against libdof d92f8fc (0.5.4). Each one is fixed in libdof since 5e90261 unless noted.

| Difference | Effect | Scenario |
| --- | --- | --- |
Expand Down
15 changes: 4 additions & 11 deletions VisualPinball.Engine.DOF.Test/DofImporterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public void RelocatesAWindowsAuthoredConfiguration()
var global = XDocument.Load(revision.GlobalConfigFile).Root;
Assert.That(global.Element("IniFilesPath").Value, Is.EqualTo(revision.ConfigDir));
Assert.That(global.Element("CabinetConfigFilePattern").Value, Is.EqualTo(Path.Combine(revision.ConfigDir, "cabinet.xml")));
Assert.That(global.Element("TableConfigFilePatterns").Element("FilePattern").Value, Is.EqualTo(Path.Combine(revision.TablesDir, "{TableName}.xml")));
Assert.That(global.Element("TableConfigFilePatterns").Elements(), Is.Empty, "no table config is loaded");
Assert.That(global.Element("LogFilePattern").Value, Is.Empty);
Assert.That(global.Element("ClearLogOnSessionStart").Value, Is.EqualTo("false"));
Assert.That(global.Element("LedWizDefaultMinCommandIntervalMs").Value, Is.EqualTo("1"), "other settings are kept");
Expand Down Expand Up @@ -426,16 +426,10 @@ public void RollbackAndLeasesKeepRevisionsAlive()
}

[Test]
public void TableFileSelectsTheBoundTableConfig()
public void TableConfigsAreKeptAsAnInventory()
{
Accepted(_importer.Import(Folder("tables", ("directoutputconfig.ini", MainIni), ("afm.xml", TableXml))));
var revision = _store.Active;
Assert.That(revision.TableConfigs, Is.EqualTo(new[] { "afm" }));
Assert.That(Path.GetFileName(revision.TableFileFor("afm", "Attack From Mars")), Is.EqualTo("afm.vpx"));
// Unbound: no table file at all, so libdof looks up no table config, whatever the platform's name comparison.
Assert.That(revision.TableFileFor(null, "afm"), Is.Null);
Assert.That(revision.TableFileFor(null, "AFM"), Is.Null);
Assert.Throws<ArgumentException>(() => revision.TableFileFor("missing", "x"));
Accepted(_importer.Import(Folder("tables", ("directoutputconfig.ini", MainIni), ("table.xml", TableXml))));
Assert.That(_store.Active.TableConfigs, Is.EqualTo(new[] { "table" }));
}

[Test]
Expand Down Expand Up @@ -621,7 +615,6 @@ public void GlobalConfigUsesPathsLibdofCanOpen()
foreach (var element in new[] { "IniFilesPath", "CabinetConfigFilePattern" }) {
Assert.That(DofPaths.IsAscii(global.Element(element).Value), Is.True, global.Element(element).Value);
}
Assert.That(DofPaths.IsAscii(global.Element("TableConfigFilePatterns").Element("FilePattern").Value), Is.True);
}
}
}
Loading
Loading