diff options
author | Nebuleon Fumika | 2013-02-09 23:41:06 -0500 |
---|---|---|
committer | Nebuleon Fumika | 2013-02-09 23:41:06 -0500 |
commit | 18e56b68fd90e19b699a17320646c9628f97f160 (patch) | |
tree | dea4dcdb12f4bfba27b6c5e6790a68e9fa179951 | |
parent | 6e2e64109d1714ff2cf8764ec6b854ec3eb504f1 (diff) | |
download | snesemu-18e56b68fd90e19b699a17320646c9628f97f160.tar.gz snesemu-18e56b68fd90e19b699a17320646c9628f97f160.tar.bz2 snesemu-18e56b68fd90e19b699a17320646c9628f97f160.zip |
Add retro sound as a setting in all languages except Chinese.
-rw-r--r-- | CATSFC/system/language.msg | 12 | ||||
-rw-r--r-- | source/nds/entry.cpp | 17 | ||||
-rw-r--r-- | source/nds/gui.c | 22 | ||||
-rw-r--r-- | source/nds/gui.h | 4 | ||||
-rw-r--r-- | source/nds/message.h | 1 |
5 files changed, 44 insertions, 12 deletions
diff --git a/CATSFC/system/language.msg b/CATSFC/system/language.msg index 1de930c..1cccbeb 100644 --- a/CATSFC/system/language.msg +++ b/CATSFC/system/language.msg @@ -58,6 +58,8 @@ Fast-forward %s Frame skipping %s #FMT_AUDIO_SOUND Sound %s +#FMT_AUDIO_RETRO_SOUND +Retro sound %s #FMT_SAVED_STATE_CREATE Create saved state %d #FMT_SAVED_STATE_LOAD @@ -266,6 +268,8 @@ Prefer fluid audio 跳帧方式 %s #FMT_AUDIO_SOUND 声音开关 %s +#FMT_AUDIO_RETRO_SOUND +Retro sound %s #FMT_SAVED_STATE_CREATE 写入存档 %d #FMT_SAVED_STATE_LOAD @@ -474,6 +478,8 @@ Avance rapide %s Omission d'images %s #FMT_AUDIO_SOUND Son %s +#FMT_AUDIO_RETRO_SOUND +Son rétro %s #FMT_SAVED_STATE_CREATE Créer la sauvegarde %d #FMT_SAVED_STATE_LOAD @@ -683,6 +689,8 @@ Schnellvorlauf %s Frames übersp. %s #FMT_AUDIO_SOUND Musik %s +#FMT_AUDIO_RETRO_SOUND +Retro-Musik %s #FMT_SAVED_STATE_CREATE Speicherstand erstellen %d #FMT_SAVED_STATE_LOAD @@ -892,6 +900,8 @@ Vooruitspoelen %s Beelden overslaan %s #FMT_AUDIO_SOUND Geluid %s +#FMT_AUDIO_RETRO_SOUND +Retro geluid %s #FMT_SAVED_STATE_CREATE Creëer opgeslagen staat %d #FMT_SAVED_STATE_LOAD @@ -1101,6 +1111,8 @@ Modo avance rápido %s Salto de fotogramas %s #FMT_AUDIO_SOUND Sonido %s +#FMT_AUDIO_RETRO_SOUND +Sonido retro %s #FMT_SAVED_STATE_CREATE Grabar partida %d #FMT_SAVED_STATE_LOAD diff --git a/source/nds/entry.cpp b/source/nds/entry.cpp index c4cc389..ec1be4e 100644 --- a/source/nds/entry.cpp +++ b/source/nds/entry.cpp @@ -405,6 +405,20 @@ void game_set_fluidity() Settings.SoundSync = FALSE; } } + +void game_set_retro(void) +{ + if (game_config.RetroSound == 1) + { + Settings.InterpolatedSound = FALSE; + S9xSetEightBitConsoleSound (TRUE); + } + else + { + Settings.InterpolatedSound = TRUE; + S9xSetEightBitConsoleSound (FALSE); + } +} void init_sfc_setting(void) { @@ -426,9 +440,6 @@ void init_sfc_setting(void) Settings.APUEnabled = Settings.NextAPUEnabled = TRUE; Settings.FixFrequency = 1; - S9xSetEightBitConsoleSound (TRUE); - - Settings.H_Max = SNES_CYCLES_PER_SCANLINE; Settings.SkipFrames = AUTO_FRAMERATE; Settings.ShutdownMaster = TRUE; diff --git a/source/nds/gui.c b/source/nds/gui.c index 9e69d48..2137a28 100644 --- a/source/nds/gui.c +++ b/source/nds/gui.c @@ -2816,7 +2816,10 @@ u32 menu(u16 *screen, bool8 FirstInvocation) &game_config.SoundSync, 2, NULL, ACTION_TYPE, 4), /* 05 */ STRING_SELECTION_OPTION(game_set_frameskip, NULL, &msg[FMT_VIDEO_FRAME_SKIPPING], frameskip_options, - &game_config.frameskip_value, 12 /* auto (0) and 0..10 (1..11) make 12 option values */, NULL, ACTION_TYPE, 5) + &game_config.frameskip_value, 12 /* auto (0) and 0..10 (1..11) make 12 option values */, NULL, ACTION_TYPE, 5), + + /* 06 */ STRING_SELECTION_OPTION(game_set_retro, NULL, &msg[FMT_AUDIO_RETRO_SOUND], on_off_options, + &game_config.RetroSound, 2, NULL, ACTION_TYPE, 6) }; MAKE_MENU(graphics, NULL, NULL, NULL, NULL, 0, 0); @@ -4281,6 +4284,7 @@ void init_game_config(void) game_config.graphic = 3; // By default, have a good-looking aspect ratio game_config.frameskip_value = 0; // Automatic frame skipping game_config.SoundSync = 0; // Prefer fluid images by default + game_config.RetroSound = 0; // Correct sound by default (else 8-bit) game_config.backward = 0; //time backward disable game_config.backward_time = 2; //time backward granularity 1s @@ -4312,18 +4316,18 @@ void load_game_config_file(void) char *pt; //Set default - init_game_config(); + init_game_config(); sprintf(game_config_filename, "%s/%s", DEFAULT_CFG_DIR, gamepak_name); pt= strrchr(game_config_filename, '.'); if(NULL == pt) - return; + goto finalise; *pt= 0; strcat(game_config_filename, "_0.rts"); fp = fopen(game_config_filename, "r"); - if(NULL == fp) - return; + if(NULL == fp) + goto finalise; //Check file header pt= game_config_filename; @@ -4332,12 +4336,14 @@ void load_game_config_file(void) if (!strncmp(pt, GAME_CONFIG_HEADER, GAME_CONFIG_HEADER_SIZE)) { fread(&game_config, 1, sizeof(GAME_CONFIG), fp); - - game_set_frameskip(); - game_set_fluidity(); } fclose(fp); + +finalise: ; + game_set_frameskip(); + game_set_fluidity(); + game_set_retro(); } /*-------------------------------------------------------- diff --git a/source/nds/gui.h b/source/nds/gui.h index 290a927..9b37462 100644 --- a/source/nds/gui.h +++ b/source/nds/gui.h @@ -72,7 +72,8 @@ struct _GAME_CONFIG * THIS VALUE IS NOT GUARANTEED TO BE RESERVED AND SET TO 0. */ u32 PreviouslyUsed_20130206_2; - u32 Reserved2[42]; + u32 RetroSound; + u32 Reserved2[41]; }; typedef enum @@ -141,6 +142,7 @@ extern u32 menu(u16 *original_screen, bool8 FirstInvocation); extern void game_disableAudio(); extern void game_set_frameskip(); extern void game_set_fluidity(); +extern void game_set_retro(); extern void LowFrequencyCPU(); extern void HighFrequencyCPU(); extern void GameFrequencyCPU(); diff --git a/source/nds/message.h b/source/nds/message.h index bab9292..a166528 100644 --- a/source/nds/message.h +++ b/source/nds/message.h @@ -38,6 +38,7 @@ enum MSG FMT_VIDEO_FAST_FORWARD, FMT_VIDEO_FRAME_SKIPPING, FMT_AUDIO_SOUND, + FMT_AUDIO_RETRO_SOUND, FMT_SAVED_STATE_CREATE, FMT_SAVED_STATE_LOAD, MSG_SAVED_STATE_DELETE_GENERAL, |