-keyboard/a1200, changela, goldnpkr, m68705prg, mexico86, pipeline, pitnrun, qix, quizpun2, stfight, tigeroad: Removed MACHINE_CONFIG. [Ryan Holtz]

-m68705, m68hc05: Removed MCFG. [Ryan Holtz]

-qix: First-pass cleanup. [Ryan Holtz]

-core: Fixed spelling of "nonexistent". [Ryan Holtz]
This commit is contained in:
mooglyguy 2018-12-14 23:44:37 +01:00
parent 3cbc7627ca
commit bf0cfcf13d
38 changed files with 770 additions and 849 deletions

View File

@ -130,11 +130,11 @@ ioport_constructor a2bus_mouse_device::device_input_ports() const
void a2bus_mouse_device::device_add_mconfig(machine_config &config)
{
M68705P3(config, m_mcu, 2043600);
m_mcu->porta_r_cb().set(FUNC(a2bus_mouse_device::mcu_port_a_r));
m_mcu->portb_r_cb().set(FUNC(a2bus_mouse_device::mcu_port_b_r));
m_mcu->porta_w_cb().set(FUNC(a2bus_mouse_device::mcu_port_a_w));
m_mcu->portb_w_cb().set(FUNC(a2bus_mouse_device::mcu_port_b_w));
m_mcu->portc_w_cb().set(FUNC(a2bus_mouse_device::mcu_port_c_w));
m_mcu->porta_r().set(FUNC(a2bus_mouse_device::mcu_port_a_r));
m_mcu->portb_r().set(FUNC(a2bus_mouse_device::mcu_port_b_r));
m_mcu->porta_w().set(FUNC(a2bus_mouse_device::mcu_port_a_w));
m_mcu->portb_w().set(FUNC(a2bus_mouse_device::mcu_port_b_w));
m_mcu->portc_w().set(FUNC(a2bus_mouse_device::mcu_port_c_w));
PIA6821(config, m_pia, 1021800);
m_pia->writepa_handler().set(FUNC(a2bus_mouse_device::pia_out_a));

View File

@ -47,8 +47,6 @@
#include "a1200.h"
#include "matrix.h"
#include "cpu/m6805/m68hc05.h"
//#define VERBOSE 1
#include "logmacro.h"
@ -171,15 +169,16 @@ WRITE_LINE_MEMBER(a1200_kbd_device::mpu_tcmp)
m_host->krst_w(state);
}
MACHINE_CONFIG_START(a1200_kbd_device::device_add_mconfig)
MCFG_DEVICE_ADD("mpu", M68HC705C8A, XTAL(3'000'000))
MCFG_M68HC05_PORTB_R_CB(READ8(*this, a1200_kbd_device, mpu_portb_r));
MCFG_M68HC05_PORTD_R_CB(IOPORT("MOD"));
MCFG_M68HC05_PORTA_W_CB(WRITE8(*this, a1200_kbd_device, mpu_porta_w));
MCFG_M68HC05_PORTB_W_CB(WRITE8(*this, a1200_kbd_device, mpu_portb_w));
MCFG_M68HC05_PORTC_W_CB(WRITE8(*this, a1200_kbd_device, mpu_portc_w));
MCFG_M68HC05_TCMP_CB(WRITELINE(*this, a1200_kbd_device, mpu_tcmp));
MACHINE_CONFIG_END
void a1200_kbd_device::device_add_mconfig(machine_config &config)
{
M68HC705C8A(config, m_mpu, XTAL(3'000'000));
m_mpu->port_r<1>().set(FUNC(a1200_kbd_device::mpu_portb_r));
m_mpu->port_r<3>().set_ioport("MOD");
m_mpu->port_w<0>().set(FUNC(a1200_kbd_device::mpu_porta_w));
m_mpu->port_w<1>().set(FUNC(a1200_kbd_device::mpu_portb_w));
m_mpu->port_w<2>().set(FUNC(a1200_kbd_device::mpu_portc_w));
m_mpu->tcmp().set(FUNC(a1200_kbd_device::mpu_tcmp));
}
tiny_rom_entry const *a1200_kbd_device::device_rom_region() const
{

View File

@ -11,6 +11,7 @@
#pragma once
#include "cpu/m6805/m68hc05.h"
#include "keyboard.h"
@ -48,7 +49,7 @@ protected:
private:
required_ioport_array<15> m_rows;
required_device<cpu_device> m_mpu;
required_device<m68hc705c8a_device> m_mpu;
u16 m_row_drive;
bool m_host_kdat, m_mpu_kdat;

View File

@ -24,41 +24,17 @@ DECLARE_DEVICE_TYPE(M68705U3, m68705u3_device)
// ======================> m68705_device
#define MCFG_M68705_PORTA_R_CB(obj) \
downcast<m68705_device &>(*device).set_port_cb_r<0>(DEVCB_##obj);
#define MCFG_M68705_PORTB_R_CB(obj) \
downcast<m68705_device &>(*device).set_port_cb_r<1>(DEVCB_##obj);
#define MCFG_M68705_PORTC_R_CB(obj) \
downcast<m68705_device &>(*device).set_port_cb_r<2>(DEVCB_##obj);
#define MCFG_M68705_PORTD_R_CB(obj) \
downcast<m68705_device &>(*device).set_port_cb_r<3>(DEVCB_##obj);
#define MCFG_M68705_PORTA_W_CB(obj) \
downcast<m68705_device &>(*device).set_port_cb_w<0>(DEVCB_##obj);
#define MCFG_M68705_PORTB_W_CB(obj) \
downcast<m68705_device &>(*device).set_port_cb_w<1>(DEVCB_##obj);
#define MCFG_M68705_PORTC_W_CB(obj) \
downcast<m68705_device &>(*device).set_port_cb_w<2>(DEVCB_##obj);
class m68705_device : public m6805_base_device, public device_nvram_interface
{
public:
// configuration helpers
template<std::size_t N, typename Object> devcb_base &set_port_cb_r(Object &&obj) { return m_port_cb_r[N].set_callback(std::forward<Object>(obj)); }
template<std::size_t N, typename Object> devcb_base &set_port_cb_w(Object &&obj) { return m_port_cb_w[N].set_callback(std::forward<Object>(obj)); }
auto porta_r_cb() { return m_port_cb_r[0].bind(); }
auto portb_r_cb() { return m_port_cb_r[1].bind(); }
auto portc_r_cb() { return m_port_cb_r[2].bind(); }
auto portd_r_cb() { return m_port_cb_r[3].bind(); }
auto porta_w_cb() { return m_port_cb_w[0].bind(); }
auto portb_w_cb() { return m_port_cb_w[1].bind(); }
auto portc_w_cb() { return m_port_cb_w[2].bind(); }
auto porta_r() { return m_port_cb_r[0].bind(); }
auto portb_r() { return m_port_cb_r[1].bind(); }
auto portc_r() { return m_port_cb_r[2].bind(); }
auto portd_r() { return m_port_cb_r[3].bind(); }
auto porta_w() { return m_port_cb_w[0].bind(); }
auto portb_w() { return m_port_cb_w[1].bind(); }
auto portc_w() { return m_port_cb_w[2].bind(); }
protected:
// state index constants

View File

@ -165,7 +165,7 @@ void m68hc05_device::set_port_interrupt(std::array<u8, PORT_COUNT> const &interr
if (diff) update_port_irq();
}
READ8_MEMBER(m68hc05_device::port_r)
READ8_MEMBER(m68hc05_device::port_read)
{
offset &= PORT_COUNT - 1;
if (!machine().side_effects_disabled() && !m_port_cb_r[offset].isnull())
@ -723,7 +723,7 @@ void m68hc05c4_device::c4_map(address_map &map)
map.global_mask(0x1fff);
map.unmap_value_high();
map(0x0000, 0x0003).rw(FUNC(m68hc05c4_device::port_r), FUNC(m68hc05c4_device::port_latch_w));
map(0x0000, 0x0003).rw(FUNC(m68hc05c4_device::port_read), FUNC(m68hc05c4_device::port_latch_w));
map(0x0004, 0x0006).rw(FUNC(m68hc05c4_device::port_ddr_r), FUNC(m68hc05c4_device::port_ddr_w));
// 0x0007-0x0009 unused
// 0x000a SPCR
@ -789,7 +789,7 @@ void m68hc05c8_device::c8_map(address_map &map)
map.global_mask(0x1fff);
map.unmap_value_high();
map(0x0000, 0x0003).rw(FUNC(m68hc05c8_device::port_r), FUNC(m68hc05c8_device::port_latch_w));
map(0x0000, 0x0003).rw(FUNC(m68hc05c8_device::port_read), FUNC(m68hc05c8_device::port_latch_w));
map(0x0004, 0x0006).rw(FUNC(m68hc05c8_device::port_ddr_r), FUNC(m68hc05c8_device::port_ddr_w));
// 0x0007-0x0009 unused
// 0x000a SPCR
@ -854,7 +854,7 @@ void m68hc705c8a_device::c8a_map(address_map &map)
map.global_mask(0x1fff);
map.unmap_value_high();
map(0x0000, 0x0003).rw(FUNC(m68hc705c8a_device::port_r), FUNC(m68hc705c8a_device::port_latch_w));
map(0x0000, 0x0003).rw(FUNC(m68hc705c8a_device::port_read), FUNC(m68hc705c8a_device::port_latch_w));
map(0x0004, 0x0006).rw(FUNC(m68hc705c8a_device::port_ddr_r), FUNC(m68hc705c8a_device::port_ddr_w));
// 0x0007-0x0009 unused
// 0x000a SPCR

View File

@ -25,41 +25,13 @@ DECLARE_DEVICE_TYPE(M68HC705C8A, m68hc705c8a_device)
// ======================> m68hc05_device
#define MCFG_M68HC05_PORTA_R_CB(obj) \
downcast<m68hc05_device &>(*device).set_port_cb_r<0>(DEVCB_##obj);
#define MCFG_M68HC05_PORTB_R_CB(obj) \
downcast<m68hc05_device &>(*device).set_port_cb_r<1>(DEVCB_##obj);
#define MCFG_M68HC05_PORTC_R_CB(obj) \
downcast<m68hc05_device &>(*device).set_port_cb_r<2>(DEVCB_##obj);
#define MCFG_M68HC05_PORTD_R_CB(obj) \
downcast<m68hc05_device &>(*device).set_port_cb_r<3>(DEVCB_##obj);
#define MCFG_M68HC05_PORTA_W_CB(obj) \
downcast<m68hc05_device &>(*device).set_port_cb_w<0>(DEVCB_##obj);
#define MCFG_M68HC05_PORTB_W_CB(obj) \
downcast<m68hc05_device &>(*device).set_port_cb_w<1>(DEVCB_##obj);
#define MCFG_M68HC05_PORTC_W_CB(obj) \
downcast<m68hc05_device &>(*device).set_port_cb_w<2>(DEVCB_##obj);
#define MCFG_M68HC05_PORTD_W_CB(obj) \
downcast<m68hc05_device &>(*device).set_port_cb_w<3>(DEVCB_##obj);
#define MCFG_M68HC05_TCMP_CB(obj) \
downcast<m68hc05_device &>(*device).set_tcmp_cb(DEVCB_##obj);
class m68hc05_device : public m6805_base_device
{
public:
// configuration helpers
template<std::size_t N, typename Object> devcb_base &set_port_cb_r(Object &&obj) { return m_port_cb_r[N].set_callback(std::forward<Object>(obj)); }
template<std::size_t N, typename Object> devcb_base &set_port_cb_w(Object &&obj) { return m_port_cb_w[N].set_callback(std::forward<Object>(obj)); }
template<typename Object> devcb_base &set_tcmp_cb(Object &&obj) { return m_tcmp_cb.set_callback(std::forward<Object>(obj)); }
template <std::size_t N> auto port_r() { return m_port_cb_r[N].bind(); }
template <std::size_t N> auto port_w() { return m_port_cb_w[N].bind(); }
auto tcmp() { return m_tcmp_cb.bind(); }
protected:
// state index constants
@ -109,7 +81,7 @@ protected:
void set_port_bits(std::array<u8, PORT_COUNT> const &bits);
void set_port_interrupt(std::array<u8, PORT_COUNT> const &interrupt);
DECLARE_READ8_MEMBER(port_r);
DECLARE_READ8_MEMBER(port_read);
DECLARE_WRITE8_MEMBER(port_latch_w);
DECLARE_READ8_MEMBER(port_ddr_r);
DECLARE_WRITE8_MEMBER(port_ddr_w);

View File

@ -317,7 +317,7 @@ public:
mc6809e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// configuration helpers
template<class Object> devcb_base &set_lic_cb(Object &&cb) { return m_lic_func.set_callback(std::forward<Object>(cb)); }
auto lic() { return m_lic_func.bind(); }
};
// ======================> m6809_device (LEGACY)

View File

@ -1108,7 +1108,7 @@ void address_map::map_validity_check(validity_checker &valid, int spacenum) cons
// error if not found
if (!found)
osd_printf_error("%s space memory map entry %X-%X references non-existant region '%s'\n", spaceconfig.m_name, entry.m_addrstart, entry.m_addrend, entry.m_region);
osd_printf_error("%s space memory map entry %X-%X references nonexistent region '%s'\n", spaceconfig.m_name, entry.m_addrstart, entry.m_addrend, entry.m_region);
}
// make sure all devices exist

View File

@ -351,7 +351,7 @@ void device_execute_interface::interface_validity_check(validity_checker &valid)
if (iter.first() == nullptr)
osd_printf_error("VBLANK interrupt specified, but the driver is screenless\n");
else if (m_vblank_interrupt_screen != nullptr && device().siblingdevice(m_vblank_interrupt_screen) == nullptr)
osd_printf_error("VBLANK interrupt references a non-existant screen tag '%s'\n", m_vblank_interrupt_screen);
osd_printf_error("VBLANK interrupt references a nonexistent screen tag '%s'\n", m_vblank_interrupt_screen);
}
if (!m_timed_interrupt.isnull() && m_timed_interrupt_period == attotime::zero)

View File

@ -336,13 +336,13 @@ void device_sound_interface::interface_post_start()
int streamoutputnum;
sound_stream *const outputstream = sound.output_to_stream_output(outputnum, streamoutputnum);
if (!outputstream)
fatalerror("Sound device '%s' specifies route for non-existent output #%d\n", sound.device().tag(), outputnum);
fatalerror("Sound device '%s' specifies route for nonexistent output #%d\n", sound.device().tag(), outputnum);
// find the input stream to connect to
int streaminputnum;
sound_stream *const inputstream = input_to_stream_input(inputnum++, streaminputnum);
if (!inputstream)
fatalerror("Sound device '%s' targeted output #%d to non-existant device '%s' input %d\n", sound.device().tag(), outputnum, m_device.tag(), inputnum - 1);
fatalerror("Sound device '%s' targeted output #%d to nonexistent device '%s' input %d\n", sound.device().tag(), outputnum, m_device.tag(), inputnum - 1);
// set the input
inputstream->set_input(streaminputnum, outputstream, streamoutputnum, route.m_gain);

View File

@ -1301,7 +1301,7 @@ void address_space::prepare_map()
// find the region
memory_region *region = m_manager.machine().root_device().memregion(fulltag.c_str());
if (region == nullptr)
fatalerror("device '%s' %s space memory map entry %X-%X references non-existant region \"%s\"\n", m_device.tag(), m_name, entry.m_addrstart, entry.m_addrend, entry.m_region);
fatalerror("device '%s' %s space memory map entry %X-%X references nonexistent region \"%s\"\n", m_device.tag(), m_name, entry.m_addrstart, entry.m_addrend, entry.m_region);
// validate the region
if (entry.m_rgnoffs + m_config.addr2byte(entry.m_addrend - entry.m_addrstart + 1) > region->bytes())

View File

@ -232,11 +232,11 @@ void sound_stream::set_input(int index, sound_stream *input_stream, int output_i
// make sure it's a valid input
if (index >= m_input.size())
fatalerror("stream_set_input attempted to configure non-existant input %d (%d max)\n", index, int(m_input.size()));
fatalerror("stream_set_input attempted to configure nonexistent input %d (%d max)\n", index, int(m_input.size()));
// make sure it's a valid output
if (input_stream != nullptr && output_index >= input_stream->m_output.size())
fatalerror("stream_set_input attempted to use a non-existant output %d (%d max)\n", output_index, int(m_output.size()));
fatalerror("stream_set_input attempted to use a nonexistent output %d (%d max)\n", output_index, int(m_output.size()));
// if this input is already wired, update the dependent info
stream_input &input = m_input[index];

View File

@ -1462,7 +1462,7 @@ void validity_checker::validate_driver()
if (compatible_with != nullptr && strcmp(compatible_with, "0") == 0)
compatible_with = nullptr;
// check for this driver being compatible with a non-existant driver
// check for this driver being compatible with a nonexistent driver
if (compatible_with != nullptr && m_drivlist.find(m_current_driver->compatible_with) == -1)
osd_printf_error("Driver is listed as compatible with nonexistent driver %s\n", m_current_driver->compatible_with);

View File

@ -171,9 +171,10 @@ void qix_state::audio_map(address_map &map)
*
*************************************/
MACHINE_CONFIG_START(qix_state::qix_audio)
MCFG_DEVICE_ADD("audiocpu", M6802, SOUND_CLOCK_OSC/2) /* 0.92 MHz */
MCFG_DEVICE_PROGRAM_MAP(audio_map)
void qix_state::qix_audio(machine_config &config)
{
M6802(config, m_audiocpu, SOUND_CLOCK_OSC/2); /* 0.92 MHz */
m_audiocpu->set_addrmap(AS_PROGRAM, &qix_state::audio_map);
PIA6821(config, m_sndpia0, 0);
m_sndpia0->writepa_handler().set(FUNC(qix_state::sync_sndpia1_porta_w));
@ -199,13 +200,13 @@ MACHINE_CONFIG_START(qix_state::qix_audio)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
MCFG_DEVICE_ADD("discrete", DISCRETE, qix_discrete)
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
MACHINE_CONFIG_END
DISCRETE(config, m_discrete, qix_discrete);
m_discrete->add_route(0, "lspeaker", 1.0);
m_discrete->add_route(1, "rspeaker", 1.0);
}
MACHINE_CONFIG_START(qix_state::slither_audio)
void qix_state::slither_audio(machine_config &config)
{
PIA6821(config, m_sndpia0, 0);
m_sndpia0->readpa_handler().set_ioport("P2");
m_sndpia0->writepb_handler().set(FUNC(qix_state::slither_coinctl_w));
@ -215,9 +216,9 @@ MACHINE_CONFIG_START(qix_state::slither_audio)
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("sn1", SN76489, SLITHER_CLOCK_OSC/4/4)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
SN76489(config, m_sn1, SLITHER_CLOCK_OSC/4/4);
m_sn1->add_route(ALL_OUTPUTS, "mono", 0.50);
MCFG_DEVICE_ADD("sn2", SN76489, SLITHER_CLOCK_OSC/4/4)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
SN76489(config, m_sn2, SLITHER_CLOCK_OSC/4/4);
m_sn2->add_route(ALL_OUTPUTS, "mono", 0.50);
}

View File

@ -1077,19 +1077,20 @@ MACHINE_RESET_MEMBER(bub68705_state, bub68705)
m_latch = 0;
}
MACHINE_CONFIG_START(bub68705_state::bub68705)
void bub68705_state::bub68705(machine_config &config)
{
bublbobl_nomcu(config);
/* basic machine hardware */
MCFG_DEVICE_ADD("mcu", M68705P3, XTAL(4'000'000)) // xtal is 4MHz, divided by 4 internally
MCFG_M68705_PORTC_R_CB(IOPORT("IN0"))
MCFG_M68705_PORTA_W_CB(WRITE8(*this, bub68705_state, port_a_w))
MCFG_M68705_PORTB_W_CB(WRITE8(*this, bub68705_state, port_b_w))
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", bub68705_state, bublbobl_m68705_interrupt) // ??? should come from the same clock which latches the INT pin on the second Z80
M68705P3(config, m_mcu, XTAL(4'000'000)); // xtal is 4MHz, divided by 4 internally
m_mcu->portc_r().set_ioport("IN0");
m_mcu->porta_w().set(FUNC(bub68705_state::port_a_w));
m_mcu->portb_w().set(FUNC(bub68705_state::port_b_w));
m_mcu->set_vblank_int("screen", FUNC(bub68705_state::bublbobl_m68705_interrupt)); // ??? should come from the same clock which latches the INT pin on the second Z80
MCFG_MACHINE_START_OVERRIDE(bub68705_state, bub68705)
MCFG_MACHINE_RESET_OVERRIDE(bub68705_state, bub68705)
MACHINE_CONFIG_END
}

View File

@ -416,17 +416,17 @@ void changela_state::machine_reset()
m_dir_31 = 0;
}
MACHINE_CONFIG_START(changela_state::changela)
void changela_state::changela(machine_config &config)
{
Z80(config, m_maincpu, 5000000);
m_maincpu->set_addrmap(AS_PROGRAM, &changela_state::changela_map);
TIMER(config, "scantimer").configure_scanline(FUNC(changela_state::changela_scanline), "screen", 0, 1);
MCFG_DEVICE_ADD("maincpu", Z80,5000000)
MCFG_DEVICE_PROGRAM_MAP(changela_map)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", changela_state, changela_scanline, "screen", 0, 1)
MCFG_DEVICE_ADD("mcu", M68705P3, 2500000)
MCFG_M68705_PORTB_R_CB(IOPORT("MCU"))
MCFG_M68705_PORTA_W_CB(WRITE8(*this, changela_state, changela_68705_port_a_w))
MCFG_M68705_PORTC_W_CB(WRITE8(*this, changela_state, changela_68705_port_c_w))
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", changela_state, chl_mcu_irq)
M68705P3(config, m_mcu, 2500000);
m_mcu->portb_r().set_ioport("MCU");
m_mcu->porta_w().set(FUNC(changela_state::changela_68705_port_a_w));
m_mcu->portc_w().set(FUNC(changela_state::changela_68705_port_c_w));
m_mcu->set_vblank_int("screen", FUNC(changela_state::chl_mcu_irq));
ls259_device &outlatch(LS259(config, "outlatch")); // U44 on Sound I/O Board
outlatch.q_out_cb<0>().set(FUNC(changela_state::collision_reset_0_w));
@ -437,14 +437,14 @@ MACHINE_CONFIG_START(changela_state::changela)
WATCHDOG_TIMER(config, "watchdog");
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_SIZE(32*8, 262) /* vert size is a guess */
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 4*8, 32*8-1)
MCFG_SCREEN_UPDATE_DRIVER(changela_state, screen_update_changela)
MCFG_SCREEN_PALETTE("palette")
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
m_screen->set_refresh_hz(60);
m_screen->set_size(32*8, 262); /* vert size is a guess */
m_screen->set_visarea(0*8, 32*8-1, 4*8, 32*8-1);
m_screen->set_screen_update(FUNC(changela_state::screen_update_changela));
m_screen->set_palette(m_palette);
MCFG_PALETTE_ADD("palette", 0x40)
PALETTE(config, m_palette, 0x40);
SPEAKER(config, "mono").front_center();
@ -458,7 +458,7 @@ MACHINE_CONFIG_START(changela_state::changela)
ay2.port_a_read_callback().set_ioport("DSWC");
ay2.port_b_read_callback().set_ioport("DSWD");
ay2.add_route(ALL_OUTPUTS, "mono", 0.50);
MACHINE_CONFIG_END
}
ROM_START( changela )

View File

@ -1120,8 +1120,8 @@ MACHINE_CONFIG_START(darktowr_state::darktowr)
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(darktowr_map)
MCFG_DEVICE_ADD("mcu", M68705P3, XTAL(4'000'000))
MCFG_M68705_PORTA_W_CB(WRITE8(*this, darktowr_state, mcu_port_a_w))
M68705P3(config, m_mcu, XTAL(4'000'000));
m_mcu->porta_w().set(FUNC(darktowr_state::mcu_port_a_w));
ADDRESS_MAP_BANK(config, "darktowr_bank").set_map(&darktowr_state::darktowr_banked_map).set_options(ENDIANNESS_BIG, 8, 17, 0x4000);

View File

@ -4315,11 +4315,11 @@ MACHINE_RESET_MEMBER(goldnpkr_state, mondial)
* Machine Drivers *
*********************************************/
MACHINE_CONFIG_START(goldnpkr_state::goldnpkr_base)
void goldnpkr_state::goldnpkr_base(machine_config &config)
{
/* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", M6502, CPU_CLOCK)
MCFG_DEVICE_PROGRAM_MAP(goldnpkr_map)
M6502(config, m_maincpu, CPU_CLOCK);
m_maincpu->set_addrmap(AS_PROGRAM, &goldnpkr_state::goldnpkr_map);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
@ -4333,13 +4333,13 @@ MACHINE_CONFIG_START(goldnpkr_state::goldnpkr_base)
m_pia[1]->writepb_handler().set(FUNC(goldnpkr_state::mux_w));
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
MCFG_SCREEN_SIZE((39+1)*8, (31+1)*8) /* From MC6845 init, registers 00 & 04 (programmed with value-1). */
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 29*8-1) /* From MC6845 init, registers 01 & 06. */
MCFG_SCREEN_UPDATE_DRIVER(goldnpkr_state, screen_update_goldnpkr)
MCFG_SCREEN_PALETTE("palette")
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((39+1)*8, (31+1)*8); /* From MC6845 init, registers 00 & 04 (programmed with value-1). */
screen.set_visarea(0*8, 32*8-1, 0*8, 29*8-1); /* From MC6845 init, registers 01 & 06. */
screen.set_screen_update(FUNC(goldnpkr_state::screen_update_goldnpkr));
screen.set_palette(m_palette);
mc6845_device &crtc(MC6845(config, "crtc", CPU_CLOCK)); /* 68B45 or 6845s @ CPU clock */
crtc.set_screen("screen");
@ -4347,216 +4347,187 @@ MACHINE_CONFIG_START(goldnpkr_state::goldnpkr_base)
crtc.set_char_width(8);
crtc.out_vsync_callback().set_inputline(m_maincpu, INPUT_LINE_NMI);
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_goldnpkr)
MCFG_PALETTE_ADD("palette", 256)
MCFG_PALETTE_INIT_OWNER(goldnpkr_state, goldnpkr)
MACHINE_CONFIG_END
GFXDECODE(config, m_gfxdecode, m_palette, gfx_goldnpkr);
PALETTE(config, m_palette, 256).set_init(FUNC(goldnpkr_state::palette_init_goldnpkr));
}
MACHINE_CONFIG_START(goldnpkr_state::goldnpkr)
void goldnpkr_state::goldnpkr(machine_config &config)
{
goldnpkr_base(config);
/* sound hardware */
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("discrete", DISCRETE, goldnpkr_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
DISCRETE(config, m_discrete, goldnpkr_discrete).add_route(ALL_OUTPUTS, "mono", 1.0);
}
MACHINE_CONFIG_START(goldnpkr_state::pottnpkr)
void goldnpkr_state::pottnpkr(machine_config &config)
{
goldnpkr_base(config);
/* basic machine hardware */
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(pottnpkr_map)
m_maincpu->set_addrmap(AS_PROGRAM, &goldnpkr_state::pottnpkr_map);
m_pia[0]->readpa_handler().set(FUNC(goldnpkr_state::pottnpkr_mux_port_r));
m_pia[0]->writepa_handler().set(FUNC(goldnpkr_state::mux_port_w));
/* sound hardware */
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("discrete", DISCRETE, pottnpkr_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
DISCRETE(config, m_discrete, pottnpkr_discrete).add_route(ALL_OUTPUTS, "mono", 1.0);
}
MACHINE_CONFIG_START(goldnpkr_state::witchcrd)
void goldnpkr_state::witchcrd(machine_config &config)
{
goldnpkr_base(config);
/* basic machine hardware */
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(witchcrd_map)
m_maincpu->set_addrmap(AS_PROGRAM, &goldnpkr_state::witchcrd_map);
m_pia[0]->readpa_handler().set(FUNC(goldnpkr_state::pottnpkr_mux_port_r));
m_pia[0]->writepa_handler().set(FUNC(goldnpkr_state::mux_port_w));
/* video hardware */
MCFG_PALETTE_MODIFY("palette")
MCFG_PALETTE_INIT_OWNER(goldnpkr_state,witchcrd)
m_palette->set_init(FUNC(goldnpkr_state::palette_init_witchcrd));
/* sound hardware */
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("discrete", DISCRETE, goldnpkr_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
DISCRETE(config, "discrete", goldnpkr_discrete).add_route(ALL_OUTPUTS, "mono", 1.0);
}
MACHINE_CONFIG_START(goldnpkr_state::wcfalcon)
void goldnpkr_state::wcfalcon(machine_config &config)
{
goldnpkr_base(config);
/* basic machine hardware */
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(witchcrd_falcon_map)
m_maincpu->set_addrmap(AS_PROGRAM, &goldnpkr_state::witchcrd_falcon_map);
m_pia[0]->writepa_handler().set(FUNC(goldnpkr_state::mux_port_w));
m_pia[1]->writepa_handler().set(FUNC(goldnpkr_state::wcfalcon_snd_w)); /* port A out, custom handler due to address + data are muxed */
/* video hardware */
MCFG_PALETTE_MODIFY("palette")
MCFG_PALETTE_INIT_OWNER(goldnpkr_state,witchcrd)
m_palette->set_init(FUNC(goldnpkr_state::palette_init_witchcrd));
/* sound hardware */
SPEAKER(config, "mono").front_center();
AY8910(config, m_ay8910, MASTER_CLOCK/4).add_route(ALL_OUTPUTS, "mono", 1.00); /* guess, seems ok */
MACHINE_CONFIG_END
}
MACHINE_CONFIG_START(goldnpkr_state::wildcard)
void goldnpkr_state::wildcard(machine_config &config)
{
goldnpkr_base(config);
/* basic machine hardware */
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(wildcard_map)
m_maincpu->set_addrmap(AS_PROGRAM, &goldnpkr_state::wildcard_map);
m_pia[0]->readpa_handler().set(FUNC(goldnpkr_state::pottnpkr_mux_port_r));
m_pia[0]->writepa_handler().set(FUNC(goldnpkr_state::mux_port_w));
/* video hardware */
// MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_wildcard)
MCFG_PALETTE_MODIFY("palette")
MCFG_PALETTE_INIT_OWNER(goldnpkr_state, witchcrd)
// MCFG_VIDEO_START_OVERRIDE(goldnpkr_state,wildcard)
m_palette->set_init(FUNC(goldnpkr_state::palette_init_witchcrd));
/* sound hardware */
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("discrete", DISCRETE, goldnpkr_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
DISCRETE(config, m_discrete, goldnpkr_discrete).add_route(ALL_OUTPUTS, "mono", 1.0);
}
MACHINE_CONFIG_START(goldnpkr_state::wcrdxtnd)
void goldnpkr_state::wcrdxtnd(machine_config &config)
{
goldnpkr_base(config);
/* basic machine hardware */
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(wcrdxtnd_map)
m_maincpu->set_addrmap(AS_PROGRAM, &goldnpkr_state::wcrdxtnd_map);
m_pia[0]->readpa_handler().set(FUNC(goldnpkr_state::pottnpkr_mux_port_r));
m_pia[0]->writepa_handler().set(FUNC(goldnpkr_state::mux_port_w));
/* video hardware */
MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_wcrdxtnd)
MCFG_PALETTE_MODIFY("palette")
MCFG_PALETTE_INIT_OWNER(goldnpkr_state, wcrdxtnd)
m_gfxdecode->set_info(gfx_wcrdxtnd);
m_palette->set_init(FUNC(goldnpkr_state::palette_init_wcrdxtnd));
MCFG_VIDEO_START_OVERRIDE(goldnpkr_state, wcrdxtnd)
/* sound hardware */
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("discrete", DISCRETE, goldnpkr_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
DISCRETE(config, m_discrete, goldnpkr_discrete).add_route(ALL_OUTPUTS, "mono", 1.0);
}
MACHINE_CONFIG_START(goldnpkr_state::wildcrdb)
void goldnpkr_state::wildcrdb(machine_config &config)
{
goldnpkr_base(config);
/* basic machine hardware */
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(wildcrdb_map)
m_maincpu->set_addrmap(AS_PROGRAM, &goldnpkr_state::wildcrdb_map);
MCFG_DEVICE_ADD("mcu", Z80, MASTER_CLOCK/4) /* guess */
MCFG_DEVICE_PROGRAM_MAP(wildcrdb_mcu_map)
MCFG_DEVICE_IO_MAP(wildcrdb_mcu_io_map)
z80_device &mcu(Z80(config, "mcu", MASTER_CLOCK/4)); /* guess */
mcu.set_addrmap(AS_PROGRAM, &goldnpkr_state::wildcrdb_mcu_map);
mcu.set_addrmap(AS_IO, &goldnpkr_state::wildcrdb_mcu_io_map);
m_pia[0]->writepa_handler().set(FUNC(goldnpkr_state::mux_port_w));
m_pia[1]->writepa_handler().set(FUNC(goldnpkr_state::wcfalcon_snd_w));
/* video hardware */
// MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_wildcard)
MCFG_PALETTE_MODIFY("palette")
MCFG_PALETTE_INIT_OWNER(goldnpkr_state, witchcrd)
// MCFG_VIDEO_START_OVERRIDE(goldnpkr_state,wildcard)
m_palette->set_init(FUNC(goldnpkr_state::palette_init_witchcrd));
/* sound hardware */
SPEAKER(config, "mono").front_center();
AY8910(config, m_ay8910, MASTER_CLOCK/4).add_route(ALL_OUTPUTS, "mono", 1.00); /* guess, seems ok */
MACHINE_CONFIG_END
}
MACHINE_CONFIG_START(goldnpkr_state::genie)
void goldnpkr_state::genie(machine_config &config)
{
goldnpkr_base(config);
/* basic machine hardware */
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(genie_map)
m_maincpu->set_addrmap(AS_PROGRAM, &goldnpkr_state::genie_map);
m_pia[0]->readpa_handler().set(FUNC(goldnpkr_state::pottnpkr_mux_port_r));
m_pia[0]->writepa_handler().set(FUNC(goldnpkr_state::mux_port_w));
/* video hardware */
MCFG_PALETTE_MODIFY("palette")
MCFG_PALETTE_INIT_OWNER(goldnpkr_state, witchcrd)
m_palette->set_init(FUNC(goldnpkr_state::palette_init_witchcrd));
/* sound hardware */
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("discrete", DISCRETE, goldnpkr_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
DISCRETE(config, m_discrete, goldnpkr_discrete).add_route(ALL_OUTPUTS, "mono", 1.0);
}
MACHINE_CONFIG_START(goldnpkr_state::geniea)
void goldnpkr_state::geniea(machine_config &config)
{
goldnpkr_base(config);
/* basic machine hardware */
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(goldnpkr_map)
m_maincpu->set_addrmap(AS_PROGRAM, &goldnpkr_state::goldnpkr_map);
// m_pia[0]->readpa_handler().set(FUNC(goldnpkr_state::pottnpkr_mux_port_r));
// m_pia[0]->writepa_handler().set(FUNC(goldnpkr_state::mux_port_w));
/* video hardware */
MCFG_PALETTE_MODIFY("palette")
MCFG_PALETTE_INIT_OWNER(goldnpkr_state, witchcrd)
m_palette->set_init(FUNC(goldnpkr_state::palette_init_witchcrd));
/* sound hardware */
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("discrete", DISCRETE, goldnpkr_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
DISCRETE(config, m_discrete, goldnpkr_discrete).add_route(ALL_OUTPUTS, "mono", 1.0);
}
MACHINE_CONFIG_START(goldnpkr_state::mondial)
void goldnpkr_state::mondial(machine_config &config)
{
goldnpkr_base(config);
/* basic machine hardware */
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(mondial_map)
m_maincpu->set_addrmap(AS_PROGRAM, &goldnpkr_state::mondial_map);
MCFG_MACHINE_START_OVERRIDE(goldnpkr_state, mondial)
MCFG_MACHINE_RESET_OVERRIDE(goldnpkr_state, mondial)
/* sound hardware */
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("discrete", DISCRETE, goldnpkr_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
DISCRETE(config, m_discrete, goldnpkr_discrete).add_route(ALL_OUTPUTS, "mono", 1.0);
}
MACHINE_CONFIG_START(goldnpkr_state::bchancep)
void goldnpkr_state::bchancep(machine_config &config)
{
goldnpkr_base(config);
/* basic machine hardware */
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(bchancep_map)
m_maincpu->set_addrmap(AS_PROGRAM, &goldnpkr_state::bchancep_map);
m_pia[0]->readpa_handler().set(FUNC(goldnpkr_state::pia0_a_r));
m_pia[0]->readpb_handler().set(FUNC(goldnpkr_state::pia0_b_r));
@ -4570,9 +4541,8 @@ MACHINE_CONFIG_START(goldnpkr_state::bchancep)
/* sound hardware */
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("discrete", DISCRETE, pottnpkr_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
DISCRETE(config, m_discrete, pottnpkr_discrete).add_route(ALL_OUTPUTS, "mono", 1.0);
}
@ -4706,11 +4676,11 @@ MACHINE_CONFIG_START(blitz_state::megadpkr)
ADDRESS_MAP_BANK(config, "bankdev").set_map(&blitz_state::megadpkr_banked_map).set_data_width(8).set_addr_width(16).set_stride(0x4000);
MCFG_DEVICE_ADD("mcu", M68705P5, CPU_CLOCK) /* unknown */
MCFG_M68705_PORTB_W_CB(WRITE8(*this, blitz_state, mcu_portb_w))
MCFG_M68705_PORTC_W_CB(WRITE8(*this, blitz_state, mcu_portc_w))
M68705P5(config, m_mcu, CPU_CLOCK); /* unknown */
m_mcu->portb_w().set(FUNC(blitz_state::mcu_portb_w));
m_mcu->portc_w().set(FUNC(blitz_state::mcu_portc_w));
MCFG_DEVICE_ADD("timekpr", M48T02, 0)
M48T02(config, "timekpr", 0);
PIA6821(config, m_pia[0], 0);
m_pia[0]->readpa_handler().set(FUNC(goldnpkr_state::pottnpkr_mux_port_r));

View File

@ -61,7 +61,7 @@ protected:
void m68705prg(machine_config &config);
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(eprom_load)
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(eprom)
{
auto const desired(m_mcu_region.bytes());
auto const actual(m_eprom_image->common_get_size("rom"));
@ -78,7 +78,7 @@ protected:
}
}
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(mcu_load)
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(mcu)
{
auto const desired(m_mcu_region.bytes());
auto const actual(m_mcu_image->common_get_size("rom"));
@ -227,43 +227,46 @@ INPUT_PORTS_START(m68705prg)
INPUT_PORTS_END
MACHINE_CONFIG_START(m68705prg_state_base::m68705prg)
MCFG_QUANTUM_PERFECT_CPU("mcu")
void m68705prg_state_base::m68705prg(machine_config &config)
{
config.m_perfect_cpu_quantum = subtag("mcu");
MCFG_GENERIC_SOCKET_ADD("eprom_image", generic_plain_slot, "eprom")
MCFG_GENERIC_EXTENSIONS("bin,rom")
MCFG_GENERIC_LOAD(m68705prg_state_base, eprom_load)
GENERIC_SOCKET(config, m_eprom_image, generic_plain_slot, "eprom", "bin,rom");
m_eprom_image->set_device_load(device_image_load_delegate(&m68705prg_state_base::device_image_load_eprom, this));
MCFG_GENERIC_SOCKET_ADD("mcu_image", generic_plain_slot, "mcu")
MCFG_GENERIC_EXTENSIONS("bin,rom")
MCFG_GENERIC_LOAD(m68705prg_state_base, mcu_load)
GENERIC_SOCKET(config, m_mcu_image, generic_plain_slot, "mcu", "bin,rom");
m_mcu_image->set_device_load(device_image_load_delegate(&m68705prg_state_base::device_image_load_mcu, this));
config.set_default_layout(layout_m68705prg);
MACHINE_CONFIG_END
}
template<> MACHINE_CONFIG_START(p3prg_state::prg)
template<> void p3prg_state::prg(machine_config &config)
{
m68705prg(config);
MCFG_DEVICE_ADD("mcu", M68705P3, 1_MHz_XTAL)
MCFG_M68705_PORTB_W_CB(WRITE8(*this, p3prg_state, pb_w))
MACHINE_CONFIG_END
M68705P3(config, m_mcu, 1_MHz_XTAL);
m_mcu->portb_w().set(FUNC(p3prg_state::pb_w));
}
template<> MACHINE_CONFIG_START(p5prg_state::prg)
template<> void p5prg_state::prg(machine_config &config)
{
m68705prg(config);
MCFG_DEVICE_ADD("mcu", M68705P5, 1_MHz_XTAL)
MCFG_M68705_PORTB_W_CB(WRITE8(*this, p5prg_state, pb_w))
MACHINE_CONFIG_END
M68705P5(config, m_mcu, 1_MHz_XTAL);
m_mcu->portb_w().set(FUNC(p5prg_state::pb_w));
}
template<> MACHINE_CONFIG_START(r3prg_state::prg)
template<> void r3prg_state::prg(machine_config &config)
{
m68705prg(config);
MCFG_DEVICE_ADD("mcu", M68705R3, 1_MHz_XTAL)
MCFG_M68705_PORTB_W_CB(WRITE8(*this, r3prg_state, pb_w))
MACHINE_CONFIG_END
M68705R3(config, m_mcu, 1_MHz_XTAL);
m_mcu->portb_w().set(FUNC(r3prg_state::pb_w));
}
template<> MACHINE_CONFIG_START(u3prg_state::prg)
template<> void u3prg_state::prg(machine_config &config)
{
m68705prg(config);
MCFG_DEVICE_ADD("mcu", M68705U3, 1_MHz_XTAL)
MCFG_M68705_PORTB_W_CB(WRITE8(*this, u3prg_state, pb_w))
MACHINE_CONFIG_END
M68705U3(config, m_mcu, 1_MHz_XTAL);
m_mcu->portb_w().set(FUNC(u3prg_state::pb_w));
}
ROM_START( 705p3prg )

View File

@ -55,10 +55,10 @@ public:
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
private:
DECLARE_READ8_MEMBER(mcu_portA_r);
DECLARE_WRITE8_MEMBER(mcu_portA_w);
DECLARE_WRITE8_MEMBER(mcu_portB_w);
DECLARE_WRITE8_MEMBER(mcu_portC_w);
DECLARE_READ8_MEMBER(mcu_porta_r);
DECLARE_WRITE8_MEMBER(mcu_porta_w);
DECLARE_WRITE8_MEMBER(mcu_portb_w);
DECLARE_WRITE8_MEMBER(mcu_portc_w);
DECLARE_READ8_MEMBER(pia_pa_r);
DECLARE_READ8_MEMBER(pia_pb_r);
WRITE8_MEMBER(pia_pb_w) { mmu(data); }
@ -68,15 +68,15 @@ private:
virtual void machine_start() override;
virtual void machine_reset() override;
bool atari_input_disabled() const { return !BIT(m_portB_out, 7); }
bool atari_input_disabled() const { return !BIT(m_portb_out, 7); }
void mmu(uint8_t new_mmu);
void a600xl_mem(address_map &map);
uint8_t m_portB_out;
uint8_t m_portC_out;
uint8_t m_portb_out;
uint8_t m_portc_out;
required_device<cpu_device> m_mcu;
required_device<m68705p3_device> m_mcu;
required_device<speaker_sound_device> m_speaker;
required_region_ptr<uint8_t> m_region_maincpu;
required_ioport m_dsw;
@ -120,7 +120,7 @@ void maxaflex_state::mmu(uint8_t new_mmu)
7 (out) AUDIO
*/
READ8_MEMBER(maxaflex_state::mcu_portA_r)
READ8_MEMBER(maxaflex_state::mcu_porta_r)
{
return
((m_dsw->read() << 0) & 0x0f) |
@ -129,7 +129,7 @@ READ8_MEMBER(maxaflex_state::mcu_portA_r)
0xc0;
}
WRITE8_MEMBER(maxaflex_state::mcu_portA_w)
WRITE8_MEMBER(maxaflex_state::mcu_porta_w)
{
m_speaker->level_w(BIT(data, 7));
}
@ -145,10 +145,10 @@ WRITE8_MEMBER(maxaflex_state::mcu_portA_w)
7 (out) TOFF - enables/disables user controls
*/
WRITE8_MEMBER(maxaflex_state::mcu_portB_w)
WRITE8_MEMBER(maxaflex_state::mcu_portb_w)
{
const uint8_t diff = data ^ m_portB_out;
m_portB_out = data;
const uint8_t diff = data ^ m_portb_out;
m_portb_out = data;
/* clear coin interrupt */
if (BIT(data, 2))
@ -164,10 +164,10 @@ WRITE8_MEMBER(maxaflex_state::mcu_portB_w)
/* latch for lamps */
if (BIT(diff, 6) && !BIT(data, 6))
{
m_lamps[0] = BIT(m_portC_out, 0);
m_lamps[1] = BIT(m_portC_out, 1);
m_lamps[2] = BIT(m_portC_out, 2);
m_lamps[3] = BIT(m_portC_out, 3);
m_lamps[0] = BIT(m_portc_out, 0);
m_lamps[1] = BIT(m_portc_out, 1);
m_lamps[2] = BIT(m_portc_out, 2);
m_lamps[3] = BIT(m_portc_out, 3);
}
}
@ -177,18 +177,18 @@ WRITE8_MEMBER(maxaflex_state::mcu_portB_w)
2 (out) lamp START
3 (out) lamp OVER */
WRITE8_MEMBER(maxaflex_state::mcu_portC_w)
WRITE8_MEMBER(maxaflex_state::mcu_portc_w)
{
/* uses a 7447A, which is equivalent to an LS47/48 */
constexpr static uint8_t ls48_map[16] =
{ 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7c, 0x07, 0x7f, 0x67, 0x58, 0x4c, 0x62, 0x69, 0x78, 0x00 };
m_portC_out = data & 0x0f;
m_portc_out = data & 0x0f;
/* displays */
uint8_t const sel = m_portB_out & 0x03;
uint8_t const sel = m_portb_out & 0x03;
if (3U > sel)
m_digits[sel] = ls48_map[m_portC_out];
m_digits[sel] = ls48_map[m_portc_out];
}
INPUT_CHANGED_MEMBER(maxaflex_state::coin_inserted)
@ -298,8 +298,8 @@ void maxaflex_state::machine_start()
m_lamps.resolve();
m_digits.resolve();
save_item(NAME(m_portB_out));
save_item(NAME(m_portC_out));
save_item(NAME(m_portb_out));
save_item(NAME(m_portc_out));
}
void maxaflex_state::machine_reset()
@ -309,8 +309,8 @@ void maxaflex_state::machine_reset()
subdevice<pokey_device>("pokey")->write(machine().dummy_space(), 15, 0);
// Supervisor board reset
m_portB_out = 0xff;
m_portC_out = 0xff;
m_portb_out = 0xff;
m_portc_out = 0xff;
std::fill(std::begin(m_lamps), std::end(m_lamps), 0);
std::fill(std::begin(m_digits), std::end(m_digits), 0x00);
@ -327,11 +327,11 @@ MACHINE_CONFIG_START(maxaflex_state::maxaflex)
MCFG_DEVICE_PROGRAM_MAP(a600xl_mem)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", maxaflex_state, mf_interrupt, "screen", 0, 1)
MCFG_DEVICE_ADD("mcu", M68705P3, 3579545)
MCFG_M68705_PORTA_R_CB(READ8(*this, maxaflex_state, mcu_portA_r))
MCFG_M68705_PORTA_W_CB(WRITE8(*this, maxaflex_state, mcu_portA_w))
MCFG_M68705_PORTB_W_CB(WRITE8(*this, maxaflex_state, mcu_portB_w))
MCFG_M68705_PORTC_W_CB(WRITE8(*this, maxaflex_state, mcu_portC_w))
M68705P3(config, m_mcu, 3579545);
m_mcu->porta_r().set(FUNC(maxaflex_state::mcu_porta_r));
m_mcu->porta_w().set(FUNC(maxaflex_state::mcu_porta_w));
m_mcu->portb_w().set(FUNC(maxaflex_state::mcu_portb_w));
m_mcu->portc_w().set(FUNC(maxaflex_state::mcu_portc_w));
ATARI_GTIA(config, m_gtia, 0);
m_gtia->set_region(GTIA_NTSC);

View File

@ -424,40 +424,42 @@ void mexico86_state::machine_reset()
m_charbank = 0;
}
MACHINE_CONFIG_START(mexico86_state::mexico86)
void mexico86_state::mexico86(machine_config &config)
{
/* basic machine hardware */
MCFG_DEVICE_ADD("maincpu",Z80, 24000000/4) /* 6 MHz, Uses clock divided 24MHz OSC */
MCFG_DEVICE_PROGRAM_MAP(mexico86_map)
Z80(config, m_maincpu, 24000000/4); /* 6 MHz, Uses clock divided 24MHz OSC */
m_maincpu->set_addrmap(AS_PROGRAM, &mexico86_state::mexico86_map);
MCFG_DEVICE_ADD("audiocpu", Z80, 24000000/4) /* 6 MHz, Uses clock divided 24MHz OSC */
MCFG_DEVICE_PROGRAM_MAP(mexico86_sound_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mexico86_state, irq0_line_hold)
Z80(config, m_audiocpu, 24000000/4); /* 6 MHz, Uses clock divided 24MHz OSC */
m_audiocpu->set_addrmap(AS_PROGRAM, &mexico86_state::mexico86_sound_map);
m_audiocpu->set_vblank_int("screen", FUNC(mexico86_state::irq0_line_hold));
MCFG_DEVICE_ADD("mcu", M68705P3, 4000000) /* xtal is 4MHz, divided by 4 internally */
MCFG_M68705_PORTC_R_CB(IOPORT("IN0"));
MCFG_M68705_PORTA_W_CB(WRITE8(*this, mexico86_state, mexico86_68705_port_a_w));
MCFG_M68705_PORTB_W_CB(WRITE8(*this, mexico86_state, mexico86_68705_port_b_w));
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mexico86_state, mexico86_m68705_interrupt)
M68705P3(config, m_mcu, 4000000); /* xtal is 4MHz, divided by 4 internally */
m_mcu->portc_r().set_ioport("IN0");
m_mcu->porta_w().set(FUNC(mexico86_state::mexico86_68705_port_a_w));
m_mcu->portb_w().set(FUNC(mexico86_state::mexico86_68705_port_b_w));
m_mcu->set_vblank_int("screen", FUNC(mexico86_state::mexico86_m68705_interrupt));
MCFG_DEVICE_ADD("sub", Z80, 8000000/2) /* 4 MHz, Uses 8Mhz OSC */
MCFG_DEVICE_PROGRAM_MAP(mexico86_sub_cpu_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mexico86_state, irq0_line_hold)
MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper synchronization of the CPUs */
Z80(config, m_subcpu, 8000000/2); /* 4 MHz, Uses 8Mhz OSC */
m_subcpu->set_addrmap(AS_PROGRAM, &mexico86_state::mexico86_sub_cpu_map);
m_subcpu->set_vblank_int("screen", FUNC(mexico86_state::irq0_line_hold));
/* 100 CPU slices per frame - high value to ensure proper synchronization of the CPUs */
config.m_minimum_quantum = attotime::from_hz(6000);
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0) /* frames per second, vblank duration */)
MCFG_SCREEN_SIZE(32*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(mexico86_state, screen_update_mexico86)
MCFG_SCREEN_PALETTE("palette")
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
m_screen->set_refresh_hz(60);
m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0)); /* frames per second, vblank duration */
m_screen->set_size(32*8, 32*8);
m_screen->set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
m_screen->set_screen_update(FUNC(mexico86_state::screen_update_mexico86));
m_screen->set_palette(m_palette);
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_mexico86)
MCFG_PALETTE_ADD_RRRRGGGGBBBB_PROMS("palette", "proms", 256)
GFXDECODE(config, m_gfxdecode, m_palette, gfx_mexico86);
PALETTE(config, m_palette, 256);
m_palette->set_prom_region("proms");
m_palette->set_init(FUNC(palette_device::palette_init_RRRRGGGGBBBB_proms));
/* sound hardware */
SPEAKER(config, "mono").front_center();
@ -469,36 +471,27 @@ MACHINE_CONFIG_START(mexico86_state::mexico86)
m_ymsnd->add_route(1, "mono", 0.30);
m_ymsnd->add_route(2, "mono", 0.30);
m_ymsnd->add_route(3, "mono", 1.00);
MACHINE_CONFIG_END
}
MACHINE_CONFIG_START(mexico86_state::knightb)
void mexico86_state::knightb(machine_config &config)
{
mexico86(config);
config.device_remove("sub");
m_screen->set_screen_update(FUNC(mexico86_state::screen_update_kikikai));
}
/* basic machine hardware */
MCFG_DEVICE_REMOVE("sub")
/* video hardware */
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_UPDATE_DRIVER(mexico86_state, screen_update_kikikai)
MACHINE_CONFIG_END
MACHINE_CONFIG_START(mexico86_state::kikikai)
void mexico86_state::kikikai(machine_config &config)
{
knightb(config);
/* basic machine hardware */
// IRQs should be triggered by the MCU, but we don't have it
m_maincpu->set_vblank_int("screen", FUNC(mexico86_state::kikikai_interrupt));
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mexico86_state, kikikai_interrupt) // IRQs should be triggered by the MCU, but we don't have it
MCFG_DEVICE_REMOVE("mcu") // we don't have code for the MC6801U4
config.device_remove("mcu"); // we don't have code for the MC6801U4
/* video hardware */
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_UPDATE_DRIVER(mexico86_state, screen_update_kikikai)
MACHINE_CONFIG_END
m_screen->set_screen_update(FUNC(mexico86_state::screen_update_kikikai));
}
/*************************************

View File

@ -100,7 +100,7 @@ public:
private:
DECLARE_WRITE8_MEMBER(vram2_w);
DECLARE_WRITE8_MEMBER(vram1_w);
DECLARE_WRITE8_MEMBER(mcu_portA_w);
DECLARE_WRITE8_MEMBER(mcu_porta_w);
DECLARE_WRITE8_MEMBER(vidctrl_w);
DECLARE_READ8_MEMBER(protection_r);
DECLARE_WRITE8_MEMBER(protection_w);
@ -133,32 +133,26 @@ private:
u8 m_vidctrl;
std::unique_ptr<u8[]> m_palram;
u8 m_fromMCU;
u8 m_from_mcu;
};
void pipeline_state::machine_start()
{
save_item(NAME(m_fromMCU));
save_item(NAME(m_from_mcu));
}
TILE_GET_INFO_MEMBER(pipeline_state::get_tile_info)
{
int code = m_vram2[tile_index]+m_vram2[tile_index+0x800]*256;
SET_TILE_INFO_MEMBER(0,
code,
0,
0);
int code = m_vram2[tile_index] + m_vram2[tile_index + 0x800] * 256;
SET_TILE_INFO_MEMBER(0, code, 0, 0);
}
TILE_GET_INFO_MEMBER(pipeline_state::get_tile_info2)
{
int code =m_vram1[tile_index]+((m_vram1[tile_index+0x800]>>4))*256;
int color=((m_vram1[tile_index+0x800])&0xf);
SET_TILE_INFO_MEMBER(1,
code,
color,
0);
int code = m_vram1[tile_index] + ((m_vram1[tile_index + 0x800] >> 4)) * 256;
int color = ((m_vram1[tile_index + 0x800]) & 0xf);
SET_TILE_INFO_MEMBER(1, code, color, 0);
}
void pipeline_state::video_start()
@ -182,36 +176,36 @@ u32 pipeline_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, c
WRITE8_MEMBER(pipeline_state::vidctrl_w)
{
m_vidctrl=data;
m_vidctrl = data;
}
WRITE8_MEMBER(pipeline_state::vram2_w)
{
if(!(m_vidctrl&1))
if(!(m_vidctrl & 1))
{
m_tilemap1->mark_tile_dirty(offset&0x7ff);
m_vram2[offset]=data;
m_tilemap1->mark_tile_dirty(offset & 0x7ff);
m_vram2[offset] = data;
}
else
{
m_palram[offset]=data;
if(offset<0x300)
{
offset&=0xff;
m_palram[offset] = data;
if (offset < 0x300)
{
offset &= 0xff;
m_palette->set_pen_color(offset, pal6bit(m_palram[offset]), pal6bit(m_palram[offset+0x100]), pal6bit(m_palram[offset+0x200]));
}
}
}
}
WRITE8_MEMBER(pipeline_state::vram1_w)
{
m_tilemap2->mark_tile_dirty(offset&0x7ff);
m_vram1[offset]=data;
m_tilemap2->mark_tile_dirty(offset & 0x7ff);
m_vram1[offset] = data;
}
READ8_MEMBER(pipeline_state::protection_r)
{
return m_fromMCU;
return m_from_mcu;
}
TIMER_CALLBACK_MEMBER(pipeline_state::protection_deferred_w)
@ -251,9 +245,9 @@ void pipeline_state::sound_port(address_map &map)
map(0x06, 0x07).noprw();
}
WRITE8_MEMBER(pipeline_state::mcu_portA_w)
WRITE8_MEMBER(pipeline_state::mcu_porta_w)
{
m_fromMCU=data;
m_from_mcu = data;
}
@ -342,36 +336,35 @@ static const z80_daisy_config daisy_chain_sound[] =
PALETTE_INIT_MEMBER(pipeline_state, pipeline)
{
int r,g,b,i,c;
u8 *prom1 = &memregion("proms")->base()[0x000];
u8 *prom2 = &memregion("proms")->base()[0x100];
for (i=0;i<0x100;i++)
for (int i = 0; i < 0x100; i++)
{
c=prom1[i]|(prom2[i]<<4);
r=c&7;
g=(c>>3)&7;
b=(c>>6)&3;
r*=36;
g*=36;
b*=85;
int c = prom1[i] | (prom2[i] << 4);
int r = c & 7;
int g = (c >> 3) & 7;
int b = (c >> 6) & 3;
r *= 36;
g *= 36;
b *= 85;
palette.set_pen_color(0x100+i, rgb_t(r, g, b));
}
}
MACHINE_CONFIG_START(pipeline_state::pipeline)
void pipeline_state::pipeline(machine_config &config)
{
/* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", Z80, 7372800/2)
MCFG_DEVICE_PROGRAM_MAP(cpu0_mem)
Z80(config, m_maincpu, 7372800/2);
m_maincpu->set_addrmap(AS_PROGRAM, &pipeline_state::cpu0_mem);
z80_device& audiocpu(Z80(config, "audiocpu", 7372800/2));
audiocpu.set_daisy_config(daisy_chain_sound);
audiocpu.set_addrmap(AS_PROGRAM, &pipeline_state::cpu1_mem);
audiocpu.set_addrmap(AS_IO, &pipeline_state::sound_port);
MCFG_DEVICE_ADD("mcu", M68705R3, 7372800/2)
MCFG_M68705_PORTA_W_CB(WRITE8(*this, pipeline_state, mcu_portA_w))
M68705R3(config, m_mcu, 7372800/2);
m_mcu->porta_w().set(FUNC(pipeline_state::mcu_porta_w));
z80ctc_device& ctc(Z80CTC(config, "ctc", 7372800/2 /* same as "audiocpu" */));
ctc.intr_callback().set_inputline("audiocpu", INPUT_LINE_IRQ0);
@ -387,29 +380,25 @@ MACHINE_CONFIG_START(pipeline_state::pipeline)
ppi1.in_pc_callback().set(FUNC(pipeline_state::protection_r));
ppi1.out_pc_callback().set(FUNC(pipeline_state::protection_w));
MCFG_DEVICE_ADD("ppi8255_2", I8255A, 0)
I8255A(config, "ppi8255_2", 0);
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
MCFG_SCREEN_SIZE(512, 512)
MCFG_SCREEN_VISIBLE_AREA(0, 319, 16, 239)
MCFG_SCREEN_UPDATE_DRIVER(pipeline_state, screen_update)
MCFG_SCREEN_PALETTE("palette")
MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("maincpu", INPUT_LINE_NMI))
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(512, 512);
screen.set_visarea(0, 319, 16, 239);
screen.set_screen_update(FUNC(pipeline_state::screen_update));
screen.set_palette("palette");
screen.screen_vblank().set_inputline("maincpu", INPUT_LINE_NMI);
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_pipeline)
MCFG_PALETTE_ADD("palette", 0x100+0x100)
MCFG_PALETTE_INIT_OWNER(pipeline_state, pipeline)
GFXDECODE(config, m_gfxdecode, m_palette, gfx_pipeline);
PALETTE(config, m_palette, 0x100+0x100).set_init(FUNC(pipeline_state::palette_init_pipeline));
/* audio hardware */
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("ymsnd", YM2203, 7372800/4)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
MACHINE_CONFIG_END
YM2203(config, "ymsnd", 7372800/4).add_route(ALL_OUTPUTS, "mono", 0.60);
}
ROM_START( pipeline )

View File

@ -69,7 +69,6 @@ K1000233A
#include "emu.h"
#include "includes/pitnrun.h"
#include "cpu/m6805/m68705.h"
#include "cpu/z80/z80.h"
#include "machine/74259.h"
@ -278,10 +277,11 @@ static GFXDECODE_START( gfx_pitnrun )
GFXDECODE_ENTRY( "gfx1", 0, spritelayout, 0, 4 )
GFXDECODE_END
MACHINE_CONFIG_START(pitnrun_state::pitnrun)
MCFG_DEVICE_ADD("maincpu", Z80,XTAL(18'432'000)/6) /* verified on pcb */
MCFG_DEVICE_PROGRAM_MAP(pitnrun_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", pitnrun_state, nmi_source)
void pitnrun_state::pitnrun(machine_config &config)
{
Z80(config, m_maincpu, XTAL(18'432'000)/6); /* verified on pcb */
m_maincpu->set_addrmap(AS_PROGRAM, &pitnrun_state::pitnrun_map);
m_maincpu->set_vblank_int("screen", FUNC(pitnrun_state::nmi_source));
ls259_device &mainlatch(LS259(config, "mainlatch")); // 7B (mislabeled LS156 on schematic)
mainlatch.q_out_cb<0>().set(FUNC(pitnrun_state::nmi_enable_w)); // NMION
@ -291,27 +291,26 @@ MACHINE_CONFIG_START(pitnrun_state::pitnrun)
mainlatch.q_out_cb<6>().set(FUNC(pitnrun_state::hflip_w)); // HFLIP
mainlatch.q_out_cb<7>().set(FUNC(pitnrun_state::vflip_w)); // VFLIP
MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(5'000'000)/2) /* verified on pcb */
MCFG_DEVICE_PROGRAM_MAP(pitnrun_sound_map)
MCFG_DEVICE_IO_MAP(pitnrun_sound_io_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", pitnrun_state, irq0_line_hold)
z80_device &audiocpu(Z80(config, "audiocpu", XTAL(5'000'000)/2)); /* verified on pcb */
audiocpu.set_addrmap(AS_PROGRAM, &pitnrun_state::pitnrun_sound_map);
audiocpu.set_addrmap(AS_IO, &pitnrun_state::pitnrun_sound_io_map);
audiocpu.set_vblank_int("screen", FUNC(pitnrun_state::irq0_line_hold));
WATCHDOG_TIMER(config, "watchdog");
MCFG_QUANTUM_TIME(attotime::from_hz(6000))
config.m_minimum_quantum = attotime::from_hz(6000);
/* video hardware */
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*8, 32*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(pitnrun_state, screen_update)
MCFG_SCREEN_PALETTE("palette")
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*8, 32*8-1, 2*8, 30*8-1);
screen.set_screen_update(FUNC(pitnrun_state::screen_update));
screen.set_palette(m_palette);
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_pitnrun)
MCFG_PALETTE_ADD("palette", 32*3)
MCFG_PALETTE_INIT_OWNER(pitnrun_state, pitnrun)
GFXDECODE(config, m_gfxdecode, m_palette, gfx_pitnrun);
PALETTE(config, m_palette, 32*3).set_init(FUNC(pitnrun_state::palette_init_pitnrun));
/* sound hardware */
SPEAKER(config, "mono").front_center();
@ -328,21 +327,21 @@ MACHINE_CONFIG_START(pitnrun_state::pitnrun)
ay2.port_b_read_callback().set("soundlatch", FUNC(generic_latch_8_device::read));
ay2.add_route(ALL_OUTPUTS, "mono", 0.50);
MCFG_DEVICE_ADD("noiselatch", LS259, 0) // 1J
MACHINE_CONFIG_END
LS259(config, "noiselatch", 0); // 1J
}
MACHINE_CONFIG_START(pitnrun_state::pitnrun_mcu)
void pitnrun_state::pitnrun_mcu(machine_config &config)
{
pitnrun(config);
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(pitnrun_map_mcu)
m_maincpu->set_addrmap(AS_PROGRAM, &pitnrun_state::pitnrun_map_mcu);
MCFG_DEVICE_ADD("mcu", M68705P5, XTAL(18'432'000)/6) /* verified on pcb */
MCFG_M68705_PORTA_R_CB(READ8(*this, pitnrun_state, m68705_portA_r))
MCFG_M68705_PORTB_R_CB(READ8(*this, pitnrun_state, m68705_portB_r))
MCFG_M68705_PORTC_R_CB(READ8(*this, pitnrun_state, m68705_portC_r))
MCFG_M68705_PORTA_W_CB(WRITE8(*this, pitnrun_state, m68705_portA_w))
MCFG_M68705_PORTB_W_CB(WRITE8(*this, pitnrun_state, m68705_portB_w))
MACHINE_CONFIG_END
M68705P5(config, m_mcu, XTAL(18'432'000)/6); /* verified on pcb */
m_mcu->porta_r().set(FUNC(pitnrun_state::m68705_porta_r));
m_mcu->portb_r().set(FUNC(pitnrun_state::m68705_portb_r));
m_mcu->portc_r().set(FUNC(pitnrun_state::m68705_portc_r));
m_mcu->porta_w().set(FUNC(pitnrun_state::m68705_porta_w));
m_mcu->portb_w().set(FUNC(pitnrun_state::m68705_portb_w));
}
ROM_START( pitnrun )
ROM_REGION( 0x10000, "maincpu", 0 )

View File

@ -276,15 +276,15 @@ void qix_state::kram3_main_map(address_map &map)
void qix_state::zoo_main_map(address_map &map)
void zookeep_state::main_map(address_map &map)
{
map(0x0000, 0x03ff).ram().share("share1");
map(0x0400, 0x07ff).ram();
map(0x0800, 0x0bff).nopr(); /* ACIA */
map(0x0c00, 0x0c00).mirror(0x3fe).rw(FUNC(qix_state::qix_video_firq_r), FUNC(qix_state::qix_video_firq_w));
map(0x0c01, 0x0c01).mirror(0x3fe).rw(FUNC(qix_state::qix_data_firq_ack_r), FUNC(qix_state::qix_data_firq_ack_w));
map(0x0c00, 0x0c00).mirror(0x3fe).rw(FUNC(zookeep_state::qix_video_firq_r), FUNC(zookeep_state::qix_video_firq_w));
map(0x0c01, 0x0c01).mirror(0x3fe).rw(FUNC(zookeep_state::qix_data_firq_ack_r), FUNC(zookeep_state::qix_data_firq_ack_w));
map(0x1000, 0x13ff).rw(m_sndpia0, FUNC(pia6821_device::read), FUNC(pia6821_device::write));
map(0x1400, 0x17ff).r(m_pia0, FUNC(pia6821_device::read)).w(FUNC(qix_state::qix_pia_w));
map(0x1400, 0x17ff).r(m_pia0, FUNC(pia6821_device::read)).w(FUNC(zookeep_state::qix_pia_w));
map(0x1800, 0x1bff).rw(m_pia1, FUNC(pia6821_device::read), FUNC(pia6821_device::write));
map(0x1c00, 0x1fff).rw(m_pia2, FUNC(pia6821_device::read), FUNC(pia6821_device::write));
map(0x8000, 0xffff).rom();
@ -601,15 +601,15 @@ INPUT_PORTS_END
***************************************************************************/
MACHINE_CONFIG_START(qix_state::qix_base)
void qix_state::qix_base(machine_config &config)
{
/* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", MC6809E, MAIN_CLOCK_OSC/4/4) /* 1.25 MHz */
MCFG_DEVICE_PROGRAM_MAP(main_map)
MC6809E(config, m_maincpu, MAIN_CLOCK_OSC/4/4); /* 1.25 MHz */
m_maincpu->set_addrmap(AS_PROGRAM, &qix_state::main_map);
/* high interleave needed to ensure correct text in service mode */
/* Zookeeper settings and high score table seem especially sensitive to this */
MCFG_QUANTUM_PERFECT_CPU("maincpu")
config.m_perfect_cpu_quantum = subtag("maincpu");
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
@ -627,22 +627,23 @@ MACHINE_CONFIG_START(qix_state::qix_base)
/* video hardware */
qix_video(config);
MACHINE_CONFIG_END
}
MACHINE_CONFIG_START(qix_state::qix)
void qix_state::qix(machine_config &config)
{
qix_base(config);
qix_audio(config);
MACHINE_CONFIG_END
}
MACHINE_CONFIG_START(qix_state::kram3)
void qix_state::kram3(machine_config &config)
{
qix(config);
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(kram3_main_map)
MCFG_MC6809E_LIC_CB(WRITELINE(*this, qix_state, kram3_lic_maincpu_changed))
m_maincpu->set_addrmap(AS_PROGRAM, &qix_state::kram3_main_map);
m_maincpu->lic().set(FUNC(qix_state::kram3_lic_maincpu_changed));
kram3_video(config);
MACHINE_CONFIG_END
}
/***************************************************************************
@ -651,37 +652,31 @@ MACHINE_CONFIG_END
***************************************************************************/
MACHINE_CONFIG_START(qix_state::mcu)
void qixmcu_state::mcu(machine_config &config)
{
qix(config);
/* basic machine hardware */
MCFG_DEVICE_ADD("mcu", M68705P3, COIN_CLOCK_OSC) /* 1.00 MHz */
MCFG_M68705_PORTB_R_CB(READ8(*this, qix_state, qix_68705_portB_r))
MCFG_M68705_PORTC_R_CB(READ8(*this, qix_state, qix_68705_portC_r))
MCFG_M68705_PORTA_W_CB(WRITE8(*this, qix_state, qix_68705_portA_w))
MCFG_M68705_PORTB_W_CB(WRITE8(*this, qix_state, qix_68705_portB_w))
M68705P3(config, m_mcu, COIN_CLOCK_OSC); /* 1.00 MHz */
m_mcu->portb_r().set(FUNC(qixmcu_state::mcu_portb_r));
m_mcu->portc_r().set(FUNC(qixmcu_state::mcu_portc_r));
m_mcu->porta_w().set(FUNC(qixmcu_state::mcu_porta_w));
m_mcu->portb_w().set(FUNC(qixmcu_state::mcu_portb_w));
MCFG_MACHINE_START_OVERRIDE(qix_state,qixmcu)
m_pia0->readpb_handler().set(FUNC(qixmcu_state::coin_r));
m_pia0->writepb_handler().set(FUNC(qixmcu_state::coin_w));
m_pia0->readpb_handler().set(FUNC(qix_state::qixmcu_coin_r));
m_pia0->writepb_handler().set(FUNC(qix_state::qixmcu_coin_w));
m_pia2->writepb_handler().set(FUNC(qix_state::qixmcu_coinctrl_w));
MACHINE_CONFIG_END
m_pia2->writepb_handler().set(FUNC(qixmcu_state::coinctrl_w));
}
MACHINE_CONFIG_START(qix_state::zookeep)
void zookeep_state::zookeep(machine_config &config)
{
mcu(config);
/* basic machine hardware */
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(zoo_main_map)
/* video hardware */
zookeep_video(config);
MACHINE_CONFIG_END
m_maincpu->set_addrmap(AS_PROGRAM, &zookeep_state::main_map);
video(config);
}
@ -692,13 +687,13 @@ MACHINE_CONFIG_END
***************************************************************************/
MACHINE_CONFIG_START(qix_state::slither)
void qix_state::slither(machine_config &config)
{
qix_base(config);
/* basic machine hardware */
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_CLOCK(SLITHER_CLOCK_OSC/4/4) /* 1.34 MHz */
m_maincpu->set_clock(SLITHER_CLOCK_OSC/4/4); /* 1.34 MHz */
m_pia1->readpa_handler().set(FUNC(qix_state::slither_trak_lr_r));
m_pia1->writepb_handler().set(FUNC(qix_state::slither_76489_0_w));
@ -713,7 +708,7 @@ MACHINE_CONFIG_START(qix_state::slither)
/* audio hardware */
slither_audio(config);
MACHINE_CONFIG_END
}
@ -1429,43 +1424,27 @@ WRITE_LINE_MEMBER(qix_state::kram3_lic_videocpu_changed)
m_bank1->set_entry( state ? 1 : 0 );
}
void qix_state::init_zookeep()
{
/* configure the banking */
membank("bank1")->configure_entry(0, memregion("videocpu")->base() + 0xa000);
membank("bank1")->configure_entry(1, memregion("videocpu")->base() + 0x10000);
membank("bank1")->set_entry(0);
}
void qix_state::init_slither()
{
}
/*************************************
*
* Game drivers
*
*************************************/
GAME( 1981, qix, 0, qix, qix, qix_state, empty_init, ROT270, "Taito America Corporation", "Qix (Rev 2)", MACHINE_SUPPORTS_SAVE ) // newest set? closest to 'qix2'
GAME( 1981, qixa, qix, qix, qix, qix_state, empty_init, ROT270, "Taito America Corporation", "Qix (set 2, smaller roms)", MACHINE_SUPPORTS_SAVE )
GAME( 1981, qixb, qix, qix, qix, qix_state, empty_init, ROT270, "Taito America Corporation", "Qix (set 2, larger roms)", MACHINE_SUPPORTS_SAVE )
GAME( 1981, qixo, qix, qix, qix, qix_state, empty_init, ROT270, "Taito America Corporation", "Qix (set 3, earlier)", MACHINE_SUPPORTS_SAVE ) // oldest set / prototype? has incorrect spelling 'deutch' and doesn't allow language selection to be changed
GAME( 1981, qix2, qix, qix, qix, qix_state, empty_init, ROT270, "Taito America Corporation", "Qix II (Tournament)", MACHINE_SUPPORTS_SAVE )
GAME( 1981, sdungeon, 0, mcu, sdungeon, qix_state, empty_init, ROT270, "Taito America Corporation", "Space Dungeon", MACHINE_SUPPORTS_SAVE ) // actually released July 1982
GAME( 1981, sdungeona, sdungeon, mcu, sdungeon, qix_state, empty_init, ROT270, "Taito America Corporation", "Space Dungeon (larger roms)", MACHINE_SUPPORTS_SAVE ) // same as above but uses larger ROMs
GAMEL(1982, elecyoyo, 0, mcu, elecyoyo, qix_state, empty_init, ROT270, "Taito America Corporation", "The Electric Yo-Yo (set 1)", MACHINE_SUPPORTS_SAVE, layout_elecyoyo )
GAMEL(1982, elecyoyo2, elecyoyo, mcu, elecyoyo, qix_state, empty_init, ROT270, "Taito America Corporation", "The Electric Yo-Yo (set 2)", MACHINE_SUPPORTS_SAVE, layout_elecyoyo )
GAME( 1982, kram, 0, mcu, kram, qix_state, empty_init, ROT0, "Taito America Corporation", "Kram (set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, kram2, kram, mcu, kram, qix_state, empty_init, ROT0, "Taito America Corporation", "Kram (set 2)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, kram3, kram, kram3, kram, qix_state, init_kram3, ROT0, "Taito America Corporation", "Kram (encrypted)", MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE )
GAME( 1982, zookeep, 0, zookeep, zookeep, qix_state, init_zookeep, ROT0, "Taito America Corporation", "Zoo Keeper (set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, zookeep2, zookeep, zookeep, zookeep, qix_state, init_zookeep, ROT0, "Taito America Corporation", "Zoo Keeper (set 2)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, zookeep3, zookeep, zookeep, zookeep, qix_state, init_zookeep, ROT0, "Taito America Corporation", "Zoo Keeper (set 3)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, slither, 0, slither, slither, qix_state, init_slither, ROT270, "Century II", "Slither (set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, slithera, slither, slither, slither, qix_state, init_slither, ROT270, "Century II", "Slither (set 2)", MACHINE_SUPPORTS_SAVE )
GAME( 1984, complexx, 0, qix, complexx, qix_state, empty_init, ROT270, "Taito America Corporation", "Complex X", MACHINE_SUPPORTS_SAVE )
GAME( 1981, qix, 0, qix, qix, qix_state, empty_init, ROT270, "Taito America Corporation", "Qix (Rev 2)", MACHINE_SUPPORTS_SAVE ) // newest set? closest to 'qix2'
GAME( 1981, qixa, qix, qix, qix, qix_state, empty_init, ROT270, "Taito America Corporation", "Qix (set 2, smaller roms)", MACHINE_SUPPORTS_SAVE )
GAME( 1981, qixb, qix, qix, qix, qix_state, empty_init, ROT270, "Taito America Corporation", "Qix (set 2, larger roms)", MACHINE_SUPPORTS_SAVE )
GAME( 1981, qixo, qix, qix, qix, qix_state, empty_init, ROT270, "Taito America Corporation", "Qix (set 3, earlier)", MACHINE_SUPPORTS_SAVE ) // oldest set / prototype? has incorrect spelling 'deutch' and doesn't allow language selection to be changed
GAME( 1981, qix2, qix, qix, qix, qix_state, empty_init, ROT270, "Taito America Corporation", "Qix II (Tournament)", MACHINE_SUPPORTS_SAVE )
GAME( 1981, sdungeon, 0, mcu, sdungeon, qixmcu_state, empty_init, ROT270, "Taito America Corporation", "Space Dungeon", MACHINE_SUPPORTS_SAVE ) // actually released July 1982
GAME( 1981, sdungeona, sdungeon, mcu, sdungeon, qixmcu_state, empty_init, ROT270, "Taito America Corporation", "Space Dungeon (larger roms)", MACHINE_SUPPORTS_SAVE ) // same as above but uses larger ROMs
GAMEL(1982, elecyoyo, 0, mcu, elecyoyo, qixmcu_state, empty_init, ROT270, "Taito America Corporation", "The Electric Yo-Yo (set 1)", MACHINE_SUPPORTS_SAVE, layout_elecyoyo )
GAMEL(1982, elecyoyo2, elecyoyo, mcu, elecyoyo, qixmcu_state, empty_init, ROT270, "Taito America Corporation", "The Electric Yo-Yo (set 2)", MACHINE_SUPPORTS_SAVE, layout_elecyoyo )
GAME( 1982, kram, 0, mcu, kram, qixmcu_state, empty_init, ROT0, "Taito America Corporation", "Kram (set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, kram2, kram, mcu, kram, qixmcu_state, empty_init, ROT0, "Taito America Corporation", "Kram (set 2)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, kram3, kram, kram3, kram, qix_state, init_kram3, ROT0, "Taito America Corporation", "Kram (encrypted)", MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE )
GAME( 1982, zookeep, 0, zookeep, zookeep, zookeep_state, empty_init, ROT0, "Taito America Corporation", "Zoo Keeper (set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, zookeep2, zookeep, zookeep, zookeep, zookeep_state, empty_init, ROT0, "Taito America Corporation", "Zoo Keeper (set 2)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, zookeep3, zookeep, zookeep, zookeep, zookeep_state, empty_init, ROT0, "Taito America Corporation", "Zoo Keeper (set 3)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, slither, 0, slither, slither, qix_state, empty_init, ROT270, "Century II", "Slither (set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, slithera, slither, slither, slither, qix_state, empty_init, ROT270, "Century II", "Slither (set 2)", MACHINE_SUPPORTS_SAVE )
GAME( 1984, complexx, 0, qix, complexx, qix_state, empty_init, ROT270, "Taito America Corporation", "Complex X", MACHINE_SUPPORTS_SAVE )

View File

@ -112,6 +112,7 @@ public:
m_bg_ram(*this, "bg_ram")
{ }
void quizpun2_base(machine_config &config);
void quizpun(machine_config &config);
void quizpun2(machine_config &config);
@ -573,67 +574,72 @@ GFXDECODE_END
Machine Drivers
***************************************************************************/
MACHINE_CONFIG_START(quizpun2_state::quizpun2)
void quizpun2_state::quizpun2_base(machine_config &config)
{
/* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", Z80, XTAL(8'000'000) / 2) // 4 MHz
MCFG_DEVICE_PROGRAM_MAP(quizpun2_map)
MCFG_DEVICE_IO_MAP(quizpun2_io_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", quizpun2_state, irq0_line_hold)
Z80(config, m_maincpu, XTAL(8'000'000) / 2); // 4 MHz
m_maincpu->set_addrmap(AS_PROGRAM, &quizpun2_state::quizpun2_map);
m_maincpu->set_addrmap(AS_IO, &quizpun2_state::quizpun2_io_map);
m_maincpu->set_vblank_int("screen", FUNC(quizpun2_state::irq0_line_hold));
MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(8'000'000) / 2) // 4 MHz
MCFG_DEVICE_PROGRAM_MAP(quizpun2_sound_map)
MCFG_DEVICE_IO_MAP(quizpun2_sound_io_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", quizpun2_state, irq0_line_hold)
Z80(config, m_audiocpu, XTAL(8'000'000) / 2); // 4 MHz
m_audiocpu->set_addrmap(AS_PROGRAM, &quizpun2_state::quizpun2_sound_map);
m_audiocpu->set_addrmap(AS_IO, &quizpun2_state::quizpun2_sound_io_map);
m_audiocpu->set_vblank_int("screen", FUNC(quizpun2_state::irq0_line_hold));
// NMI generated by main CPU
MCFG_DEVICE_ADD("cop", COP402, XTAL(8'000'000) / 2)
MCFG_DEVICE_PROGRAM_MAP(quizpun2_cop_map)
MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false)
MCFG_COP400_WRITE_D_CB(WRITE8(*this, quizpun2_state, cop_d_w))
MCFG_COP400_WRITE_G_CB(WRITE8(*this, quizpun2_state, cop_g_w))
MCFG_COP400_READ_L_CB(READ8(*this, quizpun2_state, cop_l_r))
MCFG_COP400_WRITE_L_CB(WRITE8(*this, quizpun2_state, cop_l_w))
MCFG_COP400_READ_IN_CB(READ8(*this, quizpun2_state, cop_in_r))
MCFG_COP400_READ_SI_CB(READLINE("eeprom", eeprom_serial_93cxx_device, do_read))
MCFG_COP400_WRITE_SO_CB(WRITELINE("eeprom", eeprom_serial_93cxx_device, di_write))
MCFG_COP400_WRITE_SK_CB(WRITELINE("eeprom", eeprom_serial_93cxx_device, clk_write))
EEPROM_93C46_16BIT(config, "eeprom");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
MCFG_SCREEN_SIZE(384, 256)
MCFG_SCREEN_VISIBLE_AREA(0, 384-1, 0, 256-1)
MCFG_SCREEN_UPDATE_DRIVER(quizpun2_state, screen_update_quizpun2)
MCFG_SCREEN_PALETTE("palette")
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(384, 256);
screen.set_visarea(0, 384-1, 0, 256-1);
screen.set_screen_update(FUNC(quizpun2_state::screen_update_quizpun2));
screen.set_palette(m_palette);
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_quizpun2)
MCFG_PALETTE_ADD("palette", 0x200)
MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB)
GFXDECODE(config, m_gfxdecode, m_palette, gfx_quizpun2);
PALETTE(config, m_palette, 0x200).set_format(PALETTE_FORMAT_xRRRRRGGGGGBBBBB);
/* sound hardware */
SPEAKER(config, "mono").front_center();
GENERIC_LATCH_8(config, m_soundlatch);
MCFG_DEVICE_ADD("ymsnd", YM2203, XTAL(8'000'000) / 2) // 4 MHz
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL(8'000'000) / 2)); // 4 MHz
ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0);
}
MACHINE_CONFIG_START(quizpun2_state::quizpun)
quizpun2(config);
MCFG_DEVICE_REMOVE("cop")
void quizpun2_state::quizpun2(machine_config &config)
{
quizpun2_base(config);
MCFG_DEVICE_ADD("mcu", M68705P5, XTAL(4'000'000)) // xtal is 4MHz, divided by 4 internally
MCFG_M68705_PORTA_R_CB(READ8(*this, quizpun2_state, quizpun_68705_port_a_r))
MCFG_M68705_PORTB_R_CB(READ8(*this, quizpun2_state, quizpun_68705_port_b_r))
MCFG_M68705_PORTC_R_CB(READ8(*this, quizpun2_state, quizpun_68705_port_c_r))
MCFG_M68705_PORTA_W_CB(WRITE8(*this, quizpun2_state, quizpun_68705_port_a_w))
MCFG_M68705_PORTB_W_CB(WRITE8(*this, quizpun2_state, quizpun_68705_port_b_w))
MCFG_M68705_PORTC_W_CB(WRITE8(*this, quizpun2_state, quizpun_68705_port_c_w))
MACHINE_CONFIG_END
cop402_cpu_device &cop(COP402(config, "cop", XTAL(8'000'000) / 2));
cop.set_addrmap(AS_PROGRAM, &quizpun2_state::quizpun2_cop_map);
cop.set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false);
cop.write_d().set(FUNC(quizpun2_state::cop_d_w));
cop.write_g().set(FUNC(quizpun2_state::cop_g_w));
cop.read_l().set(FUNC(quizpun2_state::cop_l_r));
cop.write_l().set(FUNC(quizpun2_state::cop_l_w));
cop.read_in().set(FUNC(quizpun2_state::cop_in_r));
cop.read_si().set("eeprom", FUNC(eeprom_serial_93cxx_device::do_read));
cop.write_so().set("eeprom", FUNC(eeprom_serial_93cxx_device::di_write));
cop.write_sk().set("eeprom", FUNC(eeprom_serial_93cxx_device::clk_write));
}
void quizpun2_state::quizpun(machine_config &config)
{
quizpun2_base(config);
m68705p5_device &mcu(M68705P5(config, "mcu", XTAL(4'000'000))); // xtal is 4MHz, divided by 4 internally
mcu.porta_r().set(FUNC(quizpun2_state::quizpun_68705_port_a_r));
mcu.portb_r().set(FUNC(quizpun2_state::quizpun_68705_port_b_r));
mcu.portc_r().set(FUNC(quizpun2_state::quizpun_68705_port_c_r));
mcu.porta_w().set(FUNC(quizpun2_state::quizpun_68705_port_a_w));
mcu.portb_w().set(FUNC(quizpun2_state::quizpun_68705_port_b_w));
mcu.portc_w().set(FUNC(quizpun2_state::quizpun_68705_port_c_w));
}
/***************************************************************************
ROMs Loading

View File

@ -259,7 +259,6 @@ TODO:
#include "emu.h"
#include "includes/stfight.h"
#include "cpu/m6805/m68705.h"
#include "cpu/z80/z80.h"
#include "sound/2203intf.h"
@ -453,69 +452,67 @@ INPUT_PORTS_END
MACHINE_CONFIG_START(stfight_state::stfight_base)
void stfight_state::stfight_base(machine_config &config)
{
/* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", Z80, XTAL(12'000'000) / 4)
MCFG_DEVICE_PROGRAM_MAP(cpu1_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("stfight_vid:screen", stfight_state, stfight_vb_interrupt)
Z80(config, m_maincpu, XTAL(12'000'000) / 4);
m_maincpu->set_addrmap(AS_PROGRAM, &stfight_state::cpu1_map);
m_maincpu->set_vblank_int("stfight_vid:screen", FUNC(stfight_state::stfight_vb_interrupt));
MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(12'000'000) / 4)
MCFG_DEVICE_PROGRAM_MAP(cpu2_map)
MCFG_DEVICE_PERIODIC_INT_DRIVER(stfight_state, irq0_line_hold, 120)
Z80(config, m_audiocpu, XTAL(12'000'000) / 4);
m_audiocpu->set_addrmap(AS_PROGRAM, &stfight_state::cpu2_map);
m_audiocpu->set_periodic_int(FUNC(stfight_state::irq0_line_hold), attotime::from_hz(120));
MCFG_DEVICE_ADD("mcu", M68705P5, XTAL(12'000'000) / 4)
MCFG_M68705_PORTB_R_CB(READ8(*this, stfight_state, stfight_68705_port_b_r));
MCFG_M68705_PORTA_W_CB(WRITE8(*this, stfight_state, stfight_68705_port_a_w));
MCFG_M68705_PORTB_W_CB(WRITE8(*this, stfight_state, stfight_68705_port_b_w));
MCFG_M68705_PORTC_W_CB(WRITE8(*this, stfight_state, stfight_68705_port_c_w));
M68705P5(config, m_mcu, XTAL(12'000'000) / 4);
m_mcu->portb_r().set(FUNC(stfight_state::stfight_68705_port_b_r));
m_mcu->porta_w().set(FUNC(stfight_state::stfight_68705_port_a_w));
m_mcu->portb_w().set(FUNC(stfight_state::stfight_68705_port_b_w));
m_mcu->portc_w().set(FUNC(stfight_state::stfight_68705_port_c_w));
MCFG_QUANTUM_TIME(attotime::from_hz(600))
config.m_minimum_quantum = attotime::from_hz(600);
MCFG_PALETTE_ADD("palette", 256)
MCFG_PALETTE_FORMAT(xxxxBBBBRRRRGGGG)
PALETTE(config, "palette", 256).set_format(PALETTE_FORMAT_xxxxBBBBRRRRGGGG);
/* sound hardware */
SPEAKER(config, "mono").front_center();
// YM2203_PITCH_HACK - These should be clocked at 1.5Mhz (see TODO list)
MCFG_DEVICE_ADD("ym1", YM2203, XTAL(12'000'000) / 8 * 3)
MCFG_SOUND_ROUTE(0, "mono", 0.15)
MCFG_SOUND_ROUTE(1, "mono", 0.15)
MCFG_SOUND_ROUTE(2, "mono", 0.15)
MCFG_SOUND_ROUTE(3, "mono", 0.10)
ym2203_device &ym1(YM2203(config, "ym1", XTAL(12'000'000) / 8 * 3));
ym1.add_route(0, "mono", 0.15);
ym1.add_route(1, "mono", 0.15);
ym1.add_route(2, "mono", 0.15);
ym1.add_route(3, "mono", 0.10);
MCFG_DEVICE_ADD("ym2", YM2203, XTAL(12'000'000) / 8 * 3)
MCFG_SOUND_ROUTE(0, "mono", 0.15)
MCFG_SOUND_ROUTE(1, "mono", 0.15)
MCFG_SOUND_ROUTE(2, "mono", 0.15)
MCFG_SOUND_ROUTE(3, "mono", 0.10)
ym2203_device &ym2(YM2203(config, "ym2", XTAL(12'000'000) / 8 * 3));
ym2.add_route(0, "mono", 0.15);
ym2.add_route(1, "mono", 0.15);
ym2.add_route(2, "mono", 0.15);
ym2.add_route(3, "mono", 0.10);
MCFG_DEVICE_ADD("msm", MSM5205, XTAL(384'000))
MCFG_MSM5205_VCLK_CB(WRITELINE(*this, stfight_state, stfight_adpcm_int)) // Interrupt function
MCFG_MSM5205_PRESCALER_SELECTOR(S48_4B) // 8KHz, 4-bit
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
MSM5205(config, m_msm, XTAL(384'000));
m_msm->vck_callback().set(FUNC(stfight_state::stfight_adpcm_int)); // Interrupt function
m_msm->set_prescaler_selector(msm5205_device::S48_4B); // 8KHz, 4-bit
m_msm->add_route(ALL_OUTPUTS, "mono", 0.50);
}
MACHINE_CONFIG_START(stfight_state::stfight)
void stfight_state::stfight(machine_config &config)
{
stfight_base(config);
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(stfight_cpu1_map)
MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("stfight_vid:screen", stfight_state, stfight_vb_interrupt)
m_maincpu->set_addrmap(AS_PROGRAM, &stfight_state::stfight_cpu1_map);
m_maincpu->set_addrmap(AS_OPCODES, &stfight_state::decrypted_opcodes_map);
m_maincpu->set_vblank_int("stfight_vid:screen", FUNC(stfight_state::stfight_vb_interrupt));
MCFG_DEVICE_ADD("stfight_vid", STFIGHT_VIDEO, 0)
MACHINE_CONFIG_END
STFIGHT_VIDEO(config, "stfight_vid", 0);
}
MACHINE_CONFIG_START(stfight_state::cshooter)
void stfight_state::cshooter(machine_config &config)
{
stfight_base(config);
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(cshooter_cpu1_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("airraid_vid:screen", stfight_state, stfight_vb_interrupt)
m_maincpu->set_addrmap(AS_PROGRAM, &stfight_state::cshooter_cpu1_map);
m_maincpu->set_vblank_int("airraid_vid:screen", FUNC(stfight_state::stfight_vb_interrupt));
AIRRAID_VIDEO(config, "airraid_vid", 0);
MACHINE_CONFIG_END
}
/***************************************************************************

View File

@ -1356,9 +1356,9 @@ void hotsmash_state::pbillian(machine_config &config)
m_maincpu->set_addrmap(AS_IO, &hotsmash_state::pbillian_port_map);
m68705p5_device &mcu(M68705P5(config, m_mcu, XTAL(12'000'000)/4)); /* 3mhz???? */
mcu.porta_r_cb().set(FUNC(hotsmash_state::hotsmash_68705_porta_r));
mcu.portb_w_cb().set(FUNC(hotsmash_state::hotsmash_68705_portb_w));
mcu.portc_w_cb().set(FUNC(hotsmash_state::hotsmash_68705_portc_w));
mcu.porta_r().set(FUNC(hotsmash_state::hotsmash_68705_porta_r));
mcu.portb_w().set(FUNC(hotsmash_state::hotsmash_68705_portb_w));
mcu.portc_w().set(FUNC(hotsmash_state::hotsmash_68705_portc_w));
/* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));

View File

@ -648,37 +648,36 @@ static GFXDECODE_START( gfx_tigeroad )
GFXDECODE_ENTRY( "sprites", 0, sprite_layout, 0x200, 16 )
GFXDECODE_END
MACHINE_CONFIG_START(tigeroad_state::tigeroad)
void tigeroad_state::tigeroad(machine_config &config)
{
/* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", M68000, XTAL(10'000'000)) /* verified on pcb */
MCFG_DEVICE_PROGRAM_MAP(main_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", tigeroad_state, irq2_line_hold)
M68000(config, m_maincpu, XTAL(10'000'000)); /* verified on pcb */
m_maincpu->set_addrmap(AS_PROGRAM, &tigeroad_state::main_map);
m_maincpu->set_vblank_int("screen", FUNC(tigeroad_state::irq2_line_hold));
MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(3'579'545)) /* verified on pcb */
MCFG_DEVICE_PROGRAM_MAP(sound_map)
MCFG_DEVICE_IO_MAP(sound_port_map)
Z80(config, m_audiocpu, XTAL(3'579'545)); /* verified on pcb */
m_audiocpu->set_addrmap(AS_PROGRAM, &tigeroad_state::sound_map);
m_audiocpu->set_addrmap(AS_IO, &tigeroad_state::sound_port_map);
/* IRQs are triggered by the YM2203 */
/* video hardware */
MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM16)
BUFFERED_SPRITERAM16(config, "spriteram");
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60.08) /* verified on pcb */
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
MCFG_SCREEN_SIZE(32*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(tigeroad_state, screen_update_tigeroad)
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE("spriteram", buffered_spriteram16_device, vblank_copy_rising))
MCFG_SCREEN_PALETTE("palette")
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_refresh_hz(60.08); /* verified on pcb */
screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
screen.set_size(32*8, 32*8);
screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
screen.set_screen_update(FUNC(tigeroad_state::screen_update_tigeroad));
screen.screen_vblank().set("spriteram", FUNC(buffered_spriteram16_device::vblank_copy_rising));
screen.set_palette(m_palette);
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_tigeroad)
GFXDECODE(config, m_gfxdecode, m_palette, gfx_tigeroad);
MCFG_DEVICE_ADD("spritegen", TIGEROAD_SPRITE, 0)
TIGEROAD_SPRITE(config, m_spritegen, 0);
MCFG_PALETTE_ADD("palette", 1024)
MCFG_PALETTE_FORMAT(xxxxRRRRGGGGBBBB)
PALETTE(config, m_palette, 1024).set_format(PALETTE_FORMAT_xxxxRRRRGGGGBBBB);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@ -686,90 +685,88 @@ MACHINE_CONFIG_START(tigeroad_state::tigeroad)
GENERIC_LATCH_8(config, m_soundlatch);
GENERIC_LATCH_8(config, "soundlatch2");
MCFG_DEVICE_ADD("ym1", YM2203, XTAL(3'579'545)) /* verified on pcb */
MCFG_YM2203_IRQ_HANDLER(INPUTLINE("audiocpu", 0))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
ym2203_device &ym1(YM2203(config, "ym1", XTAL(3'579'545))); /* verified on pcb */
ym1.irq_handler().set_inputline("audiocpu", 0);
ym1.add_route(ALL_OUTPUTS, "mono", 0.25);
MCFG_DEVICE_ADD("ym2", YM2203, XTAL(3'579'545)) /* verified on pcb */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
ym2203_device &ym2(YM2203(config, "ym2", XTAL(3'579'545))); /* verified on pcb */
ym2.add_route(ALL_OUTPUTS, "mono", 0.25);
}
MACHINE_CONFIG_START(f1dream_state::f1dream)
void f1dream_state::f1dream(machine_config &config)
{
tigeroad(config);
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(f1dream_map)
m_maincpu->set_addrmap(AS_PROGRAM, &f1dream_state::f1dream_map);
I8751(config, m_mcu, XTAL(10'000'000)); /* ??? */
m_mcu->set_addrmap(AS_IO, &f1dream_state::f1dream_mcu_io);
m_mcu->port_out_cb<1>().set(FUNC(f1dream_state::out1_w));
m_mcu->port_out_cb<3>().set(FUNC(f1dream_state::out3_w));
MACHINE_CONFIG_END
}
/* same as above but with additional Z80 for samples playback */
MACHINE_CONFIG_START(tigeroad_state::toramich)
void tigeroad_state::toramich(machine_config &config)
{
tigeroad(config);
/* basic machine hardware */
MCFG_DEVICE_ADD("sample", Z80, 3579545) /* ? */
MCFG_DEVICE_PROGRAM_MAP(sample_map)
MCFG_DEVICE_IO_MAP(sample_port_map)
MCFG_DEVICE_PERIODIC_INT_DRIVER(tigeroad_state, irq0_line_hold, 4000) /* ? */
z80_device &sample(Z80(config, "sample", 3579545)); /* ? */
sample.set_addrmap(AS_PROGRAM, &tigeroad_state::sample_map);
sample.set_addrmap(AS_IO, &tigeroad_state::sample_port_map);
sample.set_periodic_int(FUNC(tigeroad_state::irq0_line_hold), attotime::from_hz(4000)); /* ? */
/* sound hardware */
MCFG_DEVICE_ADD("msm", MSM5205, 384000)
MCFG_MSM5205_PRESCALER_SELECTOR(SEX_4B) /* 4KHz playback ? */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
MACHINE_CONFIG_START(tigeroad_state::f1dream_comad)
MSM5205(config, m_msm, 384000);
m_msm->set_prescaler_selector(msm5205_device::SEX_4B); /* 4KHz playback ? */
m_msm->add_route(ALL_OUTPUTS, "mono", 1.0);
}
void tigeroad_state::f1dream_comad(machine_config &config)
{
/* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", M68000, 8000000)
MCFG_DEVICE_PROGRAM_MAP(main_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", tigeroad_state, irq2_line_hold)
M68000(config, m_maincpu, 8000000);
m_maincpu->set_addrmap(AS_PROGRAM, &tigeroad_state::main_map);
m_maincpu->set_vblank_int("screen", FUNC(tigeroad_state::irq2_line_hold));
MCFG_DEVICE_ADD("audiocpu", Z80, 4000000)
MCFG_DEVICE_PROGRAM_MAP(comad_sound_map)
MCFG_DEVICE_IO_MAP(comad_sound_io_map)
Z80(config, m_audiocpu, 4000000);
m_audiocpu->set_addrmap(AS_PROGRAM, &tigeroad_state::comad_sound_map);
m_audiocpu->set_addrmap(AS_IO, &tigeroad_state::comad_sound_io_map);
MCFG_QUANTUM_TIME(attotime::from_hz(3600))
config.m_minimum_quantum = attotime::from_hz(3600);
/* video hardware */
MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM16)
BUFFERED_SPRITERAM16(config, "spriteram");
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60.08) /* verified on pcb */
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
MCFG_SCREEN_SIZE(32*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(tigeroad_state, screen_update_tigeroad)
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE("spriteram", buffered_spriteram16_device, vblank_copy_rising))
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_refresh_hz(60.08); /* verified on pcb */
screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
screen.set_size(32*8, 32*8);
screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
screen.set_screen_update(FUNC(tigeroad_state::screen_update_tigeroad));
screen.screen_vblank().set("spriteram", FUNC(buffered_spriteram16_device::vblank_copy_rising));
screen.set_palette(m_palette);
MCFG_SCREEN_PALETTE("palette")
GFXDECODE(config, m_gfxdecode, m_palette, gfx_tigeroad);
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_tigeroad)
TIGEROAD_SPRITE(config, m_spritegen, 0);
MCFG_DEVICE_ADD("spritegen", TIGEROAD_SPRITE, 0)
MCFG_PALETTE_ADD("palette", 1024)
MCFG_PALETTE_FORMAT(xxxxRRRRGGGGBBBB)
PALETTE(config, m_palette, 1024).set_format(PALETTE_FORMAT_xxxxRRRRGGGGBBBB);
/* sound hardware */
SPEAKER(config, "mono").front_center();
GENERIC_LATCH_8(config, m_soundlatch);
MCFG_DEVICE_ADD("ym1", YM2203, 2000000)
MCFG_YM2203_IRQ_HANDLER(INPUTLINE("audiocpu", 0))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
ym2203_device &ym1(YM2203(config, "ym1", 2000000));
ym1.irq_handler().set_inputline("audiocpu", 0);
ym1.add_route(ALL_OUTPUTS, "mono", 0.40);
MCFG_DEVICE_ADD("ym2", YM2203, 2000000)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MACHINE_CONFIG_END
ym2203_device &ym2(YM2203(config, "ym2", 2000000));
ym2.add_route(ALL_OUTPUTS, "mono", 0.40);
}
void pushman_state::machine_start()
@ -782,23 +779,22 @@ void pushman_state::machine_start()
save_item(NAME(m_mcu_latch_ctl));
}
MACHINE_CONFIG_START(pushman_state::pushman)
void pushman_state::pushman(machine_config &config)
{
f1dream_comad(config);
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(pushman_map)
m_maincpu->set_addrmap(AS_PROGRAM, &pushman_state::pushman_map);
MCFG_DEVICE_ADD("mcu", M68705R3, 4000000) /* No idea */
MCFG_M68705_PORTA_W_CB(WRITE8(*this, pushman_state, mcu_pa_w))
MCFG_M68705_PORTB_W_CB(WRITE8(*this, pushman_state, mcu_pb_w))
MCFG_M68705_PORTC_W_CB(WRITE8(*this, pushman_state, mcu_pc_w))
MACHINE_CONFIG_END
M68705R3(config, m_mcu, 4000000); /* No idea */
m_mcu->porta_w().set(FUNC(pushman_state::mcu_pa_w));
m_mcu->portb_w().set(FUNC(pushman_state::mcu_pb_w));
m_mcu->portc_w().set(FUNC(pushman_state::mcu_pc_w));
}
MACHINE_CONFIG_START(pushman_state::bballs)
void pushman_state::bballs(machine_config &config)
{
pushman(config);
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(bballs_map)
MACHINE_CONFIG_END
m_maincpu->set_addrmap(AS_PROGRAM, &pushman_state::bballs_map);
}

View File

@ -5,7 +5,7 @@
#include "sound/2203intf.h"
#include "emupal.h"
#include "screen.h"
class mexico86_state : public driver_device
{
@ -20,7 +20,8 @@ public:
m_mcu(*this, "mcu"),
m_ymsnd(*this, "ymsnd"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette")
m_palette(*this, "palette"),
m_screen(*this, "screen")
{
}
@ -56,6 +57,7 @@ private:
required_device<ym2203_device> m_ymsnd;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
required_device<screen_device> m_screen;
/* queue */
u8 m_queue[64];

View File

@ -5,6 +5,7 @@
#pragma once
#include "cpu/m6805/m68705.h"
#include "emupal.h"
class pitnrun_state : public driver_device
@ -31,7 +32,7 @@ protected:
private:
required_device<cpu_device> m_maincpu;
optional_device<cpu_device> m_mcu;
optional_device<m68705p5_device> m_mcu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
@ -44,8 +45,8 @@ private:
uint8_t m_toz80;
int m_zaccept;
int m_zready;
uint8_t m_portA_in;
uint8_t m_portA_out;
uint8_t m_porta_in;
uint8_t m_porta_out;
int m_address;
int m_h_heed;
int m_v_heed;
@ -63,11 +64,11 @@ private:
DECLARE_READ8_MEMBER(mcu_data_r);
DECLARE_WRITE8_MEMBER(mcu_data_w);
DECLARE_READ8_MEMBER(mcu_status_r);
DECLARE_READ8_MEMBER(m68705_portA_r);
DECLARE_WRITE8_MEMBER(m68705_portA_w);
DECLARE_READ8_MEMBER(m68705_portB_r);
DECLARE_WRITE8_MEMBER(m68705_portB_w);
DECLARE_READ8_MEMBER(m68705_portC_r);
DECLARE_READ8_MEMBER(m68705_porta_r);
DECLARE_WRITE8_MEMBER(m68705_porta_w);
DECLARE_READ8_MEMBER(m68705_portb_r);
DECLARE_WRITE8_MEMBER(m68705_portb_w);
DECLARE_READ8_MEMBER(m68705_portc_r);
DECLARE_WRITE8_MEMBER(videoram_w);
DECLARE_WRITE8_MEMBER(videoram2_w);
DECLARE_WRITE_LINE_MEMBER(char_bank_select_w);

View File

@ -30,7 +30,6 @@
#define COIN_CLOCK_OSC 4000000 /* 4 MHz */
#define QIX_CHARACTER_CLOCK (20000000/2/16)
class qix_state : public driver_device
{
public:
@ -39,7 +38,6 @@ public:
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_videocpu(*this, "videocpu"),
m_mcu(*this, "mcu"),
m_crtc(*this, "vid_u18"),
m_pia0(*this, "pia0"),
m_pia1(*this, "pia1"),
@ -47,8 +45,8 @@ public:
m_sndpia0(*this, "sndpia0"),
m_sndpia1(*this, "sndpia1"),
m_sndpia2(*this, "sndpia2"),
m_sn1 (*this, "sn1"),
m_sn2 (*this, "sn2"),
m_sn1(*this, "sn1"),
m_sn2(*this, "sn2"),
m_discrete(*this, "discrete"),
m_paletteram(*this, "paletteram"),
m_videoram(*this, "videoram"),
@ -60,29 +58,25 @@ public:
m_screen(*this, "screen")
{ }
void mcu(machine_config &config);
void qix_base(machine_config &config);
void qix(machine_config &config);
void qix_video(machine_config &config);
void qix_audio(machine_config &config);
void zookeep(machine_config &config);
void zookeep_video(machine_config &config);
void kram3(machine_config &config);
void kram3_video(machine_config &config);
void slither(machine_config &config);
void slither_video(machine_config &config);
void slither_audio(machine_config &config);
void init_slither();
void init_zookeep();
void init_kram3();
private:
protected:
virtual void video_start() override;
/* devices */
required_device<m6809_base_device> m_maincpu;
required_device<mc6809e_device> m_maincpu;
optional_device<cpu_device> m_audiocpu;
required_device<m6809_base_device> m_videocpu;
optional_device<m68705p_device> m_mcu;
required_device<mc6809e_device> m_videocpu;
required_device<mc6845_device> m_crtc;
required_device<pia6821_device> m_pia0;
required_device<pia6821_device> m_pia1;
@ -92,11 +86,7 @@ private:
optional_device<pia6821_device> m_sndpia2;
optional_device<sn76489_device> m_sn1;
optional_device<sn76489_device> m_sn2;
optional_device<discrete_device> m_discrete;
/* machine state */
uint8_t m_68705_portA_out;
uint8_t m_coinctrl;
optional_device<discrete_sound_device> m_discrete;
/* video state */
required_shared_ptr<uint8_t> m_paletteram;
@ -113,7 +103,6 @@ private:
required_device<screen_device> m_screen;
pen_t m_pens[0x400];
DECLARE_WRITE8_MEMBER(zookeep_bankswitch_w);
DECLARE_WRITE8_MEMBER(qix_data_firq_w);
DECLARE_WRITE8_MEMBER(qix_data_firq_ack_w);
DECLARE_READ8_MEMBER(qix_data_firq_r);
@ -122,10 +111,6 @@ private:
DECLARE_WRITE8_MEMBER(qix_video_firq_ack_w);
DECLARE_READ8_MEMBER(qix_video_firq_r);
DECLARE_READ8_MEMBER(qix_video_firq_ack_r);
DECLARE_READ8_MEMBER(qix_68705_portB_r);
DECLARE_READ8_MEMBER(qix_68705_portC_r);
DECLARE_WRITE8_MEMBER(qix_68705_portA_w);
DECLARE_WRITE8_MEMBER(qix_68705_portB_w);
DECLARE_READ8_MEMBER(qix_videoram_r);
DECLARE_WRITE8_MEMBER(qix_videoram_w);
DECLARE_WRITE8_MEMBER(slither_videoram_w);
@ -135,15 +120,9 @@ private:
DECLARE_WRITE8_MEMBER(qix_paletteram_w);
DECLARE_WRITE8_MEMBER(qix_palettebank_w);
virtual void machine_reset() override;
DECLARE_MACHINE_START(qixmcu);
DECLARE_VIDEO_START(qix);
TIMER_CALLBACK_MEMBER(pia_w_callback);
TIMER_CALLBACK_MEMBER(deferred_sndpia1_porta_w);
DECLARE_WRITE_LINE_MEMBER(qix_vsync_changed);
DECLARE_READ8_MEMBER(qixmcu_coin_r);
DECLARE_WRITE8_MEMBER(qixmcu_coin_w);
DECLARE_WRITE8_MEMBER(qixmcu_coinctrl_w);
DECLARE_WRITE8_MEMBER(qix_pia_w);
DECLARE_WRITE8_MEMBER(qix_coinctl_w);
DECLARE_WRITE8_MEMBER(slither_76489_0_w);
@ -174,8 +153,57 @@ private:
void main_map(address_map &map);
void qix_video_map(address_map &map);
void slither_video_map(address_map &map);
void zoo_main_map(address_map &map);
void zookeep_video_map(address_map &map);
};
class qixmcu_state : public qix_state
{
public:
qixmcu_state(const machine_config &mconfig, device_type type, const char *tag) :
qix_state(mconfig, type, tag),
m_mcu(*this, "mcu")
{ }
void mcu(machine_config &config);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
private:
DECLARE_READ8_MEMBER(coin_r);
DECLARE_WRITE8_MEMBER(coin_w);
DECLARE_WRITE8_MEMBER(coinctrl_w);
DECLARE_READ8_MEMBER(mcu_portb_r);
DECLARE_READ8_MEMBER(mcu_portc_r);
DECLARE_WRITE8_MEMBER(mcu_porta_w);
DECLARE_WRITE8_MEMBER(mcu_portb_w);
required_device<m68705p_device> m_mcu;
/* machine state */
uint8_t m_68705_porta_out;
uint8_t m_coinctrl;
};
class zookeep_state : public qixmcu_state
{
public:
zookeep_state(const machine_config &mconfig, device_type type, const char *tag) :
qixmcu_state(mconfig, type, tag)
{ }
void zookeep(machine_config &config);
void video(machine_config &config);
protected:
virtual void machine_start() override;
private:
DECLARE_WRITE8_MEMBER(bankswitch_w);
void main_map(address_map &map);
void video_map(address_map &map);
};
#endif // MAME_INCLUDES_QIX_H

View File

@ -5,6 +5,7 @@
#pragma once
#include "cpu/m6805/m68705.h"
#include "sound/msm5205.h"
#include "video/stfight_dev.h"
#include "video/airraid_dev.h"
@ -79,17 +80,17 @@ private:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
required_ioport m_coin_mech;
required_ioport m_coin_mech;
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
required_device<cpu_device> m_mcu;
required_device<msm5205_device> m_msm;
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
required_device<m68705p5_device> m_mcu;
required_device<msm5205_device> m_msm;
required_memory_bank m_main_bank;
required_memory_bank m_main_bank;
required_region_ptr<uint8_t> m_samples;
optional_shared_ptr<uint8_t> m_decrypted_opcodes;
required_region_ptr<uint8_t> m_samples;
optional_shared_ptr<uint8_t> m_decrypted_opcodes;
uint8_t m_coin_state;

View File

@ -21,8 +21,8 @@ void pitnrun_state::machine_start()
save_item(NAME(m_toz80));
save_item(NAME(m_zaccept));
save_item(NAME(m_zready));
save_item(NAME(m_portA_in));
save_item(NAME(m_portA_out));
save_item(NAME(m_porta_in));
save_item(NAME(m_porta_out));
save_item(NAME(m_address));
}
@ -66,14 +66,14 @@ READ8_MEMBER(pitnrun_state::mcu_status_r)
}
READ8_MEMBER(pitnrun_state::m68705_portA_r)
READ8_MEMBER(pitnrun_state::m68705_porta_r)
{
return m_portA_in;
return m_porta_in;
}
WRITE8_MEMBER(pitnrun_state::m68705_portA_w)
WRITE8_MEMBER(pitnrun_state::m68705_porta_w)
{
m_portA_out = data;
m_porta_out = data;
}
@ -96,7 +96,7 @@ WRITE8_MEMBER(pitnrun_state::m68705_portA_w)
* the main Z80 memory location to access)
*/
READ8_MEMBER(pitnrun_state::m68705_portB_r)
READ8_MEMBER(pitnrun_state::m68705_portb_r)
{
return 0xff;
}
@ -113,7 +113,7 @@ TIMER_CALLBACK_MEMBER(pitnrun_state::mcu_status_real_w)
m_zaccept = 0;
}
WRITE8_MEMBER(pitnrun_state::m68705_portB_w)
WRITE8_MEMBER(pitnrun_state::m68705_portb_w)
{
address_space &cpu0space = m_maincpu->space(AS_PROGRAM);
if (~data & 0x02)
@ -121,28 +121,28 @@ WRITE8_MEMBER(pitnrun_state::m68705_portB_w)
/* 68705 is going to read data from the Z80 */
machine().scheduler().synchronize(timer_expired_delegate(FUNC(pitnrun_state::mcu_data_real_r),this));
m_mcu->set_input_line(0,CLEAR_LINE);
m_portA_in = m_fromz80;
m_porta_in = m_fromz80;
}
if (~data & 0x04)
{
/* 68705 is writing data for the Z80 */
machine().scheduler().synchronize(timer_expired_delegate(FUNC(pitnrun_state::mcu_status_real_w),this), m_portA_out);
machine().scheduler().synchronize(timer_expired_delegate(FUNC(pitnrun_state::mcu_status_real_w),this), m_porta_out);
}
if (~data & 0x10)
{
cpu0space.write_byte(m_address, m_portA_out);
cpu0space.write_byte(m_address, m_porta_out);
}
if (~data & 0x20)
{
m_portA_in = cpu0space.read_byte(m_address);
m_porta_in = cpu0space.read_byte(m_address);
}
if (~data & 0x40)
{
m_address = (m_address & 0xff00) | m_portA_out;
m_address = (m_address & 0xff00) | m_porta_out;
}
if (~data & 0x80)
{
m_address = (m_address & 0x00ff) | (m_portA_out << 8);
m_address = (m_address & 0x00ff) | (m_porta_out << 8);
}
}
@ -156,7 +156,7 @@ WRITE8_MEMBER(pitnrun_state::m68705_portB_w)
* passes through)
*/
READ8_MEMBER(pitnrun_state::m68705_portC_r)
READ8_MEMBER(pitnrun_state::m68705_portc_r)
{
return (m_zready << 0) | (m_zaccept << 1);
}

