diff options
author | Olivier Galibert <galibert@pobox.com> | 2009-03-07 19:41:14 +0000 |
---|---|---|
committer | Olivier Galibert <galibert@pobox.com> | 2009-03-07 19:41:14 +0000 |
commit | 27fbe5929174e6092c88c7c8b50b7b5413a435a9 (patch) | |
tree | 2cc65b49cf9ec014fe69bd68b11d469452f4c3a8 | |
parent | cfafcff7fffc34a7ffc151c24a3903e021c02563 (diff) |
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).
-rw-r--r-- | src/emu/cpu/tms57002/tms57002.c | 4 | ||||
-rw-r--r-- | src/emu/cpu/tms57002/tmsinstr.lst | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/emu/cpu/tms57002/tms57002.c b/src/emu/cpu/tms57002/tms57002.c index 2433930cb6d..0ca9abbeba6 100644 --- a/src/emu/cpu/tms57002/tms57002.c +++ b/src/emu/cpu/tms57002/tms57002.c @@ -97,7 +97,7 @@ typedef struct { UINT32 xm_adr; - UINT8 host[4], hidx; + UINT8 host[4], hidx, allow_update; 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]; s->cmem[s->sa] = val; s->sti &= ~SU_CVAL; + s->allow_update = 0; } } else { s->sa = data; @@ -329,6 +330,7 @@ void tms57002_sync(const device_config *device) if(s->sti & (IN_PLOAD | IN_CLOAD)) return; + s->allow_update = 1; s->pc = 0; s->ca = 0; s->id = 0; diff --git a/src/emu/cpu/tms57002/tmsinstr.lst b/src/emu/cpu/tms57002/tmsinstr.lst index d50732d5cdd..6c1583f1e4e 100644 --- a/src/emu/cpu/tms57002/tmsinstr.lst +++ b/src/emu/cpu/tms57002/tmsinstr.lst @@ -441,6 +441,7 @@ sfma 2b 5b 1 n f sfml 1 34 1 y sfml + s->macc = (s->macc & 0x8000000000000ULL) | ((s->macc << 1) & 0x7ffffffffffffULL); sfmo 2a 60 1 n f sfmo 0 @@ -471,6 +472,7 @@ slml 2a 07 1 y smhc 2a 05 1 y smhc %c + %wc(%mo >> 16); smhd 2a 03 1 y smhd %d |