SweetLow Posted March 2 Posted March 2 (edited) 13 hours ago, Drew Hoffman said: If wdmstub implements MmMapLockedPagesSpecifyCache No. It does not. I did version of WDMSTUB with this implementation, but did not do "SpecifyCache" part as this function mostly used in binaries because in new DDKs MmMapLockedPages (that is really needed) is just implemented as #define of MmMapLockedPagesSpecifyCache. But it is not hard to do this nonetheless. P.S. It is bad idea to use different cache attributes for different linear mappings of the same physical page. If I remember correctly you can even get Machine Check Exception in such situation if it is enabled. P.P.S. WDMHDA-2026-02-27a - 0E exception (BSOD) on the boot. But version 17 corruption of HDA Controller state is not mentioned now. Edited March 2 by SweetLow
SweetLow Posted March 2 Posted March 2 13 hours ago, LoneCrusader said: I see it listed in the last version made public which is linked on the site rloew's son put up with released files. There https://rloewelectronics.com/distribute/WDMEX/0.3/ I could not find them. If some other location exists, please, be gentle to point me. MERCURY127 really posted something like such list from some version of WDMEX https://forum.ru-board.com/topic.cgi?forum=62&topic=28114&start=3160#12 , but there is only names.
Guest Drew Hoffman Posted March 2 Posted March 2 (edited) 11 hours ago, SweetLow said: No. It does not. I did version of WDMSTUB with this implementation, but did not do "SpecifyCache" part as this function mostly used in binaries because in new DDKs MmMapLockedPages (that is really needed) is just implemented as #define of MmMapLockedPagesSpecifyCache. But it is not hard to do this nonetheless. P.S. It is bad idea to use different cache attributes for different linear mappings of the same physical page. If I remember correctly you can even get Machine Check Exception in such situation if it is enabled. P.P.S. WDMHDA-2026-02-27a - 0E exception (BSOD) on the boot. But version 17 corruption of HDA Controller state is not mentioned now. Which system gets the fatal exception 0E on boot? Intel 10th Gen? I figured there would be some bad consequences due to mapping the pages twice but it seems to be necessary for the AMD 6xx-9xx series of chipsets, and possibly for Nforce as well, to map the audio buffer as Uncacheable or Write Combine to fix the looping problem. Should also mention that I have not been able to get 98se or Me to work on VIA Nano either (seems to fail in CONFIGMG and with a locked down thin client BIOS there's no options to change that would do any good). Edited March 2 by Drew Hoffman
isolar Posted March 2 Posted March 2 Fatal exception OE at 0028:C001545A on Bay Trail N2840 system confirmed here.
awkduck Posted March 2 Posted March 2 3 hours ago, Drew Hoffman said: I have not been able to get 98se or Me to work on VIA Nano Mine isn't completely locked down, but I get the feeling success will be tough. I'm not aiming to look at that machine, too soon. I was going to start by disabling everything, I could, and boot a bare pre-configured Win98 image file, from ram. Should try 95 on it, too. I can get that on most things. By the way, if you didn't know already, those Cx0 have SSE3 (pni). Probably doesn't help it much, but surprised me.
Guest Drew Hoffman Posted March 2 Posted March 2 (edited) I did know the Cx0 has SSE3, but just because it supports the instruction set doesn't mean it's even remotely fast enough to be usable. The instructions are probably microcoded. In fact, enabling SSE seemed to make things even slower. VSBHDA-SF was usable without SSE but choppy with it. 3dmark01 with SoftGPU achieved 1 frame per benchmark section and too slow to return a score. Also the Cx0 has ugly nearest neighbor scaling for DOS video modes even over VGA though that could possibly be resolved through BIOS hacking. e: I discussed this cache coherence problem with ChatGPT and it recommended simply overriding the IDmaChannel::CopyTo method to flush all the written cache lines with CLFLUSH after each copy so I will try that and see if that resolves all the compatibility problems. (Should also check for support of that instruction at initialization of the DmaChannel, just in case someone is using a Vortex86 with HD Audio, and could maybe disable that for Intel platforms or stop turning off the no-snoop flag.) Edited March 2 by Drew Hoffman
SweetLow Posted March 3 Posted March 3 13 hours ago, Drew Hoffman said: Which system gets the fatal exception 0E on boot? Intel 10th Gen? Yes. Just to note - I usually do not go to the next problem before solving previous. 13 hours ago, Drew Hoffman said: due to mapping the pages twice You asked for few possible allocators of buffers with needed cache attributes but I slightly misunderstand now - did you try any of them? 8 hours ago, Drew Hoffman said: written cache lines with CLFLUSH MS right on the link you gave in this thread recommends to use WC buffer and memory barriers. I assume you try to check this variant.
MERCURY127 Posted March 3 Posted March 3 WDMHDA-2026-02-27a: + Haswell 2011-3 C612 machine: ++ Realtek HDA = normal work; ++ Nvidia HDA = BSOD 0e 0028:c00154a2 VMM(01) 000144a2 when the device enabling in DM, or when booting with enabled the device.
Guest Drew Hoffman Posted March 4 Posted March 4 I think the current driver will always crash if it is loaded for multiple instances on the same PC because the AdapterCommon object is a Singleton and will only be created once so I really need to move all the controller state into its own class as well. Flushing all of the written cache lines in the audio buffer with clflush seems to work just as well with AMD chipsets as mapping the buffer in write-combine. If there's a CPU usage difference it's not really noticeable. SweetLow, thanks for looking up the VxD calls to get the buffer memory mapping. For the moment I would rather avoid using VxD services if at all possible because if I use them I either need to switch compilers, figure out how to add the Win98 DDK includes properly, or write out all the VxD calls in straight ASM, and then still need to build a separate version for 2k/XP which will complicate releases.
SweetLow Posted March 4 Posted March 4 (edited) 4 hours ago, Drew Hoffman said: write out all the VxD calls in straight ASM It is pretty simple as I said. You can see examples in NVMe sources (I don't want to use Windows 98 DDK Libs too). There you will find exactly PageModifyPermissions declaration and macroses to access PTE. And as I said too - feel free to ask me any implementation if you have problem. IDK do you need this, may be you are interested to write code yourself but nonetheless. P.S. It's curious that in the end I do not need any cache control in NVMe but exactly this thread pushed me to know this fact. 4 hours ago, Drew Hoffman said: , and then still need to build a separate version for 2k/XP which will complicate releases Conditional defines and abstraction level work well, I assume you know this. But in this project you can simply implement any NT function you need in version for 9x. And yes, as I remember you expressly stated that you restricted your target to 9x now. Edited March 4 by SweetLow
Guest Drew Hoffman Posted March 6 Posted March 6 (edited) Here's a new release of the driver, version Alpha-018. Would like to confirm that this works on all AMD/NForce, and if it causes any problems or significant performance regressions on very new Intel chipsets with the combination of the no-snoop and the cache flushing. Still haven't been able to get VIA codecs to work properly; at least the VT1702S seems to reject all sound formats and produces static at max volume. WDMHDA-Alpha-018-msfn.7z Edited March 6 by Drew Hoffman
schwups Posted March 6 Posted March 6 Now sound on Asus P5KPL/1600 ICH7 ID VEN_8086&DEV_27D8 / VIA VT1708B - but only Rear Speaker Out port black jack. The others are inactive.
Guest Drew Hoffman Posted March 7 Posted March 7 I'm glad that it's working for you but I wonder why only that jack works. (There was a bug with the previous version misidentifying all outputs as SPDIF but that should have been fixed.) Are you able to install the Debug version (HDA.sys in the obchk/i386 folder), disable the device, restart, open Sysinternals DebugView, enable the device, and save the log file?
isolar Posted March 7 Posted March 7 Alpha 018 - Fatal exception 0E at 0028:C001545A on Bay Trail N2840 system here. 8086_0F04 / 10EC_0280
Guest Drew Hoffman Posted March 7 Posted March 7 (edited) Think I will have to disable the CLFLUSH by default on Intel chipsets, seems like the majority don't need it anyway but idk about 10th Gen and newer. Intel CPUs on Nforce chipsets may still need it. Should add Registry options to override the snoop flags and the cache flushing either way. The only Bay Trail Atom I have is in a Chromebook and that doesn't have a proper BIOS to try Win98 anyway. It's hard to accumulate enough hardware to test on 22 years of platforms. Edited March 7 by Drew Hoffman
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now