Re: [hatari-devel] WinUAE settings for different machine types |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Hi,
On tiistai 22 toukokuu 2012, Nicolas Pomarède wrote:
> I think many games' protection (or the games themselves) as well as many
> demos won't work if bCompatibleCpu is not set.
> I would recommend to set it to false only for TOS/GEM program that don't
> expect a complete cpu emulation wrt to cycles and "exotic" features.
OK, I'll change it for both CPUs.
The changes I've thought to do are something like in the attached patch.
> On the other hand, I don't think there's a really measurable impact when
> setting this always to true (in my case, it's set to TRUE in my config
> file).
There actually can be a clearly user visible difference with this setting..
E.g. with the old Hatari version on N800 and N810 devices the sound quality
improved in some games considerably when compatible CPU was *disabled*,
because that used less CPU i.e. sound didn't break (as badly).
> So, if this is needed for better falcon results, I think we should set
> its defaut value to "TRUE" in configuration.c for all the machines.
>
> IMO, we should have Hatari with some default settings that ensure
> maximum accuracy (that is, the less possible troubles for a user who
> just want to load a disk and don't care for the config options).
> If the user later wants to use less cpu, that it will be up to him to
> disable accurate options (cpu, lower sound freq, ...)
Note that as SDL system dialog [1] has both machine type and and CPU
settings, it cannot change the other settings after user selects different
machine type. I.e. user needs to know also what else to change when
changing machine type in the SDL GUI.
My patch concerns only changing machine type from command line, or
TOS version from GUI or CLI. I.e. it's probably better if with SDL GUI
people change the machine type primarily by selecting suitable TOS. :-)
[1] Python UI changes the other values when changing to different
machine type, but it doesn't have any WinUAE options and not
even all old CPU system settings.
I wonder what the OSX GUI does...
- Eero
diff -r 90395a13fe6e src/change.c
--- a/src/change.c Tue May 22 00:20:28 2012 +0300
+++ b/src/change.c Tue May 22 00:49:48 2012 +0300
@@ -113,17 +113,21 @@
}
#endif
+ /* Did change CPU prefetch mode? */
+ if (changed->System.bCompatibleCpu != current->System.bCompatibleCpu)
+ return true;
+
#if ENABLE_WINUAE_CPU
/* Did change CPU address mode? */
if (changed->System.bAddressSpace24 != current->System.bAddressSpace24)
return true;
- /* Did change CPU prefetch mode? */
- if (changed->System.bCompatibleCpu != current->System.bCompatibleCpu)
+ /* Did change CPU cycle exact? */
+ if (changed->System.bCycleExactCpu != current->System.bCycleExactCpu)
return true;
- /* Did change CPU cycle exact? */
- if (changed->System.bCycleExactCpu != current->System.bCycleExactCpu)
+ /* Did change FPU? */
+ if (changed->System.n_FPUType != current->System.n_FPUType)
return true;
/* Did change MMU? */
diff -r 90395a13fe6e src/options.c
--- a/src/options.c Tue May 22 00:20:28 2012 +0300
+++ b/src/options.c Tue May 22 00:49:48 2012 +0300
@@ -1432,7 +1432,7 @@
else if (strcasecmp(argv[i], "falcon") == 0)
{
#if ENABLE_DSP_EMU
- ConfigureParams.System.nDSPType = DSP_TYPE_EMU;
+ ConfigureParams.System.nDSPType = DSP_TYPE_EMU;
#endif
ConfigureParams.System.nMachineType = MACHINE_FALCON;
ConfigureParams.System.nCpuLevel = 3;
@@ -1442,6 +1442,22 @@
{
return Opt_ShowError(OPT_MACHINE, argv[i], "Unknown machine type");
}
+ /* machine type change should always use compatible CPU */
+ ConfigureParams.System.bCompatibleCpu = true;
+#if ENABLE_WINUAE_CPU
+ ConfigureParams.System.bMMU = false; /* does this affect also other than 040 CPUs? */
+ ConfigureParams.System.bAddressSpace24 = true;
+ if (ConfigureParams.System.nCpuLevel > 0) {
+ /* TT / Falcon selected above */
+ ConfigureParams.System.bCycleExactCpu = true;
+ ConfigureParams.System.bCompatibleFPU = true;
+ ConfigureParams.System.n_FPUType = FPU_68882;
+ } else {
+ /* WinUAE cycles are configured for Falcon/030, so disable this for ST/STE */
+ ConfigureParams.System.bCycleExactCpu = false;
+ ConfigureParams.System.n_FPUType = FPU_NONE; /* TODO: or leave it as-is? */
+ }
+#endif
bLoadAutoSave = false;
break;
diff -r 90395a13fe6e src/tos.c
--- a/src/tos.c Tue May 22 00:20:28 2012 +0300
+++ b/src/tos.c Tue May 22 00:49:48 2012 +0300
@@ -437,6 +437,8 @@
*/
static void TOS_CheckSysConfig(void)
{
+ int oldCpuLevel = ConfigureParams.System.nCpuLevel;
+
if ((TosVersion == 0x0106 || TosVersion == 0x0162) && ConfigureParams.System.nMachineType != MACHINE_STE)
{
Log_AlertDlg(LOG_ERROR, "TOS versions 1.06 and 1.62 are for Atari STE only.\n"
@@ -511,6 +513,27 @@
ConfigureParams.System.nCpuLevel = 2;
M68000_CheckCpuSettings();
}
+ /* TOS version triggered machine type change? */
+ if (ConfigureParams.System.nCpuLevel != oldCpuLevel &&
+ ConfigureParams.System.nCpuLevel != 2)
+ {
+ /* machine type change should always use compatible CPU */
+ ConfigureParams.System.bCompatibleCpu = true;
+#if ENABLE_WINUAE_CPU
+ ConfigureParams.System.bMMU = false; /* TODO: does this affect also other than 040 CPUs? */
+ ConfigureParams.System.bAddressSpace24 = true;
+ if (ConfigureParams.System.nCpuLevel > 0) {
+ /* TT / Falcon selected above */
+ ConfigureParams.System.bCycleExactCpu = true;
+ ConfigureParams.System.bCompatibleFPU = true;
+ ConfigureParams.System.n_FPUType = FPU_68882;
+ } else {
+ /* WinUAE cycles are configured for Falcon/030, so disable this for ST/STE */
+ ConfigureParams.System.bCycleExactCpu = false;
+ ConfigureParams.System.n_FPUType = FPU_NONE; /* TODO: or leave it as-is? */
+ }
+#endif
+ }
if (TosVersion < 0x0104 && ConfigureParams.HardDisk.bUseHardDiskDirectories)
{
Log_AlertDlg(LOG_ERROR, "Please use at least TOS v1.04 for the HD directory emulation "