diff options
| author | 2017-09-15 00:47:08 +0200 | |
|---|---|---|
| committer | 2017-09-15 00:47:08 +0200 | |
| commit | 5e249520ffc9893125eb431999578296387ab840 (patch) | |
| tree | abff1fde6e52cec827ca1327dd67aa2d66ee9dca /src | |
| parent | b117f75925eeb44924d8c38c93c75117315bd147 (diff) | |
Revert Z80_R usage in alibaba, added a note about machine().rand(), open to suggestions (nw)
Diffstat (limited to 'src')
| -rw-r--r-- | src/emu/machine.cpp | 2 | ||||
| -rw-r--r-- | src/mame/drivers/pacman.cpp | 6 |
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; } |
