Commit Graph
77 Commits
Author SHA1 Message Date
Filippos Karapetis bd7e708fc3 SCI: Move resource related functionality into a separate folder 2020-11-29 14:34:55 +02:00
NMIError 7857df2ea9 MIDI: MT-32 / GM driver
This adds a new MidiDriver subclass with functionality
for MIDI based devices like the MT-32 and GM devices
or emulators.
2020-11-28 17:59:15 +00:00
Walter van Niftrik c8293df572 SCI: Add Roland D-110/D-10/D-20 support 2020-08-27 14:56:17 +02:00
Zvika Haramaty 6006cfee3e SCI: MIDI - don't send "controller 75" to physical device
Sierra used MIDI controller 75 for internal purposes, and it shouldn't
be issued to the real MIDI device.
This fixes issue #11409
2020-04-20 18:55:09 +02:00
Zvika Haramaty 5ab4185257 SCI: using only channels 1-8 on GM devices
There are many situations that GM sounds worse than MT, even for games
that were written for GM.
I think this is related to this.
And, there is a note in midi.cpp:
// NOTE: SSCI uses channels 1 through 8 for General MIDI as well, in the drivers I checked

Also, issue #6686 reports that using the "higher" channels causes
problem on a real SC-55.

This change solves at least: #6686, #9735 and #10297
2020-02-19 08:08:40 +02:00
NMIError b2468d9442 SCI/MIDI: GS drumkits - comments and re-usability
- Move the GS drumkit fallback map to generic audio code for re-use
- Added comments and debug message
2020-02-16 13:33:45 +02:00
NMIError 65f85a232d SCI: Add support for Roland GS drumkits
This adds support for the Roland GS drumkits used by SQ5 and QfG3.
The original Sierra GM driver does not pass the drumkit select MIDI
messages to the GM device, but they do exist in the MIDI data.

Another issue is that the drumkit numbers used are incorrect. This
does work on the original Roland SC-55 devices because they correct
the drumkit numbers. Later devices do not do this. Code has been
added to correct these wrong drumkit numbers.
2020-02-16 13:33:45 +02:00
sluicebox 1e3bd598ba SCI: Remove MIDI driver timer before closing
Fixes bug #10374
2020-02-15 15:10:24 -08:00
Bastien Bouclet 553d2968bb SCI: Add override keywords 2020-02-09 12:43:16 +01:00
athrxx bba5513a2d SCI: - update MT32/GM driver initTrack method
This adds specific support for SCI0_EARLY targets.
Based on and tested with Christmas Cards 1988.

I've not added the volume reset (neither for SCI0_EARLY nor SCI0_LATE), since the ScummVM driver seems to handle volume differently on purpose (probably based on SCI1?).
2019-04-02 20:45:35 +03:00
athrxx 037eec3144 SCI: implement SCI0 midi driver track initialization
I put this in an separate commit to make it easier to review/revert. I've tried to make this as minimum invasive as possible. That's why I put this in place of the former call to onNewSound().

