Mercurial > repos > blastem
annotate blastem.h @ 472:93dc0382fd70
Fix VSRAM reads
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 15 Sep 2013 22:43:01 -0700 |
parents | 140af5509ce7 |
children | 3e1573fa22cf |
rev | line source |
---|---|
467
140af5509ce7
Added copyright notice to source files and added GPL license text in COPYING
Mike Pavone <pavone@retrodev.com>
parents:
451
diff
changeset
|
1 /* |
140af5509ce7
Added copyright notice to source files and added GPL license text in COPYING
Mike Pavone <pavone@retrodev.com>
parents:
451
diff
changeset
|
2 Copyright 2013 Michael Pavone |
140af5509ce7
Added copyright notice to source files and added GPL license text in COPYING
Mike Pavone <pavone@retrodev.com>
parents:
451
diff
changeset
|
3 This file is part of BlastEm. |
140af5509ce7
Added copyright notice to source files and added GPL license text in COPYING
Mike Pavone <pavone@retrodev.com>
parents:
451
diff
changeset
|
4 BlastEm is free software distributed under the terms of the GNU General Public License version 3 or greater. See COPYING for full license text. |
140af5509ce7
Added copyright notice to source files and added GPL license text in COPYING
Mike Pavone <pavone@retrodev.com>
parents:
451
diff
changeset
|
5 */ |
66 | 6 #ifndef BLASTEM_H_ |
7 #define BLASTEM_H_ | |
8 | |
75 | 9 #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
|
10 #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
|
11 #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
|
12 #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
|
13 #include "vdp.h" |
354
15dd6418fe67
Initial PSG support. Mostly works, noise channel is borked though.
Mike Pavone <pavone@retrodev.com>
parents:
351
diff
changeset
|
14 #include "psg.h" |
421
d0cacb4ade0b
Move IO code to a separate file and do a tiny bit of refactoring
Mike Pavone <pavone@retrodev.com>
parents:
418
diff
changeset
|
15 #include "io.h" |
430
7f84090ab1cd
Add config file parser and default config file
Mike Pavone <pavone@retrodev.com>
parents:
421
diff
changeset
|
16 #include "config.h" |
66 | 17 |
351
2f264d2a60c2
Support for SRAM with SEGA mapper. Half-finished support for SRAM without SEGA mapper.
Mike Pavone <pavone@retrodev.com>
parents:
288
diff
changeset
|
18 #define RAM_FLAG_ODD 0x1800 |
2f264d2a60c2
Support for SRAM with SEGA mapper. Half-finished support for SRAM without SEGA mapper.
Mike Pavone <pavone@retrodev.com>
parents:
288
diff
changeset
|
19 #define RAM_FLAG_EVEN 0x1000 |
2f264d2a60c2
Support for SRAM with SEGA mapper. Half-finished support for SRAM without SEGA mapper.
Mike Pavone <pavone@retrodev.com>
parents:
288
diff
changeset
|
20 #define RAM_FLAG_BOTH 0x0000 |
2f264d2a60c2
Support for SRAM with SEGA mapper. Half-finished support for SRAM without SEGA mapper.
Mike Pavone <pavone@retrodev.com>
parents:
288
diff
changeset
|
21 |
421
d0cacb4ade0b
Move IO code to a separate file and do a tiny bit of refactoring
Mike Pavone <pavone@retrodev.com>
parents:
418
diff
changeset
|
22 #define CYCLE_NEVER 0xFFFFFFFF |
d0cacb4ade0b
Move IO code to a separate file and do a tiny bit of refactoring
Mike Pavone <pavone@retrodev.com>
parents:
418
diff
changeset
|
23 |
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
|
24 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
|
25 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
|
26 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
|
27 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
|
28 ym2612_context *ym; |
354
15dd6418fe67
Initial PSG support. Mostly works, noise channel is borked though.
Mike Pavone <pavone@retrodev.com>
parents:
351
diff
changeset
|
29 psg_context *psg; |
351
2f264d2a60c2
Support for SRAM with SEGA mapper. Half-finished support for SRAM without SEGA mapper.
Mike Pavone <pavone@retrodev.com>
parents:
288
diff
changeset
|
30 uint8_t *save_ram; |
2f264d2a60c2
Support for SRAM with SEGA mapper. Half-finished support for SRAM without SEGA mapper.
Mike Pavone <pavone@retrodev.com>
parents:
288
diff
changeset
|
31 uint32_t save_ram_mask; |
2f264d2a60c2
Support for SRAM with SEGA mapper. Half-finished support for SRAM without SEGA mapper.
Mike Pavone <pavone@retrodev.com>
parents:
288
diff
changeset
|
32 uint32_t save_flags; |
2f264d2a60c2
Support for SRAM with SEGA mapper. Half-finished support for SRAM without SEGA mapper.
Mike Pavone <pavone@retrodev.com>
parents:
288
diff
changeset
|
33 uint8_t bank_regs[8]; |
421
d0cacb4ade0b
Move IO code to a separate file and do a tiny bit of refactoring
Mike Pavone <pavone@retrodev.com>
parents:
418
diff
changeset
|
34 io_port ports[3]; |
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
|
35 } 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
|
36 |
421
d0cacb4ade0b
Move IO code to a separate file and do a tiny bit of refactoring
Mike Pavone <pavone@retrodev.com>
parents:
418
diff
changeset
|
37 extern genesis_context * genesis; |
d0cacb4ade0b
Move IO code to a separate file and do a tiny bit of refactoring
Mike Pavone <pavone@retrodev.com>
parents:
418
diff
changeset
|
38 extern int break_on_sync; |
451
b7c3b2d22858
Added support for saving savestates. Added gst savestate format test harness
Mike Pavone <pavone@retrodev.com>
parents:
430
diff
changeset
|
39 extern int save_state; |
430
7f84090ab1cd
Add config file parser and default config file
Mike Pavone <pavone@retrodev.com>
parents:
421
diff
changeset
|
40 extern tern_node * config; |
451
b7c3b2d22858
Added support for saving savestates. Added gst savestate format test harness
Mike Pavone <pavone@retrodev.com>
parents:
430
diff
changeset
|
41 extern uint8_t busreq; |
b7c3b2d22858
Added support for saving savestates. Added gst savestate format test harness
Mike Pavone <pavone@retrodev.com>
parents:
430
diff
changeset
|
42 extern uint8_t reset; |
66 | 43 |
75 | 44 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
|
45 m68k_context * debugger(m68k_context * context, uint32_t address); |
66 | 46 |
47 #endif //BLASTEM_H_ | |
48 |