z80: around 10% performance gain by checking if devcb is unset that is called on every opcode

This commit is contained in:
hap 2025-03-29 18:58:21 +01:00
parent 89f4c0d698
commit df2098bdcc

View File

@ -4,6 +4,7 @@
# macros # macros
########################################################## ##########################################################
macro nomreq_addr macro nomreq_addr
if (!m_nomreq_cb.isunset())
m_nomreq_cb(TADR, 0x00, 0xff); m_nomreq_cb(TADR, 0x00, 0xff);
+ 1 + 1
@ -46,6 +47,7 @@ macro wm16_sp
macro rop macro rop
m_m1_cycles-2 !! TDAT8 = opcode_read(); m_m1_cycles-2 !! TDAT8 = opcode_read();
if (!m_refresh_cb.isunset())
m_refresh_cb((I << 8) | (R2 & 0x80) | (R & 0x7f), 0x00, 0xff); m_refresh_cb((I << 8) | (R2 & 0x80) | (R & 0x7f), 0x00, 0xff);
+ 2 + 2
PC++; R++; Q = QT; QT = YF | XF; PC++; R++; Q = QT; QT = YF | XF;