SCI_0_LATE sound drivers (probably also SCI_0_EARLY, but I don't know that) do some midi track initialization, mostly resetting certain values and assigning voices (hardware channels) to midi parts. The information for this comes from the track header.

The SCI0 version of the PC-98 sound driver relies on this code. The driver checks the channel flags with two different masks and assigns different sound channel types accordingly. This can't be done with the 0x4B event. Using the 0x4B event is sort of counter intuitive anyway, since only some of the SCI0 drivers even support that event.

It seems that the only driver making use of onNewSound() was MT-32. I've adapted the driver to my changes, although I am quite sure that the sound will be unaffected. The only thing that the MT-32 driver does with the header information is checking whether a midi part should play or not and assign exactly one timbre (with exactly the same number) to that part if required.
2019-04-02 20:45:35 +03:00
Eugene Sandulenko 22b674777f SCI: Added overried specifiers 2018-03-28 12:35:22 +02:00
Ruud Klaver 6843870af2 SCI: Set default MT-32 reverb before each sound
Set the default reverb configuration present in either the MT-32
patch data or MT32.DRV of SCI0 games before playing each sound, as
a previously played sound may have changed it.

Also, do not perform a general reverb init, since the start of a
sound will do that now.

Closes gh-1023.
2017-10-04 23:47:21 -05:00
Colin Snover 9ac219648e SCI: Omit SysEx delays when sending to MT-32 emulator
Real MIDI devices, and MT-32 in particular, need delays between
SysEx messages to ensure sufficient time to receive and process
the incoming data buffer. Sending too much data too quickly to
these devices can cause them to crash with a buffer overflow.

The MT-32 emulator, on the other hand, has no problem receiving
SysEx data instantly, so skipping the delays means that games that
send lots of data to the MT-32 will start up much faster.
2017-09-12 20:08:02 -05:00
Colin Snover 90cd56e4b6 SCI32: Fix missing music in MGDX
GM patch data is the same across all SCI32 games.
2017-07-07 13:25:02 -05:00
Colin Snover a233696212 SCI: Update formatting strings to match updated Span API 2017-03-30 14:23:41 -05:00
Colin Snover 31daa956d6 SCI: Implement bounds-checked reads of game resources 2017-03-27 19:42:31 -05:00
Willem Jan Palenstijn 1b1fae6494 SCI: Clean up unnecessary casts 2017-02-26 14:23:36 +01:00
Colin Snover bf293fface SCI: Fix non-responsive application warning during sysex transfers
This also fixes the display of the startup LCD message, which had
been delayed until after the sysex transfer was finished.
2016-12-03 12:21:54 -06:00
Ori Avtalion 3564032330 JANITORIAL: Reduce audio header dependencies 2016-04-14 16:10:21 +03:00
Martin Kiewitz 0dd760724e SCI32: split up SCI2.1 into EARLY/MIDDLE/LATE
- Detection works via signatures (couldn't find a better way)
- new kString subcalls were introduced SCI2.1 LATE
- kString now has signatures and is split via subcall table
- kString fix, so that KQ7 doesn't crash, when starting a chapter
- Sci2StringFunctionType removed, because no longer needed
2015-12-29 01:44:11 +01:00
Filippos Karapetis ae2be20a20 SCI: Fix bug #6725 - "SCI: LSL5 Mac doesn't launch with MT-32 music"
Thanks to waltervn for his help
2014-10-13 12:21:39 +03:00
Filippos Karapetis 43cb57ba00 SCI: Add comments for the MT-32/GM patch contents 2014-10-13 12:21:39 +03:00
Ben Castricum cb94d1f943 MISC: Fix typo s/Adlib/AdLib/ (only where visible to the user) 2014-08-22 06:40:06 +02:00
Johannes Schickel 09cb06d1fa SCI: Small formatting fix. 2014-07-24 01:23:11 +02:00
Johannes Schickel 8fc7d60feb SCI: Make GPL headers consistent in themselves. 2014-02-18 02:39:37 +01:00
Willem Jan Palenstijn 430db6719f SCI: Fix confusing use of strncpy 2013-04-17 23:55:01 +02:00
Filippos Karapetis b4df7868a1 SCI: Remove some useless checks in the MIDI driver 2013-03-27 23:06:27 +02:00
Johannes Schickel 56e8268073 SCI: Do not cast away const qualifier. 2012-04-05 00:40:25 +02:00
md5 bd2bfe85c9 SCI: Don't include several debug tables when REDUCE_MEMORY_USAGE is defined 2011-05-13 16:12:52 +03:00
strangerke 69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
md5 d28344bb55 SCI: Removed unused variables
Thanks to LordHoto and the trusty -Wunused-but-set-variable option :)
2011-04-27 13:13:35 +03:00
md5 22046d2480 SCI: Added handling for another version of mt32.drv (bug #3285556)
This is used in another version of KQ4 early (0.000.274)
2011-04-13 10:29:24 +03:00
dhewg 23ad90b781 SCI: Replace not required emumidi header 2011-04-02 13:31:53 +02:00
Walter van Niftrik 6501a86095 SCI: Fix default pan value in MIDI driver. 2011-03-27 00:04:28 +01: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
md5 9af4453ee5 SCI: Don't ignore SysEx messages at the driver level but warn instead
SysEx messages in the driver are usually the result of a bug which should
be investigated and not silently ignored
2011-03-03 11:18:59 +02:00
md5 9d6ed4de31 SCI: Slight cleanup of some sound drivers 2011-03-03 01:47:08 +02:00
md5 72f65b3946 SCI: Renamed SCI_VERSION_1_EGA to SCI_VERSION_1_EGA_ONLY
This renaming allows us to better distinguish that this version is for games
that only had an EGA version, and avoid confusion with newer SCI1 game releases
with EGA graphics (e.g. KQ5 EGA). The only game with this SCI version is QFG2,
a SCI1 EGA game with a parser. Also, added some games for each SCI version.
2011-02-27 16:48:53 +02:00
md5 88235cee7c SCI: Some slight fixes for the code that reads the LSL2 early MT32.DLL driver, thanks to waltervn 2011-02-26 15:27:01 +02:00
md5 318c51a202 SCI: Added support for reading data off the MT32.DRV driver found in LSL2 early (bug #3192627) 2011-02-26 05:22:10 +02:00
Filippos Karapetis 6a4ea3abd3 SCI: Added comments to the FB-01 and MIDI drivers. The original driver files are only
needed in SCI0 early games, which didn't include separate sound patch resources. Thanks
to waltervn for the information he supplied

svn-id: r55875
2011-02-10 21:10:49 +00:00
Max Horn 42ab839dd6 AUDIO: Rename sound/ dir to audio/
svn-id: r55850
2011-02-09 01:09:01 +00:00
Max Horn 2d1c8a3533 ALL: Fix whitespaces / indention
svn-id: r55818
2011-02-07 23:01:06 +00:00
Walter van Niftrik 3d38a383bb SCI: Only filter channels for early SCI0, as GM currently uses all channels.
svn-id: r54498
2010-11-26 14:35:28 +00:00
Filippos Karapetis 1d4e452c78 SCI: Send the SCI0 reverb init after reading the reverb data
svn-id: r54492
2010-11-26 06:41:45 +00:00
Filippos Karapetis af15ac6f6a SCI: Some reverb-related changes in the MIDI driver, based on a patch by waltervn
svn-id: r54484
2010-11-25 22:23:14 +00:00
Filippos Karapetis 3a8648c4db SCI: Initialize reverb in the music driver correctly. Based on a patch by waltervn
svn-id: r54483
2010-11-25 22:17:23 +00:00
Filippos Karapetis 2c2f3a97e6 SCI: Added support for the alternate Windows MIDI soundtracks of the CD versions of EcoQuest, Jones, KQ5 and SQ4
svn-id: r54476
2010-11-25 14:22:09 +00:00
Walter van Niftrik 8c4ebc434d SCI: Fix bug in MT-32 checksum computation. Thanks Sven for finding this.
svn-id: r54471
2010-11-25 11:19:46 +00:00