VOGONS


First post, by deeped

User metadata
Rank Newbie
Rank
Newbie

Hi there,

you guys know the DOSbox emulates the AdLIB/FM sounds... this question is for the developers: how to do it by? By DirectSound? (I only interested on Win32 platform). If so, how can I "borrow" it from the source? Which source files uses and how? I used to deal with Adlib in DOS platform. I know its can be used by 388h, 389 ports. Question is again: how to use it to make sounds by writing 388, 389 "ports"?

Reply 2 of 14, by deeped

User metadata
Rank Newbie
Rank
Newbie

So DOSbox uses it too? Exactly?

Reply 3 of 14, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

No. But trying to understand your posting it sounds like vdms is what you're really looking for.

Otherwise have a look at adlib.cpp and ymf262.c of the dosbox sources.

Reply 4 of 14, by deeped

User metadata
Rank Newbie
Rank
Newbie

I cannot find the way. It doesnt use DirectSound. Then how? Buy the way I don't use C++ (only Delphi)

Reply 5 of 14, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

don't bother then.
Both emulation projects are in C

Water flows down the stream
How to ask questions the smart way!

Reply 6 of 14, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

"It" (dosbox) uses dsound by default on windows using SDL.

Reply 7 of 14, by Roxor

User metadata
Rank Newbie
Rank
Newbie

Mate, if you don't like C++, I think you'll have to write your own FM engine from scratch.

You'd probably be better off learning C++, though, seeing as practically everything seems to be written in either C or C++.

By the way guys, thanks for pointing out those source files. They may prove useful in helping me write my own FM engine.

Reply 8 of 14, by deeped

User metadata
Rank Newbie
Rank
Newbie

I didnt say I dont like it just I dont use it 😀 it must be done under Delphi.

But give me more help pls I dont really understand something. Can anyone gimme a little overview? vdmsound not good at all.

Reply 10 of 14, by deeped

User metadata
Rank Newbie
Rank
Newbie

Ok then I'll learn more C. I know something about it.

Reply 11 of 14, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

For your way around in dosbox: have a look at adlib.cpp, function OPL_Write().
This handles writes to 0x388/0x389, they'll finally arrive at function
OPLWriteReg() (fmopl.c) or OPL3WriteReg() (ymf262.c). Both functions
control the state of the synthesis.
Then look at OPL_CallBack() in adlib.cpp, that is YM3812UpdateOne()
for fmopl.c and YMF262UpdateOne() for ymf262.c, they generate the
actual output depending on the state.
But you'll definitely need some understanding of C for this to be usable.

Reply 12 of 14, by deeped

User metadata
Rank Newbie
Rank
Newbie

I programmed almost a complett web homepage under PHP isnt it enough for C? 😁 and I think theres a looping wave-stream that always being played and the sounds are mixed into it, isnt there?

Reply 13 of 14, by deeped

User metadata
Rank Newbie
Rank
Newbie

okay finally I started it 😀 its not so hard to implement this in Delphi but.... could you give me more information please? I meant the initial stepts too, tricks or.... which C/C++ files needed only? In addition, Microsoft Visual C++ 6 Standard will be good for me?

Reply 14 of 14, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

all info is allready in this thread.

Water flows down the stream
How to ask questions the smart way!