VOGONS


CMS/Gameblaster Rewrite and accuracy

Topic actions

Reply 20 of 32, by Scali

User metadata
Rank l33t
Rank
l33t
OPLx wrote:

I hope it's that simple ... but I have the feeling that it won't be since the actual values sent to the frequency registers from the VGM are based off of the input clock. If I ever manage to get a chance, I might try that or something to see what works. Thank you for the suggestion! 😀

It should work, I've done something similar for a converter from ProTracker to MONOTONE, where I had to take the Amiga frequency dividers and convert them into PC speaker PIT dividers. It's the same thing really: they act on a different base frequency. Amiga is ~3.5 MHz, where PIT is ~1.19 MHz.
So just detect whenever a frequency register is written to, and correct the value.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 21 of 32, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

Historically, there are 85 known games supporting the Game Blaster, but World of SAM lists 80 games published for the SAM Coupé. I guess that makes the Game Blaster the most popular device using the SAA-1099 PSGs 😀

The base frequency for the SAA-1099s must be that of the Game Blaster (7.159MHz), not the Coupé (6MHz I think), in order for the music to sound as it should on a Game Blaster. Moreover, the Game Blaster has two SAA-1099s to the Coupé's one, so you will miss half the music if the VGM standard does not support the Game Blaster alternative.

http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog

Reply 22 of 32, by OPLx

User metadata
Rank Member
Rank
Member
Scali wrote:
OPLx wrote:

I hope it's that simple ... but I have the feeling that it won't be since the actual values sent to the frequency registers from the VGM are based off of the input clock. If I ever manage to get a chance, I might try that or something to see what works. Thank you for the suggestion! 😀

It should work, I've done something similar for a converter from ProTracker to MONOTONE, where I had to take the Amiga frequency dividers and convert them into PC speaker PIT dividers. It's the same thing really: they act on a different base frequency. Amiga is ~3.5 MHz, where PIT is ~1.19 MHz.
So just detect whenever a frequency register is written to, and correct the value.

I think I may have misread kazblox's message ... for some reason I had associated VGM playback with an emulator rather than actual hardware. The method you are talking about will definitely work on actual hardware. 😀 If I get a chance, I might try it out.

Reply 23 of 32, by OPLx

User metadata
Rank Member
Rank
Member
Great Hierophant wrote:

Historically, there are 85 known games supporting the Game Blaster, but World of SAM lists 80 games published for the SAM Coupé. I guess that makes the Game Blaster the most popular device using the SAA-1099 PSGs 😀

The base frequency for the SAA-1099s must be that of the Game Blaster (7.159MHz), not the Coupé (6MHz I think), in order for the music to sound as it should on a Game Blaster. Moreover, the Game Blaster has two SAA-1099s to the Coupé's one, so you will miss half the music if the VGM standard does not support the Game Blaster alternative.

Admittedly, I have a strong bias for the YM3812, but my interest in the SAA1099 got rekindled when I read in the application manual about the envelope generators. Creative Labs' programming document for the chips (for some strange reason) left out those particular details and (to this day) I wonder if anyone has tried to use the envelope generators on an actual Gameblaster ... I really wish I had one to test on! 🙁 I still remember when I was in high school (a LONG time ago) seeing a Gameblaster at the Radio Shack in town and not thinking much about it (since I already had a Sound Blaster) ... if I could have only seen the future! 😀

Looking at the VGM spec, there does seem to be support for multiple chips of the same kind, so perhaps it's all a matter of being able to capture the data (like DROs) and make VGMs from that.

From what I've read about the Sim Coupé, it seems that the SAA1099 is clocked separately at 8MHz. Since there is already VGM support for the SAA1099, it should be as "simple" as creating VGMs from the Sim Coupé. I have never tried to create VGMs myself though.

Reply 24 of 32, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

