summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes
diff options
context:
space:
mode:
author Tom <37988779+TwistedTom@users.noreply.github.com>2019-11-14 14:35:20 +0000
committer Vas Crabb <cuavas@users.noreply.github.com>2019-11-15 01:35:20 +1100
commit09bf7fe735bc2defd3c33dad3dd1818f2e06f68a (patch)
tree6e126147dd57a73dd5ab60743e894dc725c3d719 /src/mame/includes
parentd1086ca8b12b0d3061edd4628574c7e9825c3b9a (diff)
Follow-up to "Cps1 bootlegs, some more new sets #5895" (#5899)
* create fcrash.h * change includes, add to arcade.lua
Diffstat (limited to 'src/mame/includes')
-rw-r--r--src/mame/includes/cps1.h178
-rw-r--r--src/mame/includes/fcrash.h102
2 files changed, 104 insertions, 176 deletions
diff --git a/src/mame/includes/cps1.h b/src/mame/includes/cps1.h
index e5188624944..a8b687fdd68 100644
--- a/src/mame/includes/cps1.h
+++ b/src/mame/includes/cps1.h
@@ -9,6 +9,8 @@
#ifndef MAME_INCLUDES_CPS1_H
#define MAME_INCLUDES_CPS1_H
+#pragma once
+
#include "sound/msm5205.h"
#include "sound/qsound.h"
#include "sound/okim6295.h"
@@ -408,182 +410,6 @@ private:
int m_ecofghtr_dial_last1;
};
-class fcrash_state : public cps_state
-{
-public:
- fcrash_state(const machine_config &mconfig, device_type type, const char *tag)
- : cps_state(mconfig, type, tag, 1)
- , m_msm_1(*this, "msm1")
- , m_msm_2(*this, "msm2")
- , m_bootleg_sprite_renderer(&fcrash_state::fcrash_render_sprites)
- { }
-
- void fcrash(machine_config &config);
- void cawingbl(machine_config &config);
- void kodb(machine_config &config);
- void mtwinsb(machine_config &config);
- void sf2m1(machine_config &config);
- void sgyxz(machine_config &config);
- void wofabl(machine_config &config);
- void varthb(machine_config &config);
-
- void init_cawingbl();
- void init_kodb();
- void init_mtwinsb();
- void init_sf2m1();
- void init_wofabl();
-
-protected:
- DECLARE_MACHINE_START(fcrash);
- DECLARE_MACHINE_RESET(fcrash);
- DECLARE_MACHINE_START(cawingbl);
- DECLARE_MACHINE_START(kodb);
- DECLARE_MACHINE_START(mtwinsb);
- DECLARE_MACHINE_START(sf2m1);
- DECLARE_MACHINE_START(sgyxz);
-
- DECLARE_WRITE16_MEMBER(fcrash_soundlatch_w);
- DECLARE_WRITE8_MEMBER(fcrash_snd_bankswitch_w);
- DECLARE_WRITE_LINE_MEMBER(m5205_int1);
- DECLARE_WRITE_LINE_MEMBER(m5205_int2);
- DECLARE_WRITE8_MEMBER(fcrash_msm5205_0_data_w);
- DECLARE_WRITE8_MEMBER(fcrash_msm5205_1_data_w);
- DECLARE_WRITE16_MEMBER(cawingbl_soundlatch_w);
- DECLARE_WRITE16_MEMBER(kodb_layer_w);
- DECLARE_WRITE16_MEMBER(mtwinsb_layer_w);
- DECLARE_WRITE16_MEMBER(sf2m1_layer_w);
- DECLARE_WRITE16_MEMBER(varthb_layer_w);
- DECLARE_WRITE16_MEMBER(varthb_layer2_w);
-
- uint32_t screen_update_fcrash(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void fcrash_update_transmasks();
- void fcrash_render_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void fcrash_render_layer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int layer, int primask);
- void fcrash_render_high_layer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int layer);
- void fcrash_build_palette();
-
- void fcrash_map(address_map &map);
- void mtwinsb_map(address_map &map);
- void sf2m1_map(address_map &map);
- void sgyxz_map(address_map &map);
- void wofabl_map(address_map &map);
- void varthb_map(address_map &map);
-
- void fcrash_sound_map(address_map &map);
- void kodb_sound_map(address_map &map);
- void sgyxz_sound_map(address_map &map);
-
- /* sound hw */
- int m_sample_buffer1;
- int m_sample_buffer2;
- int m_sample_select1;
- int m_sample_select2;
-
- /* video config */
- uint8_t m_layer_enable_reg;
- uint8_t m_layer_mask_reg[4];
- int m_layer_scroll1x_offset;
- int m_layer_scroll2x_offset;
- int m_layer_scroll3x_offset;
- int m_sprite_base;
- int m_sprite_list_end_marker;
- int m_sprite_x_offset;
- std::unique_ptr<uint16_t[]> m_bootleg_sprite_ram;
- std::unique_ptr<uint16_t[]> m_bootleg_work_ram;
-
- optional_device<msm5205_device> m_msm_1;
- optional_device<msm5205_device> m_msm_2;
-
- void (fcrash_state::*m_bootleg_sprite_renderer)(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
-};
-
-class cps1bl_5205_state : public fcrash_state
-{
-public:
- cps1bl_5205_state(const machine_config &mconfig, device_type type, const char *tag)
- : fcrash_state(mconfig, type, tag)
- , m_msm_mux(*this, "msm_mux%u", 1)
- { }
-
- void captcommb2(machine_config &config);
- void sf2b(machine_config &config);
- void sf2mdt(machine_config &config);
-
- void init_captcommb2();
- void init_knightsb();
- void init_sf2b();
- void init_sf2mdt();
- void init_sf2mdta();
- void init_sf2mdtb();
-
-private:
- DECLARE_MACHINE_START(captcommb2);
- DECLARE_MACHINE_RESET(captcommb2);
- DECLARE_MACHINE_START(sf2mdt);
-
- DECLARE_WRITE16_MEMBER(captcommb2_layer_w);
- DECLARE_WRITE16_MEMBER(captcommb2_soundlatch_w);
- DECLARE_READ8_MEMBER(captcommb2_soundlatch_r);
- DECLARE_WRITE8_MEMBER(captcommb2_snd_bankswitch_w);
- DECLARE_WRITE_LINE_MEMBER(captcommb2_mux_select_w);
- DECLARE_WRITE16_MEMBER(knightsb_layer_w);
- DECLARE_WRITE16_MEMBER(sf2b_layer_w);
- DECLARE_WRITE16_MEMBER(sf2mdt_layer_w);
- DECLARE_WRITE16_MEMBER(sf2mdt_soundlatch_w);
- DECLARE_WRITE16_MEMBER(sf2mdta_layer_w);
-
- void captcommb2_map(address_map &map);
- void sf2b_map(address_map &map);
- void sf2mdt_map(address_map &map);
- void captcommb2_z80map(address_map &map);
-
- bool m_captcommb2_mux_toggle;
-
- optional_device_array<ls157_device, 2> m_msm_mux;
-
- void captcommb2_render_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
-};
-
-class cps1bl_pic_state : public fcrash_state
-{
-public:
- cps1bl_pic_state(const machine_config &mconfig, device_type type, const char *tag)
- : fcrash_state(mconfig, type, tag)
- { }
-
- void dinopic(machine_config &config);
- void punipic(machine_config &config);
- void slampic(machine_config &config);
- void slampic2(machine_config &config);
-
- void init_dinopic();
- void init_punipic();
- void init_punipic3();
- void init_slampic();
- void init_slampic2();
-
-private:
- DECLARE_MACHINE_START(dinopic);
- DECLARE_MACHINE_START(punipic);
- DECLARE_MACHINE_START(slampic);
- DECLARE_MACHINE_START(slampic2);
-
- DECLARE_WRITE16_MEMBER(dinopic_layer_w);
- DECLARE_WRITE16_MEMBER(dinopic_layer2_w);
- DECLARE_WRITE16_MEMBER(punipic_layer_w);
- DECLARE_WRITE16_MEMBER(slampic_layer_w);
- DECLARE_WRITE16_MEMBER(slampic_layer2_w);
- DECLARE_READ16_MEMBER(slampic2_cps_a_r);
- DECLARE_WRITE16_MEMBER(slampic2_sound_w);
- DECLARE_WRITE16_MEMBER(slampic2_sound2_w);
-
- void dinopic_map(address_map &map);
- void punipic_map(address_map &map);
- void slampic_map(address_map &map);
- void slampic2_map(address_map &map);
-
- void slampic2_render_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
-};
/*----------- defined in drivers/cps1.cpp -----------*/
diff --git a/src/mame/includes/fcrash.h b/src/mame/includes/fcrash.h
new file mode 100644
index 00000000000..2baa071dfbe
--- /dev/null
+++ b/src/mame/includes/fcrash.h
@@ -0,0 +1,102 @@
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
+/***************************************************************************
+
+ CPS1 bootleg "Final Crash" hardware
+
+***************************************************************************/
+
+#ifndef MAME_INCLUDES_FCRASH_H
+#define MAME_INCLUDES_FCRASH_H
+
+#pragma once
+
+#include "includes/cps1.h"
+
+class fcrash_state : public cps_state
+{
+public:
+ fcrash_state(const machine_config &mconfig, device_type type, const char *tag)
+ : cps_state(mconfig, type, tag, 1)
+ , m_msm_1(*this, "msm1")
+ , m_msm_2(*this, "msm2")
+ { }
+
+ void fcrash(machine_config &config);
+ void cawingbl(machine_config &config);
+ void kodb(machine_config &config);
+ void mtwinsb(machine_config &config);
+ void sf2m1(machine_config &config);
+ void sgyxz(machine_config &config);
+ void wofabl(machine_config &config);
+ void varthb(machine_config &config);
+
+ void init_cawingbl();
+ void init_kodb();
+ void init_mtwinsb();
+ void init_sf2m1();
+ void init_wofabl();
+
+protected:
+ DECLARE_MACHINE_START(fcrash);
+ DECLARE_MACHINE_RESET(fcrash);
+ DECLARE_MACHINE_START(cawingbl);
+ DECLARE_MACHINE_START(kodb);
+ DECLARE_MACHINE_START(mtwinsb);
+ DECLARE_MACHINE_START(sf2m1);
+ DECLARE_MACHINE_START(sgyxz);
+
+ DECLARE_WRITE16_MEMBER(fcrash_soundlatch_w);
+ DECLARE_WRITE8_MEMBER(fcrash_snd_bankswitch_w);
+ DECLARE_WRITE_LINE_MEMBER(m5205_int1);
+ DECLARE_WRITE_LINE_MEMBER(m5205_int2);
+ DECLARE_WRITE8_MEMBER(fcrash_msm5205_0_data_w);
+ DECLARE_WRITE8_MEMBER(fcrash_msm5205_1_data_w);
+ DECLARE_WRITE16_MEMBER(cawingbl_soundlatch_w);
+ DECLARE_WRITE16_MEMBER(kodb_layer_w);
+ DECLARE_WRITE16_MEMBER(mtwinsb_layer_w);
+ DECLARE_WRITE16_MEMBER(sf2m1_layer_w);
+ DECLARE_WRITE16_MEMBER(varthb_layer_w);
+ DECLARE_WRITE16_MEMBER(varthb_layer2_w);
+
+ uint32_t screen_update_fcrash(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ void fcrash_update_transmasks();
+ virtual void bootleg_render_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ void fcrash_render_layer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int layer, int primask);
+ void fcrash_render_high_layer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int layer);
+ void fcrash_build_palette();
+
+ void fcrash_map(address_map &map);
+ void mtwinsb_map(address_map &map);
+ void sf2m1_map(address_map &map);
+ void sgyxz_map(address_map &map);
+ void wofabl_map(address_map &map);
+ void varthb_map(address_map &map);
+
+ void fcrash_sound_map(address_map &map);
+ void kodb_sound_map(address_map &map);
+ void sgyxz_sound_map(address_map &map);
+
+ /* sound hw */
+ int m_sample_buffer1;
+ int m_sample_buffer2;
+ int m_sample_select1;
+ int m_sample_select2;
+
+ /* video config */
+ uint8_t m_layer_enable_reg;
+ uint8_t m_layer_mask_reg[4];
+ int m_layer_scroll1x_offset;
+ int m_layer_scroll2x_offset;
+ int m_layer_scroll3x_offset;
+ int m_sprite_base;
+ int m_sprite_list_end_marker;
+ int m_sprite_x_offset;
+ std::unique_ptr<uint16_t[]> m_bootleg_sprite_ram;
+ std::unique_ptr<uint16_t[]> m_bootleg_work_ram;
+
+ optional_device<msm5205_device> m_msm_1;
+ optional_device<msm5205_device> m_msm_2;
+};
+
+#endif // MAME_INCLUDES_FCRASH_H