summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/shougi.cpp
diff options
context:
space:
mode:
author andreasnaive <andreasnaive@gmail.com>2019-03-25 23:13:40 +0100
committer andreasnaive <andreasnaive@gmail.com>2019-03-25 23:13:40 +0100
commitb380514764cf857469bae61c11143a19f79a74c5 (patch)
tree63c8012e262618f08a332da31dd714281aa2c5ed /src/mame/drivers/shougi.cpp
parentc24473ddff715ecec2e258a6eb38960cf8c8e98e (diff)
Revert "conflict resolution (nw)"
This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.
Diffstat (limited to 'src/mame/drivers/shougi.cpp')
-rw-r--r--src/mame/drivers/shougi.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/mame/drivers/shougi.cpp b/src/mame/drivers/shougi.cpp
index 51928319502..d6717f9ec28 100644
--- a/src/mame/drivers/shougi.cpp
+++ b/src/mame/drivers/shougi.cpp
@@ -182,18 +182,18 @@ void shougi_state::shougi_palette(palette_device &palette) const
bit0 = (color_prom[i] >> 0) & 0x01;
bit1 = (color_prom[i] >> 1) & 0x01;
bit2 = (color_prom[i] >> 2) & 0x01;
- int const r = combine_weights(weights_r, bit0, bit1, bit2);
+ int const r = combine_3_weights(weights_r, bit0, bit1, bit2);
/* green component */
bit0 = (color_prom[i] >> 3) & 0x01;
bit1 = (color_prom[i] >> 4) & 0x01;
bit2 = (color_prom[i] >> 5) & 0x01;
- int const g = combine_weights(weights_g, bit0, bit1, bit2);
+ int const g = combine_3_weights(weights_g, bit0, bit1, bit2);
/* blue component */
bit0 = (color_prom[i] >> 6) & 0x01;
bit1 = (color_prom[i] >> 7) & 0x01;
- int const b = combine_weights(weights_b, bit0, bit1);
+ int const b = combine_2_weights(weights_b, bit0, bit1);
palette.set_pen_color(i,rgb_t(r,g,b));
}
@@ -370,39 +370,39 @@ INTERRUPT_GEN_MEMBER(shougi_state::vblank_nmi)
}
-void shougi_state::shougi(machine_config &config)
-{
+MACHINE_CONFIG_START(shougi_state::shougi)
+
/* basic machine hardware */
- Z80(config, m_maincpu, XTAL(10'000'000)/4);
- m_maincpu->set_addrmap(AS_PROGRAM, &shougi_state::main_map);
- m_maincpu->set_vblank_int("screen", FUNC(shougi_state::vblank_nmi));
+ MCFG_DEVICE_ADD("maincpu", Z80, XTAL(10'000'000)/4)
+ MCFG_DEVICE_PROGRAM_MAP(main_map)
+ MCFG_DEVICE_VBLANK_INT_DRIVER("screen", shougi_state, vblank_nmi)
- Z80(config, m_subcpu, XTAL(10'000'000)/4);
- m_subcpu->set_addrmap(AS_PROGRAM, &shougi_state::sub_map);
- m_subcpu->set_addrmap(AS_IO, &shougi_state::readport_sub);
+ MCFG_DEVICE_ADD("sub", Z80, XTAL(10'000'000)/4)
+ MCFG_DEVICE_PROGRAM_MAP(sub_map)
+ MCFG_DEVICE_IO_MAP(readport_sub)
- ALPHA_8201(config, m_alpha_8201, XTAL(10'000'000)/4/8);
+ MCFG_DEVICE_ADD("alpha_8201", ALPHA_8201, XTAL(10'000'000)/4/8)
ls259_device &mainlatch(LS259(config, "mainlatch"));
mainlatch.q_out_cb<0>().set_nop(); // 0: sharedram = sub, 1: sharedram = main (TODO!)
mainlatch.q_out_cb<1>().set(FUNC(shougi_state::nmi_enable_w));
mainlatch.q_out_cb<2>().set_nop(); // ?
- mainlatch.q_out_cb<3>().set(m_alpha_8201, FUNC(alpha_8201_device::mcu_start_w)); // start/halt ALPHA-8201
- mainlatch.q_out_cb<4>().set(m_alpha_8201, FUNC(alpha_8201_device::bus_dir_w)).invert(); // ALPHA-8201 shared RAM bus direction: 0: mcu, 1: maincpu
+ mainlatch.q_out_cb<3>().set("alpha_8201", FUNC(alpha_8201_device::mcu_start_w)); // start/halt ALPHA-8201
+ mainlatch.q_out_cb<4>().set("alpha_8201", FUNC(alpha_8201_device::bus_dir_w)).invert(); // ALPHA-8201 shared RAM bus direction: 0: mcu, 1: maincpu
mainlatch.q_out_cb<7>().set_nop(); // nothing? connected to +5v via resistor
- config.m_perfect_cpu_quantum = subtag("maincpu");
+ MCFG_QUANTUM_PERFECT_CPU("maincpu")
WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 0x10); // assuming it's the same as champbas
/* video hardware */
- screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
- screen.set_refresh_hz(60);
- screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
- screen.set_size(256, 256);
- screen.set_visarea(0, 255, 0, 255);
- screen.set_screen_update(FUNC(shougi_state::screen_update));
- screen.set_palette("palette");
+ MCFG_SCREEN_ADD("screen", RASTER)
+ MCFG_SCREEN_REFRESH_RATE(60)
+ MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
+ MCFG_SCREEN_SIZE(256, 256)
+ MCFG_SCREEN_VISIBLE_AREA(0, 255, 0, 255)
+ MCFG_SCREEN_UPDATE_DRIVER(shougi_state, screen_update)
+ MCFG_SCREEN_PALETTE("palette")
PALETTE(config, "palette", FUNC(shougi_state::shougi_palette), 32);
@@ -410,7 +410,7 @@ void shougi_state::shougi(machine_config &config)
SPEAKER(config, "mono").front_center();
AY8910(config, "aysnd", XTAL(10'000'000)/8).add_route(ALL_OUTPUTS, "mono", 0.30);
-}
+MACHINE_CONFIG_END