mirror of
https://github.com/holub/mame
synced 2025-10-06 17:08:28 +03:00
Added dummy uPD7752 device
This commit is contained in:
parent
0935810f35
commit
c9ff76bdef
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -1758,6 +1758,8 @@ src/emu/sound/tms5110r.c svneol=native#text/plain
|
||||
src/emu/sound/tms5220.c svneol=native#text/plain
|
||||
src/emu/sound/tms5220.h svneol=native#text/plain
|
||||
src/emu/sound/tms5220.txt svneol=native#text/plain
|
||||
src/emu/sound/upd7752.c svneol=native#text/plain
|
||||
src/emu/sound/upd7752.h svneol=native#text/plain
|
||||
src/emu/sound/upd7759.c svneol=native#text/plain
|
||||
src/emu/sound/upd7759.h svneol=native#text/plain
|
||||
src/emu/sound/vlm5030.c svneol=native#text/plain
|
||||
|
@ -728,6 +728,15 @@ SOUNDOBJS += $(SOUNDOBJ)/tc8830f.o
|
||||
endif
|
||||
|
||||
|
||||
#-------------------------------------------------
|
||||
# NEC uPD7752
|
||||
#@src/emu/sound/upd7752.h,SOUNDS += UPD7752
|
||||
#-------------------------------------------------
|
||||
|
||||
ifneq ($(filter UPD7752,$(SOUNDS)),)
|
||||
SOUNDOBJS += $(SOUNDOBJ)/upd7752.o
|
||||
endif
|
||||
|
||||
|
||||
#-------------------------------------------------
|
||||
# VLM5030 speech synthesizer
|
||||
|
129
src/emu/sound/upd7752.c
Normal file
129
src/emu/sound/upd7752.c
Normal file
@ -0,0 +1,129 @@
|
||||
/***************************************************************************
|
||||
|
||||
Template for skeleton device
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "sound/upd7752.h"
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// GLOBAL VARIABLES
|
||||
//**************************************************************************
|
||||
|
||||
// device type definition
|
||||
const device_type UPD7752 = &device_creator<upd7752_device>;
|
||||
|
||||
static ADDRESS_MAP_START( upd7752_ram, AS_0, 8, upd7752_device )
|
||||
AM_RANGE(0x00000, 0x3ffff) AM_RAM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// upd7752_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
upd7752_device::upd7752_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, UPD7752, "uPD7752", tag, owner, clock, "upd7752", __FILE__),
|
||||
device_sound_interface(mconfig, *this),
|
||||
device_memory_interface(mconfig, *this),
|
||||
m_space_config("ram", ENDIANNESS_LITTLE, 8, 18, 0, NULL, *ADDRESS_MAP_NAME(upd7752_ram))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// memory_space_config - return a description of
|
||||
// any address spaces owned by this device
|
||||
//-------------------------------------------------
|
||||
|
||||
const address_space_config *upd7752_device::memory_space_config(address_spacenum spacenum) const
|
||||
{
|
||||
return (spacenum == AS_0) ? &m_space_config : NULL;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void upd7752_device::device_start()
|
||||
{
|
||||
/* TODO: clock */
|
||||
m_stream = stream_alloc(0, 1, clock() / 64);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void upd7752_device::device_reset()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_stop - device-specific stop
|
||||
//-------------------------------------------------
|
||||
|
||||
void upd7752_device::device_stop()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// sound_stream_update - handle a stream update
|
||||
//-------------------------------------------------
|
||||
|
||||
void upd7752_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// READ/WRITE HANDLERS
|
||||
//**************************************************************************
|
||||
|
||||
READ8_MEMBER( upd7752_device::read )
|
||||
{
|
||||
switch(offset & 3)
|
||||
{
|
||||
//[0x00]: status register
|
||||
//x--- ---- BSY busy status (1) processing (0) stopped
|
||||
//-x-- ---- REQ audio parameter (1) input request (0) prohibited (???)
|
||||
//--x- ---- ~INT / EXT message data (1) Outside (0) Inside
|
||||
//---x ---- ERR error flag
|
||||
case 0x00: return 0x60;
|
||||
//[0x02]: port 0xe2 latch?
|
||||
case 0x02: return 0xff;
|
||||
//[0x03]: port 0xe3 latch?
|
||||
case 0x03: return 0xff;
|
||||
}
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( upd7752_device::write )
|
||||
{
|
||||
switch(offset & 3)
|
||||
{
|
||||
// [0x00]: audio parameter transfer
|
||||
|
||||
// [0x02]: mode set
|
||||
// ---- -x-- Frame periodic analysis (0) 10 ms / frame (1) 20 ms / frame
|
||||
// ---- --xx Utterance (tempo?) speed
|
||||
// 00 : NORMAL SPEED
|
||||
// 01 : SLOW SPEED
|
||||
// 10 : FAST SPEED
|
||||
// 11 : Setting prohibited
|
||||
|
||||
// case 0x02:
|
||||
|
||||
// case 0x03: command set
|
||||
}
|
||||
}
|
65
src/emu/sound/upd7752.h
Normal file
65
src/emu/sound/upd7752.h
Normal file
@ -0,0 +1,65 @@
|
||||
/***************************************************************************
|
||||
|
||||
Template for skeleton device
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __UPD7752DEV_H__
|
||||
#define __UPD7752DEV_H__
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// INTERFACE CONFIGURATION MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define MCFG_UPD7752_ADD(_tag,_freq) \
|
||||
MCFG_DEVICE_ADD(_tag, UPD7752, _freq)
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> upd7752_device
|
||||
|
||||
class upd7752_device : public device_t,
|
||||
public device_sound_interface,
|
||||
public device_memory_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
upd7752_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// I/O operations
|
||||
DECLARE_WRITE8_MEMBER( write );
|
||||
DECLARE_READ8_MEMBER( read );
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const;
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_stop();
|
||||
virtual void device_reset();
|
||||
|
||||
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
|
||||
|
||||
private:
|
||||
sound_stream *m_stream;
|
||||
const address_space_config m_space_config;
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
extern const device_type UPD7752;
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// GLOBAL VARIABLES
|
||||
//**************************************************************************
|
||||
|
||||
|
||||
|
||||
#endif
|
@ -198,6 +198,7 @@ SOUNDS += OKIM6258
|
||||
SOUNDS += OKIM6295
|
||||
SOUNDS += OKIM6376
|
||||
SOUNDS += OKIM9810
|
||||
#SOUNDS += UPD7752
|
||||
SOUNDS += UPD7759
|
||||
SOUNDS += HC55516
|
||||
SOUNDS += TC8830F
|
||||
|
@ -128,6 +128,7 @@ irq vector 0x26:
|
||||
#include "machine/i8251.h"
|
||||
#include "video/mc6847.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "sound/upd7752.h"
|
||||
#include "sound/wave.h"
|
||||
|
||||
#include "imagedev/cassette.h"
|
||||
@ -217,8 +218,6 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(pc6001m2_system_latch_w);
|
||||
DECLARE_WRITE8_MEMBER(pc6001m2_vram_bank_w);
|
||||
DECLARE_WRITE8_MEMBER(pc6001m2_col_bank_w);
|
||||
DECLARE_READ8_MEMBER(upd7752_reg_r);
|
||||
DECLARE_WRITE8_MEMBER(upd7752_reg_w);
|
||||
DECLARE_WRITE8_MEMBER(pc6001m2_0xf3_w);
|
||||
DECLARE_WRITE8_MEMBER(pc6001m2_timer_adj_w);
|
||||
DECLARE_WRITE8_MEMBER(pc6001m2_timer_irqv_w);
|
||||
@ -1355,44 +1354,6 @@ WRITE8_MEMBER(pc6001_state::pc6001m2_col_bank_w)
|
||||
m_bgcol_bank = (data & 7);
|
||||
}
|
||||
|
||||
/* voice synth is a NEC uPD7752 sound chip (currently unemulated) */
|
||||
READ8_MEMBER(pc6001_state::upd7752_reg_r)
|
||||
{
|
||||
switch(offset & 3)
|
||||
{
|
||||
//[0x00]: status register
|
||||
//x--- ---- BSY busy status (1) processing (0) stopped
|
||||
//-x-- ---- REQ audio parameter (1) input request (0) prohibited (???)
|
||||
//--x- ---- ~INT / EXT message data (1) Outside (0) Inside
|
||||
//---x ---- ERR error flag
|
||||
case 0x00: return 0x60;
|
||||
//[0x02]: port 0xe2 latch?
|
||||
case 0x02: return 0xff;
|
||||
//[0x03]: port 0xe3 latch?
|
||||
case 0x03: return 0xff;
|
||||
}
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(pc6001_state::upd7752_reg_w)
|
||||
{
|
||||
switch(offset & 3)
|
||||
{
|
||||
// [0x00]: audio parameter transfer
|
||||
|
||||
// [0x02]: mode set
|
||||
// ---- -x-- Frame periodic analysis (0) 10 ms / frame (1) 20 ms / frame
|
||||
// ---- --xx Utterance (tempo?) speed
|
||||
// 00 : NORMAL SPEED
|
||||
// 01 : SLOW SPEED
|
||||
// 10 : FAST SPEED
|
||||
// 11 : Setting prohibited
|
||||
|
||||
// case 0x02:
|
||||
|
||||
// case 0x03: command set
|
||||
}
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(pc6001_state::pc6001m2_0xf3_w)
|
||||
{
|
||||
@ -1480,7 +1441,7 @@ static ADDRESS_MAP_START( pc6001m2_io , AS_IO, 8, pc6001_state )
|
||||
|
||||
AM_RANGE(0xd0, 0xd3) AM_MIRROR(0x0c) AM_NOP // disk device
|
||||
|
||||
AM_RANGE(0xe0, 0xe3) AM_MIRROR(0x0c) AM_READWRITE(upd7752_reg_r,upd7752_reg_w)
|
||||
AM_RANGE(0xe0, 0xe3) AM_MIRROR(0x0c) AM_DEVREADWRITE("upd7752", upd7752_device, read, write)
|
||||
|
||||
AM_RANGE(0xf0, 0xf0) AM_READWRITE(pc6001m2_bank_r0_r,pc6001m2_bank_r0_w)
|
||||
AM_RANGE(0xf1, 0xf1) AM_READWRITE(pc6001m2_bank_r1_r,pc6001m2_bank_r1_w)
|
||||
@ -1527,7 +1488,7 @@ static ADDRESS_MAP_START( pc6601_io , AS_IO, 8, pc6001_state )
|
||||
|
||||
AM_RANGE(0xd0, 0xdf) AM_READWRITE(pc6601_fdc_r,pc6601_fdc_w) // disk device
|
||||
|
||||
AM_RANGE(0xe0, 0xe3) AM_MIRROR(0x0c) AM_READWRITE(upd7752_reg_r,upd7752_reg_w)
|
||||
AM_RANGE(0xe0, 0xe3) AM_MIRROR(0x0c) AM_DEVREADWRITE("upd7752", upd7752_device, read, write)
|
||||
|
||||
AM_RANGE(0xf0, 0xf0) AM_READWRITE(pc6001m2_bank_r0_r,pc6001m2_bank_r0_w)
|
||||
AM_RANGE(0xf1, 0xf1) AM_READWRITE(pc6001m2_bank_r1_r,pc6001m2_bank_r1_w)
|
||||
@ -1731,7 +1692,7 @@ static ADDRESS_MAP_START( pc6001sr_io , AS_IO, 8, pc6001_state )
|
||||
|
||||
AM_RANGE(0xd0, 0xdf) AM_READWRITE(pc6601_fdc_r,pc6601_fdc_w) // disk device
|
||||
|
||||
AM_RANGE(0xe0, 0xe3) AM_MIRROR(0x0c) AM_READWRITE(upd7752_reg_r,upd7752_reg_w)
|
||||
AM_RANGE(0xe0, 0xe3) AM_MIRROR(0x0c) AM_DEVREADWRITE("upd7752", upd7752_device, read, write)
|
||||
|
||||
// AM_RANGE(0xf0, 0xf0) AM_READWRITE(pc6001m2_bank_r0_r,pc6001m2_bank_r0_w)
|
||||
// AM_RANGE(0xf1, 0xf1) AM_READWRITE(pc6001m2_bank_r1_r,pc6001m2_bank_r1_w)
|
||||
@ -2425,6 +2386,9 @@ static MACHINE_CONFIG_DERIVED( pc6001m2, pc6001 )
|
||||
|
||||
MCFG_GFXDECODE(pc6001m2)
|
||||
|
||||
MCFG_SOUND_ADD("upd7752", UPD7752, PC6001_MAIN_CLOCK/4)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
|
||||
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( pc6601, pc6001m2 )
|
||||
|
@ -182,6 +182,7 @@ SOUNDS += OKIM6258
|
||||
SOUNDS += OKIM6295
|
||||
#SOUNDS += OKIM6376
|
||||
#SOUNDS += OKIM9810
|
||||
SOUNDS += UPD7752
|
||||
SOUNDS += UPD7759
|
||||
SOUNDS += HC55516
|
||||
#SOUNDS += TC8830F
|
||||
|
Loading…
Reference in New Issue
Block a user