tms57002: Add two missing instructions and hack up the coef update.

The real way coefficient updates are handled is a little too complex
for now, but the hack throttles the update speed to the real rate
given the way konami uses it (once per sync).  It's near impossible to
use it in a different way anyway.

Fixes mantis 2941 (at least for puzldama) and maybe 2953 (needs to
find the roms and test).
This commit is contained in:
Olivier Galibert 2009-03-07 19:41:14 +00:00
parent cfafcff7ff
commit 27fbe59291
2 changed files with 5 additions and 1 deletions

View File

@ -97,7 +97,7 @@ typedef struct {
UINT32 xm_adr; UINT32 xm_adr;
UINT8 host[4], hidx; UINT8 host[4], hidx, allow_update;
cd cache; cd cache;
@ -275,6 +275,7 @@ WRITE8_DEVICE_HANDLER(tms57002_data_w)
UINT32 val = (s->host[0]<<24) | (s->host[1]<<16) | (s->host[2]<<8) | s->host[3]; UINT32 val = (s->host[0]<<24) | (s->host[1]<<16) | (s->host[2]<<8) | s->host[3];
s->cmem[s->sa] = val; s->cmem[s->sa] = val;
s->sti &= ~SU_CVAL; s->sti &= ~SU_CVAL;
s->allow_update = 0;
} }
} else { } else {
s->sa = data; s->sa = data;
@ -329,6 +330,7 @@ void tms57002_sync(const device_config *device)
if(s->sti & (IN_PLOAD | IN_CLOAD)) if(s->sti & (IN_PLOAD | IN_CLOAD))
return; return;
s->allow_update = 1;
s->pc = 0; s->pc = 0;
s->ca = 0; s->ca = 0;
s->id = 0; s->id = 0;

View File

@ -441,6 +441,7 @@ sfma 2b 5b 1 n f
sfml 1 34 1 y sfml 1 34 1 y
sfml sfml
s->macc = (s->macc & 0x8000000000000ULL) | ((s->macc << 1) & 0x7ffffffffffffULL);
sfmo 2a 60 1 n f sfmo 2a 60 1 n f
sfmo 0 sfmo 0
@ -471,6 +472,7 @@ slml 2a 07 1 y
smhc 2a 05 1 y smhc 2a 05 1 y
smhc %c smhc %c
%wc(%mo >> 16);
smhd 2a 03 1 y smhd 2a 03 1 y
smhd %d smhd %d