VOGONS


Reply 80 of 325, by root42

User metadata
Rank Oldbie
Rank
Oldbie

Ok, sounds reasonable. With the C/MS it would at least be nice to get stereo support. Not sure if mixing in software is for example faster than writing out the bytes to the card's I/O port.

Soldering, retro game reviews and more on YouTube and Bonus videos
80386DX@25 MHz, 8 MiB RAM, Tseng ET4000 1 MiB, Jazz16, PC MIDI Card + SC55MkII + MT32, XT CF Lite, OSSC 1.6

Reply 81 of 325, by Scali

User metadata
Rank l33t
Rank
l33t
root42 wrote:

Ok, sounds reasonable. With the C/MS it would at least be nice to get stereo support. Not sure if mixing in software is for example faster than writing out the bytes to the card's I/O port.

Yea, that could be a thing. I know the SN76489 is quite slow with writes. I believe it's about 42 CPU cycles at 4.77 MHz. If the SAA1099 is similar, it would be a problem to do many channels.
PC speaker is only 4 CPU cycles, so that would be much better.
AdLib is another special case, because the write itself is fast, but you need to wait until the chip has finished processing, which requires many cycles of delay. In place of the delay, you could perform software mixing 'for free'.

scalibq.wordpress.com/just-keeping-it-r ... ogramming/

Reply 82 of 325, by FreddyV

User metadata
Rank Member
Rank
Member

Hi,

@Root42 : The sound quality is much better with volume adjusted to the maximum, as it is based on pre calculated volume tables.
I am currently adding BlasterBoard detection code, increase frequency limit in the code
Will post it today I hope so that you can try again (And re upload the new Video ? )

@Scali
Of course I know, I did it in 1992, the First support was PC Speaker 😀
PC Speaker and Adlib support were present. Disabled for the moment as I have redone the COVOX/IRQ code to speed it up a lot.
I will put back speaker soon.

But I did not want to put back Adlib, as the sound quality is really bad.
If we can afford an Adlib, we can afford a COVOX/DAC…

It is long to redo all the code to add more output so I wanted to use the Adlib variables for this.

For C/MS and Tandy, it is the same, COVOX is so cheap and much better… 😉

Reply 83 of 325, by root42

User metadata
Rank Oldbie
Rank
Oldbie

Still: C/MS is stereo and would give that card more work to do. 😀

Soldering, retro game reviews and more on YouTube and Bonus videos
80386DX@25 MHz, 8 MiB RAM, Tseng ET4000 1 MiB, Jazz16, PC MIDI Card + SC55MkII + MT32, XT CF Lite, OSSC 1.6

Reply 84 of 325, by Scali

User metadata
Rank l33t
Rank
l33t
FreddyV wrote:
@Scali Of course I know, I did it in 1992, the First support was PC Speaker :) PC Speaker and Adlib support were present. Disabl […]
Show full quote

@Scali
Of course I know, I did it in 1992, the First support was PC Speaker 😀
PC Speaker and Adlib support were present. Disabled for the moment as I have redone the COVOX/IRQ code to speed it up a lot.
I will put back speaker soon.

Yea, but I don't know how it sounds yet 😀
One trick you could do is to add a sort of logarithmic scale to the translation table, to create a simple loudness/compression effect. It will make the PC speaker sound louder, so the audio will be easier and more clear on an actual speaker inside a case (there is little point in trying to preserve the dynamic range of the music, because the speaker is so soft anyway, and has very limited dynamic range... Most of the soft details would get lost in background noise from PSU and harddisk, and quantization noise because of the low precision).

scalibq.wordpress.com/just-keeping-it-r ... ogramming/

Reply 86 of 325, by Scali

User metadata
Rank l33t
Rank
l33t
FreddyV wrote:

It sounds great under DosBox

Dosbox uses a hack: it detects when the PC speaker is switched into 'PWM mode', and then just interprets all data as PCM data.
It's absolutely NOT representative of how a real speaker sounds, and especially will not distort in the same way a real PC speaker does when the table is not correct.

