Author Topic: Sierra had keys to control sound volume in Tandy  (Read 128 times)

0 Members and 1 Guest are viewing this topic.

Offline ZvikaZ

Sierra had keys to control sound volume in Tandy
« on: April 04, 2021, 06:15:20 AM »
Maybe it's a known fact, but I just discovered that today, so, wanted to share...

I have always thought that in AGI the sound is either turned on, or off.

However, WinAGI help says:
Quote
v23: Sound Attenuation

For Tandy systems, this variable is used as a global volume control

OK, having a global volume control is great, but how does the user control it?

Well, I have found this at PQ1: (I assume it's similar for other games as well...)

Logic101:
Code: [Select]
if (machineType == TANDY)
  {
  set.key(61, 0, c38);
  set.key(45, 0, c39);
  set.key(43, 0, c38);
  }

and Logic0:
Code: [Select]
if (machineType == TANDY)
  {
  if (controller(c38))
    {
    --attenuation;
    }
  if (controller(c39) &&
      attenuation < 15)
    {
    ++attenuation;
    }
  }

i.e., if the machine is Tandy, then the user can press '-' to increase attenuation (= decrease volume), and '+' (or '=', which are on the same key) to decrease attenuation (= increase volume).

ScummVM already supports PCjr sound emulation, which as far as I remember should be similar to Tandy, (is it possible with DOSBox? I have never tried...), however, it currently doesn't have a PCjr or Tandy computer types:
Code: [Select]
enum AgiComputerType {
kAgiComputerPC = 0,
kAgiComputerAtariST = 4,
kAgiComputerAmiga = 5, // Newer Amiga AGI interpreters' value (Commonly used)
kAgiComputerApple2GS = 7,
kAgiComputerAmigaOld = 20 // Older Amiga AGI interpreters' value (Seldom used)
};

Compared to the types in WinAGI help:
Quote
Value Computer Type
0 IBM PC compatibles
1 IBM PCjr
2 Tandy 1000
3 Apple IIe, IIc
4 Atari ST
5 Amiga
6 Macintosh
7 Cortland*
8* PS2 with MCGA

It's interesting that these two lists don't perfectly much each other. WinAGI help explain that 'Cortland' is actually 'Apple IIgs'. ScummVM is missing PCjr, Tandy, Apple IIe/c, Macintosh and PS2 - I assume because they aren't supported. However, WinAGI help is missing '20 // Older Amiga AGI interpreters' value (Seldom used)'.

So:
- Sierra added volume control keys to Tandy. Was it a known fact?
- Why didn't they add volume control keys to other platforms that had better-than-PC-speaker sound device?
- Maybe the Older Amiga machine type should be added to WinAGI help?
- What were the differences between the Tandy and a regular PC, besides improved music? In other words, is it a good idea to set machine type for Tandy (2) in ScummVM, instead of PC (0)? 'grep'ping in PQ1 source code shows that it's harmless, but that's not enough indication to make such a change...

I have tried my last idea, with KQ2 (because of the sea sounds at the beginning which are great for volume tests), and '+' and '-' really change the volume. Cool!
('=' doesn't work, because in KQ2 it's saved for swimming)

However, another strange thing is that these keys don't appear in the menu, or in the in game help.
« Last Edit: April 04, 2021, 07:21:34 AM by ZvikaZ »



Offline AGKorson

Re: Sierra had keys to control sound volume in Tandy
« Reply #1 on: April 05, 2021, 12:28:18 AM »
I think this is pretty much well known in the AGI community. Support for volume control has been included in template games going back to the early AGI Studio days.

I have not tested on original hardware, but using DOSBox, (while writing the first versions of WinAGI) I confirmed that both PCJr and Tandy do in fact control sound by using reserved variable v23. I assume that the DOSBox implementation of the Tandy and PCJr machines is accurate. You can easily test this by creating a template game, and set platform to DOSBox, and then use platform command line switch option to use "-machine pcjr" or "-machine tandy". I never had access to any other platforms or game files for testing (Amiga, Apple, Atari, PS2), so I only included information that I learned from other sources, mostly from the source code provided here over the years.

I don't know for certain if any Sierra games included sound volume control for any machine types other than Tandy, but as I said, I do know it works for PCJr as well. I would assume it would also work for some of the other platforms, but again, I've never been able to test it.

I have never heard of machine type 20 being referred to as 'AmigaOld'; that's a new one to me. (I never spent a lot of time with ScummVM; I always preferred NAGI when I needed a modern AGI engine (and I usually prefer to use the original Sierra binaries in DOSBox anyway). If someone has some more definitive information to confirm it, I don't mind adding it to the help file for completeness.

As far as differences between Tandy and 'regular PC', the binary files are the same; when AGI loads on either platform, after determining the type of machine its running on, the same graphics overlays get loaded for both machines; in the binaries, there are separate functions in various places where graphics are handled that use the appropriate video control codes and interrupts to correctly display images. But at the AGI resource level, there are no differences. Sound is handled the same way; internally, the interpreter uses different functions to handle playback of sound depending on which machine type is present even though the same program and overlay files are used on both systems.

It is strange that they (Sierra) didn't include the sound controls in their help screens. The template files do.





Offline OmerMor

Re: Sierra had keys to control sound volume in Tandy
« Reply #2 on: April 05, 2021, 10:18:55 AM »
I have never heard of machine type 20 being referred to as 'AmigaOld'; that's a new one to me. (I never spent a lot of time with ScummVM; I always preferred NAGI when I needed a modern AGI engine (and I usually prefer to use the original Sierra binaries in DOSBox anyway). If someone has some more definitive information to confirm it, I don't mind adding it to the help file for completeness.

ScummVM documents the following:
Quote
Code: [Select]
* At least these Amiga AGI versions use value 20:
 * 2.082 (Space Quest I v1.2 1986)
 * x.yyy (Manhunter NY 1.06 3/18/89)
 * 2.333 (Manhunter SF 3.06 8/17/89)

It was added by Kari Salminen and Travis Howell back in 2008-2009.

Offline AGKorson

Re: Sierra had keys to control sound volume in Tandy
« Reply #3 on: April 05, 2021, 10:51:02 PM »
Cool, thx.  I'll include this in the next update of the help file.


SMF 2.0.14 | SMF © 2017, Simple Machines
Simple Audio Video Embedder

Page created in 0.095 seconds with 23 queries.