Re: [hatari-devel] Microwire register value on Falcon

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


On 03/02/2012 23:36, Laurent Sallafranque wrote:
Hi,

I wanted to separate completly the falcon code and the ste code (for
understanding of the code).
I thought is was easier to understand when the code is in crossbar.c and
when it's in dmasnd.c,
As the first one is only Falcon and the second one is only STE.

But if you prefer to mix both falcon and ste code in dmasnd.c, it's no
problem for me.

I understand the need to split STE/Falcon code, but for some part of the code that really impacts performance, we should make some trade off.

A more readable way could be to rename DmaSnd_InterruptHandler_Microwire to InterruptHandler_Microwire then do sthg like that :

void InterruptHandler_Microwire ()
{
  if ( machine == falcon )
	Crossbar_InterruptHandler_Microwire
  else
	DmaSnd_InterruptHandler_Microwire
}

This way, dma and crossbar are put at the same "level" : we have a generic microwire interrupt that calls either STE or Falcon version.

Nicolas


Regards

Laurent


Le 03/02/2012 23:22, Nicolas Pomarède a écrit :
On 03/02/2012 23:02, Laurent Sallafranque wrote:
Hi,

I've finally taken 10 minutes to write the microwire emulation to the
end.
Like this, it's fully emulated.

Regards

Laurent

Hello

in your patch, could you use DmaSnd_InterruptHandler_Microwire instead
of creating Crossbar_InterruptHandler_Microwire ? The reason for this
is that modifying the interrupts array in cycint.c changes the
snapshot memory format, which means you can't load previous snapshot
after that.

For the user, we should try to avoid changing snapshot format when
possible, so when running in falcon mode, you can use the
DmaSnd_InterruptHandler_Microwire interrupt instead.

In DmaSnd_InterruptHandler_Microwire, you can then call
Crossbar_InterruptHandler_Microwir if machine == falcon

Interrupt handling in cycint.c is one of the most used part in the
emulation, it's called each time a CPU instruction is processed ; the
smaller we keep the possible interrupts list, the faster this list is
reordered when an interrupt happens.

Nicolas






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