VOGONS


Reply 20 of 406, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
digger wrote on 2022-08-09, 07:49:
Although I agree that something written in C would be much easier to comprehend, HDPMI was the one that stsp and japheth (Baron- […]
Show full quote
crazii wrote on 2022-08-09, 06:28:

I've used CWSDPMI and HDPMI in a VirtualBox VM, it seems that HDPMI is much faster and reside in himem with low memory footprint,. CWSDPMI is good(at least for me) in that it's written in C, more readable. 🤣

Although I agree that something written in C would be much easier to comprehend, HDPMI was the one that stsp and japheth (Baron-von-Riedesel on GitHub) recommended in the other thread. And they have expressed an openness to cooperate w.r.t. extending it with a port trapping API, so we could count on their help too if we were to pick this option to hack on.

Teamup is good, I have little spare time too, mostly weekends, or some weekday evening.

Great! 🙂 Do you have a GitHub account too? Perhaps you can join that thread and chime in?

The last I remember doing, based on the info I got there, was to try to get HDPMI to build, as a starting point for this extension work. I couldn't (cross-)build it in Linux, but I created a project for a Docker image to allow DOS builds in GitHub Actions, so builds can be automated in a CI/CD pipeline, even if the builds have to be done in DOS, using DOS toolchains.

I'd still prefer to be able to cross-assemble the project from a Linux development environment, though. But let's not spend too much time on getting that going.

Hey, I've tried building HDPMI in native windows, it seems much easier, but Have you created the docker image specific to build HDPMI? I guess CI/CD is more important for modern development. Are you gonna have 2 repos, one for source code and one for docker? I'm quite unfamiliar with that.

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 21 of 406, by digger

User metadata
Rank Oldbie
Rank
Oldbie

You cought me while on vacation. I'm sitting at a beach bar somewhere in the Caribbean right now, enjoying a drink. 🍸

I saw your recent posts in the GitHub threads come by in email alerts. Good progress you made! I'll have some free days at home around the Christmas holidays. Maybe I can spend some of that time assisting you.

As your question about the Docker stuff: indeed, there is a separate repo for the Docker peoject that can build and publish the image that can then be used to set up DOS builds in a CI/CD pipeline, using GitHub Actions. I believe I have a branch (something other than master/main) in the temu-vsb project that is set up for this in GitHub.

Reply 22 of 406, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
digger wrote on 2022-12-02, 22:12:

You cought me while on vacation. I'm sitting at a beach bar somewhere in the Caribbean right now, enjoying a drink. 🍸

I saw your recent posts in the GitHub threads come by in email alerts. Good progress you made! I'll have some free days at home around the Christmas holidays. Maybe I can spend some of that time assisting you.

As your question about the Docker stuff: indeed, there is a separate repo for the Docker peoject that can build and publish the image that can then be used to set up DOS builds in a CI/CD pipeline, using GitHub Actions. I believe I have a branch (something other than master/main) in the temu-vsb project that is set up for this in GitHub.

Okay, glad that you will help. Enjoy your vacation and have a good time!

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 23 of 406, by crazii

User metadata
Rank Oldbie
Rank
Oldbie

I've basically finished the IO port trap in HDPMI. tested doom with my driver and it have music.
This is my clone of HDPMI repo: https://github.com/crazii/HX
HDPMI already have IO bitmap and an vendor extension with port trap skeleton so it's a relief.

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 24 of 406, by digger

User metadata
Rank Oldbie
Rank
Oldbie

Groundbreaking work, at least in terms of DOS sound emulation. Great job!

A few days after coming back from vacation last week, I caught a nasty flu that has kept me under the weather most of this week.

If I feel fit enough, I'll take a look at your work this weekend.

Sorry I haven't gotten around to help you out on this yet.

Maybe we can have a live chat or audio/video call to share some ideas on how to implement an API to simplify DMA emulation, for the emulation of more complex sound cards?

Thanks for your amazing work so far!

Reply 25 of 406, by crazii

User metadata
Rank Oldbie
Rank
Oldbie

The newly added port trapping for HDPMI is limited that only a DPMI client can be registered. The real mode handler (EMM386 compatible interface) support need more work and I'm not gonna do it yet.

You mean simplify DMA emulation for protected mode only games through DPMI? I'm not quite familiar with the DMA 🤣 But I'm ready to learn. we may chat on discord.

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 26 of 406, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
digger wrote on 2022-12-16, 23:43:

Maybe we can have a live chat or audio/video call to share some ideas on how to implement an API to simplify DMA emulation, for the emulation of more complex sound cards?

I'm considering writing a SB emulation program, and found you post here: Idea: Integrating Sound Blaster emulation in a DOS extender?
I took a glance at Mpxplay and it has several AC97 drivers, and Intel HDA driver, for DOS. If the drivers can be used, things will be much easier, the only thing that needed is the SB emulation part. I think it's possible to write a single program to trap the SB ports for protected mode games, using HDPMI, and EMM386 for real mode games. but didn't figure out the DMA part.
Maybe I can try emulate SB via USB audio for starters, since a generic USB audio driver is universal and don't need vendor specific stuff.

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 27 of 406, by crazii

User metadata
Rank Oldbie
Rank
Oldbie

I've looked at the VSB - Virtual Sound Blaster code, it has DMA emulation. It uses port trap to handle the DMA controller (IO port 0x0~0xF). It Also did that for the interrupt controller to virtualize IRQ. It has to enter pm/v86 to do those, or use QEMM. Emmm, interesting. I've thought about virtualize SB IRQ in such a way, but didn't realize that same thing could be done for DMA virtualization.

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 28 of 406, by Bondi

User metadata
Rank Oldbie
Rank
Oldbie
crazii wrote on 2023-01-08, 08:19:

I've looked at the VSB - Virtual Sound Blaster code, it has DMA emulation. It uses port trap to handle the DMA controller (IO port 0x0~0xF). It Also did that for the interrupt controller to virtualize IRQ. It has to enter pm/v86 to do those, or use QEMM. Emmm, interesting. I've thought about virtualize SB IRQ in such a way, but didn't realize that same thing could be done for DMA virtualization.

The plan sounds very promising, crazii. A SB emulation program can be useful in many ways.
Could you elaborate a little what advantages over VSB it's going to have and what output device(s) it's going to support.

PCMCIA Sound Cards chart
archive.org: PCMCIA software, manuals, drivers

Reply 29 of 406, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
Bondi wrote on 2023-01-08, 09:03:
crazii wrote on 2023-01-08, 08:19:

I've looked at the VSB - Virtual Sound Blaster code, it has DMA emulation. It uses port trap to handle the DMA controller (IO port 0x0~0xF). It Also did that for the interrupt controller to virtualize IRQ. It has to enter pm/v86 to do those, or use QEMM. Emmm, interesting. I've thought about virtualize SB IRQ in such a way, but didn't realize that same thing could be done for DMA virtualization.

The plan sounds very promising, crazii. A SB emulation program can be useful in many ways.
Could you elaborate a little what advantages over VSB it's going to have and what output device(s) it's going to support.

I don't know VSB much, it seems emulating SB for PC speaker & Covox.
Basically the planned SB emu program should support SB pro/16 with OPL3 emulation. what about the MIDI? I'm not quite familiar with that. Actually the only MIDI sound I've heard is Windows' WDM midi synth through MPU401 for some miles sound games, sounds weird compared to OPL3. 🤣
It would support both real mode games and protected mode games all together, like the RetrowaveOPL3 driver.
About the output sound cards, I think it better be AC97 (ICH, VT82xx for Intel & AMD mobo), and probably Intel High Definition Audio & Ensoniq SB PCI?, the driver code from Mpxplay could be used. Ideally if MpxPlay support the card, it could be supported by the emulation program too.

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 30 of 406, by Bondi

User metadata
Rank Oldbie
Rank
Oldbie
crazii wrote on 2023-01-08, 10:10:
I don't know VSB much, it seems emulating SB for PC speaker & Covox. Basically the planned SB emu program should support SB pro/ […]
Show full quote
Bondi wrote on 2023-01-08, 09:03:
crazii wrote on 2023-01-08, 08:19:

I've looked at the VSB - Virtual Sound Blaster code, it has DMA emulation. It uses port trap to handle the DMA controller (IO port 0x0~0xF). It Also did that for the interrupt controller to virtualize IRQ. It has to enter pm/v86 to do those, or use QEMM. Emmm, interesting. I've thought about virtualize SB IRQ in such a way, but didn't realize that same thing could be done for DMA virtualization.

The plan sounds very promising, crazii. A SB emulation program can be useful in many ways.
Could you elaborate a little what advantages over VSB it's going to have and what output device(s) it's going to support.

I don't know VSB much, it seems emulating SB for PC speaker & Covox.
Basically the planned SB emu program should support SB pro/16 with OPL3 emulation. what about the MIDI? I'm not quite familiar with that. Actually the only MIDI sound I've heard is Windows' WDM midi synth through MPU401 for some miles sound games, sounds weird compared to OPL3. 🤣
It would support both real mode games and protected mode games all together, like the RetrowaveOPL3 driver.
About the output sound cards, I think it better be AC97 (ICH, VT82xx for Intel & AMD mobo), and probably Intel High Definition Audio & Ensoniq SB PCI?, the driver code from Mpxplay could be used. Ideally if MpxPlay support the card, it could be supported by the emulation program too.

Oh, supporting protected mode mode games is a big step forward!
Did I get correctly that both digital (DMA driven) and FM synth are in the scope? Do you plan to emulate the FM synthesis itself or output it to an extenal OPL3 (Retrowave) device? The former is no trivial task I guess. That's what Dosbox actually does.
MIDI would also require either an external synthesizer or writing it in software from scratch, loading samples and so on.
Anyways looking forward to seeing further developmant of your project.
And yes, can I suggest to include support for some legacy sound device like Covox. This would let to embrace old computers without sound cards, like 386/486 laptops, IBM PS/1 and so on.

PCMCIA Sound Cards chart
archive.org: PCMCIA software, manuals, drivers

Reply 31 of 406, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
Bondi wrote on 2023-01-08, 10:44:
Oh, supporting protected mode mode games is a big step forward! Did I get correctly that both digital (DMA driven) and FM synth […]
Show full quote
crazii wrote on 2023-01-08, 10:10:
I don't know VSB much, it seems emulating SB for PC speaker & Covox. Basically the planned SB emu program should support SB pro/ […]
Show full quote
Bondi wrote on 2023-01-08, 09:03:

The plan sounds very promising, crazii. A SB emulation program can be useful in many ways.
Could you elaborate a little what advantages over VSB it's going to have and what output device(s) it's going to support.

I don't know VSB much, it seems emulating SB for PC speaker & Covox.
Basically the planned SB emu program should support SB pro/16 with OPL3 emulation. what about the MIDI? I'm not quite familiar with that. Actually the only MIDI sound I've heard is Windows' WDM midi synth through MPU401 for some miles sound games, sounds weird compared to OPL3. 🤣
It would support both real mode games and protected mode games all together, like the RetrowaveOPL3 driver.
About the output sound cards, I think it better be AC97 (ICH, VT82xx for Intel & AMD mobo), and probably Intel High Definition Audio & Ensoniq SB PCI?, the driver code from Mpxplay could be used. Ideally if MpxPlay support the card, it could be supported by the emulation program too.

Oh, supporting protected mode mode games is a big step forward!
Did I get correctly that both digital (DMA driven) and FM synth are in the scope? Do you plan to emulate the FM synthesis itself or output it to an extenal OPL3 (Retrowave) device? The former is no trivial task I guess. That's what Dosbox actually does.
MIDI would also require either an external synthesizer or writing it in software from scratch, loading samples and so on.
Anyways looking forward to seeing further developmant of your project.
And yes, can I suggest to include support for some legacy sound device like Covox. This would let to embrace old computers without sound cards, like 386/486 laptops, IBM PS/1 and so on.

Yes, both digital & FM, The OPL3 emulation should be done like DOSBox, pure emu to gen PCM samples, though I don't know the impact on CPU, I think a Pentium3 will handle that, about the same era of AC97.
I can try supporting the Covox sound, with the VSB code I think it will not be a problem. 😁

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 32 of 406, by Bondi

User metadata
Rank Oldbie
Rank
Oldbie
crazii wrote on 2023-01-08, 11:04:
Bondi wrote on 2023-01-08, 10:44:
Oh, supporting protected mode mode games is a big step forward! Did I get correctly that both digital (DMA driven) and FM synth […]
Show full quote
crazii wrote on 2023-01-08, 10:10:
I don't know VSB much, it seems emulating SB for PC speaker & Covox. Basically the planned SB emu program should support SB pro/ […]
Show full quote

I don't know VSB much, it seems emulating SB for PC speaker & Covox.
Basically the planned SB emu program should support SB pro/16 with OPL3 emulation. what about the MIDI? I'm not quite familiar with that. Actually the only MIDI sound I've heard is Windows' WDM midi synth through MPU401 for some miles sound games, sounds weird compared to OPL3. 🤣
It would support both real mode games and protected mode games all together, like the RetrowaveOPL3 driver.
About the output sound cards, I think it better be AC97 (ICH, VT82xx for Intel & AMD mobo), and probably Intel High Definition Audio & Ensoniq SB PCI?, the driver code from Mpxplay could be used. Ideally if MpxPlay support the card, it could be supported by the emulation program too.

Oh, supporting protected mode mode games is a big step forward!
Did I get correctly that both digital (DMA driven) and FM synth are in the scope? Do you plan to emulate the FM synthesis itself or output it to an extenal OPL3 (Retrowave) device? The former is no trivial task I guess. That's what Dosbox actually does.
MIDI would also require either an external synthesizer or writing it in software from scratch, loading samples and so on.
Anyways looking forward to seeing further developmant of your project.
And yes, can I suggest to include support for some legacy sound device like Covox. This would let to embrace old computers without sound cards, like 386/486 laptops, IBM PS/1 and so on.

Yes, both digital & FM, The OPL3 emulation should be done like DOSBox, pure emu to gen PCM samples, though I don't know the impact on CPU, I think a Pentium3 will handle that, about the same era of AC97.
I can try supporting the Covox sound, with the VSB code I think it will not be a problem. 😁

Cool! If you need a tester at some point, I'll be happy to help. I have a Thinkpad x60s with Intel HD Audio AD1981HD codec, a A31p with Intel AC'97 Audio with a AD1881A codec and a Covox.

PCMCIA Sound Cards chart
archive.org: PCMCIA software, manuals, drivers

Reply 33 of 406, by digger

User metadata
Rank Oldbie
Rank
Oldbie

A first step that I've been trying to tackle is to port the VSB assembly code from TASM dialect to MASM dialect, so it could be built with the open-source Open Watcom (v2) assembler (WASM). Eventually I got the non-QEMM variant to assemble, but the executable froze when I ran it. The code is some kind of weird mix between 16-bit and 32-bit assembly code, and cleaning it up would be a nice first step, before adding support for additional backends other than the internal PC speaker and Covox. @crazii, how good is your assembly-fu? In terms of porting between assembler dialects, I mean?

Reply 34 of 406, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
digger wrote on 2023-01-11, 13:37:

@crazii, how good is your assembly-fu? In terms of porting between assembler dialects, I mean?

I never did that, but I guess maybe I can try. 😁 but before doing that I'm porting MPXPlay driver code from (open)watcom C to djgpp and making a C build rather than assembly. Maybe with a little bit of inline assembly.

By using some piece of DOSBox code, I added OPL3 emulation through QEMM and HDPMI32I, the AC97 driver tested working in virtual box, for both real mode and protected mode games. The music is not good yet (cracks and slowdowns) and I'm still improving it. Maybe need test it on real machine soon. 😁

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 35 of 406, by digger

User metadata
Rank Oldbie
Rank
Oldbie

Okay, I have been putting active retro hobbying off for too long. @crazii didn't you mention getting in touch through Discord recently? How do I find you there? And did you plan spending time on this stuff this weekend?

Reply 36 of 406, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
digger wrote on 2023-01-13, 22:14:

Okay, I have been putting active retro hobbying off for too long. @crazii didn't you mention getting in touch through Discord recently? How do I find you there? And did you plan spending time on this stuff this weekend?

Yes I'm now working on SB emulation, I think the distorted sound might be fixed later.
What's your Discord account? You can PM me.

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 37 of 406, by digger

User metadata
Rank Oldbie
Rank
Oldbie

I haven't started Discord in a while. Let me look it up... 😅

What time zone are you in, by the way? I'll be going to bed soon. But if have time for some tinkering tomorrow.

Reply 38 of 406, by Bondi

User metadata
Rank Oldbie
Rank
Oldbie
crazii wrote on 2023-01-15, 00:55:
digger wrote on 2023-01-13, 22:14:

Okay, I have been putting active retro hobbying off for too long. @crazii didn't you mention getting in touch through Discord recently? How do I find you there? And did you plan spending time on this stuff this weekend?

Yes I'm now working on SB emulation, I think the distorted sound might be fixed later.
What's your Discord account? You can PM me.

Hey, crazii. Good to see things are moving on!
I'm wondering how ICH sound device works, given it's a PCI device. I may be completely wrong, but If I understand correctly there is no "DMA controller" within PCI architecture, rather every device can read from memory directly. So no need for the TSR to feed data to the sound chip, just need to tell the sound card the address and legth of the sample?
Is it the case? Or you do it differntly? Could you tell a little how the SB portion is going to work.

PCMCIA Sound Cards chart
archive.org: PCMCIA software, manuals, drivers

Reply 39 of 406, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
Bondi wrote on 2023-01-15, 08:45:
Hey, crazii. Good to see things are moving on! I'm wondering how ICH sound device works, given it's a PCI device. I may be compl […]
Show full quote
crazii wrote on 2023-01-15, 00:55:
digger wrote on 2023-01-13, 22:14:

Okay, I have been putting active retro hobbying off for too long. @crazii didn't you mention getting in touch through Discord recently? How do I find you there? And did you plan spending time on this stuff this weekend?

Yes I'm now working on SB emulation, I think the distorted sound might be fixed later.
What's your Discord account? You can PM me.

Hey, crazii. Good to see things are moving on!
I'm wondering how ICH sound device works, given it's a PCI device. I may be completely wrong, but If I understand correctly there is no "DMA controller" within PCI architecture, rather every device can read from memory directly. So no need for the TSR to feed data to the sound chip, just need to tell the sound card the address and legth of the sample?
Is it the case? Or you do it differntly? Could you tell a little how the SB portion is going to work.

Basically yes, But some cards didn't support 8bit PCM and others, so the actual thing I'm doing is to 1.convert the data located at DMA address to 16bit pcm, to another memory location 2.duplicate channels into 2 (stereo) 3.convert the samples to a fixed sample rate(frequency), i.e. 22050 (44100 might be the most compatible sample rate for AC97). and then feed the data to the sound card.

Last edited by crazii on 2023-01-27, 09:07. Edited 1 time in total.

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD