summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes
diff options
context:
space:
mode:
author Jackson <kazblox@users.noreply.github.com>2018-05-20 11:01:19 -0400
committer Jackson <kazblox@users.noreply.github.com>2018-05-20 11:01:19 -0400
commitad71b1124716bc07b90ccf6db12ffa93c431d66e (patch)
tree4a0c61e5d359e620357cffe70689c1a54e58298a /src/mame/includes
parentd0810869403ddbf334481cb9e3048e9d3442bf62 (diff)
markham.cpp changes:
Merged with strnskil.cpp, with modernization and cleanups. (nw) Add MCFG_SCREEN_RAW_PARAMS. (nw) Added coin counters to markham, strnskil, banbam and clones.
Diffstat (limited to 'src/mame/includes')
-rw-r--r--src/mame/includes/markham.h117
1 files changed, 95 insertions, 22 deletions
diff --git a/src/mame/includes/markham.h b/src/mame/includes/markham.h
index ca78dec440e..c3e5e5e53dd 100644
--- a/src/mame/includes/markham.h
+++ b/src/mame/includes/markham.h
@@ -2,41 +2,114 @@
// copyright-holders:Uki
/*************************************************************************
- Markham
+ Markham (c) 1983 Sun Electronics
+ Strength & Skill (c) 1984 Sun Electronics
*************************************************************************/
+#ifndef MAME_INCLUDES_MARKHAM_H
+#define MAME_INCLUDES_MARKHAM_H
+
+#pragma once
+
+#include "machine/timer.h"
+
+#include "cpu/z80/z80.h"
+#include "cpu/mb88xx/mb88xx.h"
+#include "sound/sn76496.h"
+#include "screen.h"
+#include "speaker.h"
+
class markham_state : public driver_device
{
public:
+ // construction/destruction
markham_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_spriteram(*this, "spriteram"),
- m_videoram(*this, "videoram"),
- m_xscroll(*this, "xscroll"),
- m_maincpu(*this, "maincpu"),
- m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette") { }
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_subcpu(*this, "subcpu")
+ , m_mcu(*this, "mcu")
+ , m_sn(*this, "sn%u", 1U)
+ , m_screen(*this, "screen")
+ , m_gfxdecode(*this, "gfxdecode")
+ , m_palette(*this, "palette")
+ , m_spriteram(*this, "spriteram")
+ , m_videoram(*this, "videoram")
+ , m_xscroll(*this, "xscroll")
+ , m_scroll_ctrl(0)
+ , m_irq_source(0)
+ , m_irq_scanline_start(0)
+ , m_irq_scanline_end(0)
+ , m_coin_unlock(false)
+ {
+ }
- /* memory pointers */
- required_shared_ptr<uint8_t> m_spriteram;
- required_shared_ptr<uint8_t> m_videoram;
- required_shared_ptr<uint8_t> m_xscroll;
+ void init_banbam();
+ void init_pettanp();
- /* video-related */
- tilemap_t *m_bg_tilemap;
+ void markham(machine_config &config);
+ void strnskil(machine_config &config);
+ void banbam(machine_config &config);
+
+ void base_master_map(address_map &map);
+ void markham_master_map(address_map &map);
+ void strnskil_master_map(address_map &map);
+ void markham_slave_map(address_map &map);
+ void strnskil_slave_map(address_map &map);
+
+protected:
+ DECLARE_WRITE8_MEMBER(coin_output_w);
+ template<int Bit> DECLARE_WRITE8_MEMBER(flipscreen_w);
+ DECLARE_WRITE8_MEMBER(videoram_w);
+
+ // markham specific
DECLARE_READ8_MEMBER(markham_e004_r);
- DECLARE_WRITE8_MEMBER(markham_videoram_w);
- DECLARE_WRITE8_MEMBER(markham_flipscreen_w);
- TILE_GET_INFO_MEMBER(get_bg_tile_info);
+
+ // strnskil specific
+ DECLARE_READ8_MEMBER(strnskil_d800_r);
+
+ // protection comms for banbam/pettanp
+ DECLARE_READ8_MEMBER(pettanp_protection_r);
+ DECLARE_READ8_MEMBER(banbam_protection_r);
+ DECLARE_WRITE8_MEMBER(protection_w);
+
virtual void video_start() override;
- DECLARE_PALETTE_INIT(markham);
+
uint32_t screen_update_markham(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
+ uint32_t screen_update_strnskil(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+
+ TILE_GET_INFO_MEMBER(get_bg_tile_info);
+
+ DECLARE_PALETTE_INIT(markham);
+ DECLARE_VIDEO_START(strnskil);
+
+ void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
+
+ TIMER_DEVICE_CALLBACK_MEMBER(strnskil_scanline);
+
+private:
required_device<cpu_device> m_maincpu;
+ required_device<cpu_device> m_subcpu;
+ optional_device<cpu_device> m_mcu;
+ required_device_array<sn76496_device, 2> m_sn;
+ required_device<screen_device> m_screen;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
- void markham(machine_config &config);
- void markham_master_map(address_map &map);
- void markham_slave_map(address_map &map);
+
+ /* memory pointers */
+ required_shared_ptr<uint8_t> m_spriteram;
+ required_shared_ptr<uint8_t> m_videoram;
+ required_shared_ptr<uint8_t> m_xscroll;
+
+ /* video-related */
+ tilemap_t *m_bg_tilemap;
+
+ uint8_t m_scroll_ctrl;
+ uint8_t m_irq_source;
+ uint8_t m_irq_scanline_start;
+ uint8_t m_irq_scanline_end;
+
+ bool m_coin_unlock;
};
+
+#endif // MAME_INCLUDES_MARKHAM_H \ No newline at end of file