[Scummvm-cvs-logs] SF.net SVN: scummvm:[51995] scummvm/trunk

athrxx at users.sourceforge.net athrxx at users.sourceforge.net
Wed Aug 11 20:54:56 CEST 2010


Revision: 51995
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51995&view=rev
Author:   athrxx
Date:     2010-08-11 18:54:56 +0000 (Wed, 11 Aug 2010)

Log Message:
-----------
GUI: add music devices for c64, amiga and apple II gs

These devices are not able to create appropriate drivers.
The only purpose for now is having proper gui options and flags and music types for the device detector.
The corresponding GUIO flags for the new devices have been added, too.

Modified Paths:
--------------
    scummvm/trunk/base/plugins.cpp
    scummvm/trunk/common/util.cpp
    scummvm/trunk/common/util.h
    scummvm/trunk/engines/scumm/detection_tables.h
    scummvm/trunk/engines/scumm/scumm.cpp
    scummvm/trunk/gui/options.cpp
    scummvm/trunk/po/POTFILES
    scummvm/trunk/sound/mididrv.cpp
    scummvm/trunk/sound/mididrv.h
    scummvm/trunk/sound/mods/paula.cpp
    scummvm/trunk/sound/module.mk
    scummvm/trunk/sound/softsynth/sid.cpp

Added Paths:
-----------
    scummvm/trunk/sound/softsynth/appleiigs.cpp

Modified: scummvm/trunk/base/plugins.cpp
===================================================================
--- scummvm/trunk/base/plugins.cpp	2010-08-11 18:19:58 UTC (rev 51994)
+++ scummvm/trunk/base/plugins.cpp	2010-08-11 18:54:56 UTC (rev 51995)
@@ -200,6 +200,11 @@
 		LINK_PLUGIN(ADLIB)
 		LINK_PLUGIN(PCSPK)
 		LINK_PLUGIN(PCJR)
+        #ifndef DISABLE_SID
+        LINK_PLUGIN(C64)
+        #endif
+        LINK_PLUGIN(AMIGA)
+		LINK_PLUGIN(APPLEIIGS)
 		LINK_PLUGIN(TOWNS)
 		#if defined (UNIX)
 		LINK_PLUGIN(TIMIDITY)

Modified: scummvm/trunk/common/util.cpp
===================================================================
--- scummvm/trunk/common/util.cpp	2010-08-11 18:19:58 UTC (rev 51994)
+++ scummvm/trunk/common/util.cpp	2010-08-11 18:54:56 UTC (rev 51995)
@@ -306,6 +306,9 @@
 	{ GUIO_MIDICMS,      "midiCMS" },
 	{ GUIO_MIDIPCJR,     "midiPCJr" },
 	{ GUIO_MIDIADLIB,    "midiAdLib" },
+    { GUIO_MIDIC64,      "midiC64" },
+    { GUIO_MIDIAMIGA,    "midiAmiga" },
+    { GUIO_MIDIAPPLEIIGS,"midiAppleIIgs" },
 	{ GUIO_MIDITOWNS,    "midiTowns" },
 	{ GUIO_MIDIPC98,     "midiPC98" },
 	{ GUIO_MIDIMT32,     "midiMt32" },

Modified: scummvm/trunk/common/util.h
===================================================================
--- scummvm/trunk/common/util.h	2010-08-11 18:19:58 UTC (rev 51994)
+++ scummvm/trunk/common/util.h	2010-08-11 18:54:56 UTC (rev 51995)
@@ -223,10 +223,13 @@
 	GUIO_MIDICMS		= (1 << 7),
 	GUIO_MIDIPCJR		= (1 << 8),
 	GUIO_MIDIADLIB		= (1 << 9),
-	GUIO_MIDITOWNS		= (1 << 10),
-	GUIO_MIDIPC98		= (1 << 11),
-	GUIO_MIDIMT32		= (1 << 12),
-	GUIO_MIDIGM			= (1 << 13)
+    GUIO_MIDIC64        = (1 << 10),
+    GUIO_MIDIAMIGA      = (1 << 11),
+    GUIO_MIDIAPPLEIIGS  = (1 << 12),
+    GUIO_MIDITOWNS		= (1 << 13),
+	GUIO_MIDIPC98		= (1 << 14),
+	GUIO_MIDIMT32		= (1 << 15),
+	GUIO_MIDIGM			= (1 << 16)
 };
 
 bool checkGameGUIOption(GameGUIOption option, const String &str);

