mirror of
https://github.com/holub/mame
synced 2025-06-06 04:43:45 +03:00
Amiga: Move and rename amiga sound device, add pinout and description
This commit is contained in:
parent
1296414948
commit
f2f55c1568
@ -154,13 +154,13 @@ end
|
||||
|
||||
---------------------------------------------------
|
||||
-- Amiga audio hardware
|
||||
--@src/devices/sound/amiga.h,SOUNDS["AMIGA"] = true
|
||||
--@src/devices/machine/8364_paula.h,SOUNDS["PAULA_8364"] = true
|
||||
---------------------------------------------------
|
||||
|
||||
if (SOUNDS["AMIGA"]~=null) then
|
||||
if (SOUNDS["PAULA_8364"]~=null) then
|
||||
files {
|
||||
MAME_DIR .. "src/devices/sound/amiga.cpp",
|
||||
MAME_DIR .. "src/devices/sound/amiga.h",
|
||||
MAME_DIR .. "src/devices/machine/8364_paula.cpp",
|
||||
MAME_DIR .. "src/devices/machine/8364_paula.h",
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -163,7 +163,7 @@ SOUNDS["SN76496"] = true
|
||||
SOUNDS["POKEY"] = true
|
||||
SOUNDS["TIA"] = true
|
||||
SOUNDS["NES_APU"] = true
|
||||
SOUNDS["AMIGA"] = true
|
||||
SOUNDS["PAULA_8364"] = true
|
||||
SOUNDS["ASTROCADE"] = true
|
||||
SOUNDS["NAMCO"] = true
|
||||
SOUNDS["NAMCO_15XX"] = true
|
||||
|
@ -168,7 +168,7 @@ SOUNDS["SN76496"] = true
|
||||
SOUNDS["POKEY"] = true
|
||||
SOUNDS["TIA"] = true
|
||||
SOUNDS["NES_APU"] = true
|
||||
SOUNDS["AMIGA"] = true
|
||||
SOUNDS["PAULA_8364"] = true
|
||||
SOUNDS["ASTROCADE"] = true
|
||||
--SOUNDS["NAMCO"] = true
|
||||
--SOUNDS["NAMCO_15XX"] = true
|
||||
|
@ -1,12 +1,12 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Aaron Giles
|
||||
// license: BSD-3-Clause
|
||||
// copyright-holders: Aaron Giles
|
||||
/***************************************************************************
|
||||
|
||||
Amiga audio hardware
|
||||
Commodore 8364 "Paula"
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "amiga.h"
|
||||
#include "8364_paula.h"
|
||||
#include "includes/amiga.h"
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
const device_type AMIGA = &device_creator<amiga_sound_device>;
|
||||
const device_type PAULA_8364 = &device_creator<paula_8364_device>;
|
||||
|
||||
|
||||
//*************************************************************************
|
||||
@ -30,11 +30,11 @@ const device_type AMIGA = &device_creator<amiga_sound_device>;
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// amiga_sound_device - constructor
|
||||
// paula_8364_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
amiga_sound_device::amiga_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, AMIGA, "Amiga Paula", tag, owner, clock, "amiga_paula", __FILE__),
|
||||
paula_8364_device::paula_8364_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, PAULA_8364, "8364 Paula", tag, owner, clock, "paula_8364", __FILE__),
|
||||
device_sound_interface(mconfig, *this),
|
||||
m_stream(nullptr)
|
||||
{
|
||||
@ -44,7 +44,7 @@ amiga_sound_device::amiga_sound_device(const machine_config &mconfig, const char
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void amiga_sound_device::device_start()
|
||||
void paula_8364_device::device_start()
|
||||
{
|
||||
// initialize channels
|
||||
for (int i = 0; i < 4; i++)
|
||||
@ -53,7 +53,7 @@ void amiga_sound_device::device_start()
|
||||
m_channel[i].curticks = 0;
|
||||
m_channel[i].manualmode = false;
|
||||
m_channel[i].curlocation = 0;
|
||||
m_channel[i].irq_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(amiga_sound_device::signal_irq), this));
|
||||
m_channel[i].irq_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(paula_8364_device::signal_irq), this));
|
||||
}
|
||||
|
||||
// create the stream
|
||||
@ -69,7 +69,7 @@ void amiga_sound_device::device_start()
|
||||
// signal_irq - irq signaling
|
||||
//-------------------------------------------------
|
||||
|
||||
TIMER_CALLBACK_MEMBER( amiga_sound_device::signal_irq )
|
||||
TIMER_CALLBACK_MEMBER( paula_8364_device::signal_irq )
|
||||
{
|
||||
amiga_state *state = machine().driver_data<amiga_state>();
|
||||
|
||||
@ -80,7 +80,7 @@ TIMER_CALLBACK_MEMBER( amiga_sound_device::signal_irq )
|
||||
// dma_reload
|
||||
//-------------------------------------------------
|
||||
|
||||
void amiga_sound_device::dma_reload(audio_channel *chan)
|
||||
void paula_8364_device::dma_reload(audio_channel *chan)
|
||||
{
|
||||
amiga_state *state = machine().driver_data<amiga_state>();
|
||||
|
||||
@ -95,7 +95,7 @@ void amiga_sound_device::dma_reload(audio_channel *chan)
|
||||
// data_w - manual mode data writer
|
||||
//-------------------------------------------------
|
||||
|
||||
void amiga_sound_device::data_w(int which, uint16_t data)
|
||||
void paula_8364_device::data_w(int which, uint16_t data)
|
||||
{
|
||||
m_channel[which].manualmode = true;
|
||||
}
|
||||
@ -104,7 +104,7 @@ void amiga_sound_device::data_w(int which, uint16_t data)
|
||||
// update - stream updater
|
||||
//-------------------------------------------------
|
||||
|
||||
void amiga_sound_device::update()
|
||||
void paula_8364_device::update()
|
||||
{
|
||||
m_stream->update();
|
||||
}
|
||||
@ -113,7 +113,7 @@ void amiga_sound_device::update()
|
||||
// sound_stream_update - handle a stream update
|
||||
//-------------------------------------------------
|
||||
|
||||
void amiga_sound_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
|
||||
void paula_8364_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
|
||||
{
|
||||
amiga_state *state = machine().driver_data<amiga_state>();
|
||||
int channum, sampoffs = 0;
|
97
src/devices/machine/8364_paula.h
Normal file
97
src/devices/machine/8364_paula.h
Normal file
@ -0,0 +1,97 @@
|
||||
// license: GPL-2.0+
|
||||
// copyright-holders: Dirk Best
|
||||
/***************************************************************************
|
||||
|
||||
Commodore 8364 "Paula"
|
||||
|
||||
Multi-purpose chip that is part of the Amiga chipset. The name "Paula"
|
||||
is derived from "Ports, Audio, UART and Logic". It features 4-channel
|
||||
DMA driven audio, the floppy controller, a serial receiver/transmitter,
|
||||
analog inputs and contains the interrupt controller.
|
||||
|
||||
____ ____
|
||||
D8 1 |* u | 48 D9
|
||||
D7 2 | | 47 D10
|
||||
D6 3 | | 46 D11
|
||||
D5 4 | | 45 D12
|
||||
D4 5 | | 44 D13
|
||||
D3 6 | | 43 D14
|
||||
D2 7 | | 42 D15
|
||||
GND 8 | | 41 RXD
|
||||
D1 9 | | 40 TXD
|
||||
D0 10 | | 39 DKWE
|
||||
/RES 11 | | 38 /DKWD
|
||||
DMAL 12 | | 37 /DKRD
|
||||
/IPL0 13 | | 36 POT1Y
|
||||
/IPL1 14 | | 35 POT1X
|
||||
/IPL2 15 | | 34 ANAGND
|
||||
/INT2 16 | | 33 POT0Y
|
||||
/INT3 17 | | 32 POT0X
|
||||
/INT6 18 | | 31 AUDL
|
||||
RGA8 19 | | 30 AUDR
|
||||
RGA7 20 | | 29 CCKQ
|
||||
RGA6 21 | | 28 CCK
|
||||
RGA5 22 | | 27 VCC
|
||||
RGA4 23 | | 26 RGA1
|
||||
RGA3 24 |_________| 25 RGA2
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef MAME_DEVICES_MACHINE_8364_PAULA_H
|
||||
#define MAME_DEVICES_MACHINE_8364_PAULA_H
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> paula_8364_device
|
||||
|
||||
class paula_8364_device : public device_t, public device_sound_interface
|
||||
{
|
||||
public:
|
||||
paula_8364_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
~paula_8364_device() {}
|
||||
|
||||
void update();
|
||||
void data_w(int which, uint16_t data);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
|
||||
// sound stream update overrides
|
||||
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
|
||||
|
||||
private:
|
||||
static const int CLOCK_DIVIDER = 16;
|
||||
|
||||
struct audio_channel
|
||||
{
|
||||
emu_timer *irq_timer;
|
||||
uint32_t curlocation;
|
||||
uint16_t curlength;
|
||||
uint16_t curticks;
|
||||
uint8_t index;
|
||||
bool dma_enabled;
|
||||
bool manualmode;
|
||||
int8_t latched;
|
||||
};
|
||||
|
||||
void dma_reload(audio_channel *chan);
|
||||
|
||||
// internal state
|
||||
audio_channel m_channel[4];
|
||||
sound_stream *m_stream;
|
||||
|
||||
TIMER_CALLBACK_MEMBER( signal_irq );
|
||||
};
|
||||
|
||||
// device type definition
|
||||
extern const device_type PAULA_8364;
|
||||
|
||||
#endif // MAME_DEVICES_MACHINE_8364_PAULA_H
|
@ -1,65 +0,0 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Aaron Giles
|
||||
/***************************************************************************
|
||||
|
||||
Amiga audio hardware
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __SOUND_AMIGA_H__
|
||||
#define __SOUND_AMIGA_H__
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> amiga_sound_device
|
||||
|
||||
class amiga_sound_device : public device_t, public device_sound_interface
|
||||
{
|
||||
public:
|
||||
amiga_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
~amiga_sound_device() {}
|
||||
|
||||
void update();
|
||||
void data_w(int which, uint16_t data);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
|
||||
// sound stream update overrides
|
||||
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
|
||||
|
||||
private:
|
||||
static const int CLOCK_DIVIDER = 16;
|
||||
|
||||
struct audio_channel
|
||||
{
|
||||
emu_timer *irq_timer;
|
||||
uint32_t curlocation;
|
||||
uint16_t curlength;
|
||||
uint16_t curticks;
|
||||
uint8_t index;
|
||||
bool dma_enabled;
|
||||
bool manualmode;
|
||||
int8_t latched;
|
||||
};
|
||||
|
||||
void dma_reload(audio_channel *chan);
|
||||
|
||||
// internal state
|
||||
audio_channel m_channel[4];
|
||||
sound_stream *m_stream;
|
||||
|
||||
TIMER_CALLBACK_MEMBER( signal_irq );
|
||||
};
|
||||
|
||||
extern const device_type AMIGA;
|
||||
|
||||
#endif // __SOUND_AMIGA_H__
|
@ -320,7 +320,7 @@ static MACHINE_CONFIG_START( alg_r1, alg_state )
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
|
||||
MCFG_SOUND_ADD("amiga", AMIGA, amiga_state::CLK_C1_NTSC)
|
||||
MCFG_SOUND_ADD("amiga", PAULA_8364, amiga_state::CLK_C1_NTSC)
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 0.25)
|
||||
MCFG_SOUND_ROUTE(2, "rspeaker", 0.25)
|
||||
|
@ -1329,7 +1329,7 @@ static MACHINE_CONFIG_START( amiga_base, amiga_state )
|
||||
|
||||
// audio
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
MCFG_SOUND_ADD("amiga", AMIGA, amiga_state::CLK_C1_PAL)
|
||||
MCFG_SOUND_ADD("amiga", PAULA_8364, amiga_state::CLK_C1_PAL)
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 0.50)
|
||||
MCFG_SOUND_ROUTE(2, "rspeaker", 0.50)
|
||||
|
@ -312,7 +312,7 @@ static MACHINE_CONFIG_START( arcadia, arcadia_amiga_state )
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
|
||||
MCFG_SOUND_ADD("amiga", AMIGA, amiga_state::CLK_C1_NTSC)
|
||||
MCFG_SOUND_ADD("amiga", PAULA_8364, amiga_state::CLK_C1_NTSC)
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 0.50)
|
||||
MCFG_SOUND_ROUTE(2, "rspeaker", 0.50)
|
||||
|
@ -1049,7 +1049,7 @@ static MACHINE_CONFIG_START( cubo, cubo_state )
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
|
||||
MCFG_SOUND_ADD("amiga", AMIGA, amiga_state::CLK_C1_PAL)
|
||||
MCFG_SOUND_ADD("amiga", PAULA_8364, amiga_state::CLK_C1_PAL)
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.25)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 0.25)
|
||||
MCFG_SOUND_ROUTE(2, "rspeaker", 0.25)
|
||||
|
@ -326,7 +326,7 @@ static MACHINE_CONFIG_START( mquake, mquake_state )
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
|
||||
MCFG_SOUND_ADD("amiga", AMIGA, amiga_state::CLK_C1_NTSC)
|
||||
MCFG_SOUND_ADD("amiga", PAULA_8364, amiga_state::CLK_C1_NTSC)
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 0.50)
|
||||
MCFG_SOUND_ROUTE(2, "rspeaker", 0.50)
|
||||
|
@ -284,7 +284,7 @@ static MACHINE_CONFIG_START( upscope, upscope_state )
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
|
||||
MCFG_SOUND_ADD("amiga", AMIGA, amiga_state::CLK_C1_NTSC)
|
||||
MCFG_SOUND_ADD("amiga", PAULA_8364, amiga_state::CLK_C1_NTSC)
|
||||
MCFG_SOUND_ROUTE(0, "rspeaker", 0.50)
|
||||
MCFG_SOUND_ROUTE(1, "lspeaker", 0.50)
|
||||
MCFG_SOUND_ROUTE(2, "lspeaker", 0.50)
|
||||
|
@ -21,7 +21,7 @@ Ernesto Corvi & Mariusz Wojcieszek
|
||||
#include "machine/msm6242.h"
|
||||
#include "machine/akiko.h"
|
||||
#include "machine/i2cmem.h"
|
||||
#include "sound/amiga.h"
|
||||
#include "machine/8364_paula.h"
|
||||
#include "video/amigaaga.h"
|
||||
|
||||
|
||||
@ -563,7 +563,7 @@ protected:
|
||||
required_device<mos8520_device> m_cia_1;
|
||||
optional_device<rs232_port_device> m_rs232;
|
||||
optional_device<centronics_device> m_centronics;
|
||||
required_device<amiga_sound_device> m_sound;
|
||||
required_device<paula_8364_device> m_sound;
|
||||
optional_device<amiga_fdc> m_fdc;
|
||||
required_device<screen_device> m_screen;
|
||||
optional_device<palette_device> m_palette;
|
||||
|
Loading…
Reference in New Issue
Block a user