summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2021-12-19 17:55:21 +0100
committer hap <happppp@users.noreply.github.com>2021-12-19 17:55:43 +0100
commitf518863ba35a3cb263dcec05974f6f3c5583d4a9 (patch)
treed433a4f8b6028a33d22d6f25567c763d8e472c57
parent0285af475f586db8f5aa7eaf5cd13a7b93f0b6bd (diff)
tmnt: add note about title music
-rw-r--r--src/mame/drivers/im01.cpp4
-rw-r--r--src/mame/drivers/tmnt.cpp11
2 files changed, 9 insertions, 6 deletions
diff --git a/src/mame/drivers/im01.cpp b/src/mame/drivers/im01.cpp
index e0837d858b1..3d891e21e1c 100644
--- a/src/mame/drivers/im01.cpp
+++ b/src/mame/drivers/im01.cpp
@@ -12,8 +12,8 @@ TODO:
- emulate К1801ВМ1, using T11 for now and I hope it works ok
- emulate K1809BB1, IRQ is from here too (measured 177.4Hz)
- It's running a bit too fast?: CPU clock was measured 4.61MHz, beeper
- frequency 3.73KHz and beeper duration 34.2ms. In MAME, beeper frequency is
- 4.15KHz and duration is 31ms, meaning it's around 1.1 times faster, maybe
+ frequency 3.73kHz and beeper duration 34.2ms. In MAME, beeper frequency is
+ 4.15kHz and duration is 31ms, meaning it's around 1.1 times faster, maybe
К1801ВМ1 internal timing differs from T11, and/or MAME's T11 core timing
itself is not 100% accurate.
- Is im01t extra RAM chip used at all, and if so, where is it mapped?
diff --git a/src/mame/drivers/tmnt.cpp b/src/mame/drivers/tmnt.cpp
index 5b6796b8e0e..9b35c6a03bf 100644
--- a/src/mame/drivers/tmnt.cpp
+++ b/src/mame/drivers/tmnt.cpp
@@ -73,8 +73,9 @@ Updates:
#include "sound/okim6295.h"
#include "sound/samples.h"
#include "sound/ymopm.h"
+
#include "speaker.h"
-#include "ymfm/src/ymfm.h"
+#include "ymfm/src/ymfm.h" // decode_fp
uint16_t tmnt_state::k052109_word_noA12_r(offs_t offset)
@@ -209,7 +210,7 @@ void tmnt_state::tmnt_sres_w(uint8_t data)
if (data & 0x04)
{
if (!m_samples->playing(0))
- m_samples->start_raw(0, m_sampledata, 0x40000, 20000);
+ m_samples->start_raw(0, m_sampledata, 0x40000, 640000 / 32);
}
else
m_samples->stop(0);
@@ -228,11 +229,13 @@ uint8_t tmnt_state::tmnt_upd_busy_r()
SAMPLES_START_CB_MEMBER(tmnt_state::tmnt_decode_sample)
{
- int i;
+ // using MAME samples to HLE the title music
+ // to put it briefly, it's like this on the PCB:
+ // 640kHz XTAL -> 74161 and 3 74393 -> ROM address -> ROM output to 2 74166 -> YM3014
uint8_t *source = memregion("title")->base();
// sample data is encoded in Yamaha FP format
- for (i = 0; i < 0x40000; i++)
+ for (int i = 0; i < 0x40000; i++)
{
int val = source[2 * i] + source[2 * i + 1] * 256;
m_sampledata[i] = ymfm::decode_fp(val >> 3);