mirror of
https://github.com/holub/mame
synced 2025-05-28 16:43:04 +03:00
ddribble.cpp, finalizr.cpp, ironhors.cpp: minor cleanups
This commit is contained in:
parent
bfe4aa26da
commit
bded3b3861
@ -9,6 +9,8 @@
|
||||
2008-08
|
||||
Dip locations and suggested settings verified with US manual.
|
||||
|
||||
TODO: using a debug build, the cmd prompt is filled with sound_assert: u32(start) < samples()
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
@ -24,128 +26,108 @@
|
||||
|
||||
WRITE_LINE_MEMBER(ddribble_state::vblank_irq)
|
||||
{
|
||||
if (state && m_int_enable_0)
|
||||
if (state && m_int_enable[0])
|
||||
m_maincpu->set_input_line(M6809_FIRQ_LINE, HOLD_LINE);
|
||||
|
||||
if (state && m_int_enable_1)
|
||||
m_cpu1->set_input_line(M6809_FIRQ_LINE, HOLD_LINE);
|
||||
if (state && m_int_enable[1])
|
||||
m_subcpu->set_input_line(M6809_FIRQ_LINE, HOLD_LINE);
|
||||
}
|
||||
|
||||
|
||||
void ddribble_state::ddribble_bankswitch_w(uint8_t data)
|
||||
void ddribble_state::bankswitch_w(uint8_t data)
|
||||
{
|
||||
membank("bank1")->set_entry(data & 0x07);
|
||||
m_mainbank->set_entry(data & 0x07);
|
||||
}
|
||||
|
||||
|
||||
uint8_t ddribble_state::ddribble_sharedram_r(offs_t offset)
|
||||
void ddribble_state::coin_counter_w(uint8_t data)
|
||||
{
|
||||
return m_sharedram[offset];
|
||||
// b4-b7: unused
|
||||
// b2-b3: unknown
|
||||
// b1: coin counter 2
|
||||
// b0: coin counter 1
|
||||
machine().bookkeeping().coin_counter_w(0, BIT(data, 0));
|
||||
machine().bookkeeping().coin_counter_w(1, BIT(data, 1));
|
||||
}
|
||||
|
||||
void ddribble_state::ddribble_sharedram_w(offs_t offset, uint8_t data)
|
||||
uint8_t ddribble_state::vlm5030_busy_r()
|
||||
{
|
||||
m_sharedram[offset] = data;
|
||||
}
|
||||
|
||||
uint8_t ddribble_state::ddribble_snd_sharedram_r(offs_t offset)
|
||||
{
|
||||
return m_snd_sharedram[offset];
|
||||
}
|
||||
|
||||
void ddribble_state::ddribble_snd_sharedram_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_snd_sharedram[offset] = data;
|
||||
}
|
||||
|
||||
void ddribble_state::ddribble_coin_counter_w(uint8_t data)
|
||||
{
|
||||
/* b4-b7: unused */
|
||||
/* b2-b3: unknown */
|
||||
/* b1: coin counter 2 */
|
||||
/* b0: coin counter 1 */
|
||||
machine().bookkeeping().coin_counter_w(0,(data) & 0x01);
|
||||
machine().bookkeeping().coin_counter_w(1,(data >> 1) & 0x01);
|
||||
}
|
||||
|
||||
uint8_t ddribble_state::ddribble_vlm5030_busy_r()
|
||||
{
|
||||
return machine().rand(); /* patch */
|
||||
/* FIXME: remove ? */
|
||||
return machine().rand(); // patch
|
||||
// FIXME: remove ?
|
||||
#if 0
|
||||
if (m_vlm->bsy()) return 1;
|
||||
else return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
void ddribble_state::ddribble_vlm5030_ctrl_w(uint8_t data)
|
||||
void ddribble_state::vlm5030_ctrl_w(uint8_t data)
|
||||
{
|
||||
/* b7 : vlm data bus OE */
|
||||
// b7 : vlm data bus OE
|
||||
|
||||
/* b6 : VLM5030-RST */
|
||||
m_vlm->rst(data & 0x40 ? 1 : 0);
|
||||
// b6 : VLM5030-RST
|
||||
m_vlm->rst(BIT(data, 6));
|
||||
|
||||
/* b5 : VLM5030-ST */
|
||||
m_vlm->st(data & 0x20 ? 1 : 0);
|
||||
// b5 : VLM5030-ST
|
||||
m_vlm->st(BIT(data, 5));
|
||||
|
||||
/* b4 : VLM5300-VCU */
|
||||
m_vlm->vcu(data & 0x10 ? 1 : 0);
|
||||
// b4 : VLM5300-VCU
|
||||
m_vlm->vcu(BIT(data, 4));
|
||||
|
||||
/* b3 : ROM bank select */
|
||||
membank("vlmbank")->set_entry(data & 0x08 ? 1 : 0);
|
||||
// b3 : ROM bank select
|
||||
m_vlmbank->set_entry(BIT(data, 3));
|
||||
|
||||
/* b2 : SSG-C rc filter enable */
|
||||
m_filter3->filter_rc_set_RC(filter_rc_device::LOWPASS, 1000, 2200, 1000, data & 0x04 ? CAP_N(150) : 0); /* YM2203-SSG-C */
|
||||
// b2 : SSG-C rc filter enable
|
||||
m_filter[2]->filter_rc_set_RC(filter_rc_device::LOWPASS, 1000, 2200, 1000, BIT(data, 2) ? CAP_N(150) : 0); // YM2203-SSG-C
|
||||
|
||||
/* b1 : SSG-B rc filter enable */
|
||||
m_filter2->filter_rc_set_RC(filter_rc_device::LOWPASS, 1000, 2200, 1000, data & 0x02 ? CAP_N(150) : 0); /* YM2203-SSG-B */
|
||||
// b1 : SSG-B rc filter enable
|
||||
m_filter[1]->filter_rc_set_RC(filter_rc_device::LOWPASS, 1000, 2200, 1000, BIT(data, 1) ? CAP_N(150) : 0); // YM2203-SSG-B
|
||||
|
||||
/* b0 : SSG-A rc filter enable */
|
||||
m_filter1->filter_rc_set_RC(filter_rc_device::LOWPASS, 1000, 2200, 1000, data & 0x01 ? CAP_N(150) : 0); /* YM2203-SSG-A */
|
||||
// b0 : SSG-A rc filter enable
|
||||
m_filter[0]->filter_rc_set_RC(filter_rc_device::LOWPASS, 1000, 2200, 1000, BIT(data, 0) ? CAP_N(150) : 0); // YM2203-SSG-A
|
||||
}
|
||||
|
||||
|
||||
void ddribble_state::cpu0_map(address_map &map)
|
||||
void ddribble_state::maincpu_map(address_map &map)
|
||||
{
|
||||
map(0x0000, 0x0004).w(FUNC(ddribble_state::K005885_0_w)); /* video registers (005885 #1) */
|
||||
map(0x0800, 0x0804).w(FUNC(ddribble_state::K005885_1_w)); /* video registers (005885 #2) */
|
||||
map(0x1800, 0x187f).ram().w("palette", FUNC(palette_device::write_indirect)).share("palette"); /* palette */
|
||||
map(0x2000, 0x2fff).ram().w(FUNC(ddribble_state::ddribble_fg_videoram_w)).share("fg_videoram"); /* Video RAM 1 */
|
||||
map(0x3000, 0x3fff).ram().share("spriteram_1"); /* Object RAM 1 */
|
||||
map(0x4000, 0x5fff).ram().share("sharedram"); /* shared RAM with CPU #1 */
|
||||
map(0x6000, 0x6fff).ram().w(FUNC(ddribble_state::ddribble_bg_videoram_w)).share("bg_videoram"); /* Video RAM 2 */
|
||||
map(0x7000, 0x7fff).ram().share("spriteram_2"); /* Object RAM 2 */
|
||||
map(0x8000, 0x8000).w(FUNC(ddribble_state::ddribble_bankswitch_w)); /* bankswitch control */
|
||||
map(0x8000, 0x9fff).bankr("bank1"); /* banked ROM */
|
||||
map(0xa000, 0xffff).rom(); /* ROM */
|
||||
map(0x0000, 0x0004).w(FUNC(ddribble_state::K005885_0_w)); // video registers (005885 #1)
|
||||
map(0x0800, 0x0804).w(FUNC(ddribble_state::K005885_1_w)); // video registers (005885 #2)
|
||||
map(0x1800, 0x187f).ram().w("palette", FUNC(palette_device::write_indirect)).share("palette");
|
||||
map(0x2000, 0x2fff).ram().w(FUNC(ddribble_state::fg_videoram_w)).share(m_fg_videoram); // Video RAM 1
|
||||
map(0x3000, 0x3fff).ram().share(m_spriteram[0]); // Object RAM 1
|
||||
map(0x4000, 0x5fff).ram().share("sharedram"); // shared RAM with CPU #1
|
||||
map(0x6000, 0x6fff).ram().w(FUNC(ddribble_state::bg_videoram_w)).share(m_bg_videoram); // Video RAM 2
|
||||
map(0x7000, 0x7fff).ram().share(m_spriteram[1]); // Object RAM 2
|
||||
map(0x8000, 0x8000).w(FUNC(ddribble_state::bankswitch_w));
|
||||
map(0x8000, 0x9fff).bankr(m_mainbank);
|
||||
map(0xa000, 0xffff).rom().region("maincpu", 0xa000);
|
||||
}
|
||||
|
||||
void ddribble_state::cpu1_map(address_map &map)
|
||||
void ddribble_state::subcpu_map(address_map &map)
|
||||
{
|
||||
map(0x0000, 0x1fff).rw(FUNC(ddribble_state::ddribble_sharedram_r), FUNC(ddribble_state::ddribble_sharedram_w)); /* shared RAM with CPU #0 */
|
||||
map(0x2000, 0x27ff).rw(FUNC(ddribble_state::ddribble_snd_sharedram_r), FUNC(ddribble_state::ddribble_snd_sharedram_w)); /* shared RAM with CPU #2 */
|
||||
map(0x0000, 0x1fff).ram().share("sharedram"); // shared RAM with CPU #0
|
||||
map(0x2000, 0x27ff).ram().share("snd_sharedram"); // shared RAM with CPU #2
|
||||
map(0x2800, 0x2800).portr("DSW1");
|
||||
map(0x2801, 0x2801).portr("P1");
|
||||
map(0x2802, 0x2802).portr("P2");
|
||||
map(0x2803, 0x2803).portr("SYSTEM"); /* coinsw & start */
|
||||
map(0x2803, 0x2803).portr("SYSTEM"); // coinsw & start
|
||||
map(0x2c00, 0x2c00).portr("DSW2");
|
||||
map(0x3000, 0x3000).portr("DSW3");
|
||||
map(0x3400, 0x3400).w(FUNC(ddribble_state::ddribble_coin_counter_w)); /* coin counters */
|
||||
map(0x3c00, 0x3c00).w("watchdog", FUNC(watchdog_timer_device::reset_w)); /* watchdog reset */
|
||||
map(0x8000, 0xffff).rom(); /* ROM */
|
||||
map(0x3400, 0x3400).w(FUNC(ddribble_state::coin_counter_w));
|
||||
map(0x3c00, 0x3c00).w("watchdog", FUNC(watchdog_timer_device::reset_w));
|
||||
map(0x8000, 0xffff).rom().region("subcpu", 0);
|
||||
}
|
||||
|
||||
void ddribble_state::cpu2_map(address_map &map)
|
||||
void ddribble_state::audiocpu_map(address_map &map)
|
||||
{
|
||||
map(0x0000, 0x07ff).ram().share("snd_sharedram"); /* shared RAM with CPU #1 */
|
||||
map(0x1000, 0x1001).rw("ymsnd", FUNC(ym2203_device::read), FUNC(ym2203_device::write)); /* YM2203 */
|
||||
map(0x3000, 0x3000).w(m_vlm, FUNC(vlm5030_device::data_w)); /* Speech data */
|
||||
map(0x8000, 0xffff).rom(); /* ROM */
|
||||
map(0x0000, 0x07ff).ram().share("snd_sharedram"); // shared RAM with CPU #1
|
||||
map(0x1000, 0x1001).rw("ymsnd", FUNC(ym2203_device::read), FUNC(ym2203_device::write));
|
||||
map(0x3000, 0x3000).w(m_vlm, FUNC(vlm5030_device::data_w));
|
||||
map(0x8000, 0xffff).rom().region("audiocpu", 0);
|
||||
}
|
||||
|
||||
void ddribble_state::vlm_map(address_map &map)
|
||||
{
|
||||
map(0x0000, 0xffff).bankr("vlmbank");
|
||||
map(0x0000, 0xffff).bankr(m_vlmbank);
|
||||
}
|
||||
|
||||
static INPUT_PORTS_START( ddribble )
|
||||
@ -164,13 +146,13 @@ static INPUT_PORTS_START( ddribble )
|
||||
KONAMI_COINAGE_ALT_LOC(SW1)
|
||||
|
||||
PORT_START("DSW2")
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x00, "SW2:1" ) /* Manual says it's Unused */
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x00, "SW2:2" ) /* Manual says it's Unused */
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x00, "SW2:1" ) // Manual says it's Unused
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x00, "SW2:2" ) // Manual says it's Unused
|
||||
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Cabinet ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( Cocktail ) )
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x00, "SW2:4" ) /* Manual says it's Unused */
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x00, "SW2:5" ) /* Manual says it's Unused */
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x00, "SW2:4" ) // Manual says it's Unused
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x00, "SW2:5" ) // Manual says it's Unused
|
||||
PORT_DIPNAME( 0x60, 0x20, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:6,7")
|
||||
PORT_DIPSETTING( 0x60, DEF_STR( Easy ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( Normal ) )
|
||||
@ -184,7 +166,7 @@ static INPUT_PORTS_START( ddribble )
|
||||
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW3:1")
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x00, "SW3:2" ) /* Manual says it's Unused */
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x00, "SW3:2" ) // Manual says it's Unused
|
||||
PORT_SERVICE_DIPLOC( 0x04, IP_ACTIVE_LOW, "SW3:3" )
|
||||
PORT_DIPNAME( 0x08, 0x08, "Allow vs match with 1 Credit" ) PORT_DIPLOCATION("SW3:4")
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
|
||||
@ -222,58 +204,54 @@ static const gfx_layout spritelayout =
|
||||
};
|
||||
|
||||
static GFXDECODE_START( gfx_ddribble )
|
||||
GFXDECODE_ENTRY( "gfx1", 0x00000, charlayout, 48, 1 ) /* colors 48-63 */
|
||||
GFXDECODE_ENTRY( "gfx2", 0x00000, charlayout, 16, 1 ) /* colors 16-31 */
|
||||
GFXDECODE_ENTRY( "gfx1", 0x20000, spritelayout, 32, 1 ) /* colors 32-47 */
|
||||
GFXDECODE_ENTRY( "gfx2", 0x40000, spritelayout, 64, 16 ) /* colors 0-15 but using lookup table */
|
||||
GFXDECODE_ENTRY( "gfx1", 0x00000, charlayout, 48, 1 ) // colors 48-63
|
||||
GFXDECODE_ENTRY( "gfx2", 0x00000, charlayout, 16, 1 ) // colors 16-31
|
||||
GFXDECODE_ENTRY( "gfx1", 0x20000, spritelayout, 32, 1 ) // colors 32-47
|
||||
GFXDECODE_ENTRY( "gfx2", 0x40000, spritelayout, 64, 16 ) // colors 0-15 but using lookup table
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
void ddribble_state::machine_start()
|
||||
{
|
||||
membank("bank1")->configure_entries(0, 8, memregion("maincpu")->base(), 0x2000);
|
||||
membank("vlmbank")->configure_entries(0, 2, memregion("vlm")->base(), 0x10000);
|
||||
m_mainbank->configure_entries(0, 8, memregion("maincpu")->base(), 0x2000);
|
||||
m_vlmbank->configure_entries(0, 2, memregion("vlm")->base(), 0x10000);
|
||||
|
||||
save_item(NAME(m_int_enable_0));
|
||||
save_item(NAME(m_int_enable_1));
|
||||
save_item(NAME(m_vregs[0]));
|
||||
save_item(NAME(m_vregs[1]));
|
||||
save_item(NAME(m_int_enable));
|
||||
save_item(NAME(m_vregs));
|
||||
save_item(NAME(m_charbank));
|
||||
}
|
||||
|
||||
void ddribble_state::machine_reset()
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 5; i++)
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
m_vregs[0][i] = 0;
|
||||
m_vregs[1][i] = 0;
|
||||
}
|
||||
|
||||
m_int_enable_0 = 0;
|
||||
m_int_enable_1 = 0;
|
||||
m_int_enable[0] = 0;
|
||||
m_int_enable[1] = 0;
|
||||
m_charbank[0] = 0;
|
||||
m_charbank[1] = 0;
|
||||
}
|
||||
|
||||
void ddribble_state::ddribble(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
MC6809E(config, m_maincpu, XTAL(18'432'000)/12); /* verified on pcb */
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &ddribble_state::cpu0_map);
|
||||
// basic machine hardware
|
||||
MC6809E(config, m_maincpu, XTAL(18'432'000)/12); // verified on pcb
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &ddribble_state::maincpu_map);
|
||||
|
||||
MC6809E(config, m_cpu1, XTAL(18'432'000)/12); /* verified on pcb */
|
||||
m_cpu1->set_addrmap(AS_PROGRAM, &ddribble_state::cpu1_map);
|
||||
MC6809E(config, m_subcpu, XTAL(18'432'000)/12); // verified on pcb
|
||||
m_subcpu->set_addrmap(AS_PROGRAM, &ddribble_state::subcpu_map);
|
||||
|
||||
mc6809e_device &cpu2(MC6809E(config, "cpu2", XTAL(18'432'000)/12)); /* verified on pcb */
|
||||
cpu2.set_addrmap(AS_PROGRAM, &ddribble_state::cpu2_map);
|
||||
mc6809e_device &audiocpu(MC6809E(config, "audiocpu", XTAL(18'432'000)/12)); // verified on pcb
|
||||
audiocpu.set_addrmap(AS_PROGRAM, &ddribble_state::audiocpu_map);
|
||||
|
||||
config.set_maximum_quantum(attotime::from_hz(6000)); /* we need heavy synch */
|
||||
config.set_maximum_quantum(attotime::from_hz(6000)); // we need heavy synch
|
||||
|
||||
WATCHDOG_TIMER(config, "watchdog");
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
||||
screen.set_refresh_hz(60);
|
||||
screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
|
||||
@ -281,60 +259,60 @@ void ddribble_state::ddribble(machine_config &config)
|
||||
screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
|
||||
/* screen.set_size(64*8, 32*8);
|
||||
screen.set_visarea(0*8, 64*8-1, 2*8, 30*8-1); */
|
||||
screen.set_screen_update(FUNC(ddribble_state::screen_update_ddribble));
|
||||
screen.set_screen_update(FUNC(ddribble_state::screen_update));
|
||||
screen.set_palette("palette");
|
||||
screen.screen_vblank().set(FUNC(ddribble_state::vblank_irq));
|
||||
|
||||
GFXDECODE(config, m_gfxdecode, "palette", gfx_ddribble);
|
||||
PALETTE(config, "palette", FUNC(ddribble_state::ddribble_palette)).set_format(palette_device::xBGR_555, 64 + 256, 64);
|
||||
PALETTE(config, "palette", FUNC(ddribble_state::palette)).set_format(palette_device::xBGR_555, 64 + 256, 64);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
|
||||
ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL(3'579'545))); /* verified on pcb */
|
||||
ymsnd.port_b_read_callback().set(FUNC(ddribble_state::ddribble_vlm5030_busy_r));
|
||||
ymsnd.port_a_write_callback().set(FUNC(ddribble_state::ddribble_vlm5030_ctrl_w));
|
||||
ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL(3'579'545))); // verified on pcb
|
||||
ymsnd.port_b_read_callback().set(FUNC(ddribble_state::vlm5030_busy_r));
|
||||
ymsnd.port_a_write_callback().set(FUNC(ddribble_state::vlm5030_ctrl_w));
|
||||
ymsnd.add_route(0, "filter1", 0.25);
|
||||
ymsnd.add_route(1, "filter2", 0.25);
|
||||
ymsnd.add_route(2, "filter3", 0.25);
|
||||
ymsnd.add_route(3, "mono", 0.25);
|
||||
|
||||
VLM5030(config, m_vlm, XTAL(3'579'545)); /* verified on pcb */
|
||||
VLM5030(config, m_vlm, XTAL(3'579'545)); // verified on pcb
|
||||
m_vlm->add_route(ALL_OUTPUTS, "mono", 1.0);
|
||||
m_vlm->set_addrmap(0, &ddribble_state::vlm_map);
|
||||
|
||||
FILTER_RC(config, m_filter1).add_route(ALL_OUTPUTS, "mono", 1.0);
|
||||
FILTER_RC(config, m_filter[0]).add_route(ALL_OUTPUTS, "mono", 1.0);
|
||||
|
||||
FILTER_RC(config, m_filter2).add_route(ALL_OUTPUTS, "mono", 1.0);
|
||||
FILTER_RC(config, m_filter[1]).add_route(ALL_OUTPUTS, "mono", 1.0);
|
||||
|
||||
FILTER_RC(config, m_filter3).add_route(ALL_OUTPUTS, "mono", 1.0);
|
||||
FILTER_RC(config, m_filter[2]).add_route(ALL_OUTPUTS, "mono", 1.0);
|
||||
}
|
||||
|
||||
|
||||
ROM_START( ddribble )
|
||||
ROM_REGION( 0x10000, "maincpu", 0 ) /* 64K for the CPU #0 */
|
||||
ROM_REGION( 0x10000, "maincpu", 0 )
|
||||
ROM_LOAD( "690c03.bin", 0x00000, 0x10000, CRC(07975a58) SHA1(96fd1b2348bbdf560067d8ee3cd4c0514e263d7a) )
|
||||
|
||||
ROM_REGION( 0x10000, "cpu1", 0 ) /* 64 for the CPU #1 */
|
||||
ROM_LOAD( "690c02.bin", 0x08000, 0x08000, CRC(f07c030a) SHA1(db96a10f8bb657bf285266db9e775fa6af82f38c) )
|
||||
ROM_REGION( 0x8000, "subcpu", 0 )
|
||||
ROM_LOAD( "690c02.bin", 0x0000, 0x8000, CRC(f07c030a) SHA1(db96a10f8bb657bf285266db9e775fa6af82f38c) )
|
||||
|
||||
ROM_REGION( 0x10000, "cpu2", 0 ) /* 64k for the SOUND CPU */
|
||||
ROM_LOAD( "690b01.bin", 0x08000, 0x08000, CRC(806b8453) SHA1(3184772c5e5181438a17ac72129070bf164b2965) )
|
||||
ROM_REGION( 0x8000, "audiocpu", 0 )
|
||||
ROM_LOAD( "690b01.bin", 0x0000, 0x8000, CRC(806b8453) SHA1(3184772c5e5181438a17ac72129070bf164b2965) )
|
||||
|
||||
ROM_REGION( 0x40000, "gfx1", 0 )
|
||||
ROM_LOAD16_BYTE( "690a05.bin", 0x00000, 0x20000, CRC(6a816d0d) SHA1(73f2527d5f2b9d51b784be36e07e0d0c566a28d9) ) /* characters & objects */
|
||||
ROM_LOAD16_BYTE( "690a05.bin", 0x00000, 0x20000, CRC(6a816d0d) SHA1(73f2527d5f2b9d51b784be36e07e0d0c566a28d9) ) // characters & objects
|
||||
ROM_LOAD16_BYTE( "690a06.bin", 0x00001, 0x20000, CRC(46300cd0) SHA1(07197a546fff452a41575fcd481da64ac6bf601e) )
|
||||
|
||||
ROM_REGION( 0x80000, "gfx2", 0 )
|
||||
ROM_LOAD16_BYTE( "690a10.bin", 0x00000, 0x20000, CRC(61efa222) SHA1(bd7b993ad1c06d8f6ac29fbc07c4a987abe1ab42) ) /* characters */
|
||||
ROM_LOAD16_BYTE( "690a10.bin", 0x00000, 0x20000, CRC(61efa222) SHA1(bd7b993ad1c06d8f6ac29fbc07c4a987abe1ab42) ) // characters
|
||||
ROM_LOAD16_BYTE( "690a09.bin", 0x00001, 0x20000, CRC(ab682186) SHA1(a28982835042a07354557e1539b097cdf93fc466) )
|
||||
ROM_LOAD16_BYTE( "690a08.bin", 0x40000, 0x20000, CRC(9a889944) SHA1(ca96815aefb1e336bd2288841b00a5c21cacf90f) ) /* objects */
|
||||
ROM_LOAD16_BYTE( "690a08.bin", 0x40000, 0x20000, CRC(9a889944) SHA1(ca96815aefb1e336bd2288841b00a5c21cacf90f) ) // objects
|
||||
ROM_LOAD16_BYTE( "690a07.bin", 0x40001, 0x20000, CRC(faf81b3f) SHA1(0bd647b4cdd3f2209472e303fd22eedd5533d1b1) )
|
||||
|
||||
ROM_REGION( 0x0100, "proms", 0 )
|
||||
ROM_LOAD( "690a11.i15", 0x0000, 0x0100, CRC(f34617ad) SHA1(79ceba6fe204472a5a659641ac4f14bb1f0ee3f6) ) /* sprite lookup table */
|
||||
ROM_LOAD( "690a11.i15", 0x0000, 0x0100, CRC(f34617ad) SHA1(79ceba6fe204472a5a659641ac4f14bb1f0ee3f6) ) // sprite lookup table
|
||||
|
||||
ROM_REGION( 0x20000, "vlm", 0 ) /* 128k for the VLM5030 data */
|
||||
ROM_REGION( 0x20000, "vlm", 0 ) // 128k for the VLM5030 data
|
||||
ROM_LOAD( "690a04.bin", 0x00000, 0x20000, CRC(1bfeb763) SHA1(f3e9acb2a7a9b4c8dee6838c1344a7a65c27ff77) )
|
||||
|
||||
ROM_REGION( 0x0100, "plds", 0 )
|
||||
@ -342,35 +320,35 @@ ROM_START( ddribble )
|
||||
ROM_END
|
||||
|
||||
ROM_START( ddribblep )
|
||||
ROM_REGION( 0x10000, "maincpu", 0 ) /* 64K for the CPU #0 */
|
||||
ROM_REGION( 0x10000, "maincpu", 0 )
|
||||
ROM_LOAD( "ebs_11-19.c19", 0x00000, 0x10000, CRC(0a81c926) SHA1(1ecd30f0d352cf6c96d246bb443b5a6738624b9b) )
|
||||
|
||||
ROM_REGION( 0x10000, "cpu1", 0 ) /* 64 for the CPU #1 */
|
||||
ROM_LOAD( "eb_11-19.c12", 0x08000, 0x08000, CRC(22130292) SHA1(a5f9bf3f63ff85d171f096867433513419458b0e) )
|
||||
ROM_REGION( 0x8000, "subcpu", 0 )
|
||||
ROM_LOAD( "eb_11-19.c12", 0x0000, 0x8000, CRC(22130292) SHA1(a5f9bf3f63ff85d171f096867433513419458b0e) )
|
||||
|
||||
ROM_REGION( 0x10000, "cpu2", 0 ) /* 64k for the SOUND CPU */
|
||||
ROM_LOAD( "master_sound.a6", 0x08000, 0x08000, CRC(090e3a31) SHA1(4c645b55d52abb859354ea2ea401e4ab99f5d493) )
|
||||
ROM_REGION( 0x8000, "audiocpu", 0 )
|
||||
ROM_LOAD( "master_sound.a6", 0x0000, 0x8000, CRC(090e3a31) SHA1(4c645b55d52abb859354ea2ea401e4ab99f5d493) )
|
||||
|
||||
ROM_REGION( 0x40000, "gfx1", 0 ) /* same content as parent */
|
||||
ROM_LOAD16_BYTE( "v1a.e12", 0x00000, 0x10000, CRC(53724765) SHA1(55a45ab71f7bf55ed805d4dc2345cadc4171f323) ) /* characters & objects */
|
||||
ROM_LOAD16_BYTE( "01a.e11", 0x20000, 0x10000, CRC(1ae5d725) SHA1(d8dd41cc1872c6d218cc425d1cd03f8d8eefe3e3) ) /* characters & objects */
|
||||
ROM_REGION( 0x40000, "gfx1", 0 ) // same content as parent
|
||||
ROM_LOAD16_BYTE( "v1a.e12", 0x00000, 0x10000, CRC(53724765) SHA1(55a45ab71f7bf55ed805d4dc2345cadc4171f323) ) // characters & objects
|
||||
ROM_LOAD16_BYTE( "01a.e11", 0x20000, 0x10000, CRC(1ae5d725) SHA1(d8dd41cc1872c6d218cc425d1cd03f8d8eefe3e3) ) // characters & objects
|
||||
ROM_LOAD16_BYTE( "v1b.e13", 0x00001, 0x10000, CRC(d9dc6f1a) SHA1(f50169525c5109ba65acdccbb01dddb92926462a) )
|
||||
ROM_LOAD16_BYTE( "01b.d14", 0x20001, 0x10000, CRC(054c5242) SHA1(411389e36d33fd27e13ffc6a7d4b295a42f08869) )
|
||||
|
||||
ROM_REGION( 0x80000, "gfx2", 0 ) /* same content as parent */
|
||||
ROM_LOAD16_BYTE( "v2a00.i13", 0x00000, 0x10000, CRC(a33f7d6d) SHA1(c2b9a9a66e4712785250cad69a5e43338af60a82) ) /* characters */
|
||||
ROM_LOAD16_BYTE( "v2a10.h13", 0x20000, 0x10000, CRC(8fbc7454) SHA1(93782d148afe64b14fa46deb4d227ef167030c94) ) /* characters */
|
||||
ROM_REGION( 0x80000, "gfx2", 0 ) // same content as parent
|
||||
ROM_LOAD16_BYTE( "v2a00.i13", 0x00000, 0x10000, CRC(a33f7d6d) SHA1(c2b9a9a66e4712785250cad69a5e43338af60a82) ) // characters
|
||||
ROM_LOAD16_BYTE( "v2a10.h13", 0x20000, 0x10000, CRC(8fbc7454) SHA1(93782d148afe64b14fa46deb4d227ef167030c94) ) // characters
|
||||
ROM_LOAD16_BYTE( "v2b00.i12", 0x00001, 0x10000, CRC(e63759bb) SHA1(df7e94f40266aa8995509346cdfdce08a885de16) )
|
||||
ROM_LOAD16_BYTE( "v2b10.h12", 0x20001, 0x10000, CRC(8a7d4062) SHA1(5b5eb4edc765f0e13e22f9de62ddae7380ba3790) )
|
||||
ROM_LOAD16_BYTE( "02a00.i11", 0x40000, 0x10000, CRC(6751a942) SHA1(a71c9cbbf1fba92664144d571d49cf2c15f45408) ) /* objects */
|
||||
ROM_LOAD16_BYTE( "02a10.h11", 0x60000, 0x10000, CRC(bc5ff11c) SHA1(b02296982298e1a659ce05606b291eda9a605cc8) ) /* objects */
|
||||
ROM_LOAD16_BYTE( "02a00.i11", 0x40000, 0x10000, CRC(6751a942) SHA1(a71c9cbbf1fba92664144d571d49cf2c15f45408) ) // objects
|
||||
ROM_LOAD16_BYTE( "02a10.h11", 0x60000, 0x10000, CRC(bc5ff11c) SHA1(b02296982298e1a659ce05606b291eda9a605cc8) ) // objects
|
||||
ROM_LOAD16_BYTE( "02b00_11-4.i8.bin", 0x40001, 0x10000, CRC(460aa7b4) SHA1(9e928d6150e7a91d411c0510198e80d523a88272) )
|
||||
ROM_LOAD16_BYTE( "02b10.h8", 0x60001, 0x10000, CRC(2cc7ee28) SHA1(c96890383dbef755953f851a43449cf563e2e1a5) )
|
||||
|
||||
ROM_REGION( 0x0100, "proms", 0 )
|
||||
ROM_LOAD( "6301-1.i15", 0x0000, 0x0100, CRC(f34617ad) SHA1(79ceba6fe204472a5a659641ac4f14bb1f0ee3f6) ) /* sprite lookup table */
|
||||
ROM_LOAD( "6301-1.i15", 0x0000, 0x0100, CRC(f34617ad) SHA1(79ceba6fe204472a5a659641ac4f14bb1f0ee3f6) ) // sprite lookup table
|
||||
|
||||
ROM_REGION( 0x20000, "vlm", 0 ) /* same content as parent */ /* 128k for the VLM5030 data */
|
||||
ROM_REGION( 0x20000, "vlm", 0 ) // same content as parent, 128k for the VLM5030 data
|
||||
ROM_LOAD( "voice_00.e7", 0x00000, 0x10000, CRC(8bd0fcf7) SHA1(d55644f8b33eff6f960725f00ba842e0253e3b36) )
|
||||
ROM_LOAD( "voice_10.d7", 0x10000, 0x10000, CRC(b4c97494) SHA1(93f7c3c93f6f790c3f480e183da0105b5ac3593b) )
|
||||
ROM_END
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "speaker.h"
|
||||
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(finalizr_state::finalizr_scanline)
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(finalizr_state::scanline)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
@ -38,20 +38,20 @@ TIMER_DEVICE_CALLBACK_MEMBER(finalizr_state::finalizr_scanline)
|
||||
}
|
||||
|
||||
|
||||
void finalizr_state::finalizr_videoctrl_w(uint8_t data)
|
||||
void finalizr_state::videoctrl_w(uint8_t data)
|
||||
{
|
||||
m_charbank = data & 3;
|
||||
m_spriterambank = data & 8;
|
||||
/* other bits unknown */
|
||||
// other bits unknown
|
||||
}
|
||||
|
||||
void finalizr_state::finalizr_coin_w(uint8_t data)
|
||||
void finalizr_state::coin_w(uint8_t data)
|
||||
{
|
||||
machine().bookkeeping().coin_counter_w(0, data & 0x01);
|
||||
machine().bookkeeping().coin_counter_w(1, data & 0x02);
|
||||
}
|
||||
|
||||
void finalizr_state::finalizr_flipscreen_w(uint8_t data)
|
||||
void finalizr_state::flipscreen_w(uint8_t data)
|
||||
{
|
||||
m_nmi_enable = data & 0x01;
|
||||
m_irq_enable = data & 0x02;
|
||||
@ -59,7 +59,7 @@ void finalizr_state::finalizr_flipscreen_w(uint8_t data)
|
||||
flip_screen_set(~data & 0x08);
|
||||
}
|
||||
|
||||
void finalizr_state::finalizr_i8039_irq_w(uint8_t data)
|
||||
void finalizr_state::i8039_irq_w(uint8_t data)
|
||||
{
|
||||
m_audiocpu->set_input_line(0, ASSERT_LINE);
|
||||
}
|
||||
@ -87,9 +87,9 @@ READ_LINE_MEMBER(finalizr_state::i8039_t1_r)
|
||||
based on the I8039 main xtal clock input frequency of 9.216MHz
|
||||
*/
|
||||
|
||||
m_T1_line++;
|
||||
m_T1_line %= 16;
|
||||
return (!(m_T1_line % 3) && (m_T1_line > 0));
|
||||
m_t1_line++;
|
||||
m_t1_line %= 16;
|
||||
return (!(m_t1_line % 3) && (m_t1_line > 0));
|
||||
}
|
||||
|
||||
void finalizr_state::i8039_t0_w(uint8_t data)
|
||||
@ -104,10 +104,10 @@ void finalizr_state::i8039_t0_w(uint8_t data)
|
||||
|
||||
void finalizr_state::main_map(address_map &map)
|
||||
{
|
||||
map(0x0001, 0x0001).writeonly().share("scroll");
|
||||
map(0x0003, 0x0003).w(FUNC(finalizr_state::finalizr_videoctrl_w));
|
||||
map(0x0004, 0x0004).w(FUNC(finalizr_state::finalizr_flipscreen_w));
|
||||
// map(0x0020, 0x003f).writeonly().share("scroll");
|
||||
map(0x0001, 0x0001).writeonly().share(m_scroll);
|
||||
map(0x0003, 0x0003).w(FUNC(finalizr_state::videoctrl_w));
|
||||
map(0x0004, 0x0004).w(FUNC(finalizr_state::flipscreen_w));
|
||||
// map(0x0020, 0x003f).writeonly().share(m_scroll);
|
||||
map(0x0800, 0x0800).portr("DSW3");
|
||||
map(0x0808, 0x0808).portr("DSW2");
|
||||
map(0x0810, 0x0810).portr("SYSTEM");
|
||||
@ -115,18 +115,18 @@ void finalizr_state::main_map(address_map &map)
|
||||
map(0x0812, 0x0812).portr("P2");
|
||||
map(0x0813, 0x0813).portr("DSW1");
|
||||
map(0x0818, 0x0818).w("watchdog", FUNC(watchdog_timer_device::reset_w));
|
||||
map(0x0819, 0x0819).w(FUNC(finalizr_state::finalizr_coin_w));
|
||||
map(0x081a, 0x081a).w("snsnd", FUNC(sn76489a_device::write)); /* This address triggers the SN chip to read the data port. */
|
||||
map(0x081b, 0x081b).nopw(); /* Loads the snd command into the snd latch */
|
||||
map(0x081c, 0x081c).w(FUNC(finalizr_state::finalizr_i8039_irq_w)); /* custom sound chip */
|
||||
map(0x081d, 0x081d).w("soundlatch", FUNC(generic_latch_8_device::write)); /* custom sound chip */
|
||||
map(0x2000, 0x23ff).ram().share("colorram");
|
||||
map(0x2400, 0x27ff).ram().share("videoram");
|
||||
map(0x2800, 0x2bff).ram().share("colorram2");
|
||||
map(0x2c00, 0x2fff).ram().share("videoram2");
|
||||
map(0x3000, 0x31ff).ram().share("spriteram");
|
||||
map(0x0819, 0x0819).w(FUNC(finalizr_state::coin_w));
|
||||
map(0x081a, 0x081a).w("snsnd", FUNC(sn76489a_device::write)); // This address triggers the SN chip to read the data port.
|
||||
map(0x081b, 0x081b).nopw(); // Loads the snd command into the snd latch
|
||||
map(0x081c, 0x081c).w(FUNC(finalizr_state::i8039_irq_w)); // custom sound chip
|
||||
map(0x081d, 0x081d).w("soundlatch", FUNC(generic_latch_8_device::write)); // custom sound chip
|
||||
map(0x2000, 0x23ff).ram().share(m_colorram[0]);
|
||||
map(0x2400, 0x27ff).ram().share(m_videoram[0]);
|
||||
map(0x2800, 0x2bff).ram().share(m_colorram[1]);
|
||||
map(0x2c00, 0x2fff).ram().share(m_videoram[1]);
|
||||
map(0x3000, 0x31ff).ram().share(m_spriteram[0]);
|
||||
map(0x3200, 0x37ff).ram();
|
||||
map(0x3800, 0x39ff).ram().share("spriteram_2");
|
||||
map(0x3800, 0x39ff).ram().share(m_spriteram[1]);
|
||||
map(0x3a00, 0x3fff).ram();
|
||||
map(0x4000, 0xffff).rom();
|
||||
}
|
||||
@ -157,7 +157,7 @@ static INPUT_PORTS_START( finalizr )
|
||||
|
||||
PORT_START("DSW1")
|
||||
KONAMI_COINAGE_LOC(DEF_STR( Free_Play ), "No Coin B", SW1)
|
||||
/* "No Coin B" = coins produce sound, but no effect on coin counter */
|
||||
// "No Coin B" = coins produce sound, but no effect on coin counter
|
||||
|
||||
PORT_START("DSW2")
|
||||
PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1,2")
|
||||
@ -239,7 +239,7 @@ static const gfx_layout spritelayout =
|
||||
static GFXDECODE_START( gfx_finalizr )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 16 )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, spritelayout, 16*16, 16 )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, charlayout, 16*16, 16 ) /* to handle 8x8 sprites */
|
||||
GFXDECODE_ENTRY( "gfx1", 0, charlayout, 16*16, 16 ) // to handle 8x8 sprites
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
@ -247,7 +247,7 @@ void finalizr_state::machine_start()
|
||||
{
|
||||
save_item(NAME(m_spriterambank));
|
||||
save_item(NAME(m_charbank));
|
||||
save_item(NAME(m_T1_line));
|
||||
save_item(NAME(m_t1_line));
|
||||
save_item(NAME(m_nmi_enable));
|
||||
save_item(NAME(m_irq_enable));
|
||||
}
|
||||
@ -256,19 +256,19 @@ void finalizr_state::machine_reset()
|
||||
{
|
||||
m_spriterambank = 0;
|
||||
m_charbank = 0;
|
||||
m_T1_line = 0;
|
||||
m_t1_line = 0;
|
||||
m_nmi_enable = 0;
|
||||
m_irq_enable = 0;
|
||||
}
|
||||
|
||||
void finalizr_state::finalizr(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
KONAMI1(config, m_maincpu, XTAL(18'432'000)/6); /* ??? */
|
||||
// basic machine hardware
|
||||
KONAMI1(config, m_maincpu, XTAL(18'432'000)/6); // ???
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &finalizr_state::main_map);
|
||||
TIMER(config, "scantimer").configure_scanline(FUNC(finalizr_state::finalizr_scanline), "screen", 0, 1);
|
||||
TIMER(config, "scantimer").configure_scanline(FUNC(finalizr_state::scanline), "screen", 0, 1);
|
||||
|
||||
I8039(config, m_audiocpu, XTAL(18'432'000)/2); /* 9.216MHz clkin ?? */
|
||||
I8039(config, m_audiocpu, XTAL(18'432'000)/2); // 9.216MHz clkin ??
|
||||
m_audiocpu->set_addrmap(AS_PROGRAM, &finalizr_state::sound_map);
|
||||
m_audiocpu->set_addrmap(AS_IO, &finalizr_state::sound_io_map);
|
||||
m_audiocpu->p1_out_cb().set("dac", FUNC(dac_byte_interface::data_w));
|
||||
@ -278,19 +278,19 @@ void finalizr_state::finalizr(machine_config &config)
|
||||
|
||||
WATCHDOG_TIMER(config, "watchdog");
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
||||
screen.set_refresh_hz(60);
|
||||
screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
|
||||
screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate
|
||||
screen.set_size(36*8, 32*8);
|
||||
screen.set_visarea(1*8, 35*8-1, 2*8, 30*8-1);
|
||||
screen.set_screen_update(FUNC(finalizr_state::screen_update_finalizr));
|
||||
screen.set_screen_update(FUNC(finalizr_state::screen_update));
|
||||
screen.set_palette(m_palette);
|
||||
|
||||
GFXDECODE(config, m_gfxdecode, m_palette, gfx_finalizr);
|
||||
PALETTE(config, m_palette, FUNC(finalizr_state::finalizr_palette), 2*16*16, 32);
|
||||
PALETTE(config, m_palette, FUNC(finalizr_state::palette), 2*16*16, 32);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "speaker").front_center();
|
||||
|
||||
GENERIC_LATCH_8(config, "soundlatch");
|
||||
@ -314,8 +314,8 @@ ROM_START( finalizr )
|
||||
ROM_LOAD( "523k02.12c", 0x8000, 0x4000, CRC(1bccc696) SHA1(3c29f4a030e76660b5a25347e042e344b0653343) )
|
||||
ROM_LOAD( "523k03.13c", 0xc000, 0x4000, CRC(c48927c6) SHA1(9cf6b285034670370ba0246c33e1fe0a057457e7) )
|
||||
|
||||
ROM_REGION( 0x1000, "audiocpu", 0 ) /* 8039 */
|
||||
ROM_LOAD( "d8749hd.bin", 0x0000, 0x0800, BAD_DUMP CRC(978dfc33) SHA1(13d24ce577b88bf6ec2e970d36dc67a7ec691c55) ) /* this comes from the bootleg, the original has a custom IC */
|
||||
ROM_REGION( 0x1000, "audiocpu", 0 ) // 8039
|
||||
ROM_LOAD( "d8749hd.bin", 0x0000, 0x0800, BAD_DUMP CRC(978dfc33) SHA1(13d24ce577b88bf6ec2e970d36dc67a7ec691c55) ) // this comes from the bootleg, the original has a custom IC
|
||||
|
||||
ROM_REGION( 0x20000, "gfx1", 0 )
|
||||
ROM_LOAD16_BYTE( "523h04.5e", 0x00000, 0x4000, CRC(c056d710) SHA1(3fe0ab7ef3bce7298c2a073d0985c33f9dc40062) )
|
||||
@ -324,13 +324,13 @@ ROM_START( finalizr )
|
||||
ROM_LOAD16_BYTE( "523h08.6f", 0x08001, 0x4000, CRC(79f44e17) SHA1(cb32edc4df9f2209f13fc258fec4e67ee91badef) )
|
||||
ROM_LOAD16_BYTE( "523h06.7e", 0x10000, 0x4000, CRC(d2db9689) SHA1(ceb5913716b4da2ddff2e837ddaa04d91e52f9e1) )
|
||||
ROM_LOAD16_BYTE( "523h09.7f", 0x10001, 0x4000, CRC(8896dc85) SHA1(91493c6b69655de482f0c2a0cb3662fc0d1b6e45) )
|
||||
/* 18000-1ffff empty */
|
||||
// 18000-1ffff empty
|
||||
|
||||
ROM_REGION( 0x0240, "proms", 0 ) /* PROMs at 2F & 3F are MMI 63S081N (or compatibles), PROMs at 10F & 11F are MMI 6301-1N (or compatibles) */
|
||||
ROM_LOAD( "523h10.2f", 0x0000, 0x0020, CRC(ec15dd15) SHA1(710384b154a9363fdc88edffda252f1d60e000dc) ) /* palette */
|
||||
ROM_LOAD( "523h11.3f", 0x0020, 0x0020, CRC(54be2e83) SHA1(3200abc7f2238d62d7204ef57a6daa2df150538d) ) /* palette */
|
||||
ROM_LOAD( "523h13.11f", 0x0040, 0x0100, CRC(4e0647a0) SHA1(fb87f878456b8b76bb2c028cb890d2a5c1c3e388) ) /* characters */
|
||||
ROM_LOAD( "523h12.10f", 0x0140, 0x0100, CRC(53166a2a) SHA1(6cdde206036df7176679711f7888d72acee27c8f) ) /* sprites */
|
||||
ROM_REGION( 0x0240, "proms", 0 ) // PROMs at 2F & 3F are MMI 63S081N (or compatibles), PROMs at 10F & 11F are MMI 6301-1N (or compatibles)
|
||||
ROM_LOAD( "523h10.2f", 0x0000, 0x0020, CRC(ec15dd15) SHA1(710384b154a9363fdc88edffda252f1d60e000dc) ) // palette
|
||||
ROM_LOAD( "523h11.3f", 0x0020, 0x0020, CRC(54be2e83) SHA1(3200abc7f2238d62d7204ef57a6daa2df150538d) ) // palette
|
||||
ROM_LOAD( "523h13.11f", 0x0040, 0x0100, CRC(4e0647a0) SHA1(fb87f878456b8b76bb2c028cb890d2a5c1c3e388) ) // characters
|
||||
ROM_LOAD( "523h12.10f", 0x0140, 0x0100, CRC(53166a2a) SHA1(6cdde206036df7176679711f7888d72acee27c8f) ) // sprites
|
||||
ROM_END
|
||||
|
||||
ROM_START( finalizra )
|
||||
@ -339,8 +339,8 @@ ROM_START( finalizra )
|
||||
ROM_LOAD( "2.12c", 0x8000, 0x4000, CRC(383dc94e) SHA1(f192e16e83ae34cc97af07072a4dc68e7c4c362c) )
|
||||
ROM_LOAD( "3.13c", 0xc000, 0x4000, CRC(ce177f6e) SHA1(034cbe0c1e2baf9577741b3c222a8b4a8ac8c919) )
|
||||
|
||||
ROM_REGION( 0x1000, "audiocpu", 0 ) /* 8039 */
|
||||
ROM_LOAD( "d8749hd.bin", 0x0000, 0x0800, BAD_DUMP CRC(978dfc33) SHA1(13d24ce577b88bf6ec2e970d36dc67a7ec691c55) ) /* this comes from the bootleg, the original has a custom IC */
|
||||
ROM_REGION( 0x1000, "audiocpu", 0 ) // 8039
|
||||
ROM_LOAD( "d8749hd.bin", 0x0000, 0x0800, BAD_DUMP CRC(978dfc33) SHA1(13d24ce577b88bf6ec2e970d36dc67a7ec691c55) ) // this comes from the bootleg, the original has a custom IC
|
||||
|
||||
ROM_REGION( 0x20000, "gfx1", 0 )
|
||||
ROM_LOAD16_BYTE( "523h04.5e", 0x00000, 0x4000, CRC(c056d710) SHA1(3fe0ab7ef3bce7298c2a073d0985c33f9dc40062) )
|
||||
@ -349,13 +349,13 @@ ROM_START( finalizra )
|
||||
ROM_LOAD16_BYTE( "523h08.6f", 0x08001, 0x4000, CRC(79f44e17) SHA1(cb32edc4df9f2209f13fc258fec4e67ee91badef) )
|
||||
ROM_LOAD16_BYTE( "523h06.7e", 0x10000, 0x4000, CRC(d2db9689) SHA1(ceb5913716b4da2ddff2e837ddaa04d91e52f9e1) )
|
||||
ROM_LOAD16_BYTE( "523h09.7f", 0x10001, 0x4000, CRC(8896dc85) SHA1(91493c6b69655de482f0c2a0cb3662fc0d1b6e45) )
|
||||
/* 18000-1ffff empty */
|
||||
// 18000-1ffff empty
|
||||
|
||||
ROM_REGION( 0x0240, "proms", 0 ) /* PROMs at 2F & 3F are MMI 63S081N (or compatibles), PROMs at 10F & 11F are MMI 6301-1N (or compatibles) */
|
||||
ROM_LOAD( "523h10.2f", 0x0000, 0x0020, CRC(ec15dd15) SHA1(710384b154a9363fdc88edffda252f1d60e000dc) ) /* palette */
|
||||
ROM_LOAD( "523h11.3f", 0x0020, 0x0020, CRC(54be2e83) SHA1(3200abc7f2238d62d7204ef57a6daa2df150538d) ) /* palette */
|
||||
ROM_LOAD( "523h13.11f", 0x0040, 0x0100, CRC(4e0647a0) SHA1(fb87f878456b8b76bb2c028cb890d2a5c1c3e388) ) /* characters */
|
||||
ROM_LOAD( "523h12.10f", 0x0140, 0x0100, CRC(53166a2a) SHA1(6cdde206036df7176679711f7888d72acee27c8f) ) /* sprites */
|
||||
ROM_REGION( 0x0240, "proms", 0 ) // PROMs at 2F & 3F are MMI 63S081N (or compatibles), PROMs at 10F & 11F are MMI 6301-1N (or compatibles)
|
||||
ROM_LOAD( "523h10.2f", 0x0000, 0x0020, CRC(ec15dd15) SHA1(710384b154a9363fdc88edffda252f1d60e000dc) ) // palette
|
||||
ROM_LOAD( "523h11.3f", 0x0020, 0x0020, CRC(54be2e83) SHA1(3200abc7f2238d62d7204ef57a6daa2df150538d) ) // palette
|
||||
ROM_LOAD( "523h13.11f", 0x0040, 0x0100, CRC(4e0647a0) SHA1(fb87f878456b8b76bb2c028cb890d2a5c1c3e388) ) // characters
|
||||
ROM_LOAD( "523h12.10f", 0x0140, 0x0100, CRC(53166a2a) SHA1(6cdde206036df7176679711f7888d72acee27c8f) ) // sprites
|
||||
ROM_END
|
||||
|
||||
ROM_START( finalizrb )
|
||||
@ -363,7 +363,7 @@ ROM_START( finalizrb )
|
||||
ROM_LOAD( "finalizr.5", 0x4000, 0x8000, CRC(a55e3f14) SHA1(47f6da214b36cc56be547fa4313afcc5572508a2) )
|
||||
ROM_LOAD( "finalizr.6", 0xc000, 0x4000, CRC(ce177f6e) SHA1(034cbe0c1e2baf9577741b3c222a8b4a8ac8c919) )
|
||||
|
||||
ROM_REGION( 0x1000, "audiocpu", 0 ) /* 8039 */
|
||||
ROM_REGION( 0x1000, "audiocpu", 0 ) // 8039
|
||||
ROM_LOAD( "d8749hd.bin", 0x0000, 0x0800, CRC(978dfc33) SHA1(13d24ce577b88bf6ec2e970d36dc67a7ec691c55) )
|
||||
|
||||
ROM_REGION( 0x20000, "gfx1", 0 )
|
||||
@ -373,13 +373,13 @@ ROM_START( finalizrb )
|
||||
ROM_LOAD16_BYTE( "523h08.6f", 0x08001, 0x4000, CRC(79f44e17) SHA1(cb32edc4df9f2209f13fc258fec4e67ee91badef) )
|
||||
ROM_LOAD16_BYTE( "523h06.7e", 0x10000, 0x4000, CRC(d2db9689) SHA1(ceb5913716b4da2ddff2e837ddaa04d91e52f9e1) )
|
||||
ROM_LOAD16_BYTE( "523h09.7f", 0x10001, 0x4000, CRC(8896dc85) SHA1(91493c6b69655de482f0c2a0cb3662fc0d1b6e45) )
|
||||
/* 18000-1ffff empty */
|
||||
// 18000-1ffff empty
|
||||
|
||||
ROM_REGION( 0x0240, "proms", 0 ) /* PROMs at 2F & 3F are MMI 63S081N (or compatibles), PROMs at 10F & 11F are MMI 6301-1N (or compatibles) */
|
||||
ROM_LOAD( "523h10.2f", 0x0000, 0x0020, CRC(ec15dd15) SHA1(710384b154a9363fdc88edffda252f1d60e000dc) ) /* palette */
|
||||
ROM_LOAD( "523h11.3f", 0x0020, 0x0020, CRC(54be2e83) SHA1(3200abc7f2238d62d7204ef57a6daa2df150538d) ) /* palette */
|
||||
ROM_LOAD( "523h13.11f", 0x0040, 0x0100, CRC(4e0647a0) SHA1(fb87f878456b8b76bb2c028cb890d2a5c1c3e388) ) /* characters */
|
||||
ROM_LOAD( "523h12.10f", 0x0140, 0x0100, CRC(53166a2a) SHA1(6cdde206036df7176679711f7888d72acee27c8f) ) /* sprites */
|
||||
ROM_REGION( 0x0240, "proms", 0 ) // PROMs at 2F & 3F are MMI 63S081N (or compatibles), PROMs at 10F & 11F are MMI 6301-1N (or compatibles)
|
||||
ROM_LOAD( "523h10.2f", 0x0000, 0x0020, CRC(ec15dd15) SHA1(710384b154a9363fdc88edffda252f1d60e000dc) ) // palette
|
||||
ROM_LOAD( "523h11.3f", 0x0020, 0x0020, CRC(54be2e83) SHA1(3200abc7f2238d62d7204ef57a6daa2df150538d) ) // palette
|
||||
ROM_LOAD( "523h13.11f", 0x0040, 0x0100, CRC(4e0647a0) SHA1(fb87f878456b8b76bb2c028cb890d2a5c1c3e388) ) // characters
|
||||
ROM_LOAD( "523h12.10f", 0x0140, 0x0100, CRC(53166a2a) SHA1(6cdde206036df7176679711f7888d72acee27c8f) ) // sprites
|
||||
ROM_END
|
||||
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
*
|
||||
*************************************/
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(ironhors_state::ironhors_scanline_tick)
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(ironhors_state::scanline_tick)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
@ -40,12 +40,12 @@ TIMER_DEVICE_CALLBACK_MEMBER(ironhors_state::ironhors_scanline_tick)
|
||||
}
|
||||
}
|
||||
|
||||
void ironhors_state::sh_irqtrigger_w(uint8_t data)
|
||||
void ironhors_base_state::sh_irqtrigger_w(uint8_t data)
|
||||
{
|
||||
m_soundcpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
|
||||
}
|
||||
|
||||
void ironhors_state::filter_w(uint8_t data)
|
||||
void ironhors_base_state::filter_w(uint8_t data)
|
||||
{
|
||||
m_disc_ih->write(NODE_11, (data & 0x04) >> 2);
|
||||
m_disc_ih->write(NODE_12, (data & 0x02) >> 1);
|
||||
@ -62,9 +62,9 @@ void ironhors_state::master_map(address_map &map)
|
||||
{
|
||||
map(0x0000, 0x0002).ram();
|
||||
map(0x0003, 0x0003).ram().w(FUNC(ironhors_state::charbank_w));
|
||||
map(0x0004, 0x0004).ram().share("int_enable");
|
||||
map(0x0004, 0x0004).ram().share(m_interrupt_enable);
|
||||
map(0x0005, 0x001f).ram();
|
||||
map(0x0020, 0x003f).ram().share("scroll");
|
||||
map(0x0020, 0x003f).ram().share(m_scroll);
|
||||
map(0x0040, 0x005f).ram();
|
||||
map(0x0060, 0x00df).ram();
|
||||
map(0x0800, 0x0800).w(m_soundlatch, FUNC(generic_latch_8_device::write));
|
||||
@ -77,12 +77,12 @@ void ironhors_state::master_map(address_map &map)
|
||||
map(0x1800, 0x1800).nopw(); // ???
|
||||
map(0x1a00, 0x1a01).nopw(); // ???
|
||||
map(0x1c00, 0x1dff).nopw(); // ???
|
||||
map(0x2000, 0x23ff).ram().w(FUNC(ironhors_state::colorram_w)).share("colorram");
|
||||
map(0x2400, 0x27ff).ram().w(FUNC(ironhors_state::videoram_w)).share("videoram");
|
||||
map(0x2000, 0x23ff).ram().w(FUNC(ironhors_state::colorram_w)).share(m_colorram);
|
||||
map(0x2400, 0x27ff).ram().w(FUNC(ironhors_state::videoram_w)).share(m_videoram);
|
||||
map(0x2800, 0x2fff).ram();
|
||||
map(0x3000, 0x30ff).ram().share("spriteram2");
|
||||
map(0x3000, 0x30ff).ram().share(m_spriteram[1]);
|
||||
map(0x3100, 0x37ff).ram();
|
||||
map(0x3800, 0x38ff).ram().share("spriteram");
|
||||
map(0x3800, 0x38ff).ram().share(m_spriteram[0]);
|
||||
map(0x3900, 0x3fff).ram();
|
||||
map(0x4000, 0xffff).rom();
|
||||
}
|
||||
@ -100,7 +100,7 @@ void ironhors_state::slave_io_map(address_map &map)
|
||||
map(0x00, 0x01).rw("ym2203", FUNC(ym2203_device::read), FUNC(ym2203_device::write));
|
||||
}
|
||||
|
||||
void ironhors_state::farwest_master_map(address_map &map)
|
||||
void farwest_state::master_map(address_map &map)
|
||||
{
|
||||
map(0x0000, 0x1bff).rom();
|
||||
|
||||
@ -111,31 +111,31 @@ void ironhors_state::farwest_master_map(address_map &map)
|
||||
map(0x0040, 0x005f).ram();
|
||||
map(0x0060, 0x00ff).ram();
|
||||
map(0x0800, 0x0800).w(m_soundlatch, FUNC(generic_latch_8_device::write));
|
||||
map(0x0900, 0x0900) /*.protr("DSW3") */ .w(FUNC(ironhors_state::sh_irqtrigger_w));
|
||||
map(0x0a00, 0x0a00).portr("DSW2"); //.w(FUNC(ironhors_state::palettebank_w));
|
||||
map(0x0b00, 0x0b00).portr("DSW1").w(FUNC(ironhors_state::flipscreen_w));
|
||||
map(0x0b01, 0x0b01).portr("DSW2"); //.w(FUNC(ironhors_state::palettebank_w));
|
||||
map(0x0900, 0x0900) /*.protr("DSW3") */ .w(FUNC(farwest_state::sh_irqtrigger_w));
|
||||
map(0x0a00, 0x0a00).portr("DSW2"); //.w(FUNC(farwest_state::palettebank_w));
|
||||
map(0x0b00, 0x0b00).portr("DSW1").w(FUNC(farwest_state::flipscreen_w));
|
||||
map(0x0b01, 0x0b01).portr("DSW2"); //.w(FUNC(farwest_state::palettebank_w));
|
||||
map(0x0b02, 0x0b02).portr("P1");
|
||||
map(0x0b03, 0x0b03).portr("SYSTEM");
|
||||
|
||||
|
||||
|
||||
map(0x1800, 0x1800).w(FUNC(ironhors_state::sh_irqtrigger_w));
|
||||
map(0x1a00, 0x1a00).ram().share("int_enable");
|
||||
map(0x1a01, 0x1a01).ram().w(FUNC(ironhors_state::charbank_w));
|
||||
map(0x1a02, 0x1a02).w(FUNC(ironhors_state::palettebank_w));
|
||||
map(0x1e00, 0x1eff).ram().share("spriteram");
|
||||
map(0x2000, 0x23ff).ram().w(FUNC(ironhors_state::colorram_w)).share("colorram");
|
||||
map(0x2400, 0x27ff).ram().w(FUNC(ironhors_state::videoram_w)).share("videoram");
|
||||
map(0x1800, 0x1800).w(FUNC(farwest_state::sh_irqtrigger_w));
|
||||
map(0x1a00, 0x1a00).ram().share(m_interrupt_enable);
|
||||
map(0x1a01, 0x1a01).ram().w(FUNC(farwest_state::charbank_w));
|
||||
map(0x1a02, 0x1a02).w(FUNC(farwest_state::palettebank_w));
|
||||
map(0x1e00, 0x1eff).ram().share(m_spriteram[0]);
|
||||
map(0x2000, 0x23ff).ram().w(FUNC(farwest_state::colorram_w)).share(m_colorram);
|
||||
map(0x2400, 0x27ff).ram().w(FUNC(farwest_state::videoram_w)).share(m_videoram);
|
||||
map(0x2800, 0x2fff).ram();
|
||||
map(0x1c00, 0x1dff).ram().share("spriteram2");
|
||||
map(0x1c00, 0x1dff).ram().share(m_spriteram[1]);
|
||||
map(0x3000, 0x31da).ram();
|
||||
map(0x31db, 0x31fa).ram().share("scroll");
|
||||
map(0x31db, 0x31fa).ram().share(m_scroll);
|
||||
map(0x31fb, 0x3fff).ram();
|
||||
map(0x4000, 0xffff).rom();
|
||||
}
|
||||
|
||||
void ironhors_state::farwest_slave_map(address_map &map)
|
||||
void farwest_state::slave_map(address_map &map)
|
||||
{
|
||||
map(0x0000, 0x3fff).rom();
|
||||
map(0x4000, 0x43ff).ram();
|
||||
@ -161,7 +161,7 @@ static INPUT_PORTS_START( dairesya )
|
||||
|
||||
PORT_START("DSW1")
|
||||
KONAMI_COINAGE_LOC(DEF_STR( Free_Play ), "No Coin B", SW1)
|
||||
/* "No Coin B" = coins produce sound, but no effect on coin counter */
|
||||
// "No Coin B" = coins produce sound, but no effect on coin counter
|
||||
|
||||
PORT_START("DSW2")
|
||||
PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1,2")
|
||||
@ -202,7 +202,7 @@ INPUT_PORTS_END
|
||||
static INPUT_PORTS_START( ironhors )
|
||||
PORT_INCLUDE( dairesya )
|
||||
|
||||
/* here button 3 for player 1 and 2 are exchanged */
|
||||
// here button 3 for player 1 and 2 are exchanged
|
||||
PORT_MODIFY("P1")
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL
|
||||
|
||||
@ -245,49 +245,49 @@ static const gfx_layout ironhors_spritelayout =
|
||||
static GFXDECODE_START( gfx_ironhors )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, ironhors_charlayout, 0, 16*8 )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, ironhors_spritelayout, 16*8*16, 16*8 )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, ironhors_charlayout, 16*8*16, 16*8 ) /* to handle 8x8 sprites */
|
||||
GFXDECODE_ENTRY( "gfx1", 0, ironhors_charlayout, 16*8*16, 16*8 ) // to handle 8x8 sprites
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
static const gfx_layout farwest_charlayout =
|
||||
{
|
||||
8,8, /* 8*8 characters */
|
||||
2048, /* 2048 characters */
|
||||
4, /* 4 bits per pixel */
|
||||
{ 0, 2, 4, 6 }, /* the four bitplanes are packed in one byte */
|
||||
8,8, // 8*8 characters
|
||||
2048, // 2048 characters
|
||||
4, // 4 bits per pixel
|
||||
{ 0, 2, 4, 6 }, // the four bitplanes are packed in one byte
|
||||
{ 3*8+1, 3*8+0, 0*8+1, 0*8+0, 1*8+1, 1*8+0, 2*8+1, 2*8+0 },
|
||||
{ 0*4*8, 1*4*8, 2*4*8, 3*4*8, 4*4*8, 5*4*8, 6*4*8, 7*4*8 },
|
||||
32*8 /* every char takes 32 consecutive bytes */
|
||||
32*8 // every char takes 32 consecutive bytes
|
||||
};
|
||||
|
||||
static const gfx_layout farwest_spritelayout =
|
||||
{
|
||||
16,16, /* 16*16 sprites */
|
||||
512, /* 512 sprites */
|
||||
4, /* 4 bits per pixel */
|
||||
{ 0, 512*32*8, 2*512*32*8, 3*512*32*8 }, /* the four bitplanes are separated */
|
||||
16,16, // 16*16 sprites
|
||||
512, // 512 sprites
|
||||
4, // 4 bits per pixel
|
||||
{ 0, 512*32*8, 2*512*32*8, 3*512*32*8 }, // the four bitplanes are separated
|
||||
{ 0, 1, 2, 3, 4, 5, 6, 7,
|
||||
16*8+0, 16*8+1, 16*8+2, 16*8+3, 16*8+4, 16*8+5, 16*8+6, 16*8+7 },
|
||||
{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
|
||||
8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
|
||||
32*8 /* every sprite takes 32 consecutive bytes */
|
||||
32*8 // every sprite takes 32 consecutive bytes
|
||||
};
|
||||
|
||||
static const gfx_layout farwest_spritelayout2 =
|
||||
{
|
||||
8,8, /* 8*8 characters */
|
||||
2048, /* 2048 characters */
|
||||
4, /* 4 bits per pixel */
|
||||
{ 0, 2048*8*8, 2*2048*8*8, 3*2048*8*8 }, /* the four bitplanes are separated */
|
||||
8,8, // 8*8 characters
|
||||
2048, // 2048 characters
|
||||
4, // 4 bits per pixel
|
||||
{ 0, 2048*8*8, 2*2048*8*8, 3*2048*8*8 }, // the four bitplanes are separated
|
||||
{ 0, 1, 2, 3, 4, 5, 6, 7 },
|
||||
{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
|
||||
8*8 /* every char takes 8 consecutive bytes */
|
||||
8*8 // every char takes 8 consecutive bytes
|
||||
};
|
||||
|
||||
static GFXDECODE_START( gfx_farwest )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, farwest_charlayout, 0, 16*8 )
|
||||
GFXDECODE_ENTRY( "gfx2", 0, farwest_spritelayout, 16*8*16, 16*8 )
|
||||
GFXDECODE_ENTRY( "gfx2", 0, farwest_spritelayout2,16*8*16, 16*8 ) /* to handle 8x8 sprites */
|
||||
GFXDECODE_ENTRY( "gfx2", 0, farwest_spritelayout2,16*8*16, 16*8 ) // to handle 8x8 sprites
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
@ -300,9 +300,9 @@ GFXDECODE_END
|
||||
static const discrete_mixer_desc ironhors_mixer_desc =
|
||||
{DISC_MIXER_IS_RESISTOR,
|
||||
{RES_K(2.2), RES_K(2.2), RES_K(2.2)},
|
||||
{0,0,0,0,0,0}, /* no variable resistors */
|
||||
{0,0,0,0,0,0}, /* no node capacitors */
|
||||
0, RES_K(1), /* RF */
|
||||
{0,0,0,0,0,0}, // no variable resistors
|
||||
{0,0,0,0,0,0}, // no node capacitors
|
||||
0, RES_K(1), // RF
|
||||
0,
|
||||
0,
|
||||
0, 1};
|
||||
@ -310,9 +310,9 @@ static const discrete_mixer_desc ironhors_mixer_desc =
|
||||
static const discrete_mixer_desc ironhors_mixer_desc_final =
|
||||
{DISC_MIXER_IS_RESISTOR,
|
||||
{RES_K(0.5), RES_K(1)},
|
||||
{0,0,0,0,0,0}, /* no variable resistors */
|
||||
{CAP_U(4.7), CAP_U(4.7)}, /* node capacitors */
|
||||
0, RES_K(1), /* RF */
|
||||
{0,0,0,0,0,0}, // no variable resistors
|
||||
{CAP_U(4.7), CAP_U(4.7)}, // node capacitors
|
||||
0, RES_K(1), // RF
|
||||
0,
|
||||
0,
|
||||
0, 1};
|
||||
@ -348,14 +348,14 @@ DISCRETE_SOUND_END
|
||||
*
|
||||
*************************************/
|
||||
|
||||
void ironhors_state::machine_start()
|
||||
void ironhors_base_state::machine_start()
|
||||
{
|
||||
save_item(NAME(m_palettebank));
|
||||
save_item(NAME(m_charbank));
|
||||
save_item(NAME(m_spriterambank));
|
||||
}
|
||||
|
||||
void ironhors_state::machine_reset()
|
||||
void ironhors_base_state::machine_reset()
|
||||
{
|
||||
m_palettebank = 0;
|
||||
m_charbank = 0;
|
||||
@ -377,32 +377,23 @@ Hsync is 15,56khz
|
||||
These clocks make the emulation run too fast.
|
||||
*/
|
||||
|
||||
void ironhors_state::ironhors(machine_config &config)
|
||||
void ironhors_base_state::base(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
MC6809E(config, m_maincpu, 18432000/6); /* 3.072 MHz??? mod by Shingo Suzuki 1999/10/15 */
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &ironhors_state::master_map);
|
||||
TIMER(config, "scantimer").configure_scanline(FUNC(ironhors_state::ironhors_scanline_tick), "screen", 0, 1);
|
||||
// basic machine hardware
|
||||
MC6809E(config, m_maincpu, 18432000/6); // 3.072 MHz??? mod by Shingo Suzuki 1999/10/15
|
||||
|
||||
Z80(config, m_soundcpu, 18432000/6); /* 3.072 MHz */
|
||||
m_soundcpu->set_addrmap(AS_PROGRAM, &ironhors_state::slave_map);
|
||||
m_soundcpu->set_addrmap(AS_IO, &ironhors_state::slave_io_map);
|
||||
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
|
||||
// m_screen->set_refresh_hz(61);
|
||||
// m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
|
||||
// m_screen->set_size(32*8, 32*8);
|
||||
// m_screen->set_visarea(1*8, 31*8-1, 2*8, 30*8-1);
|
||||
m_screen->set_raw(18432000/4,296,8,256-8,255,16,240); // pixel clock is a guesswork
|
||||
m_screen->set_screen_update(FUNC(ironhors_state::screen_update));
|
||||
m_screen->set_palette(m_palette);
|
||||
|
||||
GFXDECODE(config, m_gfxdecode, m_palette, gfx_ironhors);
|
||||
PALETTE(config, m_palette, FUNC(ironhors_state::ironhors_palette), 16*8*16+16*8*16, 256);
|
||||
PALETTE(config, m_palette, FUNC(ironhors_state::palette), 16*8*16+16*8*16, 256);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
|
||||
GENERIC_LATCH_8(config, m_soundlatch);
|
||||
@ -417,7 +408,23 @@ void ironhors_state::ironhors(machine_config &config)
|
||||
DISCRETE(config, m_disc_ih, ironhors_discrete).add_route(ALL_OUTPUTS, "mono", 1.0);
|
||||
}
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(ironhors_state::farwest_scanline_tick)
|
||||
void ironhors_state::ironhors(machine_config &config)
|
||||
{
|
||||
base(config);
|
||||
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &ironhors_state::master_map);
|
||||
TIMER(config, "scantimer").configure_scanline(FUNC(ironhors_state::scanline_tick), "screen", 0, 1);
|
||||
|
||||
Z80(config, m_soundcpu, 18432000/6); // 3.072 MHz
|
||||
m_soundcpu->set_addrmap(AS_PROGRAM, &ironhors_state::slave_map);
|
||||
m_soundcpu->set_addrmap(AS_IO, &ironhors_state::slave_io_map);
|
||||
|
||||
m_screen->set_screen_update(FUNC(ironhors_state::screen_update));
|
||||
|
||||
GFXDECODE(config, m_gfxdecode, m_palette, gfx_ironhors);
|
||||
}
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(farwest_state::scanline_tick)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
@ -433,20 +440,19 @@ TIMER_DEVICE_CALLBACK_MEMBER(ironhors_state::farwest_scanline_tick)
|
||||
}
|
||||
}
|
||||
|
||||
void ironhors_state::farwest(machine_config &config)
|
||||
void farwest_state::farwest(machine_config &config)
|
||||
{
|
||||
ironhors(config);
|
||||
base(config);
|
||||
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &ironhors_state::farwest_master_map);
|
||||
subdevice<timer_device>("scantimer")->set_callback(FUNC(ironhors_state::farwest_scanline_tick));
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &farwest_state::master_map);
|
||||
TIMER(config, "scantimer").configure_scanline(FUNC(farwest_state::scanline_tick), "screen", 0, 1);
|
||||
|
||||
Z80(config.replace(), m_soundcpu, 18432000/6); /* 3.072 MHz */
|
||||
m_soundcpu->set_addrmap(AS_PROGRAM, &ironhors_state::farwest_slave_map);
|
||||
Z80(config, m_soundcpu, 18432000/6); // 3.072 MHz
|
||||
m_soundcpu->set_addrmap(AS_PROGRAM, &farwest_state::slave_map);
|
||||
|
||||
m_gfxdecode->set_info(gfx_farwest);
|
||||
MCFG_VIDEO_START_OVERRIDE(ironhors_state,farwest)
|
||||
GFXDECODE(config, m_gfxdecode, m_palette, gfx_farwest);
|
||||
|
||||
m_screen->set_screen_update(FUNC(ironhors_state::screen_update_farwest));
|
||||
m_screen->set_screen_update(FUNC(farwest_state::screen_update));
|
||||
|
||||
subdevice<ym2203_device>("ym2203")->port_b_read_callback().set(m_soundlatch, FUNC(generic_latch_8_device::read));
|
||||
}
|
||||
@ -474,11 +480,11 @@ ROM_START( ironhors )
|
||||
ROM_LOAD16_BYTE( "560_h04.06f", 0x10001, 0x8000, CRC(c1486f61) SHA1(4b96aebe5d35fd1d73bde8576689addbb1ff66ed) )
|
||||
|
||||
ROM_REGION( 0x0500, "proms", 0 )
|
||||
ROM_LOAD( "03f_h08.bin", 0x0000, 0x0100, CRC(9f6ddf83) SHA1(08a37182a974c5448156637f10fe60bfe5f225ad) ) /* palette red */
|
||||
ROM_LOAD( "04f_h09.bin", 0x0100, 0x0100, CRC(e6773825) SHA1(7523e7fa090d850fe79ff0069d3260c76645d65a) ) /* palette green */
|
||||
ROM_LOAD( "05f_h10.bin", 0x0200, 0x0100, CRC(30a57860) SHA1(3ec7535286c8bc65e203320f47e4ed6f1d3d61c9) ) /* palette blue */
|
||||
ROM_LOAD( "10f_h12.bin", 0x0300, 0x0100, CRC(5eb33e73) SHA1(f34916dc4617b0c48e0a7ac6ace97b35dfcf1c40) ) /* character lookup table */
|
||||
ROM_LOAD( "10f_h11.bin", 0x0400, 0x0100, CRC(a63e37d8) SHA1(1a0a76ecd14310125bdf41a8431d562ed498eb27) ) /* sprite lookup table */
|
||||
ROM_LOAD( "03f_h08.bin", 0x0000, 0x0100, CRC(9f6ddf83) SHA1(08a37182a974c5448156637f10fe60bfe5f225ad) ) // palette red
|
||||
ROM_LOAD( "04f_h09.bin", 0x0100, 0x0100, CRC(e6773825) SHA1(7523e7fa090d850fe79ff0069d3260c76645d65a) ) // palette green
|
||||
ROM_LOAD( "05f_h10.bin", 0x0200, 0x0100, CRC(30a57860) SHA1(3ec7535286c8bc65e203320f47e4ed6f1d3d61c9) ) // palette blue
|
||||
ROM_LOAD( "10f_h12.bin", 0x0300, 0x0100, CRC(5eb33e73) SHA1(f34916dc4617b0c48e0a7ac6ace97b35dfcf1c40) ) // character lookup table
|
||||
ROM_LOAD( "10f_h11.bin", 0x0400, 0x0100, CRC(a63e37d8) SHA1(1a0a76ecd14310125bdf41a8431d562ed498eb27) ) // sprite lookup table
|
||||
ROM_END
|
||||
|
||||
ROM_START( ironhorsh )
|
||||
@ -496,11 +502,11 @@ ROM_START( ironhorsh )
|
||||
ROM_LOAD16_BYTE( "06f_h04.bin", 0x10001, 0x8000, CRC(c1486f61) SHA1(4b96aebe5d35fd1d73bde8576689addbb1ff66ed) )
|
||||
|
||||
ROM_REGION( 0x0500, "proms", 0 )
|
||||
ROM_LOAD( "03f_h08.bin", 0x0000, 0x0100, CRC(9f6ddf83) SHA1(08a37182a974c5448156637f10fe60bfe5f225ad) ) /* palette red */
|
||||
ROM_LOAD( "04f_h09.bin", 0x0100, 0x0100, CRC(e6773825) SHA1(7523e7fa090d850fe79ff0069d3260c76645d65a) ) /* palette green */
|
||||
ROM_LOAD( "05f_h10.bin", 0x0200, 0x0100, CRC(30a57860) SHA1(3ec7535286c8bc65e203320f47e4ed6f1d3d61c9) ) /* palette blue */
|
||||
ROM_LOAD( "10f_h12.bin", 0x0300, 0x0100, CRC(5eb33e73) SHA1(f34916dc4617b0c48e0a7ac6ace97b35dfcf1c40) ) /* character lookup table */
|
||||
ROM_LOAD( "10f_h11.bin", 0x0400, 0x0100, CRC(a63e37d8) SHA1(1a0a76ecd14310125bdf41a8431d562ed498eb27) ) /* sprite lookup table */
|
||||
ROM_LOAD( "03f_h08.bin", 0x0000, 0x0100, CRC(9f6ddf83) SHA1(08a37182a974c5448156637f10fe60bfe5f225ad) ) // palette red
|
||||
ROM_LOAD( "04f_h09.bin", 0x0100, 0x0100, CRC(e6773825) SHA1(7523e7fa090d850fe79ff0069d3260c76645d65a) ) // palette green
|
||||
ROM_LOAD( "05f_h10.bin", 0x0200, 0x0100, CRC(30a57860) SHA1(3ec7535286c8bc65e203320f47e4ed6f1d3d61c9) ) // palette blue
|
||||
ROM_LOAD( "10f_h12.bin", 0x0300, 0x0100, CRC(5eb33e73) SHA1(f34916dc4617b0c48e0a7ac6ace97b35dfcf1c40) ) // character lookup table
|
||||
ROM_LOAD( "10f_h11.bin", 0x0400, 0x0100, CRC(a63e37d8) SHA1(1a0a76ecd14310125bdf41a8431d562ed498eb27) ) // sprite lookup table
|
||||
ROM_END
|
||||
|
||||
ROM_START( dairesya )
|
||||
@ -518,18 +524,18 @@ ROM_START( dairesya )
|
||||
ROM_LOAD16_BYTE( "560-k04.6f", 0x10001, 0x8000, CRC(c883d856) SHA1(4c4f91b72dab841ec15ca62121ed0c0878dfff23) )
|
||||
|
||||
ROM_REGION( 0x0500, "proms", 0 )
|
||||
ROM_LOAD( "03f_h08.bin", 0x0000, 0x0100, CRC(9f6ddf83) SHA1(08a37182a974c5448156637f10fe60bfe5f225ad) ) /* palette red */
|
||||
ROM_LOAD( "04f_h09.bin", 0x0100, 0x0100, CRC(e6773825) SHA1(7523e7fa090d850fe79ff0069d3260c76645d65a) ) /* palette green */
|
||||
ROM_LOAD( "05f_h10.bin", 0x0200, 0x0100, CRC(30a57860) SHA1(3ec7535286c8bc65e203320f47e4ed6f1d3d61c9) ) /* palette blue */
|
||||
ROM_LOAD( "10f_h12.bin", 0x0300, 0x0100, CRC(5eb33e73) SHA1(f34916dc4617b0c48e0a7ac6ace97b35dfcf1c40) ) /* character lookup table */
|
||||
ROM_LOAD( "10f_h11.bin", 0x0400, 0x0100, CRC(a63e37d8) SHA1(1a0a76ecd14310125bdf41a8431d562ed498eb27) ) /* sprite lookup table */
|
||||
ROM_LOAD( "03f_h08.bin", 0x0000, 0x0100, CRC(9f6ddf83) SHA1(08a37182a974c5448156637f10fe60bfe5f225ad) ) // palette red
|
||||
ROM_LOAD( "04f_h09.bin", 0x0100, 0x0100, CRC(e6773825) SHA1(7523e7fa090d850fe79ff0069d3260c76645d65a) ) // palette green
|
||||
ROM_LOAD( "05f_h10.bin", 0x0200, 0x0100, CRC(30a57860) SHA1(3ec7535286c8bc65e203320f47e4ed6f1d3d61c9) ) // palette blue
|
||||
ROM_LOAD( "10f_h12.bin", 0x0300, 0x0100, CRC(5eb33e73) SHA1(f34916dc4617b0c48e0a7ac6ace97b35dfcf1c40) ) // character lookup table
|
||||
ROM_LOAD( "10f_h11.bin", 0x0400, 0x0100, CRC(a63e37d8) SHA1(1a0a76ecd14310125bdf41a8431d562ed498eb27) ) // sprite lookup table
|
||||
ROM_END
|
||||
|
||||
ROM_START( farwest )
|
||||
ROM_REGION( 0x12000, "maincpu", 0 ) /* 64k for code + 8k for extra ROM */
|
||||
ROM_REGION( 0x12000, "maincpu", 0 ) // 64k for code + 8k for extra ROM
|
||||
ROM_LOAD( "ironhors.008", 0x04000, 0x4000, CRC(b1c8246c) SHA1(4ceb098bb0b4efcbe50bb4b23bd27a60dabf2b3e) )
|
||||
ROM_LOAD( "ironhors.009", 0x08000, 0x8000, CRC(ea34ecfc) SHA1(8c7f12e76d2b9eb592ebf1bfd3e16a6b130da8e5) )
|
||||
ROM_LOAD( "ironhors.007", 0x00000, 0x2000, CRC(471182b7) SHA1(48ff58cbbf971b257e8099ec331397cf73dc8325) ) /* don't know what this is for */
|
||||
ROM_LOAD( "ironhors.007", 0x00000, 0x2000, CRC(471182b7) SHA1(48ff58cbbf971b257e8099ec331397cf73dc8325) ) // don't know what this is for
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 )
|
||||
ROM_LOAD( "ironhors.010", 0x0000, 0x4000, CRC(a28231a6) SHA1(617e8fdf8129081c6a1bbbf140837a375a51da72) )
|
||||
@ -545,11 +551,11 @@ ROM_START( farwest )
|
||||
ROM_LOAD( "ironhors.004", 0x0c000, 0x4000, CRC(1fab18a3) SHA1(cc7ddf60b719e7c5a689f716ebee9bc04ade406a) )
|
||||
|
||||
ROM_REGION( 0x0500, "proms", 0 )
|
||||
ROM_LOAD( "ironcol.003", 0x0000, 0x0100, CRC(3e3fca11) SHA1(c92737659f063889a2b210cfe5c294b8a4864489) ) /* palette red */
|
||||
ROM_LOAD( "ironcol.001", 0x0100, 0x0100, CRC(dfb13014) SHA1(d9f9a5bed1300faf7c3864d5c5ae07087de25824) ) /* palette green */
|
||||
ROM_LOAD( "ironcol.002", 0x0200, 0x0100, CRC(77c88430) SHA1(e3041945b14955de109a505d9aa9f79046bed6a8) ) /* palette blue */
|
||||
ROM_LOAD( "10f_h12.bin", 0x0300, 0x0100, CRC(5eb33e73) SHA1(f34916dc4617b0c48e0a7ac6ace97b35dfcf1c40) ) /* character lookup table */
|
||||
ROM_LOAD( "ironcol.005", 0x0400, 0x0100, CRC(15077b9c) SHA1(c7fe24e3d481150452ff774f3908510db9e28367) ) /* sprite lookup table */
|
||||
ROM_LOAD( "ironcol.003", 0x0000, 0x0100, CRC(3e3fca11) SHA1(c92737659f063889a2b210cfe5c294b8a4864489) ) // palette red
|
||||
ROM_LOAD( "ironcol.001", 0x0100, 0x0100, CRC(dfb13014) SHA1(d9f9a5bed1300faf7c3864d5c5ae07087de25824) ) // palette green
|
||||
ROM_LOAD( "ironcol.002", 0x0200, 0x0100, CRC(77c88430) SHA1(e3041945b14955de109a505d9aa9f79046bed6a8) ) // palette blue
|
||||
ROM_LOAD( "10f_h12.bin", 0x0300, 0x0100, CRC(5eb33e73) SHA1(f34916dc4617b0c48e0a7ac6ace97b35dfcf1c40) ) // character lookup table
|
||||
ROM_LOAD( "ironcol.005", 0x0400, 0x0100, CRC(15077b9c) SHA1(c7fe24e3d481150452ff774f3908510db9e28367) ) // sprite lookup table
|
||||
ROM_END
|
||||
|
||||
|
||||
@ -562,4 +568,4 @@ ROM_END
|
||||
GAME( 1986, ironhors, 0, ironhors, ironhors, ironhors_state, empty_init, ROT0, "Konami", "Iron Horse (version K)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1986, ironhorsh, ironhors, ironhors, ironhors, ironhors_state, empty_init, ROT0, "Konami", "Iron Horse (version H)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1986, dairesya, ironhors, ironhors, dairesya, ironhors_state, empty_init, ROT0, "Konami (Kawakusu license)", "Dai Ressya Goutou (Japan, version K)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1986, farwest, ironhors, farwest, ironhors, ironhors_state, empty_init, ROT0, "bootleg?", "Far West", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1986, farwest, ironhors, farwest, ironhors, farwest_state, empty_init, ROT0, "bootleg?", "Far West", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
|
||||
|
@ -21,75 +21,66 @@ public:
|
||||
ddribble_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_fg_videoram(*this, "fg_videoram"),
|
||||
m_spriteram_1(*this, "spriteram_1"),
|
||||
m_sharedram(*this, "sharedram"),
|
||||
m_spriteram(*this, "spriteram_%u", 1U),
|
||||
m_bg_videoram(*this, "bg_videoram"),
|
||||
m_spriteram_2(*this, "spriteram_2"),
|
||||
m_snd_sharedram(*this, "snd_sharedram"),
|
||||
m_mainbank(*this, "mainbank"),
|
||||
m_vlmbank(*this, "vlmbank"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_cpu1(*this, "cpu1"),
|
||||
m_subcpu(*this, "subcpu"),
|
||||
m_vlm(*this, "vlm"),
|
||||
m_filter1(*this, "filter1"),
|
||||
m_filter2(*this, "filter2"),
|
||||
m_filter3(*this, "filter3"),
|
||||
m_filter(*this, "filter%u", 1U),
|
||||
m_gfxdecode(*this, "gfxdecode")
|
||||
{ }
|
||||
|
||||
void ddribble(machine_config &config);
|
||||
|
||||
private:
|
||||
/* memory pointers */
|
||||
required_shared_ptr<uint8_t> m_fg_videoram;
|
||||
required_shared_ptr<uint8_t> m_spriteram_1;
|
||||
required_shared_ptr<uint8_t> m_sharedram;
|
||||
required_shared_ptr<uint8_t> m_bg_videoram;
|
||||
required_shared_ptr<uint8_t> m_spriteram_2;
|
||||
required_shared_ptr<uint8_t> m_snd_sharedram;
|
||||
|
||||
/* video-related */
|
||||
tilemap_t *m_fg_tilemap;
|
||||
tilemap_t *m_bg_tilemap;
|
||||
int m_vregs[2][5];
|
||||
int m_charbank[2];
|
||||
|
||||
/* misc */
|
||||
int m_int_enable_0;
|
||||
int m_int_enable_1;
|
||||
|
||||
/* devices */
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_cpu1;
|
||||
required_device<vlm5030_device> m_vlm;
|
||||
required_device<filter_rc_device> m_filter1;
|
||||
required_device<filter_rc_device> m_filter2;
|
||||
required_device<filter_rc_device> m_filter3;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
|
||||
void ddribble_bankswitch_w(uint8_t data);
|
||||
uint8_t ddribble_sharedram_r(offs_t offset);
|
||||
void ddribble_sharedram_w(offs_t offset, uint8_t data);
|
||||
uint8_t ddribble_snd_sharedram_r(offs_t offset);
|
||||
void ddribble_snd_sharedram_w(offs_t offset, uint8_t data);
|
||||
void ddribble_coin_counter_w(uint8_t data);
|
||||
void K005885_0_w(offs_t offset, uint8_t data);
|
||||
void K005885_1_w(offs_t offset, uint8_t data);
|
||||
void ddribble_fg_videoram_w(offs_t offset, uint8_t data);
|
||||
void ddribble_bg_videoram_w(offs_t offset, uint8_t data);
|
||||
uint8_t ddribble_vlm5030_busy_r();
|
||||
void ddribble_vlm5030_ctrl_w(uint8_t data);
|
||||
TILEMAP_MAPPER_MEMBER(tilemap_scan);
|
||||
TILE_GET_INFO_MEMBER(get_fg_tile_info);
|
||||
TILE_GET_INFO_MEMBER(get_bg_tile_info);
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
virtual void video_start() override;
|
||||
void ddribble_palette(palette_device &palette) const;
|
||||
uint32_t screen_update_ddribble(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
private:
|
||||
// memory pointers
|
||||
required_shared_ptr<uint8_t> m_fg_videoram;
|
||||
required_shared_ptr_array<uint8_t, 2> m_spriteram;
|
||||
required_shared_ptr<uint8_t> m_bg_videoram;
|
||||
required_memory_bank m_mainbank;
|
||||
required_memory_bank m_vlmbank;
|
||||
|
||||
// video-related
|
||||
tilemap_t *m_fg_tilemap;
|
||||
tilemap_t *m_bg_tilemap;
|
||||
uint8_t m_vregs[2][5];
|
||||
uint8_t m_charbank[2];
|
||||
|
||||
// misc
|
||||
uint8_t m_int_enable[2];
|
||||
|
||||
// devices
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_subcpu;
|
||||
required_device<vlm5030_device> m_vlm;
|
||||
required_device_array<filter_rc_device, 3> m_filter;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
|
||||
void bankswitch_w(uint8_t data);
|
||||
void coin_counter_w(uint8_t data);
|
||||
void K005885_0_w(offs_t offset, uint8_t data);
|
||||
void K005885_1_w(offs_t offset, uint8_t data);
|
||||
void fg_videoram_w(offs_t offset, uint8_t data);
|
||||
void bg_videoram_w(offs_t offset, uint8_t data);
|
||||
uint8_t vlm5030_busy_r();
|
||||
void vlm5030_ctrl_w(uint8_t data);
|
||||
TILEMAP_MAPPER_MEMBER(tilemap_scan);
|
||||
TILE_GET_INFO_MEMBER(get_fg_tile_info);
|
||||
TILE_GET_INFO_MEMBER(get_bg_tile_info);
|
||||
void palette(palette_device &palette) const;
|
||||
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
DECLARE_WRITE_LINE_MEMBER(vblank_irq);
|
||||
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t* source, int lenght, int gfxset, int flipscreen );
|
||||
void cpu0_map(address_map &map);
|
||||
void cpu1_map(address_map &map);
|
||||
void cpu2_map(address_map &map);
|
||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t* source, int lenght, int gfxset, int flipscreen);
|
||||
void maincpu_map(address_map &map);
|
||||
void subcpu_map(address_map &map);
|
||||
void audiocpu_map(address_map &map);
|
||||
void vlm_map(address_map &map);
|
||||
};
|
||||
|
||||
|
@ -25,59 +25,55 @@ public:
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_palette(*this, "palette"),
|
||||
m_scroll(*this, "scroll"),
|
||||
m_colorram(*this, "colorram"),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_colorram2(*this, "colorram2"),
|
||||
m_videoram2(*this, "videoram2"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_spriteram_2(*this, "spriteram_2")
|
||||
m_colorram(*this, "colorram%u", 1U),
|
||||
m_videoram(*this, "videoram%u", 1U),
|
||||
m_spriteram(*this, "spriteram%u", 1U)
|
||||
{ }
|
||||
|
||||
void finalizr(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
virtual void video_start() override;
|
||||
|
||||
private:
|
||||
/* devices */
|
||||
// devices
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<i8039_device> m_audiocpu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
|
||||
/* memory pointers */
|
||||
// memory pointers
|
||||
required_shared_ptr<uint8_t> m_scroll;
|
||||
required_shared_ptr<uint8_t> m_colorram;
|
||||
required_shared_ptr<uint8_t> m_videoram;
|
||||
required_shared_ptr<uint8_t> m_colorram2;
|
||||
required_shared_ptr<uint8_t> m_videoram2;
|
||||
required_shared_ptr<uint8_t> m_spriteram;
|
||||
required_shared_ptr<uint8_t> m_spriteram_2;
|
||||
required_shared_ptr_array<uint8_t,2 > m_colorram;
|
||||
required_shared_ptr_array<uint8_t,2 > m_videoram;
|
||||
required_shared_ptr_array<uint8_t,2 > m_spriteram;
|
||||
|
||||
/* video-related */
|
||||
// video-related
|
||||
tilemap_t *m_fg_tilemap;
|
||||
tilemap_t *m_bg_tilemap;
|
||||
int m_spriterambank;
|
||||
int m_charbank;
|
||||
uint8_t m_spriterambank;
|
||||
uint8_t m_charbank;
|
||||
|
||||
/* misc */
|
||||
int m_T1_line;
|
||||
// misc
|
||||
uint8_t m_t1_line;
|
||||
uint8_t m_nmi_enable;
|
||||
uint8_t m_irq_enable;
|
||||
|
||||
void finalizr_coin_w(uint8_t data);
|
||||
void finalizr_flipscreen_w(uint8_t data);
|
||||
void finalizr_i8039_irq_w(uint8_t data);
|
||||
void coin_w(uint8_t data);
|
||||
void flipscreen_w(uint8_t data);
|
||||
void i8039_irq_w(uint8_t data);
|
||||
void i8039_irqen_w(uint8_t data);
|
||||
DECLARE_READ_LINE_MEMBER(i8039_t1_r);
|
||||
void i8039_t0_w(uint8_t data);
|
||||
void finalizr_videoctrl_w(uint8_t data);
|
||||
void videoctrl_w(uint8_t data);
|
||||
TILE_GET_INFO_MEMBER(get_bg_tile_info);
|
||||
TILE_GET_INFO_MEMBER(get_fg_tile_info);
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
virtual void video_start() override;
|
||||
void finalizr_palette(palette_device &palette) const;
|
||||
void palette(palette_device &palette) const;
|
||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_finalizr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(finalizr_scanline);
|
||||
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(scanline);
|
||||
void main_map(address_map &map);
|
||||
void sound_io_map(address_map &map);
|
||||
void sound_map(address_map &map);
|
||||
|
@ -17,10 +17,10 @@
|
||||
#include "screen.h"
|
||||
#include "tilemap.h"
|
||||
|
||||
class ironhors_state : public driver_device
|
||||
class ironhors_base_state : public driver_device
|
||||
{
|
||||
public:
|
||||
ironhors_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
ironhors_base_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_soundcpu(*this, "soundcpu"),
|
||||
@ -33,14 +33,15 @@ public:
|
||||
m_scroll(*this, "scroll"),
|
||||
m_colorram(*this, "colorram"),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_spriteram2(*this, "spriteram2"),
|
||||
m_spriteram(*this, "spriteram")
|
||||
m_spriteram(*this, "spriteram%u", 1U)
|
||||
{ }
|
||||
|
||||
void farwest(machine_config &config);
|
||||
void ironhors(machine_config &config);
|
||||
void base(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
private:
|
||||
void sh_irqtrigger_w(uint8_t data);
|
||||
void videoram_w(offs_t offset, uint8_t data);
|
||||
void colorram_w(offs_t offset, uint8_t data);
|
||||
@ -49,26 +50,9 @@ private:
|
||||
void flipscreen_w(uint8_t data);
|
||||
void filter_w(uint8_t data);
|
||||
|
||||
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_farwest(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void palette(palette_device &palette) const;
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(ironhors_scanline_tick);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(farwest_scanline_tick);
|
||||
|
||||
void ironhors_palette(palette_device &palette) const;
|
||||
DECLARE_VIDEO_START(farwest);
|
||||
|
||||
void farwest_master_map(address_map &map);
|
||||
void farwest_slave_map(address_map &map);
|
||||
void master_map(address_map &map);
|
||||
void slave_io_map(address_map &map);
|
||||
void slave_map(address_map &map);
|
||||
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
virtual void video_start() override;
|
||||
|
||||
/* devices */
|
||||
// devices
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_soundcpu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
@ -77,25 +61,69 @@ private:
|
||||
required_device<generic_latch_8_device> m_soundlatch;
|
||||
required_device<discrete_device> m_disc_ih;
|
||||
|
||||
/* memory pointers */
|
||||
// memory pointers
|
||||
required_shared_ptr<uint8_t> m_interrupt_enable;
|
||||
required_shared_ptr<uint8_t> m_scroll;
|
||||
required_shared_ptr<uint8_t> m_colorram;
|
||||
required_shared_ptr<uint8_t> m_videoram;
|
||||
required_shared_ptr<uint8_t> m_spriteram2;
|
||||
required_shared_ptr<uint8_t> m_spriteram;
|
||||
required_shared_ptr_array<uint8_t, 2> m_spriteram;
|
||||
|
||||
/* video-related */
|
||||
tilemap_t *m_bg_tilemap;
|
||||
int m_palettebank;
|
||||
int m_charbank;
|
||||
int m_spriterambank;
|
||||
// video-related
|
||||
tilemap_t *m_bg_tilemap;
|
||||
uint8_t m_palettebank;
|
||||
uint8_t m_charbank;
|
||||
uint8_t m_spriterambank;
|
||||
};
|
||||
|
||||
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||
void farwest_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||
class ironhors_state : public ironhors_base_state
|
||||
{
|
||||
public:
|
||||
ironhors_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
ironhors_base_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void ironhors(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void video_start() override;
|
||||
|
||||
private:
|
||||
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(scanline_tick);
|
||||
|
||||
void master_map(address_map &map);
|
||||
void slave_map(address_map &map);
|
||||
void slave_io_map(address_map &map);
|
||||
|
||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
TILE_GET_INFO_MEMBER(get_bg_tile_info);
|
||||
};
|
||||
|
||||
class farwest_state : public ironhors_base_state
|
||||
{
|
||||
public:
|
||||
farwest_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
ironhors_base_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void farwest(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void video_start() override;
|
||||
|
||||
private:
|
||||
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(scanline_tick);
|
||||
|
||||
void master_map(address_map &map);
|
||||
void slave_map(address_map &map);
|
||||
|
||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
TILE_GET_INFO_MEMBER(get_bg_tile_info);
|
||||
TILE_GET_INFO_MEMBER(farwest_get_bg_tile_info);
|
||||
};
|
||||
|
||||
#endif // MAME_INCLUDES_IRONHORS_H
|
||||
|
@ -2,7 +2,7 @@
|
||||
// copyright-holders:Manuel Abadia
|
||||
/***************************************************************************
|
||||
|
||||
video.c
|
||||
ddribble.cpp
|
||||
|
||||
Functions to emulate the video hardware of the machine.
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
#include "includes/ddribble.h"
|
||||
|
||||
|
||||
void ddribble_state::ddribble_palette(palette_device &palette) const
|
||||
void ddribble_state::palette(palette_device &palette) const
|
||||
{
|
||||
uint8_t const *const color_prom = memregion("proms")->base();
|
||||
|
||||
@ -32,15 +32,15 @@ void ddribble_state::K005885_0_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
case 0x03: /* char bank selection for set 1 */
|
||||
case 0x03: // char bank selection for set 1
|
||||
if ((data & 0x03) != m_charbank[0])
|
||||
{
|
||||
m_charbank[0] = data & 0x03;
|
||||
m_fg_tilemap->mark_all_dirty();
|
||||
}
|
||||
break;
|
||||
case 0x04: /* IRQ control, flipscreen */
|
||||
m_int_enable_0 = data & 0x02;
|
||||
case 0x04: // IRQ control, flipscreen
|
||||
m_int_enable[0] = data & 0x02;
|
||||
break;
|
||||
}
|
||||
m_vregs[0][offset] = data;
|
||||
@ -50,15 +50,15 @@ void ddribble_state::K005885_1_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
case 0x03: /* char bank selection for set 2 */
|
||||
case 0x03: // char bank selection for set 2
|
||||
if ((data & 0x03) != m_charbank[1])
|
||||
{
|
||||
m_charbank[1] = data & 0x03;
|
||||
m_bg_tilemap->mark_all_dirty();
|
||||
}
|
||||
break;
|
||||
case 0x04: /* IRQ control, flipscreen */
|
||||
m_int_enable_1 = data & 0x02;
|
||||
case 0x04: // IRQ control, flipscreen
|
||||
m_int_enable[1] = data & 0x02;
|
||||
break;
|
||||
}
|
||||
m_vregs[1][offset] = data;
|
||||
@ -72,8 +72,8 @@ void ddribble_state::K005885_1_w(offs_t offset, uint8_t data)
|
||||
|
||||
TILEMAP_MAPPER_MEMBER(ddribble_state::tilemap_scan)
|
||||
{
|
||||
/* logical (col,row) -> memory offset */
|
||||
return (col & 0x1f) + ((row & 0x1f) << 5) + ((col & 0x20) << 6); /* skip 0x400 */
|
||||
// logical (col,row) -> memory offset
|
||||
return (col & 0x1f) + ((row & 0x1f) << 5) + ((col & 0x20) << 6); // skip 0x400
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(ddribble_state::get_fg_tile_info)
|
||||
@ -116,13 +116,13 @@ void ddribble_state::video_start()
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void ddribble_state::ddribble_fg_videoram_w(offs_t offset, uint8_t data)
|
||||
void ddribble_state::fg_videoram_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_fg_videoram[offset] = data;
|
||||
m_fg_tilemap->mark_tile_dirty(offset & 0xbff);
|
||||
}
|
||||
|
||||
void ddribble_state::ddribble_bg_videoram_w(offs_t offset, uint8_t data)
|
||||
void ddribble_state::bg_videoram_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_bg_videoram[offset] = data;
|
||||
m_bg_tilemap->mark_tile_dirty(offset & 0xbff);
|
||||
@ -150,20 +150,20 @@ byte #4: attributes
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void ddribble_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t* source, int lenght, int gfxset, int flipscreen )
|
||||
void ddribble_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t* source, int lenght, int gfxset, int flipscreen)
|
||||
{
|
||||
gfx_element *gfx = m_gfxdecode->gfx(gfxset);
|
||||
const uint8_t *finish = source + lenght;
|
||||
|
||||
while (source < finish)
|
||||
{
|
||||
int number = source[0] | ((source[1] & 0x07) << 8); /* sprite number */
|
||||
int attr = source[4]; /* attributes */
|
||||
int sx = source[3] | ((attr & 0x01) << 8); /* vertical position */
|
||||
int sy = source[2]; /* horizontal position */
|
||||
int flipx = attr & 0x20; /* flip x */
|
||||
int flipy = attr & 0x40; /* flip y */
|
||||
int color = (source[1] & 0xf0) >> 4; /* color */
|
||||
int number = source[0] | ((source[1] & 0x07) << 8); // sprite number
|
||||
int attr = source[4]; // attributes
|
||||
int sx = source[3] | ((attr & 0x01) << 8); // vertical position
|
||||
int sy = source[2]; // horizontal position
|
||||
int flipx = attr & 0x20; // flip x
|
||||
int flipy = attr & 0x40; // flip y
|
||||
int color = (source[1] & 0xf0) >> 4; // color
|
||||
int width, height;
|
||||
|
||||
if (flipscreen)
|
||||
@ -174,7 +174,7 @@ void ddribble_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &clipr
|
||||
sy = 240 - sy;
|
||||
|
||||
if ((attr & 0x1c) == 0x10)
|
||||
{ /* ???. needed for some sprites in flipped mode */
|
||||
{ // ???. needed for some sprites in flipped mode
|
||||
sx -= 0x10;
|
||||
sy -= 0x10;
|
||||
}
|
||||
@ -182,35 +182,34 @@ void ddribble_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &clipr
|
||||
|
||||
switch (attr & 0x1c)
|
||||
{
|
||||
case 0x10: /* 32x32 */
|
||||
case 0x10: // 32x32
|
||||
width = height = 2; number &= (~3); break;
|
||||
case 0x08: /* 16x32 */
|
||||
case 0x08: // 16x32
|
||||
width = 1; height = 2; number &= (~2); break;
|
||||
case 0x04: /* 32x16 */
|
||||
case 0x04: // 32x16
|
||||
width = 2; height = 1; number &= (~1); break;
|
||||
/* the hardware allow more sprite sizes, but ddribble doesn't use them */
|
||||
default: /* 16x16 */
|
||||
// the hardware allows more sprite sizes, but ddribble doesn't use them
|
||||
default: // 16x16
|
||||
width = height = 1; break;
|
||||
}
|
||||
|
||||
{
|
||||
static const int x_offset[2] = { 0x00, 0x01 };
|
||||
static const int y_offset[2] = { 0x00, 0x02 };
|
||||
int x, y, ex, ey;
|
||||
|
||||
for (y = 0; y < height; y++)
|
||||
for (int y = 0; y < height; y++)
|
||||
{
|
||||
for (x = 0; x < width; x++)
|
||||
for (int x = 0; x < width; x++)
|
||||
{
|
||||
ex = flipx ? (width - 1 - x) : x;
|
||||
ey = flipy ? (height - 1 - y) : y;
|
||||
int ex = flipx ? (width - 1 - x) : x;
|
||||
int ey = flipy ? (height - 1 - y) : y;
|
||||
|
||||
|
||||
gfx->transpen(bitmap,cliprect,
|
||||
(number)+x_offset[ex]+y_offset[ey],
|
||||
gfx->transpen(bitmap, cliprect,
|
||||
(number) + x_offset[ex] + y_offset[ey],
|
||||
color,
|
||||
flipx, flipy,
|
||||
sx+x*16,sy+y*16, 0);
|
||||
sx + x * 16, sy + y * 16, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -224,20 +223,20 @@ void ddribble_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &clipr
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
uint32_t ddribble_state::screen_update_ddribble(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
uint32_t ddribble_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
m_fg_tilemap->set_flip((m_vregs[0][4] & 0x08) ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
|
||||
m_bg_tilemap->set_flip((m_vregs[1][4] & 0x08) ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
|
||||
|
||||
/* set scroll registers */
|
||||
// set scroll registers
|
||||
m_fg_tilemap->set_scrollx(0, m_vregs[0][1] | ((m_vregs[0][2] & 0x01) << 8));
|
||||
m_bg_tilemap->set_scrollx(0, m_vregs[1][1] | ((m_vregs[1][2] & 0x01) << 8));
|
||||
m_fg_tilemap->set_scrolly(0, m_vregs[0][0]);
|
||||
m_bg_tilemap->set_scrolly(0, m_vregs[1][0]);
|
||||
|
||||
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
draw_sprites(bitmap, cliprect, m_spriteram_1, 0x07d, 2, m_vregs[0][4] & 0x08);
|
||||
draw_sprites(bitmap, cliprect, m_spriteram_2, 0x140, 3, m_vregs[1][4] & 0x08);
|
||||
draw_sprites(bitmap, cliprect, m_spriteram[0], 0x07d, 2, m_vregs[0][4] & 0x08);
|
||||
draw_sprites(bitmap, cliprect, m_spriteram[1], 0x140, 3, m_vregs[1][4] & 0x08);
|
||||
m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void finalizr_state::finalizr_palette(palette_device &palette) const
|
||||
void finalizr_state::palette(palette_device &palette) const
|
||||
{
|
||||
const uint8_t *color_prom = memregion("proms")->base();
|
||||
static constexpr int resistances[4] = { 2200, 1000, 470, 220 };
|
||||
@ -94,8 +94,8 @@ void finalizr_state::finalizr_palette(palette_device &palette) const
|
||||
|
||||
TILE_GET_INFO_MEMBER(finalizr_state::get_bg_tile_info)
|
||||
{
|
||||
int attr = m_colorram[tile_index];
|
||||
int code = m_videoram[tile_index] + ((attr & 0xc0) << 2) + (m_charbank << 10);
|
||||
int attr = m_colorram[0][tile_index];
|
||||
int code = m_videoram[0][tile_index] + ((attr & 0xc0) << 2) + (m_charbank << 10);
|
||||
int color = attr & 0x0f;
|
||||
int flags = TILE_FLIPYX((attr & 0x30) >> 4);
|
||||
|
||||
@ -104,8 +104,8 @@ TILE_GET_INFO_MEMBER(finalizr_state::get_bg_tile_info)
|
||||
|
||||
TILE_GET_INFO_MEMBER(finalizr_state::get_fg_tile_info)
|
||||
{
|
||||
int attr = m_colorram2[tile_index];
|
||||
int code = m_videoram2[tile_index] + ((attr & 0xc0) << 2);
|
||||
int attr = m_colorram[1][tile_index];
|
||||
int code = m_videoram[1][tile_index] + ((attr & 0xc0) << 2);
|
||||
int color = attr & 0x0f;
|
||||
int flags = TILE_FLIPYX((attr & 0x30) >> 4);
|
||||
|
||||
@ -127,22 +127,20 @@ void finalizr_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec
|
||||
gfx_element *gfx1 = m_gfxdecode->gfx(1);
|
||||
gfx_element *gfx2 = m_gfxdecode->gfx(2);
|
||||
|
||||
uint8_t *sr = m_spriterambank ? m_spriteram_2 : m_spriteram;
|
||||
uint8_t *sr = m_spriterambank ? m_spriteram[1] : m_spriteram[0];
|
||||
|
||||
for (int offs = 0; offs <= m_spriteram.bytes() - 5; offs += 5)
|
||||
for (int offs = 0; offs <= m_spriteram[0].bytes() - 5; offs += 5)
|
||||
{
|
||||
int sx, sy, flipx, flipy, code, color, size;
|
||||
|
||||
sx = 32 + 1 + sr[offs + 3] - ((sr[offs + 4] & 0x01) << 8);
|
||||
sy = sr[offs + 2];
|
||||
flipx = sr[offs + 4] & 0x20;
|
||||
flipy = sr[offs + 4] & 0x40;
|
||||
code = sr[offs] + ((sr[offs + 1] & 0x0f) << 8);
|
||||
color = ((sr[offs + 1] & 0xf0) >> 4);
|
||||
int sx = 32 + 1 + sr[offs + 3] - ((sr[offs + 4] & 0x01) << 8);
|
||||
int sy = sr[offs + 2];
|
||||
int flipx = sr[offs + 4] & 0x20;
|
||||
int flipy = sr[offs + 4] & 0x40;
|
||||
int code = sr[offs] + ((sr[offs + 1] & 0x0f) << 8);
|
||||
int color = ((sr[offs + 1] & 0xf0) >> 4);
|
||||
|
||||
// (sr[offs + 4] & 0x02) is used, meaning unknown
|
||||
|
||||
size = sr[offs + 4] & 0x1c;
|
||||
int size = sr[offs + 4] & 0x1c;
|
||||
|
||||
if (size >= 0x10)
|
||||
{
|
||||
@ -202,7 +200,7 @@ void finalizr_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec
|
||||
}
|
||||
|
||||
|
||||
uint32_t finalizr_state::screen_update_finalizr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
uint32_t finalizr_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
m_bg_tilemap->mark_all_dirty();
|
||||
m_fg_tilemap->mark_all_dirty();
|
||||
|
@ -2,7 +2,7 @@
|
||||
// copyright-holders:Mirko Buffoni
|
||||
/***************************************************************************
|
||||
|
||||
ironhors.c
|
||||
ironhors.cpp
|
||||
|
||||
Functions to emulate the video hardware of the machine.
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void ironhors_state::ironhors_palette(palette_device &palette) const
|
||||
void ironhors_base_state::palette(palette_device &palette) const
|
||||
{
|
||||
const uint8_t *color_prom = memregion("proms")->base();
|
||||
static constexpr int resistances[4] = { 2000, 1000, 470, 220 };
|
||||
@ -73,19 +73,19 @@ void ironhors_state::ironhors_palette(palette_device &palette) const
|
||||
}
|
||||
}
|
||||
|
||||
void ironhors_state::videoram_w(offs_t offset, uint8_t data)
|
||||
void ironhors_base_state::videoram_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_videoram[offset] = data;
|
||||
m_bg_tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
void ironhors_state::colorram_w(offs_t offset, uint8_t data)
|
||||
void ironhors_base_state::colorram_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_colorram[offset] = data;
|
||||
m_bg_tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
void ironhors_state::charbank_w(uint8_t data)
|
||||
void ironhors_base_state::charbank_w(uint8_t data)
|
||||
{
|
||||
if (m_charbank != (data & 0x03))
|
||||
{
|
||||
@ -95,10 +95,10 @@ void ironhors_state::charbank_w(uint8_t data)
|
||||
|
||||
m_spriterambank = data & 0x08;
|
||||
|
||||
/* other bits unknown */
|
||||
// other bits unknown
|
||||
}
|
||||
|
||||
void ironhors_state::palettebank_w(uint8_t data)
|
||||
void ironhors_base_state::palettebank_w(uint8_t data)
|
||||
{
|
||||
if (m_palettebank != (data & 0x07))
|
||||
{
|
||||
@ -109,13 +109,13 @@ void ironhors_state::palettebank_w(uint8_t data)
|
||||
machine().bookkeeping().coin_counter_w(0, data & 0x10);
|
||||
machine().bookkeeping().coin_counter_w(1, data & 0x20);
|
||||
|
||||
/* bit 6 unknown - set after game over */
|
||||
// bit 6 unknown - set after game over
|
||||
|
||||
if (data & 0x88)
|
||||
popmessage("palettebank_w %02x",data);
|
||||
}
|
||||
|
||||
void ironhors_state::flipscreen_w(uint8_t data)
|
||||
void ironhors_base_state::flipscreen_w(uint8_t data)
|
||||
{
|
||||
if (flip_screen() != (~data & 0x08))
|
||||
{
|
||||
@ -123,7 +123,7 @@ void ironhors_state::flipscreen_w(uint8_t data)
|
||||
machine().tilemap().mark_all_dirty();
|
||||
}
|
||||
|
||||
/* other bits are used too, but unknown */
|
||||
// other bits are used too, but unknown
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(ironhors_state::get_bg_tile_info)
|
||||
@ -144,17 +144,16 @@ void ironhors_state::video_start()
|
||||
m_bg_tilemap->set_scroll_rows(32);
|
||||
}
|
||||
|
||||
void ironhors_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
|
||||
void ironhors_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
int offs;
|
||||
uint8_t *sr;
|
||||
|
||||
if (m_spriterambank != 0)
|
||||
sr = m_spriteram;
|
||||
sr = m_spriteram[0];
|
||||
else
|
||||
sr = m_spriteram2;
|
||||
sr = m_spriteram[1];
|
||||
|
||||
for (offs = 0; offs < m_spriteram.bytes(); offs += 5)
|
||||
for (int offs = 0; offs < m_spriteram[0].bytes(); offs += 5)
|
||||
{
|
||||
int sx = sr[offs + 3];
|
||||
int sy = sr[offs + 2];
|
||||
@ -174,7 +173,7 @@ void ironhors_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &clipre
|
||||
|
||||
switch (sr[offs + 4] & 0x0c)
|
||||
{
|
||||
case 0x00: /* 16x16 */
|
||||
case 0x00: // 16x16
|
||||
m_gfxdecode->gfx(1)->transpen(bitmap,cliprect,
|
||||
code/4,
|
||||
color,
|
||||
@ -182,7 +181,7 @@ void ironhors_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &clipre
|
||||
sx,sy,0);
|
||||
break;
|
||||
|
||||
case 0x04: /* 16x8 */
|
||||
case 0x04: // 16x8
|
||||
{
|
||||
if (flip_screen()) sy += 8; // this fixes the train wheels' position
|
||||
|
||||
@ -199,7 +198,7 @@ void ironhors_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &clipre
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x08: /* 8x16 */
|
||||
case 0x08: // 8x16
|
||||
{
|
||||
m_gfxdecode->gfx(2)->transpen(bitmap,cliprect,
|
||||
code & ~2,
|
||||
@ -214,7 +213,7 @@ void ironhors_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &clipre
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x0c: /* 8x8 */
|
||||
case 0x0c: // 8x8
|
||||
{
|
||||
m_gfxdecode->gfx(2)->transpen(bitmap,cliprect,
|
||||
code,
|
||||
@ -229,9 +228,7 @@ void ironhors_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &clipre
|
||||
|
||||
uint32_t ironhors_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
int row;
|
||||
|
||||
for (row = 0; row < 32; row++)
|
||||
for (int row = 0; row < 32; row++)
|
||||
m_bg_tilemap->set_scrollx(row, m_scroll[row]);
|
||||
|
||||
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
@ -239,7 +236,7 @@ uint32_t ironhors_state::screen_update(screen_device &screen, bitmap_ind16 &bitm
|
||||
return 0;
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(ironhors_state::farwest_get_bg_tile_info)
|
||||
TILE_GET_INFO_MEMBER(farwest_state::get_bg_tile_info)
|
||||
{
|
||||
int code = m_videoram[tile_index] + ((m_colorram[tile_index] & 0x40) << 2) +
|
||||
((m_colorram[tile_index] & 0x20) << 4) + (m_charbank << 10);
|
||||
@ -249,20 +246,19 @@ TILE_GET_INFO_MEMBER(ironhors_state::farwest_get_bg_tile_info)
|
||||
tileinfo.set(0, code, color, flags);
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(ironhors_state,farwest)
|
||||
void farwest_state::video_start()
|
||||
{
|
||||
m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(ironhors_state::farwest_get_bg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
|
||||
m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(farwest_state::get_bg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
|
||||
|
||||
m_bg_tilemap->set_scroll_rows(32);
|
||||
}
|
||||
|
||||
void ironhors_state::farwest_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
|
||||
void farwest_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
int offs;
|
||||
uint8_t *sr = m_spriteram2;
|
||||
uint8_t *sr2 = m_spriteram;
|
||||
uint8_t *sr = m_spriteram[1];
|
||||
uint8_t *sr2 = m_spriteram[0];
|
||||
|
||||
for (offs = 0; offs < m_spriteram.bytes(); offs += 4)
|
||||
for (int offs = 0; offs < m_spriteram[0].bytes(); offs += 4)
|
||||
{
|
||||
int sx = sr[offs + 2];
|
||||
int sy = sr[offs + 1];
|
||||
@ -283,7 +279,7 @@ void ironhors_state::farwest_draw_sprites( bitmap_ind16 &bitmap, const rectangle
|
||||
|
||||
switch (sr[offs + 3] & 0x0c)
|
||||
{
|
||||
case 0x00: /* 16x16 */
|
||||
case 0x00: // 16x16
|
||||
m_gfxdecode->gfx(1)->transpen(bitmap,cliprect,
|
||||
code/4,
|
||||
color,
|
||||
@ -291,7 +287,7 @@ void ironhors_state::farwest_draw_sprites( bitmap_ind16 &bitmap, const rectangle
|
||||
sx,sy,0);
|
||||
break;
|
||||
|
||||
case 0x04: /* 16x8 */
|
||||
case 0x04: // 16x8
|
||||
{
|
||||
if (flip_screen()) sy += 8; // this fixes the train wheels' position
|
||||
|
||||
@ -308,7 +304,7 @@ void ironhors_state::farwest_draw_sprites( bitmap_ind16 &bitmap, const rectangle
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x08: /* 8x16 */
|
||||
case 0x08: // 8x16
|
||||
{
|
||||
m_gfxdecode->gfx(2)->transpen(bitmap,cliprect,
|
||||
code & ~2,
|
||||
@ -323,7 +319,7 @@ void ironhors_state::farwest_draw_sprites( bitmap_ind16 &bitmap, const rectangle
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x0c: /* 8x8 */
|
||||
case 0x0c: // 8x8
|
||||
{
|
||||
m_gfxdecode->gfx(2)->transpen(bitmap,cliprect,
|
||||
code,
|
||||
@ -336,14 +332,12 @@ void ironhors_state::farwest_draw_sprites( bitmap_ind16 &bitmap, const rectangle
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t ironhors_state::screen_update_farwest(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
uint32_t farwest_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
int row;
|
||||
|
||||
for (row = 0; row < 32; row++)
|
||||
for (int row = 0; row < 32; row++)
|
||||
m_bg_tilemap->set_scrollx(row, m_scroll[row]);
|
||||
|
||||
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
farwest_draw_sprites(bitmap, cliprect);
|
||||
draw_sprites(bitmap, cliprect);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user