mirror of
https://github.com/holub/mame
synced 2025-05-21 13:18:56 +03:00
more preparation for merge of tms51xx and tms52xx. no whatsnew.
This commit is contained in:
parent
2f0d3d3d25
commit
88c7fc638d
@ -65,19 +65,7 @@
|
||||
#include "tms5110.h"
|
||||
|
||||
#define MAX_SAMPLE_CHUNK 512
|
||||
|
||||
#define MAX_K 10
|
||||
#define MAX_SCALE_BITS 6
|
||||
#define MAX_SCALE (1<<MAX_SCALE_BITS)
|
||||
#define COEFF_ENERGY_SENTINEL (511)
|
||||
#define SUBTYPE_TMS5100 1
|
||||
#define SUBTYPE_M58817 2
|
||||
#define SUBTYPE_TMS5110 4
|
||||
#define SUBTYPE_TMS5200 8
|
||||
#define SUBTYPE_TMS5220 16
|
||||
#define SUBTYPE_TMS5220C 32
|
||||
#define FIFO_SIZE 64
|
||||
#define MAX_CHIRP_SIZE 51
|
||||
#define FIFO_SIZE 64 // TODO: technically the tms51xx chips don't have a fifo at all
|
||||
|
||||
/* Variants */
|
||||
|
||||
@ -97,20 +85,6 @@
|
||||
#define CTL_STATE_OUTPUT (1)
|
||||
#define CTL_STATE_NEXT_OUTPUT (2)
|
||||
|
||||
struct tms5100_coeffs
|
||||
{
|
||||
int subtype;
|
||||
int num_k;
|
||||
int energy_bits;
|
||||
int pitch_bits;
|
||||
int kbits[MAX_K];
|
||||
unsigned short energytable[MAX_SCALE];
|
||||
unsigned short pitchtable[MAX_SCALE];
|
||||
int ktable[MAX_K][MAX_SCALE];
|
||||
INT8 chirptable[MAX_CHIRP_SIZE];
|
||||
INT8 interp_coeff[8];
|
||||
};
|
||||
|
||||
typedef struct _tms5110_state tms5110_state;
|
||||
struct _tms5110_state
|
||||
{
|
||||
|
@ -9,6 +9,7 @@
|
||||
#define TMS5110_CMD_RESET (0) /* 0 0 0 x | 1 */
|
||||
#define TMS5110_CMD_LOAD_ADDRESS (2) /* 0 0 1 x | 2 */
|
||||
#define TMS5110_CMD_OUTPUT (4) /* 0 1 0 x | 3 */
|
||||
#define TMS5110_CMD_SPKSLOW (6) /* 0 1 1 x | 1 | Note: this command is undocumented on the datasheets, it only appears on the patents. It might not actually work properly on some of the real chips as manufactured. Acts the same as CMD_SPEAK, but makes the interpolator take two A cycles whereever it would normally only take one, effectively making speech of any given word take about twice as long as normal. */
|
||||
#define TMS5110_CMD_READ_BIT (8) /* 1 0 0 x | 1 */
|
||||
#define TMS5110_CMD_SPEAK (10) /* 1 0 1 x | 1 */
|
||||
#define TMS5110_CMD_READ_BRANCH (12) /* 1 1 0 x | 1 */
|
||||
|
@ -1,6 +1,4 @@
|
||||
/* TMS5110 ROM Tables */
|
||||
|
||||
/* Kx is (5-bits -> 9 bits+sign, 2's comp. fractional (-1 < x < 1) */
|
||||
/* TMS51xx and TMS52xx ROM Tables */
|
||||
|
||||
/* The following table is assumed to be for TMS5100
|
||||
*
|
||||
@ -35,10 +33,38 @@
|
||||
/* quick note on derivative analysis:
|
||||
Judging by all the TI chips I (Lord Nightmare) have done this test on, the first derivative between successive values of the LPC tables should follow a roughly triangular or sine shaped curve, the second derivative should start at a value, increase slightly, then decrease smoothly and become negative right around where the LPC curve passes 0, finally increase slightly right near the end. If it doesn't do this, there is probably a wrong value in there somewhere. The pitch and energy tables follow similar patterns but aren't the same since they never cross 0. The chirp table doesn't follow this pattern at all.
|
||||
*/
|
||||
/* chip type defines */
|
||||
#define SUBTYPE_TMS5100 1
|
||||
#define SUBTYPE_M58817 2
|
||||
#define SUBTYPE_TMS5110 4
|
||||
#define SUBTYPE_TMS5200 8
|
||||
#define SUBTYPE_TMS5220 16
|
||||
#define SUBTYPE_TMS5220C 32
|
||||
|
||||
/* coefficient defines */
|
||||
#define MAX_K 10
|
||||
#define MAX_SCALE_BITS 6
|
||||
#define MAX_SCALE (1<<MAX_SCALE_BITS)
|
||||
#define COEFF_ENERGY_SENTINEL (511)
|
||||
#define MAX_CHIRP_SIZE 51
|
||||
|
||||
struct tms5100_coeffs
|
||||
{
|
||||
int subtype;
|
||||
int num_k;
|
||||
int energy_bits;
|
||||
int pitch_bits;
|
||||
int kbits[MAX_K];
|
||||
unsigned short energytable[MAX_SCALE];
|
||||
unsigned short pitchtable[MAX_SCALE];
|
||||
int ktable[MAX_K][MAX_SCALE];
|
||||
INT8 chirptable[MAX_CHIRP_SIZE];
|
||||
INT8 interp_coeff[8];
|
||||
};
|
||||
|
||||
/* The following TMS5100/TMC0280/CD2801 coefficients come from US Patent 4,209,836 and several others, and have been verified using derivative analysis to show which values were bad (due to poor quality images or badly typed copies of the tables in the patents, depending on which patent you look at) which were then corrected by figuring out what the tiny remaining marks on the photocopied version of the coefficient sheet COULD have been which would make the derivatives play nice.
|
||||
***These values have not yet been verified against a real TMS5100 or TMC0280 or CD2801 (from speak & spell, etc)***
|
||||
*/
|
||||
*/
|
||||
static const struct tms5100_coeffs pat4209836_coeff =
|
||||
{
|
||||
/* subtype */
|
||||
|
Loading…
Reference in New Issue
Block a user