summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/sound/ay8910.h
Commit message (Collapse)AuthorAgeFilesLines
* Correct a long-standing design flaw: device configuration state Aaron Giles2010-01-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is now separate from runtime device state. I have larger plans for devices, so there is some temporary scaffolding to hold everything together, but this first step does separate things out. There is a new class 'running_device' which represents the state of a live device. A list of these running_devices sits in machine->devicelist and is created when a running_machine is instantiated. To access the configuration state, use device->baseconfig() which returns a reference to the configuration. The list of running_devices in machine->devicelist has a 1:1 correspondance with the list of device configurations in machine->config->devicelist, and most navigation options work equally on either (scanning by class, type, etc.) For the most part, drivers will now deal with running_device objects instead of const device_config objects. In fact, in order to do this patch, I did the following global search & replace: const device_config -> running_device device->static_config -> device->baseconfig().static_config device->inline_config -> device->baseconfig().inline_config and then fixed up the compiler errors that fell out. Some specifics: Removed device_get_info_* functions and replaced them with methods called get_config_*. Added methods for get_runtime_* to access runtime state from the running_device. DEVICE_GET_INFO callbacks are only passed a device_config *. This means they have no access to the token or runtime state at all. For most cases this is fine. Added new DEVICE_GET_RUNTIME_INFO callback that is passed the running_device for accessing data that is live at runtime. In the future this will go away to make room for a cleaner mechanism. Cleaned up the handoff of memory regions from the memory subsystem to the devices.
* First round of an attempted cleanup of header files in the system. Aaron Giles2010-01-101-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Created new central header "emu.h"; this should be included by pretty much any driver or device as the first include. This file in turn includes pretty much everything a driver or device will need, minus any other devices it references. Note that emu.h should *never* be included by another header file. - Updated all files in the core (src/emu) to use emu.h. - Removed a ton of redundant and poorly-tracked header includes from within other header files. - Temporarily changed driver.h to map to emu.h until we update files outside of the core. Added class wrapper around tagmap so it can be directly included and accessed within objects that need it. Updated all users to embed tagmap objects and changed them to call through the class. Added nicer functions for finding devices, ports, and regions in a machine: machine->device("tag") -- return the named device, or NULL machine->port("tag") -- return the named port, or NULL machine->region("tag"[, &length[, &flags]]) -- return the named region and optionally its length and flags Made the device tag an astring. This required touching a lot of code that printed the device to explicitly fetch the C-string from it. (Thank you gcc for flagging that issue!)
* Results of running the latest srcclean. Aaron Giles2009-12-281-1/+1
|
* Ok, this is The Big One. Aaron Giles2009-02-111-71/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Sound cores no longer allocate their own tokens. Instead they return a new Aaron Giles2009-01-181-1/+1
| | | | | integer value indicating the size of token they want, and the core allocates it for them. This mirrors the standard device behavior.
* From: Atari Ace [mailto:atari_ace@verizon.net] Aaron Giles2009-01-131-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sent: Monday, December 22, 2008 3:00 PM To: submit@mamedev.org Cc: atariace@hotmail.com Subject: [patch] Make SOUND_xxx pointers to SND_GET_INFO functions Hi mamedev, This patch probably should wait till after 0.129 goes out, but may be of interest regardless. It makes the treatment of SOUND_xxx the same as that of CPU_xxx. That is, they are function pointers to the SND_GET_INFO routine for the sound. The first patch just adds some missing include files and modifies a few cases where a sound_type was used as an integer. This could go in now. The second patch then adds the needed #defines to all the sound headers (it assumes the previous patch I sent to add the SND_GET_INFO declarations was applied), and modifies the sound code accordingly. It also moves the sound clock to the device object. Note that the dummy sound core is removed entirely. I cheated a bit and made VERIFY_SNDTI also declare and fill in the sndnum, making this an INLINE function would probably be more appropriate, but all of this code's days are numbered. There may be some performance loss in drivers that expect sndti_xxx routines to be fast, since sound_matrix has been removed. The performance however should be similar to looking up items in a devicelist, so those drivers will have to adjust eventually. ~aa
* From: Atari Ace [mailto:atari_ace@verizon.net] Aaron Giles2008-12-261-0/+9
| | | | | | | | | | | | | | | | | | Sent: Monday, December 22, 2008 8:04 AM To: submit@mamedev.org Cc: atariace@hotmail.com Subject: [patch] Update sound core header files Hi mamedev, This patch updates all the sound core header files to declare their SND_GET_INFO functions, which will be needed once the sound cores become proper devices. It also makes a handful of other header declaration fixes in emu/sound, and makes one SND_RESET routine static. Note: votrax.h is a new include file altogether. ~aa
* Changed save state system to accept machine parameters where Aaron Giles2008-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | appropriate, and to keep all global variables hanging off the machine structure. Once again, this means all state registration call sites have been touched: - state_save_register_global* now takes a machine parameter - state_save_register_item* now takes a machine parameter - added new state_save_register_device_item* which now uses the device name and tag to generate the base name Extended the fake sound devices to have more populated fields. Modified sound cores to use tags from the devices and simplified the start function. Renumbered CPU and sound get/set info constants to align with the device constants, and shared values where they were perfectly aligned. Set the type field in the fake device_configs for CPU and sound chips to a get_info stub which calls through to the CPU and sound specific get_info functions. This means the device_get_info() functions work for CPU and sound cores, even in their fake state. Changed device information getters from device_info() to device_get_info() to match the CPU and sound macros.
* Added "tag" parameter to state_save_register_item_* calls. Removed Aaron Giles2008-11-171-1/+1
| | | | | | state_save_combine_module_and_tag() function in favor of passing the tag when registering. Revisited all save state item registrations and changed them to use the tag where appropriate.
* Terminology cleanup. "Machine" handlers are now "space" handlers. Aaron Giles2008-11-151-4/+4
|
* This (mostly - see below) completes the structure, lower-casing functions ↵ Derrick Renaud2008-08-111-47/+49
| | | | | | | | | | | | and re-inclusion updates of the src\sound\emu headers. I did not do much to the following files because I did not know the best way to name them. aicadsp.h sid.h sidenvel.h sidvoice.h ymdeltat.h I did not update structures only used in the src\emu\sound\*.c files. They are only used locally in the file so they were not worth the effort.
* lower cased sn76477_interface and ay8910_interface Derrick Renaud2008-08-081-3/+3
|
* Updated structure and naming conventions of the following sound interfaces. Derrick Renaud2008-08-081-3/+5
| | | | | | struct CustomSound_interface to custom_sound_interface struct Samplesinterface to samples_interface struct SN76477interface to SN76477_interface struct AY8910interface to AY8910_interface
* Cleanups/version bump.mame0124u5 Aaron Giles2008-05-011-3/+3
|
* ay8910: Cosmetic Couriersud2008-04-271-8/+39
| | | | | * bring more in line with coding standards * add more comments
* AY-3-8910 rewrite: Couriersud2008-04-221-7/+19
| | | | | | | | | | | | | | | | | | * adds a model to calculate mixing of channels with different resistance loads. * based on above, each channel may be assigned a different load in individual case i.e. channels not tied together * rewrote ay8910.c to make emulation simpler * changed the config structure to include a flag field and output resistor loads. * Updated all drivers affected. * Added some "Todos" related to stuff I discovered when reading datasheets. * Fixed a bug in disc_flt.c (konami filters) galaxian.c: * Fixed discrete sound and konami filter addressing * Changed addressing of AY-3-8910 to be in line with schematics gyruss.c: * Added discrete sound for filtering ("konami"-style) and mixing.
* Added running_machine * parameter to the front of all read/write handlers. Aaron Giles2008-03-051-6/+6
| | | | | | | | | | | | | | | | | | Updated all call-through handlers appropriately. Renamed read8_handler to read8_machine_func, replicating this pattern throughout. Defined new set of memory handler functions which are similar but which pass a const device_config * in place of the running_machine *. These are called read8_device_func, etc. Added macros READ8_DEVICE_HANDLER() for specifying functions of this type. Note that some plumbing still needs to happen in memory.c before this will work. This check-in should remove the need for the global Machine and in turn "deprecat.h" for a lot of drivers, but that work has not been done. On the flip side, some new accesses to the global Machine were added in the emu/ files. These should be addressed over time, but are smaller in number than the references in the driver.
* Reversing previous submission. The AY8910 has so many ways it can be ↵ Zsolt Vasvari2008-01-221-65/+0
| | | | hooked, that it doesn't really make sense to designate any one as "natural"
* - Added read/write handlers for the "natural" hook-ups of an AY-8910 chip Zsolt Vasvari2008-01-221-0/+65
| | | | | - Modified a couple of drivers to use the new handlers - Added crystals for NYNY and Red Alert
* Initial checkin of MAME 0.121.mame0121 Aaron Giles2007-12-171-0/+90