mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
cpu/z80: Fixed incorrect cycle counts when custom cycle tables are used. (#11167)
bus/msx/module/skw01.cpp: Removed note about instability in the cx5m128 driver. Software list items promoted to working --------------------------------------- msx1_cart.xml: A Life Planet - M36 - Mother Brain has been aliving (Japan)
This commit is contained in:
parent
54b7b86e36
commit
95fc84a22c
5 changed files with 13 additions and 9 deletions
|
@ -1317,8 +1317,7 @@ kept for now until finding out what those bytes affect...
|
|||
</part>
|
||||
</software>
|
||||
|
||||
<!-- Software does not start. -->
|
||||
<software name="m36" supported="no">
|
||||
<software name="m36">
|
||||
<description>A Life Planet - M36 - Mother Brain has been aliving (Japan)</description>
|
||||
<year>1987</year>
|
||||
<publisher>Pixel</publisher>
|
||||
|
|
|
@ -11,11 +11,6 @@ The PCB is labeled YMX-YWP.
|
|||
The software can be started from Basic by entering the command "CALL JWP"
|
||||
or "_JWP".
|
||||
|
||||
TODO:
|
||||
- This module runs unstable on the cx5m128 driver.
|
||||
The instability is mostly visible when pressing F1, causing the system
|
||||
to reset, hang, or display a screen with random data.
|
||||
|
||||
**************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
|
|
|
@ -340,7 +340,7 @@ static const uint8_t cc_ex[0x100] = {
|
|||
} while (0)
|
||||
|
||||
// T Memory Address
|
||||
#define MTM ((m_cc_op == nullptr ? 4 : m_cc_op[0])-1)
|
||||
#define MTM (m_mtm_cycles)
|
||||
|
||||
#define EXEC(prefix,opcode) do { \
|
||||
unsigned op = opcode; \
|
||||
|
@ -3814,6 +3814,12 @@ void z80_device::z80_set_cycle_tables(const uint8_t *op, const uint8_t *cb, cons
|
|||
}
|
||||
|
||||
|
||||
void z80_device::set_mtm_cycles(uint8_t mtm_cycles)
|
||||
{
|
||||
m_mtm_cycles = mtm_cycles;
|
||||
}
|
||||
|
||||
|
||||
z80_device::z80_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||
z80_device(mconfig, Z80, tag, owner, clock)
|
||||
{
|
||||
|
@ -3828,7 +3834,8 @@ z80_device::z80_device(const machine_config &mconfig, device_type type, const ch
|
|||
m_irqack_cb(*this),
|
||||
m_refresh_cb(*this),
|
||||
m_nomreq_cb(*this),
|
||||
m_halt_cb(*this)
|
||||
m_halt_cb(*this),
|
||||
m_mtm_cycles(3)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ public:
|
|||
z80_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
void z80_set_cycle_tables(const uint8_t *op, const uint8_t *cb, const uint8_t *ed, const uint8_t *xy, const uint8_t *xycb, const uint8_t *ex);
|
||||
void set_mtm_cycles(uint8_t mtm_cycles);
|
||||
template <typename... T> void set_memory_map(T &&... args) { set_addrmap(AS_PROGRAM, std::forward<T>(args)...); }
|
||||
template <typename... T> void set_m1_map(T &&... args) { set_addrmap(AS_OPCODES, std::forward<T>(args)...); }
|
||||
template <typename... T> void set_io_map(T &&... args) { set_addrmap(AS_IO, std::forward<T>(args)...); }
|
||||
|
@ -291,6 +292,7 @@ protected:
|
|||
const uint8_t * m_cc_xy;
|
||||
const uint8_t * m_cc_xycb;
|
||||
const uint8_t * m_cc_ex;
|
||||
uint8_t m_mtm_cycles;
|
||||
};
|
||||
|
||||
DECLARE_DEVICE_TYPE(Z80, z80_device)
|
||||
|
|
|
@ -469,6 +469,7 @@ void system1_state::machine_start()
|
|||
}
|
||||
|
||||
m_maincpu->z80_set_cycle_tables(cc_op, cc_cb, cc_ed, cc_xy, cc_xycb, cc_ex);
|
||||
m_maincpu->set_mtm_cycles(3*5);
|
||||
|
||||
m_mute_xor = 0x00;
|
||||
m_dakkochn_mux_data = 0x00;
|
||||
|
|
Loading…
Reference in a new issue