summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/itech8.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/itech8.h')
-rw-r--r--src/mame/includes/itech8.h52
1 files changed, 41 insertions, 11 deletions
diff --git a/src/mame/includes/itech8.h b/src/mame/includes/itech8.h
index 7e98f201e3d..d031b64ecc2 100644
--- a/src/mame/includes/itech8.h
+++ b/src/mame/includes/itech8.h
@@ -31,7 +31,6 @@ public:
m_fakey(*this, "FAKEY"),
m_visarea(0, 0, 0, 0) { }
- void grmatch(machine_config &config);
void rimrockn(machine_config &config);
void gtg2(machine_config &config);
void slikshot_lo(machine_config &config);
@@ -46,7 +45,6 @@ public:
void hstennis_hi(machine_config &config);
void init_rimrockn();
- void init_grmatch();
void init_peggle();
void init_slikshot();
void init_neckneck();
@@ -57,7 +55,7 @@ public:
DECLARE_CUSTOM_INPUT_MEMBER(special_r);
DECLARE_CUSTOM_INPUT_MEMBER(gtg_mux);
-private:
+protected:
static constexpr uint32_t YBUFFER_COUNT = 15;
static constexpr uint32_t VRAM_SIZE = 0x40000;
static constexpr uint32_t VRAM_MASK = VRAM_SIZE - 1;
@@ -68,7 +66,8 @@ private:
TIMER_BEHIND_BEAM_UPDATE,
TIMER_DELAYED_SOUND_DATA,
TIMER_BLITTER_DONE,
- TIMER_DELAYED_Z80_CONTROL
+ TIMER_DELAYED_Z80_CONTROL,
+ TIMER_BASE_LAST = TIMER_DELAYED_Z80_CONTROL
};
required_device<cpu_device> m_maincpu;
@@ -116,9 +115,6 @@ private:
uint8_t m_fetch_rle_literal;
uint8_t *m_grom_base;
uint32_t m_grom_size;
- uint8_t m_grmatch_palcontrol;
- uint8_t m_grmatch_xscroll;
- rgb_t m_grmatch_palette[2][16];
emu_timer *m_irq_off_timer;
emu_timer *m_behind_beam_update_timer;
emu_timer *m_delayed_sound_data_timer;
@@ -141,8 +137,6 @@ private:
DECLARE_WRITE8_MEMBER(blitter_w);
DECLARE_WRITE8_MEMBER(tms34061_w);
DECLARE_READ8_MEMBER(tms34061_r);
- DECLARE_WRITE8_MEMBER(grmatch_palette_w);
- DECLARE_WRITE8_MEMBER(grmatch_xscroll_w);
DECLARE_WRITE8_MEMBER(pia_porta_out);
DECLARE_WRITE8_MEMBER(ym2203_portb_out);
@@ -153,7 +147,6 @@ private:
DECLARE_MACHINE_START(sstrike);
uint32_t screen_update_2layer(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
- uint32_t screen_update_grmatch(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
uint32_t screen_update_slikshot(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
uint32_t screen_update_2page(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
uint32_t screen_update_2page_large(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
@@ -164,7 +157,6 @@ private:
TIMER_CALLBACK_MEMBER(behind_the_beam_update);
TIMER_CALLBACK_MEMBER(delayed_sound_data_w);
TIMER_CALLBACK_MEMBER(blitter_done);
- TIMER_DEVICE_CALLBACK_MEMBER(grmatch_palette_update);
inline uint8_t fetch_next_raw();
inline void consume_raw(int count);
@@ -205,6 +197,7 @@ private:
void itech8_sound_ym2608b(machine_config &config);
void itech8_sound_ym3812(machine_config &config);
void itech8_sound_ym3812_external(machine_config &config);
+ void itech8_core_devices(machine_config &config);
void itech8_core_lo(machine_config &config);
void itech8_core_hi(machine_config &config);
void gtg2_map(address_map &map);
@@ -220,3 +213,40 @@ private:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
};
+
+class grmatch_state : public itech8_state
+{
+public:
+ grmatch_state(const machine_config &mconfig, device_type type, const char *tag)
+ : itech8_state(mconfig, type, tag),
+ m_palette_timer(nullptr)
+ {
+ }
+
+ void grmatch(machine_config &config);
+
+ void driver_init() override;
+
+protected:
+ void machine_start() override;
+ void machine_reset() override;
+
+ enum
+ {
+ TIMER_PALETTE = TIMER_BASE_LAST+1,
+ };
+
+ virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+
+ DECLARE_WRITE8_MEMBER(palette_w);
+ DECLARE_WRITE8_MEMBER(xscroll_w);
+
+ uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+
+ void palette_update();
+
+ emu_timer *m_palette_timer;
+ uint8_t m_palcontrol;
+ uint8_t m_xscroll;
+ rgb_t m_palette[2][16];
+};