scalibq.wordpress.com/just-keeping-it-r ... ogramming/

Reply 87 of 325, by FreddyV

User metadata
Rank Member
Rank
Member

Ok 😀 Really bad DosBox.

Here is something to Test for Root42.
I added the BlasterBoard detection. Tell me if there is a version number displayed in the startup screen.
Then, you can increase the mix frequency to 48KHz
It is the Max before I need to change more code.
If the BlasterBoard detection is Ok and you really want more, I can increase.

Then, 2ND_PM is now Ok

Filename
MODMXT5.zip
File size
72.61 KiB
Downloads
11 downloads
File license
Fair use/fair dealing exception

Reply 88 of 325, by LABS

User metadata
Rank Member
Rank
Member

It's detected. Cool 😀

IMG_0801.resized.JPG
Filename
IMG_0801.resized.JPG
File size
86.55 KiB
Views
284 views
File license
Fair use/fair dealing exception

Set the frequency to 48Khz

16.07.2019, 18 55 39.jpg
Filename
16.07.2019, 18 55 39.jpg
File size
145.33 KiB
Views
284 views
File license
Fair use/fair dealing exception

However it is 45400Hz in the playback screen

16.07.2019, 18 54 08.jpg
Filename
16.07.2019, 18 54 08.jpg
File size
46.43 KiB
Views
284 views
File license
Fair use/fair dealing exception

BLASTERBOARD: a DIY SB2.0-compatible sound card on ATmega328P microcontroller

Reply 89 of 325, by root42

User metadata
Rank Oldbie
Rank
Oldbie

Well, this version doesn't work at all on my 386. MODs still won't load, 2nd reality loads, but then it won't play, but simply is stuck.

EDIT: It autodetects the wrong IRQ. BLASTER variable is correct though:

Bildschirmfoto 2019-07-16 um 21.02.43.png
Filename
Bildschirmfoto 2019-07-16 um 21.02.43.png
File size
224.29 KiB
Views
271 views
File license
Fair use/fair dealing exception

Soldering, retro game reviews and more on YouTube and Bonus videos
80386DX@25 MHz, 8 MiB RAM, Tseng ET4000 1 MiB, Jazz16, PC MIDI Card + SC55MkII + MT32, XT CF Lite, OSSC 1.6

Reply 90 of 325, by 640K!enough

User metadata
Rank Oldbie
Rank
Oldbie

That's not really what you were aiming for, but I decided to try it on my test machine to see how it would work with an InterWave-based GUS. To start with, it didn't work at all, but the problem was familiar. It is because my machine is too fast, and causes trouble with the old Turbo Pascal 7 run-time. It sometimes helps to apply a patch to correct the run-time, which I tried. That got Mod Master running, and it found the board as a GUS and was able to use it to play some files. However, certain files (like GUITAR.MOD) still cause a "Run-time error 200", and I am unceremoniously dumped back to DOS.

When it works, playback quality is decent, but still noticeably inferior to Inertia Player or even the standard InterWave PLAY.EXE (which seems to be based on MikMod for tracker support). Much like those players, Ultra Tracker playback is often not quite right, and FAR files like "Thunder Dream" play back at the wrong speed. Given the timing problems with my machine, however, I can't say that that isn't playing a part. Unless you really want to restrict it to pre-Pentium machines, you may want to look into patching your run-time at the source code level and re-building (or maybe even writing your own timing routines and skipping the Borland run-time versions altogether).

Reply 91 of 325, by MobyGamer

User metadata
Rank Member
Rank
Member
Scali wrote:

Yes, that should be possible. The trick for playing samples only takes one channel. You have 12 channels in total, so in theory you can play 12 samples at a time.

