diff options
author | 2008-05-15 16:25:03 +0000 | |
---|---|---|
committer | 2008-05-15 16:25:03 +0000 | |
commit | 096331c8562467a67fb5674f46dbb26bb032d2a6 (patch) | |
tree | 1f9329631b6fb62a81f4bdd894403389d2f70759 /src/emu/sound.c | |
parent | bc4b470ebbee405c6f48253acc225451f52a9b70 (diff) |
Restructured input port internals and cleaned up inptport.c:
* Input ports are now maintained hierarchically. At the top
level are input ports, which contain a list of fields. Each
field represents one or more bits of the port. Certain fields
such as DIP switches and configuration switches contain a
list of settings, which can be selected. DIP switch fields
can also contain a list of DIP switch locations.
* Normalized behavior of port overrides (via PORT_INCLUDE or
by defining multiple overlapping bits). All fields within a
port are kept in strict increasing bit order, so altered DIP
switches are now kept in the appropriate order. This addresses
MAMETesters bug 01671.
* Live port state is now fully separate from configured
state. This is manifested in a similar way to devices, where
a const list of ports can be managed either offline or live.
Each port has a pointer to an opaque set of live state which
is NULL when offline or valid when live. Each port also has
a running_machine * which is also NULL when offline.
* Because of this new arrangement, the conversion from tokens
to a list of ports now requires reasonably complex memory
allocation, so these port lists must be explicitly allocated
and freed (they are not mantained by automatic resource
allocation).
* Custom and changed callbacks now take a pointer to a field
config instead of a running machine. This provides more
information about what field triggered the change notification.
The machine can be found by referenced field->port->machine.
* The inptport.c module has been cleaned up and many
ambiguities resolved. Most of this is internal, though it did
result in osd_customize_inputport_list() being changed to
osd_customize_input_type_list(). The parameter to this function
is now a linked list instead of an array, and the structures
referenced have been reorganized somewhat.
* Updated config.c to pass machine parameters to its callbacks.
* Updated validity checks, XML output, and UI system to handle
the new structures.
* Moved large table of default input settings to a separate
include file inpttype.h.
* Removed gross hacks in trackfld and hyperspt NVRAM. These
may be broken as a result.
Diffstat (limited to 'src/emu/sound.c')
-rw-r--r-- | src/emu/sound.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/emu/sound.c b/src/emu/sound.c index d57a8d82bab..128efd84364 100644 --- a/src/emu/sound.c +++ b/src/emu/sound.c @@ -114,8 +114,8 @@ static wav_file *wavfile; static void sound_reset(running_machine *machine); static void sound_exit(running_machine *machine); static void sound_pause(running_machine *machine, int pause); -static void sound_load(int config_type, xml_data_node *parentnode); -static void sound_save(int config_type, xml_data_node *parentnode); +static void sound_load(running_machine *machine, int config_type, xml_data_node *parentnode); +static void sound_save(running_machine *machine, int config_type, xml_data_node *parentnode); static TIMER_CALLBACK( sound_update ); static void start_sound_chips(void); static void route_sound(void); @@ -223,7 +223,7 @@ void sound_init(running_machine *machine) sound_set_attenuation(options_get_int(mame_options(), OPTION_VOLUME)); /* register callbacks */ - config_register("mixer", sound_load, sound_save); + config_register(machine, "mixer", sound_load, sound_save); add_pause_callback(machine, sound_pause); add_reset_callback(machine, sound_reset); add_exit_callback(machine, sound_exit); @@ -577,7 +577,7 @@ void sound_global_enable(int enable) configuration file -------------------------------------------------*/ -static void sound_load(int config_type, xml_data_node *parentnode) +static void sound_load(running_machine *machine, int config_type, xml_data_node *parentnode) { xml_data_node *channelnode; int mixernum; @@ -610,7 +610,7 @@ static void sound_load(int config_type, xml_data_node *parentnode) file -------------------------------------------------*/ -static void sound_save(int config_type, xml_data_node *parentnode) +static void sound_save(running_machine *machine, int config_type, xml_data_node *parentnode) { int mixernum; |