Re: [hatari-devel] Suspected problem iwith TimerD patch

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi Roger,

On 12/10/20 1:22 AM, Roger Burrows wrote:
On the EmuTOS list, Eero reported that the program Bomb Squad
(http://www.atarimania.com/game-atari-st-bomb-squad-falcon030_21766.html) runs
a lot more slowly under EmuTOS (latest version) than under TOS4.04 (both
running under Hatari 2.2.1).  After lengthy investigation, I believe that this
is caused by a Hatari problem.
....
After reading the comments in Hatari's mfp.c, I interpret this to mean that
when running EmuTOS, Hatari will have to evaluate the interrupt queue much more
often than it would on TOS 4.04, causing a major slowdown on my somewhat slow
system.

This game doesn't need DSP, so you can run it
with "--dsp none" for a large emulation perf
boost.

Game works also without CPU cache emulation (like
many other Falcon programs that don't communicate
with DSP), so you can disable that too, with
"--cpu-exact off", for another large perf boost.

(And MMU can be off also, but that's not enabled by default.)


I made a simple change to Hatari (in mfp.c, commented out the line:
	bAppliedTimerDPatch = true;
in function MFP_TimerCDCtrl_WriteByte()), and re-ran the above tests and
tracing.  The "trace mfp_start" output under EmuTOS looked the same as under
TOS4.04, and there was no slowdown.

I had forgotten that I have that enabled Timer-D
patching by default, but when I tested toggling
it now (--timer-d on/off), it doesn't have any
effect on the game speed under EmuTOS.


Nicolas, bAppliedTimerDPatch variable seems to
be dead in the latest Git code, so it can be
removed:
--------------------------
$ git grep TimerDPatch
src/mfp.c:static bool bAppliedTimerDPatch; /* true if the Timer-D patch has been applied */
src/mfp.c:      bAppliedTimerDPatch = false;
--------------------------

(Roger, this changed because Hatari emulates
now multiple MFPs, so Hatari has per-MFP variable
for whether patching was applied.)


Of course, my change almost certainly is much too simplistic, but I believe
that the above test shows that this is a Hatari problem that ought to be fixed.

	- Eero



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/