[hatari-devel] WinAUE wide chars usage and what to do with it?
Nicolas Pomarède
npomarede at corp.free.fr
Tue Jan 18 00:18:34 CET 2011
Le 17/01/2011 23:33, Laurent Sallafranque a écrit :
> I've tested Nicola's patch.
>
> It doesn't change anything to Eko_system (this demo suffers from a
> strange problem).
>
> Worse, Rot3DBmp.prg doesn't work anymore.
>
> This program is a very good candidate, because the developpers transfer
> datas from 68030 to DSP in "real time", without testing before if the
> precedent data was taken into account by the DSP. (No synchronisation
> before sending the datas).
>
Hmmm, in that case that's what I would call implicit synchronisation,
and in my opinion it's the harder case to reach because it means DSP and
CPU are really in sync in such a way that you don't need to test if data
were correctly sent/received.
So, I think this program is more a candidate for later when things are
improved.
> I'll continue to dig into all of this.
>
> I'm pretty sure that Nicola's patch is the good one, but there's still
> some work to do before let it run.
>
> Nicolas, is it still possible to use the following code in the newcpu ?
>
> if (bDspEnabled)
> Cycles_SetCounter(CYCLES_COUNTER_CPU, 0); /* to measure the total number
> of cycles spent in the cpu */
>
It should work if M68000_AddCycles is called in m68k_run ; it's the case
in m68k_run_2 but not in m68k_run_2p, so it can't work in this later case.
Cycles_SetCounter works by using nCyclesMainCounter (which is increased
by M68000_AddCycles), but in that case, I don't understand why you do
"cpu_cycles * 2" and not "cpu_cycles" ? Where does this "*2" come from ?
You should check that for a simple instruction, NOP for instance, you
really get 4 cycles in the end (that is : the DSP should have
nHostCycles=4 when entering DSP_Run ; if it's not the case, something is
wrong).
Don't hesitate to add some printf to see the value of cpu_cycles and
check it's coherent with motorola's doc for 68020/30
Nicolas
More information about the hatari-devel
mailing list