mirror of
https://github.com/holub/mame
synced 2025-07-01 08:18:59 +03:00
* create fcrash.h * change includes, add to arcade.lua
This commit is contained in:
parent
d1086ca8b1
commit
09bf7fe735
@ -1482,6 +1482,7 @@ files {
|
|||||||
MAME_DIR .. "src/mame/includes/exedexes.h",
|
MAME_DIR .. "src/mame/includes/exedexes.h",
|
||||||
MAME_DIR .. "src/mame/video/exedexes.cpp",
|
MAME_DIR .. "src/mame/video/exedexes.cpp",
|
||||||
MAME_DIR .. "src/mame/drivers/fcrash.cpp",
|
MAME_DIR .. "src/mame/drivers/fcrash.cpp",
|
||||||
|
MAME_DIR .. "src/mame/includes/fcrash.h",
|
||||||
MAME_DIR .. "src/mame/drivers/gng.cpp",
|
MAME_DIR .. "src/mame/drivers/gng.cpp",
|
||||||
MAME_DIR .. "src/mame/includes/gng.h",
|
MAME_DIR .. "src/mame/includes/gng.h",
|
||||||
MAME_DIR .. "src/mame/video/gng.cpp",
|
MAME_DIR .. "src/mame/video/gng.cpp",
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "includes/cps1.h"
|
#include "includes/fcrash.h"
|
||||||
|
|
||||||
#include "cpu/z80/z80.h"
|
#include "cpu/z80/z80.h"
|
||||||
#include "cpu/m68000/m68000.h"
|
#include "cpu/m68000/m68000.h"
|
||||||
@ -36,6 +36,63 @@
|
|||||||
#define CODE_SIZE 0x400000
|
#define CODE_SIZE 0x400000
|
||||||
|
|
||||||
|
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
|
||||||
|
class captcommb2_state : public cps1bl_5205_state
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
captcommb2_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
|
: cps1bl_5205_state(mconfig, type, tag)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
private:
|
||||||
|
void bootleg_render_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
WRITE16_MEMBER(cps1bl_5205_state::captcommb2_layer_w)
|
WRITE16_MEMBER(cps1bl_5205_state::captcommb2_layer_w)
|
||||||
{
|
{
|
||||||
switch (offset)
|
switch (offset)
|
||||||
@ -510,9 +567,6 @@ MACHINE_START_MEMBER(cps1bl_5205_state, sf2mdt)
|
|||||||
|
|
||||||
void cps1bl_5205_state::init_captcommb2()
|
void cps1bl_5205_state::init_captcommb2()
|
||||||
{
|
{
|
||||||
//m_bootleg_sprite_renderer = &cps1bl_5205_state::captcommb2_render_sprites;
|
|
||||||
m_bootleg_sprite_renderer = static_cast<void (fcrash_state::*)(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)>(&cps1bl_5205_state::captcommb2_render_sprites);
|
|
||||||
|
|
||||||
// gfx data bits 2 and 4 swapped
|
// gfx data bits 2 and 4 swapped
|
||||||
uint8_t *gfx = memregion("gfx")->base();
|
uint8_t *gfx = memregion("gfx")->base();
|
||||||
for (int i = 0; i < 0x400000; i++)
|
for (int i = 0; i < 0x400000; i++)
|
||||||
@ -531,8 +585,6 @@ void cps1bl_5205_state::init_captcommb2()
|
|||||||
|
|
||||||
void cps1bl_5205_state::init_knightsb()
|
void cps1bl_5205_state::init_knightsb()
|
||||||
{
|
{
|
||||||
//m_bootleg_sprite_renderer = &cps1bl_5205_state::captcommb2_render_sprites;
|
|
||||||
m_bootleg_sprite_renderer = static_cast<void (fcrash_state::*)(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)>(&cps1bl_5205_state::captcommb2_render_sprites);
|
|
||||||
m_maincpu->space(AS_PROGRAM).unmap_write(0x980000, 0x980023);
|
m_maincpu->space(AS_PROGRAM).unmap_write(0x980000, 0x980023);
|
||||||
m_maincpu->space(AS_PROGRAM).install_write_handler(0x980000, 0x980025, write16_delegate(*this, FUNC(cps1bl_5205_state::knightsb_layer_w)));
|
m_maincpu->space(AS_PROGRAM).install_write_handler(0x980000, 0x980025, write16_delegate(*this, FUNC(cps1bl_5205_state::knightsb_layer_w)));
|
||||||
m_msm_1->reset_routes().add_route(ALL_OUTPUTS, "mono", 0.5);
|
m_msm_1->reset_routes().add_route(ALL_OUTPUTS, "mono", 0.5);
|
||||||
@ -793,7 +845,7 @@ static INPUT_PORTS_START( sf2mdtb )
|
|||||||
INPUT_PORTS_END
|
INPUT_PORTS_END
|
||||||
|
|
||||||
|
|
||||||
void cps1bl_5205_state::captcommb2_render_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect )
|
void captcommb2_state::bootleg_render_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect )
|
||||||
{
|
{
|
||||||
int pos;
|
int pos;
|
||||||
int last_sprite_offset = 0;
|
int last_sprite_offset = 0;
|
||||||
@ -1179,10 +1231,10 @@ ROM_END
|
|||||||
|
|
||||||
// ************************************************************************* DRIVER MACROS
|
// ************************************************************************* DRIVER MACROS
|
||||||
|
|
||||||
GAME( 1991, captcommb2, 0, captcommb2, captcommb2, cps1bl_5205_state, init_captcommb2, ROT0, "bootleg", "Captain Commando (bootleg with 2xMSM5205)", MACHINE_SUPPORTS_SAVE ) // 911014 ETC
|
GAME( 1991, captcommb2, 0, captcommb2, captcommb2, captcommb2_state, init_captcommb2, ROT0, "bootleg", "Captain Commando (bootleg with 2xMSM5205)", MACHINE_SUPPORTS_SAVE ) // 911014 ETC
|
||||||
|
|
||||||
GAME( 1991, knightsb, knights, captcommb2, knights, cps1bl_5205_state, init_knightsb, ROT0, "bootleg", "Knights of the Round (bootleg with 2xMSM5205, set 1)", MACHINE_SUPPORTS_SAVE ) // 911127 ETC
|
GAME( 1991, knightsb, knights, captcommb2, knights, captcommb2_state, init_knightsb, ROT0, "bootleg", "Knights of the Round (bootleg with 2xMSM5205, set 1)", MACHINE_SUPPORTS_SAVE ) // 911127 ETC
|
||||||
GAME( 1991, knightsb3, 0, captcommb2, knights, cps1bl_5205_state, init_knightsb, ROT0, "bootleg", "Knights of the Round (bootleg with 2xMSM5205, set 2)", MACHINE_SUPPORTS_SAVE ) // 911127 ETC
|
GAME( 1991, knightsb3, 0, captcommb2, knights, captcommb2_state, init_knightsb, ROT0, "bootleg", "Knights of the Round (bootleg with 2xMSM5205, set 2)", MACHINE_SUPPORTS_SAVE ) // 911127 ETC
|
||||||
|
|
||||||
GAME( 1992, sf2b, sf2, sf2b, sf2mdt, cps1bl_5205_state, init_sf2b, ROT0, "bootleg (Playmark)", "Street Fighter II: The World Warrior (bootleg, set 1)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // 910204 ETC
|
GAME( 1992, sf2b, sf2, sf2b, sf2mdt, cps1bl_5205_state, init_sf2b, ROT0, "bootleg (Playmark)", "Street Fighter II: The World Warrior (bootleg, set 1)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // 910204 ETC
|
||||||
GAME( 1992, sf2b2, sf2, sf2b, sf2mdt, cps1bl_5205_state, init_sf2mdtb, ROT0, "bootleg", "Street Fighter II: The World Warrior (bootleg, set 2)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // 910204 ETC
|
GAME( 1992, sf2b2, sf2, sf2b, sf2mdt, cps1bl_5205_state, init_sf2mdtb, ROT0, "bootleg", "Street Fighter II: The World Warrior (bootleg, set 2)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // 910204 ETC
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "includes/cps1.h"
|
#include "includes/fcrash.h"
|
||||||
|
|
||||||
#include "cpu/m68000/m68000.h"
|
#include "cpu/m68000/m68000.h"
|
||||||
#include "cpu/pic16c5x/pic16c5x.h"
|
#include "cpu/pic16c5x/pic16c5x.h"
|
||||||
@ -37,6 +37,57 @@
|
|||||||
#define CODE_SIZE 0x400000
|
#define CODE_SIZE 0x400000
|
||||||
|
|
||||||
|
|
||||||
|
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);
|
||||||
|
};
|
||||||
|
|
||||||
|
class slampic2_state : public cps1bl_pic_state
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
slampic2_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
|
: cps1bl_pic_state(mconfig, type, tag)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
private:
|
||||||
|
void bootleg_render_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
WRITE16_MEMBER(cps1bl_pic_state::dinopic_layer_w)
|
WRITE16_MEMBER(cps1bl_pic_state::dinopic_layer_w)
|
||||||
{
|
{
|
||||||
switch (offset)
|
switch (offset)
|
||||||
@ -494,9 +545,6 @@ void cps1bl_pic_state::init_punipic3()
|
|||||||
|
|
||||||
void cps1bl_pic_state::init_slampic2()
|
void cps1bl_pic_state::init_slampic2()
|
||||||
{
|
{
|
||||||
//m_bootleg_sprite_renderer = &cps1bl_pic_state::slampic2_render_sprites;
|
|
||||||
m_bootleg_sprite_renderer = static_cast<void (fcrash_state::*)(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)>(&cps1bl_pic_state::slampic2_render_sprites);
|
|
||||||
|
|
||||||
m_bootleg_sprite_ram = std::make_unique<uint16_t[]>(0x2000);
|
m_bootleg_sprite_ram = std::make_unique<uint16_t[]>(0x2000);
|
||||||
m_maincpu->space(AS_PROGRAM).install_ram(0x930000, 0x933fff, m_bootleg_sprite_ram.get());
|
m_maincpu->space(AS_PROGRAM).install_ram(0x930000, 0x933fff, m_bootleg_sprite_ram.get());
|
||||||
m_maincpu->space(AS_PROGRAM).install_ram(0xff0000, 0xff3fff, m_bootleg_sprite_ram.get());
|
m_maincpu->space(AS_PROGRAM).install_ram(0xff0000, 0xff3fff, m_bootleg_sprite_ram.get());
|
||||||
@ -654,7 +702,7 @@ INPUT_PORTS_END
|
|||||||
m_gfxdecode->gfx(2)->prio_transpen(bitmap, cliprect, CODE, COLOR, FLIPX, FLIPY, SX, SY, screen.priority(), 2, 15); \
|
m_gfxdecode->gfx(2)->prio_transpen(bitmap, cliprect, CODE, COLOR, FLIPX, FLIPY, SX, SY, screen.priority(), 2, 15); \
|
||||||
}
|
}
|
||||||
|
|
||||||
void cps1bl_pic_state::slampic2_render_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect )
|
void slampic2_state::bootleg_render_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect )
|
||||||
{
|
{
|
||||||
int i, j = 0;
|
int i, j = 0;
|
||||||
int last_sprite_offset = 0;
|
int last_sprite_offset = 0;
|
||||||
@ -1281,4 +1329,4 @@ GAME( 1993, punipic2, punisher, punipic, punisher, cps1bl_pic_state, init
|
|||||||
GAME( 1993, punipic3, punisher, punipic, punisher, cps1bl_pic_state, init_punipic3, ROT0, "bootleg", "The Punisher (bootleg with PIC16c57, set 3)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) // 930422 ETC
|
GAME( 1993, punipic3, punisher, punipic, punisher, cps1bl_pic_state, init_punipic3, ROT0, "bootleg", "The Punisher (bootleg with PIC16c57, set 3)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) // 930422 ETC
|
||||||
|
|
||||||
GAME( 1993, slampic, slammast, slampic, slampic, cps1bl_pic_state, init_dinopic, ROT0, "bootleg", "Saturday Night Slam Masters (bootleg with PIC16c57, set 1)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) // 930713 ETC
|
GAME( 1993, slampic, slammast, slampic, slampic, cps1bl_pic_state, init_dinopic, ROT0, "bootleg", "Saturday Night Slam Masters (bootleg with PIC16c57, set 1)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) // 930713 ETC
|
||||||
GAME( 1993, slampic2, 0, slampic2, slampic2, cps1bl_pic_state, init_slampic2, ROT0, "bootleg", "Saturday Night Slam Masters (bootleg with PIC16c57, set 2)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) // 930713 ETC
|
GAME( 1993, slampic2, 0, slampic2, slampic2, slampic2_state, init_slampic2, ROT0, "bootleg", "Saturday Night Slam Masters (bootleg with PIC16c57, set 2)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) // 930713 ETC
|
||||||
|
@ -116,7 +116,7 @@ dinopic3: no sound. Some minor gfx priority issues, confirmed present on real bo
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "includes/cps1.h"
|
#include "includes/fcrash.h"
|
||||||
|
|
||||||
#include "cpu/z80/z80.h"
|
#include "cpu/z80/z80.h"
|
||||||
#include "cpu/m68000/m68000.h"
|
#include "cpu/m68000/m68000.h"
|
||||||
@ -1295,7 +1295,7 @@ void fcrash_state::fcrash_update_transmasks()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void fcrash_state::fcrash_render_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect )
|
void fcrash_state::bootleg_render_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect )
|
||||||
{
|
{
|
||||||
int pos;
|
int pos;
|
||||||
int base = m_sprite_base / 2;
|
int base = m_sprite_base / 2;
|
||||||
@ -1340,7 +1340,7 @@ void fcrash_state::fcrash_render_layer( screen_device &screen, bitmap_ind16 &bit
|
|||||||
switch (layer)
|
switch (layer)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
(this->*m_bootleg_sprite_renderer)(screen, bitmap, cliprect);
|
bootleg_render_sprites(screen, bitmap, cliprect);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
case 2:
|
case 2:
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
#ifndef MAME_INCLUDES_CPS1_H
|
#ifndef MAME_INCLUDES_CPS1_H
|
||||||
#define MAME_INCLUDES_CPS1_H
|
#define MAME_INCLUDES_CPS1_H
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#include "sound/msm5205.h"
|
#include "sound/msm5205.h"
|
||||||
#include "sound/qsound.h"
|
#include "sound/qsound.h"
|
||||||
#include "sound/okim6295.h"
|
#include "sound/okim6295.h"
|
||||||
@ -408,182 +410,6 @@ private:
|
|||||||
int m_ecofghtr_dial_last1;
|
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 -----------*/
|
/*----------- defined in drivers/cps1.cpp -----------*/
|
||||||
|
|
||||||
|
102
src/mame/includes/fcrash.h
Normal file
102
src/mame/includes/fcrash.h
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user