2012-06-03 15:48:14 +00:00
|
|
|
/* Mednafen - Multi-system Emulator
|
|
|
|
*
|
|
|
|
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "mednafen.h"
|
|
|
|
#include <errno.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <string>
|
|
|
|
#include "settings.h"
|
2012-10-13 13:31:49 +00:00
|
|
|
|
2014-06-25 18:16:22 +00:00
|
|
|
int setting_initial_scanline = 0;
|
|
|
|
int setting_last_scanline = 242;
|
2016-10-14 22:56:08 +00:00
|
|
|
int setting_pce_hoverscan = 0;
|
2013-05-24 15:26:57 +00:00
|
|
|
int setting_pce_fast_nospritelimit = 0;
|
|
|
|
int setting_pce_fast_cddavolume = 100;
|
|
|
|
int setting_pce_fast_adpcmvolume = 100;
|
|
|
|
int setting_pce_fast_cdpsgvolume = 100;
|
|
|
|
uint32_t setting_pce_fast_cdspeed = 1;
|
2013-04-09 02:05:18 +00:00
|
|
|
|
2012-06-03 15:48:14 +00:00
|
|
|
uint64 MDFN_GetSettingUI(const char *name)
|
|
|
|
{
|
2013-05-24 15:26:57 +00:00
|
|
|
if (!strcmp("pce_fast.cddavolume", name))
|
|
|
|
return setting_pce_fast_cddavolume;
|
|
|
|
if (!strcmp("pce_fast.adpcmvolume", name))
|
|
|
|
return setting_pce_fast_adpcmvolume;
|
|
|
|
if (!strcmp("pce_fast.cdpsgvolume", name))
|
|
|
|
return setting_pce_fast_cdpsgvolume;
|
|
|
|
if (!strcmp("pce_fast.cdspeed", name))
|
|
|
|
return setting_pce_fast_cdspeed;
|
2013-01-17 22:28:05 +00:00
|
|
|
if (!strcmp("pce_fast.ocmultiplier", name)) /* make configurable */
|
2012-11-17 02:05:20 +00:00
|
|
|
return 1;
|
2013-01-17 22:28:05 +00:00
|
|
|
if (!strcmp("pce_fast.slstart", name))
|
2014-06-25 18:16:22 +00:00
|
|
|
return setting_initial_scanline;
|
2013-01-17 22:28:05 +00:00
|
|
|
if (!strcmp("pce_fast.slend", name))
|
2014-06-25 18:16:22 +00:00
|
|
|
return setting_last_scanline;
|
2016-10-14 22:56:08 +00:00
|
|
|
if (!strcmp("pce_fast.hoverscan", name))
|
|
|
|
return setting_pce_hoverscan;
|
2012-06-03 15:48:14 +00:00
|
|
|
|
2012-11-17 02:05:20 +00:00
|
|
|
fprintf(stderr, "unhandled setting UI: %s\n", name);
|
|
|
|
return 0;
|
2012-06-03 15:48:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int64 MDFN_GetSettingI(const char *name)
|
|
|
|
{
|
2012-11-17 02:05:20 +00:00
|
|
|
fprintf(stderr, "unhandled setting I: %s\n", name);
|
|
|
|
return 0;
|
2012-06-03 15:48:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
double MDFN_GetSettingF(const char *name)
|
|
|
|
{
|
2012-11-17 02:05:20 +00:00
|
|
|
fprintf(stderr, "unhandled setting F: %s\n", name);
|
|
|
|
return 0;
|
2012-06-03 15:48:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool MDFN_GetSettingB(const char *name)
|
|
|
|
{
|
2013-01-17 22:28:05 +00:00
|
|
|
if (!strcmp("cheats", name))
|
2012-11-17 02:05:20 +00:00
|
|
|
return 0;
|
|
|
|
/* LIBRETRO */
|
2013-01-17 22:28:05 +00:00
|
|
|
if (!strcmp("libretro.cd_load_into_ram", name))
|
2012-11-24 16:14:05 +00:00
|
|
|
return 0;
|
2013-01-17 22:28:05 +00:00
|
|
|
if (!strcmp("pce_fast.input.multitap", name))
|
2012-11-17 02:05:20 +00:00
|
|
|
return 1;
|
2013-01-17 22:28:05 +00:00
|
|
|
if (!strcmp("pce_fast.arcadecard", name))
|
2012-11-17 02:05:20 +00:00
|
|
|
return 1;
|
2013-01-17 22:28:05 +00:00
|
|
|
if (!strcmp("pce_fast.nospritelimit", name))
|
2013-04-09 02:05:18 +00:00
|
|
|
return setting_pce_fast_nospritelimit;
|
2013-01-17 22:28:05 +00:00
|
|
|
if (!strcmp("pce_fast.forcemono", name))
|
2012-11-17 02:05:20 +00:00
|
|
|
return 0;
|
2013-01-17 22:28:05 +00:00
|
|
|
if (!strcmp("pce_fast.disable_softreset", name))
|
2012-11-17 02:05:20 +00:00
|
|
|
return 0;
|
2013-01-17 22:28:05 +00:00
|
|
|
if (!strcmp("pce_fast.adpcmlp", name))
|
2012-11-17 02:05:20 +00:00
|
|
|
return 0;
|
2016-10-14 22:56:08 +00:00
|
|
|
if (!strcmp("pce_fast.hoverscan", name))
|
|
|
|
return setting_pce_hoverscan;
|
2012-11-17 02:05:20 +00:00
|
|
|
/* CDROM */
|
2013-01-17 22:28:05 +00:00
|
|
|
if (!strcmp("cdrom.lec_eval", name))
|
2012-11-17 02:05:20 +00:00
|
|
|
return 1;
|
|
|
|
/* FILESYS */
|
2013-01-17 22:28:05 +00:00
|
|
|
if (!strcmp("filesys.untrusted_fip_check", name))
|
2012-11-17 02:05:20 +00:00
|
|
|
return 0;
|
2013-01-17 22:28:05 +00:00
|
|
|
if (!strcmp("filesys.disablesavegz", name))
|
2012-11-17 02:05:20 +00:00
|
|
|
return 1;
|
|
|
|
fprintf(stderr, "unhandled setting B: %s\n", name);
|
|
|
|
return 0;
|
2012-06-03 15:48:14 +00:00
|
|
|
}
|
|
|
|
|
2012-10-20 17:03:03 +00:00
|
|
|
extern std::string retro_base_directory;
|
|
|
|
extern std::string retro_base_name;
|
|
|
|
|
2012-06-03 15:48:14 +00:00
|
|
|
std::string MDFN_GetSettingS(const char *name)
|
|
|
|
{
|
2013-01-17 22:28:05 +00:00
|
|
|
if (!strcmp("pce_fast.cdbios", name))
|
2013-12-21 02:09:01 +00:00
|
|
|
return std::string("syscard3.pce");
|
2012-11-10 01:20:13 +00:00
|
|
|
/* FILESYS */
|
2013-01-17 22:28:05 +00:00
|
|
|
if (!strcmp("filesys.path_firmware", name))
|
2012-11-10 01:20:13 +00:00
|
|
|
return retro_base_directory;
|
2013-01-17 22:28:05 +00:00
|
|
|
if (!strcmp("filesys.path_palette", name))
|
2012-11-10 01:20:13 +00:00
|
|
|
return retro_base_directory;
|
2013-01-17 22:28:05 +00:00
|
|
|
if (!strcmp("filesys.path_sav", name))
|
2012-11-10 01:20:13 +00:00
|
|
|
return retro_base_directory;
|
2013-01-17 22:28:05 +00:00
|
|
|
if (!strcmp("filesys.path_state", name))
|
2012-11-10 01:20:13 +00:00
|
|
|
return retro_base_directory;
|
2013-01-17 22:28:05 +00:00
|
|
|
if (!strcmp("filesys.path_cheat", name))
|
2012-11-10 01:20:13 +00:00
|
|
|
return retro_base_directory;
|
2013-01-17 22:28:05 +00:00
|
|
|
if (!strcmp("filesys.fname_state", name))
|
2012-11-10 01:20:13 +00:00
|
|
|
return retro_base_name + std::string(".sav");
|
2013-01-17 22:28:05 +00:00
|
|
|
if (!strcmp("filesys.fname_sav", name))
|
2012-11-10 01:20:13 +00:00
|
|
|
return retro_base_name + std::string(".bsv");
|
|
|
|
fprintf(stderr, "unhandled setting S: %s\n", name);
|
|
|
|
return 0;
|
2012-06-03 15:48:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool MDFNI_SetSetting(const char *name, const char *value, bool NetplayOverride)
|
|
|
|
{
|
2012-11-17 02:05:20 +00:00
|
|
|
return false;
|
2012-06-03 15:48:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool MDFNI_SetSettingB(const char *name, bool value)
|
|
|
|
{
|
2012-11-17 02:05:20 +00:00
|
|
|
return false;
|
2012-06-03 15:48:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool MDFNI_SetSettingUI(const char *name, uint64 value)
|
|
|
|
{
|
2012-11-17 02:05:20 +00:00
|
|
|
return false;
|
2012-06-03 15:48:14 +00:00
|
|
|
}
|
|
|
|
|
2012-10-13 13:31:49 +00:00
|
|
|
void MDFNI_DumpSettingsDef(const char *path)
|
2012-06-03 15:48:14 +00:00
|
|
|
{
|
|
|
|
}
|