summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/tp84.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2009-02-11 19:48:39 +0000
committer Aaron Giles <aaron@aarongiles.com>2009-02-11 19:48:39 +0000
commit5cb6bf00e90dd0e836bcabf7d5a8a2bdbf941767 (patch)
treef0fd5a55acb6b6592a5be0fd9c766aed1a695c88 /src/mame/drivers/tp84.c
parent1420ed893ae8344144582793cdcc1a0eafda4610 (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/mame/drivers/tp84.c')
-rw-r--r--src/mame/drivers/tp84.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mame/drivers/tp84.c b/src/mame/drivers/tp84.c
index d3dc52b94db..6872b537b83 100644
--- a/src/mame/drivers/tp84.c
+++ b/src/mame/drivers/tp84.c
@@ -109,23 +109,23 @@ static WRITE8_HANDLER( tp84_filter_w )
C = 0;
if (offset & 0x008) C += 47000; /* 47000pF = 0.047uF */
if (offset & 0x010) C += 470000; /* 470000pF = 0.47uF */
- filter_rc_set_RC(0,FLT_RC_LOWPASS,1000,2200,1000,CAP_P(C));
+ filter_rc_set_RC(devtag_get_device(space->machine, SOUND, "filter1"),FLT_RC_LOWPASS,1000,2200,1000,CAP_P(C));
/* 76489 #1 (optional) */
C = 0;
if (offset & 0x020) C += 47000; /* 47000pF = 0.047uF */
if (offset & 0x040) C += 470000; /* 470000pF = 0.47uF */
-// filter_rc_set_RC(1,1000,2200,1000,C);
+// filter_rc_set_RC(devtag_get_device(space->machine, SOUND, "filter2"),1000,2200,1000,C);
/* 76489 #2 */
C = 0;
if (offset & 0x080) C += 470000; /* 470000pF = 0.47uF */
- filter_rc_set_RC(1,FLT_RC_LOWPASS,1000,2200,1000,CAP_P(C));
+ filter_rc_set_RC(devtag_get_device(space->machine, SOUND, "filter2"),FLT_RC_LOWPASS,1000,2200,1000,CAP_P(C));
/* 76489 #3 */
C = 0;
if (offset & 0x100) C += 470000; /* 470000pF = 0.47uF */
- filter_rc_set_RC(2,FLT_RC_LOWPASS,1000,2200,1000,CAP_P(C));
+ filter_rc_set_RC(devtag_get_device(space->machine, SOUND, "filter3"),FLT_RC_LOWPASS,1000,2200,1000,CAP_P(C));
}
static WRITE8_HANDLER( tp84_sh_irqtrigger_w )
@@ -196,9 +196,9 @@ static ADDRESS_MAP_START( audio_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x8000, 0x8000) AM_READ(tp84_sh_timer_r)
AM_RANGE(0xa000, 0xa1ff) AM_WRITE(tp84_filter_w)
AM_RANGE(0xc000, 0xc000) AM_WRITE(SMH_NOP)
- AM_RANGE(0xc001, 0xc001) AM_WRITE(sn76496_0_w)
- AM_RANGE(0xc003, 0xc003) AM_WRITE(sn76496_1_w)
- AM_RANGE(0xc004, 0xc004) AM_WRITE(sn76496_2_w)
+ AM_RANGE(0xc001, 0xc001) AM_DEVWRITE(SOUND, "sn1", sn76496_w)
+ AM_RANGE(0xc003, 0xc003) AM_DEVWRITE(SOUND, "sn2", sn76496_w)
+ AM_RANGE(0xc004, 0xc004) AM_DEVWRITE(SOUND, "sn3", sn76496_w)
ADDRESS_MAP_END