Rev 2247 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log
| Rev 2247 | Rev 2254 | ||
|---|---|---|---|
| Line 21... | Line 21... | ||
| 21 | */ |
21 | */ |
| 22 | 22 | ||
| 23 | #ifndef _Z80_WRAP_H_ |
23 | #ifndef _Z80_WRAP_H_ |
| 24 | #define _Z80_WRAP_H_ |
24 | #define _Z80_WRAP_H_ |
| 25 | 25 | ||
| - | 26 | #define SYS_CPM (1) |
|
| - | 27 | #define SYS_NEDOOS (2) |
|
| - | 28 | #define SYS_ZX (3) |
|
| - | 29 | ||
| - | 30 | struct type_detect |
|
| - | 31 | { |
|
| - | 32 | const char * const argument_name; |
|
| - | 33 | const int sys_type; |
|
| - | 34 | }; |
|
| 26 | 35 | ||
| 27 | enum z80_max_clocks |
36 | enum z80_max_clocks |
| 28 | { |
37 | { |
| 29 | Z80_MAX_CLOCKS = 10000000 |
38 | Z80_MAX_CLOCKS = 10000000 |
| 30 | }; |
39 | }; |
| 31 | 40 | ||
| 32 | 41 | ||
| 33 | struct z80_context |
42 | struct z80_context |
| 34 | { |
43 | { |
| 35 | Z80 z80; |
44 | Z80 z80; |
| - | 45 | uint16_t start_address; |
|
| - | 46 | uint16_t start_sp; |
|
| 36 | 47 | ||
| 37 | int was_ed; |
48 | int was_ed; |
| - | 49 | int was_23; |
|
| 38 | 50 | ||
| 39 | uint8_t z80_mem[65536]; |
51 | uint8_t z80_mem[65536]; |
| 40 | }; |
52 | }; |
| 41 | 53 | ||
| 42 | 54 | ||
| 43 | struct z80_context * z80_init(char * filename, int nedoos); |
55 | struct z80_context * z80_init(char * filename, int sys_type); |
| 44 | 56 | ||
| 45 | size_t z80_exec(struct z80_context * z80, size_t max_clocks, uint16_t addr); |
57 | size_t z80_exec(struct z80_context * z80, size_t max_clocks); |
| 46 | 58 | ||
| 47 | 59 | ||
| 48 | uint8_t z80_rdbyte(struct z80_context * z80, uint16_t addr); |
60 | uint8_t z80_rdbyte(struct z80_context * z80, uint16_t addr); |
| 49 | uint16_t z80_rdword_le(struct z80_context * z80, uint16_t addr); |
61 | uint16_t z80_rdword_le(struct z80_context * z80, uint16_t addr); |
| 50 | uint32_t z80_rdlong_le(struct z80_context * z80, uint16_t addr); |
62 | uint32_t z80_rdlong_le(struct z80_context * z80, uint16_t addr); |