As entertaining as this idea is (especially since the CMS is stereo), port writes to the card are not free. Assuming they have the same timing as writes to PIT channel 2 port 42h, and assuming an 8088 as the baseline, playing a 4-channel MOD at 8KHz would require 32 KHz-worth of port writes. The most I've ever been able to do on 8088 that was IRQ-paced was 29KHz, and that relied on some highly impractical tricks (like disabling the stack). So as fun as this is to talk about, it's not really a viable option. Maybe mixing to two stereo channels, and using two CMS voices to output the result, might be viable, but it's not optimal and 22KHz Mono out of a soundblaster (how most people are going to test CMS code anyway) sounds way better.

Reply 92 of 325, by MobyGamer

User metadata
Rank Member
Rank
Member
Scali wrote:

AdLib is another special case, because the write itself is fast, but you need to wait until the chip has finished processing

Not for the sample trick. You can write volume changes to one channel's volume register at full speed without any waiting or delays.

Reply 93 of 325, by root42

User metadata
Rank Oldbie
Rank
Oldbie

I was actually surprised how good Pinball Fantasies sounds on Adlib.

Soldering, retro game reviews and more on YouTube and Bonus videos
80386DX@25 MHz, 8 MiB RAM, Tseng ET4000 1 MiB, Jazz16, PC MIDI Card + SC55MkII + MT32, XT CF Lite, OSSC 1.6

Reply 94 of 325, by FreddyV

User metadata
Rank Member
Rank
Member

Wow, thanks for all these tests.
Difficult to answer to all 😀

It needs some time to understand how Mod Master Works 😀
Here I have a 486, Pentium 3, 8086, 8088, DosBox and various sound cards but I can't test on everything so your tests are nice for me.

However it is 45400Hz in the playback screen

LABS, This is surely because you changed the mixing frequency for the file.
If you press the right/left keys on the file selector, it changes the frequency for one file. In the output menu, this is the default value.
Using TAB, you can see the frequency configured for a file.
To use the default value, You need to have the 'd' displayed next to the file frequency.
Press delete to change between the default and custom value.

Well, this version doesn't work at all on my 386. MODs still won't load, 2nd reality loads, but then it won't play, but simply is stuck.
EDIT: It autodetects the wrong IRQ. BLASTER variable is correct though:

@Roots42 : I reproduced the bug, it is because you forgot to put the Type parameter (T)
It seems you found a 27 Years old bug, simple to correct.
You can anyway change/Correct the IRQ in the output menu or correct the variable. (Add T3)

In case of doubt, if you use another version or change something in the HW Config, delete the MODM.CFG file.

I don't understand the problem you have with mod, I never had this problem.
Did you try with Covox Output or another frequency ? With EMS and UMB Disabled ?
Or send me your computer 😀

That's not really what you were aiming for, but I decided to try it on my test machine to see how it would work with an InterWave-based GUS.
To start with, it didn't work at all, but the problem was familiar. It is because my machine is too fast, and causes trouble with the old Turbo Pascal 7 run-time.

I know, it is Mod Master XT 😀
I will try to patch it before the next releases.

When it works, playback quality is decent, but still noticeably inferior to Inertia Player or even the standard InterWave PLAY.EXE (which seems to be based on MikMod for tracker support).

I developped this player mainly in 1993/1995 and corrected some replay bugs these months. (In 1994:1995, I had 16h of mathematics and 16hours of Sciences courses per week + 3 exams per week, so few time)
I made another much more performant player after this one, but in 32bit ASM: impossible to port to XT (That is my target here, XT to 386)
To play modules on a 486+, of course, you should use another player 😀

Anyway, nice that you test it and your feedbacks are appreciated.
Can you be more specific ? Do you have files name working better on inertia and a description of the problem ?

I should start to do a known bug list, as during the modification of my player these months, I broke the Arpeggio on samples with FineTune and broke the min/max period limit.
I am changing this all to reduce the partition size and increase the speed (Yes I still want to go faster)

Do a player is complex as all the tracker has bugs.
I discovered this Week that FT2 and ST3 do not play the Arpeggio in the same way.
Then, to play modules correctly, we need to know and Support all these bugs. I did it more or less in USMPlay, not in Mod Master.
If we correct something for one module, we may break something in another module. Not simple at all...

