China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-02 13:21
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » [Help] Sound problem under pure DOS View 1,128 Replies 8
Original Poster Posted 2008-06-20 22:00 ·  中国 福建 漳州 电信
初级用户
Credits 44
Posts 17
Joined 2008-06-20 21:39
18-year member
UID 120653
Gender Male
Status Offline
There is no sound under pure DOS, and the sound card driver doesn't have a FOR DOS version. Does that mean there's no way to get sound at all?

I have an idea: can I use the small speaker inside the case to make sound? I remember back in the DOS era they all used the little speaker for sound.

A few days ago I installed UCDOS, and after the installation there was also a piece of music played through that little speaker.

Do I need to change some file configuration? Please teach me, thanks!
Floor 2 Posted 2008-06-20 22:51 ·  中国 广东 广州 教育网
铂金会员
★★★★
C++启程者
Credits 5,154
Posts 1,827
Joined 2003-07-18 00:00
22-year member
UID 7105
Gender Male
Status Offline
That still depends on whether the game or program itself has the option to use the speaker for sound. If it does, it will generally provide a speaker sound option.
Floor 3 Posted 2008-06-20 23:37 ·  中国 福建 漳州 电信
初级用户
Credits 44
Posts 17
Joined 2008-06-20 21:39
18-year member
UID 120653
Gender Male
Status Offline
I remember that back in DOS, Richman 2 had sound even without any sound options. Even though the sound was kind of miserable, it was still better than no sound. I looked it up online and it seems to say the little speaker can be used to play MIDI. But there are no exact methods anywhere.

Sigh, being uneducated is really scary.

Thanks, 2L. Looks like my problem has no solution after all 囧~
Floor 4 Posted 2008-06-20 23:50 ·  中国 福建 漳州 电信
初级用户
Credits 44
Posts 17
Joined 2008-06-20 21:39
18-year member
UID 120653
Gender Male
Status Offline
I just found an article that says this

Make the small speaker inside the case produce different sounds

Using the beep statement in VB can only produce one kind of sound. If you want to produce different sounds, you can use an API function.

Option Explicit
Private Declare Function APIBeep Lib "kernel32" Alias "Beep" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long

Private Sub Command1_Click()
  Dim frequency As Long

frequency = CLng(txtFrequency.Text)
  APIBeep frequency, 500
End Sub

Does what this article says have anything to do with my problem?

Other than Chinese I can't understand anything at all 囧
Floor 5 Posted 2008-06-20 23:55 ·  中国 广东 广州 教育网
铂金会员
★★★★
C++启程者
Credits 5,154
Posts 1,827
Joined 2003-07-18 00:00
22-year member
UID 7105
Gender Male
Status Offline
Originally posted by windows7 at 2008-6-20 11:37 PM:
I remember that in the past, Monopoly 2 under DOS had sound even without any sound options.


That's because programs were generally written like this: when they detected that no sound card driver was installed, they would switch to using the PC speaker. In other words, if the program wasn't written with that function, then no matter how you adjust the machine speaker, it's impossible to get any sound.

That is to say, in general: if your game has neither sound/music nor PC speaker sound, then it means the program itself wasn't written with that function, so adjusting the machine won't help. It should be like that...

[ Last edited by GOTOmsdos on 2008-6-20 at 11:58 PM ]]
Floor 6 Posted 2008-06-20 23:59 ·  中国 广东 广州 教育网
铂金会员
★★★★
C++启程者
Credits 5,154
Posts 1,827
Joined 2003-07-18 00:00
22-year member
UID 7105
Gender Male
Status Offline
Floor 7 Posted 2008-06-21 00:43 ·  中国 福建 漳州 电信
初级用户
Credits 44
Posts 17
Joined 2008-06-20 21:39
18-year member
UID 120653
Gender Male
Status Offline
When it detects that no sound card driver is installed, it switches to using the speaker for sound. That's the part you mentioned.

The game definitely has music files, so can that bit of code be added into DOS? How would that be done?

Or, could you experts make some kind of newbie program that directly makes the speaker produce sound or something?

Modern sound cards basically don't have FOR DOS drivers anymore. If I had known earlier, I wouldn't have sold that yellow old 1998 computer as junk. That one could still hum out some sound effects. 囧
Floor 8 Posted 2008-06-21 01:33 ·  中国 福建 漳州 电信
初级用户
Credits 44
Posts 17
Joined 2008-06-20 21:39
18-year member
UID 120653
Gender Male
Status Offline
GOTOmsdos, senior, one more question

If before installing WinXP, you formatted drive C: with the command Format c:/s, then after installing WinXP, pressing F8 lets you enter pure DOS.

In that pure DOS after installing the system, if there is no floppy drive, is there still an A: drive letter?
Floor 9 Posted 2008-06-21 02:12 ·  中国 福建 漳州 电信
初级用户
Credits 44
Posts 17
Joined 2008-06-20 21:39
18-year member
UID 120653
Gender Male
Status Offline
Or how can DOS 7.1 have a virtual A: drive like the Dwarf tools?
Forum Jump: