Commit Graph

101 Commits

Author SHA1 Message Date
Torbjörn Andersson
f0c1d8dcc4 SCUMM: Add hack to preserve savegame compatibility with Mac MI1
For old savegames, we now use a "dummy" iMUSE objet to skip the old
iMUSE save state. I had hoped to be able to do this without making
any changes to the iMUSE code itself, but I was unable to.

Also added note about how the save state for the new music will not
quite work if the mixer output rate changes. Personally, I'm not
too worried about that. It breaks, but it shouldn't break badly.
2012-11-16 07:49:17 +01:00
Johannes Schickel
01a458f8f2 SCUMM: Add check for resource fork for ".iMUSE Setups".
This should help identify incorrect dumps/file naming like what (probably)
happened in bug #3570973
"FOA: Doesn't start anymore after adding Mac sound support".
2012-09-23 21:12:06 +02:00
Matthew Hoops
b105104534 SCUMM: Update comments 2012-09-20 12:00:13 -04:00
Matthew Hoops
2a9d98003e SCUMM: Restrict the Mac m68k v5 driver to MI2/Indy4
Shouldn't be used with MI1
2012-09-20 11:58:04 -04:00
Matthew Hoops
fc6ab89b50 SCUMM: Add support for Indy4 Mac 68k sound 2012-09-20 11:48:00 -04:00
Johannes Schickel
6ea51e8c45 SCUMM: Implement support for special sfx in MI2 Mac.
This also increases the savegame version, since it introduces a new
Instrument subclass.
2012-09-20 02:13:03 +02:00
Johannes Schickel
58f542d434 SCUMM: Implement support for Monkey Island 2 Mac music.
This is a initial RE of the audio output Monkey Island 2 Mac uses. Support
for special sound effects is not in there yet.
2012-09-20 02:12:41 +02:00
Johannes Schickel
6c9f9f8356 SCUMM: Extend comment about SysEx manufacturer 0x97. 2012-09-20 01:59:51 +02:00
Willem Jan Palenstijn
9e4d3234c5 SCUMM: Revert "Removed a duplicate variable assignment"
This reverts commit 747ebffd17,
and adds a FIXME.
2011-11-04 10:04:42 +01:00
Filippos Karapetis
747ebffd17 SCUMM: Removed a duplicate variable assignment 2011-11-04 00:42:38 +02:00
Johannes Schickel
a07908a001 SCUMM: Fix typo in PC Speaker output. 2011-08-21 22:00:22 +02:00
Christoph Mallon
23a0f5318c JANITORIAL: Remove trailing empty lines. 2011-08-07 13:53:33 +02:00
Johannes Schickel
482fcea8f3 SCUMM: Add debug output in case the code tries to set up a non-existant iMuse instrument. 2011-07-14 01:09:47 +02:00
Johannes Schickel
f814dc971c SCUMM: Handle default instrument set up in iMuse like the original. 2011-07-14 00:49:32 +02:00
Johannes Schickel
9565af1ae4 SCUMM: Implement iMuse alloc part command closer to the original. 2011-07-14 00:49:32 +02:00
Johannes Schickel
25c0f0a772 SCUMM: Adapt iMuse code formatting to our standards. 2011-07-11 22:53:41 +02:00
Johannes Schickel
4ee228bb16 SCUMM: Fix some envelope bugs in PC Speaker output. 2011-07-10 19:23:59 +02:00
Johannes Schickel
5f5daadedb SCUMM: Let PC Speaker output be controlable via music volume. 2011-07-10 18:14:42 +02:00
Johannes Schickel
adb2bbbb59 SCUMM: Properly implement volume controler for PC Speaker output. 2011-07-10 18:06:33 +02:00
Johannes Schickel
5edb6f9e4a SCUMM: Fix priority settings in iMuse allocate part sysEx command.
Formerly we ever only used the lower 4 bit of the priority setting for a new
part. The original used a full 8 bit setting though (based on the Indy4 PC
Speaker output driver). This fixes missing notes in the Indy4 intro with PC
Speaker output.

