summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/emu/machine.cpp2
-rw-r--r--src/mame/drivers/pacman.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp
index aeb0d674062..2be457052e2 100644
--- a/src/emu/machine.cpp
+++ b/src/emu/machine.cpp
@@ -826,6 +826,8 @@ void running_machine::set_rtc_datetime(const system_time &systime)
// rand - standardized random numbers
//-------------------------------------------------
+// TODO: using this function in the core is strongly discouraged (can affect inp playback),
+// maybe we should consider moving this function to somewhere else instead.
u32 running_machine::rand()
{
m_rand_seed = 1664525 * m_rand_seed + 1013904223;
diff --git a/src/mame/drivers/pacman.cpp b/src/mame/drivers/pacman.cpp
index 21dc50083a0..3fc6b8f59eb 100644
--- a/src/mame/drivers/pacman.cpp
+++ b/src/mame/drivers/pacman.cpp
@@ -554,10 +554,8 @@ READ8_MEMBER(pacman_state::alibaba_mystery_1_r)
{
/* The return value determines what the mystery item is. Each bit corresponds
to a question mark */
- // we use z80 R register due of a bug in rand() function (inp desyncing on playback, supposedly caused by emu/ioport.cpp line 498)
- // it needs to be changed anyway by testing this device on real HW
- //return machine().rand() & 0x0f;
- return m_maincpu->state_int(Z80_R) & 0x0f;
+ return machine().rand() & 0x0f;
+// return m_maincpu->state_int(Z80_R) & 0x0f;
}