carlos12
Experienced Member
Hi there! A time ago I managed to reproduce music through the PC speaker. I just use this code:
This is embedded on an Int 08h handler. I also ommited the PIT programming part. Well, it works reasonably well on anything barely superior to 8088 at 4.77 mhz, and not very bad on this one (somewhat slower and with a lower pitch). The sample is 8 bit mono and 7 khz. I chose that rate in order to be usable also by Mickey Sound Source.
The problem is the disgusting whining, that carrier wave. I knew that there's a method to reduce or even eliminate the carrier wave: just oversampling. But that would need to fire the PIT to 14 khz (for not even making the whining completely unaudible, as we need more than 16 khz). 14 khz is, at least in my experience, just too much for the poor 8088 and 8086. 21 khz (x3 oversampling) is something I don't even think about.
So I was wondering if is there another method to at least mitigate the whining without requiring that much CPU power.
Access' Crime Wave plays decently well on an 8086/8 mhz, and it's able to play music while doing the MCGA presentation. There's a slight carrier wave but not very noticeable (at least it's 100 times less annonying than mine). Also, Italy 90 (in my opinion a quite mediocre soccer game) reproduces music, quite feeble, but without a very noticeable ringing. Does anybody know what's their secret? Maybe that was the part that justified the patent by Real Sound? The official current DosBox build (0.74 today) does not emulate the carrier wave, but Dosbox-X does. 86Box also doesn't do it as of today.
Thank you all!
Code:
asm les di,dword ptr[Voice.Sample]
asm add di,[SpeakerPCMCounter]
asm mov al,es:[di]
asm out 42h, al
This is embedded on an Int 08h handler. I also ommited the PIT programming part. Well, it works reasonably well on anything barely superior to 8088 at 4.77 mhz, and not very bad on this one (somewhat slower and with a lower pitch). The sample is 8 bit mono and 7 khz. I chose that rate in order to be usable also by Mickey Sound Source.
The problem is the disgusting whining, that carrier wave. I knew that there's a method to reduce or even eliminate the carrier wave: just oversampling. But that would need to fire the PIT to 14 khz (for not even making the whining completely unaudible, as we need more than 16 khz). 14 khz is, at least in my experience, just too much for the poor 8088 and 8086. 21 khz (x3 oversampling) is something I don't even think about.
So I was wondering if is there another method to at least mitigate the whining without requiring that much CPU power.
Access' Crime Wave plays decently well on an 8086/8 mhz, and it's able to play music while doing the MCGA presentation. There's a slight carrier wave but not very noticeable (at least it's 100 times less annonying than mine). Also, Italy 90 (in my opinion a quite mediocre soccer game) reproduces music, quite feeble, but without a very noticeable ringing. Does anybody know what's their secret? Maybe that was the part that justified the patent by Real Sound? The official current DosBox build (0.74 today) does not emulate the carrier wave, but Dosbox-X does. 86Box also doesn't do it as of today.
Thank you all!