Modified: scummvm/trunk/engines/scumm/detection_tables.h
===================================================================
--- scummvm/trunk/engines/scumm/detection_tables.h	2010-08-11 18:19:58 UTC (rev 51994)
+++ scummvm/trunk/engines/scumm/detection_tables.h	2010-08-11 18:54:56 UTC (rev 51995)
@@ -207,8 +207,8 @@
 // only a single unique variant. This is used to help the detector quickly
 // decide whether it has to worry about distinguishing multiple variants or not.
 static const GameSettings gameVariantsTable[] = {
-	{"maniac", "Apple II",   0, GID_MANIAC, 0, 0, MDT_PCSPK, 0, Common::kPlatformApple2GS, GUIO_NOSPEECH | GUIO_NOMIDI},
-	{"maniac", "C64",        0, GID_MANIAC, 0, 0, MDT_PCSPK, 0, Common::kPlatformC64, GUIO_NOSPEECH | GUIO_NOMIDI},
+	{"maniac", "Apple II",   0, GID_MANIAC, 0, 0, MDT_APPLEIIGS, 0, Common::kPlatformApple2GS, GUIO_NOSPEECH | GUIO_NOMIDI},
+	{"maniac", "C64",        0, GID_MANIAC, 0, 0, MDT_C64, 0, Common::kPlatformC64, GUIO_NOSPEECH | GUIO_NOMIDI},
 	{"maniac", "V1",      "v1", GID_MANIAC, 1, 0, MDT_PCSPK | MDT_PCJR, 0, Common::kPlatformPC, GUIO_NOSPEECH | GUIO_NOMIDI},
 	{"maniac", "V1 Demo", "v1", GID_MANIAC, 1, 0, MDT_PCSPK | MDT_PCJR, GF_DEMO, Common::kPlatformPC, GUIO_NOSPEECH | GUIO_NOMIDI},
 	{"maniac", "NES",        0, GID_MANIAC, 1, 0, MDT_NONE,  0, Common::kPlatformNES, GUIO_NOSPEECH | GUIO_NOMIDI},

Modified: scummvm/trunk/engines/scumm/scumm.cpp
===================================================================
--- scummvm/trunk/engines/scumm/scumm.cpp	2010-08-11 18:19:58 UTC (rev 51994)
+++ scummvm/trunk/engines/scumm/scumm.cpp	2010-08-11 18:54:56 UTC (rev 51995)
@@ -1663,6 +1663,12 @@
 	case MT_ADLIB:
 		_musicType = MDT_ADLIB;
 		break;
+	case MT_C64:
+		_musicType = MDT_C64;
+		break;
+	case MT_APPLEIIGS:
+		_musicType = MDT_APPLEIIGS;
+		break;
 	default:
 		_musicType = MDT_MIDI;
 		break;

Modified: scummvm/trunk/gui/options.cpp
===================================================================
--- scummvm/trunk/gui/options.cpp	2010-08-11 18:19:58 UTC (rev 51994)
+++ scummvm/trunk/gui/options.cpp	2010-08-11 18:54:56 UTC (rev 51995)
@@ -672,7 +672,8 @@
 		for (MusicDevices::iterator d = i.begin(); d != i.end(); ++d) {
 			const uint32 deviceGuiOption = MidiDriver::musicType2GUIO(d->getMusicType());
 
-			if ((_domain == Common::ConfigManager::kApplicationDomain && d->getMusicType() != MT_TOWNS) // global dialog - skip useless FM-Towns option there
+			if ((_domain == Common::ConfigManager::kApplicationDomain && d->getMusicType() != MT_TOWNS  // global dialog - skip useless FM-Towns, C64, Amiga, AppleIIGS options there
+                && d->getMusicType() != MT_C64 && d->getMusicType() != MT_AMIGA && d->getMusicType() != MT_APPLEIIGS)
 			    || (_domain != Common::ConfigManager::kApplicationDomain && !(_guioptions & allFlags)) // No flags are specified
 			    || (_guioptions & deviceGuiOption) // flag is present
 			    // HACK/FIXME: For now we have to show GM devices, even when the game only has GUIO_MIDIMT32 set,

Modified: scummvm/trunk/po/POTFILES
===================================================================
--- scummvm/trunk/po/POTFILES	2010-08-11 18:19:58 UTC (rev 51994)
+++ scummvm/trunk/po/POTFILES	2010-08-11 18:54:56 UTC (rev 51995)
@@ -26,7 +26,10 @@
 sound/musicplugin.cpp
 sound/null.h
 sound/null.cpp
+sound/mods/paula.cpp
 sound/softsynth/adlib.cpp
+sound/softsynth/appleiigs.cpp
+sound/softsynth/sid.cpp
 sound/softsynth/mt32.cpp
 sound/softsynth/pcspk.cpp
 sound/softsynth/ym2612.cpp

Modified: scummvm/trunk/sound/mididrv.cpp
===================================================================
--- scummvm/trunk/sound/mididrv.cpp	2010-08-11 18:19:58 UTC (rev 51994)
+++ scummvm/trunk/sound/mididrv.cpp	2010-08-11 18:54:56 UTC (rev 51995)
@@ -61,8 +61,12 @@
 	/*MDT_CMS,		Common::GUIO_MIDICMS,*/
 	MT_PCJR,		Common::GUIO_MIDIPCJR,
 	MT_ADLIB,		Common::GUIO_MIDIADLIB,
-	MT_TOWNS,		Common::GUIO_MIDITOWNS,
-	MT_GM,			Common::GUIO_MIDIGM,
+    MT_C64,		    Common::GUIO_MIDIC64,
+    MT_AMIGA,	    Common::GUIO_MIDIAMIGA,
+	MT_APPLEIIGS,	Common::GUIO_MIDIAPPLEIIGS,
+    MT_TOWNS,		Common::GUIO_MIDITOWNS,
+    MT_PC98,		Common::GUIO_MIDIPC98,
+    MT_GM,			Common::GUIO_MIDIGM,
 	MT_MT32,		Common::GUIO_MIDIMT32,
 	0,		0
 };
@@ -150,6 +154,21 @@
 			return hdl;
 		break;
 
+    case MT_C64:
+		if (flags & MDT_C64)
+			return hdl;
+		break;
+
+    case MT_AMIGA:
+		if (flags & MDT_AMIGA)
+			return hdl;
+		break;        
+
+    case MT_APPLEIIGS:
+		if (flags & MDT_APPLEIIGS)
+			return hdl;
+		break;
+
 	case MT_TOWNS:
 		if (flags & MDT_TOWNS)
 			return hdl;
@@ -224,11 +243,21 @@
 		MusicType tp = MT_AUTO;
 		if (flags & MDT_TOWNS)
 			tp = MT_TOWNS;
+        else if (flags & MDT_PC98)
+			tp = MT_PC98;
 		else if (flags & MDT_ADLIB)
 			tp = MT_ADLIB;
 		else if (flags & MDT_PCSPK)
 			tp = MT_PCSPK;
-		else if (l == 0)
+        else if (flags & MDT_PCJR)
+			tp = MT_PCJR;
+        else if (flags & MDT_C64)
+			tp = MT_C64;
+        else if (flags & MDT_AMIGA)
+			tp = MT_AMIGA;
+        else if (flags & MDT_APPLEIIGS)
+			tp = MT_APPLEIIGS;
+        else if (l == 0)
 			// if we haven't tried to find a MIDI device yet we do this now.
 			continue;
 		else

Modified: scummvm/trunk/sound/mididrv.h
===================================================================
--- scummvm/trunk/sound/mididrv.h	2010-08-11 18:19:58 UTC (rev 51994)
+++ scummvm/trunk/sound/mididrv.h	2010-08-11 18:54:56 UTC (rev 51995)
@@ -57,6 +57,9 @@
 	MT_PCJR,            // PCjr
 	MT_CMS,             // CMS
 	MT_ADLIB,           // AdLib
+	MT_C64,             // C64
+    MT_AMIGA,           // Amiga
+    MT_APPLEIIGS,       // Apple IIGS
 	MT_TOWNS,           // FM-TOWNS
 	MT_PC98,            // PC98
 	MT_GM,              // General MIDI
@@ -75,16 +78,19 @@
  * @todo Rename MidiDriverFlags to MusicDriverFlags
  */
 enum MidiDriverFlags {
-	MDT_NONE   = 0,
-	MDT_PCSPK  = 1 << 0,      // PC Speaker: Maps to MD_PCSPK and MD_PCJR
-	MDT_CMS    = 1 << 1,      // Creative Music System / Gameblaster: Maps to MD_CMS
-	MDT_PCJR   = 1 << 2,      // Tandy/PC Junior driver
-	MDT_ADLIB  = 1 << 3,      // AdLib: Maps to MT_ADLIB
-	MDT_TOWNS  = 1 << 4,      // FM-TOWNS: Maps to MT_TOWNS
-	MDT_PC98   = 1 << 5,      // FM-TOWNS: Maps to MT_PC98
-	MDT_MIDI   = 1 << 6,      // Real MIDI
-	MDT_PREFER_MT32 = 1 << 7, // MT-32 output is preferred
-	MDT_PREFER_GM = 1 << 8    // GM output is preferred
+	MDT_NONE        = 0,
+	MDT_PCSPK       = 1 << 0,       // PC Speaker: Maps to MD_PCSPK and MD_PCJR
+	MDT_CMS         = 1 << 1,       // Creative Music System / Gameblaster: Maps to MD_CMS
+	MDT_PCJR        = 1 << 2,       // Tandy/PC Junior driver
+	MDT_ADLIB       = 1 << 3,       // AdLib: Maps to MT_ADLIB
+    MDT_C64         = 1 << 4,
+    MDT_AMIGA       = 1 << 5,
+    MDT_APPLEIIGS   = 1 << 6,
+	MDT_TOWNS       = 1 << 7,       // FM-TOWNS: Maps to MT_TOWNS
+	MDT_PC98        = 1 << 8,       // FM-TOWNS: Maps to MT_PC98
+	MDT_MIDI        = 1 << 9,       // Real MIDI
+	MDT_PREFER_MT32 = 1 << 10,       // MT-32 output is preferred
+	MDT_PREFER_GM   = 1 << 11       // GM output is preferred
 };
 
 /**

Modified: scummvm/trunk/sound/mods/paula.cpp
===================================================================
--- scummvm/trunk/sound/mods/paula.cpp	2010-08-11 18:19:58 UTC (rev 51994)
+++ scummvm/trunk/sound/mods/paula.cpp	2010-08-11 18:54:56 UTC (rev 51995)
@@ -24,6 +24,7 @@
  */
 
 #include "sound/mods/paula.h"
+#include "sound/null.h"
 
 namespace Audio {
 
@@ -178,3 +179,34 @@
 }
 
 } // End of namespace Audio
+
+
+//	Plugin interface
+//	(This can only create a null driver since apple II gs support seeems not to be implemented
+//  and also is not part of the midi driver architecture. But we need the plugin for the options
+//  menu in the launcher and for MidiDriver::detectDevice() which is more or less used by all engines.)
+
+class AmigaMusicPlugin : public NullMusicPlugin {
+public:
+	const char *getName() const {
+		return _s("Amiga Audio Emulator");
+	}
+
+	const char *getId() const {
+		return "amiga";
+	}
+
+	MusicDevices getDevices() const;
+};
+
+MusicDevices AmigaMusicPlugin::getDevices() const {
+	MusicDevices devices;
+	devices.push_back(MusicDevice(this, "", MT_AMIGA));
+	return devices;
+}
+
+//#if PLUGIN_ENABLED_DYNAMIC(AMIGA)
+	//REGISTER_PLUGIN_DYNAMIC(AMIGA, PLUGIN_TYPE_MUSIC, AmigaMusicPlugin);
+//#else
+	REGISTER_PLUGIN_STATIC(AMIGA, PLUGIN_TYPE_MUSIC, AmigaMusicPlugin);
+//#endif

Modified: scummvm/trunk/sound/module.mk
===================================================================
--- scummvm/trunk/sound/module.mk	2010-08-11 18:19:58 UTC (rev 51994)
+++ scummvm/trunk/sound/module.mk	2010-08-11 18:54:56 UTC (rev 51995)
@@ -40,6 +40,7 @@
 	softsynth/fmtowns_pc98/towns_euphony.o \
 	softsynth/fmtowns_pc98/towns_pc98_driver.o \
 	softsynth/fmtowns_pc98/towns_pc98_fmsynth.o \
+	softsynth/appleiigs.o \
 	softsynth/ym2612.o \
 	softsynth/fluidsynth.o \
 	softsynth/mt32.o \

Added: scummvm/trunk/sound/softsynth/appleiigs.cpp
===================================================================
--- scummvm/trunk/sound/softsynth/appleiigs.cpp	                        (rev 0)
+++ scummvm/trunk/sound/softsynth/appleiigs.cpp	2010-08-11 18:54:56 UTC (rev 51995)
@@ -0,0 +1,57 @@
+/* ScummVM - Graphic Adventure Engine
+*
+* ScummVM is the legal property of its developers, whose names
+* are too numerous to list here. Please refer to the COPYRIGHT
+* file distributed with this source distribution.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+* $URL$
+* $Id$
+*
+*/
+
+#include "sound/null.h"
+
+//	Plugin interface
+//	(This can only create a null driver since apple II gs support seeems not to be implemented
+//  and also is not part of the midi driver architecture. But we need the plugin for the options
+//  menu in the launcher and for MidiDriver::detectDevice() which is more or less used by all engines.)
+
+class AppleIIGSMusicPlugin : public NullMusicPlugin {
+public:
+	const char *getName() const {
+		return _s("Apple II GS Emulator (NOT IMPLEMENTED)");
+	}
+
+	const char *getId() const {
+		return "appleIIgs";
+	}
+
+	MusicDevices getDevices() const;
+};
+
+MusicDevices AppleIIGSMusicPlugin::getDevices() const {
+	MusicDevices devices;
+	devices.push_back(MusicDevice(this, "", MT_APPLEIIGS));
+	return devices;
+}
+
+//#if PLUGIN_ENABLED_DYNAMIC(APPLEIIGS)
+	//REGISTER_PLUGIN_DYNAMIC(APPLEIIGS, PLUGIN_TYPE_MUSIC, AppleIIGSMusicPlugin);
+//#else
+	REGISTER_PLUGIN_STATIC(APPLEIIGS, PLUGIN_TYPE_MUSIC, AppleIIGSMusicPlugin);
+//#endif
+


Property changes on: scummvm/trunk/sound/softsynth/appleiigs.cpp
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Modified: scummvm/trunk/sound/softsynth/sid.cpp
===================================================================
--- scummvm/trunk/sound/softsynth/sid.cpp	2010-08-11 18:19:58 UTC (rev 51994)
+++ scummvm/trunk/sound/softsynth/sid.cpp	2010-08-11 18:54:56 UTC (rev 51995)
@@ -31,6 +31,7 @@
 #ifndef DISABLE_SID
 
 #include "sid.h"
+#include "sound/null.h"
 #include <math.h>
 
 namespace Resid {
@@ -1422,4 +1423,34 @@
 
 }
 
+//	Plugin interface
+//	(This can only create a null driver since C64 audio support is not part of the
+//	midi driver architecture. But we need the plugin for the options menu in the launcher
+//	and for MidiDriver::detectDevice() which is more or less used by all engines.)
+
+class C64MusicPlugin : public NullMusicPlugin {
+public:
+	const char *getName() const {
+		return _s("C64 Audio Emulator");
+	}
+
+	const char *getId() const {
+		return "C64";
+	}
+
+	MusicDevices getDevices() const;
+};
+
+MusicDevices C64MusicPlugin::getDevices() const {
+	MusicDevices devices;
+	devices.push_back(MusicDevice(this, "", MT_C64));
+	return devices;
+}
+
+//#if PLUGIN_ENABLED_DYNAMIC(C64)
+	//REGISTER_PLUGIN_DYNAMIC(C64, PLUGIN_TYPE_MUSIC, C64MusicPlugin);
+//#else
+	REGISTER_PLUGIN_STATIC(C64, PLUGIN_TYPE_MUSIC, C64MusicPlugin);
+//#endif
+
 #endif


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list