mirror of
https://github.com/holub/mame
synced 2025-04-18 22:49:58 +03:00
(MESS) c64: Emulated the Wersi Wersiboard Music 64 / Siel CMK 49 Keyboard. [Curt Coder]
This commit is contained in:
parent
6da8fcb06a
commit
268de4b9d0
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -7255,6 +7255,8 @@ src/mess/machine/c64/mikro_assembler.c svneol=native#text/plain
|
||||
src/mess/machine/c64/mikro_assembler.h svneol=native#text/plain
|
||||
src/mess/machine/c64/multiscreen.c svneol=native#text/plain
|
||||
src/mess/machine/c64/multiscreen.h svneol=native#text/plain
|
||||
src/mess/machine/c64/music64.c svneol=native#text/plain
|
||||
src/mess/machine/c64/music64.h svneol=native#text/plain
|
||||
src/mess/machine/c64/neoram.c svneol=native#text/plain
|
||||
src/mess/machine/c64/neoram.h svneol=native#text/plain
|
||||
src/mess/machine/c64/ocean.c svneol=native#text/plain
|
||||
|
@ -6932,4 +6932,16 @@
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="music64">
|
||||
<description>Wersiboard Music 64</description>
|
||||
<year>1985</year>
|
||||
<publisher>Wersi</publisher>
|
||||
|
||||
<part name="cart" interface="c64_cart">
|
||||
<feature name="slot" value="music64" />
|
||||
<dataarea name="roml" size="0x2000">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
</softwarelist>
|
||||
|
@ -15,4 +15,43 @@
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="cmk49">
|
||||
<description>CMK 49 Computer Musical Keyboard</description>
|
||||
<year>198?</year>
|
||||
<publisher>Siel</publisher>
|
||||
<sharedfeat name="requirement" value="c64_cart:music64"/>
|
||||
|
||||
<part name="cass1" interface="cbm_cass">
|
||||
<dataarea name="cass" size="1549572">
|
||||
<rom name="cmk49.tap" size="1549572" crc="8327b982" sha1="99d31d813fba9f9f8d60e101b64741159fcf6ce9" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="mono64">
|
||||
<description>Mono-64</description>
|
||||
<year>198?</year>
|
||||
<publisher>Novel International</publisher>
|
||||
<sharedfeat name="requirement" value="c64_cart:music64"/>
|
||||
|
||||
<part name="cass1" interface="cbm_cass">
|
||||
<dataarea name="cass" size="398242">
|
||||
<rom name="mono64.tap" size="398242" crc="805c0c1c" sha1="caa44fb66de7fac9b88105bdbe6d56465206ddc0" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="poly64">
|
||||
<description>Poly-64</description>
|
||||
<year>198?</year>
|
||||
<publisher>Novel International</publisher>
|
||||
<sharedfeat name="requirement" value="c64_cart:music64"/>
|
||||
|
||||
<part name="cass1" interface="cbm_cass">
|
||||
<dataarea name="cass" size="339731">
|
||||
<rom name="poly64.tap" size="339731" crc="62b6ba45" sha1="5bfd8c63babbf44f8d7d2c81909a1e630b10bea3" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
</softwarelist>
|
||||
|
@ -1033,6 +1033,34 @@
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="music64">
|
||||
<description>Music 64</description>
|
||||
<year>198?</year>
|
||||
<publisher>Novel International</publisher>
|
||||
<sharedfeat name="compatibility" value="NTSC,PAL"/>
|
||||
<sharedfeat name="requirement" value="c64_cart:music64"/>
|
||||
|
||||
<part name="flop1" interface="floppy_5_25">
|
||||
<dataarea name="flop" size="174848">
|
||||
<rom name="novel.d64" size="174848" crc="637da7dc" sha1="2ec0470f73244e7f4eff93d6ac9cd1b9b64f0f4a" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="cmk49">
|
||||
<description>CMK 49 Computer Musical Keyboard</description>
|
||||
<year>198?</year>
|
||||
<publisher>Siel</publisher>
|
||||
<sharedfeat name="compatibility" value="NTSC,PAL"/>
|
||||
<sharedfeat name="requirement" value="c64_cart:music64"/>
|
||||
|
||||
<part name="flop1" interface="floppy_5_25">
|
||||
<dataarea name="flop" size="174848">
|
||||
<rom name="cmk49.d64" size="174848" crc="5ef6645a" sha1="c9afd892731ebd68bc67bd8c6c84cbb1aa5e874d" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<!-- Test -->
|
||||
|
||||
<software name="tsuit215">
|
||||
|
239
src/mess/machine/c64/music64.c
Normal file
239
src/mess/machine/c64/music64.c
Normal file
@ -0,0 +1,239 @@
|
||||
/**********************************************************************
|
||||
|
||||
Wersi Wersiboard Music 64 / Siel CMK 49 Keyboard emulation
|
||||
|
||||
Copyright MESS Team.
|
||||
Visit http://mamedev.org for licensing and usage restrictions.
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
/*
|
||||
5 PRINT "MUSIC 64 & CMK 49 TEST"
|
||||
6 PRINT " BY CARLO MERLANO"
|
||||
7 PRINT "PLAY THE MUSIC KEYBOARD!"
|
||||
8 F1=65.4:POKE 54296,15
|
||||
9 POKE 54277,25:POKE 54278,68
|
||||
10 IF PE=255 THEN POKE 54276,0
|
||||
20 FOR I=1 TO 8
|
||||
30 PO=57087+I:PE=PEEK(PO)
|
||||
40 IF PE<255 THEN GOSUB 100
|
||||
50 NEXT I
|
||||
60 GOTO 10
|
||||
100 KK=LOG(255-PE)/LOG(2)+8*I-7
|
||||
110 FKK=(2^(1/12))^(KK-1)*F1
|
||||
120 N=FKK*16.3835
|
||||
130 NHI=INT(N/256):NLO=N-NHI*256
|
||||
140 POKE 54276,17
|
||||
150 POKE 54273,NHI:POKE 54272,NLO
|
||||
160 I=0
|
||||
170 RETURN
|
||||
*/
|
||||
|
||||
#include "music64.h"
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
const device_type C64_MUSIC64 = &device_creator<c64_music64_cartridge_device>;
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// MACHINE_CONFIG_FRAGMENT( c64_music64 )
|
||||
//-------------------------------------------------
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( c64_music64 )
|
||||
MCFG_C64_PASSTHRU_EXPANSION_SLOT_ADD()
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - device-specific
|
||||
// machine configurations
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor c64_music64_cartridge_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( c64_music64 );
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// INPUT_PORTS( c64_music64 )
|
||||
//-------------------------------------------------
|
||||
|
||||
static INPUT_PORTS_START( c64_music64 )
|
||||
PORT_START("KB0")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("C2")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("C#2")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("D")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("D#2")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("E2")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F2")
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F#2")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("G2")
|
||||
|
||||
PORT_START("KB1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("G#2")
|
||||
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("C3")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("C#3")
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("D3")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("D#3")
|
||||
|
||||
PORT_START("KB2")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("E3")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F3")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F#3")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("G3")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("G#3")
|
||||
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("KB3")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("C4")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("C#4")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("D4")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("D#4")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("E4")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F4")
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F#4")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("G4")
|
||||
|
||||
PORT_START("KB4")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("G#4")
|
||||
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("C5")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("C#5")
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("D5")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("D#5")
|
||||
|
||||
PORT_START("KB5")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("E5")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F5")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F#5")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("G5")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("G#5")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("A6")
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("A#6")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("B6")
|
||||
|
||||
PORT_START("KB6")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("C6")
|
||||
PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// input_ports - device-specific input ports
|
||||
//-------------------------------------------------
|
||||
|
||||
ioport_constructor c64_music64_cartridge_device::device_input_ports() const
|
||||
{
|
||||
return INPUT_PORTS_NAME( c64_music64 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// c64_music64_cartridge_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
c64_music64_cartridge_device::c64_music64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, C64_MUSIC64, "C64 Music 64 cartridge", tag, owner, clock, "c64_music64", __FILE__),
|
||||
device_c64_expansion_card_interface(mconfig, *this),
|
||||
m_exp(*this, C64_EXPANSION_SLOT_TAG),
|
||||
m_kb0(*this, "KB0"),
|
||||
m_kb1(*this, "KB1"),
|
||||
m_kb2(*this, "KB2"),
|
||||
m_kb3(*this, "KB3"),
|
||||
m_kb4(*this, "KB4"),
|
||||
m_kb5(*this, "KB5"),
|
||||
m_kb6(*this, "KB6")
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void c64_music64_cartridge_device::device_start()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void c64_music64_cartridge_device::device_reset()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_music64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int sphi2, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
data = m_exp->cd_r(space, offset, data, sphi2, ba, roml, romh, io1, io2);
|
||||
|
||||
if (!io2)
|
||||
{
|
||||
switch (offset & 0x07)
|
||||
{
|
||||
case 0x00: data = m_kb0->read(); break;
|
||||
case 0x01: data = m_kb1->read(); break;
|
||||
case 0x02: data = m_kb2->read(); break;
|
||||
case 0x03: data = m_kb3->read(); break;
|
||||
case 0x04: data = m_kb4->read(); break;
|
||||
case 0x05: data = m_kb5->read(); break;
|
||||
case 0x06: data = m_kb6->read(); break;
|
||||
}
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// c64_cd_w - cartridge data write
|
||||
//-------------------------------------------------
|
||||
|
||||
void c64_music64_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int sphi2, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
m_exp->cd_w(space, offset, data, sphi2, ba, roml, romh, io1, io2);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// c64_game_r - GAME read
|
||||
//-------------------------------------------------
|
||||
|
||||
int c64_music64_cartridge_device::c64_game_r(offs_t offset, int sphi2, int ba, int rw, int hiram)
|
||||
{
|
||||
return m_exp->game_r(offset, sphi2, ba, rw, hiram);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// c64_exrom_r - EXROM read
|
||||
//-------------------------------------------------
|
||||
|
||||
int c64_music64_cartridge_device::c64_exrom_r(offs_t offset, int sphi2, int ba, int rw, int hiram)
|
||||
{
|
||||
return m_exp->exrom_r(offset, sphi2, ba, rw, hiram);
|
||||
}
|
65
src/mess/machine/c64/music64.h
Normal file
65
src/mess/machine/c64/music64.h
Normal file
@ -0,0 +1,65 @@
|
||||
/**********************************************************************
|
||||
|
||||
Wersi Wersiboard Music 64 / Siel CMK 49 Keyboard emulation
|
||||
|
||||
Copyright MESS Team.
|
||||
Visit http://mamedev.org for licensing and usage restrictions.
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __MUSIC64__
|
||||
#define __MUSIC64__
|
||||
|
||||
#include "emu.h"
|
||||
#include "machine/c64/exp.h"
|
||||
#include "machine/cbmipt.h"
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> c64_music64_cartridge_device
|
||||
|
||||
class c64_music64_cartridge_device : public device_t,
|
||||
public device_c64_expansion_card_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
c64_music64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// optional information overrides
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
virtual ioport_constructor device_input_ports() const;
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int sphi2, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int sphi2, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual int c64_game_r(offs_t offset, int sphi2, int ba, int rw, int hiram);
|
||||
virtual int c64_exrom_r(offs_t offset, int sphi2, int ba, int rw, int hiram);
|
||||
|
||||
private:
|
||||
required_device<c64_expansion_slot_device> m_exp;
|
||||
required_ioport m_kb0;
|
||||
required_ioport m_kb1;
|
||||
required_ioport m_kb2;
|
||||
required_ioport m_kb3;
|
||||
required_ioport m_kb4;
|
||||
required_ioport m_kb5;
|
||||
required_ioport m_kb6;
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
extern const device_type C64_MUSIC64;
|
||||
|
||||
|
||||
#endif
|
@ -1133,6 +1133,7 @@ SLOT_INTERFACE_START( c64_expansion_cards )
|
||||
SLOT_INTERFACE("midipp", C64_MIDI_PASSPORT)
|
||||
SLOT_INTERFACE("midisci", C64_MIDI_SCI)
|
||||
SLOT_INTERFACE("midisiel", C64_MIDI_SIEL)
|
||||
SLOT_INTERFACE("music64", C64_MUSIC64)
|
||||
SLOT_INTERFACE("neoram", C64_NEORAM)
|
||||
SLOT_INTERFACE("reu1700", C64_REU1700)
|
||||
SLOT_INTERFACE("reu1750", C64_REU1750)
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include "machine/c64/midi_siel.h"
|
||||
#include "machine/c64/mikro_assembler.h"
|
||||
#include "machine/c64/multiscreen.h"
|
||||
#include "machine/c64/music64.h"
|
||||
#include "machine/c64/neoram.h"
|
||||
#include "machine/c64/ocean.h"
|
||||
#include "machine/c64/pagefox.h"
|
||||
|
@ -1114,6 +1114,7 @@ $(MESSOBJ)/cbm.a: \
|
||||
$(MESS_MACHINE)/c64/midi_siel.o \
|
||||
$(MESS_MACHINE)/c64/mikro_assembler.o \
|
||||
$(MESS_MACHINE)/c64/multiscreen.o \
|
||||
$(MESS_MACHINE)/c64/music64.o \
|
||||
$(MESS_MACHINE)/c64/neoram.o\
|
||||
$(MESS_MACHINE)/c64/ocean.o \
|
||||
$(MESS_MACHINE)/c64/pagefox.o \
|
||||
|
Loading…
Reference in New Issue
Block a user