--- hatari/src/falcon/dsp_cpu.h 2019/04/01 07:13:46 1.1.1.1 +++ hatari/src/falcon/dsp_cpu.h 2019/04/09 08:52:10 1.1.1.6 @@ -1,28 +1,34 @@ /* - * Dsp56K emulation kernel - * - * ARAnyM (C) 2003 Patrice Mandin - * Adaption to Hatari (C) 2006 by Thomas Huth - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ + DSP M56001 emulation + Instructions interpreter, execution thread -#ifndef _DSP_CPU_H_ -#define _DSP_CPU_H_ + (C) 2003-2008 ARAnyM developer team + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef DSP_CPU_H +#define DSP_CPU_H + +#ifdef __cplusplus +extern "C" { +#endif /* Defines */ +#define BITMASK(x) ((1<<(x))-1) + #define DSP_OMR_MA 0x00 #define DSP_OMR_MB 0x01 #define DSP_OMR_DE 0x02 @@ -44,6 +50,9 @@ #define DSP_SR_T 0x0d #define DSP_SR_LF 0x0f +#define DSP_SP_SE 0x04 +#define DSP_SP_UF 0x05 + /* Registers numbers in dsp.registers[] */ #define DSP_REG_X0 0x04 #define DSP_REG_X1 0x05 @@ -102,6 +111,15 @@ #define DSP_SPACE_P 0x02 /* Functions */ -int dsp56k_do_execute(void *); +extern void dsp56k_init_cpu(void); /* Set dsp_core to use */ +extern void dsp56k_execute_instruction(void); /* Execute 1 instruction */ +extern Uint16 dsp56k_execute_one_disasm_instruction(Uint16 pc); /* Execute 1 instruction in disasm mode */ +/* Interrupt relative functions */ +void dsp_add_interrupt(Uint16 inter); + +#ifdef __cplusplus +} #endif + +#endif /* DSP_CPU_H */