Exemple #1
0
bool	DSP_ProcessIRQ(void)
{
	if (bDspHostInterruptPending && regs.intmask < 6)
	{
		M68000_Exception(IoMem_ReadByte(0xffa203)*4, M68000_EXC_SRC_INT_DSP);
		bDspHostInterruptPending = false;
//		M68000_UnsetSpecial(SPCFLAG_DSP);
		return true;
	}

	return false;
}
Exemple #2
0
/**
 * Do given Native Feature, if it is supported
 * and set 'retval' accordingly.
 *
 * Return true if caller is to proceed normally,
 * false if there was an exception.
 */
bool NatFeat_Call(Uint32 stack, bool super, Uint32 *retval)
{
    Uint32 subid = STMemory_ReadLong(stack);
    unsigned int idx = MASTERID2IDX(subid);
    subid = MASKOUTMASTERID(subid);

    if (idx >= ARRAYSIZE(features)) {
        LOG_TRACE(TRACE_NATFEATS, "ERROR: invalid NF ID %d requested\n", idx);
        return true; /* undefined */
    }
    if (features[idx].super && !super) {
        LOG_TRACE(TRACE_NATFEATS, "ERROR: NF function %d called without supervisor mode\n", idx);
#ifndef WINUAE_FOR_HATARI
        M68000_Exception(8, M68000_EXC_SRC_CPU);
#else
        M68000_Exception(8, M68000_EXC_SRC_CPU);
#endif
        return false;
    }
    stack += SIZE_LONG;
    return features[idx].cb(stack, subid, retval);
}