diff options
author | 2009-02-11 19:48:39 +0000 | |
---|---|---|
committer | 2009-02-11 19:48:39 +0000 | |
commit | 5cb6bf00e90dd0e836bcabf7d5a8a2bdbf941767 (patch) | |
tree | f0fd5a55acb6b6592a5be0fd9c766aed1a695c88 /src/emu/sound/8950intf.h | |
parent | 1420ed893ae8344144582793cdcc1a0eafda4610 (diff) |
Ok, this is The Big One.
Please note: regression testing is in progress, but the first round
of glaring regressions have already been taken care of. That said,
there is likely to be a host of regressions as a result of this
change.
Also note: There are still a few rough edges in the interfaces. I
will try to clean them up systematically once the basic system is
working.
All sound chips are now proper devices.
Merged the sound chip interface into the device interface,
removing any differences (such as the whole ALIASing concept).
Modified every sound chip in the following ways:
* updated to match the device interface
* reduced read/write handlers down to the minimal number
* added the use of get_safe_token() for ensuring correctness
* other minor cleanup
Removed the custom sound device. The additional work to just make
custom sound cases into full devices is minimal, so I just converted
them all over to be actual devices.
Vastly simplified the sound interfaces, removing the ghastly
sndti_* business and moving everyone over to using tags for
sound identity. sndintrf, like cpuintrf, is now just a header
file with no implementation.
Modified each and every driver that references a sound chip:
* all memory maps explicitly reference the targeted device via
AM_DEVREAD/AM_DEVWRITE/AM_DEVREADWRITE
* 16-bit and 32-bit accesses to 8-bit chips no longer use
trampoline functions but instead use the 8-bit AM_DEVREAD/WRITE
macros
* all references to sound chips are now done via tags
* note that these changes are brute force, not optimal; in many
cases drivers should grab pointers to devices in MACHINE_START
and stash them away
Diffstat (limited to 'src/emu/sound/8950intf.h')
-rw-r--r-- | src/emu/sound/8950intf.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/emu/sound/8950intf.h b/src/emu/sound/8950intf.h new file mode 100644 index 00000000000..d4ad63fbd36 --- /dev/null +++ b/src/emu/sound/8950intf.h @@ -0,0 +1,28 @@ +#pragma once + +#ifndef __8950INTF_H__ +#define __8950INTF_H__ + +typedef struct _y8950_interface y8950_interface; +struct _y8950_interface +{ + void (*handler)(const device_config *device, int linestate); + + read8_device_func keyboardread; + write8_device_func keyboardwrite; + read8_device_func portread; + write8_device_func portwrite; +}; + +READ8_DEVICE_HANDLER( y8950_r ); +WRITE8_DEVICE_HANDLER( y8950_w ); + +READ8_DEVICE_HANDLER( y8950_status_port_r ); +READ8_DEVICE_HANDLER( y8950_read_port_r ); +WRITE8_DEVICE_HANDLER( y8950_control_port_w ); +WRITE8_DEVICE_HANDLER( y8950_write_port_w ); + +DEVICE_GET_INFO( y8950 ); +#define SOUND_Y8950 DEVICE_GET_INFO_NAME( y8950 ) + +#endif /* __8950INTF_H__ */ |