mirror of
https://github.com/holub/mame
synced 2025-04-16 21:44:32 +03:00
poisk1: B623 sound card (skeleton) and basic softlist
This commit is contained in:
parent
46ed756db7
commit
810dd0af8c
27
hash/poisk1_flop.xml
Normal file
27
hash/poisk1_flop.xml
Normal file
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
|
||||
<softwarelist name="poisk1_flop" description="Poisk-1 disk images">
|
||||
|
||||
<software name="ots14">
|
||||
<description>One Track System 1.4 (alternate OS)</description>
|
||||
<year>1991</year>
|
||||
<publisher>MMV</publisher>
|
||||
<part name="flop1" interface="floppy_5_25">
|
||||
<dataarea name="flop" size="694040">
|
||||
<rom name="one-track-system.imd" size="694040" sha1="962e15ec0501d1bd249d05984efd9e9871fa2ce9" crc="62d4ef70" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="sound">
|
||||
<description>Software for B623 sound card</description>
|
||||
<year>1991</year>
|
||||
<publisher>Electronmash ???</publisher>
|
||||
<part name="flop1" interface="floppy_5_25">
|
||||
<dataarea name="flop" size="690901">
|
||||
<rom name="sound.imd" size="690901" sha1="6ab8ae313b0801c2ddf3a1429b75cb9fe8f7bf55" crc="539747fa" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
</softwarelist>
|
@ -831,6 +831,8 @@ if (BUSES["ISA"]~=null) then
|
||||
MAME_DIR .. "src/devices/bus/isa/p1_hdc.h",
|
||||
MAME_DIR .. "src/devices/bus/isa/p1_rom.cpp",
|
||||
MAME_DIR .. "src/devices/bus/isa/p1_rom.h",
|
||||
MAME_DIR .. "src/devices/bus/isa/p1_sound.cpp",
|
||||
MAME_DIR .. "src/devices/bus/isa/p1_sound.h",
|
||||
MAME_DIR .. "src/devices/bus/isa/mc1502_fdc.cpp",
|
||||
MAME_DIR .. "src/devices/bus/isa/mc1502_fdc.h",
|
||||
MAME_DIR .. "src/devices/bus/isa/mc1502_rom.cpp",
|
||||
|
203
src/devices/bus/isa/p1_sound.cpp
Normal file
203
src/devices/bus/isa/p1_sound.cpp
Normal file
@ -0,0 +1,203 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Sergey Svishchev
|
||||
/**********************************************************************
|
||||
|
||||
Poisk-1 sound card. DAC, ADC, MIDI in/out and 6 music channels.
|
||||
|
||||
Memory-mapped, uses IRQ3 and IRQ7, no DMA.
|
||||
|
||||
Copyright MESS Team.
|
||||
Visit http://mamedev.org for licensing and usage restrictions.
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#include "p1_sound.h"
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
const device_type P1_SOUND = &device_creator<p1_sound_device>;
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// Machine config
|
||||
//-------------------------------------------------
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( p1_sound )
|
||||
MCFG_DEVICE_ADD("midi", I8251, 0)
|
||||
MCFG_I8251_TXD_HANDLER(DEVWRITELINE("mdout", midi_port_device, write_txd))
|
||||
MCFG_I8251_RXRDY_HANDLER(DEVWRITELINE(":isa", isa8_device, irq3_w))
|
||||
|
||||
MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_MIDI_RX_HANDLER(DEVWRITELINE("midi", i8251_device, write_rxd))
|
||||
|
||||
MCFG_MIDI_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
|
||||
MCFG_DEVICE_ADD("d14", PIT8253, 0)
|
||||
MCFG_PIT8253_CLK0(XTAL_12_5MHz/10)
|
||||
// sampler at 10 KHz
|
||||
MCFG_PIT8253_OUT0_HANDLER(WRITELINE(p1_sound_device, sampler_sync))
|
||||
MCFG_PIT8253_CLK1(XTAL_12_5MHz/10)
|
||||
MCFG_PIT8253_OUT1_HANDLER(DEVWRITELINE("midi", i8251_device, write_txc))
|
||||
MCFG_PIT8253_CLK2(XTAL_12_5MHz/10)
|
||||
MCFG_PIT8253_OUT2_HANDLER(DEVWRITELINE("midi", i8251_device, write_rxc))
|
||||
|
||||
MCFG_DEVICE_ADD("d16", PIT8253, 0)
|
||||
MCFG_PIT8253_CLK0(XTAL_12_5MHz/10)
|
||||
// MCFG_PIT8253_OUT0_HANDLER(XXX)
|
||||
MCFG_PIT8253_CLK1(XTAL_12_5MHz/10)
|
||||
// MCFG_PIT8253_OUT1_HANDLER(XXX)
|
||||
MCFG_PIT8253_CLK2(XTAL_12_5MHz/10)
|
||||
// MCFG_PIT8253_OUT2_HANDLER(XXX)
|
||||
|
||||
MCFG_DEVICE_ADD("d17", PIT8253, 0)
|
||||
MCFG_PIT8253_CLK0(XTAL_12_5MHz/10)
|
||||
// MCFG_PIT8253_OUT0_HANDLER(XXX)
|
||||
MCFG_PIT8253_CLK1(XTAL_12_5MHz/10)
|
||||
// MCFG_PIT8253_OUT1_HANDLER(XXX)
|
||||
MCFG_PIT8253_CLK2(XTAL_12_5MHz/10)
|
||||
// MCFG_PIT8253_OUT2_HANDLER(XXX)
|
||||
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
MCFG_DAC_ADD("dac")
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "filter", 1.0)
|
||||
MCFG_FILTER_RC_ADD("filter", 0)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - device-specific
|
||||
// machine configurations
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor p1_sound_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( p1_sound );
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// p1_sound_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
p1_sound_device::p1_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, P1_SOUND, "Poisk-1 sound card (B623)", tag, owner, clock, "p1_sound", __FILE__),
|
||||
device_isa8_card_interface( mconfig, *this ),
|
||||
m_dac(*this, "dac"),
|
||||
m_filter(*this, "filter"),
|
||||
m_midi(*this, "midi"),
|
||||
m_d14(*this, "d14"),
|
||||
m_d16(*this, "d16"),
|
||||
m_d17(*this, "d17")
|
||||
{
|
||||
}
|
||||
|
||||
READ8_MEMBER( p1_sound_device::d14_r )
|
||||
{
|
||||
return m_d14->read(space, offset>>1);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( p1_sound_device::d14_w )
|
||||
{
|
||||
m_d14->write(space, offset>>1, data);
|
||||
}
|
||||
|
||||
READ8_MEMBER( p1_sound_device::d16_r )
|
||||
{
|
||||
return m_d16->read(space, offset>>1);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( p1_sound_device::d16_w )
|
||||
{
|
||||
m_d16->write(space, offset>>1, data);
|
||||
}
|
||||
|
||||
READ8_MEMBER( p1_sound_device::d17_r )
|
||||
{
|
||||
return m_d17->read(space, offset>>1);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( p1_sound_device::d17_w )
|
||||
{
|
||||
m_d17->write(space, offset>>1, data);
|
||||
}
|
||||
|
||||
READ8_MEMBER( p1_sound_device::adc_r )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( p1_sound_device::dac_w )
|
||||
{
|
||||
// logerror("DAC write: %02x <- %02x\n", offset>>1, data);
|
||||
m_dac_data[offset>>1] = data;
|
||||
m_isa->irq7_w(CLEAR_LINE);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( p1_sound_device::sampler_sync )
|
||||
{
|
||||
if (state) {
|
||||
m_dac->write_unsigned8(m_dac_data[m_dac_ptr++]);
|
||||
m_dac_ptr &= 7;
|
||||
if ((m_dac_ptr % 8) == 0) {
|
||||
m_isa->irq7_w(state);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void p1_sound_device::device_start()
|
||||
{
|
||||
set_isa_device();
|
||||
|
||||
// E8000..E9FFF -- ROM (not installed on any known board)
|
||||
// EE400 -- ?? root tone measurement ??
|
||||
// EFC00 -- ADC output
|
||||
|
||||
m_isa->install_memory(0xea000, 0xea01f,
|
||||
read8_delegate(FUNC(p1_sound_device::adc_r), this), // XXX not really
|
||||
write8_delegate(FUNC(p1_sound_device::dac_w), this));
|
||||
|
||||
m_isa->install_memory(0xee000, 0xee000,
|
||||
read8_delegate(FUNC(i8251_device::data_r), (i8251_device*)m_midi),
|
||||
write8_delegate(FUNC(i8251_device::data_w), (i8251_device*)m_midi));
|
||||
m_isa->install_memory(0xee002, 0xee002,
|
||||
read8_delegate(FUNC(i8251_device::status_r), (i8251_device*)m_midi),
|
||||
write8_delegate(FUNC(i8251_device::control_w), (i8251_device*)m_midi));
|
||||
|
||||
// sync generator
|
||||
m_isa->install_memory(0xef000, 0xef007,
|
||||
read8_delegate(FUNC(p1_sound_device::d14_r), this),
|
||||
write8_delegate(FUNC(p1_sound_device::d14_w), this));
|
||||
|
||||
// 6 music channels
|
||||
m_isa->install_memory(0xef400, 0xef407,
|
||||
read8_delegate(FUNC(p1_sound_device::d16_r), this),
|
||||
write8_delegate(FUNC(p1_sound_device::d16_w), this));
|
||||
m_isa->install_memory(0xef800, 0xef807,
|
||||
read8_delegate(FUNC(p1_sound_device::d17_r), this),
|
||||
write8_delegate(FUNC(p1_sound_device::d17_w), this));
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void p1_sound_device::device_reset()
|
||||
{
|
||||
memset(m_dac_data, 0, sizeof(m_dac_data));
|
||||
m_dac_ptr = 0;
|
||||
|
||||
// 5 kHz lowpass filter. XXX check schematics
|
||||
m_filter->filter_rc_set_RC(FLT_RC_LOWPASS, 330, 0, 0, CAP_N(100) );
|
||||
}
|
73
src/devices/bus/isa/p1_sound.h
Normal file
73
src/devices/bus/isa/p1_sound.h
Normal file
@ -0,0 +1,73 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Sergey Svishchev
|
||||
/**********************************************************************
|
||||
|
||||
Poisk-1 sound card
|
||||
|
||||
Copyright MESS Team.
|
||||
Visit http://mamedev.org for licensing and usage restrictions.
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __P1_SOUND__
|
||||
#define __P1_SOUND__
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
#include "bus/midi/midi.h"
|
||||
#include "isa.h"
|
||||
#include "machine/i8251.h"
|
||||
#include "machine/pit8253.h"
|
||||
#include "sound/dac.h"
|
||||
#include "sound/flt_rc.h"
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
class p1_sound_device : public device_t,
|
||||
public device_isa8_card_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
p1_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// Optional information overrides
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
|
||||
DECLARE_READ8_MEMBER(d14_r);
|
||||
DECLARE_READ8_MEMBER(d16_r);
|
||||
DECLARE_READ8_MEMBER(d17_r);
|
||||
DECLARE_WRITE8_MEMBER(d14_w);
|
||||
DECLARE_WRITE8_MEMBER(d16_w);
|
||||
DECLARE_WRITE8_MEMBER(d17_w);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(sampler_sync);
|
||||
DECLARE_READ8_MEMBER(adc_r);
|
||||
DECLARE_WRITE8_MEMBER(dac_w);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
private:
|
||||
UINT8 m_dac_data[16];
|
||||
int m_dac_ptr;
|
||||
|
||||
required_device<dac_device> m_dac;
|
||||
optional_device<filter_rc_device> m_filter;
|
||||
required_device<i8251_device> m_midi;
|
||||
required_device<pit8253_device> m_d14;
|
||||
required_device<pit8253_device> m_d16;
|
||||
required_device<pit8253_device> m_d17;
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
extern const device_type P1_SOUND;
|
||||
|
||||
|
||||
#endif
|
@ -13,6 +13,7 @@ SLOT_INTERFACE_START( p1_isa8_cards )
|
||||
SLOT_INTERFACE("rom", P1_ROM) // B003
|
||||
SLOT_INTERFACE("fdc", P1_FDC) // B504
|
||||
SLOT_INTERFACE("hdc", P1_HDC) // B942
|
||||
SLOT_INTERFACE("sound", P1_SOUND) // B623
|
||||
/*
|
||||
SLOT_INTERFACE("comlpt", P1_COMLPT) // B620
|
||||
SLOT_INTERFACE("joy", P1_JOY) // B621
|
||||
|
@ -22,6 +22,7 @@
|
||||
// misc
|
||||
#include "mc1502_rom.h"
|
||||
#include "p1_rom.h"
|
||||
#include "p1_sound.h"
|
||||
|
||||
// non-native
|
||||
#include "com.h"
|
||||
|
@ -23,6 +23,8 @@
|
||||
|
||||
#include "cpu/i86/i86.h"
|
||||
|
||||
#include "softlist.h"
|
||||
|
||||
#define CGA_PALETTE_SETS 83
|
||||
/* one for colour, one for mono, 81 for colour composite */
|
||||
|
||||
@ -641,6 +643,9 @@ static MACHINE_CONFIG_START( poisk1, p1_state )
|
||||
MCFG_CASSETTE_ADD( "cassette" )
|
||||
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
|
||||
|
||||
MCFG_SOFTWARE_LIST_ADD("flop_list","poisk1_flop")
|
||||
// MCFG_SOFTWARE_LIST_ADD("cass_list","poisk1_cass")
|
||||
|
||||
MCFG_SPEAKER_STANDARD_MONO( "mono" )
|
||||
MCFG_SOUND_ADD( "speaker", SPEAKER_SOUND, 0 )
|
||||
MCFG_SOUND_ROUTE( ALL_OUTPUTS, "mono", 1.00 )
|
||||
|
Loading…
Reference in New Issue
Block a user