summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/sound/tms5110.c
diff options
context:
space:
mode:
author Jonathan Gevaryahu <Lord-Nightmare@users.noreply.github.com>2008-05-13 04:56:47 +0000
committer Jonathan Gevaryahu <Lord-Nightmare@users.noreply.github.com>2008-05-13 04:56:47 +0000
commit16942d210b0288e958f645fbb2b96ca5d434cf39 (patch)
treeb7d388fd651c986d216d91312626b65a910ed851 /src/emu/sound/tms5110.c
parent86dd599aa8887e656f50d70e3e6318d6c05360c1 (diff)
Update TMS5200/5220 documentation and comments
Fix the chirp table implementation in both the 51xx and 52xx chips.
Diffstat (limited to 'src/emu/sound/tms5110.c')
-rw-r--r--src/emu/sound/tms5110.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/emu/sound/tms5110.c b/src/emu/sound/tms5110.c
index d298cc7b26e..88c90bb2500 100644
--- a/src/emu/sound/tms5110.c
+++ b/src/emu/sound/tms5110.c
@@ -591,17 +591,21 @@ void tms5110_process(void *chip, INT16 *buffer, unsigned int size)
}
else
{
- /* generate voiced samples here */
- if (tms->coeff->subtype & (SUBTYPE_TMS5100 | SUBTYPE_M58817))
- {
- if (tms->pitch_count > 50)
- current_val = 0;
- else
- current_val = tms->coeff->chirptable[tms->pitch_count];
-
- }
- else
- current_val = (tms->coeff->chirptable[tms->pitch_count%sizeof(tms->coeff->chirptable)]);
+ /* generate voiced samples here */
+ /* US patent 4331836 Figure 14B shows, and logic would hold, that a pitch based chirp
+ * function has a chirp/peak and then a long chain of zeroes.
+ * The last entry of the chirp rom is at address 0b110011 (50d), the 51st sample,
+ * and if the address reaches that point the ADDRESS incrementer is
+ * disabled, forcing all samples beyond 50d to be == 50d
+ * (address 50d holds zeroes)
+ */
+
+ /*if (tms->coeff->subtype & (SUBTYPE_TMS5100 | SUBTYPE_M58817))*/
+
+ if (tms->pitch_count > 50)
+ current_val = tms->coeff->chirptable[50];
+ else
+ current_val = tms->coeff->chirptable[tms->pitch_count];
}