1 |
cebix |
1.1 |
/* |
2 |
|
|
* emul_op.h - 68k opcodes for ROM patches |
3 |
|
|
* |
4 |
gbeauche |
1.15 |
* Basilisk II (C) 1997-2008 Christian Bauer |
5 |
cebix |
1.1 |
* |
6 |
|
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
|
* it under the terms of the GNU General Public License as published by |
8 |
|
|
* the Free Software Foundation; either version 2 of the License, or |
9 |
|
|
* (at your option) any later version. |
10 |
|
|
* |
11 |
|
|
* This program is distributed in the hope that it will be useful, |
12 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 |
|
|
* GNU General Public License for more details. |
15 |
|
|
* |
16 |
|
|
* You should have received a copy of the GNU General Public License |
17 |
|
|
* along with this program; if not, write to the Free Software |
18 |
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 |
|
|
*/ |
20 |
|
|
|
21 |
|
|
#ifndef EMUL_OP_H |
22 |
|
|
#define EMUL_OP_H |
23 |
|
|
|
24 |
|
|
// 68k opcodes |
25 |
|
|
const uint16 M68K_ILLEGAL = 0x4afc; |
26 |
|
|
const uint16 M68K_NOP = 0x4e71; |
27 |
|
|
const uint16 M68K_RTS = 0x4e75; |
28 |
|
|
const uint16 M68K_RTD = 0x4e74; |
29 |
cebix |
1.6 |
const uint16 M68K_RTR = 0x4e77; |
30 |
cebix |
1.1 |
const uint16 M68K_JMP = 0x4ef9; |
31 |
|
|
const uint16 M68K_JMP_A0 = 0x4ed0; |
32 |
|
|
const uint16 M68K_JSR = 0x4eb9; |
33 |
|
|
const uint16 M68K_JSR_A0 = 0x4e90; |
34 |
|
|
|
35 |
|
|
// Extended opcodes |
36 |
|
|
enum { |
37 |
|
|
M68K_EXEC_RETURN = 0x7100, // Extended opcodes (illegal moveq form) |
38 |
|
|
M68K_EMUL_BREAK, |
39 |
|
|
M68K_EMUL_OP_SHUTDOWN, |
40 |
|
|
M68K_EMUL_OP_RESET, |
41 |
|
|
M68K_EMUL_OP_CLKNOMEM, |
42 |
|
|
M68K_EMUL_OP_READ_XPRAM, |
43 |
|
|
M68K_EMUL_OP_READ_XPRAM2, |
44 |
|
|
M68K_EMUL_OP_PATCH_BOOT_GLOBS, |
45 |
|
|
M68K_EMUL_OP_FIX_BOOTSTACK, // 0x7108 |
46 |
|
|
M68K_EMUL_OP_FIX_MEMSIZE, |
47 |
|
|
M68K_EMUL_OP_INSTALL_DRIVERS, |
48 |
|
|
M68K_EMUL_OP_SERD, |
49 |
|
|
M68K_EMUL_OP_SONY_OPEN, |
50 |
|
|
M68K_EMUL_OP_SONY_PRIME, |
51 |
|
|
M68K_EMUL_OP_SONY_CONTROL, |
52 |
|
|
M68K_EMUL_OP_SONY_STATUS, |
53 |
|
|
M68K_EMUL_OP_DISK_OPEN, // 0x7110 |
54 |
|
|
M68K_EMUL_OP_DISK_PRIME, |
55 |
|
|
M68K_EMUL_OP_DISK_CONTROL, |
56 |
|
|
M68K_EMUL_OP_DISK_STATUS, |
57 |
|
|
M68K_EMUL_OP_CDROM_OPEN, |
58 |
|
|
M68K_EMUL_OP_CDROM_PRIME, |
59 |
|
|
M68K_EMUL_OP_CDROM_CONTROL, |
60 |
|
|
M68K_EMUL_OP_CDROM_STATUS, |
61 |
|
|
M68K_EMUL_OP_VIDEO_OPEN, // 0x7118 |
62 |
|
|
M68K_EMUL_OP_VIDEO_CONTROL, |
63 |
|
|
M68K_EMUL_OP_VIDEO_STATUS, |
64 |
|
|
M68K_EMUL_OP_SERIAL_OPEN, |
65 |
|
|
M68K_EMUL_OP_SERIAL_PRIME, |
66 |
|
|
M68K_EMUL_OP_SERIAL_CONTROL, |
67 |
|
|
M68K_EMUL_OP_SERIAL_STATUS, |
68 |
|
|
M68K_EMUL_OP_SERIAL_CLOSE, |
69 |
|
|
M68K_EMUL_OP_ETHER_OPEN, // 0x7120 |
70 |
|
|
M68K_EMUL_OP_ETHER_CONTROL, |
71 |
|
|
M68K_EMUL_OP_ETHER_READ_PACKET, |
72 |
|
|
M68K_EMUL_OP_ADBOP, |
73 |
|
|
M68K_EMUL_OP_INSTIME, |
74 |
|
|
M68K_EMUL_OP_RMVTIME, |
75 |
|
|
M68K_EMUL_OP_PRIMETIME, |
76 |
|
|
M68K_EMUL_OP_MICROSECONDS, |
77 |
|
|
M68K_EMUL_OP_SCSI_DISPATCH, // 0x7128 |
78 |
|
|
M68K_EMUL_OP_IRQ, |
79 |
|
|
M68K_EMUL_OP_PUT_SCRAP, |
80 |
gbeauche |
1.12 |
M68K_EMUL_OP_GET_SCRAP, |
81 |
cebix |
1.1 |
M68K_EMUL_OP_CHECKLOAD, |
82 |
|
|
M68K_EMUL_OP_AUDIO, |
83 |
cebix |
1.2 |
M68K_EMUL_OP_EXTFS_COMM, |
84 |
|
|
M68K_EMUL_OP_EXTFS_HFS, |
85 |
gbeauche |
1.12 |
M68K_EMUL_OP_BLOCK_MOVE, // 0x7130 |
86 |
|
|
M68K_EMUL_OP_SOUNDIN_OPEN, |
87 |
cebix |
1.7 |
M68K_EMUL_OP_SOUNDIN_PRIME, |
88 |
|
|
M68K_EMUL_OP_SOUNDIN_CONTROL, |
89 |
|
|
M68K_EMUL_OP_SOUNDIN_STATUS, |
90 |
|
|
M68K_EMUL_OP_SOUNDIN_CLOSE, |
91 |
jlachmann |
1.8 |
M68K_EMUL_OP_DEBUGUTIL, |
92 |
gbeauche |
1.14 |
M68K_EMUL_OP_IDLE_TIME, |
93 |
cebix |
1.1 |
M68K_EMUL_OP_MAX // highest number |
94 |
|
|
}; |
95 |
|
|
|
96 |
|
|
// Functions |
97 |
|
|
extern void EmulOp(uint16 opcode, struct M68kRegisters *r); // Execute EMUL_OP opcode (called by 68k emulator or Line-F trap handler) |
98 |
|
|
|
99 |
|
|
#endif |