mirror of
https://github.com/holub/mame
synced 2025-05-29 00:53:09 +03:00
Fix for Mantis 01699: asteroid, asteroi1, asteroib, asterock, meteor, meteorts: Abnormal discrete sounds
* added NODE_RELATIVE(NODE, offset) macro to discrete.h * fix asteroid.c, canyon.c, skydiver.c and tank8.c to use this macro instead of adding directly to the node
This commit is contained in:
parent
6736fbc2a5
commit
c1a1cab523
@ -3781,6 +3781,8 @@ enum {
|
||||
#error "DISCRETE_MAX_NODE_OUTPUTS != 8"
|
||||
#endif
|
||||
|
||||
#define NODE_RELATIVE(_x, _y) (NODE(NODE_INDEX(_x) + (_y)))
|
||||
|
||||
#define NODE_NC NODE_00
|
||||
#define NODE_SPECIAL NODE(DISCRETE_MAX_NODES)
|
||||
|
||||
|
@ -308,7 +308,7 @@ WRITE8_HANDLER( asteroid_thump_w )
|
||||
|
||||
WRITE8_HANDLER( asteroid_sounds_w )
|
||||
{
|
||||
discrete_sound_w(machine, ASTEROID_SAUCER_SND_EN + offset, data & 0x80);
|
||||
discrete_sound_w(machine, NODE_RELATIVE(ASTEROID_SAUCER_SND_EN, offset), data & 0x80);
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( astdelux_sounds_w )
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
WRITE8_HANDLER( canyon_motor_w )
|
||||
{
|
||||
discrete_sound_w(machine, CANYON_MOTOR1_DATA + (offset & 0x01), data & 0x0f);
|
||||
discrete_sound_w(machine, NODE_RELATIVE(CANYON_MOTOR1_DATA, (offset & 0x01)), data & 0x0f);
|
||||
}
|
||||
|
||||
|
||||
@ -28,13 +28,13 @@ WRITE8_HANDLER( canyon_explode_w )
|
||||
|
||||
WRITE8_HANDLER( canyon_attract_w )
|
||||
{
|
||||
discrete_sound_w(machine, CANYON_ATTRACT1_EN + (offset & 0x01), offset & 0x02);
|
||||
discrete_sound_w(machine, NODE_RELATIVE(CANYON_ATTRACT1_EN, (offset & 0x01)), offset & 0x02);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_HANDLER( canyon_whistle_w )
|
||||
{
|
||||
discrete_sound_w(machine, CANYON_WHISTLE1_EN + (offset & 0x01), offset & 0x02);
|
||||
discrete_sound_w(machine, NODE_RELATIVE(CANYON_WHISTLE1_EN, (offset & 0x01)), offset & 0x02);
|
||||
}
|
||||
|
||||
|
||||
|
@ -170,7 +170,7 @@ static WRITE8_HANDLER( skydiver_sound_enable_w )
|
||||
|
||||
static WRITE8_HANDLER( skydiver_whistle_w )
|
||||
{
|
||||
discrete_sound_w(machine, SKYDIVER_WHISTLE1_EN + (offset >> 1), offset & 0x01);
|
||||
discrete_sound_w(machine, NODE_RELATIVE(SKYDIVER_WHISTLE1_EN, (offset >> 1)), offset & 0x01);
|
||||
}
|
||||
|
||||
|
||||
|
@ -90,7 +90,7 @@ static WRITE8_HANDLER( tank8_attract_w )
|
||||
|
||||
static WRITE8_HANDLER( tank8_motor_w )
|
||||
{
|
||||
discrete_sound_w(machine, TANK8_MOTOR1_EN+offset, data);
|
||||
discrete_sound_w(machine, NODE_RELATIVE(TANK8_MOTOR1_EN, offset), data);
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( tank8_cpu_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
|
Loading…
Reference in New Issue
Block a user