summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/devices/cpu/unsp/unsp_exxx.cpp54
-rw-r--r--src/devices/cpu/unsp/unspdasm_exxx.cpp4
-rw-r--r--src/mame/drivers/generalplus_gpl16250_rom.cpp7
-rw-r--r--src/mame/includes/generalplus_gpl16250.h17
4 files changed, 41 insertions, 41 deletions
diff --git a/src/devices/cpu/unsp/unsp_exxx.cpp b/src/devices/cpu/unsp/unsp_exxx.cpp
index 06ccd2e11f5..89cbb8d95fd 100644
--- a/src/devices/cpu/unsp/unsp_exxx.cpp
+++ b/src/devices/cpu/unsp/unsp_exxx.cpp
@@ -196,55 +196,33 @@ void unsp_12_device::execute_exxx_group(uint16_t op)
}
return;
}
- else if (((op & 0xf0f8) == 0xe008))
+ else if (((op & 0xf1f8) == 0xe008))
{
// MUL operations
// MUL 1 1 1 0* r r r S* 0 0 0 0 1 r r r (* = sign bit, fixed here)
/*
- print_mul(stream, op); // MUL uu or MUL su
+ print_mul(stream, op); // MUL uu
*/
+ // only valid if S is 1, otherwise falls through to shifter
- if (op & 0x0100)
- {
- // MUL su ( unsigned * signed )
- const uint16_t opa = (op >> 9) & 7;
- const uint16_t opb = op & 7;
- m_core->m_icount -= 12;
-
- LOGMASKED(LOG_UNSP_MULS, "%s: MUL su with %04x (signed) * %04x (unsigned) (fra:%d) :\n", machine().describe_context(), m_core->m_r[opa], m_core->m_r[opb], m_core->m_fra);
+ // MUL uu (unsigned * unsigned)
+ uint32_t lres = 0;
+ const uint16_t opa = (op >> 9) & 7;
+ const uint16_t opb = op & 7;
- uint32_t lres = m_core->m_r[opa] * m_core->m_r[opb];
- if (m_core->m_r[opa] & 0x8000)
- {
- lres -= m_core->m_r[opb] << 16;
- }
- m_core->m_r[REG_R4] = lres >> 16;
- m_core->m_r[REG_R3] = (uint16_t)lres;
-
- LOGMASKED(LOG_UNSP_MULS, "result was : %08x\n", lres);
-
- return;
- }
- else
- {
- // MUL uu (unsigned * unsigned)
- uint32_t lres = 0;
- const uint16_t opa = (op >> 9) & 7;
- const uint16_t opb = op & 7;
-
- m_core->m_icount -= 12; // unknown
- lres = m_core->m_r[opa] * m_core->m_r[opb];
- m_core->m_r[REG_R4] = lres >> 16;
- m_core->m_r[REG_R3] = (uint16_t)lres;
- return;
- }
+ m_core->m_icount -= 12; // unknown
+ lres = m_core->m_r[opa] * m_core->m_r[opb];
+ m_core->m_r[REG_R4] = lres >> 16;
+ m_core->m_r[REG_R3] = (uint16_t)lres;
return;
- }
- else if (((op & 0xf080) == 0xe080))
+ }
+ else if (((op & 0xf180) == 0xe080))
{
// MULS 1 1 1 0* r r r S* 1 s s s s r r r (* = sign bit, fixed here)
/*
- // MULS uu or MULS su (invalid?)
+ // MULS uu
+ // only valid if S is 1? otherwise falls through to shifter
+
print_muls(stream, op);
*/
LOGMASKED(LOG_UNSP_MULS, "MULS uu or su\n");
diff --git a/src/devices/cpu/unsp/unspdasm_exxx.cpp b/src/devices/cpu/unsp/unspdasm_exxx.cpp
index 43c494cc0a5..c9d95d2d072 100644
--- a/src/devices/cpu/unsp/unspdasm_exxx.cpp
+++ b/src/devices/cpu/unsp/unspdasm_exxx.cpp
@@ -87,14 +87,14 @@ offs_t unsp_12_disassembler::disassemble_exxx_group(std::ostream& stream, offs_t
util::stream_format(stream, "%s ds:[%s],%s", bitops[bitop], regs[rd], regs[rs]);
return UNSP_DASM_OK;
}
- else if (((op & 0xf0f8) == 0xe008))
+ else if (((op & 0xf1f8) == 0xe008))
{
// MUL operations
// MUL 1 1 1 0* r r r S* 0 0 0 0 1 r r r (* = sign bit, fixed here)
print_mul(stream, op); // MUL uu or MUL su (invalid?)
return UNSP_DASM_OK;
}
- else if (((op & 0xf080) == 0xe080))
+ else if (((op & 0xf180) == 0xe080))
{
// MULS 1 1 1 0* r r r S* 1 s s s s r r r (* = sign bit, fixed here)
diff --git a/src/mame/drivers/generalplus_gpl16250_rom.cpp b/src/mame/drivers/generalplus_gpl16250_rom.cpp
index cd082ee254b..3d195217492 100644
--- a/src/mame/drivers/generalplus_gpl16250_rom.cpp
+++ b/src/mame/drivers/generalplus_gpl16250_rom.cpp
@@ -445,6 +445,11 @@ void tkmag220_game_state::machine_reset()
}
+void gormiti_game_state::machine_reset()
+{
+ gcm394_game_state::machine_reset();
+ m_maincpu->set_alt_tile_addressing_hack(1);
+}
// the JAKKS ones of these seem to be known as 'Generalplus GPAC500' hardware?
CONS(2009, smartfp, 0, 0, base, smartfp, gcm394_game_state, empty_init, "Fisher-Price", "Fun 2 Learn Smart Fit Park (UK)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND)
@@ -457,6 +462,6 @@ CONS(2009, smartfps, smartfp, 0, base, smartfp, gcm394_game_state, empty_init,
CONS(200?, tkmag220, 0, 0, tkmag220, tkmag220, tkmag220_game_state, empty_init, "TaiKee", "Mini Arcade Games Console (Family Sport 220-in-1)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
// die on this one is 'GCM420'
-CONS(2013, gormiti, 0, 0, base, gormiti, gcm394_game_state, empty_init, "Giochi Preziosi", "Gormiti Game Arena (Spain)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND)
+CONS(2013, gormiti, 0, 0, base, gormiti, gormiti_game_state, empty_init, "Giochi Preziosi", "Gormiti Game Arena (Spain)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND)
// Fun 2 Learn 3-in-1 SMART SPORTS ?
diff --git a/src/mame/includes/generalplus_gpl16250.h b/src/mame/includes/generalplus_gpl16250.h
index dbbc1076c48..2137df990c1 100644
--- a/src/mame/includes/generalplus_gpl16250.h
+++ b/src/mame/includes/generalplus_gpl16250.h
@@ -112,4 +112,21 @@ private:
};
+class gormiti_game_state : public gcm394_game_state
+{
+public:
+ gormiti_game_state(const machine_config& mconfig, device_type type, const char* tag) :
+ gcm394_game_state(mconfig, type, tag)
+ {
+ }
+
+
+protected:
+
+ virtual void machine_reset() override;
+
+private:
+};
+
+
#endif