[hatari-devel] DSP debug reworked

Eero Tamminen eerot at users.berlios.de
Wed May 5 21:37:04 CEST 2010


Hi,

On Wednesday 05 May 2010, npomarede at corp.free.fr wrote:
> On Wed, 5 May 2010, Laurent Sallafranque wrote:
> > I wanted to add TRACE_LOGs for dsp debugging inside hatari.
> > But I see in log.h that the 32 bits for LOGS are already used.
> >
> > Is there a way to add my dsp traces ?
>
> we could change LogTraceFlags to use Uint64 instead of Uint32, but I
> don't know if 64 bit are correctly supported on all possible cpus running
> hatari.

cycInt.c already uses "long long" so I don't think that's a problem.

But I was thinking of another solution, for two reasons:
- long longs are slower (only 64-bit CPUs support them natively, on other
  systems compiler needs several instructions for them)
- what we do when we run out of 64 flag bits?

What if subsystems with more flags would have their own flag variables?

For example video stuff has currently 8 flags.  You could use for those
a different macro (LOG_TRACE_VIDEO()?) which uses a different flag
variable.

(Support for different variables would need to be added to log.c too.)


> But let's not change this now, we must first release 1.4 and then we can
> think how to handle this.

Sure. :-)


	- Eero



More information about the hatari-devel mailing list