|
|
1.1 root 1: #include <machine.h>
2: #include <stdio.h>
3: #include <stdlib.h>
4: #include <memz80.h>
5: #include <cpuz80.h>
6: #define UINT8 uint8
7: #define UINT16 uint16
8: #define UINT32 uint32
9: #define INT8 sint8
10: #define INT16 sint16
11: #define INT32 sint32
12:
13: typedef union {
14: #ifndef WORDS_BIGENDIAN
15: struct { UINT8 l,h,h2,h3; } b;
16: struct { UINT16 l,h; } w;
17: #else
18: struct { UINT8 h3,h2,h,l; } b;
19: struct { UINT16 h,l; } w;
20: #endif
21: UINT32 d;
22: } PAIR;
23: #define Z80_MAXDAISY 4
24: /* daisy-chain link */
25: typedef struct {
26: void (*reset)(int); /* reset callback */
27: int (*interrupt_entry)(int); /* entry callback */
28: void (*interrupt_reti)(int); /* reti callback */
29: int irq_param; /* callback paramater */
30: } Z80_DaisyChain;
31: #define INLINE inline
32: #define errorlog NULL
33: #define cpu_getactivecpu() 0
34: #define CLEAR_LINE 0
35: #define CALL_MAME_DEBUG /* */
36: #define REG_PREVIOUSPC -1
37: #define REG_SP_CONTENTS -2
38: #define Z80_INT_REQ 0x01 /* interrupt request mask */
39: #define Z80_INT_IEO 0x02 /* interrupt disable mask(IEO) */
40: #define cpu_readmem16(addr) memz80_fetchbyte((uint16)addr)
41: #define cpu_writemem16(addr,data) memz80_storebyte((uint16)addr, (data));
42: #define cpu_readop(addr) memz80_fetchbyte((uint16)addr)
43: #define cpu_readop_arg(addr) memz80_fetchbyte((uint16)addr)
44: #define cpu_readport(addr) cpuz80_portread((uint16)addr)
45: #define cpu_writeport(addr, data) cpuz80_portwrite((uint16)addr, (uint8)(data))
46: #define change_pc(addr) /* */
47: #define change_pc16(addr) /* */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.