Skip to content

Commit 170cb2f

Browse files
committed
Rename Game Speed to Refresh Rate
The setting varies between games, as it makes some run slower than expected
1 parent a6ce261 commit 170cb2f

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ An alternative forwarder generator for 3DS users. YANBF forwarders are 3DS-mode
7272
- Parts of libtwl code used
7373
- Pokémon Wii connection patch from Pico Loader
7474
- SD -> flashcard R/W patch for DSiWare
75-
- Frame rate adjustment code from [FastVideoDSPlayer](https://github.com/Gericom/FastVideoDSPlayer) used for game speed adjustment
75+
- Frame/Refresh rate adjustment code from [FastVideoDSPlayer](https://github.com/Gericom/FastVideoDSPlayer)
7676

7777
## Other
7878
- [devkitPro](https://devkitpro.org): devkitARM and libnds

retail/arm9/source/conf_sd.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ void getIgmStrings(configuration* conf, bool b4ds) {
624624
setIgmString(lang.fetch("OPTIONS", "MAIN_SCREEN", "Main Screen").c_str(), igmText->optionsLabels[0]);
625625
setIgmString(lang.fetch("OPTIONS", "BRIGHTNESS", "Brightness").c_str(), igmText->optionsLabels[1]);
626626
setIgmString(lang.fetch("OPTIONS", "VOLUME", "Volume").c_str(), igmText->optionsLabels[2]);
627-
setIgmString(lang.fetch("OPTIONS", "GAME_SPEED", "Game Speed").c_str(), igmText->optionsLabels[3]);
627+
setIgmString(lang.fetch("OPTIONS", "REFRESH_RATE", "Refresh Rate").c_str(), igmText->optionsLabels[3]);
628628
setIgmString(lang.fetch("OPTIONS", "CLOCK_SPEED", "Clock Speed").c_str(), igmText->optionsLabels[4]);
629629
setIgmString(lang.fetch("OPTIONS", "VRAM_MODE", "VRAM Mode").c_str(), igmText->optionsLabels[5]);
630630
setIgmString(lang.fetch("OPTIONS", "AUTO", "Auto").c_str(), igmText->optionsValues[0]);

retail/cardenginei/arm9_igm/source/inGameMenu.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ static u8 arm7RamBak[0xC0];
3636
static u16* vramBak = (u16*)INGAME_MENU_EXT_LOCATION+(0x18200/sizeof(u16));
3737
static u16* bmpBuffer = (u16*)INGAME_MENU_EXT_LOCATION;
3838

39-
#define gameSpeedCount 5
40-
static const char* gameSpeedText[gameSpeedCount] = {"0.50x", "0.75x", "0.9x", "1x", "1.2x (no 3D)"};
41-
static int gameSpeeds[gameSpeedCount] = {30000, 45000, 50, 60000, 75000};
42-
static int gameSpeed = 3;
39+
#define refreshRateCount 5
40+
static const char* refreshRateText[refreshRateCount] = {"29.9hz", "44.9hz", "50hz", "59.9hz", "74.9hz no3D"};
41+
static int refreshRates[refreshRateCount] = {30000, 45000, 50, 60000, 75000};
42+
static int refreshRate = 3;
4343
#else
4444
cardengineArm9* volatile ce9 = NULL;
4545

@@ -423,7 +423,7 @@ static void optionsMenu(s32 *mainScreen, u32 consoleModel) {
423423
optionsItems[optionsItemCount++] = OPTIONS_BRIGHTNESS;
424424
#ifndef B4DS
425425
optionsItems[optionsItemCount++] = OPTIONS_VOLUME;
426-
optionsItems[optionsItemCount++] = OPTIONS_GAME_SPEED;
426+
optionsItems[optionsItemCount++] = OPTIONS_REFRESH_RATE;
427427
optionsItems[optionsItemCount++] = OPTIONS_CLOCK_SPEED;
428428
optionsItems[optionsItemCount++] = OPTIONS_VRAM_MODE;
429429
#endif
@@ -452,8 +452,8 @@ static void optionsMenu(s32 *mainScreen, u32 consoleModel) {
452452
optionPercent = (u8)(sharedAddr[6] >> 16) * 100 / 31;
453453
isString = false;
454454
break;
455-
case OPTIONS_GAME_SPEED:
456-
optionValue = (unsigned char*)gameSpeedText[gameSpeed];
455+
case OPTIONS_REFRESH_RATE:
456+
optionValue = (unsigned char*)refreshRateText[refreshRate];
457457
break;
458458
case OPTIONS_CLOCK_SPEED:
459459
optionValue = igmText.optionsValues[3 + ((REG_SCFG_CLK == 0 ? scfgClkBak : REG_SCFG_CLK) & 1)];
@@ -540,26 +540,26 @@ static void optionsMenu(s32 *mainScreen, u32 consoleModel) {
540540
}
541541
break;
542542
}
543-
case OPTIONS_GAME_SPEED:
544-
const int prevGameSpeed = gameSpeed;
543+
case OPTIONS_REFRESH_RATE:
544+
const int prevRefreshRate = refreshRate;
545545
if (KEYS & KEY_LEFT) {
546-
gameSpeed--;
547-
if (gameSpeed < 0) gameSpeed = 0;
546+
refreshRate--;
547+
if (refreshRate < 0) refreshRate = 0;
548548
} else {
549-
gameSpeed++;
550-
if (gameSpeed == gameSpeedCount) gameSpeed = gameSpeedCount-1;
549+
refreshRate++;
550+
if (refreshRate == refreshRateCount) refreshRate = refreshRateCount-1;
551551
}
552-
if (gameSpeed != prevGameSpeed) {
553-
sharedAddr[0] = gameSpeeds[gameSpeed];
552+
if (refreshRate != prevRefreshRate) {
553+
sharedAddr[0] = refreshRates[refreshRate];
554554
sharedAddr[4] = 0x41535046; // FPSA
555555
while(sharedAddr[4] == 0x41535046) {
556556
while (REG_VCOUNT != 191) mySwiDelay(100);
557557
while (REG_VCOUNT == 191) mySwiDelay(100);
558558
}
559559
if (sharedAddr[0] == 0xFFFFFFFF) {
560-
gameSpeed = prevGameSpeed;
560+
refreshRate = prevRefreshRate;
561561
} else {
562-
DC_FlushRange(&gameSpeed, 4);
562+
DC_FlushRange(&refreshRate, 4);
563563
}
564564
}
565565
break;

retail/cardenginei/arm9_igm/source/inGameMenu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ typedef enum {
2020
#ifndef B4DS
2121
,
2222
OPTIONS_VOLUME,
23-
OPTIONS_GAME_SPEED,
23+
OPTIONS_REFRESH_RATE,
2424
OPTIONS_CLOCK_SPEED,
2525
OPTIONS_VRAM_MODE
2626
#endif

retail/nitrofiles/languages/en/in_game_menu.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ QUIT_GAME=Quit Game
1818
MAIN_SCREEN=Main Screen
1919
BRIGHTNESS=Brightness
2020
VOLUME=Volume
21-
GAME_SPEED=Game Speed
21+
REFRESH_RATE=Refresh Rate
2222
CLOCK_SPEED=Clock Speed
2323
VRAM_MODE=VRAM Mode
2424

0 commit comments

Comments
 (0)