Skip to content

Commit 8f95443

Browse files
committed
Minor
1 parent ca732fe commit 8f95443

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

src/ClassSimZ80.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -172,17 +172,17 @@ uint ClassSimZ80::doReset()
172172
*/
173173
inline void ClassSimZ80::halfCycle()
174174
{
175-
pin_t clk = !readBit("clk");
176-
if (clk && readBit("_rfsh")) // Before the clock rise, service the chip pins (unless it is a refresh cycle)
175+
const pin_t clk = readBit("clk");
176+
if (!clk && readBit("_rfsh")) // Before the clock rise, service the chip pins (unless it is a refresh cycle)
177177
{
178-
bool m1 = readBit("_m1");
179-
bool rfsh = 1; //readBit("_rfsh");
180-
bool mreq = readBit("_mreq");
181-
bool rd = readBit("_rd");
182-
bool wr = readBit("_wr");
183-
bool iorq = readBit("_iorq");
184-
bool t2 = readBit("t2");
185-
bool t3 = readBit("t3");
178+
const bool m1 = readBit("_m1");
179+
const bool rfsh = 1; //readBit("_rfsh");
180+
const bool mreq = readBit("_mreq");
181+
const bool rd = readBit("_rd");
182+
const bool wr = readBit("_wr");
183+
const bool iorq = readBit("_iorq");
184+
const bool t2 = readBit("t2");
185+
const bool t3 = readBit("t3");
186186

187187
if (!m1 && rfsh && !mreq && !rd && wr && iorq && t2)
188188
handleMemRead(readAB()); // Instruction read
@@ -203,7 +203,7 @@ inline void ClassSimZ80::halfCycle()
203203
handleIrq(); // Interrupt request/Ack cycle
204204
}
205205

206-
set(clk, "clk"); // Let the clock edge propagate through the chip
206+
set(!clk, "clk"); // Let the clock edge propagate through the chip
207207

208208
// After each half-cycle, populate the watch data
209209
if (::controller.getWatch().getWatchlistLen()) // Removing all watches increases the performance

0 commit comments

Comments
 (0)