Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TT2500: Debugging and reduce type slice warnings. #429

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tt2500/tt2500_cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ static uint16 cpu_ars (uint16 data, uint16 n)
{
uint32 sign = 0;
if (data & 0100000)
sign = 0177777 << 16;
return (data >> n) + (sign >> n);
sign = 0177777u << 16;
return (data >> n) + ((uint16) (sign >> n));
}

uint16 cpu_alu (uint16 insn, uint16 op, uint16 adata, uint16 bdata)
Expand Down
2 changes: 1 addition & 1 deletion tt2500/tt2500_dpy.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ static t_stat dpy_reset (DEVICE *dptr)

void dpy_magic (uint16 xr, uint16 *r2, uint16 *r3, uint16 r4, uint16 r5)
{
uint32 x = *r2, y = *r3;
uint16 x = *r2, y = *r3;
uint16 x0, y0, x1, y1, dx, dy;

sim_debug (DBG_VEC, &dpy_dev, "MAGIC %06o\n", xr);
Expand Down
5 changes: 3 additions & 2 deletions tt2500/tt2500_tv.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,12 @@ tv_reset (DEVICE *dptr)

static void tv_character (int row, int col, uint8 c, uint8 *font)
{
uint16 i, j, pixels, address;
size_t i, address;

address = 16 * c;
for (i = 0; i < 16; i++) {
pixels = font[address + i];
size_t j, pixels = font[address + i];

for (j = 0; j < 8; j++) {
surface[8 * (72 * i + col) + j] = palette[(pixels >> 7) & 1];
pixels <<= 1;
Expand Down
4 changes: 2 additions & 2 deletions tt2500/tt2500_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ uart_r_svc(UNIT *uptr)
if (uptr->fileref != NULL) {
unsigned char buf;
if (sim_fread (&buf, 1, 1, uptr->fileref) == 1) {
sim_debug (DBG_RX, &uart_dev, "Received character %03o\n", buf);
sim_debug (DBG_RX, &uart_dev, "Received character %03o (%c)\n", buf, isprint(buf) ? buf : ' ');
RBUF = buf;
flag_on (INT_RRD);
}
Expand All @@ -122,7 +122,7 @@ uart_r_svc(UNIT *uptr)
ch = tmxr_getc_ln (&uart_ldsc);
if (ch & TMXR_VALID) {
RBUF = sim_tt_inpcvt (ch, TT_GET_MODE (uart_unit[0].flags));
sim_debug (DBG_RX, &uart_dev, "Received character %03o\n", RBUF);
sim_debug (DBG_RX, &uart_dev, "TMXR received character %03o (%c)\n", RBUF, isprint(RBUF) ? RBUF : ' ');
flag_on (INT_RRD);
return SCPE_OK;
}
Expand Down
Loading