Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

DOS32AWE - RAM wavetable MIDI possible for PM games under DOS (Announce)

posted by Japheth Homepage, Germany (South), 29.01.2026, 19:23
(edited by Japheth on 30.01.2026, 11:31)

> I found a potential problem with hdpmi: is usually uses IRETD when control
> is given to the client (switching from PL0 to PL3). That works fine,
> usually, but may be a problem with NMIs, because IRET(D) - according to the
> x86 docs - allows another NMI to be triggered. So it might be necessary to
> implement an IRETD-free path for NMIs ...

Turned out that this is not a problem...1)

But there is a very low-level issue, though, related to port 0x61. Because of this, DOS32AWE patches the installed AWEUTIL TSR, and AWEMIDI has to patch it as well. This makes it run stable - but in v86 mode only, so Jemm is required.

Updated both HDPMI source and AWEMIDI

The patched AWEUTIL version is 1.35.

-----------------
1): Well, it actually is a problem. AWEUTIL acknowledges the NMI by toggling bit 3 of port 61h. Once that is done, the next IRET - which is the first after the NMI has occured - will reactivate NMIs. That's what happens in real-mode. In v86-mode - or, more generally, in protected-mode - this strategy cannot work, because quite a few IRETs had already happened before the AWEUTIL code is finally reached.
To make AWEUTIL work in v86- and protected-mode, it has to be made reentrant, at least the (tiny) part between the acknowledgement and the IRET.

---
MS-DOS forever!

 

Complete thread:

Back to the forum
Board view  Mix view
23153 Postings in 2179 Threads, 404 registered users (1 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum