-nanoprocessor, mn10200, ps2vu, m68hc11: Removed MCFG macros. [Ryan Holtz]

-30test, skeetsht, taitojc: Removed MACHINE_CONFIG macros. [Ryan Holtz]
This commit is contained in:
mooglyguy 2018-12-15 15:24:49 +01:00
parent a579d0b783
commit 3be3c6b21c
13 changed files with 136 additions and 160 deletions

View File

@ -366,12 +366,12 @@ const tiny_rom_entry *hp98034_io_card_device::device_rom_region() const
MACHINE_CONFIG_START(hp98034_io_card_device::device_add_mconfig) MACHINE_CONFIG_START(hp98034_io_card_device::device_add_mconfig)
// Clock for NP is generated by a RC oscillator. Manual says its typical frequency // Clock for NP is generated by a RC oscillator. Manual says its typical frequency
// is around 2 MHz. // is around 2 MHz.
MCFG_DEVICE_ADD("np" , HP_NANOPROCESSOR , 2000000) HP_NANOPROCESSOR(config, m_cpu, 2000000);
MCFG_DEVICE_PROGRAM_MAP(np_program_map) m_cpu->set_addrmap(AS_PROGRAM, &hp98034_io_card_device::np_program_map);
MCFG_DEVICE_IO_MAP(np_io_map) m_cpu->set_addrmap(AS_IO, &hp98034_io_card_device::np_io_map);
MCFG_HP_NANO_DC_CHANGED(WRITE8(*this, hp98034_io_card_device , dc_w)) m_cpu->dc_changed().set(FUNC(hp98034_io_card_device::dc_w));
MCFG_HP_NANO_READ_DC_CB(READ8(*this, hp98034_io_card_device , dc_r)) m_cpu->read_dc().set(FUNC(hp98034_io_card_device::dc_r));
MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(hp98034_io_card_device , irq_callback) m_cpu->set_irq_acknowledge_callback(FUNC(hp98034_io_card_device::irq_callback));
MCFG_IEEE488_SLOT_ADD("ieee_dev" , 0 , hp_ieee488_devices , nullptr) MCFG_IEEE488_SLOT_ADD("ieee_dev" , 0 , hp_ieee488_devices , nullptr)
MCFG_IEEE488_SLOT_ADD("ieee_rem" , 0 , remote488_devices , nullptr) MCFG_IEEE488_SLOT_ADD("ieee_rem" , 0 , remote488_devices , nullptr)

View File

@ -756,12 +756,13 @@ const tiny_rom_entry *hp98035_io_card_device::device_rom_region() const
return ROM_NAME(hp98035); return ROM_NAME(hp98035);
} }
MACHINE_CONFIG_START(hp98035_io_card_device::device_add_mconfig) void hp98035_io_card_device::device_add_mconfig(machine_config &config)
MCFG_DEVICE_ADD("np" , HP_NANOPROCESSOR , XTAL(1'000'000)) {
MCFG_DEVICE_PROGRAM_MAP(np_program_map) HP_NANOPROCESSOR(config, m_cpu, XTAL(1'000'000));
MCFG_DEVICE_IO_MAP(np_io_map) m_cpu->set_addrmap(AS_PROGRAM, &hp98035_io_card_device::np_program_map);
MCFG_HP_NANO_DC_CHANGED(WRITE8(*this, hp98035_io_card_device , dc_w)) m_cpu->set_addrmap(AS_IO, &hp98035_io_card_device::np_io_map);
MACHINE_CONFIG_END m_cpu->dc_changed().set(FUNC(hp98035_io_card_device::dc_w));
}
// device type definition // device type definition
DEFINE_DEVICE_TYPE(HP98035_IO_CARD, hp98035_io_card_device, "hp98035", "HP98035 card") DEFINE_DEVICE_TYPE(HP98035_IO_CARD, hp98035_io_card_device, "hp98035", "HP98035 card")

View File