This might affect other outputs too! And could cause regressions in case other
outputs implemented priority settings differently.
2011-07-10 17:58:41 +02:00
Johannes Schickel
781b7215c4 SCUMM: Fix PC Speaker sound.
Now we only output a new frequency if a new channel was selected or a new
output frequency has to be send. This makes the sound much more like in
DOSBox. This is not present in the original, but since our timings are
different this should make up for that.
2011-07-10 17:42:02 +02:00
Johannes Schickel
fb4ed2224f SCUMM: Minor clean up in iMuse instrument handling code. 2011-07-10 05:28:20 +02:00
Johannes Schickel
abbd29b16a SCUMM: Limit iMuse default instrument load to PC Speaker output.
Albeit the code is marked as a hack inside the source, the original behaved
exaclty the same. If the code is removed the PC Speaker output will miss notes,
since unlike the original we only output to parts, which have an instrument set
up.
2011-07-10 05:21:25 +02:00
Johannes Schickel
0a94fc5b7b SCUMM: Only try to load MT-32 instruments when we have a MIDI output in iMuse.
This fixes the melody in Indy4's intro with the PC Speaker output.
2011-07-10 05:13:03 +02:00
Johannes Schickel
bf4091931d SCUMM: Implement effect envelope for PC Speaker output in SCUMM v5. 2011-07-10 04:54:07 +02:00
Johannes Schickel
ed993e6350 SCUMM: Initial PC Speaker output implementation for SCUMM v5.
This is *not* complete yet.
2011-07-08 04:45:01 +02:00
Johannes Schickel
3f04ad72a9 SCUMM: Remove unused operator int. 2011-07-03 22:22:04 +02:00
Max Horn
88913c0139 ALL: Remove trailing whitespaces
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
  git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-06-20 00:59:48 +02:00
athrxx
1ca44c076c SCUMM: fix possible portability issue 2011-06-15 00:10:55 +02:00
athrxx
3d42141e9d SCUMM: implement some missing (very low relevance) imuse code
1) Don't skip transpose setting in sysex command 0. There are only a few sounds where this setting is used (mainly sfx).

