VOGONS

Common searches


First post, by darkblacklife

User metadata
Rank Newbie
Rank
Newbie

Hi, I'm new... excuse me for my bad english, I'm from Argentina. And excuse me for use this forum for this request, I think is the best place for this request. Thanks for your understanding...

I was re-editing and compiling an old QBasic's program (a game) using, of course, the wonderful DosBox. I want give this to my nephew, and hi is very young (< 2 years old ) and his parents are very lazy. I know if they must install and configure DosBox they won't use this game. And I want my game never died but QBasic is a old languaje and I think now is the moment to pass this code to a new Basic languaje. For theses two reasons I began to use FreeBasic, a very similar languaje that compile executables under Windows and Linux.

But Freebasic have a problem (for me)... Doesn't have implementation for SOUND and PLAY commands of QBasic. I can emulate the QB's SOUND and use the PC-Speaker, but it is not enough, I'd like use the soundcard out (it's most modern). It's true that exists "QBSound", a collection of tools that adds QB style sound commands to FreeBasic, implementations of SOUND, PLAY and BEEP using midi lib and midi functions. But these don't sound like QB's PLAY (or SOUND).

Somebody said me: "Now SOUND and PLAY sounds better than when use PC-Speaker". It is not about better or worse, It's about "same sound", I want same sound because if sound changes, game changes...

DosBox emulates perfectly PC-Speakers sound (by the soundcard out), QB's executables sounds perfectly with DosBox. I think a DosBox's developer maybe know enough about emulation stuff (a lot more than me) and could make a library or implementation or something for SOUND, PLAY and BEEP commands using part of the DosBox source code. Maybe some DosBox's developer loves Freebasic and wants to contribute doing these procedures. I'd like to have SOUND and PLAY procedures (using the souncard out like DosBox) for my game and I think a lot of FreeBasic programmers too (especially the old QBasic programmers).

Please, if somebody can help me, write me to darkblacklife@hotmail.com
or send me the library, procedure, implementation or whatever that give me this functionality for FreeBasic.

Thanks!!!

Reply 1 of 21, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

With QuickBasic or QBX you can generate executables out of qbasic programs
(which you can't with the stripped down qbasic found in msdos).

Also check out the various frontends for dosbox, if you're aiming at portability
try DBGL (java) and you should be able to create an easily accessible version
of your program.

Reply 2 of 21, by darkblacklife

User metadata
Rank Newbie
Rank
Newbie

But I want use FreeBasic....

I dont know why SOUND and PLAY are not present in FreeBasic. If DosBox can emulate the soundspeaker, why FreeBasic can't generate the same sound (some type of square wave)???.

FreeBasic needs a library that I think a DosBox developer know how create...
Of course, if that developer want to create it.....

(Sorry for my inglish, I speak like Tarzan)

Reply 4 of 21, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

A DOSBox developer has better things to do with their time than write code for a BASIC program to support something that DOSBox already does.

How To Ask Questions The Smart Way
Make your games work offline

Reply 6 of 21, by darkblacklife

User metadata
Rank Newbie
Rank
Newbie

OK... I undestand,... I'm studying the OpenAl Library and I think i can build a wave like old pc-speakers... but I don´t know the shape of this wave, it's not a exactly square wave... do you know how the wave shape is?

😀 thanks

Reply 9 of 21, by darkblacklife

User metadata
Rank Newbie
Rank
Newbie
ripsaw8080 wrote:

yes...but.... mmmm

It's a square wave... but ... if you build a wav file with a perfect square wave, the sound card creates a ugly square wave (with pulses where the wave pass from positive to negative)... I must create a square wave with a bit smooth shape.... (I think it's due to some fourier expansion)

thanks

Reply 12 of 21, by darkblacklife

User metadata
Rank Newbie
Rank
Newbie
ripsaw8080 wrote:

I don't know much about audio processing; but that article suggests using a low-pass filter.

"low-pass filter" is a electronic component.... I don't know how use this information in a program source code.... OpenAl, don't filter my wave....(no?)...

Reply 13 of 21, by darkblacklife

User metadata
Rank Newbie
Rank
Newbie
darkblacklife wrote:
ripsaw8080 wrote:

I don't know much about audio processing; but that article suggests using a low-pass filter.

"low-pass filter" is a electronic component.... I don't know how use this information in a program source code.... OpenAl, don't filter my wave....(no?)...

ok... I think I'm undertand...
I tried whit this:
http://en.wikipedia.org/wiki/Low-pass_filter
and with fourier series for square waves....

sound is better now, but no equal to dosbox pc-speaker emulation yet

Reply 14 of 21, by Sephiroth

User metadata
Rank Member
Rank
Member

Just to clarify, QBasic is free with DOS and I think MS used to offer it as a free download on their site, but QuickBasic (the full version that compiles EXEs) is not free. I don't know if QuickBasic 4.5 is free in this day and time or not, but I loved it when I began programming on PCs.

486 Launcher v2.0 is now under development!

Reply 15 of 21, by leileilol

User metadata
Rank l33t++
Rank
l33t++
Sephiroth wrote:

Just to clarify, QBasic is free with DOS and I think MS used to offer it as a free download on their site, but QuickBasic (the full version that compiles EXEs) is not free. I don't know if QuickBasic 4.5 is free in this day and time or not, but I loved it when I began programming on PCs.

and MS-DOS costs money so it's not really free. It's not Free Software either.

apsosig.png
long live PCem

Reply 16 of 21, by Kippesoep

User metadata
Rank Oldbie
Rank
Oldbie
Sephiroth wrote:

Just to clarify, QBasic is free with DOS and I think MS used to offer it as a free download on their site

They still do: look for olddos.exe

Reply 17 of 21, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

"Free" - the most misused and misunderstood word on this planet? IANAL, but my guess is that this olddos.exe is only free if you have a valid license for Win95.

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 19 of 21, by Sephiroth

User metadata
Rank Member
Rank
Member

Well they appear to work if you download them. This is one of those black-holes. The owner is offering them for free download, but they have no way of knowing whether or not you own Win95, so technically you CAN grab them for free, 🤣!

486 Launcher v2.0 is now under development!