mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
supbtime.cpp: split into video and includes (nw)
This commit is contained in:
parent
93ae59e653
commit
46d25bad21
@ -1638,6 +1638,8 @@ files {
|
||||
MAME_DIR .. "src/mame/includes/stadhero.h",
|
||||
MAME_DIR .. "src/mame/video/stadhero.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/supbtime.cpp",
|
||||
MAME_DIR .. "src/mame/includes/supbtime.h",
|
||||
MAME_DIR .. "src/mame/video/supbtime.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/tryout.cpp",
|
||||
MAME_DIR .. "src/mame/includes/tryout.h",
|
||||
MAME_DIR .. "src/mame/video/tryout.cpp",
|
||||
@ -1759,8 +1761,8 @@ files {
|
||||
MAME_DIR .. "src/mame/video/excellent_spr.cpp",
|
||||
MAME_DIR .. "src/mame/video/excellent_spr.h",
|
||||
MAME_DIR .. "src/mame/drivers/lastbank.cpp",
|
||||
MAME_DIR .. "src/mame/includes/witch.h",
|
||||
MAME_DIR .. "src/mame/drivers/witch.cpp",
|
||||
MAME_DIR .. "src/mame/includes/witch.h",
|
||||
}
|
||||
|
||||
createMAMEProjects(_target, _subtarget, "exidy")
|
||||
|
@ -60,58 +60,11 @@ Stephh's notes (based on the games M68000 code and some tests) :
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "cpu/h6280/h6280.h"
|
||||
#include "machine/decocrpt.h"
|
||||
#include "machine/gen_latch.h"
|
||||
#include "video/decospr.h"
|
||||
#include "video/deco16ic.h"
|
||||
#include "sound/ym2151.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "screen.h"
|
||||
#include "speaker.h"
|
||||
|
||||
#include "includes/supbtime.h"
|
||||
|
||||
#define TUMBLEP_HACK 0
|
||||
|
||||
|
||||
class supbtime_state : public driver_device
|
||||
{
|
||||
public:
|
||||
supbtime_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_pf1_rowscroll(*this, "pf1_rowscroll"),
|
||||
m_pf2_rowscroll(*this, "pf2_rowscroll"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_deco_tilegen1(*this, "tilegen1"),
|
||||
m_sprgen(*this, "spritegen")
|
||||
{ }
|
||||
|
||||
DECLARE_DRIVER_INIT(tumblep);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(vblank_w);
|
||||
DECLARE_READ16_MEMBER(vblank_ack_r);
|
||||
uint32_t screen_update_supbtime(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_tumblep(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
void chinatwn(machine_config &config);
|
||||
void supbtime(machine_config &config);
|
||||
void tumblep(machine_config &config);
|
||||
void chinatwn_map(address_map &map);
|
||||
void sound_map(address_map &map);
|
||||
void supbtime_map(address_map &map);
|
||||
void tumblep_map(address_map &map);
|
||||
private:
|
||||
required_shared_ptr<uint16_t> m_spriteram;
|
||||
required_shared_ptr<uint16_t> m_pf1_rowscroll;
|
||||
required_shared_ptr<uint16_t> m_pf2_rowscroll;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<deco16ic_device> m_deco_tilegen1;
|
||||
required_device<decospr_device> m_sprgen;
|
||||
};
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// ADDRESS MAPS
|
||||
//**************************************************************************
|
||||
@ -210,61 +163,6 @@ READ16_MEMBER( supbtime_state::vblank_ack_r )
|
||||
return 0xffff;
|
||||
}
|
||||
|
||||
// End sequence uses rowscroll '98 c0' on pf1 (jmp to 1d61a on supbtimj)
|
||||
uint32_t supbtime_state::screen_update_supbtime(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
address_space &space = machine().dummy_space();
|
||||
uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff);
|
||||
|
||||
flip_screen_set(BIT(flip, 7));
|
||||
m_sprgen->set_flip_screen(BIT(flip, 7));
|
||||
m_deco_tilegen1->pf_update(m_pf1_rowscroll, m_pf2_rowscroll);
|
||||
|
||||
bitmap.fill(768, cliprect);
|
||||
|
||||
m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, 0, 0);
|
||||
m_sprgen->draw_sprites(bitmap, cliprect, m_spriteram, 0x400);
|
||||
m_deco_tilegen1->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Tumblepop is one of few games to take advantage of the playfields ability
|
||||
// to switch between 8*8 tiles and 16*16 tiles.
|
||||
uint32_t supbtime_state::screen_update_tumblep(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
address_space &space = machine().dummy_space();
|
||||
uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff);
|
||||
|
||||
flip_screen_set(BIT(flip, 7));
|
||||
m_sprgen->set_flip_screen(BIT(flip, 7));
|
||||
m_deco_tilegen1->pf_update(m_pf1_rowscroll, m_pf2_rowscroll);
|
||||
|
||||
bitmap.fill(256+512, cliprect); // not verified
|
||||
|
||||
m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
|
||||
m_deco_tilegen1->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
|
||||
m_sprgen->draw_sprites(bitmap, cliprect, m_spriteram, 0x400);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// MACHINE
|
||||
//**************************************************************************
|
||||
|
||||
DRIVER_INIT_MEMBER( supbtime_state, tumblep )
|
||||
{
|
||||
deco56_decrypt_gfx(machine(), "tiles");
|
||||
|
||||
#if TUMBLEP_HACK
|
||||
uint16_t *RAM = (uint16_t *)memregion("maincpu")->base();
|
||||
RAM[(offset + 0)/2] = 0x0240;
|
||||
RAM[(offset + 2)/2] = 0xffff; // andi.w #$f3ff, D0
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// INPUT DEFINITIONS
|
||||
@ -635,11 +533,25 @@ ROM_START( tumblepj )
|
||||
ROM_END
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// MACHINE
|
||||
//**************************************************************************
|
||||
|
||||
DRIVER_INIT_MEMBER( supbtime_state, tumblep )
|
||||
{
|
||||
deco56_decrypt_gfx(machine(), "tiles");
|
||||
|
||||
#if TUMBLEP_HACK
|
||||
uint16_t *RAM = (uint16_t *)memregion("maincpu")->base();
|
||||
RAM[(offset + 0)/2] = 0x0240;
|
||||
RAM[(offset + 2)/2] = 0xffff; // andi.w #$f3ff, D0
|
||||
#endif
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
// SYSTEM DRIVERS
|
||||
//**************************************************************************
|
||||
|
||||
// YEAR NAME PARENT MACHINE INPUT CLASS INIT ROT COMPANY FULLNAME FLAGS
|
||||
GAME( 1990, supbtime, 0, supbtime, supbtime, supbtime_state, 0, ROT0, "Data East Corporation", "Super Burger Time (World, set 1)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1990, supbtimea, supbtime, supbtime, supbtime, supbtime_state, 0, ROT0, "Data East Corporation", "Super Burger Time (World, set 2)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1990, supbtimej, supbtime, supbtime, supbtime, supbtime_state, 0, ROT0, "Data East Corporation", "Super Burger Time (Japan)", MACHINE_SUPPORTS_SAVE )
|
||||
|
60
src/mame/includes/supbtime.h
Normal file
60
src/mame/includes/supbtime.h
Normal file
@ -0,0 +1,60 @@
|
||||
// license: BSD-3-Clause
|
||||
// copyright-holders: Bryan McPhail, David Haywood, Dirk Best
|
||||
/***************************************************************************
|
||||
|
||||
Super Burger Time
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef MAME_INCLUDES_SUPBTIME_H
|
||||
#define MAME_INCLUDES_SUPBTIME_H
|
||||
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "cpu/h6280/h6280.h"
|
||||
#include "machine/decocrpt.h"
|
||||
#include "machine/gen_latch.h"
|
||||
#include "video/decospr.h"
|
||||
#include "video/deco16ic.h"
|
||||
#include "sound/ym2151.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "screen.h"
|
||||
#include "speaker.h"
|
||||
|
||||
class supbtime_state : public driver_device
|
||||
{
|
||||
public:
|
||||
supbtime_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_pf1_rowscroll(*this, "pf1_rowscroll"),
|
||||
m_pf2_rowscroll(*this, "pf2_rowscroll"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_deco_tilegen1(*this, "tilegen1"),
|
||||
m_sprgen(*this, "spritegen")
|
||||
{ }
|
||||
|
||||
DECLARE_DRIVER_INIT(tumblep);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(vblank_w);
|
||||
DECLARE_READ16_MEMBER(vblank_ack_r);
|
||||
uint32_t screen_update_supbtime(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_tumblep(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
void chinatwn(machine_config &config);
|
||||
void supbtime(machine_config &config);
|
||||
void tumblep(machine_config &config);
|
||||
void chinatwn_map(address_map &map);
|
||||
void sound_map(address_map &map);
|
||||
void supbtime_map(address_map &map);
|
||||
void tumblep_map(address_map &map);
|
||||
private:
|
||||
required_shared_ptr<uint16_t> m_spriteram;
|
||||
required_shared_ptr<uint16_t> m_pf1_rowscroll;
|
||||
required_shared_ptr<uint16_t> m_pf2_rowscroll;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<deco16ic_device> m_deco_tilegen1;
|
||||
required_device<decospr_device> m_sprgen;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
52
src/mame/video/supbtime.cpp
Normal file
52
src/mame/video/supbtime.cpp
Normal file
@ -0,0 +1,52 @@
|
||||
// license: BSD-3-Clause
|
||||
// copyright-holders: Bryan McPhail, David Haywood, Dirk Best
|
||||
/***************************************************************************
|
||||
|
||||
Super Burger Time
|
||||
|
||||
Video mixing
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/supbtime.h"
|
||||
|
||||
// End sequence uses rowscroll '98 c0' on pf1 (jmp to 1d61a on supbtimej)
|
||||
uint32_t supbtime_state::screen_update_supbtime(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
address_space &space = machine().dummy_space();
|
||||
uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff);
|
||||
|
||||
flip_screen_set(BIT(flip, 7));
|
||||
m_sprgen->set_flip_screen(BIT(flip, 7));
|
||||
m_deco_tilegen1->pf_update(m_pf1_rowscroll, m_pf2_rowscroll);
|
||||
|
||||
bitmap.fill(768, cliprect);
|
||||
|
||||
m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, 0, 0);
|
||||
m_sprgen->draw_sprites(bitmap, cliprect, m_spriteram, 0x400);
|
||||
m_deco_tilegen1->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Tumblepop is one of few games to take advantage of the playfields ability
|
||||
// to switch between 8*8 tiles and 16*16 tiles.
|
||||
uint32_t supbtime_state::screen_update_tumblep(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
address_space &space = machine().dummy_space();
|
||||
uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff);
|
||||
|
||||
flip_screen_set(BIT(flip, 7));
|
||||
m_sprgen->set_flip_screen(BIT(flip, 7));
|
||||
m_deco_tilegen1->pf_update(m_pf1_rowscroll, m_pf2_rowscroll);
|
||||
|
||||
bitmap.fill(256+512, cliprect); // not verified
|
||||
|
||||
m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
|
||||
m_deco_tilegen1->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
|
||||
m_sprgen->draw_sprites(bitmap, cliprect, m_spriteram, 0x400);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user