summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar angelosa <salese_corp_ltd@email.it>2018-01-15 09:33:13 +0100
committerGravatarGravatar angelosa <salese_corp_ltd@email.it>2018-01-15 09:35:27 +0100
commit6b0f14ed7ba4eb854f4f9ff67112e88ef6589c74 (patch) (github)
tree65abdc7f5a490c0cefe3c91e72608dd1d739d9c9
parenteea5a97f142fbcaa5b648d4d0cb083ca7741e56c (diff)
downloadmame-6b0f14ed7ba4eb854f4f9ff67112e88ef6589c74.tar.bz2
mame-6b0f14ed7ba4eb854f4f9ff67112e88ef6589c74.zip
All SNES APU docs I can find claims it runs at 2.048 MHz and there's no mention about an internal divider (which should belong to the CPU core while fixing the opcode cycles anyway).
Fixes MTs #06282, #06710, #04925, hokuto5, probably more (nw)
-rw-r--r--src/mame/audio/snes_snd.cpp3
-rw-r--r--src/mame/drivers/nss.cpp3
-rw-r--r--src/mame/drivers/sfcbox.cpp3
-rw-r--r--src/mame/drivers/snes.cpp3
-rw-r--r--src/mame/drivers/snesb.cpp3
5 files changed, 10 insertions, 5 deletions
diff --git a/src/mame/audio/snes_snd.cpp b/src/mame/audio/snes_snd.cpp
index d8dc6ab583f..42b206c2072 100644
--- a/src/mame/audio/snes_snd.cpp
+++ b/src/mame/audio/snes_snd.cpp
@@ -1156,7 +1156,8 @@ WRITE8_MEMBER( snes_sound_device::spc_io_w )
case 0x7: /* Port 3 */
// osd_printf_debug("SPC: %02x to APU @ %d %s\n", data, offset & 3, machine().describe_context());
m_port_out[offset - 4] = data;
- machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(20));
+ // Unneeded, we already run at perfect_interleave
+ // machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(20));
break;
case 0xa: /* Timer 0 */
case 0xb: /* Timer 1 */
diff --git a/src/mame/drivers/nss.cpp b/src/mame/drivers/nss.cpp
index 57ce1816ca7..67b7bc3a70c 100644
--- a/src/mame/drivers/nss.cpp
+++ b/src/mame/drivers/nss.cpp
@@ -823,7 +823,8 @@ static MACHINE_CONFIG_START( nss )
MCFG_CPU_ADD("maincpu", _5A22, MCLK_NTSC) /* 2.68Mhz, also 3.58Mhz */
MCFG_CPU_PROGRAM_MAP(snes_map)
- MCFG_CPU_ADD("soundcpu", SPC700, 2048000/2) /* 2.048 Mhz, but internal divider */
+ // runs at 24.576 MHz / 12 = 2.048 MHz
+ MCFG_CPU_ADD("soundcpu", SPC700, XTAL_24_576MHz / 12)
MCFG_CPU_PROGRAM_MAP(spc_mem)
MCFG_QUANTUM_PERFECT_CPU("maincpu")
diff --git a/src/mame/drivers/sfcbox.cpp b/src/mame/drivers/sfcbox.cpp
index 1317fa7a7bc..4e03d1f0285 100644
--- a/src/mame/drivers/sfcbox.cpp
+++ b/src/mame/drivers/sfcbox.cpp
@@ -451,7 +451,8 @@ static MACHINE_CONFIG_START( sfcbox )
MCFG_CPU_ADD("maincpu", _5A22, 3580000*6) /* 2.68Mhz, also 3.58Mhz */
MCFG_CPU_PROGRAM_MAP(snes_map)
- MCFG_CPU_ADD("soundcpu", SPC700, 2048000/2) /* 2.048 Mhz, but internal divider */
+ // runs at 24.576 MHz / 12 = 2.048 MHz
+ MCFG_CPU_ADD("soundcpu", SPC700, XTAL_24_576MHz / 12)
MCFG_CPU_PROGRAM_MAP(spc_mem)
MCFG_QUANTUM_PERFECT_CPU("maincpu")
diff --git a/src/mame/drivers/snes.cpp b/src/mame/drivers/snes.cpp
index b0280949519..eb3b2e51ae8 100644
--- a/src/mame/drivers/snes.cpp
+++ b/src/mame/drivers/snes.cpp
@@ -1331,7 +1331,8 @@ static MACHINE_CONFIG_START( snes )
MCFG_CPU_ADD("maincpu", _5A22, MCLK_NTSC) /* 2.68 MHz, also 3.58 MHz */
MCFG_CPU_PROGRAM_MAP(snes_map)
- MCFG_CPU_ADD("soundcpu", SPC700, XTAL_24_576MHz / 24) /* 1.024 MHz */
+ // runs at 24.576 MHz / 12 = 2.048 MHz
+ MCFG_CPU_ADD("soundcpu", SPC700, XTAL_24_576MHz / 12)
MCFG_CPU_PROGRAM_MAP(spc_map)
//MCFG_QUANTUM_TIME(attotime::from_hz(48000))
diff --git a/src/mame/drivers/snesb.cpp b/src/mame/drivers/snesb.cpp
index 277d445f285..bc90590097d 100644
--- a/src/mame/drivers/snesb.cpp
+++ b/src/mame/drivers/snesb.cpp
@@ -693,7 +693,8 @@ static MACHINE_CONFIG_START( kinstb )
MCFG_CPU_PROGRAM_MAP(snesb_map)
/* audio CPU */
- MCFG_CPU_ADD("soundcpu", SPC700, 2048000/2) /* 2.048 Mhz, but internal divider */
+ // runs at 24.576 MHz / 12 = 2.048 MHz
+ MCFG_CPU_ADD("soundcpu", SPC700, XTAL_24_576MHz / 12)
MCFG_CPU_PROGRAM_MAP(spc_mem)
MCFG_QUANTUM_PERFECT_CPU("maincpu")