summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Jonathan Gevaryahu <Lord-Nightmare@users.noreply.github.com>2010-07-19 01:14:03 +0000
committer Jonathan Gevaryahu <Lord-Nightmare@users.noreply.github.com>2010-07-19 01:14:03 +0000
commitbafa2023e9458d0a9b85e00c2e458a7f145a135f (patch)
tree02680c8eb63143f3b18715def58d9a64b78a299d
parentbd29cc08b1540ba92ab56c58b333f056924df547 (diff)
Fixed address mirroring on the slave sound cpu on Zaccaria hardware; it seems possible that the /NMI triggered test mode (triggered by a push button on the sound pcb) doesn't work on real hardware at all.
-rw-r--r--src/mame/drivers/zaccaria.c50
1 files changed, 37 insertions, 13 deletions
diff --git a/src/mame/drivers/zaccaria.c b/src/mame/drivers/zaccaria.c
index ce051110d25..065b545367d 100644
--- a/src/mame/drivers/zaccaria.c
+++ b/src/mame/drivers/zaccaria.c
@@ -31,7 +31,9 @@ Notes:
- The 6802 driving the TMS5220 has a push button connected to the NMI line. On
Zaccaria pinballs, when pressed, this causes the speech 6802 and the slave
sound 6802 to play a few speech effects and sound effects;
- This currently doesn't work in MAME
+ This currently doesn't work in MAME, and tracing the code it seems the code is
+ possibly broken, made up of nonfunctional leftovers of some of the pinball test
+ mode code.
***************************************************************************/
@@ -286,18 +288,38 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )
ADDRESS_MAP_END
/* slave sound cpu, produces music and sound effects */
-
+/* mapping:
+ A15 A14 A13 A12 A11 A10 A09 A08 A07 A06 A05 A04 A03 A02 A01 A00
+ 0 0 0 0 0 0 0 0 0 * * * * * * * RW 6802 internal ram
+ 0 0 0 x x x x x x x x x x x x x Open bus (for area that doesn't overlap ram)
+ 0 0 1 x x x x x x x x x x x x x Open bus
+ 0 1 0 x x x x x x x x x 0 0 x x Open bus
+ 0 1 0 x x x x x x x x x 0 1 x x Open bus
+ 0 1 0 x x x x x x x x x 1 0 x x Open bus
+ 0 1 0 x x x x x x x x x 1 1 * * RW 6821 PIA @ 4I
+ 0 1 1 x x x x x x x x x x x x x Open bus
+ 1 0 % % * * * * * * * * * * * * R /CS4A: Enable Rom 13
+ 1 1 % % * * * * * * * * * * * * R /CS5A: Enable Rom 9
+ note that the % bits go to pins 2 (6802 A12) and 26 (6802 A13) of the roms
+ monymony and jackrabt both use 2764 roms, which use pin 2 as A12 and pin 26 as N/C don't care
+ hence for actual chips used, the mem map is:
+ 1 0 x * * * * * * * * * * * * * R /CS4A: Enable Rom 13
+ 1 1 x * * * * * * * * * * * * * R /CS5A: Enable Rom 9
+
+ 6821 PIA: CA1 comes from the master sound cpu's latch bit 7 (which is also connected to the AY chip at 4G's IOB1); CB1 comes from a periodic counter clocked by the 6802's clock, divided by 4096. CA2 and CB2 are disconnected. PA0-7 connect to the data busses of the AY-3-8910 chips; PB0 and PB1 connect to the BC1 and BDIR pins of the AY chip at 4G; PB2 and PB3 connect to the BC1 and BDIR pins of the AY chip at 4H.
+*/
static ADDRESS_MAP_START( sound_map_1, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x007f) AM_RAM
- AM_RANGE(0x500c, 0x500f) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
- AM_RANGE(0xa000, 0xbfff) AM_ROM
- AM_RANGE(0xe000, 0xffff) AM_ROM
+ AM_RANGE(0x500c, 0x500f) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w) AM_MIRROR(0x1ff0)
+ AM_RANGE(0x8000, 0x9fff) AM_ROM AM_MIRROR(0x2000) // rom 13
+ AM_RANGE(0xc000, 0xdfff) AM_ROM AM_MIRROR(0x2000) // rom 9
ADDRESS_MAP_END
/* master sound cpu, controls speech directly */
/* mapping:
A15 A14 A13 A12 A11 A10 A09 A08 A07 A06 A05 A04 A03 A02 A01 A00
0 0 0 0 0 0 0 0 0 * * * * * * * RW 6802 internal ram
+**** x 0 0 0 x x x x 1 x x 0 x x * * Open bus (test mode writes as if there was another PIA here)
x 0 0 0 x x x x 1 x x 1 x x * * RW 6821 PIA @ 1I
x 0 0 1 0 0 x x x x x x x x x x W MC1408 DAC
x x 0 1 0 1 x x x x x x x x x x W Command to slave sound1 cpu
@@ -310,6 +332,8 @@ ADDRESS_MAP_END
hence for actual chips used, the mem map is:
x * 1 0 * * * * * * * * * * * * R /CS1A: Enable Rom 8
x * 1 1 * * * * * * * * * * * * R /CS0A: Enable Rom 7
+
+ 6821 PIA: PA0-7, CA2 and CB1 connect to the TMS5200; CA1 and CB2 are disconnected, though the test mode assumes there's something connected to CB2 (possibly another LED like the one connected to PB4); PB3 connects to 'ACS' which goes to the z80.
*/
static ADDRESS_MAP_START( sound_map_2, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x007f) AM_RAM /* 6802 internal ram */
@@ -642,8 +666,8 @@ ROM_START( monymony )
ROM_CONTINUE( 0xd000, 0x1000 )
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for first 6802 */
- ROM_LOAD( "snd13.2g", 0xa000, 0x2000, CRC(78b01b98) SHA1(2aabed56cdae9463deb513c0c5021f6c8dfd271e) )
- ROM_LOAD( "snd9.1i", 0xe000, 0x2000, CRC(94e3858b) SHA1(04961f67b95798b530bd83355dec612389f22255) )
+ ROM_LOAD( "snd13.2g", 0x8000, 0x2000, CRC(78b01b98) SHA1(2aabed56cdae9463deb513c0c5021f6c8dfd271e) )
+ ROM_LOAD( "snd9.1i", 0xc000, 0x2000, CRC(94e3858b) SHA1(04961f67b95798b530bd83355dec612389f22255) )
ROM_REGION( 0x10000, "audio2", 0 ) /* 64k for second 6802 */
ROM_LOAD( "snd8.1h", 0x2000, 0x1000, CRC(aad76193) SHA1(e08fc184efced392ee902c4cc9daaaf3310cdfe2) )
@@ -677,8 +701,8 @@ ROM_START( jackrabt )
ROM_LOAD( "cpu-01.6h", 0xd000, 0x1000, CRC(dd5979cf) SHA1(e9afe7002b2258a1c3132bdd951c6e20d473fb6a) )
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for first 6802 */
- ROM_LOAD( "13snd.2g", 0xa000, 0x2000, CRC(fc05654e) SHA1(ed9c66672fe89c41e320e1d27b53f5efa92dce9c) )
- ROM_LOAD( "9snd.1i", 0xe000, 0x2000, CRC(3dab977f) SHA1(3e79c06d2e70b050f01b7ac58be5127ba87904b0) )
+ ROM_LOAD( "13snd.2g", 0x8000, 0x2000, CRC(fc05654e) SHA1(ed9c66672fe89c41e320e1d27b53f5efa92dce9c) )
+ ROM_LOAD( "9snd.1i", 0xc000, 0x2000, CRC(3dab977f) SHA1(3e79c06d2e70b050f01b7ac58be5127ba87904b0) )
ROM_REGION( 0x10000, "audio2", 0 ) /* 64k for second 6802 */
ROM_LOAD( "8snd.1h", 0x2000, 0x1000, CRC(f4507111) SHA1(0513f0831b94aeda84aa4f3b4a7c60dfc5113b2d) )
@@ -716,8 +740,8 @@ ROM_START( jackrabt2 )
ROM_CONTINUE( 0xd000, 0x1000 )
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for first 6802 */
- ROM_LOAD( "13snd.2g", 0xa000, 0x2000, CRC(fc05654e) SHA1(ed9c66672fe89c41e320e1d27b53f5efa92dce9c) )
- ROM_LOAD( "9snd.1i", 0xe000, 0x2000, CRC(3dab977f) SHA1(3e79c06d2e70b050f01b7ac58be5127ba87904b0) )
+ ROM_LOAD( "13snd.2g", 0x8000, 0x2000, CRC(fc05654e) SHA1(ed9c66672fe89c41e320e1d27b53f5efa92dce9c) )
+ ROM_LOAD( "9snd.1i", 0xc000, 0x2000, CRC(3dab977f) SHA1(3e79c06d2e70b050f01b7ac58be5127ba87904b0) )
ROM_REGION( 0x10000, "audio2", 0 ) /* 64k for second 6802 */
ROM_LOAD( "8snd.1h", 0x2000, 0x1000, CRC(f4507111) SHA1(0513f0831b94aeda84aa4f3b4a7c60dfc5113b2d) )
@@ -751,8 +775,8 @@ ROM_START( jackrabts )
ROM_CONTINUE( 0xd000, 0x1000 )
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for first 6802 */
- ROM_LOAD( "13snd.2g", 0xa000, 0x2000, CRC(fc05654e) SHA1(ed9c66672fe89c41e320e1d27b53f5efa92dce9c) )
- ROM_LOAD( "9snd.1i", 0xe000, 0x2000, CRC(3dab977f) SHA1(3e79c06d2e70b050f01b7ac58be5127ba87904b0) )
+ ROM_LOAD( "13snd.2g", 0x8000, 0x2000, CRC(fc05654e) SHA1(ed9c66672fe89c41e320e1d27b53f5efa92dce9c) )
+ ROM_LOAD( "9snd.1i", 0xc000, 0x2000, CRC(3dab977f) SHA1(3e79c06d2e70b050f01b7ac58be5127ba87904b0) )
ROM_REGION( 0x10000, "audio2", 0 ) /* 64k for second 6802 */
ROM_LOAD( "8snd.1h", 0x2000, 0x1000, CRC(f4507111) SHA1(0513f0831b94aeda84aa4f3b4a7c60dfc5113b2d) )