Add PawnIO module for legacy PC speaker access - #108
Open
GeniusPilot2016 wants to merge 2 commits into
Open
Conversation
Add PcSpeaker.p to provide NeoBleeper with direct access to the legacy PC speaker on modern Windows systems. The module programs the legacy speaker interface to: - Generate tones - Change tone frequency - Start and stop continuous tones - Check whether the PC-speaker-related hardware interface is present and responsive The hardware check covers PIT channel 2 and System Control Port B. It does not claim to detect whether a physical speaker cone is connected or whether its output is audible. This implementation replaces NeoBleeper's previous InpOutx64-based backend because of current and upcoming Windows compatibility issues. Microsoft has confirmed deployment of a block that prevents the inpoutx64 driver from loading on affected Windows 11 devices. Microsoft also states that this block will be included in the September 2026 Windows security updates and subsequent releases. Source: https://learn.microsoft.com/en-us/windows/release-health/resolved-issues-windows-11-25h2#3731msgdesc Existing alternatives were unsuitable for this use case. BEEPx64 has driver-signing compatibility problems on current Windows versions, and HalMakeBeep did not reliably produce physical PC-speaker output during prior testing. PawnIO provides a maintained mechanism for performing the required hardware I/O without depending on InpOutx64. The module compiled successfully and was tested with PawnIO 2.0.1 on: - A desktop with a Gigabyte B450M H motherboard and a physical system speaker - A Huawei MateBook D16 laptop Tone generation, frequency changes, and start/stop operations worked without observable errors or latency on both systems. PawnIO 2.0.1 was used because the unrestricted PawnIO 2.2.0 build rejects unofficial modules with STATUS_INVALID_PARAMETER. The unrestricted build appears to behave like the standard build, which accepts only officially signed modules.
Owner
|
Please test if HalMakeBeep works instead, it’d be much preferable as it correctly locks the mutex for the device |
Author
I already tested HalMakeBeep first (via BeepXP64’s HalMakeBeep path). Since PawnIO.Modules is for direct hardware I/O modules, this PR intentionally uses direct access. Please confirm which direction you want: keep direct access (works on my tested systems), or |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Add PcSpeaker.p to provide NeoBleeper with direct access to the legacy PC speaker on modern Windows systems.
The module programs the legacy speaker interface to:
The hardware check covers PIT channel 2 and System Control Port B. It does not claim to detect whether a physical speaker cone is connected or whether its output is audible.
This implementation replaces NeoBleeper's previous InpOutx64-based backend because of current and upcoming Windows compatibility issues. Microsoft has confirmed deployment of a block that prevents the inpoutx64 driver from loading on affected Windows 11 devices. Microsoft also states that this block will be included in the September 2026 Windows security updates and subsequent releases.
Source:
https://learn.microsoft.com/en-us/windows/release-health/resolved-issues-windows-11-25h2#3731msgdesc
Existing alternatives were unsuitable for this use case. BEEPx64 has driver-signing compatibility problems on current Windows versions, and HalMakeBeep did not reliably produce physical PC-speaker output during prior testing. PawnIO provides a maintained mechanism for performing the required hardware I/O without depending on InpOutx64.
The module compiled successfully and was tested with PawnIO 2.0.1 on:
Tone generation, frequency changes, and start/stop operations worked without observable errors or latency on both systems.
PawnIO 2.0.1 was used because the unrestricted PawnIO 2.2.0 build rejects unofficial modules with STATUS_INVALID_PARAMETER. The unrestricted build appears to behave like the standard build, which accepts only officially signed modules.