Hopefully fix MT06989, obsolete #3417, and rather lazily separate parts specific to Exciting Soccer from Champion Baseball state

This commit is contained in:
Vas Crabb 2018-05-31 00:29:37 +10:00
parent a9f61fff95
commit 552d2d5e7a
3 changed files with 138 additions and 99 deletions

View File

@ -112,7 +112,7 @@ WRITE_LINE_MEMBER(champbas_state::irq_enable_w)
m_maincpu->set_input_line(0, CLEAR_LINE);
}
TIMER_DEVICE_CALLBACK_MEMBER(champbas_state::exctsccr_sound_irq)
TIMER_DEVICE_CALLBACK_MEMBER(exctsccr_state::exctsccr_sound_irq)
{
m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
}
@ -184,7 +184,7 @@ READ8_MEMBER(champbas_state::champbja_protection_r)
void champbas_state::champbas_map(address_map &map)
{
map(0x0000, 0x5fff).rom();
map(0x7000, 0x7001).w("ay1", FUNC(ay8910_device::data_address_w));
map(0x7000, 0x7001).mirror(0x0ffe).w("ay1", FUNC(ay8910_device::data_address_w));
map(0x8000, 0x87ff).ram().w(this, FUNC(champbas_state::tilemap_w)).share("vram");
map(0x8800, 0x8fff).ram().share("mainram");
@ -229,6 +229,13 @@ void champbas_state::champbb2_map(address_map &map)
map(0x7800, 0x7fff).rom();
}
// champbb2j appears to have AY select inverted
void champbas_state::champbb2j_map(address_map &map)
{
champbb2_map(map);
map(0x7000, 0x7001).mirror(0x0ffe).w("ay1", FUNC(ay8910_device::address_data_w));
}
void champbas_state::tbasebal_map(address_map &map)
{
champbas_map(map);
@ -236,7 +243,7 @@ void champbas_state::tbasebal_map(address_map &map)
}
// more sprites in exctsccr
void champbas_state::exctsccr_map(address_map &map)
void exctsccr_state::exctsccr_map(address_map &map)
{
champbasj_map(map);
map(0x7000, 0x7001).unmaprw(); // aysnd is controlled by audiocpu
@ -245,7 +252,7 @@ void champbas_state::exctsccr_map(address_map &map)
}
// exctsccrb
void champbas_state::exctsccrb_map(address_map &map)
void exctsccr_state::exctsccrb_map(address_map &map)
{
champbasj_map(map);
map(0xa040, 0xa04f).writeonly().share("spriteram2");
@ -266,7 +273,7 @@ void champbas_state::champbas_sound_map(address_map &map)
}
// exctsccr
void champbas_state::exctsccr_sound_map(address_map &map)
void exctsccr_state::exctsccr_sound_map(address_map &map)
{
map(0x0000, 0x8fff).rom();
map(0xa000, 0xa7ff).ram();
@ -277,7 +284,7 @@ void champbas_state::exctsccr_sound_map(address_map &map)
// AM_RANGE(0xc00f, 0xc00f) AM_WRITENOP // ?
}
void champbas_state::exctsccr_sound_io_map(address_map &map)
void exctsccr_state::exctsccr_sound_io_map(address_map &map)
{
map.global_mask(0x00ff);
map(0x82, 0x83).w("ay1", FUNC(ay8910_device::data_address_w));
@ -555,7 +562,6 @@ MACHINE_CONFIG_START(champbas_state::talbot)
MCFG_PALETTE_ADD("palette", 512)
MCFG_PALETTE_INDIRECT_ENTRIES(32)
MCFG_PALETTE_INIT_OWNER(champbas_state,champbas)
MCFG_VIDEO_START_OVERRIDE(champbas_state,champbas)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
@ -602,7 +608,6 @@ MACHINE_CONFIG_START(champbas_state::champbas)
MCFG_PALETTE_ADD("palette", 512)
MCFG_PALETTE_INDIRECT_ENTRIES(32)
MCFG_PALETTE_INIT_OWNER(champbas_state,champbas)
MCFG_VIDEO_START_OVERRIDE(champbas_state,champbas)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
@ -636,7 +641,6 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(champbas_state::champbasja)
champbas(config);
/* basic machine hardware */
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(champbasja_map)
MACHINE_CONFIG_END
@ -644,7 +648,6 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(champbas_state::champbasjb)
champbas(config);
/* basic machine hardware */
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(champbasjb_map)
MACHINE_CONFIG_END
@ -652,11 +655,17 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(champbas_state::champbb2)
champbasj(config);
/* basic machine hardware */
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(champbb2_map)
MACHINE_CONFIG_END
MACHINE_CONFIG_START(champbas_state::champbb2j)
champbb2(config);
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(champbb2j_map)
MACHINE_CONFIG_END
MACHINE_CONFIG_START(champbas_state::tbasebal)
champbas(config);
@ -670,29 +679,29 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(champbas_state::exctsccr)
MACHINE_CONFIG_START(exctsccr_state::exctsccr)
/* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", Z80, XTAL(18'432'000)/6 )
MCFG_DEVICE_PROGRAM_MAP(exctsccr_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", champbas_state, vblank_irq)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", exctsccr_state, vblank_irq)
MCFG_DEVICE_ADD("mainlatch", LS259, 0)
MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(*this, champbas_state, irq_enable_w))
MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(*this, exctsccr_state, irq_enable_w))
MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(NOOP) // !WORK board output (no use?)
MCFG_ADDRESSABLE_LATCH_Q2_OUT_CB(WRITELINE(*this, champbas_state, gfxbank_w))
MCFG_ADDRESSABLE_LATCH_Q3_OUT_CB(WRITELINE(*this, champbas_state, flipscreen_w))
MCFG_ADDRESSABLE_LATCH_Q2_OUT_CB(WRITELINE(*this, exctsccr_state, gfxbank_w))
MCFG_ADDRESSABLE_LATCH_Q3_OUT_CB(WRITELINE(*this, exctsccr_state, flipscreen_w))
MCFG_ADDRESSABLE_LATCH_Q4_OUT_CB(NOOP) // no palettebank
MCFG_ADDRESSABLE_LATCH_Q5_OUT_CB(NOOP) // n.c.
MCFG_ADDRESSABLE_LATCH_Q6_OUT_CB(WRITELINE(*this, champbas_state, mcu_start_w))
MCFG_ADDRESSABLE_LATCH_Q7_OUT_CB(WRITELINE(*this, champbas_state, mcu_switch_w))
MCFG_ADDRESSABLE_LATCH_Q6_OUT_CB(WRITELINE(*this, exctsccr_state, mcu_start_w))
MCFG_ADDRESSABLE_LATCH_Q7_OUT_CB(WRITELINE(*this, exctsccr_state, mcu_switch_w))
MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(14'318'181)/4 )
MCFG_DEVICE_PROGRAM_MAP(exctsccr_sound_map)
MCFG_DEVICE_IO_MAP(exctsccr_sound_io_map)
MCFG_DEVICE_PERIODIC_INT_DRIVER(champbas_state, nmi_line_pulse, 4000) // 4 kHz, updates the dac
MCFG_DEVICE_PERIODIC_INT_DRIVER(exctsccr_state, nmi_line_pulse, 4000) // 4 kHz, updates the dac
MCFG_TIMER_DRIVER_ADD_PERIODIC("exc_snd_irq", champbas_state, exctsccr_sound_irq, attotime::from_hz(75)) // irq source unknown, determines music tempo
MCFG_TIMER_DRIVER_ADD_PERIODIC("exc_snd_irq", exctsccr_state, exctsccr_sound_irq, attotime::from_hz(75)) // irq source unknown, determines music tempo
MCFG_TIMER_START_DELAY(attotime::from_hz(75))
MCFG_DEVICE_ADD("alpha_8201", ALPHA_8201, XTAL(18'432'000)/6/8) // note: 8302 rom, or 8303 on exctscc2 (same device!)
@ -706,14 +715,13 @@ MACHINE_CONFIG_START(champbas_state::exctsccr)
MCFG_SCREEN_REFRESH_RATE(60.54)
MCFG_SCREEN_SIZE(32*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(champbas_state, screen_update_exctsccr)
MCFG_SCREEN_UPDATE_DRIVER(exctsccr_state, screen_update_exctsccr)
MCFG_SCREEN_PALETTE("palette")
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_exctsccr)
MCFG_PALETTE_ADD("palette", 512)
MCFG_PALETTE_INDIRECT_ENTRIES(32)
MCFG_PALETTE_INIT_OWNER(champbas_state,exctsccr)
MCFG_VIDEO_START_OVERRIDE(champbas_state,exctsccr)
MCFG_PALETTE_INIT_OWNER(exctsccr_state,exctsccr)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
@ -741,22 +749,22 @@ MACHINE_CONFIG_START(champbas_state::exctsccr)
MACHINE_CONFIG_END
/* Bootleg running on a modified Champion Baseball board */
MACHINE_CONFIG_START(champbas_state::exctsccrb)
MACHINE_CONFIG_START(exctsccr_state::exctsccrb)
/* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", Z80, XTAL(18'432'000)/6)
MCFG_DEVICE_PROGRAM_MAP(exctsccrb_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", champbas_state, vblank_irq)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", exctsccr_state, vblank_irq)
MCFG_DEVICE_ADD("mainlatch", LS259, 0)
MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(*this, champbas_state, irq_enable_w))
MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(*this, exctsccr_state, irq_enable_w))
MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(NOOP) // !WORK board output (no use?)
MCFG_ADDRESSABLE_LATCH_Q2_OUT_CB(WRITELINE(*this, champbas_state, gfxbank_w))
MCFG_ADDRESSABLE_LATCH_Q3_OUT_CB(WRITELINE(*this, champbas_state, flipscreen_w))
MCFG_ADDRESSABLE_LATCH_Q2_OUT_CB(WRITELINE(*this, exctsccr_state, gfxbank_w))
MCFG_ADDRESSABLE_LATCH_Q3_OUT_CB(WRITELINE(*this, exctsccr_state, flipscreen_w))
MCFG_ADDRESSABLE_LATCH_Q4_OUT_CB(NOOP) // no palettebank
MCFG_ADDRESSABLE_LATCH_Q5_OUT_CB(NOOP) // n.c.
MCFG_ADDRESSABLE_LATCH_Q6_OUT_CB(WRITELINE(*this, champbas_state, mcu_start_w))
MCFG_ADDRESSABLE_LATCH_Q7_OUT_CB(WRITELINE(*this, champbas_state, mcu_switch_w))
MCFG_ADDRESSABLE_LATCH_Q6_OUT_CB(WRITELINE(*this, exctsccr_state, mcu_start_w))
MCFG_ADDRESSABLE_LATCH_Q7_OUT_CB(WRITELINE(*this, exctsccr_state, mcu_switch_w))
MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(18'432'000)/6)
MCFG_DEVICE_PROGRAM_MAP(champbas_sound_map)
@ -772,14 +780,13 @@ MACHINE_CONFIG_START(champbas_state::exctsccrb)
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_SIZE(32*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(champbas_state, screen_update_exctsccr)
MCFG_SCREEN_UPDATE_DRIVER(exctsccr_state, screen_update_exctsccr)
MCFG_SCREEN_PALETTE("palette")
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_exctsccr)
MCFG_PALETTE_ADD("palette", 512)
MCFG_PALETTE_INDIRECT_ENTRIES(32)
MCFG_PALETTE_INIT_OWNER(champbas_state,exctsccr)
MCFG_VIDEO_START_OVERRIDE(champbas_state,exctsccr)
MCFG_PALETTE_INIT_OWNER(exctsccr_state,exctsccr)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
@ -1267,7 +1274,7 @@ void champbas_state::init_champbas()
}
void champbas_state::init_exctsccr()
void exctsccr_state::init_exctsccr()
{
// chars and sprites are mixed in the same ROMs, so rearrange them for easier decoding
uint8_t *rom1 = memregion("gfx1")->base();
@ -1313,10 +1320,10 @@ GAME( 1983, champbb2, 0, champbb2, champbas, champbas_state, init_cha
GAME( 1983, champbb2j, champbb2, champbb2, champbas, champbas_state, init_champbas, ROT0, "Alpha Denshi Co.", "Champion Base Ball Part-2 (Japan)", MACHINE_SUPPORTS_SAVE )
GAME( 1983, tbasebal, champbb2, tbasebal, champbas, champbas_state, init_champbas, ROT0, "Alpha Denshi Co.", "Taikyoku Base Ball", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // 68705 protection instead
GAME( 1983, exctsccr, 0, exctsccr, exctsccr, champbas_state, init_exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer", MACHINE_SUPPORTS_SAVE )
GAME( 1983, exctsccru, exctsccr, exctsccr, exctsccr, champbas_state, init_exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer (US)", MACHINE_SUPPORTS_SAVE )
GAME( 1983, exctsccra, exctsccr, exctsccr, exctsccr, champbas_state, init_exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer (alternate music)", MACHINE_SUPPORTS_SAVE )
GAME( 1983, exctsccrj, exctsccr, exctsccr, exctsccr, champbas_state, init_exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer (Japan)", MACHINE_SUPPORTS_SAVE )
GAME( 1983, exctsccrjo, exctsccr, exctsccr, exctsccr, champbas_state, init_exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer (Japan, older)", MACHINE_SUPPORTS_SAVE )
GAME( 1983, exctsccrb, exctsccr, exctsccrb, exctsccr, champbas_state, init_exctsccr, ROT270, "bootleg (Kazutomi)", "Exciting Soccer (bootleg)", MACHINE_SUPPORTS_SAVE ) // on champbasj hardware
GAME( 1984, exctscc2, 0, exctsccr, exctsccr, champbas_state, init_exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer II", MACHINE_SUPPORTS_SAVE )
GAME( 1983, exctsccr, 0, exctsccr, exctsccr, exctsccr_state, init_exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer", MACHINE_SUPPORTS_SAVE )
GAME( 1983, exctsccru, exctsccr, exctsccr, exctsccr, exctsccr_state, init_exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer (US)", MACHINE_SUPPORTS_SAVE )
GAME( 1983, exctsccra, exctsccr, exctsccr, exctsccr, exctsccr_state, init_exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer (alternate music)", MACHINE_SUPPORTS_SAVE )
GAME( 1983, exctsccrj, exctsccr, exctsccr, exctsccr, exctsccr_state, init_exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer (Japan)", MACHINE_SUPPORTS_SAVE )
GAME( 1983, exctsccrjo, exctsccr, exctsccr, exctsccr, exctsccr_state, init_exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer (Japan, older)", MACHINE_SUPPORTS_SAVE )
GAME( 1983, exctsccrb, exctsccr, exctsccrb, exctsccr, exctsccr_state, init_exctsccr, ROT270, "bootleg (Kazutomi)", "Exciting Soccer (bootleg)", MACHINE_SUPPORTS_SAVE ) // on champbasj hardware
GAME( 1984, exctscc2, 0, exctsccr, exctsccr, exctsccr_state, init_exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer II", MACHINE_SUPPORTS_SAVE )

View File

@ -5,6 +5,10 @@
Talbot - Champion Base Ball - Exciting Soccer
*************************************************************************/
#ifndef MAME_INCLUDES_CHAMPBAS_H
#define MAME_INCLUDES_CHAMPBAS_H
#pragma once
#include "machine/alpha8201.h"
#include "machine/timer.h"
@ -14,10 +18,9 @@
class champbas_state : public driver_device
{
public:
champbas_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
champbas_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_alpha_8201(*this, "alpha_8201"),
m_watchdog(*this, "watchdog"),
m_gfxdecode(*this, "gfxdecode"),
@ -26,11 +29,57 @@ public:
m_vram(*this, "vram"),
m_spriteram(*this, "spriteram"),
m_spriteram2(*this, "spriteram2")
{ }
{
}
DECLARE_CUSTOM_INPUT_MEMBER(watchdog_bit2);
void init_champbas();
void champbas(machine_config &config);
void champbb2(machine_config &config);
void champbb2j(machine_config &config);
void talbot(machine_config &config);
void tbasebal(machine_config &config);
void champbasjb(machine_config &config);
void champbasj(machine_config &config);
void champbasja(machine_config &config);
protected:
// handlers
DECLARE_WRITE_LINE_MEMBER(irq_enable_w);
DECLARE_WRITE_LINE_MEMBER(mcu_switch_w);
DECLARE_WRITE_LINE_MEMBER(mcu_start_w);
DECLARE_READ8_MEMBER(champbja_protection_r);
INTERRUPT_GEN_MEMBER(vblank_irq);
DECLARE_WRITE8_MEMBER(tilemap_w);
DECLARE_WRITE_LINE_MEMBER(gfxbank_w);
DECLARE_WRITE_LINE_MEMBER(palette_bank_w);
DECLARE_WRITE_LINE_MEMBER(flipscreen_w);
DECLARE_PALETTE_INIT(champbas);
TILE_GET_INFO_MEMBER(champbas_get_bg_tile_info);
uint32_t screen_update_champbas(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void champbas_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
virtual void machine_start() override;
virtual void video_start() override;
virtual void machine_reset() override;
void champbas_map(address_map &map);
void champbasj_map(address_map &map);
void champbasja_map(address_map &map);
void champbasjb_map(address_map &map);
void champbb2_map(address_map &map);
void champbb2j_map(address_map &map);
void tbasebal_map(address_map &map);
void champbas_sound_map(address_map &map);
// devices, memory pointers
required_device<cpu_device> m_maincpu;
optional_device<cpu_device> m_audiocpu;
optional_device<alpha_8201_device> m_alpha_8201;
required_device<watchdog_timer_device> m_watchdog;
required_device<gfxdecode_device> m_gfxdecode;
@ -46,58 +95,41 @@ public:
tilemap_t *m_bg_tilemap;
uint8_t m_gfx_bank;
uint8_t m_palette_bank;
};
// handlers
DECLARE_WRITE_LINE_MEMBER(irq_enable_w);
DECLARE_WRITE_LINE_MEMBER(mcu_switch_w);
DECLARE_WRITE_LINE_MEMBER(mcu_start_w);
DECLARE_READ8_MEMBER(champbja_protection_r);
DECLARE_CUSTOM_INPUT_MEMBER(watchdog_bit2);
INTERRUPT_GEN_MEMBER(vblank_irq);
TIMER_DEVICE_CALLBACK_MEMBER(exctsccr_sound_irq);
DECLARE_WRITE8_MEMBER(tilemap_w);
DECLARE_WRITE_LINE_MEMBER(gfxbank_w);
DECLARE_WRITE_LINE_MEMBER(palette_bank_w);
DECLARE_WRITE_LINE_MEMBER(flipscreen_w);
class exctsccr_state : public champbas_state
{
public:
exctsccr_state(const machine_config &mconfig, device_type type, const char *tag) :
champbas_state(mconfig, type, tag),
m_audiocpu(*this, "audiocpu")
{
}
void init_exctsccr();
void init_champbas();
DECLARE_PALETTE_INIT(champbas);
void exctsccr(machine_config &config);
void exctsccrb(machine_config &config);
protected:
TIMER_DEVICE_CALLBACK_MEMBER(exctsccr_sound_irq);
DECLARE_PALETTE_INIT(exctsccr);
DECLARE_VIDEO_START(champbas);
DECLARE_VIDEO_START(exctsccr);
TILE_GET_INFO_MEMBER(champbas_get_bg_tile_info);
TILE_GET_INFO_MEMBER(exctsccr_get_bg_tile_info);
uint32_t screen_update_champbas(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_exctsccr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void champbas_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
void exctsccr_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
virtual void machine_start() override;
virtual void machine_reset() override;
void champbas(machine_config &config);
void champbb2(machine_config &config);
void exctsccr(machine_config &config);
void talbot(machine_config &config);
void tbasebal(machine_config &config);
void champbasjb(machine_config &config);
void champbasj(machine_config &config);
void exctsccrb(machine_config &config);
void champbasja(machine_config &config);
void champbas_map(address_map &map);
void champbas_sound_map(address_map &map);
void champbasj_map(address_map &map);
void champbasja_map(address_map &map);
void champbasjb_map(address_map &map);
void champbb2_map(address_map &map);
virtual void video_start() override;
void exctsccr_map(address_map &map);
void exctsccr_sound_io_map(address_map &map);
void exctsccr_sound_map(address_map &map);
void exctsccrb_map(address_map &map);
void tbasebal_map(address_map &map);
void exctsccr_sound_map(address_map &map);
void exctsccr_sound_io_map(address_map &map);
private:
required_device<cpu_device> m_audiocpu;
};
#endif // MAME_INCLUDES_CHAMPBAS_H

View File

@ -77,7 +77,7 @@ PALETTE_INIT_MEMBER(champbas_state,champbas)
}
PALETTE_INIT_MEMBER(champbas_state,exctsccr)
PALETTE_INIT_MEMBER(exctsccr_state,exctsccr)
{
const uint8_t *color_prom = memregion("proms")->base();
@ -137,16 +137,16 @@ PALETTE_INIT_MEMBER(champbas_state,exctsccr)
TILE_GET_INFO_MEMBER(champbas_state::champbas_get_bg_tile_info)
{
int code = m_vram[tile_index] | (m_gfx_bank << 8);
int color = (m_vram[tile_index + 0x400] & 0x1f) | 0x20;
int const code = m_vram[tile_index] | (m_gfx_bank << 8);
int const color = (m_vram[tile_index + 0x400] & 0x1f) | 0x20;
SET_TILE_INFO_MEMBER(0, code, color, 0);
}
TILE_GET_INFO_MEMBER(champbas_state::exctsccr_get_bg_tile_info)
TILE_GET_INFO_MEMBER(exctsccr_state::exctsccr_get_bg_tile_info)
{
int code = m_vram[tile_index] | (m_gfx_bank << 8);
int color = m_vram[tile_index + 0x400] & 0x0f;
int const code = m_vram[tile_index] | (m_gfx_bank << 8);
int const color = m_vram[tile_index + 0x400] & 0x0f;
SET_TILE_INFO_MEMBER(0, code, color, 0);
}
@ -159,14 +159,14 @@ TILE_GET_INFO_MEMBER(champbas_state::exctsccr_get_bg_tile_info)
*
*************************************/
VIDEO_START_MEMBER(champbas_state,champbas)
void champbas_state::video_start()
{
m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(champbas_state::champbas_get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
}
VIDEO_START_MEMBER(champbas_state,exctsccr)
void exctsccr_state::video_start()
{
m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(champbas_state::exctsccr_get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(exctsccr_state::exctsccr_get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
}
@ -241,7 +241,7 @@ void champbas_state::champbas_draw_sprites(bitmap_ind16 &bitmap, const rectangle
}
}
void champbas_state::exctsccr_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
void exctsccr_state::exctsccr_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
{
gfx_element* const gfx1 = m_gfxdecode->gfx(1);
gfx_element* const gfx2 = m_gfxdecode->gfx(2);
@ -293,7 +293,7 @@ uint32_t champbas_state::screen_update_champbas(screen_device &screen, bitmap_in
return 0;
}
uint32_t champbas_state::screen_update_exctsccr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
uint32_t exctsccr_state::screen_update_exctsccr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
exctsccr_draw_sprites(bitmap, cliprect);