View File

@ -19,22 +19,29 @@
*
*************************************/
void qix_state::machine_reset()
void qixmcu_state::machine_start()
{
/* set up save states */
save_item(NAME(m_68705_porta_out));
save_item(NAME(m_coinctrl));
}
void qixmcu_state::machine_reset()
{
/* reset the coin counter register */
m_coinctrl = 0x00;
}
MACHINE_START_MEMBER(qix_state,qixmcu)
void zookeep_state::machine_start()
{
/* set up save states */
save_item(NAME(m_68705_portA_out));
save_item(NAME(m_coinctrl));
qixmcu_state::machine_start();
/* configure the banking */
membank("bank1")->configure_entry(0, memregion("videocpu")->base() + 0xa000);
membank("bank1")->configure_entry(1, memregion("videocpu")->base() + 0x10000);
membank("bank1")->set_entry(0);
}
/*************************************
*
* VSYNC change callback
@ -54,7 +61,7 @@ WRITE_LINE_MEMBER(qix_state::qix_vsync_changed)
*
*************************************/
WRITE8_MEMBER(qix_state::zookeep_bankswitch_w)
WRITE8_MEMBER(zookeep_state::bankswitch_w)
{
membank("bank1")->set_entry((data >> 2) & 1);
/* not necessary, but technically correct */
@ -135,23 +142,23 @@ READ8_MEMBER(qix_state::qix_video_firq_ack_r)
*
*************************************/
READ8_MEMBER(qix_state::qixmcu_coin_r)
READ8_MEMBER(qixmcu_state::coin_r)
{
logerror("6809:qixmcu_coin_r = %02X\n", m_68705_portA_out);
return m_68705_portA_out;
logerror("qixmcu_state, coin_r = %02X\n", m_68705_porta_out);
return m_68705_porta_out;
}
WRITE8_MEMBER(qix_state::qixmcu_coin_w)
WRITE8_MEMBER(qixmcu_state::coin_w)
{
logerror("6809:qixmcu_coin_w = %02X\n", data);
logerror("qixmcu_state, coin_w = %02X\n", data);
/* this is a callback called by pia6821_device::write(), so I don't need to synchronize */
/* the CPUs - they have already been synchronized by qix_pia_w() */
m_mcu->pa_w(space, 0, data, mem_mask);
}
WRITE8_MEMBER(qix_state::qixmcu_coinctrl_w)
WRITE8_MEMBER(qixmcu_state::coinctrl_w)
{
if (BIT(data, 2))
{
@ -168,7 +175,7 @@ WRITE8_MEMBER(qix_state::qixmcu_coinctrl_w)
/* this is a callback called by pia6821_device::write(), so I don't need to synchronize */
/* the CPUs - they have already been synchronized by qix_pia_w() */
m_coinctrl = data;
logerror("6809:qixmcu_coinctrl_w = %02X\n", data);
logerror("qixmcu_state, coinctrl_w = %02X\n", data);
}
@ -179,13 +186,13 @@ WRITE8_MEMBER(qix_state::qixmcu_coinctrl_w)
*
*************************************/
READ8_MEMBER(qix_state::qix_68705_portB_r)
READ8_MEMBER(qixmcu_state::mcu_portb_r)
{
return (ioport("COIN")->read() & 0x0f) | ((ioport("COIN")->read() & 0x80) >> 3);
}
READ8_MEMBER(qix_state::qix_68705_portC_r)
READ8_MEMBER(qixmcu_state::mcu_portc_r)
{
return (m_coinctrl & 0x08) | ((ioport("COIN")->read() & 0x70) >> 4);
}
@ -198,14 +205,14 @@ READ8_MEMBER(qix_state::qix_68705_portC_r)
*
*************************************/
WRITE8_MEMBER(qix_state::qix_68705_portA_w)
WRITE8_MEMBER(qixmcu_state::mcu_porta_w)
{
logerror("68705:portA_w = %02X\n", data);
m_68705_portA_out = data;
m_68705_porta_out = data;
}
WRITE8_MEMBER(qix_state::qix_68705_portB_w)
WRITE8_MEMBER(qixmcu_state::mcu_portb_w)
{
machine().bookkeeping().coin_lockout_w(0, (~data >> 6) & 1);
machine().bookkeeping().coin_counter_w(0, (data >> 7) & 1);

View File

@ -189,12 +189,13 @@ taito68705_mcu_device::taito68705_mcu_device(const machine_config &mconfig, devi
{
}
MACHINE_CONFIG_START(taito68705_mcu_device::device_add_mconfig)
MCFG_DEVICE_ADD("mcu", M68705P5, DERIVED_CLOCK(1, 1))
MCFG_M68705_PORTC_R_CB(READ8(*this, taito68705_mcu_device, mcu_portc_r))
MCFG_M68705_PORTA_W_CB(WRITE8(*this, taito68705_mcu_device, mcu_pa_w))
MCFG_M68705_PORTB_W_CB(WRITE8(*this, taito68705_mcu_device, mcu_portb_w))
MACHINE_CONFIG_END
void taito68705_mcu_device::device_add_mconfig(machine_config &config)
{
M68705P5(config, m_mcu, DERIVED_CLOCK(1, 1));
m_mcu->porta_w().set(FUNC(taito68705_mcu_device::mcu_pa_w));
m_mcu->portb_w().set(FUNC(taito68705_mcu_device::mcu_portb_w));
m_mcu->portc_r().set(FUNC(taito68705_mcu_device::mcu_portc_r));
}
void taito68705_mcu_device::device_start()
{
@ -321,13 +322,14 @@ arkanoid_68705p3_device::arkanoid_68705p3_device(
{
}
MACHINE_CONFIG_START(arkanoid_68705p3_device::device_add_mconfig)
MCFG_DEVICE_ADD("mcu", M68705P3, DERIVED_CLOCK(1, 1))
MCFG_M68705_PORTB_R_CB(READ8(*this, arkanoid_68705p3_device, mcu_pb_r))
MCFG_M68705_PORTC_R_CB(READ8(*this, arkanoid_68705p3_device, mcu_pc_r))
MCFG_M68705_PORTA_W_CB(WRITE8(*this, arkanoid_68705p3_device, mcu_pa_w))
MCFG_M68705_PORTC_W_CB(WRITE8(*this, arkanoid_68705p3_device, mcu_pc_w))
MACHINE_CONFIG_END
void arkanoid_68705p3_device::device_add_mconfig(machine_config &config)
{
M68705P3(config, m_mcu, DERIVED_CLOCK(1, 1));
m_mcu->portb_r().set(FUNC(arkanoid_68705p3_device::mcu_pb_r));
m_mcu->portc_r().set(FUNC(arkanoid_68705p3_device::mcu_pc_r));
m_mcu->porta_w().set(FUNC(arkanoid_68705p3_device::mcu_pa_w));
m_mcu->portc_w().set(FUNC(arkanoid_68705p3_device::mcu_pc_w));
}
arkanoid_68705p5_device::arkanoid_68705p5_device(
@ -339,10 +341,11 @@ arkanoid_68705p5_device::arkanoid_68705p5_device(
{
}
MACHINE_CONFIG_START(arkanoid_68705p5_device::device_add_mconfig)
MCFG_DEVICE_ADD("mcu", M68705P5, DERIVED_CLOCK(1, 1))
MCFG_M68705_PORTB_R_CB(READ8(*this, arkanoid_68705p5_device, mcu_pb_r))
MCFG_M68705_PORTC_R_CB(READ8(*this, arkanoid_68705p5_device, mcu_pc_r))
MCFG_M68705_PORTA_W_CB(WRITE8(*this, arkanoid_68705p5_device, mcu_pa_w))
MCFG_M68705_PORTC_W_CB(WRITE8(*this, arkanoid_68705p5_device, mcu_pc_w))
MACHINE_CONFIG_END
void arkanoid_68705p5_device::device_add_mconfig(machine_config &config)
{
M68705P5(config, m_mcu, DERIVED_CLOCK(1, 1));
m_mcu->portb_r().set(FUNC(arkanoid_68705p5_device::mcu_pb_r));
m_mcu->portc_r().set(FUNC(arkanoid_68705p5_device::mcu_pc_r));
m_mcu->porta_w().set(FUNC(arkanoid_68705p5_device::mcu_pa_w));
m_mcu->portc_w().set(FUNC(arkanoid_68705p5_device::mcu_pc_w));
}

View File

@ -125,10 +125,10 @@ void taito_sj_security_mcu_device::device_reset()
void taito_sj_security_mcu_device::device_add_mconfig(machine_config &config)
{
M68705P5(config, m_mcu, DERIVED_CLOCK(1, 1));
m_mcu->porta_r_cb().set(FUNC(taito_sj_security_mcu_device::mcu_pa_r));
m_mcu->portc_r_cb().set(FUNC(taito_sj_security_mcu_device::mcu_pc_r));
m_mcu->porta_w_cb().set(FUNC(taito_sj_security_mcu_device::mcu_pa_w));
m_mcu->portb_w_cb().set(FUNC(taito_sj_security_mcu_device::mcu_pb_w));
m_mcu->porta_r().set(FUNC(taito_sj_security_mcu_device::mcu_pa_r));
m_mcu->portc_r().set(FUNC(taito_sj_security_mcu_device::mcu_pc_r));
m_mcu->porta_w().set(FUNC(taito_sj_security_mcu_device::mcu_pa_w));
m_mcu->portb_w().set(FUNC(taito_sj_security_mcu_device::mcu_pb_w));
}
READ8_MEMBER(taito_sj_security_mcu_device::mcu_pa_r)

View File

@ -309,19 +309,20 @@ void zorba_keyboard_device::device_start()
}
MACHINE_CONFIG_START(zorba_keyboard_device::device_add_mconfig)
void zorba_keyboard_device::device_add_mconfig(machine_config &config)
{
// MC68705P3S
MCFG_DEVICE_ADD("mcu", M68705P3, 3.579'545_MHz_XTAL)
MCFG_M68705_PORTA_R_CB(READ8(*this, zorba_keyboard_device, mcu_pa_r));
MCFG_M68705_PORTB_R_CB(READ8(*this, zorba_keyboard_device, mcu_pb_r));
MCFG_M68705_PORTB_W_CB(WRITE8(*this, zorba_keyboard_device, mcu_pb_w));
MCFG_M68705_PORTC_W_CB(WRITE8(*this, zorba_keyboard_device, mcu_pc_w));
m68705p3_device &mcu(M68705P3(config, "mcu", 3.579'545_MHz_XTAL));
mcu.porta_r().set(FUNC(zorba_keyboard_device::mcu_pa_r));
mcu.portb_r().set(FUNC(zorba_keyboard_device::mcu_pb_r));
mcu.portb_w().set(FUNC(zorba_keyboard_device::mcu_pb_w));
mcu.portc_w().set(FUNC(zorba_keyboard_device::mcu_pc_w));
// TODO: beeper frequency is unknown, using value from Sun keyboard for now
SPEAKER(config, "bell").front_center();
MCFG_DEVICE_ADD("beeper", BEEP, ATTOSECONDS_TO_HZ(480 * ATTOSECONDS_PER_MICROSECOND))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bell", 0.4)
MACHINE_CONFIG_END
BEEP(config, m_beeper, ATTOSECONDS_TO_HZ(480 * ATTOSECONDS_PER_MICROSECOND));
m_beeper->add_route(ALL_OUTPUTS, "bell", 0.4);
}
ioport_constructor zorba_keyboard_device::device_input_ports() const

View File

@ -19,7 +19,7 @@
*
*************************************/
VIDEO_START_MEMBER(qix_state,qix)
void qix_state::video_start()
{
/* allocate memory for the full video RAM */
m_videoram.allocate(256 * 256);
@ -334,17 +334,17 @@ void qix_state::kram3_video_map(address_map &map)
}
void qix_state::zookeep_video_map(address_map &map)
void zookeep_state::video_map(address_map &map)
{
map(0x0000, 0x7fff).rw(FUNC(qix_state::qix_videoram_r), FUNC(qix_state::qix_videoram_w));
map(0x0000, 0x7fff).rw(FUNC(zookeep_state::qix_videoram_r), FUNC(zookeep_state::qix_videoram_w));
map(0x8000, 0x83ff).ram().share("share1");
map(0x8400, 0x87ff).ram().share("nvram");
map(0x8800, 0x8800).mirror(0x03fe).w(FUNC(qix_state::qix_palettebank_w));
map(0x8801, 0x8801).mirror(0x03fe).w(FUNC(qix_state::zookeep_bankswitch_w));
map(0x8c00, 0x8c00).mirror(0x03fe).rw(FUNC(qix_state::qix_data_firq_r), FUNC(qix_state::qix_data_firq_w));
map(0x8c01, 0x8c01).mirror(0x03fe).rw(FUNC(qix_state::qix_video_firq_ack_r), FUNC(qix_state::qix_video_firq_ack_w));
map(0x9000, 0x93ff).ram().w(FUNC(qix_state::qix_paletteram_w)).share("paletteram");
map(0x9400, 0x9400).mirror(0x03fc).rw(FUNC(qix_state::qix_addresslatch_r), FUNC(qix_state::qix_addresslatch_w));
map(0x8800, 0x8800).mirror(0x03fe).w(FUNC(zookeep_state::qix_palettebank_w));
map(0x8801, 0x8801).mirror(0x03fe).w(FUNC(zookeep_state::bankswitch_w));
map(0x8c00, 0x8c00).mirror(0x03fe).rw(FUNC(zookeep_state::qix_data_firq_r), FUNC(zookeep_state::qix_data_firq_w));
map(0x8c01, 0x8c01).mirror(0x03fe).rw(FUNC(zookeep_state::qix_video_firq_ack_r), FUNC(zookeep_state::qix_video_firq_ack_w));
map(0x9000, 0x93ff).ram().w(FUNC(zookeep_state::qix_paletteram_w)).share("paletteram");
map(0x9400, 0x9400).mirror(0x03fc).rw(FUNC(zookeep_state::qix_addresslatch_r), FUNC(zookeep_state::qix_addresslatch_w));
map(0x9402, 0x9403).mirror(0x03fc).writeonly().share("videoram_addr");
map(0x9800, 0x9800).mirror(0x03ff).readonly().share("scanline_latch");
map(0x9c00, 0x9c00).mirror(0x03fe).w(m_crtc, FUNC(mc6845_device::address_w));
@ -380,11 +380,10 @@ void qix_state::slither_video_map(address_map &map)
*
*************************************/
MACHINE_CONFIG_START(qix_state::qix_video)
MCFG_DEVICE_ADD("videocpu", MC6809E, MAIN_CLOCK_OSC/4/4) /* 1.25 MHz */
MCFG_DEVICE_PROGRAM_MAP(qix_video_map)
MCFG_VIDEO_START_OVERRIDE(qix_state,qix)
void qix_state::qix_video(machine_config &config)
{
MC6809E(config, m_videocpu, MAIN_CLOCK_OSC/4/4); /* 1.25 MHz */
m_videocpu->set_addrmap(AS_PROGRAM, &qix_state::qix_video_map);
MC6845(config, m_crtc, QIX_CHARACTER_CLOCK);
m_crtc->set_screen(m_screen);
@ -395,27 +394,24 @@ MACHINE_CONFIG_START(qix_state::qix_video)
m_crtc->out_de_callback().set(FUNC(qix_state::display_enable_changed));
m_crtc->out_vsync_callback().set(FUNC(qix_state::qix_vsync_changed));
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(QIX_CHARACTER_CLOCK*8, 0x148, 0, 0x100, 0x111, 0, 0x100) /* from CRTC */
MCFG_SCREEN_UPDATE_DEVICE("vid_u18", mc6845_device, screen_update)
MACHINE_CONFIG_END
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
m_screen->set_raw(QIX_CHARACTER_CLOCK*8, 0x148, 0, 0x100, 0x111, 0, 0x100); /* from CRTC */
m_screen->set_screen_update("vid_u18", FUNC(mc6845_device::screen_update));
}
void qix_state::kram3_video(machine_config &config)
{
m_videocpu->set_addrmap(AS_PROGRAM, &qix_state::kram3_video_map);
m_videocpu->lic().set(FUNC(qix_state::kram3_lic_videocpu_changed));
}
MACHINE_CONFIG_START(qix_state::kram3_video)
MCFG_DEVICE_MODIFY("videocpu")
MCFG_DEVICE_PROGRAM_MAP(kram3_video_map)
MCFG_MC6809E_LIC_CB(WRITELINE(*this, qix_state, kram3_lic_videocpu_changed))
MACHINE_CONFIG_END
void zookeep_state::video(machine_config &config)
{
m_videocpu->set_addrmap(AS_PROGRAM, &zookeep_state::video_map);
}
MACHINE_CONFIG_START(qix_state::zookeep_video)
MCFG_DEVICE_MODIFY("videocpu")
MCFG_DEVICE_PROGRAM_MAP(zookeep_video_map)
MACHINE_CONFIG_END
MACHINE_CONFIG_START(qix_state::slither_video)
MCFG_DEVICE_MODIFY("videocpu")
MCFG_DEVICE_CLOCK(SLITHER_CLOCK_OSC/4/4) /* 1.34 MHz */
MCFG_DEVICE_PROGRAM_MAP(slither_video_map)
MACHINE_CONFIG_END
void qix_state::slither_video(machine_config &config)
{
m_videocpu->set_clock(SLITHER_CLOCK_OSC/4/4); /* 1.34 MHz */
m_videocpu->set_addrmap(AS_PROGRAM, &qix_state::slither_video_map);
}