Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sbmix utility #13

Open
stsp opened this issue May 15, 2022 · 10 comments
Open

sbmix utility #13

stsp opened this issue May 15, 2022 · 10 comments

Comments

@stsp
Copy link
Member

stsp commented May 15, 2022

@mcericdos have pointed me
to this cool utility:
https://www.bttr-software.de/products/sbmix/
It would be useful for dosemu2,
but its not part of freedos yet.
I suppose @shidel is the right
person to ask, if it can be included?

@shidel
Copy link

shidel commented May 23, 2022

Hi. While I can create an installable FreeDOS project for SBMIX and put it into our repositories. It is not up to me wether or not it gets included in the FreeDOS release. All such decisions are up to James Hall.

On a side note, I wrote such a mixer for the Sound Blaster Pro back in the early 90's as well. As I recall, the process was rather painful. It took many days of probing the I/O ports to figure it out with numerous system freezes and reboots. My version includes a command line utility. Also, I provide a <1k program loadable/embeddable driver with the functions. I publicly released my sources for it about 7 years ago to https://github.com/shidel/DustyTP7/tree/master/SBPMIXER with the driver and an executable pre-compiled in the https://github.com/shidel/DustyTP7/tree/master/bin directory.

I have know idea which would be better to include with a FreeDOS release. However, I suspect the BTTR version might be the preferred version. Mostly, because mine has not been updated in roughly 3 decades.

@stsp
Copy link
Member Author

stsp commented May 23, 2022

Thanks for info.
I checked your version and
it shows the current volume
settings. I don't see how it
can actually set the settings:
neither the tool itself nor its
sources tell me that, at all.

However, I suspect the BTTR version might be the preferred version.

Eric told me that pascal versions
are not preferred. Yours is also
pascal though, same as BTTR.

@shidel
Copy link

shidel commented May 23, 2022

It was a long time ago... Thinking back on it... At the time, I needed to be able to adjust the volume for left/right independently in the sound card for a game I was making. When I made the Mixer, it was just for testing the driver (which can and does modify such settings).

I haven't looked at the BTTR sources. But, looking at mine. Everything important to talk to the mixer chip and read/write it's settings is written using in-line assembler. So while it is technically Pascal, all that functionality can easily be ported to NASM or other assembler.

@shidel
Copy link

shidel commented May 23, 2022

Maybe I'll port mine to NASM and add the ability to change settings (not just view them). But, I have a lot on my plate. So, don't know when I would get to doing it.

@stsp
Copy link
Member Author

stsp commented May 23, 2022

I supposed that could be C. :)

@shidel
Copy link

shidel commented May 28, 2022

Well, I just ported my driver to NASM along with creating a new MIXER status program. This duplicates the functionality provided by the original PASCAL program. The PASCAL version of the status program was just under 6k. The NASM version is only 1.7k.

All that is required now is for me to get around to adding the ability for the NASM version to set them also.
Screen Shot 2022-05-28 at 6 40 14 AM

@stsp
Copy link
Member Author

stsp commented May 28, 2022

Thanks for working on this.
I am surprised that pascal-written
progs are so much discouraged.

@shidel
Copy link

shidel commented May 28, 2022

It's not that Pascal written programs are discouraged. But, programs written that use an open source compiler are preferred. That includes FPC. However for small DOS programs, FPC is not as efficient as Turbo Pascal. There are versions of TP freely available. But, it is not open source and therefore is not generally "preferred".

@shidel
Copy link

shidel commented May 29, 2022

Well. Here is a preview copy of the new NASM based mixer program. It's under 2.5k. Be sure to view the /? help screen. A couple things to note. For most volume settings, they can be provided as a single or comma separated pair. For example, /M 15 would set the MASTER volume for left and right channels to 15. However, if you want them different you can use something like /M 10,14. Also, the /R reset is performed by the mixer chip and not the program. So, not all settings get reset to default. Finally, after any changes the status screen reads settings back from the mixer and displays those (not the changes you set). SBPMIXER.zip

@stsp
Copy link
Member Author

stsp commented May 29, 2022

Thanks!
I checked and it works
perfectly for me.
Looking forward for its
inclusion into freedos. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants