[hatari-devel] I'm lucky ;) K.prg is working

Laurent Sallafranque laurent.sallafranque at free.fr
Tue Feb 23 18:08:27 CET 2010


I've returned to the original code, and I've tried this :

    if (regs.spcflags) {
        do_specialties();
//        return;
    }


It doesn't work. (And I think I can't use "F12" or close Hatari's 
window, it doesn't react anymore).

I've kept this patch and I've then activated : "Patch Timer D" and rebooted.

K.PRG works, but sound is sometimes crashing completely and becomes 
correct again after 1-2 seconds.


I think there's another problem : some cpu instruction can take up to 
258 cycles (perhaps more).
Many takes more than 50 cycles.

But at 44Khz, the sound interrupt needs 80 cycles.
That's probably why sound becomes noisy sometimes (There's a lost of 2 
samples in the worst case).

Example with a GT2 player :
25 Mhz : 81 Cycles      decimal : 31495
32 Mhz : 64 Cycles      decimal : 6710

Regards,

Laurent





Laurent Sallafranque a écrit :
> Perhaps just removing the return ?
>
> Laurent
>
>
> npomarede at corp.free.fr a écrit :
>   
>> On Tue, 23 Feb 2010, Laurent Sallafranque wrote:
>>
>>     
>>> OK, I'll try all these tests tonight.
>>> But just a last question :
>>>
>>> Why shouldn't we execute some DSP code if there was an exception or 
>>> interrupt ?
>>> (the return after do_specialties ())
>>>       
>> You're right, I didn't pay attention to this, but this is obviously 
>> wrong to return without running the dsp part.
>>
>> But moving dsp code block is not completly correct, because at that 
>> point (before do_specialites) "cycles" doesn't take into account the 
>> number of cycles generated by the exception.
>>
>> I will try to post a patch this evening that solves both cases.
>>
>> Nicolas
>>
>>
>>     
>
> _______________________________________________
> hatari-devel mailing list
> hatari-devel at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/hatari-devel
>
>
>   




More information about the hatari-devel mailing list