diff --git a/hash/msx1_cart.xml b/hash/msx1_cart.xml
index a9b0e069291..c646a97f513 100644
--- a/hash/msx1_cart.xml
+++ b/hash/msx1_cart.xml
@@ -14537,19 +14537,65 @@ kept for now until finding out what those bytes affect...
- Philips NMS-1205 Music Module
+ Philips NMS-1205 Music Module v1.2
198?
Philips
+
+
+
+
+ Philips NMS-1205 Music Module v1.1
+ 198?
+ Philips
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+- ->
+
+
+-->
+
National FS-SR022 MSX-Jisho (Jpn)
diff --git a/src/emu/bus/msx_cart/msx_audio.c b/src/emu/bus/msx_cart/msx_audio.c
index cf9f584b528..258aeebb703 100644
--- a/src/emu/bus/msx_cart/msx_audio.c
+++ b/src/emu/bus/msx_cart/msx_audio.c
@@ -29,6 +29,15 @@ The keyboards:
- Philips NMS-1160
+
+
+TODO:
+- Implement MIDI in/out/through
+- Sample RAM
+- Implement NMS-1160 keyboard
+- HX-MU901: ENTER/SELECT keys and multi sensors
+- NMS1160: Test the keyboard
+
**********************************************************************************/
#include "emu.h"
@@ -108,8 +117,6 @@ msx_cart_msx_audio_nms1205::msx_cart_msx_audio_nms1205(const machine_config &mco
static MACHINE_CONFIG_FRAGMENT( msx_audio_nms1205 )
- // There is a 2 MHz crystal on the PCB, where does it go?
-
// This is actually incorrect. The sound output is passed back into the MSX machine where it is mixed internally and output through the system 'speaker'.
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("y8950", Y8950, XTAL_3_579545MHz)
@@ -119,6 +126,7 @@ static MACHINE_CONFIG_FRAGMENT( msx_audio_nms1205 )
MCFG_MSX_AUDIO_KBDC_PORT_ADD("kbdc", msx_audio_keyboards, NULL)
+ // There is a 2 MHz crystal on the PCB, the 6850 TX and RX clocks are derived from it
MCFG_DEVICE_ADD("acia6850", ACIA6850, 0)
MACHINE_CONFIG_END
@@ -129,6 +137,17 @@ machine_config_constructor msx_cart_msx_audio_nms1205::device_mconfig_additions(
}
+ROM_START( msx_nms1205 )
+ ROM_REGION(0x8000, "y8950", ROMREGION_ERASE00)
+ROM_END
+
+
+const rom_entry *msx_cart_msx_audio_nms1205::device_rom_region() const
+{
+ return ROM_NAME( msx_nms1205 );
+}
+
+
void msx_cart_msx_audio_nms1205::device_start()
{
// Install IO read/write handlers
diff --git a/src/emu/bus/msx_cart/msx_audio.h b/src/emu/bus/msx_cart/msx_audio.h
index 066c4a50c38..d7545af3938 100644
--- a/src/emu/bus/msx_cart/msx_audio.h
+++ b/src/emu/bus/msx_cart/msx_audio.h
@@ -39,6 +39,7 @@ public:
// device-level overrides
virtual void device_start();
virtual machine_config_constructor device_mconfig_additions() const;
+ virtual const rom_entry *device_rom_region() const;
virtual void initialize_cartridge();
diff --git a/src/emu/bus/msx_cart/msx_audio_kb.c b/src/emu/bus/msx_cart/msx_audio_kb.c
index 600185b29f2..565525fadc7 100644
--- a/src/emu/bus/msx_cart/msx_audio_kb.c
+++ b/src/emu/bus/msx_cart/msx_audio_kb.c
@@ -179,18 +179,28 @@ public:
: device_t(mconfig, MSX_AUDIO_KB_NMS1160, "Philips NMS-1160", tag, owner, clock, "nms1160", __FILE__)
, msx_audio_kb_port_interface(mconfig, *this)
, m_row(0)
+ , m_keyboard(*this, "KEY")
{ };
-// virtual ioport_constructor device_input_ports() const;
+ virtual ioport_constructor device_input_ports() const;
virtual DECLARE_READ8_MEMBER(read)
{
- return 0xff;
+ UINT8 result = 0xff;
+
+ for (int i = 0; i < 8; i++)
+ {
+ if (BIT(m_row,i))
+ {
+ result &= m_keyboard[i]->read();
+ }
+ }
+ return result;
}
virtual DECLARE_WRITE8_MEMBER(write)
{
- printf("msx_nms1160::write %02x\n", data);
+ logerror("msx_nms1160::write %02x\n", data);
m_row = data;
}
@@ -199,9 +209,98 @@ protected:
private:
UINT8 m_row;
+ required_ioport_array<8> m_keyboard;
};
+static INPUT_PORTS_START( nms1160 )
+ PORT_START("KEY.0")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C1")
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C#1")
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D1")
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D#1")
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E1")
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1")
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F#1")
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G1")
+
+ PORT_START("KEY.1")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G#1")
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A1")
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A#1")
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B1")
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C2")
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C#2")
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D2")
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D#2")
+
+ PORT_START("KEY.2")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E2")
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2")
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F#2")
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G2")
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G#2")
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A2")
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A#2")
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B2")
+
+ PORT_START("KEY.3")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C3")
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C#3")
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D3")
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D#3")
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E3")
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3")
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F#3")
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G3")
+
+ PORT_START("KEY.4")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G#3")
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A3")
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A#3")
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B3")
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C4")
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C#4")
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D4")
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D#4")
+
+ PORT_START("KEY.5")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E4")
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4")
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F#4")
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G4")
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G#4")
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A4")
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A#4")
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B4")
+
+ PORT_START("KEY.6")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C5")
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C#5")
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D5")
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D#5")
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E5")
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F5")
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F#5")
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G5")
+
+ PORT_START("KEY.7")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G#5")
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A5")
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A#5")
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B5")
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C6")
+ PORT_BIT(0xe0, IP_ACTIVE_LOW, IPT_UNUSED)
+INPUT_PORTS_END
+
+
+ioport_constructor msx_nms1160::device_input_ports() const
+{
+ return INPUT_PORTS_NAME( nms1160 );
+}
+
+
+
const device_type MSX_AUDIO_KB_HXMU901 = &device_creator;
const device_type MSX_AUDIO_KB_NMS1160 = &device_creator;