Mercurial > repos > blastem
annotate x86_backend.h @ 254:64feb6b67244
Fix bug in end condition inside translate_z80_stream.
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 29 Apr 2013 22:37:47 -0700 |
parents | 63b9a500a00b |
children | 7b8a49220e3b |
rev | line source |
---|---|
211 | 1 #ifndef X86_BACKEND_H_ |
2 #define X86_BACKEND_H_ | |
3 | |
235
d9bf8e61c33c
Get Z80 core working for simple programs
Mike Pavone <pavone@retrodev.com>
parents:
211
diff
changeset
|
4 #include <stdint.h> |
d9bf8e61c33c
Get Z80 core working for simple programs
Mike Pavone <pavone@retrodev.com>
parents:
211
diff
changeset
|
5 |
d9bf8e61c33c
Get Z80 core working for simple programs
Mike Pavone <pavone@retrodev.com>
parents:
211
diff
changeset
|
6 #define INVALID_OFFSET 0xFFFFFFFF |
252
63b9a500a00b
Implement retranslating code when written to. Possibly broken, need to fix some other bugs before a proper test.
Mike Pavone <pavone@retrodev.com>
parents:
235
diff
changeset
|
7 #define EXTENSION_WORD 0xFFFFFFFE |
235
d9bf8e61c33c
Get Z80 core working for simple programs
Mike Pavone <pavone@retrodev.com>
parents:
211
diff
changeset
|
8 |
211 | 9 typedef struct { |
10 int32_t disp; | |
11 uint8_t mode; | |
12 uint8_t base; | |
13 uint8_t index; | |
14 uint8_t cycles; | |
15 } x86_ea; | |
16 | |
17 typedef struct { | |
18 uint8_t *base; | |
19 int32_t *offsets; | |
20 } native_map_slot; | |
21 | |
235
d9bf8e61c33c
Get Z80 core working for simple programs
Mike Pavone <pavone@retrodev.com>
parents:
211
diff
changeset
|
22 typedef struct deferred_addr { |
d9bf8e61c33c
Get Z80 core working for simple programs
Mike Pavone <pavone@retrodev.com>
parents:
211
diff
changeset
|
23 struct deferred_addr *next; |
d9bf8e61c33c
Get Z80 core working for simple programs
Mike Pavone <pavone@retrodev.com>
parents:
211
diff
changeset
|
24 uint8_t *dest; |
d9bf8e61c33c
Get Z80 core working for simple programs
Mike Pavone <pavone@retrodev.com>
parents:
211
diff
changeset
|
25 uint32_t address; |
d9bf8e61c33c
Get Z80 core working for simple programs
Mike Pavone <pavone@retrodev.com>
parents:
211
diff
changeset
|
26 } deferred_addr; |
d9bf8e61c33c
Get Z80 core working for simple programs
Mike Pavone <pavone@retrodev.com>
parents:
211
diff
changeset
|
27 |
d9bf8e61c33c
Get Z80 core working for simple programs
Mike Pavone <pavone@retrodev.com>
parents:
211
diff
changeset
|
28 typedef uint8_t * (*native_addr_func)(void * context, uint32_t address); |
d9bf8e61c33c
Get Z80 core working for simple programs
Mike Pavone <pavone@retrodev.com>
parents:
211
diff
changeset
|
29 |
d9bf8e61c33c
Get Z80 core working for simple programs
Mike Pavone <pavone@retrodev.com>
parents:
211
diff
changeset
|
30 deferred_addr * defer_address(deferred_addr * old_head, uint32_t address, uint8_t *dest); |
d9bf8e61c33c
Get Z80 core working for simple programs
Mike Pavone <pavone@retrodev.com>
parents:
211
diff
changeset
|
31 void process_deferred(deferred_addr ** head_ptr, void * context, native_addr_func get_native); |
d9bf8e61c33c
Get Z80 core working for simple programs
Mike Pavone <pavone@retrodev.com>
parents:
211
diff
changeset
|
32 |
211 | 33 #endif //X86_BACKEND_H_ |
34 |