Re: [hatari-devel] DSP and HREQ

[ Thread Index | Date Index | More Archives ]

Le 27/01/2015 23:17, Laurent Sallafranque a écrit :

OK, I need some help now ;)
Nicolas, I think you've pointed out a bugged part of the DSP emulation ;)

First, I've rewrote the code into hatari dsp emulation like this :
(The if statement seemed to be wrong to me).

static void dsp_core_hostport_update_hreq(void)
     int hreq;

     hreq = (dsp_core.hostport[CPU_HOST_ICR] &
dsp_core.hostport[CPU_HOST_ISR]) & 0x3;

     /* Trigger host interrupt? */
     if ((hreq != 0) && ((dsp_core.hostport[CPU_HOST_ISR] &
(1<<CPU_HOST_ISR_HREQ)) == 0)) {
         fprintf(stderr, "Interrupt\n");

     /* Set HREQ bit in hostport */
     dsp_core.hostport[CPU_HOST_ISR] &= 0x7f;
     dsp_core.hostport[CPU_HOST_ISR] |= (hreq?1:0) << CPU_HOST_ISR_HREQ;

Now, I get the fprintf message displayed into the console when I run my
test code.

when in doubt, it's always better to add paranthesis :)

But : it seems I never reach the $3c address (ie in my test program, I
never break into dsp_inter)

Could it be because of the     move.w    #$2500,sr ?
Or some bad inner code into hatari ?

I read the default vector number was $f in dsp56001, which would call $3c ; but maybe there's another value in the falcon's dsp ? What do you read at ffa203.B ?


Mail converted by MHonArc 2.6.19+