Much like those players, Ultra Tracker playback is often not quite right, and FAR files like "Thunder Dream" play back at the wrong speed.

I discussed this already with Trixter in this thread. These format were not my priority as I only had few music and these format are rare.
These format were made for Gravis Ultrasound and I did not expect to have it working on XT machines 😀

@MobyGamer/ You confirm what I wrote about C/MS, Adlib and so on. These are devices for low end XT and even with Covox, that is the faster device with direct DAC I/O, it is not that fast.
The other devices requires more I/O or more time and their sound quality is much lower. It can be fun to try, but I don't have all these hardware and the result may be disapointing.

My current adlib code is this one.

        MOV DX,388h
MOV AL,43h ;Porteuse de la voie 1
OUT DX,AL
IN AL,DX
IN AL,DX
IN AL,DX
IN AL,DX
IN AL,DX
IN AL,DX

INC DX
POP AX
MOV BX,OFFSET T_Adlib
XLAT ;Lire la table Log
OUT DX,AL ;AL, Niveau total

Select the registry, wait, send the value.
It can be surely improved by doing the registry selection first. Then in the IRQ: Send the value, select the registry and don't wait.
My code was done for 486, I need to redo more or less everything now.
Also, Remove adlib code save me almost 2Kb I can better use to speedup the Mixing for example.

And, I prefere to work on the Amiga 500 idea rather than C/MS 😀

Reply 95 of 325, by FreddyV

User metadata
Rank Member
Rank
Member

Hi again,
I made a too long post, nobody answer 😀

I tested the COVOX on the Amstrad 1640 and there are sound cut/Slow down, something wrong with the IRQ I suppose 🙁
It can mix up to 9KHz quite correcly, there are problems after that.

Reply 96 of 325, by root42

User metadata
Rank Oldbie
Rank
Oldbie

I didn't have time to test again, but will fix my BLASTER variable and re-test in the next couple of days.

Soldering, retro game reviews and more on YouTube and Bonus videos
80386DX@25 MHz, 8 MiB RAM, Tseng ET4000 1 MiB, Jazz16, PC MIDI Card + SC55MkII + MT32, XT CF Lite, OSSC 1.6

Reply 97 of 325, by 640K!enough

User metadata
Rank Oldbie
Rank
Oldbie

I don't have time to go over all of the files I tested again, but one example of a file that doesn't sound quite right is FOUNTAIN.MOD. If you compare the first 30 seconds or so, you'll hear the difference.

There is also a perceived clarity difference between Mod Master and almost every other GUS MOD player. There may be other factors or peculiarities of your implementation, but I think increasing the default playback volume would be a good start. On GUS, 75% seems like a safe bet. Some players also seem to scan the file to find the highest playback volume that can be used without clipping, and apply an appropriate level of amplification. With other cards, that may not be feasible on an 8088, especially if you're doing all mixing at 8-bit.

Reply 98 of 325, by FreddyV

User metadata
Rank Member
Rank
Member

Hi,

I found a problem on the volume.
I hear that when I used headsets to test. Volume was divided by 2, then it used only 33 Values instead of 65.
It was due to a change done for Sound Blaster MOD.

Reply 99 of 325, by root42

User metadata
Rank Oldbie
Rank
Oldbie

Ok, fixed my BLASTER variable and redid Unreal ][:

https://youtu.be/uO47sougqUw

I still can't load MOD files though. No idea why. I will try some more MOD files.

EDIT: downloaded two more random MOD files. No chance. Same error. It will not load MOD files on my machine. S3M is fine, but no MOD.

Soldering, retro game reviews and more on YouTube and Bonus videos
80386DX@25 MHz, 8 MiB RAM, Tseng ET4000 1 MiB, Jazz16, PC MIDI Card + SC55MkII + MT32, XT CF Lite, OSSC 1.6