[Scummvm-cvs-logs] SF.net SVN: scummvm: [23552] scummvm/trunk/sound/fmopl.cpp
agent-q at users.sourceforge.net
agent-q at users.sourceforge.net
Sat Jul 22 12:56:15 CEST 2006
Revision: 23552
Author: agent-q
Date: 2006-07-22 03:56:11 -0700 (Sat, 22 Jul 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=23552&view=rev
Log Message:
-----------
Speed increase for DS port - uses cache ram to store SIN_TABLE. Other versions are unaffected.
Modified Paths:
--------------
scummvm/trunk/sound/fmopl.cpp
Modified: scummvm/trunk/sound/fmopl.cpp
===================================================================
--- scummvm/trunk/sound/fmopl.cpp 2006-07-22 09:05:13 UTC (rev 23551)
+++ scummvm/trunk/sound/fmopl.cpp 2006-07-22 10:56:11 UTC (rev 23552)
@@ -637,10 +637,17 @@
/* allocate dynamic tables */
if((TL_TABLE = (int *)malloc(TL_MAX * 2 * sizeof(int))) == NULL)
return 0;
+
+#ifdef __DS__
+ // On the DS, use fast RAM for the sine table, since it thrashes the cache otherwise
+ SIN_TABLE = ((int **) (0x37F8000));
+#else
if((SIN_TABLE = (int **)malloc(SIN_ENT * 4 * sizeof(int *))) == NULL) {
free(TL_TABLE);
return 0;
}
+#endif
+
if((AMS_TABLE = (int *)malloc(AMS_ENT * 2 * sizeof(int))) == NULL) {
free(TL_TABLE);
free(SIN_TABLE);
@@ -1186,6 +1193,8 @@
env_bits = FMOPL_ENV_BITS_LQ;
eg_ent = FMOPL_EG_ENT_LQ;
}
+ env_bits = FMOPL_ENV_BITS_MQ;
+ eg_ent = FMOPL_EG_ENT_MQ;
#endif
OPLBuildTables(env_bits, eg_ent);
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