Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/stardot/b-em
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Fosdick committed Jan 1, 2025
2 parents 9bd99ca + 4bd48c3 commit ec15c27
Show file tree
Hide file tree
Showing 18 changed files with 733 additions and 224 deletions.
Binary file modified roms/tube/CiscOS.rom
Binary file not shown.
4 changes: 2 additions & 2 deletions src/6502.c
Original file line number Diff line number Diff line change
Expand Up @@ -4102,8 +4102,8 @@ void m65c02_exec(int slice)
case 0x02:
if (dbg_core6502)
debug_trap(&core6502_cpu_debug, debug_addr(oldpc), 1);
else
polltime(1);
polltime(2);
(void)readmem(pc++);
break;

case 0x04: /*TSB zp */
Expand Down
4 changes: 2 additions & 2 deletions src/6502tube.c
Original file line number Diff line number Diff line change
Expand Up @@ -593,8 +593,8 @@ void tube_6502_exec()
case 0x02:
if (dbg_tube6502)
debug_trap(&tube6502_cpu_debug, oldtpc, 1);
else
polltime(1);
polltime(2);
readmem(pc++);
break;

case 0x04: /*TSB zp */
Expand Down
1 change: 1 addition & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ b_em_SOURCES = \
tapenoise.c \
pdp11/pdp11.c \
pdp11/pdp11_debug.c \
textsave.c \
tube.c \
uef.c \
uservia.c \
Expand Down
1 change: 1 addition & 0 deletions src/b-em.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

#include "compat_wrappers.h"

Expand Down
12 changes: 8 additions & 4 deletions src/debugger.c
Original file line number Diff line number Diff line change
Expand Up @@ -1751,16 +1751,20 @@ static void debug_trace_write(cpu_debug_t *cpu, uint32_t addr, FILE *fp)
*(sym++) = '\0';
}

fputs("\t", fp);
while(strlen(buf) < 52)
strcat(buf, " ");

fputs(buf, fp);
*buf = ' ';

const char **np = cpu->reg_names;
const char *name;
int r = 0;
while ((name = *np++)) {
size_t len = cpu->reg_print(r++, buf + 1, sizeof buf - 1);
fwrite(buf, len + 1, 1, fp);
fputs(" ", fp);
fputs(name, fp);
fputs("=", fp);
size_t len = cpu->reg_print(r++, buf, sizeof buf);
fwrite(buf, len, 1, fp);
}

if (sym)
Expand Down
Loading

0 comments on commit ec15c27

Please sign in to comment.