From 27fbe5929174e6092c88c7c8b50b7b5413a435a9 Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Sat, 7 Mar 2009 19:41:14 +0000 Subject: 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). --- src/emu/cpu/tms57002/tms57002.c | 4 +++- src/emu/cpu/tms57002/tmsinstr.lst | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3