Fixed a problem with breakpoints running on one instruction on the Z80, version now 0.46

Change-Id: I597087a8ed7d4da211c706e0c4972f5d037706ee
This commit is contained in:
David Banks 2015-06-29 17:16:23 +01:00
parent 8a2615d6b3
commit caec07483d
3 changed files with 19 additions and 13 deletions

View File

@ -6,7 +6,7 @@
#include "AtomBusMon.h"
#define VERSION "0.45"
#define VERSION "0.46"
#if (CPU == Z80)
#define NAME "ICE-T80"
@ -433,18 +433,20 @@ int logDetails() {
}
logMode(mode);
log0(" hit at %04X", i_addr);
if (mode & W_MEM_MASK) {
log0(" writing");
if (mode & BW_MEM_MASK) {
if (mode & W_MEM_MASK) {
log0(" writing");
} else {
log0(" reading");
}
log0(" %04X = %02X\n", b_addr, b_data);
} else {
log0(" reading");
}
log0(" %04X = %02X\n", b_addr, b_data);
if (mode & B_MASK) {
logCycleCount(OFFSET_BW_CNTL, OFFSET_BW_CNTH);
}
log0("\n");
}
#ifdef CPUEMBEDDED
if (mode & B_MEM_MASK) {
// It's only safe to do this for brkpts, as it makes memory accesses
logCycleCount(OFFSET_BW_CNTL, OFFSET_BW_CNTH);
disMem(i_addr);
}
#endif

View File

@ -510,7 +510,7 @@ begin
if ((single = '0') or (cmd_edge2 = '0' and cmd_edge1 = '1' and cmd = "01000")) then
Rdy_int <= (not brkpt_active);
SS_Step <= '1';
SS_Step <= (not brkpt_active);
else
Rdy_int <= (not Sync);
end if;

View File

@ -226,10 +226,14 @@ begin
end if;
end if;
end process;
-- Make the monitoring decision in the middle of T2, but only if WAIT_n is '1'
Sync0 <= (WAIT_n_int and (not RD_n_int) and (not MREQ_n_int) and (not M1_n_int)) when TState = "010" else '0';
-- For instruction breakpoints, we make the monitoring decision as early as possibe
-- to allow time to stop the current instruction, which is possible because we don't
-- really care about the data (it's re-read from memory by the disassembler).
Sync0 <= not M1_n_int when TState = "001" else '0';
-- For reads/write breakpoints we make the monitoring decision in the middle of T2
-- but only if WAIT_n is '1' so we catch the right data.
Read_n0 <= not (WAIT_n_int and (not RD_n_int) and (not MREQ_n_int) and (M1_n_int)) when TState = "010" else '1';
Write_n0 <= not (WAIT_n_int and (not WR_n_int) and (not MREQ_n_int) and (M1_n_int)) when TState = "010" else '1';