@ -28,22 +28,21 @@
#define MC68HC11_IRQ_LINE 0 #define MC68HC11_IRQ_LINE 0
#define MC68HC11_TOC1_LINE 1 #define MC68HC11_TOC1_LINE 1
DECLARE_DEVICE_TYPE(MC68HC11, mc68hc11_cpu_device) DECLARE_DEVICE_TYPE(MC68HC11, mc68hc11_cpu_device)
#define MCFG_MC68HC11_CONFIG(_has_extended_io, _internal_ram_size, _init_value) \
downcast<mc68hc11_cpu_device &>(*device).set_has_extended_io(_has_extended_io); \
downcast<mc68hc11_cpu_device &>(*device).set_internal_ram_size(_internal_ram_size); \
downcast<mc68hc11_cpu_device &>(*device).set_init_value(_init_value);
class mc68hc11_cpu_device : public cpu_device class mc68hc11_cpu_device : public cpu_device
{ {
public: public:
// construction/destruction // construction/destruction
mc68hc11_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); mc68hc11_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
void set_config(int has_extended_io, int internal_ram_size, int init_value)
{
set_has_extended_io(has_extended_io);
set_internal_ram_size(internal_ram_size);
set_init_value(init_value);
}
// I/O enable flag // I/O enable flag
void set_has_extended_io(int has_extended_io) { m_has_extended_io = has_extended_io; } void set_has_extended_io(int has_extended_io) { m_has_extended_io = has_extended_io; }
void set_internal_ram_size(int internal_ram_size) { m_internal_ram_size = internal_ram_size; } void set_internal_ram_size(int internal_ram_size) { m_internal_ram_size = internal_ram_size; }

View File

@ -68,9 +68,10 @@ sonyvu1_device::sonyvu1_device(const machine_config &mconfig, const char *tag, d
{ {
} }
MACHINE_CONFIG_START(sonyvu1_device::device_add_mconfig) void sonyvu1_device::device_add_mconfig(machine_config &config)
MCFG_DEVICE_ADD(m_vif, SONYPS2_VIF1, 294912000/2, m_gs, DEVICE_SELF) {
MACHINE_CONFIG_END SONYPS2_VIF1(config, m_vif, 294912000/2, m_gs, DEVICE_SELF);
}
ps2_vif1_device* sonyvu1_device::interface() ps2_vif1_device* sonyvu1_device::interface()
{ {

View File

@ -49,9 +49,10 @@ void mn10200_device::mn1020012a_internal_map(address_map &map)
mn10200_device::mn10200_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor program) mn10200_device::mn10200_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor program)
: cpu_device(mconfig, type, tag, owner, clock) : cpu_device(mconfig, type, tag, owner, clock)
, m_program_config("program", ENDIANNESS_LITTLE, 16, 24, 0, program), m_program(nullptr) , m_program_config("program", ENDIANNESS_LITTLE, 16, 24, 0, program), m_program(nullptr)
, m_read_port0(*this), m_read_port1(*this), m_read_port2(*this), m_read_port3(*this), m_read_port4(*this) , m_read_port{{*this}, {*this}, {*this}, {*this}, {*this}}
, m_write_port0(*this), m_write_port1(*this), m_write_port2(*this), m_write_port3(*this), m_write_port4(*this), m_cycles(0), m_pc(0), m_psw(0), m_mdr(0), m_nmicr(0), m_iagr(0), , m_write_port{{*this}, {*this}, {*this}, {*this}, {*this}}
m_extmdl(0), m_extmdh(0), m_possible_irq(false), m_pplul(0), m_ppluh(0), m_p3md(0), m_p4(0) , m_cycles(0), m_pc(0), m_psw(0), m_mdr(0), m_nmicr(0), m_iagr(0)
, m_extmdl(0), m_extmdh(0), m_possible_irq(false), m_pplul(0), m_ppluh(0), m_p3md(0), m_p4(0)
{ } { }
// device definitions // device definitions
@ -123,17 +124,11 @@ void mn10200_device::device_start()
m_program = &space(AS_PROGRAM); m_program = &space(AS_PROGRAM);
// resolve callbacks // resolve callbacks
m_read_port0.resolve_safe(0xff); for (int i = 0; i < 5; i++)
m_read_port1.resolve_safe(0xff); {
m_read_port2.resolve_safe(0xff); m_read_port[i].resolve_safe(0xff);
m_read_port3.resolve_safe(0xff); m_write_port[i].resolve_safe();
m_read_port4.resolve_safe(0xff); }
m_write_port0.resolve_safe();
m_write_port1.resolve_safe();
m_write_port2.resolve_safe();
m_write_port3.resolve_safe();
m_write_port4.resolve_safe();
// init and register for savestates // init and register for savestates
save_item(NAME(m_pc)); save_item(NAME(m_pc));
@ -2075,19 +2070,19 @@ WRITE8_MEMBER(mn10200_device::io_control_w)
// outputs // outputs
case 0x3c0: case 0x3c0:
m_port[0].out = data; m_port[0].out = data;
m_write_port0(MN10200_PORT0, m_port[0].out | (m_port[0].dir ^ 0xff), 0xff); m_write_port[0](MN10200_PORT0, m_port[0].out | (m_port[0].dir ^ 0xff), 0xff);
break; break;
case 0x264: case 0x264:
m_port[1].out = data; m_port[1].out = data;
m_write_port1(MN10200_PORT1, m_port[1].out | (m_port[1].dir ^ 0xff), 0xff); m_write_port[1](MN10200_PORT1, m_port[1].out | (m_port[1].dir ^ 0xff), 0xff);
break; break;
case 0x3c2: case 0x3c2:
m_port[2].out = data & 0x0f; m_port[2].out = data & 0x0f;
m_write_port2(MN10200_PORT2, m_port[2].out | (m_port[2].dir ^ 0x0f), 0xff); m_write_port[2](MN10200_PORT2, m_port[2].out | (m_port[2].dir ^ 0x0f), 0xff);
break; break;
case 0x3c3: case 0x3c3:
m_port[3].out = data & 0x1f; m_port[3].out = data & 0x1f;
m_write_port3(MN10200_PORT3, m_port[3].out | (m_port[3].dir ^ 0x1f), 0xff); m_write_port[3](MN10200_PORT3, m_port[3].out | (m_port[3].dir ^ 0x1f), 0xff);
break; break;
// directions (0=input, 1=output) // directions (0=input, 1=output)
@ -2218,13 +2213,13 @@ READ8_MEMBER(mn10200_device::io_control_r)
// inputs // inputs
case 0x3d0: case 0x3d0:
return m_read_port0(MN10200_PORT0, 0xff) | m_port[0].dir; return m_read_port[0](MN10200_PORT0, 0xff) | m_port[0].dir;
case 0x3d1: case 0x3d1:
return m_read_port1(MN10200_PORT1, 0xff) | m_port[1].dir; return m_read_port[1](MN10200_PORT1, 0xff) | m_port[1].dir;
case 0x3d2: case 0x3d2:
return (m_read_port2(MN10200_PORT2, 0xff) & 0x0f) | m_port[2].dir; return (m_read_port[2](MN10200_PORT2, 0xff) & 0x0f) | m_port[2].dir;
case 0x3d3: case 0x3d3:
return (m_read_port3(MN10200_PORT3, 0xff) & 0x1f) | m_port[3].dir; return (m_read_port[3](MN10200_PORT3, 0xff) & 0x1f) | m_port[3].dir;
// directions (0=input, 1=output) // directions (0=input, 1=output)
case 0x3e0: case 0x3e0:

View File

@ -13,12 +13,6 @@
#pragma once #pragma once
// port setup
#define MCFG_MN10200_READ_PORT_CB(X, _devcb) \
downcast<mn10200_device &>(*device).set_read_port##X##_callback(DEVCB_##_devcb);
#define MCFG_MN10200_WRITE_PORT_CB(X, _devcb) \
downcast<mn10200_device &>(*device).set_write_port##X##_callback(DEVCB_##_devcb);
enum enum
{ {
MN10200_PORT0 = 0, MN10200_PORT0 = 0,
@ -43,17 +37,8 @@ class mn10200_device : public cpu_device
{ {
public: public:
// configuration helpers // configuration helpers
template <class Object> devcb_base &set_read_port0_callback(Object &&cb) { return m_read_port0.set_callback(std::forward<Object>(cb)); } template <std::size_t Port> auto read_port() { return m_read_port[Port].bind(); }
template <class Object> devcb_base &set_read_port1_callback(Object &&cb) { return m_read_port1.set_callback(std::forward<Object>(cb)); } template <std::size_t Port> auto write_port() { return m_write_port[Port].bind(); }
template <class Object> devcb_base &set_read_port2_callback(Object &&cb) { return m_read_port2.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_read_port3_callback(Object &&cb) { return m_read_port3.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_read_port4_callback(Object &&cb) { return m_read_port4.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_write_port0_callback(Object &&cb) { return m_write_port0.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_write_port1_callback(Object &&cb) { return m_write_port1.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_write_port2_callback(Object &&cb) { return m_write_port2.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_write_port3_callback(Object &&cb) { return m_write_port3.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_write_port4_callback(Object &&cb) { return m_write_port4.set_callback(std::forward<Object>(cb)); }
DECLARE_READ8_MEMBER(io_control_r); DECLARE_READ8_MEMBER(io_control_r);
DECLARE_WRITE8_MEMBER(io_control_w); DECLARE_WRITE8_MEMBER(io_control_w);
@ -95,8 +80,8 @@ private:
address_space *m_program; address_space *m_program;
// i/o handlers // i/o handlers
devcb_read8 m_read_port0, m_read_port1, m_read_port2, m_read_port3, m_read_port4; devcb_read8 m_read_port[5];
devcb_write8 m_write_port0, m_write_port1, m_write_port2, m_write_port3, m_write_port4; devcb_write8 m_write_port[5];
int m_cycles; int m_cycles;

View File

@ -57,25 +57,20 @@
constexpr unsigned HP_NANO_IE_DC = 7; // DC line used as interrupt enable/mask (DC7) constexpr unsigned HP_NANO_IE_DC = 7; // DC line used as interrupt enable/mask (DC7)
// DC changed callback
// The callback receives a 8-bit word holding the state of all DC lines.
// DC0 is in bit 0, DC1 in bit 1 and so on.
// Keep in mind that DC7 usually masks the interrupt signal.
#define MCFG_HP_NANO_DC_CHANGED(_devcb) \
downcast<hp_nanoprocessor_device &>(*device).set_dc_changed_func(DEVCB_##_devcb);
// Callback to read the input state of DC lines
// All lines that are not in input are to be reported at "1"
#define MCFG_HP_NANO_READ_DC_CB(_devcb) \
downcast<hp_nanoprocessor_device &>(*device).set_read_dc_func(DEVCB_##_devcb);
class hp_nanoprocessor_device : public cpu_device class hp_nanoprocessor_device : public cpu_device
{ {
public: public:
hp_nanoprocessor_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); hp_nanoprocessor_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <class Object> devcb_base &set_dc_changed_func(Object &&cb) { return m_dc_changed_func.set_callback(std::forward<Object>(cb)); } // DC changed callback
template <class Object> devcb_base &set_read_dc_func(Object &&cb) { return m_read_dc_func.set_callback(std::forward<Object>(cb)); } // The callback receives a 8-bit word holding the state of all DC lines.
// DC0 is in bit 0, DC1 in bit 1 and so on.
// Keep in mind that DC7 usually masks the interrupt signal.
auto dc_changed() { return m_dc_changed_func.bind(); }
// Callback to read the input state of DC lines
// All lines that are not in input are to be reported at "1"
auto read_dc() { return m_read_dc_func.bind(); }
// device_execute_interface overrides // device_execute_interface overrides
virtual uint32_t execute_min_cycles() const override { return 2; } virtual uint32_t execute_min_cycles() const override { return 2; }

View File

@ -183,14 +183,15 @@ WRITE16_MEMBER(taito_zoom_device::reg_address_w)
***************************************************************************/ ***************************************************************************/
MACHINE_CONFIG_START(taito_zoom_device::device_add_mconfig) void taito_zoom_device::device_add_mconfig(machine_config &config)
{
/* basic machine hardware */ /* basic machine hardware */
MCFG_DEVICE_ADD("mn10200", MN1020012A, XTAL(25'000'000)/2) MN1020012A(config, m_soundcpu, XTAL(25'000'000)/2);
MCFG_MN10200_READ_PORT_CB(1, READ8(DEVICE_SELF, taito_zoom_device, tms_ctrl_r)) m_soundcpu->read_port<1>().set(FUNC(taito_zoom_device::tms_ctrl_r));
MCFG_MN10200_WRITE_PORT_CB(1, WRITE8(DEVICE_SELF, taito_zoom_device, tms_ctrl_w)) m_soundcpu->write_port<1>().set(FUNC(taito_zoom_device::tms_ctrl_w));
MCFG_DEVICE_PROGRAM_MAP(taitozoom_mn_map) m_soundcpu->set_addrmap(AS_PROGRAM, &taito_zoom_device::taitozoom_mn_map);
MCFG_QUANTUM_TIME(attotime::from_hz(60000)) config.m_minimum_quantum = attotime::from_hz(60000);
TMS57002(config, m_tms57002, XTAL(25'000'000)/2); TMS57002(config, m_tms57002, XTAL(25'000'000)/2);
//m_tms57002->empty_callback().set_inputline(m_soundcpu, MN10200_IRQ1, m_tms57002->empty_r()); /*.invert();*/ //m_tms57002->empty_callback().set_inputline(m_soundcpu, MN10200_IRQ1, m_tms57002->empty_r()); /*.invert();*/
@ -205,4 +206,4 @@ MACHINE_CONFIG_START(taito_zoom_device::device_add_mconfig)
m_zsg2->add_route(1, *m_tms57002, 0.5, 1); // chorus effect m_zsg2->add_route(1, *m_tms57002, 0.5, 1); // chorus effect
m_zsg2->add_route(2, *m_tms57002, 1.0, 2); // left direct m_zsg2->add_route(2, *m_tms57002, 1.0, 2); // left direct
m_zsg2->add_route(3, *m_tms57002, 1.0, 3); // right direct m_zsg2->add_route(3, *m_tms57002, 1.0, 3); // right direct
MACHINE_CONFIG_END }

View File

@ -69,7 +69,7 @@ protected:
virtual void machine_start() override; virtual void machine_start() override;
private: private:
required_device<cpu_device> m_maincpu; required_device<mc68hc11_cpu_device> m_maincpu;
required_device<okim6295_device> m_oki; required_device<okim6295_device> m_oki;
output_finder<72> m_digits; output_finder<72> m_digits;
output_finder<8> m_lamps; output_finder<8> m_lamps;
@ -253,23 +253,22 @@ void namco_30test_state::machine_start()
save_item(NAME(m_oki_bank)); save_item(NAME(m_oki_bank));
} }
MACHINE_CONFIG_START(namco_30test_state::_30test) void namco_30test_state::_30test(machine_config &config)
{
/* basic machine hardware */ /* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", MC68HC11,MAIN_CLOCK/4) MC68HC11(config, m_maincpu, MAIN_CLOCK/4);
MCFG_DEVICE_PROGRAM_MAP(namco_30test_map) m_maincpu->set_addrmap(AS_PROGRAM, &namco_30test_state::namco_30test_map);
MCFG_DEVICE_IO_MAP(namco_30test_io) m_maincpu->set_addrmap(AS_IO, &namco_30test_state::namco_30test_io);
MCFG_MC68HC11_CONFIG( 0, 768, 0x00 ) m_maincpu->set_config(0, 768, 0x00);
/* no video hardware */
/* no video! */
/* sound hardware */ /* sound hardware */
SPEAKER(config, "mono").front_center(); SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("oki", OKIM6295, 1056000, okim6295_device::PIN7_HIGH) OKIM6295(config, m_oki, 1056000, okim6295_device::PIN7_HIGH);
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) m_oki->add_route(ALL_OUTPUTS, "mono", 1.0);
MACHINE_CONFIG_END }
/*************************************************************************** /***************************************************************************

View File

@ -41,7 +41,7 @@ public:
DECLARE_INPUT_CHANGED_MEMBER(kb_irq); DECLARE_INPUT_CHANGED_MEMBER(kb_irq);
protected: protected:
required_device<cpu_device> m_maincpu; required_device<mc68hc11_cpu_device> m_maincpu;
required_device<hd44780_device> m_lcdc0; required_device<hd44780_device> m_lcdc0;
required_device<hd44780_device> m_lcdc1; required_device<hd44780_device> m_lcdc1;
required_device<nvram_device> m_nvram; required_device<nvram_device> m_nvram;
@ -433,10 +433,10 @@ void alphasmart_state::machine_reset()
MACHINE_CONFIG_START(alphasmart_state::alphasmart) MACHINE_CONFIG_START(alphasmart_state::alphasmart)
/* basic machine hardware */ /* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", MC68HC11, XTAL(8'000'000)/2) // MC68HC11D0, XTAL is 8 Mhz, unknown divider MC68HC11(config, m_maincpu, XTAL(8'000'000)/2); // MC68HC11D0, XTAL is 8 Mhz, unknown divider
MCFG_DEVICE_PROGRAM_MAP(alphasmart_mem) m_maincpu->set_addrmap(AS_PROGRAM, &alphasmart_state::alphasmart_mem);
MCFG_DEVICE_IO_MAP(alphasmart_io) m_maincpu->set_addrmap(AS_IO, &alphasmart_state::alphasmart_io);
MCFG_MC68HC11_CONFIG(0, 192, 0x00) m_maincpu->set_config(0, 192, 0x00);
MCFG_KS0066_F05_ADD("ks0066_0") MCFG_KS0066_F05_ADD("ks0066_0")
MCFG_HD44780_LCD_SIZE(2, 40) MCFG_HD44780_LCD_SIZE(2, 40)

View File

@ -94,7 +94,7 @@ private:
DECLARE_READ8_MEMBER(irq_clear_r); DECLARE_READ8_MEMBER(irq_clear_r);
virtual void video_start() override; virtual void video_start() override;
uint32_t screen_update_hitpoker(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_hitpoker(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
required_device<cpu_device> m_maincpu; required_device<mc68hc11_cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode; required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette; required_device<palette_device> m_palette;
void hitpoker_io(address_map &map); void hitpoker_io(address_map &map);
@ -463,21 +463,21 @@ static GFXDECODE_START( gfx_hitpoker )
GFXDECODE_END GFXDECODE_END
MACHINE_CONFIG_START(hitpoker_state::hitpoker) MACHINE_CONFIG_START(hitpoker_state::hitpoker)
MCFG_DEVICE_ADD("maincpu", MC68HC11,1000000) MC68HC11(config, m_maincpu, 1000000);
MCFG_DEVICE_PROGRAM_MAP(hitpoker_map) m_maincpu->set_addrmap(AS_PROGRAM, &hitpoker_state::hitpoker_map);
MCFG_DEVICE_IO_MAP(hitpoker_io) m_maincpu->set_addrmap(AS_IO, &hitpoker_state::hitpoker_io);
MCFG_MC68HC11_CONFIG(0, 0x100, 0x01) m_maincpu->set_config(0, 0x100, 0x01);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* video hardware */ /* video hardware */
MCFG_SCREEN_ADD("screen", RASTER) screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
MCFG_SCREEN_REFRESH_RATE(60) screen.set_refresh_hz(60);
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // not accurate screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate
MCFG_SCREEN_SIZE(648, 480) //setted by the CRTC screen.set_size(648, 480); //setted by the CRTC
MCFG_SCREEN_VISIBLE_AREA(0, 648-1, 0, 240-1) screen.set_visarea(0, 648-1, 0, 240-1);
MCFG_SCREEN_UPDATE_DRIVER(hitpoker_state, screen_update_hitpoker) screen.set_screen_update(FUNC(hitpoker_state::screen_update_hitpoker));
MCFG_SCREEN_PALETTE("palette") screen.set_palette(m_palette);
h46505_device &crtc(H46505(config, "crtc", CRTC_CLOCK/2)); /* hand tuned to get ~60 fps */ h46505_device &crtc(H46505(config, "crtc", CRTC_CLOCK/2)); /* hand tuned to get ~60 fps */
crtc.set_screen("screen"); crtc.set_screen("screen");
@ -485,8 +485,8 @@ MACHINE_CONFIG_START(hitpoker_state::hitpoker)
crtc.set_char_width(8); crtc.set_char_width(8);
crtc.out_vsync_callback().set(FUNC(hitpoker_state::hitpoker_irq)); crtc.out_vsync_callback().set(FUNC(hitpoker_state::hitpoker_irq));
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_hitpoker) GFXDECODE(config, m_gfxdecode, m_palette, gfx_hitpoker);
MCFG_PALETTE_ADD("palette", 0x800) PALETTE(config, m_palette, 0x800);
SPEAKER(config, "mono").front_center(); SPEAKER(config, "mono").front_center();
@ -494,7 +494,7 @@ MACHINE_CONFIG_START(hitpoker_state::hitpoker)
aysnd.port_a_read_callback().set_ioport("DSW1"); aysnd.port_a_read_callback().set_ioport("DSW1");
aysnd.port_b_read_callback().set_ioport("DSW2"); aysnd.port_b_read_callback().set_ioport("DSW2");
aysnd.add_route(ALL_OUTPUTS, "mono", 0.50); aysnd.add_route(ALL_OUTPUTS, "mono", 0.50);
MACHINE_CONFIG_END }
void hitpoker_state::init_hitpoker() void hitpoker_state::init_hitpoker()
{ {

View File

@ -60,7 +60,7 @@ private:
TMS340X0_SCANLINE_RGB32_CB_MEMBER(scanline_update); TMS340X0_SCANLINE_RGB32_CB_MEMBER(scanline_update);
virtual void machine_reset() override; virtual void machine_reset() override;
virtual void video_start() override; virtual void video_start() override;
required_device<cpu_device> m_68hc11; required_device<mc68hc11_cpu_device> m_68hc11;
required_device<ay8910_device> m_ay; required_device<ay8910_device> m_ay;
required_device<tms34010_device> m_tms; required_device<tms34010_device> m_tms;
void hc11_io_map(address_map &map); void hc11_io_map(address_map &map);
@ -236,12 +236,12 @@ INPUT_PORTS_END
* *
*************************************/ *************************************/
MACHINE_CONFIG_START(skeetsht_state::skeetsht) void skeetsht_state::skeetsht(machine_config &config)
{
MCFG_DEVICE_ADD("68hc11", MC68HC11, 4000000) // ? MC68HC11(config, m_68hc11, 4000000); // ?
MCFG_DEVICE_PROGRAM_MAP(hc11_pgm_map) m_68hc11->set_addrmap(AS_PROGRAM, &skeetsht_state::hc11_pgm_map);
MCFG_DEVICE_IO_MAP(hc11_io_map) m_68hc11->set_addrmap(AS_IO, &skeetsht_state::hc11_io_map);
MCFG_MC68HC11_CONFIG( 0, 0x100, 0x01 ) // And 512 bytes EEPROM? (68HC11A1) m_68hc11->set_config(0, 0x100, 0x01); // And 512 bytes EEPROM? (68HC11A1)
TMS34010(config, m_tms, 48000000); TMS34010(config, m_tms, 48000000);
m_tms->set_addrmap(AS_PROGRAM, &skeetsht_state::tms_program_map); m_tms->set_addrmap(AS_PROGRAM, &skeetsht_state::tms_program_map);
@ -251,17 +251,17 @@ MACHINE_CONFIG_START(skeetsht_state::skeetsht)
m_tms->set_scanline_rgb32_callback(FUNC(skeetsht_state::scanline_update)); m_tms->set_scanline_rgb32_callback(FUNC(skeetsht_state::scanline_update));
m_tms->output_int().set(FUNC(skeetsht_state::tms_irq)); m_tms->output_int().set(FUNC(skeetsht_state::tms_irq));
MCFG_TLC34076_ADD("tlc34076", TLC34076_6_BIT) TLC34076(config, m_tlc34076, 0);
m_tlc34076->set_bits(tlc34076_device::TLC34076_6_BIT);
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(48000000 / 8, 156*4, 0, 100*4, 328, 0, 300) // FIXME
MCFG_SCREEN_UPDATE_DEVICE("tms", tms34010_device, tms340x0_rgb32)
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_raw(48000000 / 8, 156*4, 0, 100*4, 328, 0, 300); // FIXME
screen.set_screen_update("tms", FUNC(tms34010_device::tms340x0_rgb32));
SPEAKER(config, "mono").front_center(); SPEAKER(config, "mono").front_center();
AY8910(config, m_ay, 2000000).add_route(ALL_OUTPUTS, "mono", 0.50); // ? AY8910(config, m_ay, 2000000).add_route(ALL_OUTPUTS, "mono", 0.50); // ?
MACHINE_CONFIG_END }
/************************************* /*************************************

View File

@ -1077,23 +1077,23 @@ void taitojc_state::machine_start()
} }
MACHINE_CONFIG_START(taitojc_state::taitojc) void taitojc_state::taitojc(machine_config &config)
{
/* basic machine hardware */ /* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", M68040, XTAL(10'000'000)*2) // 20MHz, clock source = CY7C991 M68040(config, m_maincpu, XTAL(10'000'000)*2); // 20MHz, clock source = CY7C991
MCFG_DEVICE_PROGRAM_MAP(taitojc_map) m_maincpu->set_addrmap(AS_PROGRAM, &taitojc_state::taitojc_map);
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", taitojc_state, taitojc_vblank) m_maincpu->set_vblank_int("screen", FUNC(taitojc_state::taitojc_vblank));
MCFG_DEVICE_ADD("sub", MC68HC11, XTAL(16'000'000)/2) // 8MHz, MC68HC11M0 mc68hc11_cpu_device &sub(MC68HC11(config, "sub", XTAL(16'000'000)/2)); // 8MHz, MC68HC11M0
MCFG_DEVICE_PROGRAM_MAP(hc11_pgm_map) sub.set_addrmap(AS_PROGRAM, &taitojc_state::hc11_pgm_map);
MCFG_DEVICE_IO_MAP(hc11_io_map) sub.set_addrmap(AS_IO, &taitojc_state::hc11_io_map);
MCFG_MC68HC11_CONFIG( 1, 1280, 0x00 ) sub.set_config(1, 1280, 0x00);
MCFG_DEVICE_ADD("dsp", TMS32051, XTAL(10'000'000)*4) // 40MHz, clock source = CY7C991 TMS32051(config, m_dsp, XTAL(10'000'000)*4); // 40MHz, clock source = CY7C991
MCFG_DEVICE_PROGRAM_MAP(tms_program_map) m_dsp->set_addrmap(AS_PROGRAM, &taitojc_state::tms_program_map);
MCFG_DEVICE_DATA_MAP(tms_data_map) m_dsp->set_addrmap(AS_DATA, &taitojc_state::tms_data_map);
MCFG_QUANTUM_TIME(attotime::from_hz(6000)) config.m_minimum_quantum = attotime::from_hz(6000);
EEPROM_93C46_16BIT(config, "eeprom"); EEPROM_93C46_16BIT(config, "eeprom");
@ -1105,38 +1105,38 @@ MACHINE_CONFIG_START(taitojc_state::taitojc)
m_tc0640fio->write_4_callback().set(FUNC(taitojc_state::coin_control_w)); m_tc0640fio->write_4_callback().set(FUNC(taitojc_state::coin_control_w));
m_tc0640fio->read_7_callback().set_ioport("BUTTONS"); m_tc0640fio->read_7_callback().set_ioport("BUTTONS");
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfxdecode_device::empty) GFXDECODE(config, m_gfxdecode, m_palette, gfxdecode_device::empty);
/* video hardware */ /* video hardware */
MCFG_SCREEN_ADD("screen", RASTER) SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) m_screen->set_raw(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART);
MCFG_SCREEN_UPDATE_DRIVER(taitojc_state, screen_update_taitojc) m_screen->set_screen_update(FUNC(taitojc_state::screen_update_taitojc));
MCFG_SCREEN_PALETTE("palette") m_screen->set_palette(m_palette);
MCFG_PALETTE_ADD("palette", 32768) PALETTE(config, m_palette, 32768);
MCFG_DEVICE_ADD("tc0780fpa", TC0780FPA, 0) TC0780FPA(config, m_tc0780fpa, 0);
/* sound hardware */ /* sound hardware */
MCFG_DEVICE_ADD("taito_en", TAITO_EN, 0) TAITO_EN(config, "taito_en", 0);
MACHINE_CONFIG_END }
MACHINE_CONFIG_START(taitojc_state::dendego) void taitojc_state::dendego(machine_config &config)
{
taitojc(config); taitojc(config);
/* basic machine hardware */ /* basic machine hardware */
MCFG_DEVICE_MODIFY("maincpu") m_maincpu->set_addrmap(AS_PROGRAM, &taitojc_state::dendego_map);
MCFG_DEVICE_PROGRAM_MAP(dendego_map)
/* video hardware */ /* video hardware */
MCFG_SCREEN_MODIFY("screen") m_screen->set_screen_update(FUNC(taitojc_state::screen_update_dendego));
MCFG_SCREEN_UPDATE_DRIVER(taitojc_state, screen_update_dendego)
/* sound hardware */ /* sound hardware */
SPEAKER(config, "vibration").subwoofer(); SPEAKER(config, "vibration").subwoofer();
MCFG_DEVICE_ADD("oki", OKIM6295, 1056000, okim6295_device::PIN7_HIGH) // clock frequency & pin 7 not verified
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "vibration", 0.20) /* clock frequency & pin 7 not verified */
MACHINE_CONFIG_END OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "vibration", 0.20);
}