2) Make MI2 and INDY4 read certain player start parameters from the sound resource. The start parameters usually  match our default parameters (exception: e.g. LeChuck's Fortress). The use of these parameters has been dropped in DOTT (they use default parameters like we do).
2011-05-29 01:03:55 +02:00
athrxx
baaae9d97a SCUMM: Add missing imuse feature
This adds an extra detune parameter which is assigned via sysex code 0.
Most tracks don't use this (= assign a value of 0), so it isn't really a
very noticeable feature.
2011-05-17 20:36:32 +02:00
athrxx
5fd257d3cc SCUMM: fix regression 2011-05-16 18:04:40 +02:00
athrxx
6fd78858d7 SCUMM: formatting 2011-05-16 00:41:57 +02:00
athrxx
0001b7a12b SCUMM: fix imuse bugs #1315950 and #761637
- Revert guesswork fix for bug #761637 which caused bug #1315950
- Add missing clear_queue() call to stopAllSounds_internal(). This is taken from INDY4 / MONKEY2 disasm. Someone with a SAMXMAX or DOTT disasm might want to check whether this is correct for these targets, too.
- Old FOA savegames saved after the Dr. Ubermann death scene (= during the ending sequence) will still be bugged, since the messed up imuse trigger/command queue gets restored from the savegame.
2011-05-15 23:23:10 +02:00
Max Horn
9ec64a66fe SCUMM: Turned ResTypeData into a Common::Array<Resource>, subsuming its _resource member 2011-05-13 14:48:01 +02:00
Max Horn
c02420df43 SCUMM: Add a Resource class, refactor res code around it 2011-05-13 11:47:13 +02:00
Max Horn
75b9deb185 SCUMM: Get rid of the MemBlkHeader hack
This uncovered at least one potentially serious bug in the inventory
code, which still needs to be investigated and fixed.
2011-05-13 11:47:10 +02:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Ori Avtalion
9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Max Horn
0ce2ca4e00 COMMON: Replace MKID_BE by MKTAG
MKID_BE relied on unspecified behavior of the C++ compiler,
and as such was always a bit unsafe. The new MKTAG macro
is slightly less elegant, but does no longer depend on the
behavior of the compiler.
Inspired by FFmpeg, which has an almost identical macro.
2011-04-12 16:53:15 +02:00
Max Horn
29847ea42d AUDIO: Change several fake MidiDrivers to MidiDriver_BASE subclasses
Many engines follow the advice in audio/midiparser.h and create a
"pseudo-MidiDriver" subclass. But MidiParser really only needs a tiny
subset of the MidiDriver capabilities, namely those found in
MidiDriver_BASE. So we try to subclass from that whenever possible; this
allows us to remove many stub methods, and enables further future
simplifications.
2011-03-23 15:25:47 +01:00
Max Horn
756f592b61 SCUMM: Remove unused iMuse MIDI 'passthrough' code 2011-03-23 15:25:46 +01:00
Max Horn
8982fff1b7 AUDIO: Add pure virtual MidiDriver::isOpen() method
This in turn enables modifying MidiDriver_MPU401::close() to allow
it to be called on a midi driver that has not yet been opened.

The specific issue that triggered me to make these changes was a
crash-upon-quit in HUGO, caused by it instantiating a midi driver,
then encountering an error (missing hugo.dat) *before* having
opened the new midi driver; the general cleanup code then tries
to close the (not yet opened) midi driver -> kaboom

Also fixed some engines which were leaking MidiDriver instances.
2011-03-22 23:51:47 +01:00
Max Horn
42ab839dd6 AUDIO: Rename sound/ dir to audio/
svn-id: r55850
2011-02-09 01:09:01 +00:00
Johannes Schickel
b36b7ee349 SCUMM: Fix GM initialization when "enable_gs" is set.
This is a regression from r25630, which caused the code to send some garbage
data to the GS device, which resulted in some devices to fail with an
"Address Error." (like the Roland SC-55).

This might also fix bug #1927501 "GS option is broken". Even though actually
the device there failed with another error it is likely to be caused by the
same code. At least it is the only iMuse MIDI code change between 0.9.0 and
0.12.0, which might result in such a problem.

svn-id: r54727
2010-12-01 23:55:10 +00:00
Max Horn
e27b05ef35 COMMON: Rename String::printf() to String::format()
This is a first step towards getting rid of all uses of regular printf,
fprintf, vprintf, vfprintf, puts, fputs, etc. in our codebase.

The name format() reflects the purpose of the function, and parallels
String.format() in Java, boost::format, and others.

svn-id: r54004
2010-11-01 16:02:28 +00:00
Florian Kagerer
a48e19eaef SCUMM: minor cleanup
svn-id: r52792
2010-09-18 11:26:10 +00:00
Florian Kagerer
29a5c6a45b SCUMM/FM-TOWNS: start rewriting audio code
- Start rewriting audio code for FM-TOWNS versions of Loom, Indy3 and Monkey Island 1 using the recently added code in towns_audio.cpp (Zak should work the same way, but I can't test, since I don't own that one).
- All sound types (pcm, euphony and cd audio) now support volume and balance control (e.g. try walking into/out of the kitchen and opening/closing the door in the Scumm Bar in Monkey Island 1 or walking into/out of the circus tent).
- Pcm sounds now support proper loop start/end and note offsets (e.g. try out the hammer sound in the forge in LOOM for example).
- some other minor improvements
- The FM-Towns versions of Indy 4 and Monkey Island 2 are not affected. I don't have Monkey Island 2, but I presume that it will work like Indy 4. Adding support for these will be a separate task, since they work quite differently.

svn-id: r52198
2010-08-18 21:38:43 +00:00
Jordi Vilalta Prat
9255d7c3cb Remove some extra spaces
svn-id: r49489
2010-06-07 17:18:25 +00:00
Johannes Schickel
0d995c5920 Rename all "Adlib" uses to "AdLib" to match the real name of the sound card / company.
Check this for reference:
http://en.wikipedia.org/wiki/Ad_Lib,_Inc.
http://www.crossfire-designs.de/images/articles/soundcards/adlib.jpg (note the upper left of the card)

This commit does not touch "adlib" and "ADLIB" uses!

Also it does not update all the SCUMM detection entries, which still use "Adlib".

svn-id: r47279
2010-01-12 21:07:56 +00:00