-ghosteo: Removed deprecated warning, nw

-i2cmem: Removed some MCFG macros, nw

-bus/nes/datach, bandai: Removed MCFG macro, nw

-bus/megadrive/eeprom, jcart: Removed MACHINE_CONFIG macros, nw
This commit is contained in:
mooglyguy 2019-02-02 19:24:08 +01:00 committed by MooglyGuy
parent 022f5e8b32
commit 285fa5415b
13 changed files with 398 additions and 183 deletions

View File

@ -107,33 +107,40 @@ md_eeprom_blara_device::md_eeprom_blara_device(const machine_config &mconfig, co
// device_add_mconfig - add device configuration
//-------------------------------------------------
MACHINE_CONFIG_START(md_std_eeprom_device::device_add_mconfig)
MCFG_24C01_ADD("i2cmem")
MACHINE_CONFIG_END
void md_std_eeprom_device::device_add_mconfig(machine_config &config)
{
I2C_24C01(config, m_i2cmem);
}
MACHINE_CONFIG_START(md_eeprom_nbajam_device::device_add_mconfig)
MCFG_24C02_ADD("i2cmem")
MACHINE_CONFIG_END
void md_eeprom_nbajam_device::device_add_mconfig(machine_config &config)
{
I2C_24C02(config, m_i2cmem);
}
MACHINE_CONFIG_START(md_eeprom_nbajamte_device::device_add_mconfig)
MCFG_24C02_ADD("i2cmem")
MACHINE_CONFIG_END
void md_eeprom_nbajamte_device::device_add_mconfig(machine_config &config)
{
I2C_24C01(config, m_i2cmem);
}
MACHINE_CONFIG_START(md_eeprom_cslam_device::device_add_mconfig)
MCFG_24C64_ADD("i2cmem")
MACHINE_CONFIG_END
void md_eeprom_cslam_device::device_add_mconfig(machine_config &config)
{
I2C_24C64(config, m_i2cmem);
}
MACHINE_CONFIG_START(md_eeprom_nflqb_device::device_add_mconfig)
MCFG_24C16_ADD("i2cmem")
MACHINE_CONFIG_END
void md_eeprom_nflqb_device::device_add_mconfig(machine_config &config)
{
I2C_24C16(config, m_i2cmem);
}
MACHINE_CONFIG_START(md_eeprom_nhlpa_device::device_add_mconfig)
MCFG_24C01_ADD("i2cmem")
MACHINE_CONFIG_END
void md_eeprom_nhlpa_device::device_add_mconfig(machine_config &config)
{
I2C_24C01(config, m_i2cmem);
}
MACHINE_CONFIG_START(md_eeprom_blara_device::device_add_mconfig)
MCFG_24C64_ADD("i2cmem")
MACHINE_CONFIG_END
void md_eeprom_blara_device::device_add_mconfig(machine_config &config)
{
I2C_24C64(config, m_i2cmem);
}
void md_std_eeprom_device::device_start()
{

View File

@ -81,13 +81,15 @@ md_seprom_mm96_device::md_seprom_mm96_device(const machine_config &mconfig, cons
// device_add_mconfig - add device configuration
//-------------------------------------------------
MACHINE_CONFIG_START(md_seprom_codemast_device::device_add_mconfig)
MCFG_24C08_ADD("i2cmem")
MACHINE_CONFIG_END
void md_seprom_codemast_device::device_add_mconfig(machine_config &config)
{
I2C_24C08(config, m_i2cmem);
}
MACHINE_CONFIG_START(md_seprom_mm96_device::device_add_mconfig)
MCFG_24C16A_ADD("i2cmem")
MACHINE_CONFIG_END
void md_seprom_mm96_device::device_add_mconfig(machine_config &config)
{
I2C_24C16A(config, m_i2cmem);
}
static INPUT_PORTS_START( jcart_ipt )

View File

@ -391,13 +391,15 @@ READ8_MEMBER(nes_lz93d50_24c01_device::read_m)
// SERIAL I2C DEVICE
//-------------------------------------------------
MACHINE_CONFIG_START(nes_lz93d50_24c01_device::device_add_mconfig)
MCFG_24C01_ADD("i2cmem")
MACHINE_CONFIG_END
void nes_lz93d50_24c01_device::device_add_mconfig(machine_config &config)
{
I2C_24C01(config, m_i2cmem);
}
MACHINE_CONFIG_START(nes_lz93d50_24c02_device::device_add_mconfig)
MCFG_24C02_ADD("i2cmem")
MACHINE_CONFIG_END
void nes_lz93d50_24c02_device::device_add_mconfig(machine_config &config)
{
I2C_24C02(config, m_i2cmem);
}
/*-------------------------------------------------

View File

@ -201,9 +201,10 @@ uint8_t *nes_datach_rom_device::get_cart_base()
}
MACHINE_CONFIG_START(nes_datach_24c01_device::device_add_mconfig)
MCFG_24C01_ADD("i2cmem")
MACHINE_CONFIG_END
void nes_datach_24c01_device::device_add_mconfig(machine_config &config)
{
I2C_24C01(config, m_i2cmem);
}
//---------------------------------
@ -368,11 +369,12 @@ static void datach_cart(device_slot_interface &device)
}
MACHINE_CONFIG_START(nes_datach_device::device_add_mconfig)
BARCODE_READER(config, "datach", 0);
MCFG_DATACH_MINICART_ADD("datach_slot", datach_cart)
MCFG_24C02_ADD("i2cmem")
MACHINE_CONFIG_END
void nes_datach_device::device_add_mconfig(machine_config &config)
{
BARCODE_READER(config, m_reader, 0);
NES_DATACH_SLOT(config, m_subslot, 0, datach_cart);
I2C_24C02(config, m_i2cmem);
}
//-------------------------------------------------

View File

@ -52,6 +52,15 @@ class nes_datach_slot_device : public device_t,
friend class nes_datach_device;
public:
// construction/destruction
template <typename T>
nes_datach_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&opts)
: nes_datach_slot_device(mconfig, tag, owner, clock)
{
option_reset();
opts(*this);
set_default_option(nullptr);
set_fixed(false);
}
nes_datach_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~nes_datach_slot_device();
@ -85,11 +94,6 @@ protected:
DECLARE_DEVICE_TYPE(NES_DATACH_SLOT, nes_datach_slot_device)
#define MCFG_DATACH_MINICART_ADD(_tag, _slot_intf) \
MCFG_DEVICE_ADD(_tag, NES_DATACH_SLOT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, nullptr, false)
//--------------------------------
//
// Datach Minicart implementation

View File

@ -59,7 +59,13 @@ static inline void ATTR_PRINTF( 3, 4 ) verboselog( device_t *device, int n_level
// device type definition
DEFINE_DEVICE_TYPE(I2CMEM, i2cmem_device, "i2cmem", "I2C Memory")
DEFINE_DEVICE_TYPE(X2404P, x2404p_device, "x2404p", "X2404P I2C Memory")
DEFINE_DEVICE_TYPE(I2C_X2404P, i2c_x2404p_device, "x2404p", "X2404P I2C Memory")
DEFINE_DEVICE_TYPE(I2C_24C01, i2c_24c01_device, "24c01", "24C01 I2C Memory")
DEFINE_DEVICE_TYPE(I2C_24C02, i2c_24c02_device, "24c02", "24C02 I2C Memory")
DEFINE_DEVICE_TYPE(I2C_24C08, i2c_24c08_device, "24c08", "24C08 I2C Memory")
DEFINE_DEVICE_TYPE(I2C_24C16, i2c_24c16_device, "24c16", "24C16 I2C Memory")
DEFINE_DEVICE_TYPE(I2C_24C16A, i2c_24c16a_device, "24c16a", "24C16A I2C Memory")
DEFINE_DEVICE_TYPE(I2C_24C64, i2c_24c64_device, "24c64", "24C64 I2C Memory")
//**************************************************************************
// LIVE DEVICE
@ -69,36 +75,64 @@ DEFINE_DEVICE_TYPE(X2404P, x2404p_device, "x2404p", "X2404P I2C Memory")
// i2cmem_device - constructor
//-------------------------------------------------
i2cmem_device::i2cmem_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, type, tag, owner, clock),
i2cmem_device::i2cmem_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, int page_size, int data_size)
: device_t(mconfig, type, tag, owner, (uint32_t)0),
device_nvram_interface(mconfig, *this),
m_region(*this, DEVICE_SELF),
m_slave_address( I2CMEM_SLAVE_ADDRESS ),
m_page_size( 0 ),
m_data_size( 0 ),
m_scl( 0 ),
m_sdaw( 0 ),
m_e0( 0 ),
m_e1( 0 ),
m_e2( 0 ),
m_wc( 0 ),
m_sdar( 1 ),
m_state( STATE_IDLE ),
m_shift( 0 ),
m_byteaddr( 0 )
m_slave_address(I2CMEM_SLAVE_ADDRESS),
m_page_size(page_size),
m_data_size(data_size),
m_scl(0),
m_sdaw(0),
m_e0(0),
m_e1(0),
m_e2(0),
m_wc(0),
m_sdar(1),
m_state(STATE_IDLE),
m_shift(0),
m_byteaddr(0)
{
}
i2cmem_device::i2cmem_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: i2cmem_device(mconfig, I2CMEM, tag, owner, clock)
: i2cmem_device(mconfig, I2CMEM, tag, owner, 0, 0)
{
}
x2404p_device::x2404p_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: i2cmem_device(mconfig, X2404P, tag, owner, clock)
i2c_x2404p_device::i2c_x2404p_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: i2cmem_device(mconfig, I2C_X2404P, tag, owner, 8, 0x200)
{
}
i2c_24c01_device::i2c_24c01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: i2cmem_device(mconfig, I2C_24C01, tag, owner, 4, 0x80)
{
}
i2c_24c02_device::i2c_24c02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: i2cmem_device(mconfig, I2C_24C02, tag, owner, 4, 0x100)
{
}
i2c_24c08_device::i2c_24c08_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: i2cmem_device(mconfig, I2C_24C08, tag, owner, 0, 0x400)
{
}
i2c_24c16_device::i2c_24c16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: i2cmem_device(mconfig, I2C_24C16, tag, owner, 8, 0x800)
{
}
i2c_24c16a_device::i2c_24c16a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: i2cmem_device(mconfig, I2C_24C16A, tag, owner, 0, 0x800)
{
}
i2c_24c64_device::i2c_24c64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: i2cmem_device(mconfig, I2C_24C64, tag, owner, 8, 0x2000)
{
set_page_size(8);
set_data_size(0x200);
}
//-------------------------------------------------

View File

@ -44,39 +44,6 @@
#define MCFG_I2CMEM_WC(wc) \
downcast<i2cmem_device &>(*device).set_wc(wc);
#define MCFG_X2404P_ADD( _tag ) \
MCFG_I2CMEM_ADD( _tag ) \
MCFG_I2CMEM_PAGE_SIZE(8) \
MCFG_I2CMEM_DATA_SIZE(0x200)
#define MCFG_24C01_ADD( _tag ) \
MCFG_I2CMEM_ADD( _tag ) \
MCFG_I2CMEM_PAGE_SIZE(4) \
MCFG_I2CMEM_DATA_SIZE(0x80)
#define MCFG_24C02_ADD( _tag ) \
MCFG_I2CMEM_ADD( _tag ) \
MCFG_I2CMEM_PAGE_SIZE(4) \
MCFG_I2CMEM_DATA_SIZE(0x100)
#define MCFG_24C08_ADD( _tag ) \
MCFG_I2CMEM_ADD( _tag ) \
MCFG_I2CMEM_DATA_SIZE(0x400)
#define MCFG_24C16_ADD( _tag ) \
MCFG_I2CMEM_ADD( _tag ) \
MCFG_I2CMEM_PAGE_SIZE(8) \
MCFG_I2CMEM_DATA_SIZE(0x800)
#define MCFG_24C16A_ADD( _tag ) \
MCFG_I2CMEM_ADD( _tag ) \
MCFG_I2CMEM_DATA_SIZE(0x800)
#define MCFG_24C64_ADD( _tag ) \
MCFG_I2CMEM_ADD( _tag ) \
MCFG_I2CMEM_PAGE_SIZE(8) \
MCFG_I2CMEM_DATA_SIZE(0x2000)
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@ -110,7 +77,7 @@ public:
protected:
// construction/destruction
i2cmem_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock = 0);
i2cmem_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, int page_size, int data_size);
// device-level overrides
virtual void device_start() override;
@ -149,15 +116,29 @@ protected:
int m_page_offset;
};
class x2404p_device : public i2cmem_device
{
public:
// construction/destruction
x2404p_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
};
#define DECLARE_I2C_DEVICE(name) \
class i2c_##name##_device : public i2cmem_device \
{ \
public: \
i2c_##name##_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); \
};
DECLARE_I2C_DEVICE(x2404p)
DECLARE_I2C_DEVICE(24c01)
DECLARE_I2C_DEVICE(24c02)
DECLARE_I2C_DEVICE(24c08)
DECLARE_I2C_DEVICE(24c16);
DECLARE_I2C_DEVICE(24c16a);
DECLARE_I2C_DEVICE(24c64);
// device type definition
DECLARE_DEVICE_TYPE(I2CMEM, i2cmem_device)
DECLARE_DEVICE_TYPE(X2404P, x2404p_device)
DECLARE_DEVICE_TYPE(I2CMEM, i2cmem_device)
DECLARE_DEVICE_TYPE(I2C_X2404P, i2c_x2404p_device)
DECLARE_DEVICE_TYPE(I2C_24C01, i2c_24c01_device)
DECLARE_DEVICE_TYPE(I2C_24C02, i2c_24c02_device)
DECLARE_DEVICE_TYPE(I2C_24C08, i2c_24c08_device)
DECLARE_DEVICE_TYPE(I2C_24C16, i2c_24c16_device)
DECLARE_DEVICE_TYPE(I2C_24C16A, i2c_24c16a_device)
DECLARE_DEVICE_TYPE(I2C_24C64, i2c_24c64_device)
#endif // MAME_MACHINE_I2CMEM_H

View File

@ -93,6 +93,7 @@ public:
, m_maincpu(*this, "maincpu")
, m_i2cmem(*this, "i2cmem")
, m_s3c2410(*this, "s3c2410")
, m_qs1000(*this, "qs1000")
, m_soundlatch(*this, "soundlatch")
, m_system_memory(*this, "systememory")
, m_flash(*this, "flash")
@ -110,6 +111,7 @@ private:
required_device<cpu_device> m_maincpu;
required_device<i2cmem_device> m_i2cmem;
required_device<s3c2410_device> m_s3c2410;
required_device<qs1000_device> m_qs1000;
required_device<generic_latch_8_device> m_soundlatch;
required_shared_ptr<uint32_t> m_system_memory;
required_region_ptr<uint8_t> m_flash;
@ -592,7 +594,7 @@ READ32_MEMBER(ghosteo_state::bballoon_speedup_r)
void ghosteo_state::machine_start()
{
// Set up the QS1000 program ROM banking, taking care not to overlap the internal RAM
machine().device("qs1000:cpu")->memory().space(AS_IO).install_read_bank(0x0100, 0xffff, "bank");
m_qs1000->subdevice<i8052_device>("cpu")->space(AS_IO).install_read_bank(0x0100, 0xffff, "bank");
membank("qs1000:bank")->configure_entries(0, 8, memregion("qs1000:cpu")->base()+0x100, 0x10000);
}
@ -640,17 +642,17 @@ void ghosteo_state::ghosteo(machine_config &config)
SPEAKER(config, "rspeaker").front_right();
GENERIC_LATCH_8(config, m_soundlatch);
m_soundlatch->data_pending_callback().set("qs1000", FUNC(qs1000_device::set_irq));
m_soundlatch->data_pending_callback().set(m_qs1000, FUNC(qs1000_device::set_irq));
m_soundlatch->set_separate_acknowledge(true);
qs1000_device &qs1000(QS1000(config, "qs1000", XTAL(24'000'000)));
qs1000.set_external_rom(true);
qs1000.p1_in().set("soundlatch", FUNC(generic_latch_8_device::read));
qs1000.p1_out().set(FUNC(ghosteo_state::qs1000_p1_w));
qs1000.p2_out().set(FUNC(ghosteo_state::qs1000_p2_w));
qs1000.p3_out().set(FUNC(ghosteo_state::qs1000_p3_w));
qs1000.add_route(0, "lspeaker", 1.0);
qs1000.add_route(1, "rspeaker", 1.0);
QS1000(config, m_qs1000, XTAL(24'000'000));
m_qs1000->set_external_rom(true);
m_qs1000->p1_in().set("soundlatch", FUNC(generic_latch_8_device::read));
m_qs1000->p1_out().set(FUNC(ghosteo_state::qs1000_p1_w));
m_qs1000->p2_out().set(FUNC(ghosteo_state::qs1000_p2_w));
m_qs1000->p3_out().set(FUNC(ghosteo_state::qs1000_p3_w));
m_qs1000->add_route(0, "lspeaker", 1.0);
m_qs1000->add_route(1, "rspeaker", 1.0);
}
void ghosteo_state::bballoon(machine_config &config)

View File

@ -1399,7 +1399,7 @@ MACHINE_CONFIG_START(peplus_state::peplus)
m_crtc->set_on_update_addr_change_callback(FUNC(peplus_state::crtc_addr), this);
m_crtc->out_vsync_callback().set(FUNC(peplus_state::crtc_vsync));
X2404P(config, m_i2cmem);
I2C_X2404P(config, m_i2cmem);
// sound hardware
SPEAKER(config, "mono").front_center();

View File

@ -135,7 +135,7 @@ private:
required_ioport m_i30;
required_ioport m_sensor;
required_device<i80c32_device> m_maincpu;
required_device<x2404p_device> m_i2cmem;
required_device<i2c_x2404p_device> m_i2cmem;
output_finder<9> m_digits;
output_finder<5,8> m_leds;
};
@ -700,7 +700,7 @@ void splus_state::splus(machine_config &config) // basic machine hardware
screen.set_visarea(0*8, 40*8-1, 0*8, 25*8-1);
screen.set_palette("palette");
X2404P(config, m_i2cmem);
I2C_X2404P(config, m_i2cmem);
// sound hardware
SPEAKER(config, "mono").front_center();

View File

@ -796,46 +796,45 @@ static INPUT_PORTS_START( tetfight )
INPUT_PORTS_END
MACHINE_CONFIG_START(ssfindo_state::ssfindo)
void ssfindo_state::ssfindo(machine_config &config)
{
/* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", ARM7, 54000000) // guess...
MCFG_DEVICE_PROGRAM_MAP(ssfindo_map)
ARM7(config, m_maincpu, 54000000); // guess...
m_maincpu->set_addrmap(AS_PROGRAM, &ssfindo_state::ssfindo_map);
m_maincpu->set_vblank_int("screen", FUNC(ssfindo_state::interrupt));
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", ssfindo_state, interrupt)
I2C_24C01(config, m_i2cmem);
MCFG_24C01_ADD("i2cmem")
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_refresh_hz(60);
screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
screen.set_size(320, 256);
screen.set_visarea(0, 319, 0, 239);
screen.set_screen_update(FUNC(ssfindo_state::screen_update));
screen.set_palette(m_palette);
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
MCFG_SCREEN_SIZE(320, 256)
MCFG_SCREEN_VISIBLE_AREA(0, 319, 0, 239)
MCFG_SCREEN_UPDATE_DRIVER(ssfindo_state, screen_update)
MCFG_SCREEN_PALETTE("palette")
PALETTE(config, m_palette).set_entries(256);
}
MCFG_PALETTE_ADD("palette", 256)
MACHINE_CONFIG_END
MACHINE_CONFIG_START(ssfindo_state::ppcar)
void ssfindo_state::ppcar(machine_config &config)
{
ssfindo(config);
/* basic machine hardware */
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(ppcar_map)
m_maincpu->set_addrmap(AS_PROGRAM, &ssfindo_state::ppcar_map);
config.device_remove("i2cmem");
MACHINE_CONFIG_END
}
MACHINE_CONFIG_START(ssfindo_state::tetfight)
void ssfindo_state::tetfight(machine_config &config)
{
ppcar(config);
/* basic machine hardware */
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(tetfight_map)
m_maincpu->set_addrmap(AS_PROGRAM, &ssfindo_state::tetfight_map);
MCFG_24C02_ADD("i2cmem")
MACHINE_CONFIG_END
I2C_24C02(config, m_i2cmem);
}
ROM_START( ssfindo )
ROM_REGION(0x100000, "maincpu", 0 ) /* ARM 32 bit code */

View File

@ -418,22 +418,23 @@ static INPUT_PORTS_START(twins)
INPUT_PORTS_END
MACHINE_CONFIG_START(twins_state::twinsed1)
void twins_state::twinsed1(machine_config &config)
{
/* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", V30, 8000000)
MCFG_DEVICE_PROGRAM_MAP(twins_map)
MCFG_DEVICE_IO_MAP(twinsed1_io)
V30(config, m_maincpu, 8000000);
m_maincpu->set_addrmap(AS_PROGRAM, &twins_state::twins_map);
m_maincpu->set_addrmap(AS_IO, &twins_state::twinsed1_io);
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(8000000, 512, 0, 320, 312, 0, 200) // 15.625 kHz horizontal???
MCFG_SCREEN_UPDATE_DRIVER(twins_state, screen_update_twins)
MCFG_SCREEN_PALETTE("palette")
MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("maincpu", INPUT_LINE_NMI))
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_raw(8000000, 512, 0, 320, 312, 0, 200); // 15.625 kHz horizontal???
screen.set_screen_update(FUNC(twins_state::screen_update_twins));
screen.set_palette(m_palette);
screen.screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI);
MCFG_24C02_ADD("i2cmem")
I2C_24C02(config, m_i2cmem);
MCFG_PALETTE_ADD("palette", 0x100)
PALETTE(config, m_palette).set_entries(0x100);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@ -442,7 +443,7 @@ MACHINE_CONFIG_START(twins_state::twinsed1)
aysnd.port_a_read_callback().set_ioport("P1");
aysnd.port_b_read_callback().set_ioport("P2");
aysnd.add_route(ALL_OUTPUTS, "mono", 1.0);
MACHINE_CONFIG_END
}
/* The Ecogames set and the Electronic Devices second set has different palette hardware
@ -465,25 +466,26 @@ void twins_state::ramdac_map(address_map &map)
}
MACHINE_CONFIG_START(twins_state::twins)
void twins_state::twins(machine_config &config)
{
/* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", V30, XTAL(16'000'000)/2) /* verified on pcb */
MCFG_DEVICE_PROGRAM_MAP(twins_map)
MCFG_DEVICE_IO_MAP(twins_io)
V30(config, m_maincpu, XTAL(16'000'000)/2); /* verified on pcb */
m_maincpu->set_addrmap(AS_PROGRAM, &twins_state::twins_map);
m_maincpu->set_addrmap(AS_IO, &twins_state::twins_io);
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(8000000, 512, 0, 320, 312, 0, 200) // 15.625 kHz horizontal???
MCFG_SCREEN_UPDATE_DRIVER(twins_state, screen_update_twins)
MCFG_SCREEN_PALETTE("palette")
MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("maincpu", INPUT_LINE_NMI))
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_raw(8000000, 512, 0, 320, 312, 0, 200); // 15.625 kHz horizontal???
screen.set_screen_update(FUNC(twins_state::screen_update_twins));
screen.set_palette(m_palette);
screen.screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI);
MCFG_PALETTE_ADD("palette", 256)
PALETTE(config, m_palette).set_entries(256);
ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette));
ramdac.set_addrmap(0, &twins_state::ramdac_map);
ramdac.set_split_read(0);
MCFG_24C02_ADD("i2cmem")
I2C_24C02(config, m_i2cmem);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@ -492,7 +494,7 @@ MACHINE_CONFIG_START(twins_state::twins)
aysnd.port_a_read_callback().set_ioport("P1");
aysnd.port_b_read_callback().set_ioport("P2");
aysnd.add_route(ALL_OUTPUTS, "mono", 1.0);
MACHINE_CONFIG_END
}
WRITE16_MEMBER(twins_state::spider_pal_w)
{
@ -590,22 +592,23 @@ void twins_state::spider_io(address_map &map)
}
MACHINE_CONFIG_START(twins_state::spider)
void twins_state::spider(machine_config &config)
{
/* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", V30, 8000000)
MCFG_DEVICE_PROGRAM_MAP(twins_map)
MCFG_DEVICE_IO_MAP(spider_io)
V30(config, m_maincpu, 8000000);
m_maincpu->set_addrmap(AS_PROGRAM, &twins_state::twins_map);
m_maincpu->set_addrmap(AS_IO, &twins_state::spider_io);
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(8000000, 512, 0, 320, 312, 0, 200) // 15.625 kHz horizontal???
MCFG_SCREEN_UPDATE_DRIVER(twins_state, screen_update_spider)
MCFG_SCREEN_PALETTE("palette")
MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("maincpu", INPUT_LINE_NMI))
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_raw(8000000, 512, 0, 320, 312, 0, 200); // 15.625 kHz horizontal???
screen.set_screen_update(FUNC(twins_state::screen_update_spider));
screen.set_palette(m_palette);
screen.screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI);
MCFG_PALETTE_ADD("palette", 0x100)
PALETTE(config, m_palette).set_entries(0x100);
MCFG_24C02_ADD("i2cmem")
I2C_24C02(config, m_i2cmem);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@ -614,7 +617,7 @@ MACHINE_CONFIG_START(twins_state::spider)
aysnd.port_a_read_callback().set_ioport("P1");
aysnd.port_b_read_callback().set_ioport("P2");
aysnd.add_route(ALL_OUTPUTS, "mono", 1.0);
MACHINE_CONFIG_END
}
/* ECOGAMES Twins */

View File

@ -0,0 +1,179 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
/******************************************************************************
Wireless Hunting Video Game System skeleton driver
System: Wireless Hunting Video Game System
Publisher: Hamy / Kids Station Toys Inc
Year: 2011
ROM: FDI MSP55LV100G
RAM: Micron Technology 48LC8M16A2
Games:
Secret Mission
Predator
Delta Force
Toy Land
Dream Forest
Trophy Season
Freedom Force
Be Careful
Net Power
Open Training
Super Archer
Ultimate Frisbee
UFO Shooting
Happy Darts
Balloon Shoot
Avatair
Angry Pirate
Penguin War
Ghost Shooter
Duck Hunt
ROM Board:
Package: SO44
Spacing: 1.27 mm
Width: 16.14 mm
Length: 27.78 mm
Voltage: 3V
Pinout:
A25 A24
| |
+--------------------------+
A21 --|== # # `.__.' ==|-- A20
A18 --|== ==|-- A19
A17 --|== ==|-- A8
A7 --|== ==|-- A9
A6 --|== o ==|-- A10
A5 --|== +----------------+ ==|-- A11
A4 --|== | | ==|-- A12
A3 --|== | MSP55LV100G | ==|-- A13
A2 --|== | 0834 M02H | ==|-- A14
A1 --|== | JAPAN | ==|-- A15
A0 --|== | | ==|-- A16
#CE --|== | | ==|-- A23
GND --|== | | ==|-- A22
#OE --|== | | ==|-- Q15
Q0 --|== | | ==|-- Q7
Q8 --|== | | ==|-- Q14
Q1 --|== +----------------+ ==|-- Q6
Q9 --|== ==|-- Q13
Q2 --|== M55L100G ==|-- Q5
Q10 --|== ==|-- Q12
Q3 --|== ==|-- Q4
Q11 --|== ==|-- VCC
+--------------------------+
The only interesting string in this ROM is SPF2ALP,
which is also found in the Wireless Air 60 ROM.
*******************************************************************************/
#include "emu.h"
#include "cpu/unsp/unsp.h"
#include "machine/spg2xx.h"
#include "screen.h"
#include "speaker.h"
class wrlshunt_state : public driver_device
{
public:
wrlshunt_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_screen(*this, "screen")
, m_spg(*this, "spg")
{ }
void wrlshunt(machine_config &config);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
void mem_map(address_map &map);
required_device<unsp12_device> m_maincpu;
required_device<screen_device> m_screen;
required_device<spg2xx_device> m_spg;
};
/************************************
*
* Machine Hardware
*
************************************/
void wrlshunt_state::machine_start()
{
}
void wrlshunt_state::machine_reset()
{
}
void wrlshunt_state::mem_map(address_map &map)
{
map(0x008000, 0x00ffff).rom().region("maincpu", 0x10000);
map(0x000000, 0x007fff).m(m_spg, FUNC(spg_wh_device::map));
map(0x040000, 0x07ffff).rom().region("maincpu", 0x106f000);
}
/************************************
*
* Inputs
*
************************************/
static INPUT_PORTS_START( wrlshunt )
INPUT_PORTS_END
/************************************
*
* Machine Configs
*
************************************/
void wrlshunt_state::wrlshunt(machine_config &config)
{
UNSP12(config, m_maincpu, XTAL(27'000'000));
m_maincpu->set_addrmap(AS_PROGRAM, &wrlshunt_state::mem_map);
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
m_screen->set_refresh_hz(60);
m_screen->set_size(320, 262);
m_screen->set_visarea(0, 320-1, 0, 240-1);
m_screen->set_screen_update("spg", FUNC(spg_wh_device::screen_update));
m_screen->screen_vblank().set(m_spg, FUNC(spg_wh_device::vblank));
SPG_WH(config, m_spg, XTAL(27'000'000), m_maincpu, m_screen);
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
m_spg->add_route(ALL_OUTPUTS, "lspeaker", 0.5);
m_spg->add_route(ALL_OUTPUTS, "rspeaker", 0.5);
}
/************************************
*
* ROM Loading
*
************************************/
ROM_START( wrlshunt )
ROM_REGION( 0x8000000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD16_WORD_SWAP( "wireless.bin", 0x0000, 0x8000000, CRC(a6ecc20e) SHA1(3645f23ba2bb218e92d4560a8ae29dddbaabf796) )
ROM_END
// valid looking code, but extended periperhal area (twice the size?)
CONS( 2011, wrlshunt, 0, 0, wrlshunt, wrlshunt, wrlshunt_state, empty_init, "Hamy / Kids Station Toys Inc", "Wireless Hunting Video Game System", MACHINE_NO_SOUND | MACHINE_NOT_WORKING )