summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/audio
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/audio')
-rw-r--r--src/mame/audio/8080bw.cpp42
-rw-r--r--src/mame/audio/alesis.cpp4
-rw-r--r--src/mame/audio/arcadia.cpp2
-rw-r--r--src/mame/audio/arcadia.h4
-rw-r--r--src/mame/audio/astrof.cpp4
-rw-r--r--src/mame/audio/atarijsa.cpp20
-rw-r--r--src/mame/audio/atarijsa.h18
-rw-r--r--src/mame/audio/beezer.cpp10
-rw-r--r--src/mame/audio/cage.cpp38
-rw-r--r--src/mame/audio/cage.h34
-rw-r--r--src/mame/audio/cchasm.cpp2
-rw-r--r--src/mame/audio/cclimber.cpp4
-rw-r--r--src/mame/audio/cclimber.h6
-rw-r--r--src/mame/audio/channelf.cpp4
-rw-r--r--src/mame/audio/channelf.h4
-rw-r--r--src/mame/audio/cinemat.cpp36
-rw-r--r--src/mame/audio/copsnrob.cpp14
-rw-r--r--src/mame/audio/cps3.cpp22
-rw-r--r--src/mame/audio/cps3.h16
-rw-r--r--src/mame/audio/dai_snd.cpp14
-rw-r--r--src/mame/audio/dai_snd.h10
-rw-r--r--src/mame/audio/dave.cpp8
-rw-r--r--src/mame/audio/dave.h10
-rw-r--r--src/mame/audio/dcs.cpp88
-rw-r--r--src/mame/audio/dcs.h136
-rw-r--r--src/mame/audio/decobsmt.cpp4
-rw-r--r--src/mame/audio/decobsmt.h8
-rw-r--r--src/mame/audio/dkong.cpp2
-rw-r--r--src/mame/audio/dsbz80.cpp4
-rw-r--r--src/mame/audio/dsbz80.h8
-rw-r--r--src/mame/audio/exidy.cpp24
-rw-r--r--src/mame/audio/exidy.h62
-rw-r--r--src/mame/audio/exidy440.cpp56
-rw-r--r--src/mame/audio/exidy440.h44
-rw-r--r--src/mame/audio/galaxian.cpp4
-rw-r--r--src/mame/audio/galaxian.h4
-rw-r--r--src/mame/audio/gamate.cpp8
-rw-r--r--src/mame/audio/geebee.cpp6
-rw-r--r--src/mame/audio/geebee.h4
-rw-r--r--src/mame/audio/gomoku.cpp8
-rw-r--r--src/mame/audio/gorf.cpp2
-rw-r--r--src/mame/audio/gottlieb.cpp24
-rw-r--r--src/mame/audio/gottlieb.h44
-rw-r--r--src/mame/audio/gridlee.cpp6
-rw-r--r--src/mame/audio/harddriv.cpp6
-rw-r--r--src/mame/audio/hng64.cpp14
-rw-r--r--src/mame/audio/hyprolyb.cpp4
-rw-r--r--src/mame/audio/hyprolyb.h8
-rw-r--r--src/mame/audio/irem.cpp8
-rw-r--r--src/mame/audio/irem.h12
-rw-r--r--src/mame/audio/jaguar.cpp2
-rw-r--r--src/mame/audio/leland.cpp12
-rw-r--r--src/mame/audio/lynx.cpp14
-rw-r--r--src/mame/audio/lynx.h32
-rw-r--r--src/mame/audio/m72.cpp2
-rw-r--r--src/mame/audio/m72.h10
-rw-r--r--src/mame/audio/mario.cpp8
-rw-r--r--src/mame/audio/meadows.cpp2
-rw-r--r--src/mame/audio/micro3d.cpp6
-rw-r--r--src/mame/audio/midway.cpp22
-rw-r--r--src/mame/audio/midway.h48
-rw-r--r--src/mame/audio/mw8080bw.cpp16
-rw-r--r--src/mame/audio/n8080.cpp10
-rw-r--r--src/mame/audio/namco52.cpp2
-rw-r--r--src/mame/audio/namco52.h6
-rw-r--r--src/mame/audio/namco54.cpp6
-rw-r--r--src/mame/audio/namco54.h4
-rw-r--r--src/mame/audio/phoenix.cpp8
-rw-r--r--src/mame/audio/pleiads.cpp14
-rw-r--r--src/mame/audio/pleiads.h10
-rw-r--r--src/mame/audio/polepos.cpp6
-rw-r--r--src/mame/audio/redbaron.cpp8
-rw-r--r--src/mame/audio/redbaron.h6
-rw-r--r--src/mame/audio/s11c_bg.cpp10
-rw-r--r--src/mame/audio/s11c_bg.h6
-rw-r--r--src/mame/audio/segag80r.cpp18
-rw-r--r--src/mame/audio/segam1audio.cpp6
-rw-r--r--src/mame/audio/segam1audio.h4
-rw-r--r--src/mame/audio/segasnd.cpp18
-rw-r--r--src/mame/audio/segasnd.h70
-rw-r--r--src/mame/audio/seibu.cpp16
-rw-r--r--src/mame/audio/seibu.h30
-rw-r--r--src/mame/audio/snes_snd.cpp26
-rw-r--r--src/mame/audio/snes_snd.h30
-rw-r--r--src/mame/audio/snk6502.cpp18
-rw-r--r--src/mame/audio/socrates.cpp4
-rw-r--r--src/mame/audio/socrates.h18
-rw-r--r--src/mame/audio/special.cpp8
-rw-r--r--src/mame/audio/special.h2
-rw-r--r--src/mame/audio/starwars.cpp2
-rw-r--r--src/mame/audio/suna8.cpp6
-rw-r--r--src/mame/audio/svis_snd.cpp14
-rw-r--r--src/mame/audio/svis_snd.h14
-rw-r--r--src/mame/audio/t5182.cpp2
-rw-r--r--src/mame/audio/t5182.h4
-rw-r--r--src/mame/audio/taito_en.cpp10
-rw-r--r--src/mame/audio/taito_en.h20
-rw-r--r--src/mame/audio/taito_zm.cpp4
-rw-r--r--src/mame/audio/taito_zm.h8
-rw-r--r--src/mame/audio/taitosnd.cpp16
-rw-r--r--src/mame/audio/taitosnd.h14
-rw-r--r--src/mame/audio/targ.cpp6
-rw-r--r--src/mame/audio/tiamc1.cpp6
-rw-r--r--src/mame/audio/timeplt.cpp2
-rw-r--r--src/mame/audio/timeplt.h4
-rw-r--r--src/mame/audio/trackfld.cpp6
-rw-r--r--src/mame/audio/trackfld.h2
-rw-r--r--src/mame/audio/turbo.cpp14
-rw-r--r--src/mame/audio/turrett.cpp14
-rw-r--r--src/mame/audio/tvc.cpp4
-rw-r--r--src/mame/audio/tvc.h4
-rw-r--r--src/mame/audio/tx1.cpp10
-rw-r--r--src/mame/audio/vboy.cpp54
-rw-r--r--src/mame/audio/vboy.h40
-rw-r--r--src/mame/audio/vc4000.cpp4
-rw-r--r--src/mame/audio/vc4000.h4
-rw-r--r--src/mame/audio/warpwarp.cpp6
-rw-r--r--src/mame/audio/warpwarp.h4
-rw-r--r--src/mame/audio/williams.cpp12
-rw-r--r--src/mame/audio/williams.h24
-rw-r--r--src/mame/audio/wiping.cpp8
-rw-r--r--src/mame/audio/wiping.h14
-rw-r--r--src/mame/audio/wow.cpp2
-rw-r--r--src/mame/audio/wpcsnd.cpp14
-rw-r--r--src/mame/audio/wpcsnd.h14
-rw-r--r--src/mame/audio/wswan.cpp8
-rw-r--r--src/mame/audio/wswan.h52
-rw-r--r--src/mame/audio/zaccaria.cpp12
-rw-r--r--src/mame/audio/zaccaria.h10
-rw-r--r--src/mame/audio/zaxxon.cpp10
130 files changed, 970 insertions, 970 deletions
diff --git a/src/mame/audio/8080bw.cpp b/src/mame/audio/8080bw.cpp
index 41fd7160765..6b13793cd97 100644
--- a/src/mame/audio/8080bw.cpp
+++ b/src/mame/audio/8080bw.cpp
@@ -32,7 +32,7 @@ MACHINE_START_MEMBER(_8080bw_state,extra_8080bw_sh)
WRITE8_MEMBER(_8080bw_state::invadpt2_sh_port_1_w)
{
- UINT8 rising_bits = data & ~m_port_1_last_extra;
+ uint8_t rising_bits = data & ~m_port_1_last_extra;
m_sn->enable_w(!(data & 0x01)); /* SAUCER SOUND */
@@ -57,7 +57,7 @@ WRITE8_MEMBER(_8080bw_state::invadpt2_sh_port_2_w)
D2 = 82K
D3 = 100K */
- UINT8 rising_bits = data & ~m_port_2_last_extra;
+ uint8_t rising_bits = data & ~m_port_2_last_extra;
if (rising_bits & 0x01) m_samples->start(4, 3); /* FLEET */
if (rising_bits & 0x02) m_samples->start(4, 4); /* FLEET */
@@ -80,7 +80,7 @@ WRITE8_MEMBER(_8080bw_state::invadpt2_sh_port_2_w)
WRITE8_MEMBER(_8080bw_state::spacerng_sh_port_2_w)
{
- UINT8 rising_bits = data & ~m_port_2_last_extra;
+ uint8_t rising_bits = data & ~m_port_2_last_extra;
if (rising_bits & 0x01) m_samples->start(4, 3); /* FLEET */
if (rising_bits & 0x02) m_samples->start(4, 4); /* FLEET */
@@ -101,7 +101,7 @@ WRITE8_MEMBER(_8080bw_state::spacerng_sh_port_2_w)
WRITE8_MEMBER(_8080bw_state::spcewars_sh_port_w)
{
- UINT8 rising_bits = data & ~m_port_1_last_extra;
+ uint8_t rising_bits = data & ~m_port_1_last_extra;
m_sn->enable_w(!(data & 0x01)); /* Saucer Sound */
@@ -139,7 +139,7 @@ const char *const lrescue_sample_names[] =
WRITE8_MEMBER(_8080bw_state::lrescue_sh_port_1_w)
{
- UINT8 rising_bits = data & ~m_port_1_last_extra;
+ uint8_t rising_bits = data & ~m_port_1_last_extra;
if (rising_bits & 0x01) m_samples->start(0, 3); /* Thrust */
if (rising_bits & 0x02) m_samples->start(1, 2); /* Shot Sound */
@@ -156,7 +156,7 @@ WRITE8_MEMBER(_8080bw_state::lrescue_sh_port_1_w)
WRITE8_MEMBER(_8080bw_state::lrescue_sh_port_2_w)
{
- UINT8 rising_bits = data & ~m_port_2_last_extra;
+ uint8_t rising_bits = data & ~m_port_2_last_extra;
if (rising_bits & 0x01) m_samples->start(1, 8); /* Footstep high tone */
if (rising_bits & 0x02) m_samples->start(1, 7); /* Footstep low tone */
@@ -246,7 +246,7 @@ WRITE8_MEMBER( _8080bw_state::ballbomb_01_w )
WRITE8_MEMBER(_8080bw_state::ballbomb_sh_port_1_w)
{
- UINT8 rising_bits = data & ~m_port_1_last_extra;
+ uint8_t rising_bits = data & ~m_port_1_last_extra;
if (rising_bits & 0x01) m_samples->start(1, 2); /* Hit a balloon */
if (rising_bits & 0x02) m_samples->start(2, 0); /* Shot Sound */
@@ -263,7 +263,7 @@ WRITE8_MEMBER(_8080bw_state::ballbomb_sh_port_1_w)
WRITE8_MEMBER(_8080bw_state::ballbomb_sh_port_2_w)
{
- UINT8 rising_bits = data & ~m_port_2_last_extra;
+ uint8_t rising_bits = data & ~m_port_2_last_extra;
if (data & 0x01) m_samples->start(0, 7); /* Indicates plane will drop bombs */
if (data & 0x04) m_samples->start(0, 4); /* Plane is dropping new balloons at start of level */
@@ -322,7 +322,7 @@ DISCRETE_SOUND_END
WRITE8_MEMBER(_8080bw_state::indianbt_sh_port_1_w)
{
/* bit 4 occurs every 5.25 seconds during gameplay */
- UINT8 rising_bits = data & ~m_port_1_last_extra;
+ uint8_t rising_bits = data & ~m_port_1_last_extra;
if (rising_bits & 0x01) m_samples->start(1, 7); /* Death */
if (rising_bits & 0x02) m_samples->start(0, 1); /* Shot Sound */
@@ -336,7 +336,7 @@ WRITE8_MEMBER(_8080bw_state::indianbt_sh_port_1_w)
WRITE8_MEMBER(_8080bw_state::indianbt_sh_port_2_w)
{
- UINT8 rising_bits = data & ~m_port_2_last_extra;
+ uint8_t rising_bits = data & ~m_port_2_last_extra;
if (rising_bits & 0x01) m_samples->start(4, 0); /* Bird dropped an egg, Lasso used */
if (rising_bits & 0x02) m_samples->start(4, 2); /* Egg hatches, egg shot */
@@ -355,7 +355,7 @@ WRITE8_MEMBER(_8080bw_state::indianbt_sh_port_3_w)
WRITE8_MEMBER(_8080bw_state::indianbtbr_sh_port_1_w)
{
- UINT8 rising_bits = data & ~m_port_1_last_extra;
+ uint8_t rising_bits = data & ~m_port_1_last_extra;
if (rising_bits & 0x01) m_samples->start(4, 7); /* Lasso */
if (rising_bits & 0x04) m_samples->start(0, 1); /* Shot Sound */
@@ -368,7 +368,7 @@ WRITE8_MEMBER(_8080bw_state::indianbtbr_sh_port_1_w)
WRITE8_MEMBER(_8080bw_state::indianbtbr_sh_port_2_w)
{
- UINT8 rising_bits = data & ~m_port_2_last_extra;
+ uint8_t rising_bits = data & ~m_port_2_last_extra;
if (rising_bits & 0x08) m_samples->start(2, 3); /* Move */
if (rising_bits & 0x10) m_samples->start(3, 7); /* Death */
@@ -1029,7 +1029,7 @@ WRITE8_MEMBER(_8080bw_state::invrvnge_sh_port_2_w)
WRITE8_MEMBER(_8080bw_state::rollingc_sh_port_w)
{
- UINT8 rising_bits = data & ~m_port_3_last_extra;
+ uint8_t rising_bits = data & ~m_port_3_last_extra;
if (rising_bits & 0x02) m_samples->start(4, 0); /* Steering */
if (rising_bits & 0x04) m_samples->start(0, 1); /* Collision */
@@ -1065,8 +1065,8 @@ WRITE8_MEMBER( _8080bw_state::lupin3_00_w )
WRITE8_MEMBER(_8080bw_state::lupin3_sh_port_1_w)
{
- UINT8 rising_bits = data & ~m_port_1_last_extra;
- static UINT8 lupin3_step = 2;
+ uint8_t rising_bits = data & ~m_port_1_last_extra;
+ static uint8_t lupin3_step = 2;
if (rising_bits & 0x01)
{
@@ -1089,7 +1089,7 @@ WRITE8_MEMBER(_8080bw_state::lupin3_sh_port_1_w)
WRITE8_MEMBER(_8080bw_state::lupin3_sh_port_2_w)
{
- UINT8 rising_bits = data & ~m_port_2_last_extra;
+ uint8_t rising_bits = data & ~m_port_2_last_extra;
if (rising_bits & 0x01) m_samples->start(0, 6); /* Lands on top of building, wife kicks man */
//if (rising_bits & 0x02) m_samples->start(3, 7); /* deposit money, start intermission, end game */
@@ -1117,7 +1117,7 @@ WRITE8_MEMBER(_8080bw_state::schasercv_sh_port_1_w)
bit 3 = 1st speedup
Death is a stream of ff's with some fe's thrown in */
- UINT8 rising_bits = data & ~m_port_1_last_extra;
+ uint8_t rising_bits = data & ~m_port_1_last_extra;
if (rising_bits & 0x02) m_samples->start(1, 6); /* Ran over a dot */
if (rising_bits & 0x10) m_samples->start(0, 1); /* Death */
@@ -1143,7 +1143,7 @@ WRITE8_MEMBER(_8080bw_state::schasercv_sh_port_2_w)
WRITE8_MEMBER(_8080bw_state::yosakdon_sh_port_1_w)
{
- UINT8 rising_bits = data & ~m_port_1_last_extra;
+ uint8_t rising_bits = data & ~m_port_1_last_extra;
if (rising_bits & 0x01) m_samples->start(0, 3); /* Game Over */
if (rising_bits & 0x02) m_samples->start(2, 0); /* Bird dead */
@@ -1158,7 +1158,7 @@ WRITE8_MEMBER(_8080bw_state::yosakdon_sh_port_1_w)
WRITE8_MEMBER(_8080bw_state::yosakdon_sh_port_2_w)
{
- UINT8 rising_bits = data & ~m_port_2_last_extra;
+ uint8_t rising_bits = data & ~m_port_2_last_extra;
if (rising_bits & 0x01) m_samples->start(1, 6); /* Ready? , Game Over */
if (rising_bits & 0x04) m_samples->start(3, 7); /* Big bird dead */
@@ -1182,7 +1182,7 @@ WRITE8_MEMBER(_8080bw_state::yosakdon_sh_port_2_w)
WRITE8_MEMBER(_8080bw_state::shuttlei_sh_port_1_w)
{
/* bit 3 is high while you are alive and playing */
- UINT8 rising_bits = data & ~m_port_1_last_extra;
+ uint8_t rising_bits = data & ~m_port_1_last_extra;
if (rising_bits & 0x01) m_samples->start(4, 4); /* Fleet move */
if (rising_bits & 0x02) m_samples->start(5, 8); /* Extra Tank */
@@ -1227,7 +1227,7 @@ WRITE8_MEMBER( _8080bw_state::darthvdr_00_w )
WRITE8_MEMBER( _8080bw_state::darthvdr_08_w )
{
- UINT8 rising_bits = data & ~m_port_1_last_extra;
+ uint8_t rising_bits = data & ~m_port_1_last_extra;
machine().sound().system_enable(data & 0x01);
diff --git a/src/mame/audio/alesis.cpp b/src/mame/audio/alesis.cpp
index fdd2c00fc05..77ff4ebe744 100644
--- a/src/mame/audio/alesis.cpp
+++ b/src/mame/audio/alesis.cpp
@@ -36,7 +36,7 @@ MACHINE_CONFIG_END
// alesis_dm3ag_device - constructor
//-------------------------------------------------
-alesis_dm3ag_device::alesis_dm3ag_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+alesis_dm3ag_device::alesis_dm3ag_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ALESIS_DM3AG, "Alesis DM3AG", tag, owner, clock, "alesis_dm3ag", __FILE__),
m_dac(*this, "dac"),
m_samples(*this, DEVICE_SELF)
@@ -83,7 +83,7 @@ void alesis_dm3ag_device::device_timer(emu_timer &timer, device_timer_id id, int
{
if (m_output_active)
{
- INT16 sample = m_samples[m_cur_sample++];
+ int16_t sample = m_samples[m_cur_sample++];
int count = 0;
while (sample == -128)
diff --git a/src/mame/audio/arcadia.cpp b/src/mame/audio/arcadia.cpp
index 306932a0b44..ccb04e0f4c7 100644
--- a/src/mame/audio/arcadia.cpp
+++ b/src/mame/audio/arcadia.cpp
@@ -47,7 +47,7 @@ const device_type ARCADIA_SOUND = &device_creator<arcadia_sound_device>;
// arcadia_sound_device - constructor
//-------------------------------------------------
-arcadia_sound_device::arcadia_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+arcadia_sound_device::arcadia_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ARCADIA_SOUND, "Arcadia Audio Custom", tag, owner, clock, "arcadia_sound", __FILE__),
device_sound_interface(mconfig, *this)
{
diff --git a/src/mame/audio/arcadia.h b/src/mame/audio/arcadia.h
index 14a4f298294..0b95e0c44b5 100644
--- a/src/mame/audio/arcadia.h
+++ b/src/mame/audio/arcadia.h
@@ -21,7 +21,7 @@ class arcadia_sound_device : public device_t,
{
public:
// construction/destruction
- arcadia_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ arcadia_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_WRITE8_MEMBER(write);
protected:
@@ -31,7 +31,7 @@ protected:
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
sound_stream *m_channel;
- UINT8 m_reg[3];
+ uint8_t m_reg[3];
int m_size, m_pos,m_tval,m_nval;
unsigned m_mode, m_omode;
unsigned m_volume;
diff --git a/src/mame/audio/astrof.cpp b/src/mame/audio/astrof.cpp
index 98c1b62cc9a..e5fee67ee6c 100644
--- a/src/mame/audio/astrof.cpp
+++ b/src/mame/audio/astrof.cpp
@@ -34,7 +34,7 @@
WRITE8_MEMBER(astrof_state::astrof_audio_1_w)
{
- UINT8 rising_bits = data & ~m_port_1_last;
+ uint8_t rising_bits = data & ~m_port_1_last;
if (m_astrof_death_playing)
m_astrof_death_playing = m_samples->playing(CHANNEL_EXPLOSION);
@@ -79,7 +79,7 @@ WRITE8_MEMBER(astrof_state::astrof_audio_1_w)
WRITE8_MEMBER(astrof_state::astrof_audio_2_w)
{
- UINT8 rising_bits = data & ~m_port_2_last;
+ uint8_t rising_bits = data & ~m_port_2_last;
/* D0-D2 - explosion select (triggered by D2 of the other port */
if (m_astrof_start_explosion)
diff --git a/src/mame/audio/atarijsa.cpp b/src/mame/audio/atarijsa.cpp
index 0ad49a64295..16dbf50fe8c 100644
--- a/src/mame/audio/atarijsa.cpp
+++ b/src/mame/audio/atarijsa.cpp
@@ -285,7 +285,7 @@ INPUT_PORTS_END
// atari_jsa_base_device - constructor
//-------------------------------------------------
-atari_jsa_base_device::atari_jsa_base_device(const machine_config &mconfig, device_type devtype, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, int channels)
+atari_jsa_base_device::atari_jsa_base_device(const machine_config &mconfig, device_type devtype, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, int channels)
: device_t(mconfig, devtype, name, tag, owner, clock, shortname, __FILE__),
device_mixer_interface(mconfig, *this, channels),
m_soundcomm(*this, "soundcomm"),
@@ -412,7 +412,7 @@ WRITE_LINE_MEMBER( atari_jsa_base_device::main_int_write_line )
// atari_jsa_oki_base_device: Constructor
//-------------------------------------------------
-atari_jsa_oki_base_device::atari_jsa_oki_base_device(const machine_config &mconfig, device_type devtype, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, int channels)
+atari_jsa_oki_base_device::atari_jsa_oki_base_device(const machine_config &mconfig, device_type devtype, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, int channels)
: atari_jsa_base_device(mconfig, devtype, name, tag, owner, clock, shortname, channels),
m_oki1(*this, "oki1"),
m_oki2(*this, "oki2"),
@@ -628,7 +628,7 @@ void atari_jsa_oki_base_device::update_all_volumes()
// atari_jsa_i_device: Constructor
//-------------------------------------------------
-atari_jsa_i_device::atari_jsa_i_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+atari_jsa_i_device::atari_jsa_i_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: atari_jsa_base_device(mconfig, ATARI_JSA_I, "Atari JSA I Sound Board", tag, owner, clock, "atjsa1", 2),
m_pokey(*this, "pokey"),
m_tms5220(*this, "tms"),
@@ -657,7 +657,7 @@ READ8_MEMBER( atari_jsa_i_device::rdio_r )
// 0x01 = coin 1
//
- UINT8 result = m_jsai->read();
+ uint8_t result = m_jsai->read();
if (!m_test_read_cb())
result ^= 0x80;
if (m_tms5220 != nullptr && m_tms5220->readyq_r() == 0)
@@ -843,7 +843,7 @@ void atari_jsa_i_device::update_all_volumes()
// atari_jsa_ii_device: Constructor
//-------------------------------------------------
-atari_jsa_ii_device::atari_jsa_ii_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+atari_jsa_ii_device::atari_jsa_ii_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: atari_jsa_oki_base_device(mconfig, ATARI_JSA_II, "Atari JSA II Sound Board", tag, owner, clock, "atjsa2", 1)
, m_jsaii(*this, "JSAII")
{
@@ -868,7 +868,7 @@ READ8_MEMBER( atari_jsa_ii_device::rdio_r )
// 0x01 = coin 1
//
- UINT8 result = m_jsaii->read();
+ uint8_t result = m_jsaii->read();
if (!m_test_read_cb())
result ^= 0x80;
@@ -907,13 +907,13 @@ ioport_constructor atari_jsa_ii_device::device_input_ports() const
// atari_jsa_iii_device: Constructor
//-------------------------------------------------
-atari_jsa_iii_device::atari_jsa_iii_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+atari_jsa_iii_device::atari_jsa_iii_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: atari_jsa_oki_base_device(mconfig, ATARI_JSA_III, "Atari JSA III Sound Board", tag, owner, clock, "atjsa3", 1)
, m_jsaiii(*this, "JSAIII")
{
}
-atari_jsa_iii_device::atari_jsa_iii_device(const machine_config &mconfig, device_type devtype, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, int channels)
+atari_jsa_iii_device::atari_jsa_iii_device(const machine_config &mconfig, device_type devtype, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, int channels)
: atari_jsa_oki_base_device(mconfig, devtype, name, tag, owner, clock, shortname, channels)
, m_jsaiii(*this, "JSAIII")
{
@@ -938,7 +938,7 @@ READ8_MEMBER( atari_jsa_iii_device::rdio_r )
// 0x01 = coin R (active high)
//
- UINT8 result = m_jsaiii->read();
+ uint8_t result = m_jsaiii->read();
if (!m_test_read_cb())
result ^= 0x90;
return result;
@@ -976,7 +976,7 @@ ioport_constructor atari_jsa_iii_device::device_input_ports() const
// atari_jsa_iiis_device: Constructor
//-------------------------------------------------
-atari_jsa_iiis_device::atari_jsa_iiis_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+atari_jsa_iiis_device::atari_jsa_iiis_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: atari_jsa_iii_device(mconfig, ATARI_JSA_IIIS, "Atari JSA IIIs Sound Board", tag, owner, clock, "atjsa3s", 2)
{
}
diff --git a/src/mame/audio/atarijsa.h b/src/mame/audio/atarijsa.h
index 553723f59ac..de3ff0dc144 100644
--- a/src/mame/audio/atarijsa.h
+++ b/src/mame/audio/atarijsa.h
@@ -80,7 +80,7 @@ class atari_jsa_base_device : public device_t,
{
protected:
// construction/destruction
- atari_jsa_base_device(const machine_config &mconfig, device_type devtype, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, int channels);
+ atari_jsa_base_device(const machine_config &mconfig, device_type devtype, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, int channels);
public:
// static configuration
@@ -129,8 +129,8 @@ protected:
// internal state
double m_ym2151_volume;
- UINT8 m_ym2151_ct1;
- UINT8 m_ym2151_ct2;
+ uint8_t m_ym2151_ct1;
+ uint8_t m_ym2151_ct2;
};
@@ -140,7 +140,7 @@ class atari_jsa_oki_base_device : public atari_jsa_base_device
{
protected:
// derived construction/destruction
- atari_jsa_oki_base_device(const machine_config &mconfig, device_type devtype, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, int channels);
+ atari_jsa_oki_base_device(const machine_config &mconfig, device_type devtype, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, int channels);
public:
// read/write handlers
@@ -184,7 +184,7 @@ class atari_jsa_i_device : public atari_jsa_base_device
{
public:
// construction/destruction
- atari_jsa_i_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ atari_jsa_i_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// read/write handlers
DECLARE_READ8_MEMBER( rdio_r );
@@ -221,7 +221,7 @@ class atari_jsa_ii_device : public atari_jsa_oki_base_device
{
public:
// construction/destruction
- atari_jsa_ii_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ atari_jsa_ii_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// read/write handlers
DECLARE_READ8_MEMBER( rdio_r );
@@ -241,11 +241,11 @@ class atari_jsa_iii_device : public atari_jsa_oki_base_device
{
public:
// construction/destruction
- atari_jsa_iii_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ atari_jsa_iii_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
// derived construction/destruction
- atari_jsa_iii_device(const machine_config &mconfig, device_type devtype, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, int channels);
+ atari_jsa_iii_device(const machine_config &mconfig, device_type devtype, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, int channels);
public:
// read/write handlers
@@ -266,7 +266,7 @@ class atari_jsa_iiis_device : public atari_jsa_iii_device
{
public:
// construction/destruction
- atari_jsa_iiis_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ atari_jsa_iiis_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
// device level overrides
diff --git a/src/mame/audio/beezer.cpp b/src/mame/audio/beezer.cpp
index fa2d49f0c56..a2a19a242f1 100644
--- a/src/mame/audio/beezer.cpp
+++ b/src/mame/audio/beezer.cpp
@@ -69,7 +69,7 @@
const device_type BEEZER = &device_creator<beezer_sound_device>;
-beezer_sound_device::beezer_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+beezer_sound_device::beezer_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, BEEZER, "beezer SFX", tag, owner, clock, "beezer_sound", __FILE__),
device_sound_interface(mconfig, *this),
//m_ptm_irq_state(0),
@@ -249,7 +249,7 @@ static inline void sh6840_apply_clock(struct sh6840_timer_channel_beez *t, int c
int beezer_sound_device::sh6840_update_noise(int clocks)
{
- UINT32 newxor;
+ uint32_t newxor;
int noise_clocks = 0;
int i;
@@ -412,8 +412,8 @@ void beezer_sound_device::sound_stream_update(sound_stream &stream, stream_sampl
struct sh6840_timer_channel_beez *t;
int clocks_this_sample;
int clocks;
- INT16 sample1, sample2, sample3, sample0;
- INT16 sample = 0;
+ int16_t sample1, sample2, sample3, sample0;
+ int16_t sample = 0;
sample1 = sample2 = sample3 = sample0 = 0;
/* determine how many 6840 clocks this sample */
@@ -425,7 +425,7 @@ void beezer_sound_device::sound_stream_update(sound_stream &stream, stream_sampl
if ((sh6840_timer[0].cr & 0x01) == 0) // if we're not in reset...
{
// int noise_clocks_this_sample = 0;
- UINT32 chan1_clocks;
+ uint32_t chan1_clocks;
/* generate noise if configured to do so */
if (noisy != 0)
diff --git a/src/mame/audio/cage.cpp b/src/mame/audio/cage.cpp
index 5a9818652b6..7d5c2d2deac 100644
--- a/src/mame/audio/cage.cpp
+++ b/src/mame/audio/cage.cpp
@@ -112,7 +112,7 @@ const device_type ATARI_CAGE = &device_creator<atari_cage_device>;
// atari_cage_device - constructor
//-------------------------------------------------
-atari_cage_device::atari_cage_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+atari_cage_device::atari_cage_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, ATARI_CAGE, "Atari CAGE", tag, owner, clock, "atari_cage", __FILE__),
m_cageram(*this, "cageram"),
m_soundlatch(*this, "soundlatch"),
@@ -120,7 +120,7 @@ atari_cage_device::atari_cage_device(const machine_config &mconfig, const char *
{
}
-atari_cage_device::atari_cage_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
+atari_cage_device::atari_cage_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
m_cageram(*this, "cageram"),
m_soundlatch(*this, "soundlatch"),
@@ -191,7 +191,7 @@ void atari_cage_device::reset_w(int state)
TIMER_DEVICE_CALLBACK_MEMBER( atari_cage_device::dma_timer_callback )
{
- UINT32 *tms32031_io_regs = m_tms32031_io_regs;
+ uint32_t *tms32031_io_regs = m_tms32031_io_regs;
/* if we weren't enabled, don't do anything, just shut ourself off */
if (!m_dma_enabled)
@@ -216,7 +216,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( atari_cage_device::dma_timer_callback )
void atari_cage_device::update_dma_state(address_space &space)
{
- UINT32 *tms32031_io_regs = m_tms32031_io_regs;
+ uint32_t *tms32031_io_regs = m_tms32031_io_regs;
/* determine the new enabled state */
int enabled = ((tms32031_io_regs[DMA_GLOBAL_CTL] & 3) == 3) && (tms32031_io_regs[DMA_TRANSFER_COUNT] != 0);
@@ -224,8 +224,8 @@ void atari_cage_device::update_dma_state(address_space &space)
/* see if we turned on */
if (enabled && !m_dma_enabled)
{
- INT16 sound_data[STACK_SOUND_BUFSIZE];
- UINT32 addr, inc;
+ int16_t sound_data[STACK_SOUND_BUFSIZE];
+ uint32_t addr, inc;
int i;
/* make sure our assumptions are correct */
@@ -287,7 +287,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( atari_cage_device::cage_timer_callback )
void atari_cage_device::update_timer(int which)
{
- UINT32 *tms32031_io_regs = m_tms32031_io_regs;
+ uint32_t *tms32031_io_regs = m_tms32031_io_regs;
/* determine the new enabled state */
int base = 0x10 * which;
@@ -325,9 +325,9 @@ void atari_cage_device::update_timer(int which)
void atari_cage_device::update_serial()
{
- UINT32 *tms32031_io_regs = m_tms32031_io_regs;
+ uint32_t *tms32031_io_regs = m_tms32031_io_regs;
attotime serial_clock_period, bit_clock_period;
- UINT32 freq;
+ uint32_t freq;
/* we start out at half the H1 frequency (or 2x the H1 period) */
serial_clock_period = m_cpu_h1_clock_period * 2;
@@ -361,8 +361,8 @@ void atari_cage_device::update_serial()
READ32_MEMBER( atari_cage_device::tms32031_io_r )
{
- UINT32 *tms32031_io_regs = m_tms32031_io_regs;
- UINT16 result = tms32031_io_regs[offset];
+ uint32_t *tms32031_io_regs = m_tms32031_io_regs;
+ uint16_t result = tms32031_io_regs[offset];
switch (offset)
{
@@ -379,7 +379,7 @@ READ32_MEMBER( atari_cage_device::tms32031_io_r )
WRITE32_MEMBER( atari_cage_device::tms32031_io_w )
{
- UINT32 *tms32031_io_regs = m_tms32031_io_regs;
+ uint32_t *tms32031_io_regs = m_tms32031_io_regs;
COMBINE_DATA(&tms32031_io_regs[offset]);
@@ -499,7 +499,7 @@ READ32_MEMBER( atari_cage_device::cage_io_status_r )
}
-UINT16 atari_cage_device::main_r()
+uint16_t atari_cage_device::main_r()
{
driver_device *drvstate = machine().driver_data<driver_device>();
if (LOG_COMM)
@@ -519,7 +519,7 @@ TIMER_CALLBACK_MEMBER( atari_cage_device::cage_deferred_w )
}
-void atari_cage_device::main_w(UINT16 data)
+void atari_cage_device::main_w(uint16_t data)
{
if (LOG_COMM)
logerror("%s:Command to CAGE = %04X\n", machine().describe_context(), data);
@@ -527,9 +527,9 @@ void atari_cage_device::main_w(UINT16 data)
}
-UINT16 atari_cage_device::control_r()
+uint16_t atari_cage_device::control_r()
{
- UINT16 result = 0;
+ uint16_t result = 0;
if (m_cpu_to_cage_ready)
result |= 2;
@@ -540,9 +540,9 @@ UINT16 atari_cage_device::control_r()
}
-void atari_cage_device::control_w(UINT16 data)
+void atari_cage_device::control_w(uint16_t data)
{
- UINT32 *tms32031_io_regs = m_tms32031_io_regs;
+ uint32_t *tms32031_io_regs = m_tms32031_io_regs;
m_control = data;
@@ -691,7 +691,7 @@ const device_type ATARI_CAGE_SEATTLE = &device_creator<atari_cage_seattle_device
// atari_cage_seattle_device - constructor
//-------------------------------------------------
-atari_cage_seattle_device::atari_cage_seattle_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+atari_cage_seattle_device::atari_cage_seattle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
atari_cage_device(mconfig, ATARI_CAGE_SEATTLE, "Atari CAGE Seattle", tag, owner, clock, "atari_cage_seattle", __FILE__)
{
}
diff --git a/src/mame/audio/cage.h b/src/mame/audio/cage.h
index 16ca29b74cb..a4e36acac55 100644
--- a/src/mame/audio/cage.h
+++ b/src/mame/audio/cage.h
@@ -25,8 +25,8 @@ class atari_cage_device : public device_t
{
public:
// construction/destruction
- atari_cage_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- atari_cage_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
+ atari_cage_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ atari_cage_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source);
static void static_set_speedup(device_t &device, offs_t speedup) { downcast<atari_cage_device &>(device).m_speedup = speedup; }
template<class _Object> static devcb_base &set_irqhandler_callback(device_t &device, _Object object) { return downcast<atari_cage_device &>(device).m_irqhandler.set_callback(object); }
@@ -36,11 +36,11 @@ public:
void reset_w(int state);
- UINT16 main_r();
- void main_w(UINT16 data);
+ uint16_t main_r();
+ void main_w(uint16_t data);
- UINT16 control_r();
- void control_w(UINT16 data);
+ uint16_t control_r();
+ void control_w(uint16_t data);
TIMER_DEVICE_CALLBACK_MEMBER( dma_timer_callback );
void update_dma_state(address_space &space);
@@ -62,31 +62,31 @@ protected:
virtual void device_start() override;
private:
- required_shared_ptr<UINT32> m_cageram;
+ required_shared_ptr<uint32_t> m_cageram;
cpu_device *m_cpu;
required_device<generic_latch_16_device> m_soundlatch;
attotime m_cpu_h1_clock_period;
- UINT8 m_cpu_to_cage_ready;
- UINT8 m_cage_to_cpu_ready;
+ uint8_t m_cpu_to_cage_ready;
+ uint8_t m_cage_to_cpu_ready;
devcb_write8 m_irqhandler;
attotime m_serial_period_per_word;
- UINT8 m_dma_enabled;
- UINT8 m_dma_timer_enabled;
+ uint8_t m_dma_enabled;
+ uint8_t m_dma_timer_enabled;
timer_device *m_dma_timer;
- UINT8 m_timer_enabled[2];
+ uint8_t m_timer_enabled[2];
timer_device *m_timer[2];
- UINT32 m_tms32031_io_regs[0x100];
- UINT16 m_from_main;
- UINT16 m_control;
+ uint32_t m_tms32031_io_regs[0x100];
+ uint16_t m_from_main;
+ uint16_t m_control;
- UINT32 *m_speedup_ram;
+ uint32_t *m_speedup_ram;
dmadac_sound_device *m_dmadac[4];
offs_t m_speedup;
@@ -100,7 +100,7 @@ class atari_cage_seattle_device : public atari_cage_device
{
public:
// construction/destruction
- atari_cage_seattle_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ atari_cage_seattle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const override;
diff --git a/src/mame/audio/cchasm.cpp b/src/mame/audio/cchasm.cpp
index ad41d560061..48dd6b8abe2 100644
--- a/src/mame/audio/cchasm.cpp
+++ b/src/mame/audio/cchasm.cpp
@@ -33,7 +33,7 @@ INPUT_CHANGED_MEMBER(cchasm_state::set_coin_flag )
READ8_MEMBER(cchasm_state::coin_sound_r)
{
- UINT8 coin = (ioport("IN3")->read() >> 4) & 0x7;
+ uint8_t coin = (ioport("IN3")->read() >> 4) & 0x7;
return m_sound_flags | (m_coin_flag << 3) | coin;
}
diff --git a/src/mame/audio/cclimber.cpp b/src/mame/audio/cclimber.cpp
index bd20ab77b17..3532cf708de 100644
--- a/src/mame/audio/cclimber.cpp
+++ b/src/mame/audio/cclimber.cpp
@@ -14,7 +14,7 @@ SAMPLES_START_CB_MEMBER( cclimber_audio_device::sh_start )
{
if (m_samples_region)
{
- m_sample_buf = std::make_unique<INT16[]>(2 * m_samples_region.bytes());
+ m_sample_buf = std::make_unique<int16_t[]>(2 * m_samples_region.bytes());
save_pointer(NAME(m_sample_buf.get()), 2 * m_samples_region.bytes());
}
}
@@ -45,7 +45,7 @@ const device_type CCLIMBER_AUDIO = &device_creator<cclimber_audio_device>;
// cclimber_audio_device: Constructor
//-------------------------------------------------
-cclimber_audio_device::cclimber_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+cclimber_audio_device::cclimber_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, CCLIMBER_AUDIO, "Crazy Climber Sound Board", tag, owner, clock, "cclimber_audio", __FILE__),
m_sample_buf(nullptr),
m_sample_num(0),
diff --git a/src/mame/audio/cclimber.h b/src/mame/audio/cclimber.h
index 65f1255e3d1..3fffe35f824 100644
--- a/src/mame/audio/cclimber.h
+++ b/src/mame/audio/cclimber.h
@@ -35,7 +35,7 @@ class cclimber_audio_device : public device_t
{
public:
// construction/destruction
- cclimber_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ cclimber_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_WRITE8_MEMBER( sample_trigger_w );
DECLARE_WRITE8_MEMBER( sample_rate_w );
@@ -52,12 +52,12 @@ protected:
void play_sample(int start,int freq,int volume);
private:
- std::unique_ptr<INT16[]> m_sample_buf; /* buffer to decode samples at run time */
+ std::unique_ptr<int16_t[]> m_sample_buf; /* buffer to decode samples at run time */
int m_sample_num;
int m_sample_freq;
int m_sample_volume;
optional_device<samples_device> m_samples;
- optional_region_ptr<UINT8> m_samples_region;
+ optional_region_ptr<uint8_t> m_samples_region;
};
diff --git a/src/mame/audio/channelf.cpp b/src/mame/audio/channelf.cpp
index 2cf03d70aa0..21d416c14f2 100644
--- a/src/mame/audio/channelf.cpp
+++ b/src/mame/audio/channelf.cpp
@@ -8,7 +8,7 @@
const device_type CHANNELF_SOUND = &device_creator<channelf_sound_device>;
-channelf_sound_device::channelf_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+channelf_sound_device::channelf_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, CHANNELF_SOUND, "Channel F Sound", tag, owner, clock, "channelf_sound", __FILE__),
device_sound_interface(mconfig, *this),
m_channel(nullptr),
@@ -82,7 +82,7 @@ void channelf_sound_device::device_start()
void channelf_sound_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
{
- UINT32 mask = 0, target = 0;
+ uint32_t mask = 0, target = 0;
stream_sample_t *buffer = outputs[0];
stream_sample_t *sample = buffer;
diff --git a/src/mame/audio/channelf.h b/src/mame/audio/channelf.h
index 17ad5add8df..07349ca4b15 100644
--- a/src/mame/audio/channelf.h
+++ b/src/mame/audio/channelf.h
@@ -13,7 +13,7 @@ class channelf_sound_device : public device_t,
public device_sound_interface
{
public:
- channelf_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ channelf_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
void sound_w(int mode);
protected:
@@ -30,7 +30,7 @@ private:
int m_incr;
float m_decay_mult;
int m_envelope;
- UINT32 m_sample_counter;
+ uint32_t m_sample_counter;
int m_forced_ontime; // added for improved sound
int m_min_ontime; // added for improved sound
diff --git a/src/mame/audio/cinemat.cpp b/src/mame/audio/cinemat.cpp
index 99260c00a61..af318008c80 100644
--- a/src/mame/audio/cinemat.cpp
+++ b/src/mame/audio/cinemat.cpp
@@ -53,7 +53,7 @@
WRITE8_MEMBER(cinemat_state::cinemat_sound_control_w)
{
- UINT8 oldval = m_sound_control;
+ uint8_t oldval = m_sound_control;
/* form an 8-bit value with the new bit */
m_sound_control = (m_sound_control & ~(1 << offset)) | ((data & 1) << offset);
@@ -129,7 +129,7 @@ static const char *const spacewar_sample_names[] =
nullptr
};
-void cinemat_state::spacewar_sound_w(UINT8 sound_val, UINT8 bits_changed)
+void cinemat_state::spacewar_sound_w(uint8_t sound_val, uint8_t bits_changed)
{
/* Explosion - rising edge */
if (SOUNDVAL_RISING_EDGE(0x01))
@@ -201,7 +201,7 @@ static const char *const barrier_sample_names[] =
nullptr
};
-void cinemat_state::barrier_sound_w(UINT8 sound_val, UINT8 bits_changed)
+void cinemat_state::barrier_sound_w(uint8_t sound_val, uint8_t bits_changed)
{
/* Player die - rising edge */
if (SOUNDVAL_RISING_EDGE(0x01))
@@ -247,7 +247,7 @@ static const char *const speedfrk_sample_names[] =
nullptr
};
-void cinemat_state::speedfrk_sound_w(UINT8 sound_val, UINT8 bits_changed)
+void cinemat_state::speedfrk_sound_w(uint8_t sound_val, uint8_t bits_changed)
{
/* on the falling edge of bit 0x08, clock the inverse of bit 0x04 into the top of the shiftreg */
if (SOUNDVAL_FALLING_EDGE(0x08))
@@ -305,7 +305,7 @@ static const char *const starhawk_sample_names[] =
nullptr
};
-void cinemat_state::starhawk_sound_w(UINT8 sound_val, UINT8 bits_changed)
+void cinemat_state::starhawk_sound_w(uint8_t sound_val, uint8_t bits_changed)
{
/* explosion - falling edge */
if (SOUNDVAL_FALLING_EDGE(0x01))
@@ -374,7 +374,7 @@ static const char *const sundance_sample_names[] =
nullptr
};
-void cinemat_state::sundance_sound_w(UINT8 sound_val, UINT8 bits_changed)
+void cinemat_state::sundance_sound_w(uint8_t sound_val, uint8_t bits_changed)
{
/* bong - falling edge */
if (SOUNDVAL_FALLING_EDGE(0x01))
@@ -437,7 +437,7 @@ static const char *const tailg_sample_names[] =
nullptr
};
-void cinemat_state::tailg_sound_w(UINT8 sound_val, UINT8 bits_changed)
+void cinemat_state::tailg_sound_w(uint8_t sound_val, uint8_t bits_changed)
{
/* the falling edge of bit 0x10 clocks bit 0x08 into the mux selected by bits 0x07 */
if (SOUNDVAL_FALLING_EDGE(0x10))
@@ -518,7 +518,7 @@ static const char *const warrior_sample_names[] =
nullptr
};
-void cinemat_state::warrior_sound_w(UINT8 sound_val, UINT8 bits_changed)
+void cinemat_state::warrior_sound_w(uint8_t sound_val, uint8_t bits_changed)
{
/* normal level - 0=on, 1=off */
if (SOUNDVAL_FALLING_EDGE(0x01))
@@ -582,7 +582,7 @@ static const char *const armora_sample_names[] =
nullptr
};
-void cinemat_state::armora_sound_w(UINT8 sound_val, UINT8 bits_changed)
+void cinemat_state::armora_sound_w(uint8_t sound_val, uint8_t bits_changed)
{
/* on the rising edge of bit 0x10, clock bit 0x80 into the shift register */
if (SOUNDVAL_RISING_EDGE(0x10))
@@ -676,7 +676,7 @@ static const char *const ripoff_sample_names[] =
nullptr
};
-void cinemat_state::ripoff_sound_w(UINT8 sound_val, UINT8 bits_changed)
+void cinemat_state::ripoff_sound_w(uint8_t sound_val, uint8_t bits_changed)
{
/* on the rising edge of bit 0x02, clock bit 0x01 into the shift register */
if (SOUNDVAL_RISING_EDGE(0x02))
@@ -756,9 +756,9 @@ static const char *const starcas_sample_names[] =
nullptr
};
-void cinemat_state::starcas_sound_w(UINT8 sound_val, UINT8 bits_changed)
+void cinemat_state::starcas_sound_w(uint8_t sound_val, uint8_t bits_changed)
{
- UINT32 target_pitch;
+ uint32_t target_pitch;
/* on the rising edge of bit 0x10, clock bit 0x80 into the shift register */
if (SOUNDVAL_RISING_EDGE(0x10))
@@ -863,7 +863,7 @@ static const char *const solarq_sample_names[] =
nullptr
};
-void cinemat_state::solarq_sound_w(UINT8 sound_val, UINT8 bits_changed)
+void cinemat_state::solarq_sound_w(uint8_t sound_val, uint8_t bits_changed)
{
/* on the rising edge of bit 0x10, clock bit 0x80 into the shift register */
if (SOUNDVAL_RISING_EDGE(0x10))
@@ -995,7 +995,7 @@ static const char *const boxingb_sample_names[] =
nullptr
};
-void cinemat_state::boxingb_sound_w(UINT8 sound_val, UINT8 bits_changed)
+void cinemat_state::boxingb_sound_w(uint8_t sound_val, uint8_t bits_changed)
{
/* on the rising edge of bit 0x10, clock bit 0x80 into the shift register */
if (SOUNDVAL_RISING_EDGE(0x10))
@@ -1119,9 +1119,9 @@ static const char *const wotw_sample_names[] =
nullptr
};
-void cinemat_state::wotw_sound_w(UINT8 sound_val, UINT8 bits_changed)
+void cinemat_state::wotw_sound_w(uint8_t sound_val, uint8_t bits_changed)
{
- UINT32 target_pitch;
+ uint32_t target_pitch;
/* on the rising edge of bit 0x10, clock bit 0x80 into the shift register */
if (SOUNDVAL_RISING_EDGE(0x10))
@@ -1219,7 +1219,7 @@ TIMER_CALLBACK_MEMBER( cinemat_state::synced_sound_w )
}
-void cinemat_state::demon_sound_w(UINT8 sound_val, UINT8 bits_changed)
+void cinemat_state::demon_sound_w(uint8_t sound_val, uint8_t bits_changed)
{
/* all inputs are inverted */
sound_val = ~sound_val;
@@ -1349,7 +1349,7 @@ MACHINE_CONFIG_END
WRITE8_MEMBER(cinemat_state::qb3_sound_w)
{
- UINT16 rega = m_maincpu->state_int(CCPU_A);
+ uint16_t rega = m_maincpu->state_int(CCPU_A);
demon_sound_w(0x00 | (~rega & 0x0f), 0x10);
}
diff --git a/src/mame/audio/copsnrob.cpp b/src/mame/audio/copsnrob.cpp
index bcc85241807..cccd856a864 100644
--- a/src/mame/audio/copsnrob.cpp
+++ b/src/mame/audio/copsnrob.cpp
@@ -270,8 +270,8 @@ DISCRETE_CLASS_STEP_RESET(copsnrob_custom_noise, 2,
int m_flip_flop;
int m_noise1_had_xtime;
int m_noise2_had_xtime;
- UINT8 m_high_byte;
- UINT8 m_low_byte;
+ uint8_t m_high_byte;
+ uint8_t m_low_byte;
double m_t_used;
double m_t1;
);
@@ -283,9 +283,9 @@ DISCRETE_STEP(copsnrob_custom_noise)
double t_used = m_t_used;
double t1 = m_t1;
double x_time = 0;
- UINT8 low_byte = m_low_byte;
- UINT8 high_byte = m_high_byte;
- UINT8 xnor_out; /* IC F2, pin 2 */
+ uint8_t low_byte = m_low_byte;
+ uint8_t high_byte = m_high_byte;
+ uint8_t xnor_out; /* IC F2, pin 2 */
int last_noise1_bit = (low_byte >> 4) & 0x01;
int last_noise2_bit = (low_byte >> 5) & 0x01;
@@ -689,8 +689,8 @@ DISCRETE_SOUND_END
WRITE8_MEMBER(copsnrob_state::copsnrob_misc_w)
{
- UINT8 latched_data = m_ic_h3_data;
- UINT8 special_data = data & 0x01;
+ uint8_t latched_data = m_ic_h3_data;
+ uint8_t special_data = data & 0x01;
/* ignore if no change */
if (((latched_data >> offset) & 0x01) == special_data)
diff --git a/src/mame/audio/cps3.cpp b/src/mame/audio/cps3.cpp
index 7038ec5adf8..a3fe0e4833b 100644
--- a/src/mame/audio/cps3.cpp
+++ b/src/mame/audio/cps3.cpp
@@ -22,7 +22,7 @@ const device_type CPS3 = &device_creator<cps3_sound_device>;
// cps3_sound_device - constructor
//-------------------------------------------------
-cps3_sound_device::cps3_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+cps3_sound_device::cps3_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, CPS3, "CPS3 Audio Custom", tag, owner, clock, "cps3_custom", __FILE__),
device_sound_interface(mconfig, *this),
m_stream(nullptr),
@@ -77,17 +77,17 @@ void cps3_sound_device::sound_stream_update(sound_stream &stream, stream_sample_
*/
cps3_voice *vptr = &m_voice[i];
- UINT32 start = (vptr->regs[1] >> 16 & 0x0000ffff) | (vptr->regs[1] << 16 & 0xffff0000);
- UINT32 end = (vptr->regs[5] >> 16 & 0x0000ffff) | (vptr->regs[5] << 16 & 0xffff0000);
- UINT32 loop = (vptr->regs[3] & 0x0000ffff) | (vptr->regs[4] << 16 & 0xffff0000);
+ uint32_t start = (vptr->regs[1] >> 16 & 0x0000ffff) | (vptr->regs[1] << 16 & 0xffff0000);
+ uint32_t end = (vptr->regs[5] >> 16 & 0x0000ffff) | (vptr->regs[5] << 16 & 0xffff0000);
+ uint32_t loop = (vptr->regs[3] & 0x0000ffff) | (vptr->regs[4] << 16 & 0xffff0000);
bool loop_enable = (vptr->regs[2] & 1) ? true : false;
- UINT32 step = vptr->regs[3] >> 16 & 0xffff;
+ uint32_t step = vptr->regs[3] >> 16 & 0xffff;
- INT16 vol_l = (vptr->regs[7] & 0xffff);
- INT16 vol_r = (vptr->regs[7] >> 16 & 0xffff);
+ int16_t vol_l = (vptr->regs[7] & 0xffff);
+ int16_t vol_r = (vptr->regs[7] >> 16 & 0xffff);
- UINT32 pos = vptr->pos;
- UINT32 frac = vptr->frac;
+ uint32_t pos = vptr->pos;
+ uint32_t frac = vptr->frac;
/* TODO */
start -= 0x400000;
@@ -97,7 +97,7 @@ void cps3_sound_device::sound_stream_update(sound_stream &stream, stream_sample_
/* Go through the buffer and add voice contributions */
for (int j = 0; j < samples; j++)
{
- INT32 sample;
+ int32_t sample;
pos += (frac >> 12);
frac &= 0xfff;
@@ -142,7 +142,7 @@ WRITE32_MEMBER( cps3_sound_device::cps3_sound_w )
{
assert((mem_mask & 0xffff0000) == 0xffff0000); // doesn't happen
- UINT16 key = data >> 16;
+ uint16_t key = data >> 16;
for (int i = 0; i < 16; i++)
{
diff --git a/src/mame/audio/cps3.h b/src/mame/audio/cps3.h
index 03c5e4f1642..41c7b6c041f 100644
--- a/src/mame/audio/cps3.h
+++ b/src/mame/audio/cps3.h
@@ -16,12 +16,12 @@ struct cps3_voice
pos(0),
frac(0)
{
- memset(regs, 0, sizeof(UINT32)*8);
+ memset(regs, 0, sizeof(uint32_t)*8);
}
- UINT32 regs[8];
- UINT32 pos;
- UINT32 frac;
+ uint32_t regs[8];
+ uint32_t pos;
+ uint32_t frac;
};
// ======================> cps3_sound_device
@@ -30,10 +30,10 @@ class cps3_sound_device : public device_t,
public device_sound_interface
{
public:
- cps3_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ cps3_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~cps3_sound_device() { }
- void set_base(INT8* base) { m_base = base; }
+ void set_base(int8_t* base) { m_base = base; }
DECLARE_WRITE32_MEMBER( cps3_sound_w );
DECLARE_READ32_MEMBER( cps3_sound_r );
@@ -48,8 +48,8 @@ protected:
private:
sound_stream *m_stream;
cps3_voice m_voice[16];
- UINT16 m_key;
- INT8* m_base;
+ uint16_t m_key;
+ int8_t* m_base;
};
extern const device_type CPS3;
diff --git a/src/mame/audio/dai_snd.cpp b/src/mame/audio/dai_snd.cpp
index ae0bf3c79c3..da20912577d 100644
--- a/src/mame/audio/dai_snd.cpp
+++ b/src/mame/audio/dai_snd.cpp
@@ -21,7 +21,7 @@ const device_type DAI_SOUND = &device_creator<dai_sound_device>;
// dai_sound_device - constructor
//-------------------------------------------------
-dai_sound_device::dai_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+dai_sound_device::dai_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, DAI_SOUND, "DAI Audio Custom", tag, owner, clock, "dai_sound", __FILE__),
device_sound_interface(mconfig, *this)
{
@@ -52,7 +52,7 @@ void dai_sound_device::device_reset()
// channels 0/1/2 volume table
//-------------------------------------------------
-const UINT16 dai_sound_device::s_osc_volume_table[] = {
+const uint16_t dai_sound_device::s_osc_volume_table[] = {
0, 500, 1000, 1500,
2000, 2500, 3000, 3500,
4000, 4500, 5000, 5500,
@@ -63,7 +63,7 @@ const UINT16 dai_sound_device::s_osc_volume_table[] = {
// noise volume table
//-------------------------------------------------
-const UINT16 dai_sound_device::s_noise_volume_table[] = {
+const uint16_t dai_sound_device::s_noise_volume_table[] = {
0, 0, 0, 0,
0, 0, 0, 0,
500, 1000, 1500, 2000,
@@ -124,13 +124,13 @@ void dai_sound_device::sound_stream_update(sound_stream &stream, stream_sample_t
stream_sample_t *sample_left = outputs[0];
stream_sample_t *sample_right = outputs[1];
- INT16 channel_0_signal = m_dai_input[0] ? s_osc_volume_table[m_osc_volume[0]] : -s_osc_volume_table[m_osc_volume[0]];
- INT16 channel_1_signal = m_dai_input[1] ? s_osc_volume_table[m_osc_volume[1]] : -s_osc_volume_table[m_osc_volume[1]];
- INT16 channel_2_signal = m_dai_input[2] ? s_osc_volume_table[m_osc_volume[2]] : -s_osc_volume_table[m_osc_volume[2]];
+ int16_t channel_0_signal = m_dai_input[0] ? s_osc_volume_table[m_osc_volume[0]] : -s_osc_volume_table[m_osc_volume[0]];
+ int16_t channel_1_signal = m_dai_input[1] ? s_osc_volume_table[m_osc_volume[1]] : -s_osc_volume_table[m_osc_volume[1]];
+ int16_t channel_2_signal = m_dai_input[2] ? s_osc_volume_table[m_osc_volume[2]] : -s_osc_volume_table[m_osc_volume[2]];
while (samples--)
{
- INT16 noise = machine().rand()&0x01 ? s_noise_volume_table[m_noise_volume] : -s_noise_volume_table[m_noise_volume];
+ int16_t noise = machine().rand()&0x01 ? s_noise_volume_table[m_noise_volume] : -s_noise_volume_table[m_noise_volume];
/* channel 0 + channel 1 + noise */
*sample_left++ = channel_0_signal + channel_1_signal + noise;
diff --git a/src/mame/audio/dai_snd.h b/src/mame/audio/dai_snd.h
index 484002161ff..fb844476662 100644
--- a/src/mame/audio/dai_snd.h
+++ b/src/mame/audio/dai_snd.h
@@ -18,7 +18,7 @@ class dai_sound_device : public device_t,
{
public:
// construction/destruction
- dai_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ dai_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_WRITE_LINE_MEMBER(set_input_ch0);
DECLARE_WRITE_LINE_MEMBER(set_input_ch1);
@@ -34,11 +34,11 @@ protected:
private:
sound_stream * m_mixer_channel;
int m_dai_input[3];
- UINT8 m_osc_volume[3];
- UINT8 m_noise_volume;
+ uint8_t m_osc_volume[3];
+ uint8_t m_noise_volume;
- static const UINT16 s_osc_volume_table[];
- static const UINT16 s_noise_volume_table[];
+ static const uint16_t s_osc_volume_table[];
+ static const uint16_t s_noise_volume_table[];
};
extern const device_type DAI_SOUND;
diff --git a/src/mame/audio/dave.cpp b/src/mame/audio/dave.cpp
index 138b8d9ac40..69a7f2aec6f 100644
--- a/src/mame/audio/dave.cpp
+++ b/src/mame/audio/dave.cpp
@@ -52,7 +52,7 @@ ADDRESS_MAP_END
// dave_device - constructor
//-------------------------------------------------
-dave_device::dave_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+dave_device::dave_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, DAVE, "DAVE", tag, owner, clock, "dave", __FILE__),
device_memory_interface(mconfig, *this),
device_sound_interface(mconfig, *this),
@@ -311,7 +311,7 @@ WRITE_LINE_MEMBER( dave_device::int2_w )
READ8_MEMBER( dave_device::program_r )
{
- UINT8 segment = m_segment[offset >> 14];
+ uint8_t segment = m_segment[offset >> 14];
offset = (segment << 14) | (offset & 0x3fff);
return this->space(AS_PROGRAM).read_byte(offset);
@@ -324,7 +324,7 @@ READ8_MEMBER( dave_device::program_r )
WRITE8_MEMBER( dave_device::program_w )
{
- UINT8 segment = m_segment[offset >> 14];
+ uint8_t segment = m_segment[offset >> 14];
offset = (segment << 14) | (offset & 0x3fff);
this->space(AS_PROGRAM).write_byte(offset, data);
@@ -337,7 +337,7 @@ WRITE8_MEMBER( dave_device::program_w )
READ8_MEMBER( dave_device::io_r )
{
- UINT8 data = 0;
+ uint8_t data = 0;
switch (offset & 0xff)
{
diff --git a/src/mame/audio/dave.h b/src/mame/audio/dave.h
index de534c51bda..95bcf38fe92 100644
--- a/src/mame/audio/dave.h
+++ b/src/mame/audio/dave.h
@@ -56,7 +56,7 @@ class dave_device : public device_t,
public device_sound_interface
{
public:
- dave_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ dave_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_irq_wr_callback(device_t &device, _Object object) { return downcast<dave_device &>(device).m_write_irq.set_callback(object); }
template<class _Object> static devcb_base &set_lh_wr_callback(device_t &device, _Object object) { return downcast<dave_device &>(device).m_write_lh.set_callback(object); }
@@ -115,16 +115,16 @@ private:
devcb_write8 m_write_lh;
devcb_write8 m_write_rh;
- UINT8 m_segment[4];
+ uint8_t m_segment[4];
- UINT8 m_irq_status;
- UINT8 m_irq_enable;
+ uint8_t m_irq_status;
+ uint8_t m_irq_enable;
emu_timer *m_timer_1hz;
emu_timer *m_timer_50hz;
/* SOUND SYNTHESIS */
- UINT8 m_regs[32];
+ uint8_t m_regs[32];
int m_period[4];
int m_count[4];
int m_level[4];
diff --git a/src/mame/audio/dcs.cpp b/src/mame/audio/dcs.cpp
index 009722f77bb..3ff2a6a821a 100644
--- a/src/mame/audio/dcs.cpp
+++ b/src/mame/audio/dcs.cpp
@@ -605,10 +605,10 @@ void dcs_audio_device::dcs_boot()
{
/* determine the base */
// max_banks = m_bootrom_words / 0x1000;
- UINT16* base = m_bootrom + ((m_sounddata_bank * 0x1000) % m_bootrom_words);
+ uint16_t* base = m_bootrom + ((m_sounddata_bank * 0x1000) % m_bootrom_words);
/* convert from 16-bit data to 8-bit data and boot */
- UINT8 buffer[0x1000];
+ uint8_t buffer[0x1000];
for (int i = 0; i < 0x1000; i++)
{
buffer[i] = base[i];
@@ -622,7 +622,7 @@ void dcs_audio_device::dcs_boot()
case 2:
{
/* determine the base */
- UINT16* base;
+ uint16_t* base;
if (m_bootrom == m_sounddata)
{
/* EPROM case: page is selected from the page register */
@@ -635,7 +635,7 @@ void dcs_audio_device::dcs_boot()
}
/* convert from 16-bit data to 8-bit data and boot */
- UINT8 buffer[0x1000];
+ uint8_t buffer[0x1000];
for (int i = 0; i < 0x1000; i++)
{
buffer[i] = base[i];
@@ -800,7 +800,7 @@ void dcs_audio_device::dcs_register_state()
// dcs_audio_device - constructor
//-------------------------------------------------
-dcs_audio_device::dcs_audio_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, int rev) :
+dcs_audio_device::dcs_audio_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source, int rev) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
m_cpu(nullptr),
m_program(nullptr),
@@ -867,12 +867,12 @@ void dcs_audio_device::device_start()
memory_share *internal_ram = memshare("dcsint");
if (internal_ram != nullptr)
{
- m_internal_program_ram = (UINT32 *)internal_ram->ptr();
+ m_internal_program_ram = (uint32_t *)internal_ram->ptr();
}
memory_share *external_ram = memshare("dcsext");
if (external_ram != nullptr)
{
- m_external_program_ram = (UINT32 *)external_ram->ptr();
+ m_external_program_ram = (uint32_t *)external_ram->ptr();
}
/* find the DCS CPU and the sound ROMs */
@@ -886,7 +886,7 @@ void dcs_audio_device::device_start()
m_dmadac[0] = subdevice<dmadac_sound_device>("dac");
/* configure boot and sound ROMs */
- m_bootrom = (UINT16 *)machine().root_device().memregion("dcs")->base();
+ m_bootrom = (uint16_t *)machine().root_device().memregion("dcs")->base();
m_bootrom_words = machine().root_device().memregion("dcs")->bytes() / 2;
m_sounddata = m_bootrom;
m_sounddata_words = m_bootrom_words;
@@ -921,12 +921,12 @@ void dcs2_audio_device::device_start()
memory_share *internal_ram = memshare("dcsint");
if (internal_ram != nullptr)
{
- m_internal_program_ram = (UINT32 *)internal_ram->ptr();
+ m_internal_program_ram = (uint32_t *)internal_ram->ptr();
}
memory_share *external_ram = memshare("dcsext");
if (external_ram != nullptr)
{
- m_external_program_ram = (UINT32 *)external_ram->ptr();
+ m_external_program_ram = (uint32_t *)external_ram->ptr();
}
/* find the DCS CPU and the sound ROMs */
@@ -958,18 +958,18 @@ void dcs2_audio_device::device_start()
memory_region *bootrom_region = machine().root_device().memregion("dcs");
if (bootrom_region != nullptr)
{
- m_bootrom = (UINT16 *)bootrom_region->base();
+ m_bootrom = (uint16_t *)bootrom_region->base();
m_bootrom_words = bootrom_region->bytes() / 2;
}
/* supports both RAM and ROM variants */
if (m_dram_in_mb != 0)
{
- UINT32 ramSize = m_dram_in_mb << (20 - 1);
+ uint32_t ramSize = m_dram_in_mb << (20 - 1);
// Add one extra bank for internal ram in ADSP 2181
if (m_rev == 4)
ramSize += soundbank_words;
- m_sounddata = auto_alloc_array(machine(), UINT16, ramSize);
+ m_sounddata = auto_alloc_array(machine(), uint16_t, ramSize);
save_pointer(NAME(m_sounddata), ramSize);
m_sounddata_words = (m_dram_in_mb << 20) / 2;
}
@@ -986,7 +986,7 @@ void dcs2_audio_device::device_start()
/* allocate memory for the SRAM */
- m_sram = auto_alloc_array(machine(), UINT16, 0x8000*4/2);
+ m_sram = auto_alloc_array(machine(), uint16_t, 0x8000*4/2);
/* create the timers */
m_internal_timer = subdevice<timer_device>("dcs_int_timer");
@@ -1037,7 +1037,7 @@ READ16_MEMBER( dcs_audio_device::dcs_dataram_r )
WRITE16_MEMBER( dcs_audio_device::dcs_dataram_w )
{
assert(m_external_program_ram != nullptr);
- UINT16 val = m_external_program_ram[offset] >> 8;
+ uint16_t val = m_external_program_ram[offset] >> 8;
COMBINE_DATA(&val);
m_external_program_ram[offset] = (val << 8) | (m_external_program_ram[offset] & 0x0000ff);
}
@@ -1179,7 +1179,7 @@ void dcs_audio_device::sdrc_reset()
READ16_MEMBER( dcs_audio_device::sdrc_r )
{
sdrc_state &sdrc = m_sdrc;
- UINT16 result = sdrc.reg[offset];
+ uint16_t result = sdrc.reg[offset];
/* offset 3 is for security */
if (offset == 3)
@@ -1228,7 +1228,7 @@ READ16_MEMBER( dcs_audio_device::sdrc_r )
WRITE16_MEMBER( dcs_audio_device::sdrc_w )
{
sdrc_state &sdrc = m_sdrc;
- UINT16 diff = sdrc.reg[offset] ^ data;
+ uint16_t diff = sdrc.reg[offset] ^ data;
switch (offset)
{
@@ -1309,7 +1309,7 @@ void dcs_audio_device::dsio_reset()
READ16_MEMBER( dcs_audio_device::dsio_r )
{
dsio_state &dsio = m_dsio;
- UINT16 result = dsio.reg[offset];
+ uint16_t result = dsio.reg[offset];
if (offset == 1)
{
@@ -1363,7 +1363,7 @@ void dcs_audio_device::denver_reset()
READ16_MEMBER( dcs_audio_device::denver_r )
{
- UINT16 result = m_dsio.reg[offset];
+ uint16_t result = m_dsio.reg[offset];
if (offset == 3)
{
@@ -1441,7 +1441,7 @@ WRITE32_MEMBER( dcs_audio_device::dsio_idma_addr_w )
WRITE32_MEMBER( dcs_audio_device::dsio_idma_data_w )
{
dsio_state &dsio = m_dsio;
- UINT32 pc = space.device().safe_pc();
+ uint32_t pc = space.device().safe_pc();
if (ACCESSING_BITS_0_15)
{
if (LOG_DCS_TRANSFERS)
@@ -1464,7 +1464,7 @@ WRITE32_MEMBER( dcs_audio_device::dsio_idma_data_w )
READ32_MEMBER( dcs_audio_device::dsio_idma_data_r )
{
- UINT32 result;
+ uint32_t result;
result = downcast<adsp2181_device *>(m_cpu)->idma_data_r();
if (LOG_DCS_TRANSFERS)
logerror("%08X:IDMA_data_r(%04X) = %04X\n", space.device().safe_pc(), downcast<adsp2181_device *>(m_cpu)->idma_addr_r(), result);
@@ -1576,7 +1576,7 @@ READ16_MEMBER( dcs_audio_device::fifo_input_r )
INPUT LATCH (data from host to DCS)
****************************************************************************/
-void dcs_audio_device::dcs_delayed_data_w(UINT16 data)
+void dcs_audio_device::dcs_delayed_data_w(uint16_t data)
{
if (LOG_DCS_IO)
logerror("%s:dcs_data_w(%04X)\n", machine().describe_context(), data);
@@ -1603,7 +1603,7 @@ TIMER_CALLBACK_MEMBER( dcs_audio_device::dcs_delayed_data_w_callback )
}
-void dcs_audio_device::data_w(UINT16 data)
+void dcs_audio_device::data_w(uint16_t data)
{
/* preprocess the write */
if (preprocess_write(data))
@@ -1694,7 +1694,7 @@ void dcs_audio_device::ack_w()
}
-UINT16 dcs_audio_device::data_r()
+uint16_t dcs_audio_device::data_r()
{
/* data is actually only 8 bit (read from d8-d15, which is d0-d7 from the data access instructions POV) on early dcs, but goes 16 on later (seattle) */
if (m_last_output_full && !m_output_full_cb.isnull())
@@ -1752,9 +1752,9 @@ int dcs_audio_device::data2_r()
void dcs_audio_device::update_timer_count()
{
- UINT64 periods_since_start;
- UINT64 elapsed_cycles;
- UINT64 elapsed_clocks;
+ uint64_t periods_since_start;
+ uint64_t elapsed_cycles;
+ uint64_t elapsed_clocks;
/* if not enabled, skip */
if (!m_timer_enable)
@@ -1781,12 +1781,12 @@ void dcs_audio_device::update_timer_count()
TIMER_DEVICE_CALLBACK_MEMBER( dcs_audio_device::internal_timer_callback )
{
- INT64 target_cycles;
+ int64_t target_cycles;
/* compute the absolute cycle when the next one should fire */
/* we do this to avoid drifting */
m_timers_fired++;
- target_cycles = m_timer_start_cycles + m_timer_scale * (m_timer_start_count + 1 + m_timers_fired * (UINT64)(m_timer_period + 1));
+ target_cycles = m_timer_start_cycles + m_timer_scale * (m_timer_start_count + 1 + m_timers_fired * (uint64_t)(m_timer_period + 1));
target_cycles -= m_cpu->total_cycles();
/* set the next timer, but only if it's for a reasonable number */
@@ -1874,7 +1874,7 @@ WRITE_LINE_MEMBER(dcs_audio_device::timer_enable_callback)
READ16_MEMBER( dcs_audio_device::adsp_control_r )
{
- UINT16 result = 0xffff;
+ uint16_t result = 0xffff;
switch (offset)
{
@@ -1987,7 +1987,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( dcs_audio_device::dcs_irq )
{
int count = m_size / (2*(m_incs ? m_incs : 1));
// sf2049se was having overflow issues with fixed size of 0x400 buffer (m_size==0xb40, count=0x5a0).
- INT16 buffer[0x800];
+ int16_t buffer[0x800];
int i;
for (i = 0; i < count; i++)
@@ -2063,7 +2063,7 @@ WRITE32_MEMBER(dcs_audio_device::sound_tx_callback)
{
/* get the autobuffer registers */
int mreg, lreg;
- UINT16 source;
+ uint16_t source;
m_ireg = (m_control_regs[S1_AUTOBUF_REG] >> 9) & 7;
mreg = (m_control_regs[S1_AUTOBUF_REG] >> 7) & 3;
@@ -2189,7 +2189,7 @@ TIMER_CALLBACK_MEMBER( dcs_audio_device::s1_ack_callback1 )
}
-int dcs_audio_device::preprocess_stage_1(UINT16 data)
+int dcs_audio_device::preprocess_stage_1(uint16_t data)
{
hle_transfer_state &transfer = m_transfer;
@@ -2327,7 +2327,7 @@ TIMER_CALLBACK_MEMBER( dcs_audio_device::s2_ack_callback )
}
-int dcs_audio_device::preprocess_stage_2(UINT16 data)
+int dcs_audio_device::preprocess_stage_2(uint16_t data)
{
hle_transfer_state &transfer = m_transfer;
@@ -2429,7 +2429,7 @@ int dcs_audio_device::preprocess_stage_2(UINT16 data)
}
-int dcs_audio_device::preprocess_write(UINT16 data)
+int dcs_audio_device::preprocess_write(uint16_t data)
{
hle_transfer_state &transfer = m_transfer;
int result;
@@ -2461,7 +2461,7 @@ const device_type DCS_AUDIO_2K = &device_creator<dcs_audio_2k_device>;
// dcs_audio_2k_device - constructor
//-------------------------------------------------
-dcs_audio_2k_device::dcs_audio_2k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+dcs_audio_2k_device::dcs_audio_2k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
dcs_audio_device(mconfig, DCS_AUDIO_2K, "DCS Audio 2K", tag, owner, clock, "dcs_audio_2k", __FILE__)
{
}
@@ -2477,7 +2477,7 @@ const device_type DCS_AUDIO_2K_UART = &device_creator<dcs_audio_2k_uart_device>;
// dcs_audio_2k_uart_device - constructor
//-------------------------------------------------
-dcs_audio_2k_uart_device::dcs_audio_2k_uart_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+dcs_audio_2k_uart_device::dcs_audio_2k_uart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
dcs_audio_device(mconfig, DCS_AUDIO_2K_UART, "DCS Audio 2K UART", tag, owner, clock, "dcs_audio_2k_uart", __FILE__)
{
}
@@ -2493,7 +2493,7 @@ const device_type DCS_AUDIO_8K = &device_creator<dcs_audio_8k_device>;
// dcs_audio_8k_device - constructor
//-------------------------------------------------
-dcs_audio_8k_device::dcs_audio_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+dcs_audio_8k_device::dcs_audio_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
dcs_audio_device(mconfig, DCS_AUDIO_8K, "DCS Audio 8K", tag, owner, clock, "dcs_audio_8k", __FILE__)
{
}
@@ -2509,7 +2509,7 @@ const device_type DCS_AUDIO_WPC = &device_creator<dcs_audio_wpc_device>;
// dcs_audio_wpc_device - constructor
//-------------------------------------------------
-dcs_audio_wpc_device::dcs_audio_wpc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+dcs_audio_wpc_device::dcs_audio_wpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
dcs_audio_device(mconfig, DCS_AUDIO_WPC, "DCS Audio WPC", tag, owner, clock, "dcs_audio_wpc", __FILE__, 15)
{
}
@@ -2525,7 +2525,7 @@ machine_config_constructor dcs_audio_wpc_device::device_mconfig_additions() cons
// dcs2_audio_device - constructor
//-------------------------------------------------
-dcs2_audio_device::dcs2_audio_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
+dcs2_audio_device::dcs2_audio_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source) :
dcs_audio_device(mconfig, type, name, tag, owner, clock, shortname, source)
{
}
@@ -2537,7 +2537,7 @@ const device_type DCS2_AUDIO_2115 = &device_creator<dcs2_audio_2115_device>;
// dcs2_audio_2115_device - constructor
//-------------------------------------------------
-dcs2_audio_2115_device::dcs2_audio_2115_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+dcs2_audio_2115_device::dcs2_audio_2115_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
dcs2_audio_device(mconfig, DCS2_AUDIO_2115, "DCS2 Audio 2115", tag, owner, clock, "dcs2_audio_2115", __FILE__)
{
}
@@ -2553,7 +2553,7 @@ const device_type DCS2_AUDIO_2104 = &device_creator<dcs2_audio_2104_device>;
// dcs2_audio_2104_device - constructor
//-------------------------------------------------
-dcs2_audio_2104_device::dcs2_audio_2104_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+dcs2_audio_2104_device::dcs2_audio_2104_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
dcs2_audio_device(mconfig, DCS2_AUDIO_2104, "DCS2 Audio 2104", tag, owner, clock, "dcs2_audio_2104", __FILE__)
{
}
@@ -2570,7 +2570,7 @@ const device_type DCS2_AUDIO_DSIO = &device_creator<dcs2_audio_dsio_device>;
// dcs2_audio_dsio_device - constructor
//-------------------------------------------------
-dcs2_audio_dsio_device::dcs2_audio_dsio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+dcs2_audio_dsio_device::dcs2_audio_dsio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
dcs2_audio_device(mconfig, DCS2_AUDIO_DSIO, "DCS2 Audio DSIO", tag, owner, clock, "dcs2_audio_dsio", __FILE__)
{
}
@@ -2586,7 +2586,7 @@ const device_type DCS2_AUDIO_DENVER = &device_creator<dcs2_audio_denver_device>;
// dcs2_audio_denver_device - constructor
//-------------------------------------------------
-dcs2_audio_denver_device::dcs2_audio_denver_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+dcs2_audio_denver_device::dcs2_audio_denver_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
dcs2_audio_device(mconfig, DCS2_AUDIO_DENVER, "DCS2 Audio Denver", tag, owner, clock, "dcs2_audio_denver", __FILE__)
{
}
diff --git a/src/mame/audio/dcs.h b/src/mame/audio/dcs.h
index 5b84b994126..11645eca2a2 100644
--- a/src/mame/audio/dcs.h
+++ b/src/mame/audio/dcs.h
@@ -23,7 +23,7 @@ class dcs_audio_device : public device_t
{
public:
// construction/destruction
- dcs_audio_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, int rev = 1);
+ dcs_audio_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source, int rev = 1);
// for dcs2 (int dram_in_mb, offs_t polling_offset)
static void static_set_dram_in_mb(device_t &device, int dram_in_mb) { downcast<dcs_audio_device &>(device).m_dram_in_mb = dram_in_mb; }
@@ -34,12 +34,12 @@ public:
void set_fifo_callbacks(read16_delegate fifo_data_r, read16_delegate fifo_status_r, write_line_delegate fifo_reset_w);
void set_io_callbacks(write_line_delegate output_full_cb, write_line_delegate input_empty_cb);
- UINT16 data_r();
+ uint16_t data_r();
void ack_w();
int data2_r();
int control_r();
- void data_w(UINT16 data);
+ void data_w(uint16_t data);
void reset_w(int state);
void fifo_notify(int count, int max);
@@ -71,7 +71,7 @@ public:
DECLARE_WRITE16_MEMBER( denver_w );
DECLARE_READ16_MEMBER( latch_status_r );
DECLARE_READ16_MEMBER( fifo_input_r );
- void dcs_delayed_data_w(UINT16 data);
+ void dcs_delayed_data_w(uint16_t data);
TIMER_CALLBACK_MEMBER( dcs_delayed_data_w_callback );
DECLARE_WRITE16_MEMBER( input_latch_ack_w );
DECLARE_READ16_MEMBER( input_latch_r );
@@ -99,10 +99,10 @@ public:
TIMER_DEVICE_CALLBACK_MEMBER( transfer_watchdog_callback );
TIMER_CALLBACK_MEMBER( s1_ack_callback2 );
TIMER_CALLBACK_MEMBER( s1_ack_callback1 );
- int preprocess_stage_1(UINT16 data);
+ int preprocess_stage_1(uint16_t data);
TIMER_CALLBACK_MEMBER( s2_ack_callback );
- int preprocess_stage_2(UINT16 data);
- int preprocess_write(UINT16 data);
+ int preprocess_stage_2(uint16_t data);
+ int preprocess_write(uint16_t data);
protected:
// device-level overrides
@@ -112,76 +112,76 @@ protected:
protected:
struct sdrc_state
{
- UINT16 reg[4];
- UINT8 seed;
+ uint16_t reg[4];
+ uint8_t seed;
};
struct dsio_state
{
- UINT16 reg[4];
- UINT8 start_on_next_write;
- UINT16 channelbits;
+ uint16_t reg[4];
+ uint8_t start_on_next_write;
+ uint16_t channelbits;
};
struct hle_transfer_state
{
- UINT8 hle_enabled;
- INT32 dcs_state;
- INT32 state;
- INT32 start;
- INT32 stop;
- INT32 type;
- INT32 temp;
- INT32 writes_left;
- UINT16 sum;
- INT32 fifo_entries;
+ uint8_t hle_enabled;
+ int32_t dcs_state;
+ int32_t state;
+ int32_t start;
+ int32_t stop;
+ int32_t type;
+ int32_t temp;
+ int32_t writes_left;
+ uint16_t sum;
+ int32_t fifo_entries;
timer_device *watchdog;
};
adsp21xx_device *m_cpu;
address_space *m_program;
address_space *m_data;
- UINT8 m_rev;
+ uint8_t m_rev;
offs_t m_polling_offset;
- UINT32 m_polling_count;
+ uint32_t m_polling_count;
/* sound output */
- UINT8 m_channels;
- UINT16 m_size;
- UINT16 m_incs;
+ uint8_t m_channels;
+ uint16_t m_size;
+ uint16_t m_incs;
dmadac_sound_device *m_dmadac[6];
timer_device *m_reg_timer;
timer_device *m_sport_timer;
timer_device *m_internal_timer;
- INT32 m_ireg;
- UINT16 m_ireg_base;
- UINT16 m_control_regs[32];
+ int32_t m_ireg;
+ uint16_t m_ireg_base;
+ uint16_t m_control_regs[32];
/* memory access/booting */
- UINT16 * m_bootrom;
- UINT32 m_bootrom_words;
- UINT16 * m_sounddata;
- UINT32 m_sounddata_words;
- UINT32 m_sounddata_banks;
- UINT16 m_sounddata_bank;
+ uint16_t * m_bootrom;
+ uint32_t m_bootrom_words;
+ uint16_t * m_sounddata;
+ uint32_t m_sounddata_words;
+ uint32_t m_sounddata_banks;
+ uint16_t m_sounddata_bank;
optional_memory_bank m_data_bank;
memory_bank * m_rom_page;
memory_bank * m_dram_page;
/* I/O with the host */
- UINT8 m_auto_ack;
- UINT16 m_latch_control;
- UINT16 m_input_data;
- UINT16 m_output_data;
- UINT16 m_pre_output_data;
- UINT16 m_output_control;
- UINT64 m_output_control_cycles;
- UINT8 m_last_output_full;
- UINT8 m_last_input_empty;
- UINT16 m_progflags;
+ uint8_t m_auto_ack;
+ uint16_t m_latch_control;
+ uint16_t m_input_data;
+ uint16_t m_output_data;
+ uint16_t m_pre_output_data;
+ uint16_t m_output_control;
+ uint64_t m_output_control_cycles;
+ uint8_t m_last_output_full;
+ uint8_t m_last_input_empty;
+ uint16_t m_progflags;
write_line_delegate m_output_full_cb;
write_line_delegate m_input_empty_cb;
@@ -191,18 +191,18 @@ protected:
write_line_delegate m_fifo_reset_w;
/* timers */
- UINT8 m_timer_enable;
- UINT8 m_timer_ignore;
- UINT64 m_timer_start_cycles;
- UINT32 m_timer_start_count;
- UINT32 m_timer_scale;
- UINT32 m_timer_period;
- UINT32 m_timers_fired;
-
- UINT16 *m_sram;
- UINT16 *m_polling_base;
- UINT32 *m_internal_program_ram;
- UINT32 *m_external_program_ram;
+ uint8_t m_timer_enable;
+ uint8_t m_timer_ignore;
+ uint64_t m_timer_start_cycles;
+ uint32_t m_timer_start_count;
+ uint32_t m_timer_scale;
+ uint32_t m_timer_period;
+ uint32_t m_timers_fired;
+
+ uint16_t *m_sram;
+ uint16_t *m_polling_base;
+ uint32_t *m_internal_program_ram;
+ uint32_t *m_external_program_ram;
int m_dmovlay_val;
@@ -212,7 +212,7 @@ protected:
int m_dram_in_mb;
- optional_shared_ptr<UINT16> m_iram;
+ optional_shared_ptr<uint16_t> m_iram;
};
@@ -222,7 +222,7 @@ class dcs_audio_2k_device : public dcs_audio_device
{
public:
// construction/destruction
- dcs_audio_2k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ dcs_audio_2k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const override;
@@ -238,7 +238,7 @@ class dcs_audio_2k_uart_device : public dcs_audio_device
{
public:
// construction/destruction
- dcs_audio_2k_uart_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ dcs_audio_2k_uart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const override;
@@ -254,7 +254,7 @@ class dcs_audio_8k_device : public dcs_audio_device
{
public:
// construction/destruction
- dcs_audio_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ dcs_audio_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const override;
@@ -270,7 +270,7 @@ class dcs_audio_wpc_device : public dcs_audio_device
{
public:
// construction/destruction
- dcs_audio_wpc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ dcs_audio_wpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const override;
@@ -286,7 +286,7 @@ class dcs2_audio_device : public dcs_audio_device
{
public:
// construction/destruction
- dcs2_audio_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
+ dcs2_audio_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source);
protected:
// device-level overrides
@@ -299,7 +299,7 @@ class dcs2_audio_2115_device : public dcs2_audio_device
{
public:
// construction/destruction
- dcs2_audio_2115_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ dcs2_audio_2115_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const override;
@@ -315,7 +315,7 @@ class dcs2_audio_2104_device : public dcs2_audio_device
{
public:
// construction/destruction
- dcs2_audio_2104_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ dcs2_audio_2104_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const override;
@@ -331,7 +331,7 @@ class dcs2_audio_dsio_device : public dcs2_audio_device
{
public:
// construction/destruction
- dcs2_audio_dsio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ dcs2_audio_dsio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const override;
@@ -347,7 +347,7 @@ class dcs2_audio_denver_device : public dcs2_audio_device
{
public:
// construction/destruction
- dcs2_audio_denver_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ dcs2_audio_denver_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const override;
diff --git a/src/mame/audio/decobsmt.cpp b/src/mame/audio/decobsmt.cpp
index c0b3aae1be8..7cbee2d9ef4 100644
--- a/src/mame/audio/decobsmt.cpp
+++ b/src/mame/audio/decobsmt.cpp
@@ -73,7 +73,7 @@ machine_config_constructor decobsmt_device::device_mconfig_additions() const
// decobsmt_device - constructor
//-------------------------------------------------
-decobsmt_device::decobsmt_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+decobsmt_device::decobsmt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, DECOBSMT, "Data East/Sega/Stern BSMT2000 Sound Board", tag, owner, clock, "decobsmt", __FILE__),
m_ourcpu(*this, M6809_TAG),
m_bsmt(*this, BSMT_TAG)
@@ -101,7 +101,7 @@ void decobsmt_device::device_reset()
WRITE8_MEMBER(decobsmt_device::bsmt_reset_w)
{
- UINT8 diff = data ^ m_bsmt_reset;
+ uint8_t diff = data ^ m_bsmt_reset;
m_bsmt_reset = data;
if ((diff & 0x80) && !(data & 0x80))
m_bsmt->reset();
diff --git a/src/mame/audio/decobsmt.h b/src/mame/audio/decobsmt.h
index 715607f47b9..a259d793123 100644
--- a/src/mame/audio/decobsmt.h
+++ b/src/mame/audio/decobsmt.h
@@ -22,7 +22,7 @@ class decobsmt_device : public device_t
{
public:
// construction/destruction
- decobsmt_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ decobsmt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_WRITE8_MEMBER(bsmt_reset_w);
DECLARE_READ8_MEMBER(bsmt_status_r);
@@ -45,9 +45,9 @@ protected:
virtual machine_config_constructor device_mconfig_additions() const override;
private:
- UINT8 m_bsmt_latch;
- UINT8 m_bsmt_reset;
- UINT8 m_bsmt_comms;
+ uint8_t m_bsmt_latch;
+ uint8_t m_bsmt_reset;
+ uint8_t m_bsmt_comms;
};
diff --git a/src/mame/audio/dkong.cpp b/src/mame/audio/dkong.cpp
index 8ca9f121dda..869c15d24ce 100644
--- a/src/mame/audio/dkong.cpp
+++ b/src/mame/audio/dkong.cpp
@@ -1239,7 +1239,7 @@ READ8_MEMBER(dkong_state::dkong_voice_status_r)
READ8_MEMBER(dkong_state::dkong_tune_r)
{
latch8_device *m_ls175_3d = machine().device<latch8_device>("ls175.3d");
- UINT8 page = m_dev_vp2->read(space, 0) & 0x47;
+ uint8_t page = m_dev_vp2->read(space, 0) & 0x47;
if ( page & 0x40 )
{
diff --git a/src/mame/audio/dsbz80.cpp b/src/mame/audio/dsbz80.cpp
index dfc97fd6028..786fd2fe0dd 100644
--- a/src/mame/audio/dsbz80.cpp
+++ b/src/mame/audio/dsbz80.cpp
@@ -61,7 +61,7 @@ machine_config_constructor dsbz80_device::device_mconfig_additions() const
// dsbz80_device - constructor
//-------------------------------------------------
-dsbz80_device::dsbz80_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+dsbz80_device::dsbz80_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, DSBZ80, "Sega Z80-based Digital Sound Board", tag, owner, clock, "dsbz80", __FILE__),
device_sound_interface(mconfig, *this),
m_ourcpu(*this, Z80_TAG)
@@ -74,7 +74,7 @@ dsbz80_device::dsbz80_device(const machine_config &mconfig, const char *tag, dev
void dsbz80_device::device_start()
{
- UINT8 *rom_base = machine().root_device().memregion("mpeg")->base();
+ uint8_t *rom_base = machine().root_device().memregion("mpeg")->base();
decoder = new mpeg_audio(rom_base, mpeg_audio::L2, false, 0);
machine().sound().stream_alloc(*this, 0, 2, 32000);
}
diff --git a/src/mame/audio/dsbz80.h b/src/mame/audio/dsbz80.h
index fb642566245..3d4aae3a2b3 100644
--- a/src/mame/audio/dsbz80.h
+++ b/src/mame/audio/dsbz80.h
@@ -22,7 +22,7 @@ class dsbz80_device : public device_t, public device_sound_interface
{
public:
// construction/destruction
- dsbz80_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ dsbz80_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const override;
@@ -49,9 +49,9 @@ protected:
private:
mpeg_audio *decoder;
- INT16 audio_buf[1152*2];
- UINT8 m_dsb_latch;
- UINT32 mp_start, mp_end, mp_vol, mp_pan, mp_state, lp_start, lp_end, start, end;
+ int16_t audio_buf[1152*2];
+ uint8_t m_dsb_latch;
+ uint32_t mp_start, mp_end, mp_vol, mp_pan, mp_state, lp_start, lp_end, start, end;
int mp_pos, audio_pos, audio_avail;
int status;
};
diff --git a/src/mame/audio/exidy.cpp b/src/mame/audio/exidy.cpp
index c8bbaaf25ba..a8299ce729c 100644
--- a/src/mame/audio/exidy.cpp
+++ b/src/mame/audio/exidy.cpp
@@ -112,7 +112,7 @@ static inline void sh6840_apply_clock(struct sh6840_timer_channel *t, int clocks
inline int exidy_sound_device::sh6840_update_noise(int clocks)
{
- UINT32 newxor;
+ uint32_t newxor;
int noise_clocks = 0;
int i;
@@ -205,13 +205,13 @@ void exidy_sound_device::common_sh_start()
const device_type EXIDY = &device_creator<exidy_sound_device>;
-exidy_sound_device::exidy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+exidy_sound_device::exidy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, EXIDY, "Exidy SFX", tag, owner, clock, "exidy_sfx", __FILE__),
device_sound_interface(mconfig, *this)
{
}
-exidy_sound_device::exidy_sound_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
+exidy_sound_device::exidy_sound_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_sound_interface(mconfig, *this),
m_riot_irq_state(0),
@@ -282,7 +282,7 @@ void exidy_sound_device::sound_stream_update(sound_stream &stream, stream_sample
struct sh8253_timer_channel *c;
int clocks_this_sample;
int clocks;
- INT16 sample = 0;
+ int16_t sample = 0;
/* determine how many 6840 clocks this sample */
m_sh6840_clock_count += m_sh6840_clocks_per_sample;
@@ -293,7 +293,7 @@ void exidy_sound_device::sound_stream_update(sound_stream &stream, stream_sample
if ((sh6840_timer[0].cr & 0x01) == 0)
{
int noise_clocks_this_sample = 0;
- UINT32 chan0_clocks;
+ uint32_t chan0_clocks;
/* generate E-clocked noise if configured to do so */
if (noisy && !(m_sfxctrl & 0x01))
@@ -446,7 +446,7 @@ WRITE8_MEMBER( exidy_sound_device::r6532_portb_w )
READ8_MEMBER( exidy_sound_device::r6532_portb_r )
{
- UINT8 newdata = m_riot->portb_in_get();
+ uint8_t newdata = m_riot->portb_in_get();
if (m_tms != nullptr)
{
newdata &= ~0x0c;
@@ -669,7 +669,7 @@ WRITE8_MEMBER( venture_sound_device::filter_w )
const device_type EXIDY_VENTURE = &device_creator<venture_sound_device>;
-venture_sound_device::venture_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+venture_sound_device::venture_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: exidy_sound_device(mconfig, EXIDY_VENTURE, "Exidy SFX+PSG", tag, owner, clock, "venture_sound", __FILE__)
{
}
@@ -808,8 +808,8 @@ READ8_MEMBER( venture_sound_device::mtrap_voiceio_r )
{
if (!(offset & 0x80))
{
- UINT8 porta = m_riot->porta_out_get();
- UINT8 data = (porta & 0x06) >> 1;
+ uint8_t porta = m_riot->porta_out_get();
+ uint8_t data = (porta & 0x06) >> 1;
data |= (porta & 0x01) << 2;
data |= (porta & 0x08);
return data;
@@ -860,7 +860,7 @@ MACHINE_CONFIG_END
READ8_MEMBER( victory_sound_device::response_r )
{
- UINT8 ret = m_pia1->b_output();
+ uint8_t ret = m_pia1->b_output();
if (VICTORY_LOG_SOUND) logerror("%04X:!!!! Sound response read = %02X\n", m_maincpu->pcbase(), ret);
@@ -873,7 +873,7 @@ READ8_MEMBER( victory_sound_device::response_r )
READ8_MEMBER( victory_sound_device::status_r )
{
- UINT8 ret = (m_pia1_ca1 << 7) | (m_pia1_cb1 << 6);
+ uint8_t ret = (m_pia1_ca1 << 7) | (m_pia1_cb1 << 6);
if (VICTORY_LOG_SOUND) logerror("%04X:!!!! Sound status read = %02X\n", m_maincpu->pcbase(), ret);
@@ -924,7 +924,7 @@ WRITE_LINE_MEMBER( victory_sound_device::main_ack_w )
const device_type EXIDY_VICTORY = &device_creator<victory_sound_device>;
-victory_sound_device::victory_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+victory_sound_device::victory_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: exidy_sound_device(mconfig, EXIDY_VICTORY, "Exidy SFX+PSG+Speech", tag, owner, clock, "victory_sound", __FILE__),
m_victory_sound_response_ack_clk(0)
{
diff --git a/src/mame/audio/exidy.h b/src/mame/audio/exidy.h
index 6f2eef49b56..56cd6f2fb3c 100644
--- a/src/mame/audio/exidy.h
+++ b/src/mame/audio/exidy.h
@@ -8,37 +8,37 @@
/* 6840 variables */
struct sh6840_timer_channel
{
- UINT8 cr;
- UINT8 state;
- UINT8 leftovers;
- UINT16 timer;
- UINT32 clocks;
+ uint8_t cr;
+ uint8_t state;
+ uint8_t leftovers;
+ uint16_t timer;
+ uint32_t clocks;
union
{
#ifdef LSB_FIRST
- struct { UINT8 l, h; } b;
+ struct { uint8_t l, h; } b;
#else
- struct { UINT8 h, l; } b;
+ struct { uint8_t h, l; } b;
#endif
- UINT16 w;
+ uint16_t w;
} counter;
};
struct sh8253_timer_channel
{
- UINT8 clstate;
- UINT8 enable;
- UINT16 count;
- UINT32 step;
- UINT32 fraction;
+ uint8_t clstate;
+ uint8_t enable;
+ uint16_t count;
+ uint32_t step;
+ uint32_t fraction;
};
class exidy_sound_device : public device_t,
public device_sound_interface
{
public:
- exidy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- exidy_sound_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
+ exidy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ exidy_sound_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source);
~exidy_sound_device() {}
DECLARE_READ8_MEMBER( sh6840_r );
@@ -77,7 +77,7 @@ protected:
riot6532_device *m_riot;
/* IRQ variable */
- UINT8 m_riot_irq_state;
+ uint8_t m_riot_irq_state;
/* 8253 variables */
int m_has_sh8253;
@@ -96,18 +96,18 @@ protected:
private:
// internal state
struct sh6840_timer_channel m_sh6840_timer[3];
- INT16 m_sh6840_volume[3];
- UINT8 m_sh6840_MSB_latch;
- UINT8 m_sh6840_LSB_latch;
- UINT8 m_sh6840_LFSR_oldxor;
- UINT32 m_sh6840_LFSR_0;
- UINT32 m_sh6840_LFSR_1;
- UINT32 m_sh6840_LFSR_2;
- UINT32 m_sh6840_LFSR_3;
- UINT32 m_sh6840_clocks_per_sample;
- UINT32 m_sh6840_clock_count;
-
- UINT8 m_sfxctrl;
+ int16_t m_sh6840_volume[3];
+ uint8_t m_sh6840_MSB_latch;
+ uint8_t m_sh6840_LSB_latch;
+ uint8_t m_sh6840_LFSR_oldxor;
+ uint32_t m_sh6840_LFSR_0;
+ uint32_t m_sh6840_LFSR_1;
+ uint32_t m_sh6840_LFSR_2;
+ uint32_t m_sh6840_LFSR_3;
+ uint32_t m_sh6840_clocks_per_sample;
+ uint32_t m_sh6840_clock_count;
+
+ uint8_t m_sfxctrl;
inline int sh6840_update_noise(int clocks);
};
@@ -117,7 +117,7 @@ extern const device_type EXIDY;
class venture_sound_device : public exidy_sound_device
{
public:
- venture_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ venture_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_WRITE8_MEMBER( mtrap_voiceio_w );
DECLARE_READ8_MEMBER( mtrap_voiceio_r );
@@ -139,7 +139,7 @@ extern const device_type EXIDY_VENTURE;
class victory_sound_device : public exidy_sound_device
{
public:
- victory_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ victory_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8_MEMBER( response_r );
DECLARE_READ8_MEMBER( status_r );
@@ -158,7 +158,7 @@ protected:
private:
// internal state
- UINT8 m_victory_sound_response_ack_clk; /* 7474 @ F4 */
+ uint8_t m_victory_sound_response_ack_clk; /* 7474 @ F4 */
TIMER_CALLBACK_MEMBER( delayed_command_w );
diff --git a/src/mame/audio/exidy440.cpp b/src/mame/audio/exidy440.cpp
index 78c122a9caf..04e9eadaeb5 100644
--- a/src/mame/audio/exidy440.cpp
+++ b/src/mame/audio/exidy440.cpp
@@ -48,7 +48,7 @@ static const int channel_bits[4] =
const device_type EXIDY440 = &device_creator<exidy440_sound_device>;
-exidy440_sound_device::exidy440_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+exidy440_sound_device::exidy440_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, EXIDY440, "Exidy 440 CVSD", tag, owner, clock, "exidy440_sound", __FILE__),
device_sound_interface(mconfig, *this),
m_sound_command(0),
@@ -121,15 +121,15 @@ void exidy440_sound_device::device_start()
/* allocate the sample cache */
length = machine().root_device().memregion("cvsd")->bytes() * 16 + MAX_CACHE_ENTRIES * sizeof(sound_cache_entry);
- m_sound_cache = (sound_cache_entry *)auto_alloc_array_clear(machine(), UINT8, length);
+ m_sound_cache = (sound_cache_entry *)auto_alloc_array_clear(machine(), uint8_t, length);
/* determine the hard end of the cache and reset */
- m_sound_cache_max = (sound_cache_entry *)((UINT8 *)m_sound_cache + length);
+ m_sound_cache_max = (sound_cache_entry *)((uint8_t *)m_sound_cache + length);
reset_sound_cache();
/* allocate the mixer buffer */
- m_mixer_buffer_left = make_unique_clear<INT32[]>(clock());
- m_mixer_buffer_right = make_unique_clear<INT32[]>(clock());
+ m_mixer_buffer_left = make_unique_clear<int32_t[]>(clock());
+ m_mixer_buffer_right = make_unique_clear<int32_t[]>(clock());
if (SOUND_LOG)
m_debuglog = fopen("sound.log", "w");
@@ -151,10 +151,10 @@ void exidy440_sound_device::device_stop()
*
*************************************/
-void exidy440_sound_device::add_and_scale_samples(int ch, INT32 *dest, int samples, int volume)
+void exidy440_sound_device::add_and_scale_samples(int ch, int32_t *dest, int samples, int volume)
{
sound_channel_data *channel = &m_sound_channel[ch];
- INT16 *srcdata;
+ int16_t *srcdata;
int i;
/* channels 2 and 3 are half-rate samples */
@@ -172,7 +172,7 @@ void exidy440_sound_device::add_and_scale_samples(int ch, INT32 *dest, int sampl
/* copy 1 for 2 to the destination */
for (i = 0; i < samples; i += 2)
{
- INT16 sample = *srcdata++ * volume / 256;
+ int16_t sample = *srcdata++ * volume / 256;
*dest++ += sample;
*dest++ += sample;
}
@@ -197,14 +197,14 @@ void exidy440_sound_device::add_and_scale_samples(int ch, INT32 *dest, int sampl
void exidy440_sound_device::mix_to_16(int length, stream_sample_t *dest_left, stream_sample_t *dest_right)
{
- INT32 *mixer_left = m_mixer_buffer_left.get();
- INT32 *mixer_right = m_mixer_buffer_right.get();
+ int32_t *mixer_left = m_mixer_buffer_left.get();
+ int32_t *mixer_right = m_mixer_buffer_right.get();
int i, clippers = 0;
for (i = 0; i < length; i++)
{
- INT32 sample_left = *mixer_left++;
- INT32 sample_right = *mixer_right++;
+ int32_t sample_left = *mixer_left++;
+ int32_t sample_right = *mixer_right++;
if (sample_left < -32768) { sample_left = -32768; clippers++; }
else if (sample_left > 32767) { sample_left = 32767; clippers++; }
@@ -232,7 +232,7 @@ READ8_MEMBER( exidy440_sound_device::sound_command_r )
}
-void exidy440_sound_device::exidy440_sound_command(UINT8 param)
+void exidy440_sound_device::exidy440_sound_command(uint8_t param)
{
m_sound_command = param;
m_sound_command_ack = 0;
@@ -240,7 +240,7 @@ void exidy440_sound_device::exidy440_sound_command(UINT8 param)
}
-UINT8 exidy440_sound_device::exidy440_sound_command_ack()
+uint8_t exidy440_sound_device::exidy440_sound_command_ack()
{
return m_sound_command_ack;
}
@@ -522,12 +522,12 @@ void exidy440_sound_device::reset_sound_cache()
}
-INT16 *exidy440_sound_device::add_to_sound_cache(UINT8 *input, int address, int length, int bits, int frequency)
+int16_t *exidy440_sound_device::add_to_sound_cache(uint8_t *input, int address, int length, int bits, int frequency)
{
sound_cache_entry *current = m_sound_cache_end;
/* compute where the end will be once we add this entry */
- m_sound_cache_end = (sound_cache_entry *)((UINT8 *)current + sizeof(sound_cache_entry) + length * 16);
+ m_sound_cache_end = (sound_cache_entry *)((uint8_t *)current + sizeof(sound_cache_entry) + length * 16);
/* if this will overflow the cache, reset and re-add */
if (m_sound_cache_end > m_sound_cache_max)
@@ -549,7 +549,7 @@ INT16 *exidy440_sound_device::add_to_sound_cache(UINT8 *input, int address, int
}
-INT16 *exidy440_sound_device::find_or_add_to_sound_cache(int address, int length, int bits, int frequency)
+int16_t *exidy440_sound_device::find_or_add_to_sound_cache(int address, int length, int bits, int frequency)
{
sound_cache_entry *current;
@@ -573,7 +573,7 @@ void exidy440_sound_device::play_cvsd(int ch)
sound_channel_data *channel = &m_sound_channel[ch];
int address = m_m6844_channel[ch].address;
int length = m_m6844_channel[ch].counter;
- INT16 *base;
+ int16_t *base;
/* add the bank number to the address */
if (m_sound_banks[ch] & 1)
@@ -634,11 +634,11 @@ void exidy440_sound_device::stop_cvsd(int ch)
*
*************************************/
-void exidy440_sound_device::fir_filter(INT32 *input, INT16 *output, int count)
+void exidy440_sound_device::fir_filter(int32_t *input, int16_t *output, int count)
{
while (count--)
{
- INT32 result = (input[-1] - input[-8] - input[-48] + input[-55]) << 2;
+ int32_t result = (input[-1] - input[-8] - input[-48] + input[-55]) << 2;
result += (input[0] + input[-18] + input[-38] + input[-56]) << 3;
result += (-input[-2] - input[-4] + input[-5] + input[-51] - input[-52] - input[-54]) << 4;
result += (-input[-3] - input[-11] - input[-45] - input[-53]) << 5;
@@ -669,9 +669,9 @@ void exidy440_sound_device::fir_filter(INT32 *input, INT16 *output, int count)
*
*************************************/
-void exidy440_sound_device::decode_and_filter_cvsd(UINT8 *input, int bytes, int maskbits, int frequency, INT16 *output)
+void exidy440_sound_device::decode_and_filter_cvsd(uint8_t *input, int bytes, int maskbits, int frequency, int16_t *output)
{
- INT32 buffer[SAMPLE_BUFFER_LENGTH + FIR_HISTORY_LENGTH];
+ int32_t buffer[SAMPLE_BUFFER_LENGTH + FIR_HISTORY_LENGTH];
int total_samples = bytes * 8;
int mask = (1 << maskbits) - 1;
double filter, integrator, leak;
@@ -688,7 +688,7 @@ void exidy440_sound_device::decode_and_filter_cvsd(UINT8 *input, int bytes, int
gain = SAMPLE_GAIN;
/* clear the history words for a start */
- memset(&buffer[0], 0, FIR_HISTORY_LENGTH * sizeof(INT32));
+ memset(&buffer[0], 0, FIR_HISTORY_LENGTH * sizeof(int32_t));
/* initialize the CVSD decoder */
steps = 0xaa;
@@ -698,7 +698,7 @@ void exidy440_sound_device::decode_and_filter_cvsd(UINT8 *input, int bytes, int
/* loop over chunks */
for (chunk_start = 0; chunk_start < total_samples; chunk_start += SAMPLE_BUFFER_LENGTH)
{
- INT32 *bufptr = &buffer[FIR_HISTORY_LENGTH];
+ int32_t *bufptr = &buffer[FIR_HISTORY_LENGTH];
int chunk_bytes;
int ind;
@@ -771,13 +771,13 @@ void exidy440_sound_device::decode_and_filter_cvsd(UINT8 *input, int bytes, int
fir_filter(&buffer[FIR_HISTORY_LENGTH], &output[chunk_start], chunk_bytes * 8);
/* copy the last few input samples down to the start for a new history */
- memcpy(&buffer[0], &buffer[SAMPLE_BUFFER_LENGTH], FIR_HISTORY_LENGTH * sizeof(INT32));
+ memcpy(&buffer[0], &buffer[SAMPLE_BUFFER_LENGTH], FIR_HISTORY_LENGTH * sizeof(int32_t));
}
/* make sure the volume goes smoothly to 0 over the last 512 samples */
if (FADE_TO_ZERO)
{
- INT16 *data;
+ int16_t *data;
chunk_start = (total_samples > 512) ? total_samples - 512 : 0;
data = output + chunk_start;
@@ -804,8 +804,8 @@ void exidy440_sound_device::sound_stream_update(sound_stream &stream, stream_sam
int ch;
/* reset the mixer buffers */
- memset(m_mixer_buffer_left.get(), 0, samples * sizeof(INT32));
- memset(m_mixer_buffer_right.get(), 0, samples * sizeof(INT32));
+ memset(m_mixer_buffer_left.get(), 0, samples * sizeof(int32_t));
+ memset(m_mixer_buffer_right.get(), 0, samples * sizeof(int32_t));
/* loop over channels */
for (ch = 0; ch < 4; ch++)
diff --git a/src/mame/audio/exidy440.h b/src/mame/audio/exidy440.h
index 0dafc17adf6..be325c5c177 100644
--- a/src/mame/audio/exidy440.h
+++ b/src/mame/audio/exidy440.h
@@ -6,7 +6,7 @@ struct m6844_channel_data
int active;
int address;
int counter;
- UINT8 control;
+ uint8_t control;
int start_address;
int start_counter;
};
@@ -15,7 +15,7 @@ struct m6844_channel_data
/* channel_data structure holds info about each active sound channel */
struct sound_channel_data
{
- INT16 *base;
+ int16_t *base;
int offset;
int remaining;
};
@@ -29,14 +29,14 @@ struct sound_cache_entry
int length;
int bits;
int frequency;
- INT16 data[1];
+ int16_t data[1];
};
class exidy440_sound_device : public device_t,
public device_sound_interface
{
public:
- exidy440_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ exidy440_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~exidy440_sound_device() {}
DECLARE_READ8_MEMBER( sound_command_r );
@@ -47,8 +47,8 @@ public:
DECLARE_WRITE8_MEMBER( m6844_w );
DECLARE_WRITE8_MEMBER( sound_banks_w );
- void exidy440_sound_command(UINT8 param);
- UINT8 exidy440_sound_command_ack();
+ void exidy440_sound_command(uint8_t param);
+ uint8_t exidy440_sound_command_ack();
protected:
// device-level overrides
@@ -61,23 +61,23 @@ protected:
private:
// internal state
- UINT8 m_sound_command;
- UINT8 m_sound_command_ack;
-
- UINT8 m_sound_banks[4];
- //UINT8 m_m6844_data[0x20];
- UINT8 m_sound_volume[0x10];
- std::unique_ptr<INT32[]> m_mixer_buffer_left;
- std::unique_ptr<INT32[]> m_mixer_buffer_right;
+ uint8_t m_sound_command;
+ uint8_t m_sound_command_ack;
+
+ uint8_t m_sound_banks[4];
+ //uint8_t m_m6844_data[0x20];
+ uint8_t m_sound_volume[0x10];
+ std::unique_ptr<int32_t[]> m_mixer_buffer_left;
+ std::unique_ptr<int32_t[]> m_mixer_buffer_right;
sound_cache_entry *m_sound_cache;
sound_cache_entry *m_sound_cache_end;
sound_cache_entry *m_sound_cache_max;
/* 6844 description */
m6844_channel_data m_m6844_channel[4];
- UINT8 m_m6844_priority;
- UINT8 m_m6844_interrupt;
- UINT8 m_m6844_chain;
+ uint8_t m_m6844_priority;
+ uint8_t m_m6844_interrupt;
+ uint8_t m_m6844_chain;
/* sound interface parameters */
sound_stream *m_stream;
@@ -95,13 +95,13 @@ private:
void stop_cvsd(int ch);
void reset_sound_cache();
- INT16 *add_to_sound_cache(UINT8 *input, int address, int length, int bits, int frequency);
- INT16 *find_or_add_to_sound_cache(int address, int length, int bits, int frequency);
+ int16_t *add_to_sound_cache(uint8_t *input, int address, int length, int bits, int frequency);
+ int16_t *find_or_add_to_sound_cache(int address, int length, int bits, int frequency);
- void decode_and_filter_cvsd(UINT8 *data, int bytes, int maskbits, int frequency, INT16 *dest);
- void fir_filter(INT32 *input, INT16 *output, int count);
+ void decode_and_filter_cvsd(uint8_t *data, int bytes, int maskbits, int frequency, int16_t *dest);
+ void fir_filter(int32_t *input, int16_t *output, int count);
- void add_and_scale_samples(int ch, INT32 *dest, int samples, int volume);
+ void add_and_scale_samples(int ch, int32_t *dest, int samples, int volume);
void mix_to_16(int length, stream_sample_t *dest_left, stream_sample_t *dest_right);
};
diff --git a/src/mame/audio/galaxian.cpp b/src/mame/audio/galaxian.cpp
index ca4505c00e9..7425c98e712 100644
--- a/src/mame/audio/galaxian.cpp
+++ b/src/mame/audio/galaxian.cpp
@@ -389,7 +389,7 @@ DISCRETE_SOUND_END
const device_type GALAXIAN = &device_creator<galaxian_sound_device>;
-galaxian_sound_device::galaxian_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+galaxian_sound_device::galaxian_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, GALAXIAN, "Galaxian Audio Custom", tag, owner, clock, "galaxian_sound", __FILE__),
device_sound_interface(mconfig, *this),
m_lfo_val(0)
@@ -433,7 +433,7 @@ WRITE8_MEMBER( galaxian_sound_device::pitch_w )
WRITE8_MEMBER( galaxian_sound_device::lfo_freq_w )
{
- UINT8 lfo_val_new = (m_lfo_val & ~(1<<offset)) | ((data & 0x01) << offset);
+ uint8_t lfo_val_new = (m_lfo_val & ~(1<<offset)) | ((data & 0x01) << offset);
if (m_lfo_val != lfo_val_new)
{
diff --git a/src/mame/audio/galaxian.h b/src/mame/audio/galaxian.h
index 5f763e7792f..d043757bc3b 100644
--- a/src/mame/audio/galaxian.h
+++ b/src/mame/audio/galaxian.h
@@ -8,7 +8,7 @@ class galaxian_sound_device : public device_t,
public device_sound_interface
{
public:
- galaxian_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ galaxian_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~galaxian_sound_device() {}
DECLARE_WRITE8_MEMBER( sound_w );
@@ -29,7 +29,7 @@ protected:
private:
// internal state
- UINT8 m_lfo_val;
+ uint8_t m_lfo_val;
discrete_device *m_discrete;
};
diff --git a/src/mame/audio/gamate.cpp b/src/mame/audio/gamate.cpp
index 0d040e6e7ec..52798917f7c 100644
--- a/src/mame/audio/gamate.cpp
+++ b/src/mame/audio/gamate.cpp
@@ -16,7 +16,7 @@ enum { ClockDelay=32 };
const device_type GAMATE_SND = &device_creator<gamate_sound_device>;
const int gamate_sound_device::DAConverter[]={ 0, 3, 7, 13, 23, 41, 75, 137, 249, 453, 825, 1499, 2726, 4956, 9011, 16383 }; // (*.55) on the real below index 8 bareless measureable
-const UINT8 Mask[]={ 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0x1f, 0x3f, 0x1f, 0x1f, 0x1f, 0xff, 0xff, 0xf };
+const uint8_t Mask[]={ 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0x1f, 0x3f, 0x1f, 0x1f, 0x1f, 0xff, 0xff, 0xf };
const int EnvelopeVolumes[]={ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
//**************************************************************************
// LIVE DEVICE
@@ -26,7 +26,7 @@ const int EnvelopeVolumes[]={ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
// gamate_sound_device - constructor
//-------------------------------------------------
-gamate_sound_device::gamate_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+gamate_sound_device::gamate_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, GAMATE_SND, "Gamate Audio Custom", tag, owner, clock, "gamate_sound", __FILE__)
, device_sound_interface(mconfig, *this)
, m_mixer_channel(nullptr)
@@ -174,7 +174,7 @@ void gamate_sound_device::sound_stream_update(sound_stream &stream, stream_sampl
WRITE8_MEMBER( gamate_sound_device::device_w )
{
- UINT16 size;
+ uint16_t size;
m_mixer_channel->update();
reg[offset] = data;
@@ -245,7 +245,7 @@ WRITE8_MEMBER( gamate_sound_device::device_w )
READ8_MEMBER( gamate_sound_device::device_r )
{
- UINT8 data=0;
+ uint8_t data=0;
if ((offset&0xf)<ARRAY_LENGTH(Mask))
data=reg[offset&0xf]&Mask[offset&0xf]; // unused bits set to last write value? in this area
return data;
diff --git a/src/mame/audio/geebee.cpp b/src/mame/audio/geebee.cpp
index dc19b471233..51c2dfebcff 100644
--- a/src/mame/audio/geebee.cpp
+++ b/src/mame/audio/geebee.cpp
@@ -15,7 +15,7 @@
const device_type GEEBEE = &device_creator<geebee_sound_device>;
-geebee_sound_device::geebee_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+geebee_sound_device::geebee_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, GEEBEE, "Gee Bee Audio Custom", tag, owner, clock, "geebee_sound", __FILE__),
device_sound_interface(mconfig, *this),
m_decay(nullptr),
@@ -36,10 +36,10 @@ geebee_sound_device::geebee_sound_device(const machine_config &mconfig, const ch
void geebee_sound_device::device_start()
{
- m_decay = std::make_unique<UINT16[]>(32768);
+ m_decay = std::make_unique<uint16_t[]>(32768);
for (int i = 0; i < 0x8000; i++)
- m_decay[0x7fff - i] = (INT16) (0x7fff/exp(1.0*i/4096));
+ m_decay[0x7fff - i] = (int16_t) (0x7fff/exp(1.0*i/4096));
/* 1V = HSYNC = 18.432MHz / 3 / 2 / 384 = 8000Hz */
m_channel = machine().sound().stream_alloc(*this, 0, 1, 18432000 / 3 / 2 / 384);
diff --git a/src/mame/audio/geebee.h b/src/mame/audio/geebee.h
index 643d8982028..94d5fa01561 100644
--- a/src/mame/audio/geebee.h
+++ b/src/mame/audio/geebee.h
@@ -5,7 +5,7 @@ class geebee_sound_device : public device_t,
public device_sound_interface
{
public:
- geebee_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ geebee_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
enum
{
@@ -25,7 +25,7 @@ protected:
private:
// internal state
- std::unique_ptr<UINT16[]> m_decay;
+ std::unique_ptr<uint16_t[]> m_decay;
sound_stream *m_channel;
int m_sound_latch;
int m_sound_signal;
diff --git a/src/mame/audio/gomoku.cpp b/src/mame/audio/gomoku.cpp
index 9743ea2884e..23ea836c212 100644
--- a/src/mame/audio/gomoku.cpp
+++ b/src/mame/audio/gomoku.cpp
@@ -27,7 +27,7 @@ const device_type GOMOKU = &device_creator<gomoku_sound_device>;
// gomoku_sound_device - constructor
//-------------------------------------------------
-gomoku_sound_device::gomoku_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+gomoku_sound_device::gomoku_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, GOMOKU, "Gomoku Narabe Renju Audio Custom", tag, owner, clock, "gomoku_sound", __FILE__),
device_sound_interface(mconfig, *this),
m_last_channel(nullptr),
@@ -41,8 +41,8 @@ gomoku_sound_device::gomoku_sound_device(const machine_config &mconfig, const ch
m_mixer_buffer_2(nullptr)
{
memset(m_channel_list, 0, sizeof(gomoku_sound_channel)*GOMOKU_MAX_VOICES);
- memset(m_soundregs1, 0, sizeof(UINT8)*0x20);
- memset(m_soundregs2, 0, sizeof(UINT8)*0x20);
+ memset(m_soundregs1, 0, sizeof(uint8_t)*0x20);
+ memset(m_soundregs2, 0, sizeof(uint8_t)*0x20);
}
@@ -180,7 +180,7 @@ void gomoku_sound_device::make_mixer_table(int voices, int gain)
int i;
/* allocate memory */
- m_mixer_table = std::make_unique<INT16[]>(256 * voices);
+ m_mixer_table = std::make_unique<int16_t[]>(256 * voices);
/* find the middle of the table */
m_mixer_lookup = m_mixer_table.get() + (128 * voices);
diff --git a/src/mame/audio/gorf.cpp b/src/mame/audio/gorf.cpp
index d5df98eb720..21f7272925c 100644
--- a/src/mame/audio/gorf.cpp
+++ b/src/mame/audio/gorf.cpp
@@ -113,7 +113,7 @@ const char *const gorf_sample_names[] =
READ8_MEMBER( astrocde_state::gorf_speech_r )
{
- UINT8 data = offset >> 8;
+ uint8_t data = offset >> 8;
#if USE_FAKE_VOTRAX
int Phoneme, Intonation;
int i = 0;
diff --git a/src/mame/audio/gottlieb.cpp b/src/mame/audio/gottlieb.cpp
index 17db18103dd..5a7924a491b 100644
--- a/src/mame/audio/gottlieb.cpp
+++ b/src/mame/audio/gottlieb.cpp
@@ -37,7 +37,7 @@ extern const device_type GOTTLIEB_SOUND_REV2 = &device_creator<gottlieb_sound_r2
#if USE_FAKE_VOTRAX
-void gottlieb_sound_r1_device::trigger_sample(UINT8 data)
+void gottlieb_sound_r1_device::trigger_sample(uint8_t data)
{
/* Reactor samples */
if (strcmp(machine().system().name, "reactor") == 0)
@@ -93,7 +93,7 @@ void gottlieb_sound_r1_device::device_timer(emu_timer &timer, device_timer_id id
m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
-void gottlieb_sound_r1_device::fake_votrax_data_w(UINT8 data)
+void gottlieb_sound_r1_device::fake_votrax_data_w(uint8_t data)
{
static const char *const PhonemeTable[0x40] =
{
@@ -257,7 +257,7 @@ MACHINE_CONFIG_END
// gottlieb_sound_r0_device - constructors
//-------------------------------------------------
-gottlieb_sound_r0_device::gottlieb_sound_r0_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+gottlieb_sound_r0_device::gottlieb_sound_r0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, GOTTLIEB_SOUND_REV1, "Gottlieb Sound rev. 0", tag, owner, clock, "gotsndr0", __FILE__)
, device_mixer_interface(mconfig, *this)
, m_audiocpu(*this, "audiocpu")
@@ -284,8 +284,8 @@ READ8_MEMBER( gottlieb_sound_r0_device::r6530b_r )
WRITE8_MEMBER( gottlieb_sound_r0_device::write )
{
// write the command data to the low 4 bits
- UINT8 pb0_3 = data ^ 15;
- UINT8 pb4_7 = ioport("SB0")->read() & 0x90;
+ uint8_t pb0_3 = data ^ 15;
+ uint8_t pb4_7 = ioport("SB0")->read() & 0x90;
m_sndcmd = pb0_3 | pb4_7;
m_r6530->write(space, offset, m_sndcmd);
}
@@ -382,7 +382,7 @@ void gottlieb_sound_r0_device::device_start()
// gottlieb_sound_r1_device - constructors
//-------------------------------------------------
-gottlieb_sound_r1_device::gottlieb_sound_r1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+gottlieb_sound_r1_device::gottlieb_sound_r1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, GOTTLIEB_SOUND_REV1, "Gottlieb Sound rev. 1", tag, owner, clock, "gotsndr1", __FILE__),
device_mixer_interface(mconfig, *this),
m_audiocpu(*this, "audiocpu"),
@@ -399,7 +399,7 @@ gottlieb_sound_r1_device::gottlieb_sound_r1_device(const machine_config &mconfig
{
}
-gottlieb_sound_r1_device::gottlieb_sound_r1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock, bool populate_votrax)
+gottlieb_sound_r1_device::gottlieb_sound_r1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, bool populate_votrax)
: device_t(mconfig, GOTTLIEB_SOUND_REV1, "Gottlieb Sound rev. 1", tag, owner, clock, "gotsndr1", __FILE__),
device_mixer_interface(mconfig, *this),
m_audiocpu(*this, "audiocpu"),
@@ -424,8 +424,8 @@ gottlieb_sound_r1_device::gottlieb_sound_r1_device(const machine_config &mconfig
WRITE8_MEMBER( gottlieb_sound_r1_device::write )
{
// write the command data to the low 6 bits, and the trigger to the upper bit
- UINT8 pa7 = (data & 0x0f) != 0xf;
- UINT8 pa0_5 = ~data & 0x3f;
+ uint8_t pa7 = (data & 0x0f) != 0xf;
+ uint8_t pa0_5 = ~data & 0x3f;
m_riot->porta_in_set(pa0_5 | (pa7 << 7), 0xbf);
#if USE_FAKE_VOTRAX
@@ -626,7 +626,7 @@ void gottlieb_sound_r1_device::device_start()
// constructor
//-------------------------------------------------
-gottlieb_sound_r1_with_votrax_device::gottlieb_sound_r1_with_votrax_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+gottlieb_sound_r1_with_votrax_device::gottlieb_sound_r1_with_votrax_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: gottlieb_sound_r1_device(mconfig, tag, owner, clock, true)
{
}
@@ -663,7 +663,7 @@ ioport_constructor gottlieb_sound_r1_with_votrax_device::device_input_ports() co
// gottlieb_sound_r2_device - constructor
//-------------------------------------------------
-gottlieb_sound_r2_device::gottlieb_sound_r2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+gottlieb_sound_r2_device::gottlieb_sound_r2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, GOTTLIEB_SOUND_REV2, "Gottlieb Sound rev. 2", tag, owner, clock, "gotsndr2", __FILE__),
device_mixer_interface(mconfig, *this),
m_audiocpu(*this, "audiocpu"),
@@ -809,7 +809,7 @@ CUSTOM_INPUT_MEMBER( gottlieb_sound_r2_device::speech_drq_custom_r )
WRITE8_MEMBER( gottlieb_sound_r2_device::speech_control_w )
{
- UINT8 previous = m_speech_control;
+ uint8_t previous = m_speech_control;
m_speech_control = data;
// bit 0 enables/disables the NMI line
diff --git a/src/mame/audio/gottlieb.h b/src/mame/audio/gottlieb.h
index cb5f678586b..77753f57e8d 100644
--- a/src/mame/audio/gottlieb.h
+++ b/src/mame/audio/gottlieb.h
@@ -50,7 +50,7 @@ class gottlieb_sound_r0_device : public device_t, public device_mixer_interface
{
public:
// construction/destruction
- gottlieb_sound_r0_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ gottlieb_sound_r0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// read/write
DECLARE_WRITE8_MEMBER( write );
@@ -70,7 +70,7 @@ private:
required_device<m6502_device> m_audiocpu;
required_device<mos6530_device> m_r6530;
- UINT8 m_sndcmd;
+ uint8_t m_sndcmd;
};
// ======================> gottlieb_sound_r1_device
@@ -80,8 +80,8 @@ class gottlieb_sound_r1_device : public device_t, public device_mixer_interface
{
public:
// construction/destruction
- gottlieb_sound_r1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- gottlieb_sound_r1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock, bool populate_votrax);
+ gottlieb_sound_r1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ gottlieb_sound_r1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, bool populate_votrax);
// read/write
DECLARE_WRITE8_MEMBER( write );
@@ -107,19 +107,19 @@ private:
// internal state
//bool m_populate_votrax;
- UINT8 m_last_speech_clock;
+ uint8_t m_last_speech_clock;
#if USE_FAKE_VOTRAX
protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
private:
- void fake_votrax_data_w(UINT8 data);
- void trigger_sample(UINT8 data);
+ void fake_votrax_data_w(uint8_t data);
+ void trigger_sample(uint8_t data);
optional_device<samples_device> m_samples;
- UINT8 m_score_sample;
- UINT8 m_random_offset;
- UINT8 m_votrax_queue[100];
- UINT8 m_votrax_queuepos;
+ uint8_t m_score_sample;
+ uint8_t m_random_offset;
+ uint8_t m_votrax_queue[100];
+ uint8_t m_votrax_queuepos;
#endif
};
@@ -128,7 +128,7 @@ class gottlieb_sound_r1_with_votrax_device : public gottlieb_sound_r1_device
{
public:
// construction/destruction
- gottlieb_sound_r1_with_votrax_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ gottlieb_sound_r1_with_votrax_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
// device-level overrides
@@ -144,7 +144,7 @@ class gottlieb_sound_r2_device : public device_t, public device_mixer_interface
{
public:
// construction/destruction
- gottlieb_sound_r2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ gottlieb_sound_r2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration helpers
static void static_enable_cobram3_mods(device_t &device);
@@ -192,15 +192,15 @@ private:
// internal state
bool m_cobram3_mod;
emu_timer * m_nmi_timer;
- UINT8 m_nmi_rate;
- UINT8 m_nmi_state;
- UINT8 m_audiocpu_latch;
- UINT8 m_speechcpu_latch;
- UINT8 m_speech_control;
- UINT8 m_last_command;
- UINT8 m_psg_latch;
- UINT8 m_psg_data_latch;
- UINT8 m_sp0250_latch;
+ uint8_t m_nmi_rate;
+ uint8_t m_nmi_state;
+ uint8_t m_audiocpu_latch;
+ uint8_t m_speechcpu_latch;
+ uint8_t m_speech_control;
+ uint8_t m_last_command;
+ uint8_t m_psg_latch;
+ uint8_t m_psg_data_latch;
+ uint8_t m_sp0250_latch;
};
diff --git a/src/mame/audio/gridlee.cpp b/src/mame/audio/gridlee.cpp
index b7575c2c34f..742d3d57ec3 100644
--- a/src/mame/audio/gridlee.cpp
+++ b/src/mame/audio/gridlee.cpp
@@ -22,7 +22,7 @@ const device_type GRIDLEE = &device_creator<gridlee_sound_device>;
// gridlee_sound_device - constructor
//-------------------------------------------------
-gridlee_sound_device::gridlee_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+gridlee_sound_device::gridlee_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, GRIDLEE, "Gridlee Audio Custom", tag, owner, clock, "gridlee_sound", __FILE__),
device_sound_interface(mconfig, *this),
m_tone_step(0),
@@ -32,7 +32,7 @@ gridlee_sound_device::gridlee_sound_device(const machine_config &mconfig, const
m_samples(nullptr),
m_freq_to_step(0.0)
{
- memset(m_sound_data, 0, sizeof(UINT8)*24);
+ memset(m_sound_data, 0, sizeof(uint8_t)*24);
}
@@ -72,7 +72,7 @@ void gridlee_sound_device::sound_stream_update(sound_stream &stream, stream_samp
WRITE8_MEMBER( gridlee_sound_device::gridlee_sound_w )
{
- UINT8 *sound_data = m_sound_data;
+ uint8_t *sound_data = m_sound_data;
samples_device *samples = m_samples;
m_stream->update();
diff --git a/src/mame/audio/harddriv.cpp b/src/mame/audio/harddriv.cpp
index 7c38118370a..5391dcee945 100644
--- a/src/mame/audio/harddriv.cpp
+++ b/src/mame/audio/harddriv.cpp
@@ -27,7 +27,7 @@
const device_type HARDDRIV_SOUND_BOARD_DEVICE = &device_creator<harddriv_sound_board_device>;
-harddriv_sound_board_device::harddriv_sound_board_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+harddriv_sound_board_device::harddriv_sound_board_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, HARDDRIV_SOUND_BOARD_DEVICE, "Hard Drivin' Sound Board", tag, owner, clock, "harddriv_sound", __FILE__),
m_soundcpu(*this, "soundcpu"),
m_dac(*this, "dac"),
@@ -300,8 +300,8 @@ WRITE16_MEMBER(harddriv_sound_board_device::hdsnd68k_320com_w)
READ_LINE_MEMBER(harddriv_sound_board_device::hdsnddsp_get_bio)
{
- UINT64 cycles_since_last_bio = m_sounddsp->total_cycles() - m_last_bio_cycles;
- INT32 cycles_until_bio = CYCLES_PER_BIO - cycles_since_last_bio;
+ uint64_t cycles_since_last_bio = m_sounddsp->total_cycles() - m_last_bio_cycles;
+ int32_t cycles_until_bio = CYCLES_PER_BIO - cycles_since_last_bio;
/* if we're not at the next BIO yet, advance us there */
if (cycles_until_bio > 0)
diff --git a/src/mame/audio/hng64.cpp b/src/mame/audio/hng64.cpp
index d6395327b29..2c826b91329 100644
--- a/src/mame/audio/hng64.cpp
+++ b/src/mame/audio/hng64.cpp
@@ -65,8 +65,8 @@ WRITE32_MEMBER(hng64_state::hng64_soundram_w)
{
//logerror("hng64_soundram_w %08x: %08x %08x\n", offset, data, mem_mask);
- UINT32 mem_mask32 = mem_mask;
- UINT32 data32 = data;
+ uint32_t mem_mask32 = mem_mask;
+ uint32_t data32 = data;
/* swap data around.. keep the v53 happy */
data = data32 >> 16;
@@ -92,7 +92,7 @@ WRITE32_MEMBER(hng64_state::hng64_soundram_w)
fp=fopen(filename, "w+b");
if (fp)
{
- fwrite((UINT8*)m_soundram.get(), 0x80000*4, 1, fp);
+ fwrite((uint8_t*)m_soundram.get(), 0x80000*4, 1, fp);
fclose(fp);
}
}
@@ -102,8 +102,8 @@ WRITE32_MEMBER(hng64_state::hng64_soundram_w)
READ32_MEMBER(hng64_state::hng64_soundram_r)
{
- UINT16 datalo = m_soundram[offset * 2 + 0];
- UINT16 datahi = m_soundram[offset * 2 + 1];
+ uint16_t datalo = m_soundram[offset * 2 + 0];
+ uint16_t datahi = m_soundram[offset * 2 + 1];
return flipendian_int16(datahi) | (flipendian_int16(datalo) << 16);
}
@@ -145,7 +145,7 @@ WRITE32_MEMBER( hng64_state::hng64_soundcpu_enable_w )
void hng64_state::reset_sound()
{
- UINT8 *RAM = (UINT8*)m_soundram.get();
+ uint8_t *RAM = (uint8_t*)m_soundram.get();
membank("bank0")->set_base(&RAM[0x1f0000]);
membank("bank1")->set_base(&RAM[0x1f0000]);
membank("bank2")->set_base(&RAM[0x1f0000]);
@@ -222,7 +222,7 @@ WRITE16_MEMBER(hng64_state::hng64_sound_bank_w)
// the 2 early games don't do this.. maybe all banks actuallly default to that region tho?
// the sound code on those games seems buggier anyway.
- UINT8 *RAM = (UINT8*)m_soundram.get();
+ uint8_t *RAM = (uint8_t*)m_soundram.get();
int bank = data & 0x1f;
diff --git a/src/mame/audio/hyprolyb.cpp b/src/mame/audio/hyprolyb.cpp
index 3e9b29d356c..5cbde2908fc 100644
--- a/src/mame/audio/hyprolyb.cpp
+++ b/src/mame/audio/hyprolyb.cpp
@@ -6,7 +6,7 @@
const device_type HYPROLYB_ADPCM = &device_creator<hyprolyb_adpcm_device>;
-hyprolyb_adpcm_device::hyprolyb_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+hyprolyb_adpcm_device::hyprolyb_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, HYPROLYB_ADPCM, "Hyper Olympics Audio", tag, owner, clock, "hyprolyb_adpcm", __FILE__),
device_sound_interface(mconfig, *this),
m_soundlatch2(*this, ":soundlatch2"),
@@ -60,7 +60,7 @@ WRITE8_MEMBER( hyprolyb_adpcm_device::msm_data_w )
READ8_MEMBER( hyprolyb_adpcm_device::msm_vck_r )
{
- UINT8 old = m_vck_ready;
+ uint8_t old = m_vck_ready;
m_vck_ready = 0x00;
return old;
}
diff --git a/src/mame/audio/hyprolyb.h b/src/mame/audio/hyprolyb.h
index abbbd77c689..67ab8c27f74 100644
--- a/src/mame/audio/hyprolyb.h
+++ b/src/mame/audio/hyprolyb.h
@@ -8,7 +8,7 @@ class hyprolyb_adpcm_device : public device_t,
public device_sound_interface
{
public:
- hyprolyb_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ hyprolyb_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~hyprolyb_adpcm_device() {}
DECLARE_WRITE8_MEMBER( write );
@@ -34,9 +34,9 @@ protected:
required_device<generic_latch_8_device> m_soundlatch2;
msm5205_device *m_msm;
address_space *m_space;
- UINT8 m_adpcm_ready; // only bootlegs
- UINT8 m_adpcm_busy;
- UINT8 m_vck_ready;
+ uint8_t m_adpcm_ready; // only bootlegs
+ uint8_t m_adpcm_busy;
+ uint8_t m_vck_ready;
};
MACHINE_CONFIG_EXTERN( hyprolyb_adpcm );
diff --git a/src/mame/audio/irem.cpp b/src/mame/audio/irem.cpp
index d06d9d35ad5..43d47059fd0 100644
--- a/src/mame/audio/irem.cpp
+++ b/src/mame/audio/irem.cpp
@@ -16,7 +16,7 @@ const device_type IREM_M62_AUDIO = &device_creator<m62_audio_device>;
const device_type IREM_M52_SOUNDC_AUDIO = &device_creator<m52_soundc_audio_device>;
const device_type IREM_M52_LARGE_AUDIO = &device_creator<m52_large_audio_device>;
-irem_audio_device::irem_audio_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
+irem_audio_device::irem_audio_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
m_port1(0),
m_port2(0),
@@ -26,17 +26,17 @@ irem_audio_device::irem_audio_device(const machine_config &mconfig, device_type
{
}
-m62_audio_device::m62_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+m62_audio_device::m62_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: irem_audio_device(mconfig, IREM_M62_AUDIO, "Irem M62 Audio", tag, owner, clock, "irem_m62_audio", __FILE__)
{
}
-m52_soundc_audio_device::m52_soundc_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+m52_soundc_audio_device::m52_soundc_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: irem_audio_device(mconfig, IREM_M52_SOUNDC_AUDIO, "Irem M52 SoundC Audio", tag, owner, clock, "irem_m52_soundc_audio", __FILE__)
{
}
-m52_large_audio_device::m52_large_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+m52_large_audio_device::m52_large_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: irem_audio_device(mconfig, IREM_M52_LARGE_AUDIO, "Irem M52 Large Audio", tag, owner, clock, "irem_m52_large_audio", __FILE__)
{
}
diff --git a/src/mame/audio/irem.h b/src/mame/audio/irem.h
index 7e378e88b14..751ca58b96d 100644
--- a/src/mame/audio/irem.h
+++ b/src/mame/audio/irem.h
@@ -9,7 +9,7 @@
class irem_audio_device : public device_t
{
public:
- irem_audio_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
+ irem_audio_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source);
~irem_audio_device() {}
DECLARE_WRITE8_MEMBER( cmd_w );
@@ -34,8 +34,8 @@ protected:
private:
// internal state
- UINT8 m_port1;
- UINT8 m_port2;
+ uint8_t m_port1;
+ uint8_t m_port2;
required_device<generic_latch_8_device> m_soundlatch;
/* FIXME: using required / optional device would be better */
@@ -55,21 +55,21 @@ private:
class m62_audio_device : public irem_audio_device
{
public:
- m62_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ m62_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual machine_config_constructor device_mconfig_additions() const override;
};
class m52_soundc_audio_device : public irem_audio_device
{
public:
- m52_soundc_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ m52_soundc_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual machine_config_constructor device_mconfig_additions() const override;
};
class m52_large_audio_device : public irem_audio_device
{
public:
- m52_large_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ m52_large_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual machine_config_constructor device_mconfig_additions() const override;
};
diff --git a/src/mame/audio/jaguar.cpp b/src/mame/audio/jaguar.cpp
index 441e25fd236..dd82952658d 100644
--- a/src/mame/audio/jaguar.cpp
+++ b/src/mame/audio/jaguar.cpp
@@ -270,7 +270,7 @@ WRITE32_MEMBER( jaguar_state::dsp_flags_w )
/* see if we're going back to the spin loop */
if (!(data & 0x04000) && m_dsp->state_int(JAGUAR_R22) != 0)
{
- UINT32 r30 = m_dsp->state_int(JAGUAR_R30) & 0xffffff;
+ uint32_t r30 = m_dsp->state_int(JAGUAR_R30) & 0xffffff;
if (r30 >= 0xf1b124 && r30 <= 0xf1b126)
dsp_suspend();
}
diff --git a/src/mame/audio/leland.cpp b/src/mame/audio/leland.cpp
index 260e775df58..cb0a8a9766f 100644
--- a/src/mame/audio/leland.cpp
+++ b/src/mame/audio/leland.cpp
@@ -351,7 +351,7 @@ void leland_80186_sound_device::device_reset()
const device_type LELAND_80186 = &device_creator<leland_80186_sound_device>;
-leland_80186_sound_device::leland_80186_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+leland_80186_sound_device::leland_80186_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, LELAND_80186, "80186 DAC (Leland)", tag, owner, clock, "leland_80186_sound", __FILE__),
m_dac1(*this, "dac1"),
m_dac2(*this, "dac2"),
@@ -378,7 +378,7 @@ leland_80186_sound_device::leland_80186_sound_device(const machine_config &mconf
m_type = TYPE_LELAND;
}
-leland_80186_sound_device::leland_80186_sound_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
+leland_80186_sound_device::leland_80186_sound_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
m_dac1(*this, "dac1"),
m_dac2(*this, "dac2"),
@@ -406,7 +406,7 @@ leland_80186_sound_device::leland_80186_sound_device(const machine_config &mconf
const device_type REDLINE_80186 = &device_creator<redline_80186_sound_device>;
-redline_80186_sound_device::redline_80186_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+redline_80186_sound_device::redline_80186_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: leland_80186_sound_device(mconfig, REDLINE_80186, "80186 DAC (Redline Racer)", tag, owner, clock, "redline_80186_sound", __FILE__)
{
m_type = TYPE_REDLINE;
@@ -414,7 +414,7 @@ redline_80186_sound_device::redline_80186_sound_device(const machine_config &mco
const device_type ATAXX_80186 = &device_creator<ataxx_80186_sound_device>;
-ataxx_80186_sound_device::ataxx_80186_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ataxx_80186_sound_device::ataxx_80186_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: leland_80186_sound_device(mconfig, REDLINE_80186, "80186 DAC (Ataxx)", tag, owner, clock, "ataxx_80186_sound", __FILE__)
{
m_type = TYPE_ATAXX;
@@ -422,7 +422,7 @@ ataxx_80186_sound_device::ataxx_80186_sound_device(const machine_config &mconfig
const device_type WSF_80186 = &device_creator<wsf_80186_sound_device>;
-wsf_80186_sound_device::wsf_80186_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+wsf_80186_sound_device::wsf_80186_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: leland_80186_sound_device(mconfig, REDLINE_80186, "80186 DAC (WSF)", tag, owner, clock, "wsf_80186_sound", __FILE__)
{
m_type = TYPE_WSF;
@@ -438,7 +438,7 @@ WRITE16_MEMBER(leland_80186_sound_device::peripheral_ctrl)
case 4:
{
- UINT32 temp = (m_peripheral & 0xffc0) << 4;
+ uint32_t temp = (m_peripheral & 0xffc0) << 4;
if (data & 0x0040)
{
m_audiocpu->device_t::memory().space(AS_PROGRAM).install_readwrite_handler(temp, temp + 0x2ff, read16_delegate(FUNC(leland_80186_sound_device::peripheral_r), this), write16_delegate(FUNC(leland_80186_sound_device::peripheral_w), this));
diff --git a/src/mame/audio/lynx.cpp b/src/mame/audio/lynx.cpp
index 2d58677f373..fea3312516e 100644
--- a/src/mame/audio/lynx.cpp
+++ b/src/mame/audio/lynx.cpp
@@ -96,21 +96,21 @@ const device_type LYNX2_SND = &device_creator<lynx2_sound_device>;
// lynx_sound_device - constructor
//-------------------------------------------------
-lynx_sound_device::lynx_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+lynx_sound_device::lynx_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, LYNX_SND, "Mikey", tag, owner, clock, "lynx_sound", __FILE__),
device_sound_interface(mconfig, *this)
{
m_timer_delegate = lynx_sound_timer_delegate();
}
-lynx_sound_device::lynx_sound_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
+lynx_sound_device::lynx_sound_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_sound_interface(mconfig, *this)
{
}
-lynx2_sound_device::lynx2_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+lynx2_sound_device::lynx2_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: lynx_sound_device(mconfig, LYNX2_SND, "Mikey (Lynx II)", tag, owner, clock, "lynx2_sound", __FILE__)
{
}
@@ -250,7 +250,7 @@ void lynx_sound_device::count_down(int nr)
void lynx_sound_device::shift(int chan_nr)
{
- INT16 out_temp;
+ int16_t out_temp;
LYNX_AUDIO *channel;
assert(chan_nr < 4);
@@ -259,7 +259,7 @@ void lynx_sound_device::shift(int chan_nr)
//channel->shifter = ((channel->shifter<<1)&0xffe) | (m_shift_xor[ channel->shifter & channel->mask ]&1);
// alternative method (functionally the same as above)
- UINT8 xor_out = 0;
+ uint8_t xor_out = 0;
for (int bit = 0; bit < 12; bit++)
{
if ((channel->mask >> bit) & 1)
@@ -278,7 +278,7 @@ void lynx_sound_device::shift(int chan_nr)
// clipping
if (out_temp > 127) out_temp = 127;
if (out_temp < -128) out_temp = -128;
- channel->reg.output = (INT16)out_temp;
+ channel->reg.output = (int16_t)out_temp;
}
switch (chan_nr)
@@ -350,7 +350,7 @@ void lynx_sound_device::execute(int chan_nr)
READ8_MEMBER(lynx_sound_device::read)
{
- UINT8 value = 0;
+ uint8_t value = 0;
LYNX_AUDIO *channel = &m_audio[(offset >> 3) & 3];
m_mixer_channel->update();
diff --git a/src/mame/audio/lynx.h b/src/mame/audio/lynx.h
index 470db9cf8ca..534a3447954 100644
--- a/src/mame/audio/lynx.h
+++ b/src/mame/audio/lynx.h
@@ -6,18 +6,18 @@
struct LYNX_AUDIO {
struct {
- INT8 volume;
- UINT8 feedback;
- INT8 output;
- UINT8 shifter;
- UINT8 bakup;
- UINT8 control1;
- UINT8 counter;
- UINT8 control2;
+ int8_t volume;
+ uint8_t feedback;
+ int8_t output;
+ uint8_t shifter;
+ uint8_t bakup;
+ uint8_t control1;
+ uint8_t counter;
+ uint8_t control2;
} reg;
- UINT8 attenuation;
- UINT16 mask; // 12-bit
- UINT16 shifter; // 12-bit
+ uint8_t attenuation;
+ uint16_t mask; // 12-bit
+ uint16_t shifter; // 12-bit
float ticks;
int count;
};
@@ -29,8 +29,8 @@ class lynx_sound_device : public device_t,
public device_sound_interface
{
public:
- lynx_sound_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
- lynx_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ lynx_sound_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source);
+ lynx_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8_MEMBER(read);
DECLARE_WRITE8_MEMBER(write);
@@ -59,8 +59,8 @@ protected:
float m_usec_per_sample;
std::unique_ptr<int[]> m_shift_mask;
std::unique_ptr<int[]> m_shift_xor;
- UINT8 m_attenuation_enable;
- UINT8 m_master_enable;
+ uint8_t m_attenuation_enable;
+ uint8_t m_master_enable;
LYNX_AUDIO m_audio[4];
};
@@ -68,7 +68,7 @@ protected:
class lynx2_sound_device : public lynx_sound_device
{
public:
- lynx2_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ lynx2_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
// device-level overrides
diff --git a/src/mame/audio/m72.cpp b/src/mame/audio/m72.cpp
index 883fed63576..743f7c78d6b 100644
--- a/src/mame/audio/m72.cpp
+++ b/src/mame/audio/m72.cpp
@@ -48,7 +48,7 @@ Shisensho II 1993 Rev 3.34 M81 Yes
const device_type M72 = &device_creator<m72_audio_device>;
-m72_audio_device::m72_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+m72_audio_device::m72_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, M72, "Irem M72 Audio Custom", tag, owner, clock, "m72_audio", __FILE__)
, device_sound_interface(mconfig, *this)
, m_irqvector(0)
diff --git a/src/mame/audio/m72.h b/src/mame/audio/m72.h
index 9e6c241206c..4bce5234ac3 100644
--- a/src/mame/audio/m72.h
+++ b/src/mame/audio/m72.h
@@ -14,7 +14,7 @@ class m72_audio_device : public device_t,
public device_sound_interface
{
public:
- m72_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ m72_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~m72_audio_device() {}
enum
@@ -50,10 +50,10 @@ protected:
private:
// internal state
- UINT8 m_irqvector;
- UINT32 m_sample_addr;
- optional_region_ptr<UINT8> m_samples;
- UINT32 m_samples_size;
+ uint8_t m_irqvector;
+ uint32_t m_sample_addr;
+ optional_region_ptr<uint8_t> m_samples;
+ uint32_t m_samples_size;
address_space *m_space;
optional_device<dac_byte_interface> m_dac;
required_device<generic_latch_8_device> m_soundlatch;
diff --git a/src/mame/audio/mario.cpp b/src/mame/audio/mario.cpp
index 6e4d5722ec9..3e7e0d367a9 100644
--- a/src/mame/audio/mario.cpp
+++ b/src/mame/audio/mario.cpp
@@ -662,7 +662,7 @@ void mario_state::sound_start()
if (!audiocpu) return;
#if USE_8039
- UINT8 *SND = memregion("audiocpu")->base();
+ uint8_t *SND = memregion("audiocpu")->base();
SND[0x1001] = 0x01;
#endif
@@ -729,9 +729,9 @@ READ8_MEMBER(mario_state::mario_sh_t1_r)
READ8_MEMBER(mario_state::mario_sh_tune_r)
{
- UINT8 *SND = memregion("audiocpu")->base();
- UINT16 mask = memregion("audiocpu")->bytes()-1;
- UINT8 p2 = I8035_P2_R(space);
+ uint8_t *SND = memregion("audiocpu")->base();
+ uint16_t mask = memregion("audiocpu")->bytes()-1;
+ uint8_t p2 = I8035_P2_R(space);
if ((p2 >> 7) & 1)
return m_soundlatch->read(space, offset);
diff --git a/src/mame/audio/meadows.cpp b/src/mame/audio/meadows.cpp
index d4a72a027ad..be547a23978 100644
--- a/src/mame/audio/meadows.cpp
+++ b/src/mame/audio/meadows.cpp
@@ -24,7 +24,7 @@
#define ENABLE_DAC 0x04
#define ENABLE_CTR1 0x08
-static const INT16 waveform[2] = { -120*256, 120*256 };
+static const int16_t waveform[2] = { -120*256, 120*256 };
/************************************/
/* Sound handler start */
diff --git a/src/mame/audio/micro3d.cpp b/src/mame/audio/micro3d.cpp
index aeed7f03bdf..f462678f5d6 100644
--- a/src/mame/audio/micro3d.cpp
+++ b/src/mame/audio/micro3d.cpp
@@ -129,7 +129,7 @@ static void recompute_filter(lp_filter *iir, double k, double q, double fc)
iir->coef[0] = k;
}
-void micro3d_sound_device::noise_sh_w(UINT8 data)
+void micro3d_sound_device::noise_sh_w(uint8_t data)
{
micro3d_state *state = machine().driver_data<micro3d_state>();
@@ -167,7 +167,7 @@ void micro3d_sound_device::noise_sh_w(UINT8 data)
const device_type MICRO3D = &device_creator<micro3d_sound_device>;
-micro3d_sound_device::micro3d_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+micro3d_sound_device::micro3d_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, MICRO3D, "Microprose Audio Custom", tag, owner, clock, "micro3d_sound", __FILE__),
device_sound_interface(mconfig, *this),
m_gain(0),
@@ -177,7 +177,7 @@ micro3d_sound_device::micro3d_sound_device(const machine_config &mconfig, const
m_stream(nullptr)
{
- memset(m_dac, 0, sizeof(UINT8)*4);
+ memset(m_dac, 0, sizeof(uint8_t)*4);
}
//-------------------------------------------------
diff --git a/src/mame/audio/midway.cpp b/src/mame/audio/midway.cpp
index 5a9fbe6f802..f6f72684252 100644
--- a/src/mame/audio/midway.cpp
+++ b/src/mame/audio/midway.cpp
@@ -48,7 +48,7 @@ extern const device_type MIDWAY_SQUAWK_N_TALK = &device_creator<midway_squawk_n_
// midway_ssio_device - constructor
//-------------------------------------------------
-midway_ssio_device::midway_ssio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+midway_ssio_device::midway_ssio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, MIDWAY_SSIO, "Midway SSIO Sound Board", tag, owner, clock, "midssio", __FILE__),
device_mixer_interface(mconfig, *this, 2),
m_cpu(*this, "cpu"),
@@ -115,7 +115,7 @@ WRITE_LINE_MEMBER(midway_ssio_device::reset_write)
READ8_MEMBER(midway_ssio_device::ioport_read)
{
- UINT8 result = m_ports[offset].read_safe(0xff);
+ uint8_t result = m_ports[offset].read_safe(0xff);
if (!m_custom_input[offset].isnull())
result = (result & ~m_custom_input_mask[offset]) |
(m_custom_input[offset](space, offset, 0xff) & m_custom_input_mask[offset]);
@@ -141,7 +141,7 @@ WRITE8_MEMBER(midway_ssio_device::ioport_write)
// reader
//-------------------------------------------------
-void midway_ssio_device::set_custom_input(int which, UINT8 mask, read8_delegate handler)
+void midway_ssio_device::set_custom_input(int which, uint8_t mask, read8_delegate handler)
{
m_custom_input[which] = handler;
m_custom_input_mask[which] = mask;
@@ -153,7 +153,7 @@ void midway_ssio_device::set_custom_input(int which, UINT8 mask, read8_delegate
// writer
//-------------------------------------------------
-void midway_ssio_device::set_custom_output(int which, UINT8 mask, write8_delegate handler)
+void midway_ssio_device::set_custom_output(int which, uint8_t mask, write8_delegate handler)
{
m_custom_output[which/4] = handler;
m_custom_output_mask[which/4] = mask;
@@ -202,7 +202,7 @@ void midway_ssio_device::compute_ay8910_modulation()
//
// loop over all possible values of the duty cycle
- UINT8 *prom = memregion("proms")->base();
+ uint8_t *prom = memregion("proms")->base();
for (int volval = 0; volval < 16; volval++)
{
// loop over all the clocks until we run out; look up in the PROM
@@ -491,7 +491,7 @@ void midway_ssio_device::device_timer(emu_timer &timer, device_timer_id id, int
// midway_chip_squeak_deluxe_device - constructor
//-------------------------------------------------
-midway_chip_squeak_deluxe_device::midway_chip_squeak_deluxe_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+midway_chip_squeak_deluxe_device::midway_chip_squeak_deluxe_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, MIDWAY_CHIP_SQUEAK_DELUXE, "Midway Chip Squeak Deluxe Sound Board", tag, owner, clock, "midcsd", __FILE__),
device_mixer_interface(mconfig, *this),
m_cpu(*this, "cpu"),
@@ -554,7 +554,7 @@ WRITE8_MEMBER(midway_chip_squeak_deluxe_device::portb_w)
m_dacval = (m_dacval & ~3) | (data >> 6);
m_dac->write(m_dacval);
- UINT8 z_mask = m_pia->port_b_z_mask();
+ uint8_t z_mask = m_pia->port_b_z_mask();
if (~z_mask & 0x10) m_status = (m_status & ~1) | ((data >> 4) & 1);
if (~z_mask & 0x20) m_status = (m_status & ~2) | ((data >> 4) & 2);
}
@@ -690,7 +690,7 @@ void midway_chip_squeak_deluxe_device::device_timer(emu_timer &timer, device_tim
// midway_sounds_good_device - constructor
//-------------------------------------------------
-midway_sounds_good_device::midway_sounds_good_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+midway_sounds_good_device::midway_sounds_good_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, MIDWAY_SOUNDS_GOOD, "Midway Sounds Good Sound Board", tag, owner, clock, "midsg", __FILE__),
device_mixer_interface(mconfig, *this),
m_cpu(*this, "cpu"),
@@ -751,7 +751,7 @@ WRITE8_MEMBER(midway_sounds_good_device::porta_w)
WRITE8_MEMBER(midway_sounds_good_device::portb_w)
{
- UINT8 z_mask = m_pia->port_b_z_mask();
+ uint8_t z_mask = m_pia->port_b_z_mask();
m_dacval = (m_dacval & ~3) | (data >> 6);
m_dac->write(m_dacval);
@@ -861,7 +861,7 @@ void midway_sounds_good_device::device_timer(emu_timer &timer, device_timer_id i
// midway_turbo_chip_squeak_device - constructor
//-------------------------------------------------
-midway_turbo_chip_squeak_device::midway_turbo_chip_squeak_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+midway_turbo_chip_squeak_device::midway_turbo_chip_squeak_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, MIDWAY_TURBO_CHIP_SQUEAK, "Midway Turbo Chip Squeak Sound Board", tag, owner, clock, "midtcs", __FILE__),
device_mixer_interface(mconfig, *this),
m_cpu(*this, "cpu"),
@@ -1025,7 +1025,7 @@ void midway_turbo_chip_squeak_device::device_timer(emu_timer &timer, device_time
// midway_squawk_n_talk_device - constructor
//-------------------------------------------------
-midway_squawk_n_talk_device::midway_squawk_n_talk_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+midway_squawk_n_talk_device::midway_squawk_n_talk_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, MIDWAY_SQUAWK_N_TALK, "Midway Squawk 'n' Talk Sound Board", tag, owner, clock, "midsnt", __FILE__),
device_mixer_interface(mconfig, *this),
m_cpu(*this, "cpu"),
diff --git a/src/mame/audio/midway.h b/src/mame/audio/midway.h
index b6956b99b82..e248a75bb4b 100644
--- a/src/mame/audio/midway.h
+++ b/src/mame/audio/midway.h
@@ -46,7 +46,7 @@ class midway_ssio_device : public device_t,
{
public:
// construction/destruction
- midway_ssio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ midway_ssio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// read/write
DECLARE_READ8_MEMBER(read);
@@ -56,8 +56,8 @@ public:
DECLARE_WRITE8_MEMBER(ioport_write);
// configuration
- void set_custom_input(int which, UINT8 mask, read8_delegate handler);
- void set_custom_output(int which, UINT8 mask, write8_delegate handler);
+ void set_custom_input(int which, uint8_t mask, read8_delegate handler);
+ void set_custom_output(int which, uint8_t mask, write8_delegate handler);
// internal communications
INTERRUPT_GEN_MEMBER(clock_14024);
@@ -92,18 +92,18 @@ private:
optional_ioport_array<5> m_ports;
// internal state
- UINT8 m_data[4];
- UINT8 m_status;
- UINT8 m_14024_count;
- UINT8 m_mute;
- UINT8 m_overall[2];
- UINT8 m_duty_cycle[2][3];
- UINT8 m_ayvolume_lookup[16];
+ uint8_t m_data[4];
+ uint8_t m_status;
+ uint8_t m_14024_count;
+ uint8_t m_mute;
+ uint8_t m_overall[2];
+ uint8_t m_duty_cycle[2][3];
+ uint8_t m_ayvolume_lookup[16];
// I/O port overrides
- UINT8 m_custom_input_mask[5];
+ uint8_t m_custom_input_mask[5];
read8_delegate m_custom_input[5];
- UINT8 m_custom_output_mask[2];
+ uint8_t m_custom_output_mask[2];
write8_delegate m_custom_output[2];
};
@@ -115,7 +115,7 @@ class midway_chip_squeak_deluxe_device : public device_t,
{
public:
// construction/destruction
- midway_chip_squeak_deluxe_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ midway_chip_squeak_deluxe_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// read/write
DECLARE_READ8_MEMBER(read);
@@ -143,8 +143,8 @@ private:
required_device<dac_word_interface> m_dac;
// internal state
- UINT8 m_status;
- UINT16 m_dacval;
+ uint8_t m_status;
+ uint16_t m_dacval;
};
@@ -155,7 +155,7 @@ class midway_sounds_good_device : public device_t,
{
public:
// construction/destruction
- midway_sounds_good_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ midway_sounds_good_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// read/write
DECLARE_READ8_MEMBER(read);
@@ -181,8 +181,8 @@ private:
required_device<dac_word_interface> m_dac;
// internal state
- UINT8 m_status;
- UINT16 m_dacval;
+ uint8_t m_status;
+ uint16_t m_dacval;
};
@@ -193,7 +193,7 @@ class midway_turbo_chip_squeak_device : public device_t,
{
public:
// construction/destruction
- midway_turbo_chip_squeak_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ midway_turbo_chip_squeak_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// read/write
DECLARE_READ8_MEMBER(read);
@@ -219,8 +219,8 @@ private:
required_device<dac_word_interface> m_dac;
// internal state
- UINT8 m_status;
- UINT16 m_dacval;
+ uint8_t m_status;
+ uint16_t m_dacval;
};
@@ -231,7 +231,7 @@ class midway_squawk_n_talk_device : public device_t,
{
public:
// construction/destruction
- midway_squawk_n_talk_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ midway_squawk_n_talk_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// read/write
DECLARE_WRITE8_MEMBER(write);
@@ -259,8 +259,8 @@ private:
optional_device<tms5200_device> m_tms5200;
// internal state
- UINT8 m_tms_command;
- UINT8 m_tms_strobes;
+ uint8_t m_tms_command;
+ uint8_t m_tms_strobes;
};
diff --git a/src/mame/audio/mw8080bw.cpp b/src/mame/audio/mw8080bw.cpp
index 05dc3ebb27e..db0807bb522 100644
--- a/src/mame/audio/mw8080bw.cpp
+++ b/src/mame/audio/mw8080bw.cpp
@@ -156,7 +156,7 @@ MACHINE_CONFIG_END
WRITE8_MEMBER(mw8080bw_state::seawolf_audio_w)
{
- UINT8 rising_bits = data & ~m_port_1_last;
+ uint8_t rising_bits = data & ~m_port_1_last;
/* if (data & 0x01) enable SHIP HIT sound */
if (rising_bits & 0x01) m_samples->start(0, 0);
@@ -560,7 +560,7 @@ MACHINE_CONFIG_FRAGMENT( maze_audio )
MACHINE_CONFIG_END
-void mw8080bw_state::maze_write_discrete(UINT8 maze_tone_timing_state)
+void mw8080bw_state::maze_write_discrete(uint8_t maze_tone_timing_state)
{
/* controls need to be active low */
int controls = ~ioport("IN0")->read() & 0xff;
@@ -1569,7 +1569,7 @@ WRITE8_MEMBER(mw8080bw_state::gmissile_audio_1_w)
reversed (D5=R, D7=L), but the software confirms that
ours is right */
- UINT8 rising_bits = data & ~m_port_1_last;
+ uint8_t rising_bits = data & ~m_port_1_last;
/* D0 and D1 are not connected */
@@ -1658,7 +1658,7 @@ MACHINE_CONFIG_END
WRITE8_MEMBER(mw8080bw_state::m4_audio_1_w)
{
- UINT8 rising_bits = data & ~m_port_1_last;
+ uint8_t rising_bits = data & ~m_port_1_last;
/* D0 and D1 are not connected */
@@ -1684,7 +1684,7 @@ WRITE8_MEMBER(mw8080bw_state::m4_audio_1_w)
WRITE8_MEMBER(mw8080bw_state::m4_audio_2_w)
{
- UINT8 rising_bits = data & ~m_port_2_last;
+ uint8_t rising_bits = data & ~m_port_2_last;
/* if (data & 0x01) enable LEFT PLAYER EXPLOSION sound via 510K res (goes to left speaker) */
if (rising_bits & 0x01) m_samples1->start(1, 1);
@@ -1922,7 +1922,7 @@ WRITE8_MEMBER(mw8080bw_state::clowns_audio_1_w)
WRITE8_MEMBER(mw8080bw_state::clowns_audio_2_w)
{
- UINT8 rising_bits = data & ~m_port_2_last;
+ uint8_t rising_bits = data & ~m_port_2_last;
m_discrete->write(space, CLOWNS_POP_BOTTOM_EN, (data >> 0) & 0x01);
@@ -3280,7 +3280,7 @@ MACHINE_CONFIG_END
WRITE8_MEMBER(mw8080bw_state::phantom2_audio_1_w)
{
- UINT8 rising_bits = data & ~m_port_1_last;
+ uint8_t rising_bits = data & ~m_port_1_last;
/* if (data & 0x01) enable PLAYER SHOT sound */
if (rising_bits & 0x01) m_samples->start(0, 0);
@@ -3302,7 +3302,7 @@ WRITE8_MEMBER(mw8080bw_state::phantom2_audio_1_w)
WRITE8_MEMBER(mw8080bw_state::phantom2_audio_2_w)
{
- UINT8 rising_bits = data & ~m_port_2_last;
+ uint8_t rising_bits = data & ~m_port_2_last;
/* D0-D2 are not connected */
diff --git a/src/mame/audio/n8080.cpp b/src/mame/audio/n8080.cpp
index b4b094c6c2c..9877faaa9ef 100644
--- a/src/mame/audio/n8080.cpp
+++ b/src/mame/audio/n8080.cpp
@@ -105,7 +105,7 @@ TIMER_CALLBACK_MEMBER( n8080_state::stop_mono_flop_callback )
void n8080_state::spacefev_sound_pins_changed()
{
- UINT16 changes = ~m_curr_sound_pins & m_prev_sound_pins;
+ uint16_t changes = ~m_curr_sound_pins & m_prev_sound_pins;
if (changes & (1 << 0x3))
{
@@ -136,7 +136,7 @@ void n8080_state::spacefev_sound_pins_changed()
void n8080_state::sheriff_sound_pins_changed()
{
- UINT16 changes = ~m_curr_sound_pins & m_prev_sound_pins;
+ uint16_t changes = ~m_curr_sound_pins & m_prev_sound_pins;
if (changes & (1 << 0x6))
{
@@ -159,7 +159,7 @@ void n8080_state::sheriff_sound_pins_changed()
void n8080_state::helifire_sound_pins_changed()
{
- UINT16 changes = ~m_curr_sound_pins & m_prev_sound_pins;
+ uint16_t changes = ~m_curr_sound_pins & m_prev_sound_pins;
/* ((m_curr_sound_pins >> 0xa) & 1) not emulated */
/* ((m_curr_sound_pins >> 0xb) & 1) not emulated */
@@ -269,7 +269,7 @@ WRITE8_MEMBER(n8080_state::n8080_sound_2_w)
READ8_MEMBER(n8080_state::n8080_8035_p1_r)
{
- UINT8 val = 0;
+ uint8_t val = 0;
if ((m_curr_sound_pins >> 0xb) & 1) val |= 0x01;
if ((m_curr_sound_pins >> 0xa) & 1) val |= 0x02;
@@ -306,7 +306,7 @@ READ8_MEMBER(n8080_state::helifire_8035_t1_r)
READ8_MEMBER(n8080_state::helifire_8035_external_ram_r)
{
- UINT8 val = 0;
+ uint8_t val = 0;
if ((m_curr_sound_pins >> 0x7) & 1) val |= 0x01;
if ((m_curr_sound_pins >> 0x8) & 1) val |= 0x02;
diff --git a/src/mame/audio/namco52.cpp b/src/mame/audio/namco52.cpp
index 8ebddab75dc..872e9a9d741 100644
--- a/src/mame/audio/namco52.cpp
+++ b/src/mame/audio/namco52.cpp
@@ -159,7 +159,7 @@ ROM_END
const device_type NAMCO_52XX = &device_creator<namco_52xx_device>;
-namco_52xx_device::namco_52xx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+namco_52xx_device::namco_52xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, NAMCO_52XX, "Namco 52xx", tag, owner, clock, "namco52", __FILE__),
m_cpu(*this, "mcu"),
m_discrete(*this, finder_base::DUMMY_TAG),
diff --git a/src/mame/audio/namco52.h b/src/mame/audio/namco52.h
index b9cd4d240cc..5ec24260315 100644
--- a/src/mame/audio/namco52.h
+++ b/src/mame/audio/namco52.h
@@ -28,7 +28,7 @@
class namco_52xx_device : public device_t
{
public:
- namco_52xx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ namco_52xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void set_discrete(device_t &device, const char *tag) { downcast<namco_52xx_device &>(device).m_discrete.set_tag(tag); }
static void set_basenote(device_t &device, int node) { downcast<namco_52xx_device &>(device).m_basenode = node; }
@@ -66,8 +66,8 @@ private:
devcb_read8 m_romread;
devcb_read8 m_si;
- UINT8 m_latched_cmd;
- UINT32 m_address;
+ uint8_t m_latched_cmd;
+ uint32_t m_address;
};
extern const device_type NAMCO_52XX;
diff --git a/src/mame/audio/namco54.cpp b/src/mame/audio/namco54.cpp
index e0772c2f2fe..c4176c83e28 100644
--- a/src/mame/audio/namco54.cpp
+++ b/src/mame/audio/namco54.cpp
@@ -69,7 +69,7 @@ READ8_MEMBER( namco_54xx_device::R0_r )
WRITE8_MEMBER( namco_54xx_device::O_w )
{
- UINT8 out = (data & 0x0f);
+ uint8_t out = (data & 0x0f);
if (data & 0x10)
m_discrete->write(space, NAMCO_54XX_1_DATA(m_basenode), out);
else
@@ -78,7 +78,7 @@ WRITE8_MEMBER( namco_54xx_device::O_w )
WRITE8_MEMBER( namco_54xx_device::R1_w )
{
- UINT8 out = (data & 0x0f);
+ uint8_t out = (data & 0x0f);
m_discrete->write(space, NAMCO_54XX_2_DATA(m_basenode), out);
}
@@ -130,7 +130,7 @@ ROM_END
const device_type NAMCO_54XX = &device_creator<namco_54xx_device>;
-namco_54xx_device::namco_54xx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+namco_54xx_device::namco_54xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, NAMCO_54XX, "Namco 54xx", tag, owner, clock, "namco54", __FILE__),
m_cpu(*this, "mcu"),
m_discrete(*this, finder_base::DUMMY_TAG),
diff --git a/src/mame/audio/namco54.h b/src/mame/audio/namco54.h
index d72547452d9..bdfe8b7e519 100644
--- a/src/mame/audio/namco54.h
+++ b/src/mame/audio/namco54.h
@@ -20,7 +20,7 @@
class namco_54xx_device : public device_t
{
public:
- namco_54xx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ namco_54xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void set_discrete(device_t &device, const char *tag) { downcast<namco_54xx_device &>(device).m_discrete.set_tag(tag); }
static void set_basenote(device_t &device, int node) { downcast<namco_54xx_device &>(device).m_basenode = node; }
@@ -45,7 +45,7 @@ private:
required_device<discrete_device> m_discrete;
int m_basenode;
- UINT8 m_latched_cmd;
+ uint8_t m_latched_cmd;
};
extern const device_type NAMCO_54XX;
diff --git a/src/mame/audio/phoenix.cpp b/src/mame/audio/phoenix.cpp
index 3bcd72661ea..28ec0574f69 100644
--- a/src/mame/audio/phoenix.cpp
+++ b/src/mame/audio/phoenix.cpp
@@ -50,7 +50,7 @@
const device_type PHOENIX = &device_creator<phoenix_sound_device>;
-phoenix_sound_device::phoenix_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+phoenix_sound_device::phoenix_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, PHOENIX, "Phoenix Audio Custom", tag, owner, clock, "phoenix_sound", __FILE__),
device_sound_interface(mconfig, *this)
{
@@ -73,7 +73,7 @@ void phoenix_sound_device::device_config_complete()
void phoenix_sound_device::device_start()
{
int i, j;
- UINT32 shiftreg;
+ uint32_t shiftreg;
m_sound_latch_a = 0;
memset(&m_c24_state, 0, sizeof(m_c24_state));
@@ -83,12 +83,12 @@ void phoenix_sound_device::device_start()
m_discrete = machine().device<discrete_device>("discrete");
m_tms = machine().device<tms36xx_device>("tms");
- m_poly18 = std::make_unique<UINT32[]>(1ul << (18-5));
+ m_poly18 = std::make_unique<uint32_t[]>(1ul << (18-5));
shiftreg = 0;
for( i = 0; i < (1ul << (18-5)); i++ )
{
- UINT32 bits = 0;
+ uint32_t bits = 0;
for( j = 0; j < 32; j++ )
{
bits = (bits >> 1) | (shiftreg << 31);
diff --git a/src/mame/audio/pleiads.cpp b/src/mame/audio/pleiads.cpp
index b838998c971..a425d8bf7ee 100644
--- a/src/mame/audio/pleiads.cpp
+++ b/src/mame/audio/pleiads.cpp
@@ -20,13 +20,13 @@
const device_type PLEIADS = &device_creator<pleiads_sound_device>;
-pleiads_sound_device::pleiads_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+pleiads_sound_device::pleiads_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, PLEIADS, "Pleiads Audio Custom", tag, owner, clock, "pleiads_sound", __FILE__),
device_sound_interface(mconfig, *this)
{
}
-pleiads_sound_device::pleiads_sound_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
+pleiads_sound_device::pleiads_sound_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_sound_interface(mconfig, *this),
m_channel(nullptr),
@@ -119,7 +119,7 @@ void pleiads_sound_device::device_start()
const device_type NAUGHTYB = &device_creator<naughtyb_sound_device>;
-naughtyb_sound_device::naughtyb_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+naughtyb_sound_device::naughtyb_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: pleiads_sound_device(mconfig, NAUGHTYB, "Naughty Boy Audio Custom", tag, owner, clock, "naughtyb_sound", __FILE__)
{
}
@@ -197,7 +197,7 @@ void naughtyb_sound_device::device_start()
const device_type POPFLAME = &device_creator<popflame_sound_device>;
-popflame_sound_device::popflame_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+popflame_sound_device::popflame_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: pleiads_sound_device(mconfig, POPFLAME, "Pop Flamer Audio Custom", tag, owner, clock, "popflame_sound", __FILE__)
{
}
@@ -649,16 +649,16 @@ WRITE8_MEMBER( pleiads_sound_device::control_c_w )
void pleiads_sound_device::common_start()
{
int i, j;
- UINT32 shiftreg;
+ uint32_t shiftreg;
m_tms = machine().device<tms36xx_device>("tms");
m_pc4.level = PC4_MIN;
- m_poly18 = make_unique_clear<UINT32[]>(1ul << (18-5));
+ m_poly18 = make_unique_clear<uint32_t[]>(1ul << (18-5));
shiftreg = 0;
for( i = 0; i < (1ul << (18-5)); i++ )
{
- UINT32 bits = 0;
+ uint32_t bits = 0;
for( j = 0; j < 32; j++ )
{
bits = (bits >> 1) | (shiftreg << 31);
diff --git a/src/mame/audio/pleiads.h b/src/mame/audio/pleiads.h
index e47b1b8e659..4fa293d33c8 100644
--- a/src/mame/audio/pleiads.h
+++ b/src/mame/audio/pleiads.h
@@ -44,8 +44,8 @@ class pleiads_sound_device : public device_t,
public device_sound_interface
{
public:
- pleiads_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- pleiads_sound_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
+ pleiads_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ pleiads_sound_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source);
~pleiads_sound_device() {}
DECLARE_WRITE8_MEMBER( control_a_w );
@@ -79,7 +79,7 @@ protected:
int m_sound_latch_b;
int m_sound_latch_c; /* part of the videoreg_w latch */
- std::unique_ptr<UINT32[]> m_poly18;
+ std::unique_ptr<uint32_t[]> m_poly18;
int m_polybit;
pl_t_state m_tone1;
@@ -106,7 +106,7 @@ extern const device_type PLEIADS;
class naughtyb_sound_device : public pleiads_sound_device
{
public:
- naughtyb_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ naughtyb_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
// device-level overrides
virtual void device_config_complete() override;
@@ -123,7 +123,7 @@ extern const device_type NAUGHTYB;
class popflame_sound_device : public pleiads_sound_device
{
public:
- popflame_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ popflame_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
// device-level overrides
virtual void device_config_complete() override;
diff --git a/src/mame/audio/polepos.cpp b/src/mame/audio/polepos.cpp
index ffedee5c283..c1f05b30443 100644
--- a/src/mame/audio/polepos.cpp
+++ b/src/mame/audio/polepos.cpp
@@ -224,7 +224,7 @@ const device_type POLEPOS = &device_creator<polepos_sound_device>;
// polepos_sound_device - constructor
//-------------------------------------------------
-polepos_sound_device::polepos_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+polepos_sound_device::polepos_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, POLEPOS, "Pole Position Audio Custom", tag, owner, clock, "polepos_sound", __FILE__),
device_sound_interface(mconfig, *this),
m_current_position(0),
@@ -275,8 +275,8 @@ void polepos_sound_device::device_reset()
void polepos_sound_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
{
- UINT32 step, clock, slot;
- UINT8 *base;
+ uint32_t step, clock, slot;
+ uint8_t *base;
double volume, i_total;
stream_sample_t *buffer = outputs[0];
int loop;
diff --git a/src/mame/audio/redbaron.cpp b/src/mame/audio/redbaron.cpp
index b8f71f1d5f2..9470b6495cd 100644
--- a/src/mame/audio/redbaron.cpp
+++ b/src/mame/audio/redbaron.cpp
@@ -35,7 +35,7 @@ const device_type REDBARON = &device_creator<redbaron_sound_device>;
// redbaron_sound_device - constructor
//-------------------------------------------------
-redbaron_sound_device::redbaron_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+redbaron_sound_device::redbaron_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, REDBARON, "Red Baron Audio Custom", tag, owner, clock, "redbaron_custom", __FILE__),
device_sound_interface(mconfig, *this),
m_vol_lookup(nullptr),
@@ -53,7 +53,7 @@ redbaron_sound_device::redbaron_sound_device(const machine_config &mconfig, cons
m_squeal_on_counter(0),
m_squeal_out(0)
{
- memset(m_vol_crash, 0, sizeof(INT16)*16);
+ memset(m_vol_crash, 0, sizeof(int16_t)*16);
}
@@ -65,9 +65,9 @@ void redbaron_sound_device::device_start()
{
int i;
- m_vol_lookup = std::make_unique<INT16[]>(32768);
+ m_vol_lookup = std::make_unique<int16_t[]>(32768);
for( i = 0; i < 0x8000; i++ )
- m_vol_lookup[0x7fff-i] = (INT16) (0x7fff/exp(1.0*i/4096));
+ m_vol_lookup[0x7fff-i] = (int16_t) (0x7fff/exp(1.0*i/4096));
for( i = 0; i < 16; i++ )
{
diff --git a/src/mame/audio/redbaron.h b/src/mame/audio/redbaron.h
index b7d11ae2ab7..03ac07b535b 100644
--- a/src/mame/audio/redbaron.h
+++ b/src/mame/audio/redbaron.h
@@ -10,7 +10,7 @@ class redbaron_sound_device : public device_t,
public device_sound_interface
{
public:
- redbaron_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ redbaron_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_WRITE8_MEMBER( sounds_w );
@@ -22,9 +22,9 @@ protected:
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
private:
- std::unique_ptr<INT16[]> m_vol_lookup;
+ std::unique_ptr<int16_t[]> m_vol_lookup;
- INT16 m_vol_crash[16];
+ int16_t m_vol_crash[16];
sound_stream *m_channel;
int m_latch;
diff --git a/src/mame/audio/s11c_bg.cpp b/src/mame/audio/s11c_bg.cpp
index a700e188aa2..2b9f36c2b63 100644
--- a/src/mame/audio/s11c_bg.cpp
+++ b/src/mame/audio/s11c_bg.cpp
@@ -14,7 +14,7 @@
const device_type S11C_BG = &device_creator<s11c_bg_device>;
-s11c_bg_device::s11c_bg_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+s11c_bg_device::s11c_bg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig,S11C_BG,"Williams System 11C Background Music",tag,owner,clock, "s11c_bg", __FILE__),
device_mixer_interface(mconfig, *this),
m_cpu(*this,"bgcpu"),
@@ -51,12 +51,12 @@ WRITE_LINE_MEMBER( s11c_bg_device::pia40_ca2_w)
m_ym2151->reset();
}
-void s11c_bg_device::ctrl_w(UINT8 data)
+void s11c_bg_device::ctrl_w(uint8_t data)
{
m_pia40->cb1_w(data);
}
-void s11c_bg_device::data_w(UINT8 data)
+void s11c_bg_device::data_w(uint8_t data)
{
m_pia40->portb_w(data);
}
@@ -97,7 +97,7 @@ void s11c_bg_device::device_start()
void s11c_bg_device::device_reset()
{
- UINT8* ROM;
+ uint8_t* ROM;
m_rom = memregion(m_regiontag);
ROM = m_rom->base();
@@ -135,6 +135,6 @@ WRITE8_MEMBER( s11c_bg_device::bg_speech_digit_w )
WRITE8_MEMBER( s11c_bg_device::bgbank_w )
{
- UINT8 bank = ((data & 0x04) >> 2) | ((data & 0x03) << 1);
+ uint8_t bank = ((data & 0x04) >> 2) | ((data & 0x03) << 1);
m_cpubank->set_entry(bank);
}
diff --git a/src/mame/audio/s11c_bg.h b/src/mame/audio/s11c_bg.h
index 211a88c23e5..3b0dd5aae32 100644
--- a/src/mame/audio/s11c_bg.h
+++ b/src/mame/audio/s11c_bg.h
@@ -25,7 +25,7 @@ class s11c_bg_device : public device_t,
{
public:
// construction/destruction
- s11c_bg_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ s11c_bg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
required_device<cpu_device> m_cpu;
required_device<ym2151_device> m_ym2151;
@@ -41,8 +41,8 @@ public:
DECLARE_WRITE8_MEMBER(bg_speech_digit_w);
DECLARE_WRITE8_MEMBER(bgbank_w);
DECLARE_WRITE_LINE_MEMBER(ym2151_irq_w);
- void ctrl_w(UINT8 data);
- void data_w(UINT8 data);
+ void ctrl_w(uint8_t data);
+ void data_w(uint8_t data);
static void static_set_romregion(device_t &device, const char *tag);
diff --git a/src/mame/audio/segag80r.cpp b/src/mame/audio/segag80r.cpp
index 05680d2adb8..f048cb36a53 100644
--- a/src/mame/audio/segag80r.cpp
+++ b/src/mame/audio/segag80r.cpp
@@ -31,7 +31,7 @@
const device_type SEGA005 = &device_creator<sega005_sound_device>;
-sega005_sound_device::sega005_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+sega005_sound_device::sega005_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, SEGA005, "Sega 005 Audio Custom", tag, owner, clock, "sega005_sound", __FILE__),
device_sound_interface(mconfig, *this),
m_sega005_sound_timer(nullptr),
@@ -75,7 +75,7 @@ void sega005_sound_device::device_start()
void sega005_sound_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
{
segag80r_state *state = machine().driver_data<segag80r_state>();
- const UINT8 *sound_prom = state->memregion("proms")->base();
+ const uint8_t *sound_prom = state->memregion("proms")->base();
int i;
/* no implementation yet */
@@ -264,7 +264,7 @@ WRITE8_MEMBER(segag80r_state::astrob_sound_w)
};
float freq_factor;
- UINT8 diff = data ^ m_sound_state[offset];
+ uint8_t diff = data ^ m_sound_state[offset];
m_sound_state[offset] = data;
switch (offset)
@@ -453,7 +453,7 @@ MACHINE_CONFIG_END
WRITE8_MEMBER(segag80r_state::sega005_sound_a_w)
{
- UINT8 diff = data ^ m_sound_state[0];
+ uint8_t diff = data ^ m_sound_state[0];
m_sound_state[0] = data;
/* LARGE EXPL: channel 0 */
@@ -483,8 +483,8 @@ WRITE8_MEMBER(segag80r_state::sega005_sound_a_w)
inline void segag80r_state::sega005_update_sound_data()
{
- UINT8 newval = memregion("005")->base()[m_sound_addr];
- UINT8 diff = newval ^ m_sound_data;
+ uint8_t newval = memregion("005")->base()[m_sound_addr];
+ uint8_t diff = newval ^ m_sound_data;
//osd_printf_debug(" [%03X] = %02X\n", m_sound_addr, newval);
@@ -515,7 +515,7 @@ WRITE8_MEMBER(segag80r_state::sega005_sound_b_w)
D4: 1 = hold/reset address counter to 0
D3-D0: upper 4 bits of ROM address
*/
- UINT8 diff = data ^ m_sound_state[1];
+ uint8_t diff = data ^ m_sound_state[1];
m_sound_state[1] = data;
//osd_printf_debug("sound[%d] = %02X\n", 1, data);
@@ -608,7 +608,7 @@ MACHINE_CONFIG_END
WRITE8_MEMBER(segag80r_state::spaceod_sound_w)
{
- UINT8 diff = data ^ m_sound_state[offset];
+ uint8_t diff = data ^ m_sound_state[offset];
m_sound_state[offset] = data;
switch (offset)
@@ -764,7 +764,7 @@ WRITE8_MEMBER(segag80r_state::monsterb_sound_a_w)
WRITE8_MEMBER(segag80r_state::monsterb_sound_b_w)
{
- UINT8 diff = data ^ m_sound_state[1];
+ uint8_t diff = data ^ m_sound_state[1];
m_sound_state[1] = data;
/* SHOT: channel 0 */
diff --git a/src/mame/audio/segam1audio.cpp b/src/mame/audio/segam1audio.cpp
index 6f4f9fdd385..925db00dd24 100644
--- a/src/mame/audio/segam1audio.cpp
+++ b/src/mame/audio/segam1audio.cpp
@@ -82,7 +82,7 @@ machine_config_constructor segam1audio_device::device_mconfig_additions() const
// segam1audio_device - constructor
//-------------------------------------------------
-segam1audio_device::segam1audio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+segam1audio_device::segam1audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, SEGAM1AUDIO, "Sega Model 1 Sound Board", tag, owner, clock, "segam1audio", __FILE__),
m_audiocpu(*this, M68000_TAG),
m_multipcm_1(*this, MULTIPCM_1_TAG),
@@ -114,7 +114,7 @@ void segam1audio_device::device_reset()
READ16_MEMBER(segam1audio_device::m1_snd_68k_latch_r)
{
- UINT16 retval;
+ uint16_t retval;
retval = m_to_68k[m_fifo_rptr];
@@ -168,7 +168,7 @@ void segam1audio_device::check_fifo_irq()
}
}
-void segam1audio_device::write_fifo(UINT8 data)
+void segam1audio_device::write_fifo(uint8_t data)
{
m_to_68k[m_fifo_wptr] = data;
m_fifo_wptr++;
diff --git a/src/mame/audio/segam1audio.h b/src/mame/audio/segam1audio.h
index 9cba756c5e2..a3d17e4e447 100644
--- a/src/mame/audio/segam1audio.h
+++ b/src/mame/audio/segam1audio.h
@@ -26,7 +26,7 @@ class segam1audio_device : public device_t
{
public:
// construction/destruction
- segam1audio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ segam1audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const override;
@@ -45,7 +45,7 @@ public:
DECLARE_READ16_MEMBER(ready_r);
void check_fifo_irq();
- void write_fifo(UINT8 data);
+ void write_fifo(uint8_t data);
protected:
// device-level overrides
diff --git a/src/mame/audio/segasnd.cpp b/src/mame/audio/segasnd.cpp
index 2fca18abd9b..a5ecb0ecea6 100644
--- a/src/mame/audio/segasnd.cpp
+++ b/src/mame/audio/segasnd.cpp
@@ -66,7 +66,7 @@ static inline double step_cr_filter(g80_filter_state *state, double input)
const device_type SEGASPEECH = &device_creator<speech_sound_device>;
-speech_sound_device::speech_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+speech_sound_device::speech_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, SEGASPEECH, "Sega Speech Sound Board", tag, owner, clock, "sega_speech_sound", __FILE__),
device_sound_interface(mconfig, *this),
m_drq(0),
@@ -155,7 +155,7 @@ WRITE_LINE_MEMBER(speech_sound_device::drq_w)
TIMER_CALLBACK_MEMBER( speech_sound_device::delayed_speech_w )
{
int data = param;
- UINT8 old = m_latch;
+ uint8_t old = m_latch;
/* all 8 bits are latched */
m_latch = data;
@@ -239,7 +239,7 @@ MACHINE_CONFIG_END
const device_type SEGAUSB = &device_creator<usb_sound_device>;
-usb_sound_device::usb_sound_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
+usb_sound_device::usb_sound_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_sound_interface(mconfig, *this),
m_ourcpu(*this, "ourcpu"),
@@ -258,7 +258,7 @@ usb_sound_device::usb_sound_device(const machine_config &mconfig, device_type ty
{
}
-usb_sound_device::usb_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+usb_sound_device::usb_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, SEGAUSB, "Sega Universal Sound Board", tag, owner, clock, "segausb", __FILE__),
device_sound_interface(mconfig, *this),
m_ourcpu(*this, "ourcpu"),
@@ -468,7 +468,7 @@ WRITE8_MEMBER( usb_sound_device::p1_w )
WRITE8_MEMBER( usb_sound_device::p2_w )
{
- UINT8 old = m_last_p2_value;
+ uint8_t old = m_last_p2_value;
m_last_p2_value = data;
/* low 2 bits control the bank of work RAM we are addressing */
@@ -505,7 +505,7 @@ READ8_MEMBER( usb_sound_device::t1_r )
static inline void clock_channel(timer8253_channel *ch)
{
- UINT8 lastgate = ch->lastgate;
+ uint8_t lastgate = ch->lastgate;
/* update the gate */
ch->lastgate = ch->gate;
@@ -550,7 +550,7 @@ static inline void clock_channel(timer8253_channel *ch)
*
*************************************/
-void usb_sound_device::timer_w(int which, UINT8 offset, UINT8 data)
+void usb_sound_device::timer_w(int which, uint8_t offset, uint8_t data)
{
timer8253 *g = &m_timer_group[which];
timer8253_channel *ch;
@@ -619,7 +619,7 @@ void usb_sound_device::timer_w(int which, UINT8 offset, UINT8 data)
}
-void usb_sound_device::env_w(int which, UINT8 offset, UINT8 data)
+void usb_sound_device::env_w(int which, uint8_t offset, uint8_t data)
{
timer8253 *g = &m_timer_group[which];
@@ -881,7 +881,7 @@ machine_config_constructor usb_sound_device::device_mconfig_additions() const
const device_type SEGAUSBROM = &device_creator<usb_rom_sound_device>;
-usb_rom_sound_device::usb_rom_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+usb_rom_sound_device::usb_rom_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: usb_sound_device(mconfig, SEGAUSBROM, "Sega Universal Sound Board with ROM", tag, owner, clock, "segausbrom", __FILE__)
{
}
diff --git a/src/mame/audio/segasnd.h b/src/mame/audio/segasnd.h
index be4386d2ac7..e4cfd9a6445 100644
--- a/src/mame/audio/segasnd.h
+++ b/src/mame/audio/segasnd.h
@@ -12,7 +12,7 @@ class speech_sound_device : public device_t,
public device_sound_interface
{
public:
- speech_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ speech_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~speech_sound_device() {}
DECLARE_WRITE8_MEMBER( data_w );
@@ -36,11 +36,11 @@ protected:
private:
// internal state
- UINT8 m_drq;
- UINT8 m_latch;
- UINT8 m_t0;
- UINT8 m_p2;
- UINT8 *m_speech;
+ uint8_t m_drq;
+ uint8_t m_latch;
+ uint8_t m_t0;
+ uint8_t m_p2;
+ uint8_t *m_speech;
TIMER_CALLBACK_MEMBER( delayed_speech_w );
};
@@ -78,17 +78,17 @@ struct timer8253_channel
count(0),
remain(0) {}
- UINT8 holding; /* holding until counts written? */
- UINT8 latchmode; /* latching mode */
- UINT8 latchtoggle; /* latching state */
- UINT8 clockmode; /* clocking mode */
- UINT8 bcdmode; /* BCD mode? */
- UINT8 output; /* current output value */
- UINT8 lastgate; /* previous gate value */
- UINT8 gate; /* current gate value */
- UINT8 subcount; /* subcount (2MHz clocks per input clock) */
- UINT16 count; /* initial count */
- UINT16 remain; /* current down counter value */
+ uint8_t holding; /* holding until counts written? */
+ uint8_t latchmode; /* latching mode */
+ uint8_t latchtoggle; /* latching state */
+ uint8_t clockmode; /* clocking mode */
+ uint8_t bcdmode; /* BCD mode? */
+ uint8_t output; /* current output value */
+ uint8_t lastgate; /* previous gate value */
+ uint8_t gate; /* current gate value */
+ uint8_t subcount; /* subcount (2MHz clocks per input clock) */
+ uint16_t count; /* initial count */
+ uint16_t remain; /* current down counter value */
};
@@ -107,7 +107,7 @@ struct timer8253
g80_filter_state chan_filter[2]; /* filter states for the first two channels */
g80_filter_state gate1; /* first RC filter state */
g80_filter_state gate2; /* second RC filter state */
- UINT8 config; /* configuration for this timer */
+ uint8_t config; /* configuration for this timer */
};
@@ -115,8 +115,8 @@ class usb_sound_device : public device_t,
public device_sound_interface
{
public:
- usb_sound_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
- usb_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ usb_sound_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source);
+ usb_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~usb_sound_device() {}
required_device<i8035_device> m_ourcpu; /* CPU index of the 8035 */
@@ -148,27 +148,27 @@ private:
// internal state
sound_stream *m_stream; /* output stream */
device_t *m_maincpu;
- UINT8 m_in_latch; /* input latch */
- UINT8 m_out_latch; /* output latch */
- UINT8 m_last_p2_value; /* current P2 output value */
- optional_shared_ptr<UINT8> m_program_ram; /* pointer to program RAM */
- required_shared_ptr<UINT8> m_work_ram; /* pointer to work RAM */
- UINT8 m_work_ram_bank; /* currently selected work RAM bank */
- UINT8 m_t1_clock; /* T1 clock value */
- UINT8 m_t1_clock_mask; /* T1 clock mask (configured via jumpers) */
+ uint8_t m_in_latch; /* input latch */
+ uint8_t m_out_latch; /* output latch */
+ uint8_t m_last_p2_value; /* current P2 output value */
+ optional_shared_ptr<uint8_t> m_program_ram; /* pointer to program RAM */
+ required_shared_ptr<uint8_t> m_work_ram; /* pointer to work RAM */
+ uint8_t m_work_ram_bank; /* currently selected work RAM bank */
+ uint8_t m_t1_clock; /* T1 clock value */
+ uint8_t m_t1_clock_mask; /* T1 clock mask (configured via jumpers) */
timer8253 m_timer_group[3]; /* 3 groups of timers */
- UINT8 m_timer_mode[3]; /* mode control for each group */
- UINT32 m_noise_shift;
- UINT8 m_noise_state;
- UINT8 m_noise_subcount;
+ uint8_t m_timer_mode[3]; /* mode control for each group */
+ uint32_t m_noise_shift;
+ uint8_t m_noise_state;
+ uint8_t m_noise_subcount;
double m_gate_rc1_exp[2];
double m_gate_rc2_exp[2];
g80_filter_state m_final_filter;
g80_filter_state m_noise_filters[5];
TIMER_CALLBACK_MEMBER( delayed_usb_data_w );
- void timer_w(int which, UINT8 offset, UINT8 data);
- void env_w(int which, UINT8 offset, UINT8 data);
+ void timer_w(int which, uint8_t offset, uint8_t data);
+ void env_w(int which, uint8_t offset, uint8_t data);
};
extern const device_type SEGAUSB;
@@ -176,7 +176,7 @@ extern const device_type SEGAUSB;
class usb_rom_sound_device : public usb_sound_device
{
public:
- usb_rom_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ usb_rom_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~usb_rom_sound_device() {}
protected:
diff --git a/src/mame/audio/seibu.cpp b/src/mame/audio/seibu.cpp
index 917729fe3c2..971db1ea8a7 100644
--- a/src/mame/audio/seibu.cpp
+++ b/src/mame/audio/seibu.cpp
@@ -76,7 +76,7 @@
const device_type SEIBU_SOUND = &device_creator<seibu_sound_device>;
-seibu_sound_device::seibu_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+seibu_sound_device::seibu_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, SEIBU_SOUND, "Seibu Sound System", tag, owner, clock, "seibu_sound", __FILE__),
m_sound_rom(*this, ":audiocpu"),
m_main2sub_pending(0),
@@ -145,7 +145,7 @@ void seibu_sound_device::device_reset()
update_irq_lines(VECTOR_INIT);
}
-static UINT8 decrypt_data(int a,int src)
+static uint8_t decrypt_data(int a,int src)
{
if ( BIT(a,9) & BIT(a,8)) src ^= 0x80;
if ( BIT(a,11) & BIT(a,4) & BIT(a,1)) src ^= 0x40;
@@ -159,7 +159,7 @@ static UINT8 decrypt_data(int a,int src)
return src;
}
-static UINT8 decrypt_opcode(int a,int src)
+static uint8_t decrypt_opcode(int a,int src)
{
if ( BIT(a,9) & BIT(a,8)) src ^= 0x80;
if ( BIT(a,11) & BIT(a,4) & BIT(a,1)) src ^= 0x40;
@@ -178,13 +178,13 @@ static UINT8 decrypt_opcode(int a,int src)
return src;
}
-UINT8 *seibu_sound_device::get_custom_decrypt()
+uint8_t *seibu_sound_device::get_custom_decrypt()
{
if (m_decrypted_opcodes)
return m_decrypted_opcodes.get();
int size = memregion(":audiocpu")->bytes();
- m_decrypted_opcodes = make_unique_clear<UINT8[]>(size);
+ m_decrypted_opcodes = make_unique_clear<uint8_t[]>(size);
membank(":seibu_bank0d")->set_base(m_decrypted_opcodes.get());
if (size > 0x10000) {
membank(":seibu_bank1d")->configure_entries(0, (size - 0x10000) / 0x8000, m_decrypted_opcodes.get() + 0x10000, 0x8000);
@@ -195,11 +195,11 @@ UINT8 *seibu_sound_device::get_custom_decrypt()
return m_decrypted_opcodes.get();
}
-void seibu_sound_device::apply_decrypt(UINT8 *rom, UINT8 *opcodes, int length)
+void seibu_sound_device::apply_decrypt(uint8_t *rom, uint8_t *opcodes, int length)
{
for (int i = 0;i < length;i++)
{
- UINT8 src = rom[i];
+ uint8_t src = rom[i];
rom[i] = decrypt_data(i,src);
opcodes[i] = decrypt_opcode(i,src);
@@ -505,7 +505,7 @@ ADDRESS_MAP_END
const device_type SEIBU_ADPCM = &device_creator<seibu_adpcm_device>;
-seibu_adpcm_device::seibu_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+seibu_adpcm_device::seibu_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, SEIBU_ADPCM, "Seibu ADPCM (MSM5205)", tag, owner, clock, "seibu_adpcm", __FILE__),
device_sound_interface(mconfig, *this),
m_stream(nullptr),
diff --git a/src/mame/audio/seibu.h b/src/mame/audio/seibu.h
index ff492e6c48c..66139a40ca1 100644
--- a/src/mame/audio/seibu.h
+++ b/src/mame/audio/seibu.h
@@ -43,7 +43,7 @@ ADDRESS_MAP_EXTERN(seibu3_adpcm_sound_map, 8);
class seibu_sound_device : public device_t
{
public:
- seibu_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ seibu_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~seibu_sound_device() {}
DECLARE_READ16_MEMBER( main_word_r );
@@ -60,9 +60,9 @@ public:
DECLARE_WRITE8_MEMBER( main_data_w );
DECLARE_WRITE8_MEMBER( pending_w );
- static void apply_decrypt(UINT8 *rom, UINT8 *opcodes, int length);
+ static void apply_decrypt(uint8_t *rom, uint8_t *opcodes, int length);
void set_encryption(int mode);
- UINT8 *get_custom_decrypt();
+ uint8_t *get_custom_decrypt();
void update_irq_lines(int param);
protected:
@@ -72,17 +72,17 @@ protected:
private:
int m_encryption_mode;
- std::unique_ptr<UINT8[]> m_decrypted_opcodes;
+ std::unique_ptr<uint8_t[]> m_decrypted_opcodes;
// internal state
device_t *m_sound_cpu;
- required_region_ptr<UINT8> m_sound_rom;
- UINT8 m_main2sub[2];
- UINT8 m_sub2main[2];
+ required_region_ptr<uint8_t> m_sound_rom;
+ uint8_t m_main2sub[2];
+ uint8_t m_sub2main[2];
int m_main2sub_pending;
int m_sub2main_pending;
- UINT8 m_rst10_irq;
- UINT8 m_rst18_irq;
+ uint8_t m_rst10_irq;
+ uint8_t m_rst18_irq;
enum
{
@@ -103,7 +103,7 @@ class seibu_adpcm_device : public device_t,
public device_sound_interface
{
public:
- seibu_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ seibu_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~seibu_adpcm_device() {}
void decrypt();
@@ -121,11 +121,11 @@ protected:
// internal state
oki_adpcm_state m_adpcm;
sound_stream *m_stream;
- UINT32 m_current;
- UINT32 m_end;
- UINT8 m_nibble;
- UINT8 m_playing;
- required_region_ptr<UINT8> m_base;
+ uint32_t m_current;
+ uint32_t m_end;
+ uint8_t m_nibble;
+ uint8_t m_playing;
+ required_region_ptr<uint8_t> m_base;
};
extern const device_type SEIBU_ADPCM;
diff --git a/src/mame/audio/snes_snd.cpp b/src/mame/audio/snes_snd.cpp
index 127fec049ce..b47edce55c9 100644
--- a/src/mame/audio/snes_snd.cpp
+++ b/src/mame/audio/snes_snd.cpp
@@ -155,7 +155,7 @@ static const int ENVCNT[0x20]
const device_type SNES = &device_creator<snes_sound_device>;
-snes_sound_device::snes_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+snes_sound_device::snes_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, SNES, "SNES Custom DSP (SPC700)", tag, owner, clock, "snes_sound", __FILE__),
device_sound_interface(mconfig, *this)
{
@@ -179,7 +179,7 @@ void snes_sound_device::device_start()
{
m_channel = machine().sound().stream_alloc(*this, 0, 2, 32000);
- m_ram = make_unique_clear<UINT8[]>(SNES_SPCRAM_SIZE);
+ m_ram = make_unique_clear<uint8_t[]>(SNES_SPCRAM_SIZE);
/* put IPL image at the top of RAM */
memcpy(m_ipl_region, machine().root_device().memregion("sound_ipl")->base(), 64);
@@ -338,7 +338,7 @@ void snes_sound_device::dsp_update( short *sound_ptr )
m_keys |= m;
m_keyed_on |= m;
vl = m_dsp_regs[(v << 4) + 4];
- vp->samp_id = *( UINT32 * )&sd[vl];
+ vp->samp_id = *( uint32_t * )&sd[vl];
vp->mem_ptr = LEtoME16(sd[vl].vptr);
#ifdef DBG_KEY
@@ -391,7 +391,7 @@ void snes_sound_device::dsp_update( short *sound_ptr )
continue;
}
- vp->pitch = LEtoME16(*((UINT16 *)&m_dsp_regs[V + 2])) & 0x3fff;
+ vp->pitch = LEtoME16(*((uint16_t *)&m_dsp_regs[V + 2])) & 0x3fff;
#ifndef NO_PMOD
/* Pitch mod uses OUTX from last voice for this one. Luckily we haven't
@@ -454,7 +454,7 @@ void snes_sound_device::dsp_update( short *sound_ptr )
}
vp->header_cnt = 8;
- vl = (UINT8)m_ram[vp->mem_ptr++];
+ vl = (uint8_t)m_ram[vp->mem_ptr++];
vp->range = vl >> 4;
vp->end = vl & 3;
vp->filter = (vl & 12) >> 2;
@@ -501,7 +501,7 @@ void snes_sound_device::dsp_update( short *sound_ptr )
}
#ifdef DBG_BRR
- logerror("V%d: shifted delta=%04X\n", v, (UINT16)outx);
+ logerror("V%d: shifted delta=%04X\n", v, (uint16_t)outx);
#endif
switch (vp->filter)
@@ -533,7 +533,7 @@ void snes_sound_device::dsp_update( short *sound_ptr )
}
#ifdef DBG_BRR
- logerror("V%d: filter + delta=%04X\n", v, (UINT16)outx);
+ logerror("V%d: filter + delta=%04X\n", v, (uint16_t)outx);
#endif
vp->smp2 = (signed short)vp->smp1;
@@ -626,8 +626,8 @@ void snes_sound_device::dsp_update( short *sound_ptr )
#endif
echo_base = ((m_dsp_regs[0x6d] << 8) + m_echo_ptr) & 0xffff;
- m_fir_lbuf[m_fir_ptr] = (signed short)LEtoME16(*(UINT16 *)&m_ram[echo_base]);
- m_fir_rbuf[m_fir_ptr] = (signed short)LEtoME16(*(UINT16 *)&m_ram[echo_base + sizeof(short)]);
+ m_fir_lbuf[m_fir_ptr] = (signed short)LEtoME16(*(uint16_t *)&m_ram[echo_base]);
+ m_fir_rbuf[m_fir_ptr] = (signed short)LEtoME16(*(uint16_t *)&m_ram[echo_base + sizeof(short)]);
/* Now, evaluate the FIR filter, and add the results into the final output. */
vl = m_fir_lbuf[m_fir_ptr] * (signed char)m_dsp_regs[0x7f];
@@ -688,11 +688,11 @@ void snes_sound_device::dsp_update( short *sound_ptr )
echor = -32768;
#ifdef DBG_ECHO
- logerror("Echo: Writing %04X,%04X at location %04X\n", (UINT16)echol, (UINT16)echor, echo_base);
+ logerror("Echo: Writing %04X,%04X at location %04X\n", (uint16_t)echol, (uint16_t)echor, echo_base);
#endif
- *(UINT16 *)&m_ram[echo_base] = MEtoLE16((UINT16)echol);
- *(UINT16 *)&m_ram[echo_base + sizeof(short)] = MEtoLE16((UINT16)echor);
+ *(uint16_t *)&m_ram[echo_base] = MEtoLE16((uint16_t)echol);
+ *(uint16_t *)&m_ram[echo_base + sizeof(short)] = MEtoLE16((uint16_t)echor);
}
m_echo_ptr += 2 * sizeof(short);
@@ -1086,7 +1086,7 @@ READ8_MEMBER( snes_sound_device::spc_io_r )
case 0xe: /* Counter 1 */
case 0xf: /* Counter 2 */
{
- UINT8 value = m_ram[0xf0 + offset] & 0x0f;
+ uint8_t value = m_ram[0xf0 + offset] & 0x0f;
m_ram[0xf0 + offset] = 0;
return value;
}
diff --git a/src/mame/audio/snes_snd.h b/src/mame/audio/snes_snd.h
index 6d4e97b14a1..a2e7c5417d8 100644
--- a/src/mame/audio/snes_snd.h
+++ b/src/mame/audio/snes_snd.h
@@ -29,7 +29,7 @@ ALLOW_SAVE_TYPE(env_state_t32);
struct voice_state_type /* Voice state type */
{
- UINT16 mem_ptr; /* Sample data memory pointer */
+ uint16_t mem_ptr; /* Sample data memory pointer */
int end; /* End or loop after block */
int envcnt; /* Counts to envelope update */
env_state_t32 envstate; /* Current envelope state */
@@ -41,17 +41,17 @@ struct voice_state_type /* Voice state type */
int on_cnt; /* Is it time to turn on yet? */
int pitch; /* Sample pitch (4096->32000Hz) */
int range; /* Last header's range */
- UINT32 samp_id; /* Sample ID# */
+ uint32_t samp_id; /* Sample ID# */
int sampptr; /* Where in sampbuf we are */
- INT32 smp1; /* Last sample (for BRR filter) */
- INT32 smp2; /* Second-to-last sample decoded*/
+ int32_t smp1; /* Last sample (for BRR filter) */
+ int32_t smp2; /* Second-to-last sample decoded*/
short sampbuf[4]; /* Buffer for Gaussian interp */
};
struct src_dir_type /* Source directory entry */
{
- UINT16 vptr; /* Ptr to start of sample data */
- UINT16 lptr; /* Loop pointer in sample data */
+ uint16_t vptr; /* Ptr to start of sample data */
+ uint16_t lptr; /* Loop pointer in sample data */
};
@@ -63,7 +63,7 @@ class snes_sound_device : public device_t,
public device_sound_interface
{
public:
- snes_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ snes_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~snes_sound_device() {}
void set_volume(int volume);
@@ -75,7 +75,7 @@ public:
DECLARE_WRITE8_MEMBER( spc_ram_w );
DECLARE_WRITE8_MEMBER( spc_port_in );
-// UINT8 *spc_get_ram() { return m_ram; }
+// uint8_t *spc_get_ram() { return m_ram; }
protected:
// device-level overrides
@@ -97,10 +97,10 @@ private:
void state_register();
// internal state
- std::unique_ptr<UINT8[]> m_ram;
+ std::unique_ptr<uint8_t[]> m_ram;
sound_stream *m_channel;
- UINT8 m_dsp_regs[256]; /* DSP registers */
- UINT8 m_ipl_region[64]; /* SPC top 64 bytes */
+ uint8_t m_dsp_regs[256]; /* DSP registers */
+ uint8_t m_ipl_region[64]; /* SPC top 64 bytes */
int m_keyed_on;
int m_keys; /* 8-bits for 8 voices */
@@ -120,12 +120,12 @@ private:
/* timers */
emu_timer *m_timer[3];
- UINT8 m_enabled[3];
- UINT16 m_counter[3];
+ uint8_t m_enabled[3];
+ uint16_t m_counter[3];
/* IO ports */
- UINT8 m_port_in[4]; /* SPC input ports */
- UINT8 m_port_out[4]; /* SPC output ports */
+ uint8_t m_port_in[4]; /* SPC input ports */
+ uint8_t m_port_out[4]; /* SPC output ports */
};
extern const device_type SNES;
diff --git a/src/mame/audio/snk6502.cpp b/src/mame/audio/snk6502.cpp
index 61a5bc8e959..526292ab920 100644
--- a/src/mame/audio/snk6502.cpp
+++ b/src/mame/audio/snk6502.cpp
@@ -130,7 +130,7 @@ DISCRETE_SOUND_END
const device_type SNK6502 = &device_creator<snk6502_sound_device>;
-snk6502_sound_device::snk6502_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+snk6502_sound_device::snk6502_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, SNK6502, "SNK6502 Audio Custom", tag, owner, clock, "snk6502_sound", __FILE__),
device_sound_interface(mconfig, *this),
//m_tone_channels[CHANNELS],
@@ -189,7 +189,7 @@ inline void snk6502_sound_device::validate_tone_channel(int channel)
{
if (!m_tone_channels[channel].mute)
{
- UINT8 romdata = m_ROM[m_tone_channels[channel].base + m_tone_channels[channel].offset];
+ uint8_t romdata = m_ROM[m_tone_channels[channel].base + m_tone_channels[channel].offset];
if (romdata != 0xff)
m_tone_channels[channel].sample_step = m_tone_channels[channel].sample_rate / (256 - romdata);
@@ -743,7 +743,7 @@ WRITE8_MEMBER( snk6502_sound_device::fantasy_sound_w )
#define HD68880_SYBS 0x0f
-void snk6502_sound_device::speech_w(UINT8 data, const UINT16 *table, int start)
+void snk6502_sound_device::speech_w(uint8_t data, const uint16_t *table, int start)
{
/*
bit description
@@ -886,7 +886,7 @@ void snk6502_sound_device::speech_w(UINT8 data, const UINT16 *table, int start)
WRITE8_MEMBER( snk6502_sound_device::vanguard_speech_w )
{
- static const UINT16 vanguard_table[16] =
+ static const uint16_t vanguard_table[16] =
{
0x04000,
0x04325,
@@ -911,7 +911,7 @@ WRITE8_MEMBER( snk6502_sound_device::vanguard_speech_w )
WRITE8_MEMBER( snk6502_sound_device::fantasy_speech_w )
{
- static const UINT16 fantasy_table[16] =
+ static const uint16_t fantasy_table[16] =
{
0x04000,
0x04297,
@@ -949,12 +949,12 @@ void snk6502_sound_device::sound_stream_update(sound_stream &stream, stream_samp
while (samples-- > 0)
{
- INT32 data = 0;
+ int32_t data = 0;
for (i = 0; i < CHANNELS; i++)
{
TONE *voice = &m_tone_channels[i];
- INT16 *form = voice->form;
+ int16_t *form = voice->form;
if (!voice->mute && voice->sample_step)
{
@@ -963,8 +963,8 @@ void snk6502_sound_device::sound_stream_update(sound_stream &stream, stream_samp
int cur = form[(cur_pos >> FRAC_BITS) & 15];
/* interpolate */
- data += ((INT32)prev * (FRAC_ONE - (cur_pos & FRAC_MASK))
- + (INT32)cur * (cur_pos & FRAC_MASK)) >> FRAC_BITS;
+ data += ((int32_t)prev * (FRAC_ONE - (cur_pos & FRAC_MASK))
+ + (int32_t)cur * (cur_pos & FRAC_MASK)) >> FRAC_BITS;
voice->sample_cur = cur_pos;
}
diff --git a/src/mame/audio/socrates.cpp b/src/mame/audio/socrates.cpp
index c35896e5c25..e6046756243 100644
--- a/src/mame/audio/socrates.cpp
+++ b/src/mame/audio/socrates.cpp
@@ -23,7 +23,7 @@ const device_type SOCRATES_SOUND = &device_creator<socrates_snd_device>;
// socrates_snd_device - constructor
//-------------------------------------------------
-socrates_snd_device::socrates_snd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+socrates_snd_device::socrates_snd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, SOCRATES_SOUND, "Socrates Sound", tag, owner, clock, "socrates_snd", __FILE__),
device_sound_interface(mconfig, *this)
{
@@ -61,7 +61,7 @@ void socrates_snd_device::sound_stream_update(sound_stream &stream, stream_sampl
}
-const UINT8 socrates_snd_device::s_volumeLUT[16] =
+const uint8_t socrates_snd_device::s_volumeLUT[16] =
{
0, 61, 100, 132, 158, 183, 201, 218,
233, 242, 253, 255, 250, 240, 224, 211
diff --git a/src/mame/audio/socrates.h b/src/mame/audio/socrates.h
index 14498844809..c42a3d44671 100644
--- a/src/mame/audio/socrates.h
+++ b/src/mame/audio/socrates.h
@@ -9,7 +9,7 @@ class socrates_snd_device : public device_t,
public device_sound_interface
{
public:
- socrates_snd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ socrates_snd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
void reg0_w(int data);
void reg1_w(int data);
@@ -25,17 +25,17 @@ protected:
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
private:
void snd_clock();
- static const UINT8 s_volumeLUT[];
+ static const uint8_t s_volumeLUT[];
// internal state
sound_stream * m_stream;
- UINT8 m_freq[2]; // channel 1,2 frequencies
- UINT8 m_vol[2]; // channel 1,2 volume
- UINT8 m_enable[2]; // channel 1,2 enable
- UINT8 m_channel3; // channel 3 weird register
- UINT8 m_state[3]; // output states for channels 1,2,3
- UINT8 m_accum[3]; // accumulators for channels 1,2,3
- UINT16 m_DAC_output; // output
+ uint8_t m_freq[2]; // channel 1,2 frequencies
+ uint8_t m_vol[2]; // channel 1,2 volume
+ uint8_t m_enable[2]; // channel 1,2 enable
+ uint8_t m_channel3; // channel 3 weird register
+ uint8_t m_state[3]; // output states for channels 1,2,3
+ uint8_t m_accum[3]; // accumulators for channels 1,2,3
+ uint16_t m_DAC_output; // output
};
extern const device_type SOCRATES_SOUND;
diff --git a/src/mame/audio/special.cpp b/src/mame/audio/special.cpp
index 6b827a2d2c8..f81e203bd9a 100644
--- a/src/mame/audio/special.cpp
+++ b/src/mame/audio/special.cpp
@@ -24,7 +24,7 @@ const device_type SPECIMX_SND = &device_creator<specimx_sound_device>;
// specimx_sound_device - constructor
//-------------------------------------------------
-specimx_sound_device::specimx_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+specimx_sound_device::specimx_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, SPECIMX_SND, "Specialist MX Audio Custom", tag, owner, clock, "specimx_sound", __FILE__),
device_sound_interface(mconfig, *this),
m_mixer_channel(nullptr)
@@ -50,9 +50,9 @@ void specimx_sound_device::device_start()
void specimx_sound_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
{
- INT16 channel_0_signal;
- INT16 channel_1_signal;
- INT16 channel_2_signal;
+ int16_t channel_0_signal;
+ int16_t channel_1_signal;
+ int16_t channel_2_signal;
stream_sample_t *sample_left = outputs[0];
diff --git a/src/mame/audio/special.h b/src/mame/audio/special.h
index 6ecc3ee3f3f..78e05bc319d 100644
--- a/src/mame/audio/special.h
+++ b/src/mame/audio/special.h
@@ -15,7 +15,7 @@ class specimx_sound_device : public device_t,
public device_sound_interface
{
public:
- specimx_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ specimx_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~specimx_sound_device() { }
DECLARE_WRITE_LINE_MEMBER(set_input_ch0);
diff --git a/src/mame/audio/starwars.cpp b/src/mame/audio/starwars.cpp
index 1fda61f4e31..9a8b67e5e70 100644
--- a/src/mame/audio/starwars.cpp
+++ b/src/mame/audio/starwars.cpp
@@ -34,7 +34,7 @@ READ8_MEMBER(starwars_state::r6532_porta_r)
/* d1 (out) TMS5220 Not Read */
/* d0 (out) TMS5220 Not Write */
/* Note: bit 4 is always set to avoid sound self test */
- UINT8 olddata = m_riot->porta_in_get();
+ uint8_t olddata = m_riot->porta_in_get();
tms5220_device *tms5220 = machine().device<tms5220_device>("tms");
return (olddata & 0xc0) | 0x10 | (tms5220->readyq_r() << 2);
diff --git a/src/mame/audio/suna8.cpp b/src/mame/audio/suna8.cpp
index 43f70119b9a..bc7a5e49614 100644
--- a/src/mame/audio/suna8.cpp
+++ b/src/mame/audio/suna8.cpp
@@ -16,13 +16,13 @@
SAMPLES_START_CB_MEMBER(suna8_state::sh_start)
{
int i, len = memregion("samples")->bytes() * 2; // 2 samples per byte
- UINT8 *ROM = memregion("samples")->base();
+ uint8_t *ROM = memregion("samples")->base();
- m_samplebuf = std::make_unique<INT16[]>(len);
+ m_samplebuf = std::make_unique<int16_t[]>(len);
// Convert 4 bit to 16 bit samples
for(i = 0; i < len; i++)
- m_samplebuf[i] = (INT8)(((ROM[i/2] << ((i & 1)?0:4)) & 0xf0) ^ 0x80) * 0x100;
+ m_samplebuf[i] = (int8_t)(((ROM[i/2] << ((i & 1)?0:4)) & 0xf0) ^ 0x80) * 0x100;
m_numsamples = len / SAMPLEN;
}
diff --git a/src/mame/audio/svis_snd.cpp b/src/mame/audio/svis_snd.cpp
index cc2bec2b821..92c3bf119c7 100644
--- a/src/mame/audio/svis_snd.cpp
+++ b/src/mame/audio/svis_snd.cpp
@@ -22,7 +22,7 @@ const device_type SVISION_SND = &device_creator<svision_sound_device>;
// svision_sound_device - constructor
//-------------------------------------------------
-svision_sound_device::svision_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+svision_sound_device::svision_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, SVISION_SND, "Super Vision Audio Custom", tag, owner, clock, "svision_sound", __FILE__),
device_sound_interface(mconfig, *this),
m_mixer_channel(nullptr)
@@ -85,7 +85,7 @@ void svision_sound_device::sound_stream_update(sound_stream &stream, stream_samp
break;
}
{
- INT16 s = on ? channel->volume << 8 : 0;
+ int16_t s = on ? channel->volume << 8 : 0;
if (j == 0)
*right += s;
else
@@ -99,7 +99,7 @@ void svision_sound_device::sound_stream_update(sound_stream &stream, stream_samp
}
if (m_noise.on && (m_noise.play || m_noise.count))
{
- INT16 s = (m_noise.value ? 1 << 8: 0) * m_noise.volume;
+ int16_t s = (m_noise.value ? 1 << 8: 0) * m_noise.volume;
int b1, b2;
if (m_noise.left)
*left += s;
@@ -128,9 +128,9 @@ void svision_sound_device::sound_stream_update(sound_stream &stream, stream_samp
}
if (m_dma.on)
{
- UINT8 sample;
- INT16 s;
- UINT16 addr = m_dma.start + (unsigned) m_dma.pos / 2;
+ uint8_t sample;
+ int16_t s;
+ uint16_t addr = m_dma.start + (unsigned) m_dma.pos / 2;
if (addr >= 0x8000 && addr < 0xc000)
{
sample = machine().root_device().memregion("user1")->base()[(addr & 0x3fff) | m_dma.ca14to16];
@@ -236,7 +236,7 @@ void svision_sound_device::sound_decrement()
void svision_sound_device::soundport_w(int which, int offset, int data)
{
SVISION_CHANNEL *channel = &m_channel[which];
- UINT16 size;
+ uint16_t size;
m_mixer_channel->update();
channel->reg[offset] = data;
diff --git a/src/mame/audio/svis_snd.h b/src/mame/audio/svis_snd.h
index d6ca0228688..46b18a29968 100644
--- a/src/mame/audio/svis_snd.h
+++ b/src/mame/audio/svis_snd.h
@@ -35,10 +35,10 @@ struct SVISION_NOISE
pos(0.0),
value(0)
{
- memset(reg, 0, sizeof(UINT8)*3);
+ memset(reg, 0, sizeof(uint8_t)*3);
}
- UINT8 reg[3];
+ uint8_t reg[3];
int on, right, left, play;
SVISION_NOISE_Type type;
int state;
@@ -61,10 +61,10 @@ struct SVISION_DMA
step(0.0),
finished(0)
{
- memset(reg, 0, sizeof(UINT8)*5);
+ memset(reg, 0, sizeof(uint8_t)*5);
}
- UINT8 reg[5];
+ uint8_t reg[5];
int on, right, left;
int ca14to16;
int start,size;
@@ -82,10 +82,10 @@ struct SVISION_CHANNEL
size(0),
count(0)
{
- memset(reg, 0, sizeof(UINT8)*4);
+ memset(reg, 0, sizeof(uint8_t)*4);
}
- UINT8 reg[4];
+ uint8_t reg[4];
int on;
int waveform, volume;
int pos;
@@ -105,7 +105,7 @@ class svision_sound_device : public device_t,
public device_sound_interface
{
public:
- svision_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ svision_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~svision_sound_device() { }
// static configuration
diff --git a/src/mame/audio/t5182.cpp b/src/mame/audio/t5182.cpp
index b3d6ba53cbc..c22b0419ce9 100644
--- a/src/mame/audio/t5182.cpp
+++ b/src/mame/audio/t5182.cpp
@@ -153,7 +153,7 @@ rom.
const device_type T5182 = &device_creator<t5182_device>;
-t5182_device::t5182_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+t5182_device::t5182_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, T5182, "T5182 MCU", tag, owner, clock, "t5182", __FILE__),
m_ourcpu(*this, "t5182_z80"),
m_sharedram(*this, "sharedram"),
diff --git a/src/mame/audio/t5182.h b/src/mame/audio/t5182.h
index fba3a22b55a..4783f626236 100644
--- a/src/mame/audio/t5182.h
+++ b/src/mame/audio/t5182.h
@@ -7,7 +7,7 @@ class t5182_device : public device_t
{
public:
- t5182_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ t5182_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~t5182_device() {}
enum
@@ -49,7 +49,7 @@ protected:
private:
// internal state
required_device<cpu_device> m_ourcpu;
- required_shared_ptr<UINT8> m_sharedram;
+ required_shared_ptr<uint8_t> m_sharedram;
int m_irqstate;
int m_semaphore_main;
int m_semaphore_snd;
diff --git a/src/mame/audio/taito_en.cpp b/src/mame/audio/taito_en.cpp
index 60f4497cd7c..a793b0eeef2 100644
--- a/src/mame/audio/taito_en.cpp
+++ b/src/mame/audio/taito_en.cpp
@@ -18,7 +18,7 @@
const device_type TAITO_EN = &device_creator<taito_en_device>;
-taito_en_device::taito_en_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+taito_en_device::taito_en_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, TAITO_EN, "Taito Ensoniq Sound System", tag, owner, clock, "taito_en", __FILE__),
m_audiocpu(*this, "audiocpu"),
m_ensoniq(*this, "ensoniq"),
@@ -56,8 +56,8 @@ void taito_en_device::device_start()
void taito_en_device::device_reset()
{
/* Sound cpu program loads to 0xc00000 so we use a bank */
- UINT16 *ROM = (UINT16 *)memregion("audiocpu")->base();
- UINT16 *sound_ram = (UINT16 *)memshare("share1")->ptr();
+ uint16_t *ROM = (uint16_t *)memregion("audiocpu")->base();
+ uint16_t *sound_ram = (uint16_t *)memshare("share1")->ptr();
membank("bank1")->set_base(&ROM[0x80000]);
membank("bank2")->set_base(&ROM[0x90000]);
membank("bank3")->set_base(&ROM[0xa0000]);
@@ -105,7 +105,7 @@ WRITE8_MEMBER( taito_en_device::en_68000_share_w )
WRITE16_MEMBER( taito_en_device::en_es5505_bank_w )
{
- UINT32 max_banks_this_game = (memregion(":ensoniq.0")->bytes()/0x200000)-1;
+ uint32_t max_banks_this_game = (memregion(":ensoniq.0")->bytes()/0x200000)-1;
/* mask out unused bits */
data &= max_banks_this_game;
@@ -146,7 +146,7 @@ READ16_MEMBER( taito_en_device::es5510_dsp_r )
WRITE16_MEMBER( taito_en_device::es5510_dsp_w )
{
- UINT8 *snd_mem = (UINT8 *)memregion(":ensoniq.0")->base();
+ uint8_t *snd_mem = (uint8_t *)memregion(":ensoniq.0")->base();
// if (offset>4 && offset!=0x80 && offset!=0xa0 && offset!=0xc0 && offset!=0xe0)
// logerror("%06x: DSP write offset %04x %04x\n",space.device().safe_pc(),offset,data);
diff --git a/src/mame/audio/taito_en.h b/src/mame/audio/taito_en.h
index 0d4fee8a30f..5733748d19f 100644
--- a/src/mame/audio/taito_en.h
+++ b/src/mame/audio/taito_en.h
@@ -15,7 +15,7 @@ class taito_en_device : public device_t
{
public:
- taito_en_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ taito_en_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~taito_en_device() {}
DECLARE_READ8_MEMBER( en_68000_share_r );
@@ -43,17 +43,17 @@ private:
required_device<es5505_device> m_ensoniq;
required_device<mc68681_device> m_duart68681;
required_device<mb87078_device> m_mb87078;
- required_shared_ptr<UINT32> m_snd_shared_ram;
+ required_shared_ptr<uint32_t> m_snd_shared_ram;
//todo: hook up cpu/es5510
- UINT16 m_es5510_dsp_ram[0x200];
- UINT32 m_es5510_gpr[0xc0];
- UINT32 m_es5510_dram[1<<24];
- UINT32 m_es5510_dol_latch;
- UINT32 m_es5510_dil_latch;
- UINT32 m_es5510_dadr_latch;
- UINT32 m_es5510_gpr_latch;
- UINT8 m_es5510_ram_sel;
+ uint16_t m_es5510_dsp_ram[0x200];
+ uint32_t m_es5510_gpr[0xc0];
+ uint32_t m_es5510_dram[1<<24];
+ uint32_t m_es5510_dol_latch;
+ uint32_t m_es5510_dil_latch;
+ uint32_t m_es5510_dadr_latch;
+ uint32_t m_es5510_gpr_latch;
+ uint8_t m_es5510_ram_sel;
};
extern const device_type TAITO_EN;
diff --git a/src/mame/audio/taito_zm.cpp b/src/mame/audio/taito_zm.cpp
index a23967134c3..4f4d8f4f0c3 100644
--- a/src/mame/audio/taito_zm.cpp
+++ b/src/mame/audio/taito_zm.cpp
@@ -37,7 +37,7 @@ const device_type TAITO_ZOOM = &device_creator<taito_zoom_device>;
// taito_zoom_device - constructor
//-------------------------------------------------
-taito_zoom_device::taito_zoom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+taito_zoom_device::taito_zoom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, TAITO_ZOOM, "Taito Zoom Sound System", tag, owner, clock, "taito_zoom", __FILE__),
m_soundcpu(*this, ":mn10200"),
m_zsg2(*this, ":zsg2"),
@@ -52,7 +52,7 @@ taito_zoom_device::taito_zoom_device(const machine_config &mconfig, const char *
void taito_zoom_device::device_start()
{
- m_snd_shared_ram = make_unique_clear<UINT8[]>(0x100);
+ m_snd_shared_ram = make_unique_clear<uint8_t[]>(0x100);
// register for savestates
save_item(NAME(m_reg_address));
diff --git a/src/mame/audio/taito_zm.h b/src/mame/audio/taito_zm.h
index 610cdc807a8..353cb898f54 100644
--- a/src/mame/audio/taito_zm.h
+++ b/src/mame/audio/taito_zm.h
@@ -16,7 +16,7 @@ class taito_zoom_device : public device_t
{
public:
- taito_zoom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ taito_zoom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~taito_zoom_device() {}
DECLARE_WRITE16_MEMBER(sound_irq_w);
@@ -40,9 +40,9 @@ private:
required_device<zsg2_device> m_zsg2;
// internal state
- UINT16 m_reg_address;
- UINT8 m_tms_ctrl;
- std::unique_ptr<UINT8[]> m_snd_shared_ram;
+ uint16_t m_reg_address;
+ uint8_t m_tms_ctrl;
+ std::unique_ptr<uint8_t[]> m_snd_shared_ram;
};
extern const device_type TAITO_ZOOM;
diff --git a/src/mame/audio/taitosnd.cpp b/src/mame/audio/taitosnd.cpp
index f2ff9aa9358..6a2d9795ee1 100644
--- a/src/mame/audio/taitosnd.cpp
+++ b/src/mame/audio/taitosnd.cpp
@@ -40,7 +40,7 @@ const device_type TC0140SYT = &device_creator<tc0140syt_device>;
// tc0140syt_device - constructor
//-------------------------------------------------
-tc0140syt_device::tc0140syt_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+tc0140syt_device::tc0140syt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, TC0140SYT, "Taito TC0140SYT", tag, owner, clock, "tc0140syt", __FILE__)
, m_mainmode(0)
, m_submode(0)
@@ -49,8 +49,8 @@ tc0140syt_device::tc0140syt_device(const machine_config &mconfig, const char *ta
, m_mastercpu(*this, finder_base::DUMMY_TAG)
, m_slavecpu(*this, finder_base::DUMMY_TAG)
{
- memset(m_slavedata, 0, sizeof(UINT8)*4);
- memset(m_masterdata, 0, sizeof(UINT8)*4);
+ memset(m_slavedata, 0, sizeof(uint8_t)*4);
+ memset(m_masterdata, 0, sizeof(uint8_t)*4);
}
@@ -80,7 +80,7 @@ void tc0140syt_device::device_reset()
m_status = 0;
m_nmi_enabled = 0;
- for (UINT32 i = 0; i < 4; i++)
+ for (uint32_t i = 0; i < 4; i++)
{
m_slavedata[i] = 0;
m_masterdata[i] = 0;
@@ -94,8 +94,8 @@ void tc0140syt_device::device_reset()
void tc0140syt_device::update_nmi()
{
- UINT32 nmi_pending = m_status & (TC0140SYT_PORT23_FULL | TC0140SYT_PORT01_FULL);
- UINT32 state = (nmi_pending && m_nmi_enabled) ? ASSERT_LINE : CLEAR_LINE;
+ uint32_t nmi_pending = m_status & (TC0140SYT_PORT23_FULL | TC0140SYT_PORT01_FULL);
+ uint32_t state = (nmi_pending && m_nmi_enabled) ? ASSERT_LINE : CLEAR_LINE;
m_slavecpu->set_input_line(INPUT_LINE_NMI, state);
}
@@ -156,7 +156,7 @@ WRITE8_MEMBER( tc0140syt_device::master_comm_w )
READ8_MEMBER( tc0140syt_device::master_comm_r )
{
machine().scheduler().synchronize(); // let slavecpu catch up (after we return and the main cpu finishes what it's doing)
- UINT8 res = 0;
+ uint8_t res = 0;
switch (m_mainmode)
{
@@ -250,7 +250,7 @@ WRITE8_MEMBER( tc0140syt_device::slave_comm_w )
READ8_MEMBER( tc0140syt_device::slave_comm_r )
{
- UINT8 res = 0;
+ uint8_t res = 0;
switch (m_submode)
{
diff --git a/src/mame/audio/taitosnd.h b/src/mame/audio/taitosnd.h
index b74f13d0307..e6f20e1bec1 100644
--- a/src/mame/audio/taitosnd.h
+++ b/src/mame/audio/taitosnd.h
@@ -24,7 +24,7 @@
class tc0140syt_device : public device_t
{
public:
- tc0140syt_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ tc0140syt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~tc0140syt_device() { }
static void set_master_tag(device_t &device, const char *tag) { downcast<tc0140syt_device &>(device).m_mastercpu.set_tag(tag); }
@@ -48,12 +48,12 @@ protected:
private:
void update_nmi();
- UINT8 m_slavedata[4]; /* Data on master->slave port (4 nibbles) */
- UINT8 m_masterdata[4]; /* Data on slave->master port (4 nibbles) */
- UINT8 m_mainmode; /* Access mode on master cpu side */
- UINT8 m_submode; /* Access mode on slave cpu side */
- UINT8 m_status; /* Status data */
- UINT8 m_nmi_enabled; /* 1 if slave cpu has nmi's enabled */
+ uint8_t m_slavedata[4]; /* Data on master->slave port (4 nibbles) */
+ uint8_t m_masterdata[4]; /* Data on slave->master port (4 nibbles) */
+ uint8_t m_mainmode; /* Access mode on master cpu side */
+ uint8_t m_submode; /* Access mode on slave cpu side */
+ uint8_t m_status; /* Status data */
+ uint8_t m_nmi_enabled; /* 1 if slave cpu has nmi's enabled */
required_device<cpu_device> m_mastercpu; /* this is the maincpu */
required_device<cpu_device> m_slavecpu; /* this is the audiocpu */
diff --git a/src/mame/audio/targ.cpp b/src/mame/audio/targ.cpp
index 8c3fed212f0..2b3437053f9 100644
--- a/src/mame/audio/targ.cpp
+++ b/src/mame/audio/targ.cpp
@@ -22,7 +22,7 @@
#define SPECTAR_MAXFREQ 525000
#define TARG_MAXFREQ 125000
-static const INT16 sine_wave[32] =
+static const int16_t sine_wave[32] =
{
0x0f0f, 0x0f0f, 0x0f0f, 0x0606, 0x0606, 0x0909, 0x0909, 0x0606, 0x0606, 0x0909, 0x0606, 0x0d0d, 0x0f0f, 0x0f0f, 0x0d0d, 0x0000,
-0x191a, -0x2122, -0x1e1f, -0x191a, -0x1314, -0x191a, -0x1819, -0x1819, -0x1819, -0x1314, -0x1314, -0x1314, -0x1819, -0x1e1f, -0x1e1f, -0x1819
@@ -34,7 +34,7 @@ static const INT16 sine_wave[32] =
#define FALLING_EDGE(bit) (!(data & bit) && (m_port_1_last & bit))
-void exidy_state::adjust_sample(UINT8 freq)
+void exidy_state::adjust_sample(uint8_t freq)
{
m_tone_freq = freq;
@@ -107,7 +107,7 @@ WRITE8_MEMBER( exidy_state::targ_audio_2_w )
{
if ((data & 0x01) && !(m_port_2_last & 0x01))
{
- UINT8 *prom = memregion("targ")->base();
+ uint8_t *prom = memregion("targ")->base();
m_tone_pointer = (m_tone_pointer + 1) & 0x0f;
diff --git a/src/mame/audio/tiamc1.cpp b/src/mame/audio/tiamc1.cpp
index 9c896429fcd..70d8f7b6c95 100644
--- a/src/mame/audio/tiamc1.cpp
+++ b/src/mame/audio/tiamc1.cpp
@@ -57,7 +57,7 @@ const device_type TIAMC1 = &device_creator<tiamc1_sound_device>;
// tiamc1_sound_device - constructor
//-------------------------------------------------
-tiamc1_sound_device::tiamc1_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+tiamc1_sound_device::tiamc1_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, TIAMC1, "TIA-MC1 Audio Custom", tag, owner, clock, "tiamc1_sound", __FILE__),
device_sound_interface(mconfig, *this),
m_channel(nullptr),
@@ -194,7 +194,7 @@ void tiamc1_sound_device::timer8253_tick(struct timer8253struct *t, int chn)
-void tiamc1_sound_device::timer8253_wr(struct timer8253struct *t, int reg, UINT8 val)
+void tiamc1_sound_device::timer8253_wr(struct timer8253struct *t, int reg, uint8_t val)
{
int chn;
@@ -307,7 +307,7 @@ void tiamc1_sound_device::timer8253_wr(struct timer8253struct *t, int reg, UINT8
}
}
-void tiamc1_sound_device::timer8253_set_gate(struct timer8253struct *t, int chn, UINT8 gate)
+void tiamc1_sound_device::timer8253_set_gate(struct timer8253struct *t, int chn, uint8_t gate)
{
t->channel[chn].gate = gate;
}
diff --git a/src/mame/audio/timeplt.cpp b/src/mame/audio/timeplt.cpp
index fed195048f6..0fab5956c3c 100644
--- a/src/mame/audio/timeplt.cpp
+++ b/src/mame/audio/timeplt.cpp
@@ -22,7 +22,7 @@
const device_type TIMEPLT_AUDIO = &device_creator<timeplt_audio_device>;
-timeplt_audio_device::timeplt_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+timeplt_audio_device::timeplt_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, TIMEPLT_AUDIO, "Time Pilot Audio", tag, owner, clock, "timeplt_audio", __FILE__),
device_sound_interface(mconfig, *this),
m_last_irq_state(0)
diff --git a/src/mame/audio/timeplt.h b/src/mame/audio/timeplt.h
index ec58d71bbf3..c72c3f8755a 100644
--- a/src/mame/audio/timeplt.h
+++ b/src/mame/audio/timeplt.h
@@ -8,7 +8,7 @@ class timeplt_audio_device : public device_t,
public device_sound_interface
{
public:
- timeplt_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ timeplt_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~timeplt_audio_device() {}
DECLARE_WRITE8_MEMBER( sh_irqtrigger_w );
@@ -25,7 +25,7 @@ protected:
private:
// internal state
- UINT8 m_last_irq_state;
+ uint8_t m_last_irq_state;
cpu_device *m_soundcpu;
device_t *m_filter_0_0;
diff --git a/src/mame/audio/trackfld.cpp b/src/mame/audio/trackfld.cpp
index 6f78f861712..69011f75a83 100644
--- a/src/mame/audio/trackfld.cpp
+++ b/src/mame/audio/trackfld.cpp
@@ -13,7 +13,7 @@
const device_type TRACKFLD_AUDIO = &device_creator<trackfld_audio_device>;
-trackfld_audio_device::trackfld_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+trackfld_audio_device::trackfld_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, TRACKFLD_AUDIO, "Track And Field Audio", tag, owner, clock, "trackfld_audio", __FILE__),
device_sound_interface(mconfig, *this),
m_last_addr(0),
@@ -68,7 +68,7 @@ void trackfld_audio_device::device_reset()
READ8_MEMBER( trackfld_audio_device::trackfld_sh_timer_r )
{
- UINT32 clock = space.machine().device<cpu_device>("audiocpu")->total_cycles() / TIMER_RATE;
+ uint32_t clock = space.machine().device<cpu_device>("audiocpu")->total_cycles() / TIMER_RATE;
return clock & 0xF;
}
@@ -99,7 +99,7 @@ WRITE8_MEMBER( trackfld_audio_device::trackfld_sound_w )
READ8_MEMBER( trackfld_audio_device::hyperspt_sh_timer_r )
{
- UINT32 clock = m_audiocpu->total_cycles() / TIMER_RATE;
+ uint32_t clock = m_audiocpu->total_cycles() / TIMER_RATE;
if (m_vlm != nullptr)
return (clock & 0x3) | (m_vlm->bsy() ? 0x04 : 0);
diff --git a/src/mame/audio/trackfld.h b/src/mame/audio/trackfld.h
index e1cf446f6a8..54f0238117e 100644
--- a/src/mame/audio/trackfld.h
+++ b/src/mame/audio/trackfld.h
@@ -7,7 +7,7 @@ class trackfld_audio_device : public device_t,
public device_sound_interface
{
public:
- trackfld_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ trackfld_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~trackfld_audio_device() {}
DECLARE_WRITE8_MEMBER(konami_sh_irqtrigger_w );
diff --git a/src/mame/audio/turbo.cpp b/src/mame/audio/turbo.cpp
index 4cbb79b78a8..47ad4406219 100644
--- a/src/mame/audio/turbo.cpp
+++ b/src/mame/audio/turbo.cpp
@@ -76,7 +76,7 @@ WRITE8_MEMBER(turbo_state::turbo_sound_a_w)
#if (!DISCRETE_TEST)
#endif
#if (!DISCRETE_TEST)
- UINT8 diff = data ^ m_sound_state[0];
+ uint8_t diff = data ^ m_sound_state[0];
#endif
m_sound_state[0] = data;
@@ -124,7 +124,7 @@ WRITE8_MEMBER(turbo_state::turbo_sound_a_w)
WRITE8_MEMBER(turbo_state::turbo_sound_b_w)
{
- UINT8 diff = data ^ m_sound_state[1];
+ uint8_t diff = data ^ m_sound_state[1];
m_sound_state[1] = data;
/* ACC0-ACC5 */
@@ -294,7 +294,7 @@ WRITE8_MEMBER(turbo_state::subroc3d_sound_a_w)
}
-inline void turbo_state::subroc3d_update_volume(int leftchan, UINT8 dis, UINT8 dir)
+inline void turbo_state::subroc3d_update_volume(int leftchan, uint8_t dis, uint8_t dir)
{
float volume = (float)(15 - dis) / 16.0f;
float lvol, rvol;
@@ -316,7 +316,7 @@ inline void turbo_state::subroc3d_update_volume(int leftchan, UINT8 dis, UINT8 d
WRITE8_MEMBER(turbo_state::subroc3d_sound_b_w)
{
- UINT8 diff = data ^ m_sound_state[1];
+ uint8_t diff = data ^ m_sound_state[1];
m_sound_state[1] = data;
/* bit 0 latches direction/volume for missile */
@@ -370,7 +370,7 @@ WRITE8_MEMBER(turbo_state::subroc3d_sound_b_w)
WRITE8_MEMBER(turbo_state::subroc3d_sound_c_w)
{
- UINT8 diff = data ^ m_sound_state[2];
+ uint8_t diff = data ^ m_sound_state[2];
m_sound_state[2] = data;
/* /FIRE TRIG */
@@ -486,7 +486,7 @@ void turbo_state::buckrog_update_samples()
WRITE8_MEMBER(turbo_state::buckrog_sound_a_w)
{
- UINT8 diff = data ^ m_sound_state[0];
+ uint8_t diff = data ^ m_sound_state[0];
m_sound_state[0] = data;
/* clock HIT DIS from bits 0-2 */
@@ -510,7 +510,7 @@ WRITE8_MEMBER(turbo_state::buckrog_sound_a_w)
WRITE8_MEMBER(turbo_state::buckrog_sound_b_w)
{
- UINT8 diff = data ^ m_sound_state[1];
+ uint8_t diff = data ^ m_sound_state[1];
m_sound_state[1] = data;
/* /ALARM3: channel 0 */
diff --git a/src/mame/audio/turrett.cpp b/src/mame/audio/turrett.cpp
index bb1fee907b4..22f2558a9aa 100644
--- a/src/mame/audio/turrett.cpp
+++ b/src/mame/audio/turrett.cpp
@@ -15,7 +15,7 @@
// turrett_device - constructor
//-------------------------------------------------
-turrett_device::turrett_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+turrett_device::turrett_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, TURRETT, "Turret Tower Sound", tag, owner, clock, "ttsnd", __FILE__),
device_sound_interface(mconfig, *this),
device_memory_interface(mconfig, *this),
@@ -91,21 +91,21 @@ void turrett_device::sound_stream_update(sound_stream &stream, stream_sample_t *
if (m_channels[ch].m_playing)
{
- UINT32 &addr = m_channels[ch].m_address;
- INT32 lvol = (m_channels[ch].m_volume >> 16) & 0xff;
- INT32 rvol = m_channels[ch].m_volume & 0xff;
+ uint32_t &addr = m_channels[ch].m_address;
+ int32_t lvol = (m_channels[ch].m_volume >> 16) & 0xff;
+ int32_t rvol = m_channels[ch].m_volume & 0xff;
lvol = m_volume_table[lvol];
rvol = m_volume_table[rvol];
// Channels 30 and 31 expect interleaved stereo samples
- UINT32 incr = (ch >= 30) ? 2 : 1;
+ uint32_t incr = (ch >= 30) ? 2 : 1;
for (int s = 0; s < samples; ++s)
{
- INT16 sample = m_direct->read_word(addr << 1);
+ int16_t sample = m_direct->read_word(addr << 1);
- if ((UINT16)sample == 0x8000)
+ if ((uint16_t)sample == 0x8000)
{
m_channels[ch].m_playing = false;
break;
diff --git a/src/mame/audio/tvc.cpp b/src/mame/audio/tvc.cpp
index 4e8d71d6de5..5212c176c76 100644
--- a/src/mame/audio/tvc.cpp
+++ b/src/mame/audio/tvc.cpp
@@ -16,7 +16,7 @@ const device_type TVC_SOUND = &device_creator<tvc_sound_device>;
// tvc_sound_device - constructor
//-------------------------------------------------
-tvc_sound_device::tvc_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+tvc_sound_device::tvc_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, TVC_SOUND, "TVC 64 Audio Custom", tag, owner, clock, "tvc_sound", __FILE__),
device_sound_interface(mconfig, *this),
m_write_sndint(*this)
@@ -106,7 +106,7 @@ WRITE8_MEMBER(tvc_sound_device::write)
case 0:
{
- UINT16 pitch = (m_ports[0] | (m_ports[1]<<8)) & 0x0fff;
+ uint16_t pitch = (m_ports[0] | (m_ports[1]<<8)) & 0x0fff;
m_freq = (pitch == 0x0fff) ? 0 : (int)(195312.5 / (4096 - pitch));
if ((m_ports[1] & 0x20) && m_freq != 0)
diff --git a/src/mame/audio/tvc.h b/src/mame/audio/tvc.h
index 1103a9c116c..00fb29e899e 100644
--- a/src/mame/audio/tvc.h
+++ b/src/mame/audio/tvc.h
@@ -25,7 +25,7 @@ class tvc_sound_device : public device_t,
{
public:
// construction/destruction
- tvc_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ tvc_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template<class _Object> static devcb_base &set_sndint_wr_callback(device_t &device, _Object object) { return downcast<tvc_sound_device &>(device).m_write_sndint.set_callback(object); }
@@ -48,7 +48,7 @@ private:
int m_volume;
int m_incr;
int m_signal;
- UINT8 m_ports[3];
+ uint8_t m_ports[3];
emu_timer * m_sndint_timer;
devcb_write_line m_write_sndint;
};
diff --git a/src/mame/audio/tx1.cpp b/src/mame/audio/tx1.cpp
index 93de637e22d..86c8de9acf5 100644
--- a/src/mame/audio/tx1.cpp
+++ b/src/mame/audio/tx1.cpp
@@ -53,13 +53,13 @@ static const double tx1_engine_gains[16] =
const device_type TX1 = &device_creator<tx1_sound_device>;
-tx1_sound_device::tx1_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+tx1_sound_device::tx1_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, TX1, "TX-1 Audio Custom", tag, owner, clock, "tx1_sound", __FILE__),
device_sound_interface(mconfig, *this)
{
}
-tx1_sound_device::tx1_sound_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
+tx1_sound_device::tx1_sound_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_sound_interface(mconfig, *this),
m_stream(nullptr),
@@ -251,7 +251,7 @@ static inline void update_engine(int eng[4])
void tx1_sound_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
{
- UINT32 step_0, step_1, step_2;
+ uint32_t step_0, step_1, step_2;
double /*gain_0, gain_1,*/ gain_2, gain_3;
stream_sample_t *fl = &outputs[0][0];
@@ -346,7 +346,7 @@ static const double bb_engine_gains[16] =
const device_type BUGGYBOY = &device_creator<buggyboy_sound_device>;
-buggyboy_sound_device::buggyboy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+buggyboy_sound_device::buggyboy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: tx1_sound_device(mconfig, BUGGYBOY, "Buggy Boy Audio Custom", tag, owner, clock, "buggyboy_sound", __FILE__)
{
}
@@ -499,7 +499,7 @@ void buggyboy_sound_device::sound_stream_update(sound_stream &stream, stream_sam
{
/* This is admittedly a bit of a hack job... */
- UINT32 step_0, step_1;
+ uint32_t step_0, step_1;
int n1_en, n2_en;
double gain0, gain1_l, gain1_r;
diff --git a/src/mame/audio/vboy.cpp b/src/mame/audio/vboy.cpp
index f8c21cee315..7bf9f28d4e8 100644
--- a/src/mame/audio/vboy.cpp
+++ b/src/mame/audio/vboy.cpp
@@ -34,7 +34,7 @@ const device_type VBOYSND = &device_creator<vboysnd_device>;
#define S5SWP 0x51c
#define SST0P 0x580
-static const UINT16 outTbl[64][32] = {
+static const uint16_t outTbl[64][32] = {
{ 0x0000, 0xffe0, 0xffc0, 0xffa0, 0xff80, 0xff60, 0xff40, 0xff20, 0xff00, 0xfee0, 0xfec0, 0xfea0, 0xfe80, 0xfe60, 0xfe40, 0xfe20,
0xfe00, 0xfde0, 0xfdc0, 0xfda0, 0xfd80, 0xfd60, 0xfd40, 0xfd20, 0xfd00, 0xfce0, 0xfcc0, 0xfca0, 0xfc80, 0xfc60, 0xfc40, 0xfc20},
{ 0x0000, 0xffe1, 0xffc2, 0xffa3, 0xff84, 0xff65, 0xff46, 0xff27, 0xff08, 0xfee9, 0xfeca, 0xfeab, 0xfe8c, 0xfe6d, 0xfe4e, 0xfe2f,
@@ -165,7 +165,7 @@ static const UINT16 outTbl[64][32] = {
0x01f0, 0x020f, 0x022e, 0x024d, 0x026c, 0x028b, 0x02aa, 0x02c9, 0x02e8, 0x0307, 0x0326, 0x0345, 0x0364, 0x0383, 0x03a2, 0x03c1}
};
-static const INT8 outLvlTbl[16][16] = {
+static const int8_t outLvlTbl[16][16] = {
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{ 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2},
{ 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4},
@@ -184,8 +184,8 @@ static const INT8 outLvlTbl[16][16] = {
{ 0, 2, 4, 6, 8, 10, 12, 14, 16, 17, 19, 21, 23, 25, 27, 29}
};
-static inline UINT8 mgetb(register UINT8 *ptr) { return *ptr; }
-static inline void mputb(UINT8 *ptr, INT8 data) { *ptr = data; }
+static inline uint8_t mgetb(register uint8_t *ptr) { return *ptr; }
+static inline void mputb(uint8_t *ptr, int8_t data) { *ptr = data; }
//**************************************************************************
// LIVE DEVICE
@@ -195,7 +195,7 @@ static inline void mputb(UINT8 *ptr, INT8 data) { *ptr = data; }
// vboysnd_device - constructor
//-------------------------------------------------
-vboysnd_device::vboysnd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+vboysnd_device::vboysnd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, VBOYSND, "Virtual Boy audio", tag, owner, clock, "vboysnd", __FILE__),
device_sound_interface(mconfig, *this)
{
@@ -282,8 +282,8 @@ void vboysnd_device::sound_stream_update(sound_stream &stream, stream_sample_t *
size = (float)snd_channel[channel].sample_len / 32.0f;
for (j=0; j<32;)
{
- INT8 byte = mgetb(m_aram + waveAddr + (j++ << 2)) & 0x3f;
-// INT8 nbyte = mgetb(m_aram + waveAddr + (j << 2)) & 0x3f;
+ int8_t byte = mgetb(m_aram + waveAddr + (j++ << 2)) & 0x3f;
+// int8_t nbyte = mgetb(m_aram + waveAddr + (j << 2)) & 0x3f;
int end = (int)(((float)j)*size);
float val, add;
@@ -293,25 +293,25 @@ void vboysnd_device::sound_stream_update(sound_stream &stream, stream_sample_t *
for (; k<end; k++, val+=add)
{
#ifdef LAME_COMPILER_BUG
- if ((INT32)&snd_channel[channel].sample[k] == (INT32)&snd_channel[channel].offset)
+ if ((int32_t)&snd_channel[channel].sample[k] == (int32_t)&snd_channel[channel].offset)
Debugger();
#endif
- snd_channel[channel].sample[k] = ((UINT8)val);
+ snd_channel[channel].sample[k] = ((uint8_t)val);
}
}
}
for (j=0; j<len; j++)
{
- INT32 note_left = 0;
- INT32 note_right = 0;
+ int32_t note_left = 0;
+ int32_t note_right = 0;
// process first 4 sound channels
for (i=0; i</*5*/5; i++)
{
- UINT8 outLeft, outRight;
- const INT16 *outTblPtr;
-// UINT8 env0, env1;
+ uint8_t outLeft, outRight;
+ const int16_t *outTblPtr;
+// uint8_t env0, env1;
s_snd_channel *channel = &snd_channel[i];
if (!channel->playing)
@@ -319,12 +319,12 @@ void vboysnd_device::sound_stream_update(sound_stream &stream, stream_sample_t *
outLeft = outLvlTbl[channel->volLeft][channel->envelope];
outRight = outLvlTbl[channel->volRight][channel->envelope];
-// env1 = ((UINT8)mgetb(m_aram+SxEV1b+i*0x40));
+// env1 = ((uint8_t)mgetb(m_aram+SxEV1b+i*0x40));
if (channel->env1 & 0x01)
{
channel->env_time++;
-// env0 = ((UINT8)mgetb(m_aram+SxEV0b+i*0x40));
+// env0 = ((uint8_t)mgetb(m_aram+SxEV0b+i*0x40));
if (channel->env_time >= channel->env_steptime /*waveEnv2LenTbl[env0 & 0x7]*/)
{
// it's time for a step
@@ -352,7 +352,7 @@ void vboysnd_device::sound_stream_update(sound_stream &stream, stream_sample_t *
}
}
- outTblPtr = (INT16 *) outTbl[channel->sample[channel->offset]];
+ outTblPtr = (int16_t *) outTbl[channel->sample[channel->offset]];
if (outLeft) note_left += outTblPtr[outLeft ];
if (outRight) note_right += outTblPtr[outRight];
channel->offset++;
@@ -377,8 +377,8 @@ void vboysnd_device::sound_stream_update(sound_stream &stream, stream_sample_t *
if (note_right < -32767) note_right = -32767;
if (note_right > 32767) note_right = 32767;
- *(outL++) = ((INT16)note_left);
- *(outR++) = ((INT16)note_right);
+ *(outL++) = ((int16_t)note_left);
+ *(outR++) = ((int16_t)note_right);
}
}
@@ -403,7 +403,7 @@ WRITE8_MEMBER( vboysnd_device::write )
int volReg, intervalReg;
int channel, ouroffs;
- mputb((UINT8 *)m_aram+offset, data);
+ mputb((uint8_t *)m_aram+offset, data);
if (offset < 0x400)
return;
@@ -430,15 +430,15 @@ WRITE8_MEMBER( vboysnd_device::write )
volReg = mgetb(m_aram + SxLRVb + i); // 6-4-4 - L/R output level setting
if (snd_channel[channel].playing)
{
- snd_channel[channel].volLeft = ((UINT8)volReg) >> 4;
- snd_channel[channel].volRight = ((UINT8)volReg) & 0xf;
+ snd_channel[channel].volLeft = ((uint8_t)volReg) >> 4;
+ snd_channel[channel].volRight = ((uint8_t)volReg) & 0xf;
break;
}
}
case SxINT:
if (channel < 5)
{
- UINT8 env0, env1;
+ uint8_t env0, env1;
// find out if the sound is playing
intervalReg = mgetb(m_aram + SxINTb + i); // 6-4-6 - Sound Interval
volReg = mgetb(m_aram + SxLRVb + i); // 6-4-4 - L/R output level setting
@@ -459,14 +459,14 @@ WRITE8_MEMBER( vboysnd_device::write )
env0 = mgetb(m_aram+SxEV0b+i); env1 = mgetb(m_aram+SxEV1b+i);
snd_channel[channel].env0 = env0;
snd_channel[channel].env1 = env1;
- snd_channel[channel].volLeft = ((UINT8)volReg) >> 4;
- snd_channel[channel].volRight = ((UINT8)volReg) & 0xf;
+ snd_channel[channel].volLeft = ((uint8_t)volReg) >> 4;
+ snd_channel[channel].volRight = ((uint8_t)volReg) & 0xf;
snd_channel[channel].env_steptime = (env1 & 0x1) ? waveEnv2LenTbl[env0 & 0x7] : 0;
snd_channel[channel].sample_len = waveFreq2LenTbl[freq];
snd_channel[channel].offset = 0;
snd_channel[channel].time = (intervalReg & 0x20) ? waveTimer2LenTbl[intervalReg & 0x1f] : 0;
- snd_channel[channel].envelope = ((UINT8)mgetb(m_aram+SxEV0b+i)) >> 4;
+ snd_channel[channel].envelope = ((uint8_t)mgetb(m_aram+SxEV0b+i)) >> 4;
snd_channel[channel].env_time = 0;
}
else
@@ -487,7 +487,7 @@ WRITE8_MEMBER( vboysnd_device::write )
case SxEV0:
if (channel < 5)
if (snd_channel[channel].playing)
- snd_channel[channel].envelope = ((UINT8)mgetb(m_aram+SxEV0b+i)) >> 4;
+ snd_channel[channel].envelope = ((uint8_t)mgetb(m_aram+SxEV0b+i)) >> 4;
break;
}
}
diff --git a/src/mame/audio/vboy.h b/src/mame/audio/vboy.h
index f3d85d60c6f..fce19d5b5b4 100644
--- a/src/mame/audio/vboy.h
+++ b/src/mame/audio/vboy.h
@@ -34,32 +34,32 @@
//**************************************************************************
struct s_snd_channel {
- INT8 playing; // the sound is playing
+ int8_t playing; // the sound is playing
// state when sound was enabled
- UINT32 env_steptime; // Envelope step time
- UINT8 env0; // Envelope data
- UINT8 env1; // Envelope data
- UINT8 volLeft; // Left output volume
- UINT8 volRight; // Right output volume
- UINT8 sample[580]; // sample to play
+ uint32_t env_steptime; // Envelope step time
+ uint8_t env0; // Envelope data
+ uint8_t env1; // Envelope data
+ uint8_t volLeft; // Left output volume
+ uint8_t volRight; // Right output volume
+ uint8_t sample[580]; // sample to play
int sample_len; // length of sample
// values that change, as the sample is played
int offset; // current offset in sample
int time; // the duration that this sample is to be played
- UINT8 envelope; // Current envelope level (604)
+ uint8_t envelope; // Current envelope level (604)
int env_time; // The duration between envelope decay/grow (608)
};
struct s_regchan {
- INT32 sINT;
- INT32 sLRV;
- INT32 sFQL;
- INT32 sFQH;
- INT32 sEV0;
- INT32 sEV1;
- INT32 sRAM;
+ int32_t sINT;
+ int32_t sLRV;
+ int32_t sFQL;
+ int32_t sFQH;
+ int32_t sEV0;
+ int32_t sEV1;
+ int32_t sRAM;
};
struct s_sreg {
@@ -73,7 +73,7 @@ class vboysnd_device : public device_t, public device_sound_interface
{
public:
// construction/destruction
- vboysnd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ vboysnd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8_MEMBER(read);
DECLARE_WRITE8_MEMBER(write);
@@ -90,13 +90,13 @@ protected:
s_snd_channel snd_channel[5];
- UINT16 waveFreq2LenTbl[2048];
- UINT16 waveTimer2LenTbl[32];
- UINT16 waveEnv2LenTbl[8];
+ uint16_t waveFreq2LenTbl[2048];
+ uint16_t waveTimer2LenTbl[32];
+ uint16_t waveEnv2LenTbl[8];
emu_timer *m_timer;
- UINT8 m_aram[0x600];
+ uint8_t m_aram[0x600];
};
// device type definition
diff --git a/src/mame/audio/vc4000.cpp b/src/mame/audio/vc4000.cpp
index cbc09c1a909..08f9a9a0e94 100644
--- a/src/mame/audio/vc4000.cpp
+++ b/src/mame/audio/vc4000.cpp
@@ -12,7 +12,7 @@
const device_type VC4000_SND = &device_creator<vc4000_sound_device>;
-vc4000_sound_device::vc4000_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+vc4000_sound_device::vc4000_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, VC4000_SND, "Intertion Electronic VC 4000 Audio Custom", tag, owner, clock, "vc4000_sound", __FILE__),
device_sound_interface(mconfig, *this),
m_channel(nullptr),
@@ -20,7 +20,7 @@ vc4000_sound_device::vc4000_sound_device(const machine_config &mconfig, const ch
m_pos(0),
m_level(0)
{
- memset(m_reg, 0, sizeof(UINT8)*1);
+ memset(m_reg, 0, sizeof(uint8_t)*1);
}
diff --git a/src/mame/audio/vc4000.h b/src/mame/audio/vc4000.h
index 67c284f878e..7bcb82825c7 100644
--- a/src/mame/audio/vc4000.h
+++ b/src/mame/audio/vc4000.h
@@ -21,7 +21,7 @@ class vc4000_sound_device : public device_t,
public device_sound_interface
{
public:
- vc4000_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ vc4000_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~vc4000_sound_device() { }
protected:
@@ -36,7 +36,7 @@ public:
private:
sound_stream *m_channel;
- UINT8 m_reg[1];
+ uint8_t m_reg[1];
int m_size;
int m_pos;
unsigned m_level;
diff --git a/src/mame/audio/warpwarp.cpp b/src/mame/audio/warpwarp.cpp
index d0c17d54d77..bf9cd9d2d8d 100644
--- a/src/mame/audio/warpwarp.cpp
+++ b/src/mame/audio/warpwarp.cpp
@@ -18,7 +18,7 @@
const device_type WARPWARP = &device_creator<warpwarp_sound_device>;
-warpwarp_sound_device::warpwarp_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+warpwarp_sound_device::warpwarp_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, WARPWARP, "Warp Warp Audio Custom", tag, owner, clock, "warpwarp_sound", __FILE__),
device_sound_interface(mconfig, *this),
m_decay(nullptr),
@@ -48,10 +48,10 @@ warpwarp_sound_device::warpwarp_sound_device(const machine_config &mconfig, cons
void warpwarp_sound_device::device_start()
{
- m_decay = std::make_unique<INT16[]>(32768);
+ m_decay = std::make_unique<int16_t[]>(32768);
for (int i = 0; i < 0x8000; i++)
- m_decay[0x7fff - i] = (INT16) (0x7fff/exp(1.0*i/4096));
+ m_decay[0x7fff - i] = (int16_t) (0x7fff/exp(1.0*i/4096));
m_channel = machine().sound().stream_alloc(*this, 0, 1, CLOCK_16H);
diff --git a/src/mame/audio/warpwarp.h b/src/mame/audio/warpwarp.h
index 2dc173ed992..a4e96df0dde 100644
--- a/src/mame/audio/warpwarp.h
+++ b/src/mame/audio/warpwarp.h
@@ -5,7 +5,7 @@ class warpwarp_sound_device : public device_t,
public device_sound_interface
{
public:
- warpwarp_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ warpwarp_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
enum
{
@@ -29,7 +29,7 @@ protected:
private:
// internal state
- std::unique_ptr<INT16[]> m_decay;
+ std::unique_ptr<int16_t[]> m_decay;
sound_stream *m_channel;
int m_sound_latch;
int m_music1_latch;
diff --git a/src/mame/audio/williams.cpp b/src/mame/audio/williams.cpp
index f5a5aca24a2..9dc2206340c 100644
--- a/src/mame/audio/williams.cpp
+++ b/src/mame/audio/williams.cpp
@@ -70,7 +70,7 @@ extern const device_type WILLIAMS_ADPCM_SOUND = &device_creator<williams_adpcm_s
// williams_cvsd_sound_device - constructor
//-------------------------------------------------
-williams_cvsd_sound_device::williams_cvsd_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+williams_cvsd_sound_device::williams_cvsd_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, WILLIAMS_CVSD_SOUND, "Williams CVSD Sound Board", tag, owner, clock, "wmscvsd", __FILE__),
device_mixer_interface(mconfig, *this),
m_cpu(*this, "cpu"),
@@ -248,7 +248,7 @@ machine_config_constructor williams_cvsd_sound_device::device_mconfig_additions(
void williams_cvsd_sound_device::device_start()
{
// configure master CPU banks
- UINT8 *rom = memregion("cpu")->base();
+ uint8_t *rom = memregion("cpu")->base();
for (int bank = 0; bank < 16; bank++)
{
//
@@ -304,7 +304,7 @@ void williams_cvsd_sound_device::device_timer(emu_timer &timer, device_timer_id
// williams_narc_sound_device - constructor
//-------------------------------------------------
-williams_narc_sound_device::williams_narc_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+williams_narc_sound_device::williams_narc_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, WILLIAMS_NARC_SOUND, "Williams NARC Sound Board", tag, owner, clock, "wmsnarc", __FILE__),
device_mixer_interface(mconfig, *this),
m_cpu0(*this, "cpu0"),
@@ -586,7 +586,7 @@ machine_config_constructor williams_narc_sound_device::device_mconfig_additions(
void williams_narc_sound_device::device_start()
{
// configure master CPU banks
- UINT8 *rom = memregion("cpu0")->base();
+ uint8_t *rom = memregion("cpu0")->base();
for (int bank = 0; bank < 16; bank++)
{
//
@@ -677,7 +677,7 @@ void williams_narc_sound_device::device_timer(emu_timer &timer, device_timer_id
// williams_adpcm_sound_device - constructor
//-------------------------------------------------
-williams_adpcm_sound_device::williams_adpcm_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+williams_adpcm_sound_device::williams_adpcm_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, WILLIAMS_ADPCM_SOUND, "Williams ADPCM Sound Board", tag, owner, clock, "wmsadpcm", __FILE__),
device_mixer_interface(mconfig, *this),
m_cpu(*this, "cpu"),
@@ -856,7 +856,7 @@ machine_config_constructor williams_adpcm_sound_device::device_mconfig_additions
void williams_adpcm_sound_device::device_start()
{
// configure banks
- UINT8 *rom = memregion("cpu")->base();
+ uint8_t *rom = memregion("cpu")->base();
membank("rombank")->configure_entries(0, 8, &rom[0x10000], 0x8000);
membank("romupper")->set_base(&rom[0x10000 + 0x4000 + 7 * 0x8000]);
diff --git a/src/mame/audio/williams.h b/src/mame/audio/williams.h
index aa0e8019b0a..7cde77968a9 100644
--- a/src/mame/audio/williams.h
+++ b/src/mame/audio/williams.h
@@ -38,7 +38,7 @@ class williams_cvsd_sound_device : public device_t,
{
public:
// construction/destruction
- williams_cvsd_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ williams_cvsd_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// read/write
DECLARE_WRITE16_MEMBER(write);
@@ -67,7 +67,7 @@ private:
required_device<hc55516_device> m_hc55516;
// internal state
- UINT8 m_talkback;
+ uint8_t m_talkback;
};
@@ -78,7 +78,7 @@ class williams_narc_sound_device : public device_t,
{
public:
// construction/destruction
- williams_narc_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ williams_narc_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// read/write
DECLARE_READ16_MEMBER(read);
@@ -121,11 +121,11 @@ private:
required_device<hc55516_device> m_hc55516;
// internal state
- UINT8 m_latch;
- UINT8 m_latch2;
- UINT8 m_talkback;
- UINT8 m_audio_sync;
- UINT8 m_sound_int_state;
+ uint8_t m_latch;
+ uint8_t m_latch2;
+ uint8_t m_talkback;
+ uint8_t m_audio_sync;
+ uint8_t m_sound_int_state;
};
@@ -136,7 +136,7 @@ class williams_adpcm_sound_device : public device_t,
{
public:
// construction/destruction
- williams_adpcm_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ williams_adpcm_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// read/write
DECLARE_WRITE16_MEMBER(write);
@@ -169,7 +169,7 @@ private:
required_device<m6809e_device> m_cpu;
// internal state
- UINT8 m_latch;
- UINT8 m_talkback;
- UINT8 m_sound_int_state;
+ uint8_t m_latch;
+ uint8_t m_talkback;
+ uint8_t m_sound_int_state;
};
diff --git a/src/mame/audio/wiping.cpp b/src/mame/audio/wiping.cpp
index 38925e08c37..14ad7398c91 100644
--- a/src/mame/audio/wiping.cpp
+++ b/src/mame/audio/wiping.cpp
@@ -16,7 +16,7 @@ static const int defgain = 48;
const device_type WIPING = &device_creator<wiping_sound_device>;
-wiping_sound_device::wiping_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+wiping_sound_device::wiping_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, WIPING, "Wiping Audio Custom", tag, owner, clock, "wiping_sound", __FILE__),
device_sound_interface(mconfig, *this),
m_last_channel(nullptr),
@@ -31,7 +31,7 @@ wiping_sound_device::wiping_sound_device(const machine_config &mconfig, const ch
m_mixer_buffer_2(nullptr)
{
memset(m_channel_list, 0, sizeof(wp_sound_channel)*MAX_VOICES);
- memset(m_soundregs, 0, sizeof(UINT8)*0x4000);
+ memset(m_soundregs, 0, sizeof(uint8_t)*0x4000);
}
@@ -91,7 +91,7 @@ void wiping_sound_device::make_mixer_table(int voices, int gain)
int i;
/* allocate memory */
- m_mixer_table = make_unique_clear<INT16[]>(256 * voices);
+ m_mixer_table = make_unique_clear<int16_t[]>(256 * voices);
/* find the middle of the table */
m_mixer_lookup = m_mixer_table.get() + (128 * voices);
@@ -185,7 +185,7 @@ void wiping_sound_device::sound_stream_update(sound_stream &stream, stream_sampl
/* only update if we have non-zero volume and frequency */
if (v && f)
{
- const UINT8 *w = voice->wave;
+ const uint8_t *w = voice->wave;
int c = voice->counter;
mix = m_mixer_buffer.get();
diff --git a/src/mame/audio/wiping.h b/src/mame/audio/wiping.h
index f891ae8f5d8..5c9df701148 100644
--- a/src/mame/audio/wiping.h
+++ b/src/mame/audio/wiping.h
@@ -9,7 +9,7 @@ struct wp_sound_channel
int frequency;
int counter;
int volume;
- const UINT8 *wave;
+ const uint8_t *wave;
int oneshot;
int oneshotplaying;
};
@@ -18,7 +18,7 @@ class wiping_sound_device : public device_t,
public device_sound_interface
{
public:
- wiping_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ wiping_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~wiping_sound_device() {}
DECLARE_WRITE8_MEMBER( sound_w );
@@ -38,19 +38,19 @@ private:
wp_sound_channel *m_last_channel;
/* global sound parameters */
- const UINT8 *m_sound_prom;
- const UINT8 *m_sound_rom;
+ const uint8_t *m_sound_prom;
+ const uint8_t *m_sound_rom;
int m_num_voices;
int m_sound_enable;
sound_stream *m_stream;
/* mixer tables and internal buffers */
- std::unique_ptr<INT16[]> m_mixer_table;
- INT16 *m_mixer_lookup;
+ std::unique_ptr<int16_t[]> m_mixer_table;
+ int16_t *m_mixer_lookup;
std::unique_ptr<short[]> m_mixer_buffer;
std::unique_ptr<short[]> m_mixer_buffer_2;
- UINT8 m_soundregs[0x4000];
+ uint8_t m_soundregs[0x4000];
void make_mixer_table(int voices, int gain);
};
diff --git a/src/mame/audio/wow.cpp b/src/mame/audio/wow.cpp
index 423e8630bb2..e09cd7b57de 100644
--- a/src/mame/audio/wow.cpp
+++ b/src/mame/audio/wow.cpp
@@ -103,7 +103,7 @@ const char *const wow_sample_names[] =
READ8_MEMBER( astrocde_state::wow_speech_r )
{
- UINT8 data = offset >> 8;
+ uint8_t data = offset >> 8;
#if USE_FAKE_VOTRAX
int Phoneme/*, Intonation*/;
int i = 0;
diff --git a/src/mame/audio/wpcsnd.cpp b/src/mame/audio/wpcsnd.cpp
index bdd5613b707..f903e93199a 100644
--- a/src/mame/audio/wpcsnd.cpp
+++ b/src/mame/audio/wpcsnd.cpp
@@ -15,7 +15,7 @@
const device_type WPCSND = &device_creator<wpcsnd_device>;
-wpcsnd_device::wpcsnd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+wpcsnd_device::wpcsnd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig,WPCSND,"Williams WPC Sound",tag,owner,clock, "wpcsnd", __FILE__),
device_mixer_interface(mconfig, *this),
m_cpu(*this, "bgcpu"),
@@ -42,23 +42,23 @@ static ADDRESS_MAP_START( wpcsnd_map, AS_PROGRAM, 8, wpcsnd_device )
AM_RANGE(0xc000, 0xffff) AM_ROMBANK("fixed")
ADDRESS_MAP_END
-void wpcsnd_device::ctrl_w(UINT8 data)
+void wpcsnd_device::ctrl_w(uint8_t data)
{
m_cpu->set_input_line(INPUT_LINE_RESET,PULSE_LINE);
}
-void wpcsnd_device::data_w(UINT8 data)
+void wpcsnd_device::data_w(uint8_t data)
{
m_latch = data;
m_cpu->set_input_line(M6809_IRQ_LINE,ASSERT_LINE);
}
-UINT8 wpcsnd_device::ctrl_r()
+uint8_t wpcsnd_device::ctrl_r()
{
return (m_reply_available) ? 0x01 : 0x00;
}
-UINT8 wpcsnd_device::data_r()
+uint8_t wpcsnd_device::data_r()
{
m_reply_available = false;
m_reply_cb(m_cpu->space(AS_PROGRAM),0);
@@ -95,7 +95,7 @@ void wpcsnd_device::device_start()
void wpcsnd_device::device_reset()
{
- UINT8* ROM = m_rom->base();
+ uint8_t* ROM = m_rom->base();
m_cpubank->configure_entries(0, 0x80, &ROM[0], 0x8000);
m_cpubank->set_entry(0);
m_fixedbank->configure_entries(0, 1, &ROM[0x17c000], 0x4000);
@@ -132,7 +132,7 @@ WRITE8_MEMBER( wpcsnd_device::bg_speech_digit_w )
WRITE8_MEMBER( wpcsnd_device::rombank_w )
{
- UINT8 bank = data & 0x0f;
+ uint8_t bank = data & 0x0f;
switch((~data) & 0xe0)
{
diff --git a/src/mame/audio/wpcsnd.h b/src/mame/audio/wpcsnd.h
index badaaef58e7..2fd33d03d1f 100644
--- a/src/mame/audio/wpcsnd.h
+++ b/src/mame/audio/wpcsnd.h
@@ -27,7 +27,7 @@ class wpcsnd_device : public device_t,
{
public:
// construction/destruction
- wpcsnd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ wpcsnd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
required_device<cpu_device> m_cpu;
required_device<ym2151_device> m_ym2151;
@@ -44,10 +44,10 @@ public:
DECLARE_WRITE8_MEMBER(latch_w);
DECLARE_WRITE8_MEMBER(volume_w);
- void ctrl_w(UINT8 data);
- void data_w(UINT8 data);
- UINT8 ctrl_r();
- UINT8 data_r();
+ void ctrl_w(uint8_t data);
+ void data_w(uint8_t data);
+ uint8_t ctrl_r();
+ uint8_t data_r();
static void static_set_romregion(device_t &device, const char *tag);
@@ -61,8 +61,8 @@ protected:
virtual machine_config_constructor device_mconfig_additions() const override;
private:
- UINT8 m_latch;
- UINT8 m_reply;
+ uint8_t m_latch;
+ uint8_t m_reply;
bool m_reply_available;
// callback
diff --git a/src/mame/audio/wswan.cpp b/src/mame/audio/wswan.cpp
index 1eb25d0d55d..377b4a5e19d 100644
--- a/src/mame/audio/wswan.cpp
+++ b/src/mame/audio/wswan.cpp
@@ -28,7 +28,7 @@ const device_type WSWAN_SND = &device_creator<wswan_sound_device>;
// wswan_sound_device - constructor
//-------------------------------------------------
-wswan_sound_device::wswan_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+wswan_sound_device::wswan_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, WSWAN_SND, "WonderSwan Audio Custom", tag, owner, clock, "wswan_sound", __FILE__),
device_sound_interface(mconfig, *this),
m_channel(nullptr),
@@ -214,7 +214,7 @@ void wswan_sound_device::sound_stream_update(sound_stream &stream, stream_sample
if (m_noise_enable)
{
- UINT16 new_bit = 0;
+ uint16_t new_bit = 0;
if (m_noise_type == 0)
{
@@ -254,7 +254,7 @@ void wswan_sound_device::sound_stream_update(sound_stream &stream, stream_sample
}
-void wswan_sound_device::wswan_ch_set_freq( CHAN *ch, UINT16 freq )
+void wswan_sound_device::wswan_ch_set_freq( CHAN *ch, uint16_t freq )
{
freq &= 0x7ff; // docs say freq is 11bits and a few games (Morita Shougi, World Stadium + others) write 0x800 causing a divide by 0 crash
ch->freq = freq;
@@ -321,7 +321,7 @@ WRITE8_MEMBER( wswan_sound_device::port_w )
break;
case 0x8C: /* Sweep step */
- m_sweep_step = (INT8)data;
+ m_sweep_step = (int8_t)data;
break;
case 0x8D: /* Sweep time */
diff --git a/src/mame/audio/wswan.h b/src/mame/audio/wswan.h
index 90e9c5746f9..c47443ed525 100644
--- a/src/mame/audio/wswan.h
+++ b/src/mame/audio/wswan.h
@@ -28,13 +28,13 @@ struct CHAN
on(0),
signal(0) { }
- UINT16 freq; /* frequency */
- UINT32 period; /* period */
- UINT32 pos; /* position */
- UINT8 vol_left; /* volume left */
- UINT8 vol_right; /* volume right */
- UINT8 on; /* on/off */
- INT8 signal; /* signal */
+ uint16_t freq; /* frequency */
+ uint32_t period; /* period */
+ uint32_t pos; /* position */
+ uint8_t vol_left; /* volume left */
+ uint8_t vol_right; /* volume right */
+ uint8_t on; /* on/off */
+ int8_t signal; /* signal */
};
@@ -44,7 +44,7 @@ class wswan_sound_device : public device_t,
public device_sound_interface
{
public:
- wswan_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ wswan_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~wswan_sound_device() { }
protected:
@@ -59,7 +59,7 @@ public:
DECLARE_WRITE8_MEMBER( port_w );
private:
- void wswan_ch_set_freq( CHAN *ch, UINT16 freq );
+ void wswan_ch_set_freq( CHAN *ch, uint16_t freq );
private:
sound_stream *m_channel;
@@ -67,23 +67,23 @@ private:
CHAN m_audio2; /* Audio channel 2 */
CHAN m_audio3; /* Audio channel 3 */
CHAN m_audio4; /* Audio channel 4 */
- INT8 m_sweep_step; /* Sweep step */
- UINT32 m_sweep_time; /* Sweep time */
- UINT32 m_sweep_count; /* Sweep counter */
- UINT8 m_noise_type; /* Noise generator type */
- UINT8 m_noise_reset; /* Noise reset */
- UINT8 m_noise_enable; /* Noise enable */
- UINT16 m_sample_address; /* Sample address */
- UINT8 m_audio2_voice; /* Audio 2 voice */
- UINT8 m_audio3_sweep; /* Audio 3 sweep */
- UINT8 m_audio4_noise; /* Audio 4 noise */
- UINT8 m_mono; /* mono */
- UINT8 m_voice_data; /* voice data */
- UINT8 m_output_volume; /* output volume */
- UINT8 m_external_stereo; /* external stereo */
- UINT8 m_external_speaker; /* external speaker */
- UINT16 m_noise_shift; /* Noise counter shift register */
- UINT8 m_master_volume; /* Master volume */
+ int8_t m_sweep_step; /* Sweep step */
+ uint32_t m_sweep_time; /* Sweep time */
+ uint32_t m_sweep_count; /* Sweep counter */
+ uint8_t m_noise_type; /* Noise generator type */
+ uint8_t m_noise_reset; /* Noise reset */
+ uint8_t m_noise_enable; /* Noise enable */
+ uint16_t m_sample_address; /* Sample address */
+ uint8_t m_audio2_voice; /* Audio 2 voice */
+ uint8_t m_audio3_sweep; /* Audio 3 sweep */
+ uint8_t m_audio4_noise; /* Audio 4 noise */
+ uint8_t m_mono; /* mono */
+ uint8_t m_voice_data; /* voice data */
+ uint8_t m_output_volume; /* output volume */
+ uint8_t m_external_stereo; /* external stereo */
+ uint8_t m_external_speaker; /* external speaker */
+ uint16_t m_noise_shift; /* Noise counter shift register */
+ uint8_t m_master_volume; /* Master volume */
};
extern const device_type WSWAN_SND;
diff --git a/src/mame/audio/zaccaria.cpp b/src/mame/audio/zaccaria.cpp
index afb065e6968..04c06958195 100644
--- a/src/mame/audio/zaccaria.cpp
+++ b/src/mame/audio/zaccaria.cpp
@@ -242,7 +242,7 @@ zac1b111xx_melody_base::zac1b111xx_melody_base(
char const *name,
char const *tag,
device_t *owner,
- UINT32 clock,
+ uint32_t clock,
char const *shortname,
char const *source)
: device_t(mconfig, devtype, name, tag, owner, clock, shortname, source)
@@ -257,8 +257,8 @@ zac1b111xx_melody_base::zac1b111xx_melody_base(
READ8_MEMBER(zac1b111xx_melody_base::melodypia_porta_r)
{
- UINT8 const control = m_melodypia->b_output();
- UINT8 data = 0xff;
+ uint8_t const control = m_melodypia->b_output();
+ uint8_t data = 0xff;
if (0x01 == (control & 0x03))
data &= m_melodypsg1->data_r(space, 0);
@@ -271,7 +271,7 @@ READ8_MEMBER(zac1b111xx_melody_base::melodypia_porta_r)
WRITE8_MEMBER(zac1b111xx_melody_base::melodypia_porta_w)
{
- UINT8 const control = m_melodypia->b_output();
+ uint8_t const control = m_melodypia->b_output();
if (control & 0x02)
m_melodypsg1->data_address_w(space, (control >> 0) & 0x01, data);
@@ -310,7 +310,7 @@ void zac1b111xx_melody_base::device_reset()
// 1B11107-SPECIFIC IMPLEMENTATION
//**************************************************************************
-zac1b11107_audio_device::zac1b11107_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, UINT32 clock)
+zac1b11107_audio_device::zac1b11107_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock)
: zac1b111xx_melody_base(mconfig, ZACCARIA_1B11107, "Zaccaria 1B11107 Sound Board", tag, owner, clock, "zac1b11107", __FILE__)
{
}
@@ -364,7 +364,7 @@ machine_config_constructor zac1b11107_audio_device::device_mconfig_additions() c
// 1B11142-SPECIFIC IMPLEMENTATION
//**************************************************************************
-zac1b11142_audio_device::zac1b11142_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, UINT32 clock)
+zac1b11142_audio_device::zac1b11142_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock)
: zac1b111xx_melody_base(mconfig, ZACCARIA_1B11142, "Zaccaria 1B11142 Sound Board", tag, owner, clock, "zac1b11142", __FILE__)
, m_acs_cb(*this)
, m_audiocpu(*this, "audiocpu")
diff --git a/src/mame/audio/zaccaria.h b/src/mame/audio/zaccaria.h
index 5cab5da41c8..b4557ab96b3 100644
--- a/src/mame/audio/zaccaria.h
+++ b/src/mame/audio/zaccaria.h
@@ -43,7 +43,7 @@ public:
char const *name,
char const *tag,
device_t *owner,
- UINT32 clock,
+ uint32_t clock,
char const *shortname,
char const *source);
@@ -61,14 +61,14 @@ protected:
required_device<ay8910_device> m_melodypsg1;
required_device<ay8910_device> m_melodypsg2;
- UINT8 m_melody_command;
+ uint8_t m_melody_command;
};
class zac1b11107_audio_device : public zac1b111xx_melody_base
{
public:
- zac1b11107_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, UINT32 clock);
+ zac1b11107_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock);
// host interface
DECLARE_WRITE8_MEMBER(sound_w);
@@ -89,7 +89,7 @@ public:
template<class _Object> static devcb_base &static_set_acs_cb(device_t &device, _Object object)
{ return downcast<zac1b11142_audio_device &>(device).m_acs_cb.set_callback(object); }
- zac1b11142_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, UINT32 clock);
+ zac1b11142_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock);
// host interface
DECLARE_WRITE8_MEMBER(hs_w);
@@ -123,7 +123,7 @@ protected:
required_ioport m_inputs;
- UINT8 m_host_command;
+ uint8_t m_host_command;
};
#endif // __AUDIO_ZACCARIA_H__
diff --git a/src/mame/audio/zaxxon.cpp b/src/mame/audio/zaxxon.cpp
index 9fc5387f639..0c0d194c877 100644
--- a/src/mame/audio/zaxxon.cpp
+++ b/src/mame/audio/zaxxon.cpp
@@ -109,7 +109,7 @@ MACHINE_CONFIG_END
WRITE8_MEMBER(zaxxon_state::zaxxon_sound_a_w)
{
- UINT8 diff = data ^ m_sound_state[0];
+ uint8_t diff = data ^ m_sound_state[0];
m_sound_state[0] = data;
/* PLAYER SHIP A/B: volume */
@@ -143,7 +143,7 @@ WRITE8_MEMBER(zaxxon_state::zaxxon_sound_a_w)
WRITE8_MEMBER(zaxxon_state::zaxxon_sound_b_w)
{
- UINT8 diff = data ^ m_sound_state[1];
+ uint8_t diff = data ^ m_sound_state[1];
m_sound_state[1] = data;
/* S-EXP: channel 4 */
@@ -159,7 +159,7 @@ WRITE8_MEMBER(zaxxon_state::zaxxon_sound_b_w)
WRITE8_MEMBER(zaxxon_state::zaxxon_sound_c_w)
{
- UINT8 diff = data ^ m_sound_state[2];
+ uint8_t diff = data ^ m_sound_state[2];
m_sound_state[2] = data;
/* SHOT: channel 7 */
@@ -209,7 +209,7 @@ MACHINE_CONFIG_END
WRITE8_MEMBER(zaxxon_state::congo_sound_b_w)
{
- UINT8 diff = data ^ m_sound_state[1];
+ uint8_t diff = data ^ m_sound_state[1];
m_sound_state[1] = data;
/* bit 7 = mute */
@@ -221,7 +221,7 @@ WRITE8_MEMBER(zaxxon_state::congo_sound_b_w)
WRITE8_MEMBER(zaxxon_state::congo_sound_c_w)
{
- UINT8 diff = data ^ m_sound_state[2];
+ uint8_t diff = data ^ m_sound_state[2];
m_sound_state[2] = data;
/* BASS DRUM: channel 1 */