Mercurial > repos > blastem
annotate blastem.h @ 345:29d2ca563499
Don't sync the 68K clock to the VDP clock unless the 68K had to wait for the VDP. This unfortunately breaks the direct color DMA demos, but should be more correct overall.
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 19 May 2013 13:47:47 -0700 |
parents | a8ee7934a1f8 |
children | 2f264d2a60c2 |
rev | line source |
---|---|
66 | 1 #ifndef BLASTEM_H_ |
2 #define BLASTEM_H_ | |
3 | |
75 | 4 #include <stdint.h> |
198
209a37eed3e7
Add support for breaking into the debugger while game is running
Mike Pavone <pavone@retrodev.com>
parents:
75
diff
changeset
|
5 #include "m68k_to_x86.h" |
288
a8ee7934a1f8
Add a YM2612 stub implementation with just timers and status registers so that games that depend on it can run.
Mike Pavone <pavone@retrodev.com>
parents:
198
diff
changeset
|
6 #include "z80_to_x86.h" |
a8ee7934a1f8
Add a YM2612 stub implementation with just timers and status registers so that games that depend on it can run.
Mike Pavone <pavone@retrodev.com>
parents:
198
diff
changeset
|
7 #include "ym2612.h" |
a8ee7934a1f8
Add a YM2612 stub implementation with just timers and status registers so that games that depend on it can run.
Mike Pavone <pavone@retrodev.com>
parents:
198
diff
changeset
|
8 #include "vdp.h" |
75 | 9 |
66 | 10 typedef struct { |
11 uint32_t th_counter; | |
12 uint32_t timeout_cycle; | |
13 uint8_t output; | |
14 uint8_t control; | |
15 uint8_t input[3]; | |
16 } io_port; | |
17 | |
288
a8ee7934a1f8
Add a YM2612 stub implementation with just timers and status registers so that games that depend on it can run.
Mike Pavone <pavone@retrodev.com>
parents:
198
diff
changeset
|
18 typedef struct { |
a8ee7934a1f8
Add a YM2612 stub implementation with just timers and status registers so that games that depend on it can run.
Mike Pavone <pavone@retrodev.com>
parents:
198
diff
changeset
|
19 m68k_context *m68k; |
a8ee7934a1f8
Add a YM2612 stub implementation with just timers and status registers so that games that depend on it can run.
Mike Pavone <pavone@retrodev.com>
parents:
198
diff
changeset
|
20 z80_context *z80; |
a8ee7934a1f8
Add a YM2612 stub implementation with just timers and status registers so that games that depend on it can run.
Mike Pavone <pavone@retrodev.com>
parents:
198
diff
changeset
|
21 vdp_context *vdp; |
a8ee7934a1f8
Add a YM2612 stub implementation with just timers and status registers so that games that depend on it can run.
Mike Pavone <pavone@retrodev.com>
parents:
198
diff
changeset
|
22 ym2612_context *ym; |
a8ee7934a1f8
Add a YM2612 stub implementation with just timers and status registers so that games that depend on it can run.
Mike Pavone <pavone@retrodev.com>
parents:
198
diff
changeset
|
23 } genesis_context; |
a8ee7934a1f8
Add a YM2612 stub implementation with just timers and status registers so that games that depend on it can run.
Mike Pavone <pavone@retrodev.com>
parents:
198
diff
changeset
|
24 |
66 | 25 #define GAMEPAD_TH0 0 |
26 #define GAMEPAD_TH1 1 | |
27 #define GAMEPAD_EXTRA 2 | |
28 | |
29 extern io_port gamepad_1; | |
30 extern io_port gamepad_2; | |
31 | |
32 void io_adjust_cycles(io_port * pad, uint32_t current_cycle, uint32_t deduction); | |
75 | 33 uint16_t read_dma_value(uint32_t address); |
198
209a37eed3e7
Add support for breaking into the debugger while game is running
Mike Pavone <pavone@retrodev.com>
parents:
75
diff
changeset
|
34 m68k_context * debugger(m68k_context * context, uint32_t address); |
66 | 35 |
36 #endif //BLASTEM_H_ | |
37 |