Hi,
On lauantai 17 maaliskuu 2012, Andreas Grabher wrote:
There's a problem with detection, if a reset is necessary in new cpu
core. It has been fixed in Previous. Maybe take a look at previous
sources and FPUTYPE enum in configuration.h and M68000_CheckCpuSettings
in m68000.c.
You mean these changes:
http://previous.svn.sourceforge.net/viewvc/previous/trunk/src/includes/configuration.h?r1=137&r2=149
?
Yea, the FPU values given in configuration.h indeed seem wrong:
---------------
#if ENABLE_WINUAE_CPU
typedef enum
{
FPU_NONE,
FPU_68881,
FPU_68882,
FPU_CPU
} FPUTYPE;
#endif
...
FPUTYPE n_FPUType;
---------------
As they're transferred to "fpu_model" and WinUAE code uses these kind
of values for "fpu_model":
---------------
static int get_fpu_version (void)
{
int v = 0;
if (currprefs.fpu_revision>= 0)
return currprefs.fpu_revision;
switch (currprefs.fpu_model)
{
case 68881:
v = 0x1f;
break;
case 68882:
v = 0x20; /* ??? */
break;
case 68040:
v = 0x41;
break;
}
return v;
}
---------------
$ grep fpu_model $(find src/ -type f)
src/m68000.c: changed_prefs.fpu_model = ConfigureParams.System.n_FPUType;
src/cpu/custom.c: p->fpu_model = 68040;
src/cpu/custom.c: p->fpu_model = 68060;
src/cpu/newcpu.c: currprefs.fpu_model = changed_prefs.fpu_model;
src/cpu/newcpu.c: regs.pcr = currprefs.fpu_model == 68060 ?
MC68060_PCR : MC68EC060_PCR;
src/cpu/newcpu.c: if (currprefs.fpu_model) {
src/cpu/hatari-glue.c: currprefs.fpu_model = changed_prefs.fpu_model =
ConfigureParams.System.n_FPUType;
src/cpu/fpp.c: if (currprefs.fpu_model == 68060) {
src/cpu/fpp.c: } else if (currprefs.fpu_model == 68040) {
src/cpu/fpp.c: int idle_size = currprefs.fpu_model == 68882 ? 0x38
: 0x18;
src/cpu/fpp.c: if (currprefs.fpu_model == 68060) {
src/cpu/fpp.c: } else if (currprefs.fpu_model == 68040) {
---------------
(I left only interesting lines for last part.)
Laurent?
- Eero