I do not know of any game that uses the envelope generators. The omission of the envelope generators from the official Creative documentation is inexplicable when they are documented in the data sheet. But given the contempt for which most PC music programmers must have held the card, I doubt they went out of their way to explore the hidden feature.

The chips on the Game Blaster are protected only by stickers. So in order to find more information about the chips, the programmer would have to contact Phillips, obtain a data sheet and then compare the sheet to the Creative Documentation and note the omission.

I would note that Creative also failed to describe one of the rate settings for the noise generator in its official documentation.

http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog

Reply 25 of 32, by NewRisingSun

User metadata
Rank Oldbie
Rank
Oldbie
OPLx wrote:

I really wish I had one to test on!

I have a Sound Blaster 1.x with CMS chips installed, so if you want me to record your tests, I will. Just make sure your test program does not require 386 instructions, because the computer in which the SB card is installed is a Tandy 1000 TX, whose CPU is an 80286.

Reply 26 of 32, by OPLx

User metadata
Rank Member
Rank
Member
Great Hierophant wrote:

I do not know of any game that uses the envelope generators. The omission of the envelope generators from the official Creative documentation is inexplicable when they are documented in the data sheet. But given the contempt for which most PC music programmers must have held the card, I doubt they went out of their way to explore the hidden feature.

The chips on the Game Blaster are protected only by stickers. So in order to find more information about the chips, the programmer would have to contact Phillips, obtain a data sheet and then compare the sheet to the Creative Documentation and note the omission.

I would note that Creative also failed to describe one of the rate settings for the noise generator in its official documentation.

Maybe one of these days there will be a "behind the scenes" interview where someone will reveal the drama behind the concealment of the chips and also why the envelope generators where never documented! 🤣

Reply 27 of 32, by OPLx

User metadata
Rank Member
Rank
Member
NewRisingSun wrote:
OPLx wrote:

I really wish I had one to test on!

I have a Sound Blaster 1.x with CMS chips installed, so if you want me to record your tests, I will. Just make sure your test program does not require 386 instructions, because the computer in which the SB card is installed is a Tandy 1000 TX, whose CPU is an 80286.

Thank you! I will keep that in mind! I have a Sound Blaster 1.5 with SAA1099's installed, but I'm using a Pentium III/450 MHz machine (using 8086 instructions though). I just need to dedicate some time and get some things cleaned up; too many irons in the fire at the moment. 🙁

Reply 28 of 32, by James-F

User metadata
Rank Oldbie
Rank
Oldbie

Using the CMS440 software by Jepael that generates a 440Hz signal, I we can test the CMS frequency.
DOSBox CMS frequency emulation is FAR from being accurate.

The real CMS generates a 440Hz signal, distorted but frequency accurate, as it should.
DOSBox generates 492Hz signal when it should be 440Hz, so something is definitely off in the emulation.

People fuss about 1Hz when comparing YMF289 vs YMF262 OPL3 chips but this is not a 1Hz difference, this is a huge clearly audible difference, a completely different pitch/note.
This is true as of the latest SNV 3995 of this date.

Real SB 2.0 with CMS by Jo22:

sb2 cms.png
Filename
sb2 cms.png
File size
124.24 KiB
Views
677 views
File license
Fair use/fair dealing exception

DOSBox CMS:

D CMS.png
Filename
D CMS.png
File size
129.18 KiB
Views
677 views
File license
Fair use/fair dealing exception

Attachments

  • Filename
    cms440.zip
    File size
    824 Bytes
    Downloads
    33 downloads
    File comment
    Generates a 440Hz tone using the CMS chip.
    File license
    Fair use/fair dealing exception


my important / useful posts are here

Reply 31 of 32, by DOSUserDude

User metadata
Rank Newbie
Rank
Newbie

Still no incorporation of this patch/fix into SVN?

MAME and SCUMMVM have incorporated it already...

Maybe when the SBPro stereo reverse "reversion"/etc changes are made ..this is made as well...eh?