mirror of
https://github.com/holub/mame
synced 2025-04-16 13:34:55 +03:00
(MESS) c64: Magic Voice WIP. (nw)
This commit is contained in:
parent
e9b19492d0
commit
373f2ec13e
@ -614,7 +614,7 @@
|
||||
<feature name="game" value="0" />
|
||||
<feature name="exrom" value="1" />
|
||||
|
||||
<dataarea name="roml" size="0x4000">
|
||||
<dataarea name="romh" size="0x4000">
|
||||
<rom name="251476" size="0x4000" crc="c741fa77" sha1="2044028d42def60df79b8ab57d005721b41190fa" offset="0x0000" />
|
||||
</dataarea>
|
||||
</part>
|
||||
@ -2372,6 +2372,7 @@
|
||||
</software>
|
||||
|
||||
<software name="gorf">
|
||||
<!-- supports Magic Voice -->
|
||||
<description>Gorf</description>
|
||||
<year>1983</year>
|
||||
<publisher>Commodore</publisher>
|
||||
@ -4093,6 +4094,7 @@
|
||||
</software>
|
||||
|
||||
<software name="wow">
|
||||
<!-- supports Magic Voice -->
|
||||
<description>Wizard of Wor</description>
|
||||
<year>1984</year>
|
||||
<publisher>Commodore</publisher>
|
||||
@ -6894,6 +6896,24 @@
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="abc" supported="no">
|
||||
<!-- requires Magic Voice to run -->
|
||||
<description>A Bee Cee's</description>
|
||||
<year>198?</year>
|
||||
<publisher>Commodore</publisher>
|
||||
<info name="serial" value="C-64320" />
|
||||
<sharedfeat name="compatibility" value="NTSC,PAL"/>
|
||||
|
||||
<part name="cart" interface="c64_cart">
|
||||
<feature name="game" value="0" />
|
||||
<feature name="exrom" value="0" />
|
||||
|
||||
<dataarea name="roml" size="0x4000">
|
||||
<rom name="a-bee-c.rom" size="0x4000" crc="5cfe999c" sha1="57202c3829f1d668c445ae7e792ae80245682a99" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<!-- Dummy cartridge entries to allow requirement mappings from c64_flop -->
|
||||
|
||||
<software name="cpm">
|
||||
|
@ -54,4 +54,39 @@
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="getrdyrd">
|
||||
<description>Get Ready to Read with BJ Bear</description>
|
||||
<year>1984</year>
|
||||
<publisher>Commodore</publisher>
|
||||
<sharedfeat name="requirement" value="c64_cart:magicvce"/>
|
||||
|
||||
<part name="cass1" interface="cbm_cass">
|
||||
<feature name="part_id" value="Level 1"/>
|
||||
<dataarea name="cass" size="970430">
|
||||
<rom name="get_ready_to_read_with_bj_bear_level_1.tap" size="970430" crc="a7d4dd62" sha1="f0f6812903bc4dd5911bb539bbe4f2f8cd7587b1" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
|
||||
<part name="cass2" interface="cbm_cass">
|
||||
<feature name="part_id" value="Level 2"/>
|
||||
<dataarea name="cass" size="1011790">
|
||||
<rom name="get_ready_to_read_with_bj_bear_level_2.tap" size="1011790" crc="1eefb4bc" sha1="02ec52cab63fa236acc44f43de51edad496a438a" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
|
||||
<part name="cass3" interface="cbm_cass">
|
||||
<feature name="part_id" value="Level 3"/>
|
||||
<dataarea name="cass" size="1117066">
|
||||
<rom name="get_ready_to_read_with_bj_bear_level_3.tap" size="1117066" crc="edb07330" sha1="6fed14fc5cc3e27ce658bf1d26713257d4b8a5f0" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
|
||||
<part name="cass4" interface="cbm_cass">
|
||||
<feature name="part_id" value="Level 4"/>
|
||||
<dataarea name="cass" size="1165314">
|
||||
<rom name="get_ready_to_read_with_bj_bear_level_4.tap" size="1165314" crc="411da83e" sha1="ba7f2c3b5e7e77064a208ca89f78284ec35f6787" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
</softwarelist>
|
||||
|
@ -587,6 +587,19 @@
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="getrdynu">
|
||||
<description>Get Ready for Number with BJ Bear</description>
|
||||
<year>1984</year>
|
||||
<publisher>Commodore</publisher>
|
||||
<sharedfeat name="requirement" value="c64_cart:magicvce"/>
|
||||
|
||||
<part name="flop1" interface="floppy_5_25">
|
||||
<dataarea name="flop" size="174848">
|
||||
<rom name="get_ready_for_number_with_bj_bear.d64" size="174848" crc="58c4760d" sha1="7c2165ae9e4322addef6666cdb996c8ad0914c15" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<!-- Test/Demo disks -->
|
||||
|
||||
<software name="1541demo">
|
||||
@ -798,6 +811,19 @@
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="mvdemo">
|
||||
<description>Magic Voice Demo Disk</description>
|
||||
<year>198?</year>
|
||||
<publisher>Commodore</publisher>
|
||||
<sharedfeat name="requirement" value="c64_cart:magicvce"/>
|
||||
|
||||
<part name="flop1" interface="floppy_5_25">
|
||||
<dataarea name="flop" size="174848">
|
||||
<rom name="magicvoicedemo.d64 " size="174848" crc="e33213bf" sha1="e46300be955d64266d20c614aa1549f4c5640517" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="swiftlnk">
|
||||
<description>CMD SwiftLink</description>
|
||||
<year>1990</year>
|
||||
|
@ -99,3 +99,13 @@ WRITE8_MEMBER( t6721a_device::write )
|
||||
WRITE_LINE_MEMBER( t6721a_device::di_w )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// eos_r - eos read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ_LINE_MEMBER( t6721a_device::eos_r )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -77,6 +77,8 @@ public:
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( di_w );
|
||||
|
||||
DECLARE_READ_LINE_MEMBER( eos_r );
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
|
@ -7,6 +7,31 @@
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
/*
|
||||
|
||||
LA05-123 Pinout
|
||||
---------------
|
||||
_____ _____
|
||||
NEXTP 1 |* \_/ | 28 +5V
|
||||
PD0 2 | | 27 _ROML2
|
||||
PD1 3 | | 26 _ROML
|
||||
PD2 4 | | 25 _I/O2
|
||||
PD3 5 | | 24 _GAME
|
||||
CLEAR 6 | | 23 PHI2
|
||||
_RAM/EPROM 7 | LA05-123 | 22 _ROMH2
|
||||
PB5 8 | LA05-124 | 21 _ROMH
|
||||
PB6 9 | | 20 CLOCK
|
||||
_6525 10 | | 19 SDO
|
||||
_EPROM 11 | | 18 NEXTS
|
||||
CA12 12 | | 17 _DA/CA
|
||||
CA14 13 | | 16 CA15
|
||||
GND 14 |_____________| 15 CA13
|
||||
|
||||
|
||||
http://www.stefan-uhlmann.de/cbm/MVM/index.html
|
||||
|
||||
*/
|
||||
|
||||
#include "magic_voice.h"
|
||||
|
||||
|
||||
@ -31,20 +56,178 @@ const device_type C64_MAGIC_VOICE = &device_creator<c64_magic_voice_cartridge_de
|
||||
// tpi6525_interface tpi_intf
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER( c64_magic_voice_cartridge_device::tpi_pa_r )
|
||||
{
|
||||
/*
|
||||
|
||||
bit description
|
||||
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5 J1 _GAME
|
||||
6 T6721 _EOS
|
||||
7 FIFO DIR
|
||||
|
||||
*/
|
||||
|
||||
UINT8 data = 0;
|
||||
|
||||
data |= m_exp->game_r(get_offset(0xdf80), 1, 0, 1, 0) << 5;
|
||||
data |= m_vslsi->eos_r() << 6;
|
||||
//data |= m_fifo->dir_r() << 7;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( c64_magic_voice_cartridge_device::tpi_pa_w )
|
||||
{
|
||||
/*
|
||||
|
||||
bit description
|
||||
|
||||
0 FIFO D0
|
||||
1 FIFO D1
|
||||
2 FIFO D2
|
||||
3 FIFO D3
|
||||
4 FIFO SI
|
||||
5
|
||||
6
|
||||
7
|
||||
|
||||
*/
|
||||
|
||||
//m_fifo->write(data & 0x0f);
|
||||
//m_fifo->si_w(BIT(data, 4));
|
||||
}
|
||||
|
||||
READ8_MEMBER( c64_magic_voice_cartridge_device::tpi_pb_r )
|
||||
{
|
||||
/*
|
||||
|
||||
bit description
|
||||
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7 J1 _EXROM
|
||||
|
||||
*/
|
||||
|
||||
UINT8 data = 0;
|
||||
|
||||
data |= m_exp->exrom_r(get_offset(0xdf81), 1, 0, 1, 0) << 7;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( c64_magic_voice_cartridge_device::tpi_pb_w )
|
||||
{
|
||||
/*
|
||||
|
||||
bit description
|
||||
|
||||
0 T6721 D0
|
||||
1 T6721 D1
|
||||
2 T6721 D2
|
||||
3 T6721 D3
|
||||
4 T6721 _WR
|
||||
5
|
||||
6
|
||||
7
|
||||
|
||||
*/
|
||||
|
||||
m_vslsi_data = data & 0x0f;
|
||||
|
||||
if (!BIT(data, 4))
|
||||
{
|
||||
m_vslsi->write(space, 0, m_vslsi_data);
|
||||
}
|
||||
}
|
||||
|
||||
READ8_MEMBER( c64_magic_voice_cartridge_device::tpi_pc_r )
|
||||
{
|
||||
/*
|
||||
|
||||
bit description
|
||||
|
||||
0
|
||||
1
|
||||
2 T6721 _EOS
|
||||
3 FIFO DIR
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
|
||||
*/
|
||||
|
||||
UINT8 data = 0;
|
||||
|
||||
data |= m_vslsi->eos_r() << 2;
|
||||
//data |= m_fifo->dir_r() << 3;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( c64_magic_voice_cartridge_device::tpi_pc_w )
|
||||
{
|
||||
/*
|
||||
|
||||
bit description
|
||||
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5 P1 _NMI
|
||||
6 0=RAM 1=EPROM
|
||||
7 P1 _EXROM
|
||||
|
||||
*/
|
||||
|
||||
m_slot->nmi_w(BIT(data, 5) ? CLEAR_LINE : ASSERT_LINE);
|
||||
|
||||
m_exrom = BIT(data, 7);
|
||||
}
|
||||
|
||||
static const tpi6525_interface tpi_intf =
|
||||
{
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, c64_magic_voice_cartridge_device, tpi_pa_r),
|
||||
DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, c64_magic_voice_cartridge_device, tpi_pa_w),
|
||||
DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, c64_magic_voice_cartridge_device, tpi_pb_r),
|
||||
DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, c64_magic_voice_cartridge_device, tpi_pb_w),
|
||||
DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, c64_magic_voice_cartridge_device, tpi_pc_r),
|
||||
DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, c64_magic_voice_cartridge_device, tpi_pc_w),
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL
|
||||
};
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// t6721_interface
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE_LINE_MEMBER( c64_magic_voice_cartridge_device::dtrd_w )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( c64_magic_voice_cartridge_device::apd_w )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// MACHINE_CONFIG_FRAGMENT( c64_magic_voice )
|
||||
//-------------------------------------------------
|
||||
@ -55,6 +238,8 @@ static MACHINE_CONFIG_FRAGMENT( c64_magic_voice )
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
MCFG_SOUND_ADD(T6721A_TAG, T6721A, XTAL_640kHz)
|
||||
MCFG_T6721A_EOS_HANDLER(DEVWRITELINE(MOS6525_TAG, tpi6525_device, i2_w))
|
||||
MCFG_T6721A_DTRD_HANDLER(DEVWRITELINE(DEVICE_SELF, c64_magic_voice_cartridge_device, dtrd_w))
|
||||
MCFG_T6721A_APD_HANDLER(DEVWRITELINE(DEVICE_SELF, c64_magic_voice_cartridge_device, apd_w))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
|
||||
|
||||
MCFG_C64_PASSTHRU_EXPANSION_SLOT_ADD()
|
||||
@ -86,7 +271,12 @@ c64_magic_voice_cartridge_device::c64_magic_voice_cartridge_device(const machine
|
||||
device_c64_expansion_card_interface(mconfig, *this),
|
||||
m_vslsi(*this, T6721A_TAG),
|
||||
m_tpi(*this, MOS6525_TAG),
|
||||
m_exp(*this, C64_EXPANSION_SLOT_TAG)
|
||||
m_exp(*this, C64_EXPANSION_SLOT_TAG),
|
||||
m_roml2(1),
|
||||
m_romh2(1),
|
||||
m_eprom(0),
|
||||
m_da_ca(0),
|
||||
m_vslsi_data(0)
|
||||
{
|
||||
}
|
||||
|
||||
@ -107,6 +297,15 @@ void c64_magic_voice_cartridge_device::device_start()
|
||||
void c64_magic_voice_cartridge_device::device_reset()
|
||||
{
|
||||
m_tpi->reset();
|
||||
|
||||
m_game = 0;
|
||||
m_exrom = 1;
|
||||
|
||||
m_roml2 = 1;
|
||||
m_romh2 = 1;
|
||||
m_eprom = 0;
|
||||
m_da_ca = 0;
|
||||
m_vslsi_data = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -116,11 +315,16 @@ void c64_magic_voice_cartridge_device::device_reset()
|
||||
|
||||
UINT8 c64_magic_voice_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);
|
||||
data = m_exp->cd_r(space, get_offset(offset), data, sphi2, ba, m_roml2, m_romh2, io1, 1);
|
||||
|
||||
if (!io2 && BIT(offset, 7))
|
||||
if (!io2 && sphi2 && BIT(offset, 7))
|
||||
{
|
||||
m_tpi->read(space, offset & 0x07);
|
||||
data = m_tpi->read(space, offset & 0x07);
|
||||
}
|
||||
|
||||
if (!m_eprom && sphi2)
|
||||
{
|
||||
data = m_romh[(BIT(offset, 14) << 13) | (offset & 0x1fff)];
|
||||
}
|
||||
|
||||
return data;
|
||||
@ -133,30 +337,25 @@ UINT8 c64_magic_voice_cartridge_device::c64_cd_r(address_space &space, offs_t of
|
||||
|
||||
void c64_magic_voice_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)
|
||||
{
|
||||
if (!io2 && BIT(offset, 7))
|
||||
if (!io2 && sphi2 && BIT(offset, 7))
|
||||
{
|
||||
m_tpi->write(space, offset & 0x07, data);
|
||||
}
|
||||
|
||||
m_exp->cd_w(space, offset, data, sphi2, ba, roml, romh, io1, io2);
|
||||
m_exp->cd_w(space, get_offset(offset), data, sphi2, ba, m_roml2, m_romh2, io1, 1);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// c64_game_r - GAME read
|
||||
// get_offset -
|
||||
//-------------------------------------------------
|
||||
|
||||
int c64_magic_voice_cartridge_device::c64_game_r(offs_t offset, int sphi2, int ba, int rw, int hiram)
|
||||
offs_t c64_magic_voice_cartridge_device::get_offset(offs_t offset)
|
||||
{
|
||||
return m_exp->game_r(offset, sphi2, ba, rw, hiram);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// c64_exrom_r - EXROM read
|
||||
//-------------------------------------------------
|
||||
|
||||
int c64_magic_voice_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);
|
||||
if (!m_da_ca)
|
||||
{
|
||||
offset = (m_vslsi_data << 12) | (offset & 0xfff);
|
||||
}
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@
|
||||
// ======================> c64_magic_voice_cartridge_device
|
||||
|
||||
class c64_magic_voice_cartridge_device : public device_t,
|
||||
public device_c64_expansion_card_interface
|
||||
public device_c64_expansion_card_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
@ -36,6 +36,16 @@ public:
|
||||
// optional information overrides
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
|
||||
DECLARE_READ8_MEMBER( tpi_pa_r );
|
||||
DECLARE_WRITE8_MEMBER( tpi_pa_w );
|
||||
DECLARE_READ8_MEMBER( tpi_pb_r );
|
||||
DECLARE_WRITE8_MEMBER( tpi_pb_w );
|
||||
DECLARE_READ8_MEMBER( tpi_pc_r );
|
||||
DECLARE_WRITE8_MEMBER( tpi_pc_w );
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( dtrd_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( apd_w );
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
@ -44,13 +54,19 @@ protected:
|
||||
// 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:
|
||||
offs_t get_offset(offs_t offset);
|
||||
|
||||
required_device<t6721a_device> m_vslsi;
|
||||
required_device<tpi6525_device> m_tpi;
|
||||
required_device<c64_expansion_slot_device> m_exp;
|
||||
|
||||
int m_roml2;
|
||||
int m_romh2;
|
||||
int m_eprom;
|
||||
int m_da_ca;
|
||||
UINT8 m_vslsi_data;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user