|
|
1.1 root 1: /*
1.1.1.2 root 2: DSP M56001 emulation
3: Instructions interpreter, execution thread
1.1 root 4:
1.1.1.2 root 5: (C) 2003-2008 ARAnyM developer team
6:
7: This program is free software; you can redistribute it and/or modify
8: it under the terms of the GNU General Public License as published by
9: the Free Software Foundation; either version 2 of the License, or
10: (at your option) any later version.
11:
12: This program is distributed in the hope that it will be useful,
13: but WITHOUT ANY WARRANTY; without even the implied warranty of
14: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15: GNU General Public License for more details.
16:
17: You should have received a copy of the GNU General Public License
18: along with this program; if not, write to the Free Software
19: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20: */
21:
22: #ifndef DSP_CPU_H
23: #define DSP_CPU_H
24:
25: #ifdef __cplusplus
26: extern "C" {
27: #endif
1.1 root 28:
29: /* Defines */
30: #define DSP_OMR_MA 0x00
31: #define DSP_OMR_MB 0x01
32: #define DSP_OMR_DE 0x02
33: #define DSP_OMR_SD 0x06
34: #define DSP_OMR_EA 0x07
35:
36: #define DSP_SR_C 0x00
37: #define DSP_SR_V 0x01
38: #define DSP_SR_Z 0x02
39: #define DSP_SR_N 0x03
40: #define DSP_SR_U 0x04
41: #define DSP_SR_E 0x05
42: #define DSP_SR_L 0x06
43:
44: #define DSP_SR_I0 0x08
45: #define DSP_SR_I1 0x09
46: #define DSP_SR_S0 0x0a
47: #define DSP_SR_S1 0x0b
48: #define DSP_SR_T 0x0d
49: #define DSP_SR_LF 0x0f
50:
1.1.1.3 root 51: #define DSP_SP_SE 0x04
52: #define DSP_SP_UF 0x05
53:
1.1 root 54: /* Registers numbers in dsp.registers[] */
55: #define DSP_REG_X0 0x04
56: #define DSP_REG_X1 0x05
57: #define DSP_REG_Y0 0x06
58: #define DSP_REG_Y1 0x07
59: #define DSP_REG_A0 0x08
60: #define DSP_REG_B0 0x09
61: #define DSP_REG_A2 0x0a
62: #define DSP_REG_B2 0x0b
63: #define DSP_REG_A1 0x0c
64: #define DSP_REG_B1 0x0d
65: #define DSP_REG_A 0x0e
66: #define DSP_REG_B 0x0f
67:
68: #define DSP_REG_R0 0x10
69: #define DSP_REG_R1 0x11
70: #define DSP_REG_R2 0x12
71: #define DSP_REG_R3 0x13
72: #define DSP_REG_R4 0x14
73: #define DSP_REG_R5 0x15
74: #define DSP_REG_R6 0x16
75: #define DSP_REG_R7 0x17
76:
77: #define DSP_REG_N0 0x18
78: #define DSP_REG_N1 0x19
79: #define DSP_REG_N2 0x1a
80: #define DSP_REG_N3 0x1b
81: #define DSP_REG_N4 0x1c
82: #define DSP_REG_N5 0x1d
83: #define DSP_REG_N6 0x1e
84: #define DSP_REG_N7 0x1f
85:
86: #define DSP_REG_M0 0x20
87: #define DSP_REG_M1 0x21
88: #define DSP_REG_M2 0x22
89: #define DSP_REG_M3 0x23
90: #define DSP_REG_M4 0x24
91: #define DSP_REG_M5 0x25
92: #define DSP_REG_M6 0x26
93: #define DSP_REG_M7 0x27
94:
95: #define DSP_REG_SR 0x39
96: #define DSP_REG_OMR 0x3a
97: #define DSP_REG_SP 0x3b
98: #define DSP_REG_SSH 0x3c
99: #define DSP_REG_SSL 0x3d
100: #define DSP_REG_LA 0x3e
101: #define DSP_REG_LC 0x3f
102:
103: #define DSP_REG_NULL 0x00
104: #define DSP_REG_LCSAVE 0x30
105:
106: /* Memory spaces for dsp.ram[], dsp.rom[] */
107: #define DSP_SPACE_X 0x00
108: #define DSP_SPACE_Y 0x01
109: #define DSP_SPACE_P 0x02
110:
111: /* Functions */
1.1.1.3 root 112: extern void dsp56k_init_cpu(void *th_dsp_core); /* Set dsp_core to use */
113: extern void dsp56k_execute_instruction(void); /* Execute 1 instruction */
1.1 root 114:
1.1.1.4 ! root 115: /* Interrupt relative functions */
! 116: void dsp_add_interrupt(Uint16 inter);
! 117:
1.1.1.2 root 118: #ifdef __cplusplus
119: }
1.1 root 120: #endif
1.1.1.2 root 121:
122: #endif /* DSP_CPU_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.