add more flexible mic configuration and add rand() mode for m&l 3 (could be changed to another builtin sample instead if we find one we like). remove alternate flush mode configuration from UI since it isnt even hooked up anymore.
This commit is contained in:
parent
9b7fd520cb
commit
ca086a3b85
|
@ -3783,6 +3783,7 @@ void FASTCALL _MMU_ARM7_write16(u32 adr, u16 val)
|
|||
return;
|
||||
|
||||
case 2 :
|
||||
//printf("%08X\n",MMU.SPI_CMD);
|
||||
switch(MMU.SPI_CMD & 0x70)
|
||||
{
|
||||
case 0x00 :
|
||||
|
|
|
@ -429,8 +429,9 @@ extern struct TCommonSettings {
|
|||
, DebugConsole(false)
|
||||
, single_core(true)
|
||||
, spuInterpolationMode(SPUInterpolation_Linear)
|
||||
, gfx3d_flushMode(0)
|
||||
//, gfx3d_flushMode(0)
|
||||
, manualBackupType(0)
|
||||
, micMode(InternalNoise)
|
||||
{
|
||||
strcpy(ARM9BIOS, "biosnds9.bin");
|
||||
strcpy(ARM7BIOS, "biosnds7.bin");
|
||||
|
@ -462,10 +463,18 @@ extern struct TCommonSettings {
|
|||
int infraBridgeAdapter;
|
||||
} wifi;
|
||||
|
||||
enum MicMode
|
||||
{
|
||||
InternalNoise = 0,
|
||||
Sample = 1,
|
||||
Random = 2,
|
||||
} micMode;
|
||||
|
||||
|
||||
SPUInterpolationMode spuInterpolationMode;
|
||||
|
||||
//this is a temporary hack until we straighten out the flushing logic and/or gxfifo
|
||||
int gfx3d_flushMode;
|
||||
//int gfx3d_flushMode;
|
||||
|
||||
//this is the user's choice of manual backup type, for cases when the autodetection can't be trusted
|
||||
int manualBackupType;
|
||||
|
|
|
@ -287,7 +287,6 @@ int emu_paused = 0;
|
|||
bool frameAdvance = false;
|
||||
bool staterewindingenabled = false;
|
||||
|
||||
bool UseMicSample = false;
|
||||
unsigned short windowSize = 0;
|
||||
|
||||
/* the firmware settings */
|
||||
|
@ -2141,7 +2140,7 @@ int _main()
|
|||
|
||||
cur3DCore = GetPrivateProfileInt("3D", "Renderer", GPU3D_OPENGL, IniName);
|
||||
CommonSettings.HighResolutionInterpolateColor = GetPrivateProfileBool("3D", "HighResolutionInterpolateColor", 1, IniName);
|
||||
CommonSettings.gfx3d_flushMode = GetPrivateProfileInt("3D", "AlternateFlush", 0, IniName);
|
||||
//CommonSettings.gfx3d_flushMode = GetPrivateProfileInt("3D", "AlternateFlush", 0, IniName);
|
||||
NDS_3D_ChangeCore(cur3DCore);
|
||||
|
||||
#ifdef BETA_VERSION
|
||||
|
@ -4397,7 +4396,7 @@ LRESULT CALLBACK GFX3DSettingsDlgProc(HWND hw, UINT msg, WPARAM wp, LPARAM lp)
|
|||
int i;
|
||||
|
||||
CheckDlgButton(hw,IDC_INTERPOLATECOLOR,CommonSettings.HighResolutionInterpolateColor?1:0);
|
||||
CheckDlgButton(hw,IDC_ALTERNATEFLUSH,CommonSettings.gfx3d_flushMode);
|
||||
//CheckDlgButton(hw,IDC_ALTERNATEFLUSH,CommonSettings.gfx3d_flushMode);
|
||||
|
||||
for(i = 0; core3DList[i] != NULL; i++)
|
||||
{
|
||||
|
@ -4417,8 +4416,8 @@ LRESULT CALLBACK GFX3DSettingsDlgProc(HWND hw, UINT msg, WPARAM wp, LPARAM lp)
|
|||
NDS_3D_ChangeCore(ComboBox_GetCurSel(GetDlgItem(hw, IDC_3DCORE)));
|
||||
WritePrivateProfileInt("3D", "Renderer", cur3DCore, IniName);
|
||||
WritePrivateProfileInt("3D", "HighResolutionInterpolateColor", CommonSettings.HighResolutionInterpolateColor?1:0, IniName);
|
||||
CommonSettings.gfx3d_flushMode = (IsDlgButtonChecked(hw,IDC_ALTERNATEFLUSH) == BST_CHECKED)?1:0;
|
||||
WritePrivateProfileInt("3D", "AlternateFlush", CommonSettings.gfx3d_flushMode, IniName);
|
||||
//CommonSettings.gfx3d_flushMode = (IsDlgButtonChecked(hw,IDC_ALTERNATEFLUSH) == BST_CHECKED)?1:0;
|
||||
//WritePrivateProfileInt("3D", "AlternateFlush", CommonSettings.gfx3d_flushMode, IniName);
|
||||
}
|
||||
case IDCANCEL:
|
||||
{
|
||||
|
@ -4431,8 +4430,8 @@ LRESULT CALLBACK GFX3DSettingsDlgProc(HWND hw, UINT msg, WPARAM wp, LPARAM lp)
|
|||
NDS_3D_ChangeCore(GPU3D_OPENGL);
|
||||
ComboBox_SetCurSel(GetDlgItem(hw, IDC_3DCORE), GPU3D_OPENGL);
|
||||
WritePrivateProfileInt("3D", "Renderer", GPU3D_OPENGL, IniName);
|
||||
CommonSettings.gfx3d_flushMode = 0;
|
||||
WritePrivateProfileInt("3D", "AlternateFlush", CommonSettings.gfx3d_flushMode, IniName);
|
||||
//CommonSettings.gfx3d_flushMode = 0;
|
||||
//WritePrivateProfileInt("3D", "AlternateFlush", CommonSettings.gfx3d_flushMode, IniName);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -4627,12 +4626,14 @@ LRESULT CALLBACK MicrophoneSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam,
|
|||
{
|
||||
HWND cur;
|
||||
|
||||
UseMicSample = GetPrivateProfileBool("Use Mic Sample", "UseMicSample", false, IniName);
|
||||
CheckDlgButton(hDlg, IDC_USEMICSAMPLE, ((UseMicSample == true) ? BST_CHECKED : BST_UNCHECKED));
|
||||
GetPrivateProfileString("Use Mic Sample", "MicSampleFile", "micsample.raw", MicSampleName, MAX_PATH, IniName);
|
||||
CommonSettings.micMode = (TCommonSettings::MicMode)GetPrivateProfileInt("MicSettings", "MicMode", (int)TCommonSettings::InternalNoise, IniName);
|
||||
CheckDlgButton(hDlg, IDC_USEMICSAMPLE, ((CommonSettings.micMode == TCommonSettings::Sample) ? BST_CHECKED : BST_UNCHECKED));
|
||||
CheckDlgButton(hDlg, IDC_USEMICRAND, ((CommonSettings.micMode == TCommonSettings::Random) ? BST_CHECKED : BST_UNCHECKED));
|
||||
CheckDlgButton(hDlg, IDC_USENOISE, ((CommonSettings.micMode == TCommonSettings::InternalNoise) ? BST_CHECKED : BST_UNCHECKED));
|
||||
GetPrivateProfileString("MicSettings", "MicSampleFile", "micsample.raw", MicSampleName, MAX_PATH, IniName);
|
||||
SetDlgItemText(hDlg, IDC_MICSAMPLE, MicSampleName);
|
||||
|
||||
if(UseMicSample == false)
|
||||
if(CommonSettings.micMode != TCommonSettings::Sample)
|
||||
{
|
||||
cur = GetDlgItem(hDlg, IDC_MICSAMPLE);
|
||||
EnableWindow(cur, FALSE);
|
||||
|
@ -4654,14 +4655,20 @@ LRESULT CALLBACK MicrophoneSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam,
|
|||
{
|
||||
HWND cur;
|
||||
|
||||
UseMicSample = IsDlgCheckboxChecked(hDlg, IDC_USEMICSAMPLE);
|
||||
if(IsDlgCheckboxChecked(hDlg, IDC_USEMICSAMPLE))
|
||||
CommonSettings.micMode = TCommonSettings::Sample;
|
||||
else if(IsDlgCheckboxChecked(hDlg, IDC_USEMICRAND))
|
||||
CommonSettings.micMode = TCommonSettings::Random;
|
||||
else if(IsDlgCheckboxChecked(hDlg, IDC_USENOISE))
|
||||
CommonSettings.micMode = TCommonSettings::InternalNoise;
|
||||
|
||||
cur = GetDlgItem(hDlg, IDC_MICSAMPLE);
|
||||
GetWindowText(cur, MicSampleName, 256);
|
||||
|
||||
WritePrivateProfileInt("Use Mic Sample", "UseMicSample", ((UseMicSample == true) ? 1 : 0), IniName);
|
||||
WritePrivateProfileString("Use Mic Sample", "MicSampleFile", MicSampleName, IniName);
|
||||
WritePrivateProfileInt("MicSettings", "MicMode", (int)CommonSettings.micMode, IniName);
|
||||
WritePrivateProfileString("MicSettings", "MicSampleFile", MicSampleName, IniName);
|
||||
|
||||
if (UseMicSample)
|
||||
if (CommonSettings.micMode == TCommonSettings::Sample)
|
||||
{
|
||||
if (!LoadSample(MicSampleName))
|
||||
{
|
||||
|
@ -4676,6 +4683,8 @@ LRESULT CALLBACK MicrophoneSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam,
|
|||
}
|
||||
return TRUE;
|
||||
|
||||
case IDC_USENOISE:
|
||||
case IDC_USEMICRAND:
|
||||
case IDC_USEMICSAMPLE:
|
||||
{
|
||||
HWND cur;
|
||||
|
|
|
@ -298,7 +298,9 @@ u8 Mic_ReadSample()
|
|||
micReadSamplePos=0;
|
||||
} else {
|
||||
//use the "random" values
|
||||
tmp = random[micReadSamplePos >> 1];
|
||||
if(CommonSettings.micMode == TCommonSettings::InternalNoise)
|
||||
tmp = random[micReadSamplePos >> 1];
|
||||
else tmp = rand();
|
||||
micReadSamplePos++;
|
||||
if(micReadSamplePos == ARRAY_SIZE(random)*2)
|
||||
micReadSamplePos=0;
|
||||
|
|
|
@ -169,10 +169,10 @@
|
|||
#define IDM_RENDER_HQ2X 552
|
||||
#define IDM_RENDER_2XSAI 553
|
||||
#define IDM_RENDER_SUPER2XSAI 554
|
||||
#define IDM_RENDER_SUPEREAGLE 555
|
||||
#define IDM_RENDER_SCANLINE 556
|
||||
#define IDM_RENDER_BILINEAR 557
|
||||
#define IDM_RENDER_NEAREST2X 558
|
||||
#define IDM_RENDER_SUPEREAGLE 555
|
||||
#define IDM_RENDER_SCANLINE 556
|
||||
#define IDM_RENDER_BILINEAR 557
|
||||
#define IDM_RENDER_NEAREST2X 558
|
||||
#define IDD_IO_REG 601
|
||||
#define IDM_RECORD_MOVIE 602
|
||||
#define IDM_PLAY_MOVIE 603
|
||||
|
@ -651,6 +651,8 @@
|
|||
#define IDC_MICSAMPLEBROWSE 5003
|
||||
#define IDC_MICSAMPLE 5004
|
||||
#define IDC_USEMICSAMPLE 5005
|
||||
#define IDC_USEMICRAND 5009
|
||||
#define IDC_USENOISE 5010
|
||||
#define IDC_CPU 6000
|
||||
#define IDC_IOREG 6001
|
||||
#define IDD_CHEAT_ADD_XX_CODE 10005
|
||||
|
@ -781,9 +783,9 @@
|
|||
#define IDC_HKCOMBO 60077
|
||||
#define IDD_KEYCUSTOM 60078
|
||||
#define IDM_HOTKEY_CONFIG 60079
|
||||
#define IDM_RENDER_HQ2XS 60081
|
||||
#define IDM_RENDER_LQ2X 60082
|
||||
#define IDM_RENDER_LQ2XS 60083
|
||||
#define IDM_RENDER_HQ2XS 60081
|
||||
#define IDM_RENDER_LQ2X 60082
|
||||
#define IDM_RENDER_LQ2XS 60083
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
|
@ -791,7 +793,7 @@
|
|||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 105
|
||||
#define _APS_NEXT_COMMAND_VALUE 40008
|
||||
#define _APS_NEXT_CONTROL_VALUE 1011
|
||||
#define _APS_NEXT_CONTROL_VALUE 1012
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue