summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/divebomb.h
diff options
context:
space:
mode:
author cam900 <dbtlrchl@naver.com>2018-03-19 12:54:56 +0900
committer ajrhacker <ajrhacker@users.noreply.github.com>2018-03-18 23:54:56 -0400
commit371de0c5c0793a72d5f09667917d496aa4096a99 (patch)
tree098e06d073960216c3fc36895e031ab687103f2a /src/mame/includes/divebomb.h
parent647ea55ea5fc93b00f48101aa959040910206dc1 (diff)
divebomb.cpp cleanups (#3350)
* divebomb.cpp : Minor cleanup, Add generic_latch_8_device for cpu comms, Add input_merger_any_high_device for fgcpu irq, Fix tags * divebomb.cpp : Minor cleanup
Diffstat (limited to 'src/mame/includes/divebomb.h')
-rw-r--r--src/mame/includes/divebomb.h65
1 files changed, 26 insertions, 39 deletions
diff --git a/src/mame/includes/divebomb.h b/src/mame/includes/divebomb.h
index c82ee5aa097..4de581ddb39 100644
--- a/src/mame/includes/divebomb.h
+++ b/src/mame/includes/divebomb.h
@@ -7,6 +7,8 @@
*************************************************************************/
#include "cpu/z80/z80.h"
+#include "machine/gen_latch.h"
+#include "machine/input_merger.h"
#include "sound/sn76496.h"
#include "video/k051316.h"
@@ -16,50 +18,45 @@ class divebomb_state : public driver_device
{
public:
divebomb_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_spritecpu(*this, "spritecpu"),
- m_fgcpu(*this, "fgcpu"),
- m_rozcpucpu(*this, "rozcpu"),
- m_bank1(*this, "bank1"),
- m_fgram(*this, "fgram"),
- m_spriteram(*this, "spriteram"),
- m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette"),
- m_k051316_1(*this, "k051316_1"),
- m_k051316_2(*this, "k051316_2")
- { }
+ : driver_device(mconfig, type, tag)
+ , m_spritecpu(*this, "spritecpu")
+ , m_fgcpu(*this, "fgcpu")
+ , m_rozcpucpu(*this, "rozcpu")
+ , m_rozbank(*this, "rozbank")
+ , m_fgram(*this, "fgram")
+ , m_spriteram(*this, "spriteram")
+ , m_gfxdecode(*this, "gfxdecode")
+ , m_palette(*this, "palette")
+ , m_k051316(*this, "k051316_%u", 1)
+ , m_fgcpu_irq(*this, "fgcpu_irq")
+ , m_spr2fg_latch(*this, "spr2fg")
+ , m_roz2fg_latch(*this, "roz2fg")
+ {
+ }
required_device<cpu_device> m_spritecpu;
required_device<cpu_device> m_fgcpu;
required_device<cpu_device> m_rozcpucpu;
- required_memory_bank m_bank1;
+ required_memory_bank m_rozbank;
required_shared_ptr<uint8_t> m_fgram;
required_shared_ptr<uint8_t> m_spriteram;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
- required_device<k051316_device> m_k051316_1;
- required_device<k051316_device> m_k051316_2;
+ required_device_array<k051316_device, 2> m_k051316;
+ required_device<input_merger_any_high_device> m_fgcpu_irq;
+ required_device<generic_latch_8_device> m_spr2fg_latch;
+ required_device<generic_latch_8_device> m_roz2fg_latch;
tilemap_t *m_fg_tilemap;
- uint8_t to_spritecpu;
- uint8_t to_rozcpu;
- uint8_t from_sprite;
- uint8_t from_roz;
- bool has_fromsprite;
- bool has_fromroz;
- uint8_t roz_pal;
- bool roz1_enable;
- bool roz2_enable;
- bool roz1_wrap;
- bool roz2_wrap;
+ uint8_t m_roz_pal;
+ bool m_roz_enable[2];
DECLARE_MACHINE_RESET(divebomb);
DECLARE_MACHINE_START(divebomb);
DECLARE_VIDEO_START(divebomb);
DECLARE_PALETTE_INIT(divebomb);
- void update_irqs();
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
void decode_proms(const uint8_t* rgn, int size, int index, bool inv);
uint32_t screen_update_divebomb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -69,24 +66,14 @@ public:
TILE_GET_INFO_MEMBER(get_fg_tile_info);
- DECLARE_READ8_MEMBER(fgcpu_roz_comm_r);
- DECLARE_WRITE8_MEMBER(fgcpu_roz_comm_w);
- DECLARE_READ8_MEMBER(fgcpu_spr_comm_r);
- DECLARE_WRITE8_MEMBER(fgcpu_spr_comm_w);
DECLARE_READ8_MEMBER(fgcpu_comm_flags_r);
DECLARE_WRITE8_MEMBER(fgram_w);
DECLARE_WRITE8_MEMBER(spritecpu_port00_w);
- DECLARE_READ8_MEMBER(spritecpu_comm_r);
- DECLARE_WRITE8_MEMBER(spritecpu_comm_w);
DECLARE_WRITE8_MEMBER(rozcpu_bank_w);
- DECLARE_WRITE8_MEMBER(rozcpu_wrap1_enable_w);
- DECLARE_WRITE8_MEMBER(rozcpu_enable1_w);
- DECLARE_WRITE8_MEMBER(rozcpu_enable2_w);
- DECLARE_WRITE8_MEMBER(rozcpu_wrap2_enable_w);
- DECLARE_READ8_MEMBER(rozcpu_comm_r);
- DECLARE_WRITE8_MEMBER(rozcpu_comm_w);
+ template<int Chip> DECLARE_WRITE8_MEMBER(rozcpu_wrap_enable_w);
+ template<int Chip> DECLARE_WRITE8_MEMBER(rozcpu_enable_w);
DECLARE_WRITE8_MEMBER(rozcpu_pal_w);
void divebomb(machine_config &config);
void divebomb_fgcpu_iomap(address_map &map);