summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2015-06-22 18:50:54 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2015-06-22 18:50:54 +0200
commit31a1f6b01f85609486c73e67279e263edb6fc6da (patch)
tree0fd9c864bc5633f2d3e7b0d0ad8b2d9c9692c489
parent0f15e374d342fcbdda032e8d062b472ea6d01e68 (diff)
fix astrocde (nw)
-rw-r--r--scripts/target/mame/arcade.lua3
-rw-r--r--scripts/target/mame/tiny.lua3
-rw-r--r--src/mame/audio/astrocde.c11
-rw-r--r--src/mame/audio/gorf.inc (renamed from src/mame/audio/gorf.c)5
-rw-r--r--src/mame/audio/wow.inc (renamed from src/mame/audio/wow.c)17
5 files changed, 19 insertions, 20 deletions
diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua
index f48ef035c4a..1aaccf5a212 100644
--- a/scripts/target/mame/arcade.lua
+++ b/scripts/target/mame/arcade.lua
@@ -1986,8 +1986,7 @@ createMAMEProjects(_target, _subtarget, "midway")
files {
MAME_DIR .. "src/mame/drivers/astrocde.c",
MAME_DIR .. "src/mame/video/astrocde.c",
- MAME_DIR .. "src/mame/audio/gorf.c",
- MAME_DIR .. "src/mame/audio/wow.c",
+ MAME_DIR .. "src/mame/audio/astrocde.c",
MAME_DIR .. "src/mame/drivers/atlantis.c",
MAME_DIR .. "src/mame/drivers/balsente.c",
MAME_DIR .. "src/mame/machine/balsente.c",
diff --git a/scripts/target/mame/tiny.lua b/scripts/target/mame/tiny.lua
index 5594593d113..4403fc9ac92 100644
--- a/scripts/target/mame/tiny.lua
+++ b/scripts/target/mame/tiny.lua
@@ -122,6 +122,7 @@ function createProjects_mame_tiny(_target, _subtarget)
MAME_DIR .. "src/mame/audio/targ.c",
MAME_DIR .. "src/mame/drivers/astrocde.c",
MAME_DIR .. "src/mame/video/astrocde.c",
+ MAME_DIR .. "src/mame/audio/astrocde.c",
MAME_DIR .. "src/mame/drivers/gridlee.c",
MAME_DIR .. "src/mame/audio/gridlee.c",
MAME_DIR .. "src/mame/video/gridlee.c",
@@ -129,8 +130,6 @@ function createProjects_mame_tiny(_target, _subtarget)
MAME_DIR .. "src/mame/machine/williams.c",
MAME_DIR .. "src/mame/audio/williams.c",
MAME_DIR .. "src/mame/video/williams.c",
- MAME_DIR .. "src/mame/audio/gorf.c",
- MAME_DIR .. "src/mame/audio/wow.c",
MAME_DIR .. "src/mame/drivers/gaelco.c",
MAME_DIR .. "src/mame/video/gaelco.c",
MAME_DIR .. "src/mame/machine/gaelcrpt.c",
diff --git a/src/mame/audio/astrocde.c b/src/mame/audio/astrocde.c
new file mode 100644
index 00000000000..41bf9deba8f
--- /dev/null
+++ b/src/mame/audio/astrocde.c
@@ -0,0 +1,11 @@
+// license:BSD-3-Clause
+// copyright-holders:Mike Coates
+//**************************************************************************
+
+
+#include "emu.h"
+#include "cpu/z80/z80.h"
+#include "includes/astrocde.h"
+
+#include "gorf.inc"
+#include "wow.inc"
diff --git a/src/mame/audio/gorf.c b/src/mame/audio/gorf.inc
index 0114cb5afb3..abeb6d4fa65 100644
--- a/src/mame/audio/gorf.c
+++ b/src/mame/audio/gorf.inc
@@ -19,11 +19,6 @@ gorf_sh_ update- Null
**************************************************************************/
-#include "emu.h"
-#include "cpu/z80/z80.h"
-#include "includes/astrocde.h"
-
-
/****************************************************************************
* 64 Phonemes - currently 1 sample per phoneme, will be combined sometime!
****************************************************************************/
diff --git a/src/mame/audio/wow.c b/src/mame/audio/wow.inc
index e6a1b8888bd..9c7a17c5302 100644
--- a/src/mame/audio/wow.c
+++ b/src/mame/audio/wow.inc
@@ -20,16 +20,11 @@ wow_sh_ update- Null
**************************************************************************/
-#include "emu.h"
-#include "cpu/z80/z80.h"
-#include "includes/astrocde.h"
-
-
/****************************************************************************
* 64 Phonemes - currently 1 sample per phoneme, will be combined sometime!
****************************************************************************/
-static const char *const PhonemeTable[65] =
+static const char *const PhonemeTable_wow[65] =
{
"EH3","EH2","EH1","PA0","DT" ,"A1" ,"A2" ,"ZH",
"AH2","I3" ,"I2" ,"I1" ,"M" ,"N" ,"B" ,"V",
@@ -72,7 +67,7 @@ static const char *const wowWordTable[] =
"YI3U", "Y1IUU", "YIUUI", "Y1IUU1U1", "YI3U1", "Y1IUUL", "YIUU1L", "Y1IUUD", "YO2O2R",0
};
-#define num_samples (sizeof(wowWordTable)/sizeof(char *))
+#define num_samples_wow (sizeof(wowWordTable)/sizeof(char *))
const char *const wow_sample_names[] =
@@ -114,7 +109,7 @@ READ8_MEMBER( astrocde_state::wow_speech_r )
Phoneme = data & 0x3F;
//Intonation = data >> 6;
- //logerror("Data : %d Speech : %s at intonation %d\n",Phoneme, PhonemeTable[Phoneme],Intonation);
+ //logerror("Data : %d Speech : %s at intonation %d\n",Phoneme, PhonemeTable_wow[Phoneme],Intonation);
if(Phoneme==63) {
m_samples->stop(0);
@@ -128,11 +123,11 @@ READ8_MEMBER( astrocde_state::wow_speech_r )
/* Phoneme to word translation */
if (*(m_totalword) == 0) {
- strcpy(m_totalword,PhonemeTable[Phoneme]); /* Copy over the first phoneme */
+ strcpy(m_totalword,PhonemeTable_wow[Phoneme]); /* Copy over the first phoneme */
if (m_plural != 0) {
//logerror("found a possible plural at %d\n",m_plural-1);
if (!strcmp("S",m_totalword)) { /* Plural check */
- m_samples->start(0, num_samples-2); /* play the sample at position of word */
+ m_samples->start(0, num_samples_wow-2); /* play the sample at position of word */
m_samples->set_frequency(0, 11025); /* play at correct rate */
m_totalword[0] = 0; /* Clear the total word stack */
m_oldword[0] = 0; /* Clear the total word stack */
@@ -142,7 +137,7 @@ READ8_MEMBER( astrocde_state::wow_speech_r )
}
}
} else
- strcat(m_totalword,PhonemeTable[Phoneme]); /* Copy over the first phoneme */
+ strcat(m_totalword,PhonemeTable_wow[Phoneme]); /* Copy over the first phoneme */
//logerror("Total word = %s\n",m_totalword);