summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/devices/bus/isa/aha1542c.cpp76
-rw-r--r--src/devices/bus/isa/aha1542c.h3
-rw-r--r--src/devices/bus/nes/mmc5.cpp16
-rw-r--r--src/devices/bus/nes/mmc5.h1
-rw-r--r--src/mame/drivers/ron.cpp4
-rw-r--r--src/mame/includes/funworld.h2
6 files changed, 91 insertions, 11 deletions
diff --git a/src/devices/bus/isa/aha1542c.cpp b/src/devices/bus/isa/aha1542c.cpp
index efb8181061c..d5c35166b1f 100644
--- a/src/devices/bus/isa/aha1542c.cpp
+++ b/src/devices/bus/isa/aha1542c.cpp
@@ -213,11 +213,6 @@ ROM_START( aha1542cp )
ROM_END
-u8 aha1542c_device::local_status_r()
-{
- return m_eeprom->do_read() << 7;
-}
-
void aha1542c_device::local_latch_w(u8 data)
{
m_eeprom->cs_write(BIT(data, 2));
@@ -230,7 +225,7 @@ void aha1542c_device::z84c0010_mem(address_map &map)
{
map(0x0000, 0x7fff).rom().region(Z84C0010_TAG, 0);
map(0x8000, 0x9fff).ram(); // 2kb RAM chip
- map(0xa000, 0xa000).r(FUNC(aha1542c_device::local_status_r));
+ map(0xa000, 0xa000).portr("SWITCHES");
map(0xb000, 0xb000).w(FUNC(aha1542c_device::local_latch_w));
map(0xe000, 0xe0ff).ram(); // probably PC<->Z80 communication area
map(0xe003, 0xe003).lr8("e003_r", []() { return 0x20; });
@@ -238,6 +233,7 @@ void aha1542c_device::z84c0010_mem(address_map &map)
u8 aha1542cp_device::eeprom_r()
{
+ // TODO: bits 4 and 5 are also used
return m_eeprom->do_read();
}
@@ -252,10 +248,78 @@ void aha1542cp_device::local_mem(address_map &map)
{
map(0x0000, 0x7fff).rom().region(Z84C0010_TAG, 0);
map(0x8000, 0x9fff).ram();
+ map(0xc000, 0xc000).portr("SWITCHES");
map(0xc001, 0xc001).rw(FUNC(aha1542cp_device::eeprom_r), FUNC(aha1542cp_device::eeprom_w));
map(0xe003, 0xe003).nopr();
}
+static INPUT_PORTS_START( aha1542c )
+ PORT_START("SWITCHES")
+ PORT_DIPNAME(0x07, 0x07, "I/O Port Address") PORT_DIPLOCATION("S1:2,3,4")
+ PORT_DIPSETTING(0x07, "330-333h")
+ PORT_DIPSETTING(0x06, "334-337h")
+ PORT_DIPSETTING(0x05, "230-233h")
+ PORT_DIPSETTING(0x04, "234-237h")
+ PORT_DIPSETTING(0x03, "130-133h")
+ PORT_DIPSETTING(0x02, "134-137h")
+ PORT_DIPSETTING(0x00, "Diagnostics Only") // not documented
+ PORT_DIPNAME(0x08, 0x08, "SCSI Termination") PORT_DIPLOCATION("S1:1")
+ PORT_DIPSETTING(0x00, "Installed")
+ PORT_DIPSETTING(0x08, "Software Controlled")
+ PORT_DIPNAME(0x70, 0x70, "BIOS Address") PORT_DIPLOCATION("S1:6,7,8")
+ PORT_DIPSETTING(0x00, "Disabled")
+ PORT_DIPSETTING(0x20, "C8000h")
+ PORT_DIPSETTING(0x30, "CC000h")
+ PORT_DIPSETTING(0x40, "D0000h")
+ PORT_DIPSETTING(0x50, "D4000h")
+ PORT_DIPSETTING(0x60, "D8000h")
+ PORT_DIPSETTING(0x70, "DC000h")
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
+
+ PORT_START("FDC_CONFIG")
+ PORT_DIPNAME(0x1, 0x1, "Floppy Disk Controller") PORT_DIPLOCATION("S1:5")
+ PORT_DIPSETTING(0x0, "Disabled")
+ PORT_DIPSETTING(0x1, "Enabled")
+INPUT_PORTS_END
+
+static INPUT_PORTS_START( aha1542cp )
+ PORT_START("SWITCHES")
+ PORT_DIPNAME(0x0e, 0x0e, "I/O Port Address") PORT_DIPLOCATION("S1:2,3,4")
+ PORT_DIPSETTING(0x0e, "330-333h")
+ PORT_DIPSETTING(0x0c, "334-337h")
+ PORT_DIPSETTING(0x0a, "230-233h")
+ PORT_DIPSETTING(0x08, "234-237h")
+ PORT_DIPSETTING(0x06, "130-133h")
+ PORT_DIPSETTING(0x04, "134-137h")
+ PORT_DIPSETTING(0x00, "Diagnostics Only") // not documented
+ PORT_DIPNAME(0x10, 0x10, "Plug and Play") PORT_DIPLOCATION("S1:1")
+ PORT_DIPSETTING(0x00, "Disabled")
+ PORT_DIPSETTING(0x10, "Enabled")
+ PORT_DIPNAME(0xe0, 0xe0, "BIOS Address") PORT_DIPLOCATION("S1:6,7,8")
+ PORT_DIPSETTING(0x00, "Disabled")
+ PORT_DIPSETTING(0x40, "C8000h")
+ PORT_DIPSETTING(0x60, "CC000h")
+ PORT_DIPSETTING(0x80, "D0000h")
+ PORT_DIPSETTING(0xa0, "D4000h")
+ PORT_DIPSETTING(0xc0, "D8000h")
+ PORT_DIPSETTING(0xe0, "DC000h")
+
+ PORT_START("FDC_CONFIG")
+ PORT_DIPNAME(0x1, 0x1, "Floppy Disk Controller") PORT_DIPLOCATION("S1:5")
+ PORT_DIPSETTING(0x0, "Disabled")
+ PORT_DIPSETTING(0x1, "Enabled")
+INPUT_PORTS_END
+
+ioport_constructor aha1542c_device::device_input_ports() const
+{
+ return INPUT_PORTS_NAME( aha1542c );
+}
+
+ioport_constructor aha1542cp_device::device_input_ports() const
+{
+ return INPUT_PORTS_NAME( aha1542cp );
+}
+
const tiny_rom_entry *aha1542c_device::device_rom_region() const
{
return ROM_NAME( aha1542c );
diff --git a/src/devices/bus/isa/aha1542c.h b/src/devices/bus/isa/aha1542c.h
index 2294096bde7..005c688c053 100644
--- a/src/devices/bus/isa/aha1542c.h
+++ b/src/devices/bus/isa/aha1542c.h
@@ -39,7 +39,6 @@ public:
protected:
aha1542c_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
- u8 local_status_r();
void local_latch_w(u8 data);
// device-level overrides
@@ -47,6 +46,7 @@ protected:
virtual void device_reset() override;
// optional information overrides
+ virtual ioport_constructor device_input_ports() const override;
virtual const tiny_rom_entry *device_rom_region() const override;
virtual void device_add_mconfig(machine_config &config) override;
@@ -77,6 +77,7 @@ public:
aha1542cp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
+ virtual ioport_constructor device_input_ports() const override;
virtual void device_add_mconfig(machine_config &config) override;
virtual const tiny_rom_entry *device_rom_region() const override;
diff --git a/src/devices/bus/nes/mmc5.cpp b/src/devices/bus/nes/mmc5.cpp
index b512f914e8b..1feef95aa67 100644
--- a/src/devices/bus/nes/mmc5.cpp
+++ b/src/devices/bus/nes/mmc5.cpp
@@ -18,6 +18,7 @@
#include "emu.h"
#include "mmc5.h"
+#include "speaker.h"
#ifdef NES_PCB_DEBUG
#define VERBOSE 1
@@ -46,7 +47,7 @@ nes_exrom_device::nes_exrom_device(const machine_config &mconfig, const char *ta
, m_prg_mode(0), m_chr_mode(0), m_wram_protect_1(0), m_wram_protect_2(0), m_exram_control(0), m_wram_base(0), m_last_chr(0), m_ex1_chr(0)
, m_split_chr(0), m_ex1_bank(0), m_high_chr(0), m_split_scr(0), m_split_rev(0), m_split_ctrl(0), m_split_yst(0), m_split_bank(0), m_vcount(0)
, m_ppu(*this, ":ppu") // FIXME: this dependency should not exist
- , m_sound(*this, ":maincpu:nesapu") // FIXME: this is a hack, it should have extra channels, not pass to the existing APU!!!
+ , m_sound(*this, "mmc5snd") // FIXME: this is a hack, it should be separated device, similar not same as NES APU!!!
{
}
@@ -677,3 +678,16 @@ void nes_exrom_device::write_h(offs_t offset, uint8_t data)
else if (!m_prgram.empty())
m_prgram[(((m_ram_hi_banks[bank] & 3) * 0x2000) + (offset & 0x1fff)) & (m_prgram.size() - 1)] = data;
}
+
+//-------------------------------------------------
+// device_add_mconfig - add device configuration
+//-------------------------------------------------
+
+void nes_exrom_device::device_add_mconfig(machine_config &config)
+{
+ // additional sound hardware
+ SPEAKER(config, "addon").front_center();
+
+ // TODO: temporary; will be separated device
+ NES_APU(config, m_sound, XTAL(21'477'272)/12).add_route(ALL_OUTPUTS, "addon", 0.50);
+}
diff --git a/src/devices/bus/nes/mmc5.h b/src/devices/bus/nes/mmc5.h
index 093a64471d0..86914fec177 100644
--- a/src/devices/bus/nes/mmc5.h
+++ b/src/devices/bus/nes/mmc5.h
@@ -36,6 +36,7 @@ public:
protected:
// device-level overrides
+ virtual void device_add_mconfig(machine_config &config) override;
virtual void device_start() override;
void set_mirror(int page, int src);
diff --git a/src/mame/drivers/ron.cpp b/src/mame/drivers/ron.cpp
index a2f6d8d91b2..7b8a5294888 100644
--- a/src/mame/drivers/ron.cpp
+++ b/src/mame/drivers/ron.cpp
@@ -2,7 +2,7 @@
// copyright-holders:Angelo Salese, AJR
/***************************************************************************
- Ron II Mah-Jongg (c) 1981 Sanritsu
+ Futari Mahjong Ron II (c) 1981 Sanritsu
TODO:
- colors;
@@ -559,4 +559,4 @@ ROM_START( ron2 )
ROM_LOAD( "82s129_4.2m", 0x100, 0x100, CRC(f3c05d59) SHA1(bd48963aa9f2bedaa0c1fd031d7c93089161d1d9) )
ROM_END
-GAME( 1981, ron2, 0, ron, ron, ron_state, empty_init, ROT270, "Sanritsu", "Ron II Mah-Jongg", MACHINE_IMPERFECT_SOUND | MACHINE_WRONG_COLORS )
+GAME( 1981, ron2, 0, ron, ron, ron_state, empty_init, ROT270, "Sanritsu", "Futari Mahjong Ron II", MACHINE_IMPERFECT_SOUND | MACHINE_WRONG_COLORS )
diff --git a/src/mame/includes/funworld.h b/src/mame/includes/funworld.h
index dd52c62d0cb..69666f020e8 100644
--- a/src/mame/includes/funworld.h
+++ b/src/mame/includes/funworld.h
@@ -77,7 +77,7 @@ private:
required_shared_ptr<uint8_t> m_videoram;
required_shared_ptr<uint8_t> m_colorram;
required_device<palette_device> m_palette;
- required_device<i2cmem_device> m_i2cmem;
+ optional_device<i2cmem_device> m_i2cmem;
output_finder<8> m_lamps;
};