(MESS) msx.c: Some small msx audio related updates (nw)

This commit is contained in:
Wilbert Pol 2014-05-24 18:28:39 +00:00
parent 0df6ace63c
commit 7b51d02baf
4 changed files with 171 additions and 6 deletions

View File

@ -14537,19 +14537,65 @@ kept for now until finding out what those bytes affect...
</software>
<software name="nms1205">
<description>Philips NMS-1205 Music Module</description>
<description>Philips NMS-1205 Music Module v1.2</description>
<year>198?</year>
<publisher>Philips</publisher>
<part name="cart" interface="msx_cart">
<feature name="slot" value="msxaud_nms1205" />
<dataarea name="rom" size="32768">
<!-- SUM16 should be DE54, not verified -->
<rom name="nms1205.bin" size="32768" crc="5ecaeef0" sha1="c7463e1fd0433c5d41b70670d6c10fd781b66426" offset="0" />
</dataarea>
<!--
This memory is currently declared as a memory region inside the nms1205 implementation otherwise the
legacy FM implementations cannot find it.
<dataarea name="ram" size="32768">
</dataarea>
-->
</part>
</software>
<!-- Unsure about the correctness of this dump. It boots straight into basic and you have to stasrt the internal software by doing 'call musicbox' -->
<software name="nms1205v11" cloneof="nms1205">
<description>Philips NMS-1205 Music Module v1.1</description>
<year>198?</year>
<publisher>Philips</publisher>
<part name="cart" interface="msx_cart">
<feature name="slot" value="msxaud_nms1205" />
<dataarea name="rom" size="32768">
<!-- SUM16: DE5C -->
<rom name="nms1205_de5c.bin" size="32768" crc="d8a17006" sha1="f081a884505af9a1080b2b57e86b6da93b784301" offset="0" />
</dataarea>
<!--
This memory is currently declared as a memory region inside the nms1205 implementation otherwise the
legacy FM implementations cannot find it.
<dataarea name="ram" size="32768">
</dataarea>
-->
</part>
</software>
<!--
<software name="nms1205v10" cloneof="nms1205" supported="no">
<description>Philips NMS-1205 Music Module v1.0</description>
<year>198?</year>
<publisher>Philips</publisher>
<part name="cart" interface="msx_cart">
<feature name="slot" value="msxaud_nms1205" />
<dataarea name="rom" size="32768">
<!-- SUM16: 53BF -->
<rom name="nms1205_53bf.bin" size="32768" crc="6e68bd44" sha1="146d9738b6d534277dab9b41a07556ffec9065b9" status="baddump" offset="0" />
</dataarea>
<!- -
This memory is currently declared as a memory region inside the nms1205 implementation otherwise the
legacy FM implementations cannot find it.
<dataarea name="ram" size="32768">
</dataarea>
- ->
</part>
</software>
-->
<!-- Dictionary ROMs? -->
<software name="natjis" supported="no">
<description>National FS-SR022 MSX-Jisho (Jpn)</description>

View File

@ -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

View File

@ -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();

View File

@ -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<msx_hxmu901>;
const device_type MSX_AUDIO_KB_NMS1160 = &device_creator<msx_nms1160>;