Add MSM6585 support to MSM5205
This commit is contained in:
parent
e6d78b0cf5
commit
7bed84c7c5
|
@ -76,8 +76,8 @@ static void ComputeTables(INT32 chip)
|
|||
|
||||
static void MSM5205_playmode(INT32 , INT32 select)
|
||||
{
|
||||
static const INT32 prescaler_table[4] = {96,48,64,0};
|
||||
INT32 prescaler = prescaler_table[select & 3];
|
||||
static const INT32 prescaler_table[2][4] = { {96,48,64,0}, {160, 40, 80, 20} };
|
||||
INT32 prescaler = prescaler_table[(select >> 3) & 1][select & 3];
|
||||
INT32 bitwidth = (select & 4) ? 4 : 3;
|
||||
|
||||
if( voice->prescaler != prescaler )
|
||||
|
@ -417,7 +417,7 @@ INT32 MSM5205CalcInterleave(INT32 chip, INT32 cpu_speed)
|
|||
if (chip > nNumChips) bprintf(PRINT_ERROR, _T("MSM5205CalcInterleave called with invalid chip %x\n"), chip);
|
||||
#endif
|
||||
|
||||
static const INT32 table[4] = {96, 48, 64, 0};
|
||||
static const INT32 table[2][4] = { {96, 48, 64, 0}, {160, 40, 80, 20} };
|
||||
|
||||
voice = &chips[chip];
|
||||
|
||||
|
@ -425,7 +425,7 @@ INT32 MSM5205CalcInterleave(INT32 chip, INT32 cpu_speed)
|
|||
return 133; // (usually...)
|
||||
}
|
||||
|
||||
INT32 ret = cpu_speed / (cpu_speed / (voice->clock / table[voice->select & 3]));
|
||||
INT32 ret = cpu_speed / (cpu_speed / (voice->clock / table[(voice->select >> 3) & 1][voice->select & 3]));
|
||||
|
||||
return ret / (nBurnFPS / 100);
|
||||
}
|
||||
|
|
|
@ -9,6 +9,11 @@
|
|||
#define MSM5205_S64_4B 6 /* prescaler 1/64(6KHz) , data 4bit */
|
||||
#define MSM5205_SEX_4B 7 /* VCLK slave mode , data 4bit */
|
||||
|
||||
#define MSM6585_S160 (4+8) /* prescaler 1/160(4KHz), data 4bit */
|
||||
#define MSM6585_S40 (5+8) /* prescaler 1/40(16KHz), data 4bit */
|
||||
#define MSM6585_S80 (6+8) /* prescaler 1/80 (8KHz), data 4bit */
|
||||
#define MSM6585_S20 (7+8) /* prescaler 1/20(32KHz), data 4bit */
|
||||
|
||||
void MSM5205ResetWrite(INT32 chip, INT32 reset);
|
||||
void MSM5205DataWrite(INT32 chip, INT32 data);
|
||||
void MSM5205VCLKWrite(INT32 chip, INT32 reset);
|
||||
|
|
Loading…
Reference in New Issue