ALTAIR, Interdata, LGP, NOVA: Addition of sim_printf in various places from Bob Supnik

This commit is contained in:
Mark Pizzolato 2015-04-03 18:33:31 -07:00
parent 7b3fdf5718
commit c221e1ff97
16 changed files with 101 additions and 98 deletions

View file

@ -164,7 +164,7 @@ while ((i = getc (fileref)) != EOF) {
addr++; addr++;
cnt++; cnt++;
} /* end while */ } /* end while */
printf ("%d Bytes loaded.\n", cnt); sim_printf ("%d Bytes loaded.\n", cnt);
return (SCPE_OK); return (SCPE_OK);
} }

View file

@ -1948,7 +1948,7 @@ if (!(val & UNIT_816E) && (MEMSIZE > MAXMEMSIZE16)) {
MEMSIZE = MAXMEMSIZE16; MEMSIZE = MAXMEMSIZE16;
for (i = MEMSIZE; i < MAXMEMSIZE16E; i = i + 2) for (i = MEMSIZE; i < MAXMEMSIZE16E; i = i + 2)
M[i >> 1] = 0; M[i >> 1] = 0;
printf ("Reducing memory to 64KB\n"); sim_printf ("Reducing memory to 64KB\n");
} }
return SCPE_OK; return SCPE_OK;
} }

View file

@ -204,7 +204,7 @@ if ((temp = getc (uptr->fileref)) == EOF) { /* error? */
if (feof (uptr->fileref)) { /* eof? */ if (feof (uptr->fileref)) { /* eof? */
pt_sta = pt_sta | STA_DU; /* set DU */ pt_sta = pt_sta | STA_DU; /* set DU */
if (ptr_stopioe) if (ptr_stopioe)
printf ("PTR end of file\n"); sim_printf ("PTR end of file\n");
else return SCPE_OK; else return SCPE_OK;
} }
else perror ("PTR I/O error"); else perror ("PTR I/O error");

View file

@ -501,7 +501,7 @@ do {
if ((ch = getc (uptr->fileref)) == EOF) { /* read char */ if ((ch = getc (uptr->fileref)) == EOF) { /* read char */
if (feof (uptr->fileref)) { /* err or eof? */ if (feof (uptr->fileref)) { /* err or eof? */
if (stop) if (stop)
printf ("Reader end of file\n"); sim_printf ("Reader end of file\n");
else return SCPE_OK; else return SCPE_OK;
} }
else perror ("Reader I/O error"); else perror ("Reader I/O error");
@ -516,7 +516,7 @@ do {
if ((d1 == EOF) || (d2 == EOF)) { /* error? */ if ((d1 == EOF) || (d2 == EOF)) { /* error? */
if (feof (uptr->fileref)) { /* eof? */ if (feof (uptr->fileref)) { /* eof? */
if (stop) if (stop)
printf ("Reader end of file\n"); sim_printf ("Reader end of file\n");
else return SCPE_OK; else return SCPE_OK;
} }
else perror ("Reader I/O error"); else perror ("Reader I/O error");

View file

@ -1,6 +1,6 @@
/* nova_cpu.c: NOVA CPU simulator /* nova_cpu.c: NOVA CPU simulator
Copyright (c) 1993-2008, Robert M. Supnik Copyright (c) 1993-2013, Robert M. Supnik
Permission is hereby granted, free of charge, to any person obtaining a Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"), copy of this software and associated documentation files (the "Software"),
@ -25,6 +25,7 @@
cpu Nova central processor cpu Nova central processor
17-Mar-13 RMS Added clarifying brances to IND_STEP macro (Dave Bryan)
04-Jul-07 BKR DEV_SET/CLR macros now used, 04-Jul-07 BKR DEV_SET/CLR macros now used,
support for non-existant devices added support for non-existant devices added
CPU bootstrap code warning: high-speed devices may not boot properly, CPU bootstrap code warning: high-speed devices may not boot properly,
@ -387,7 +388,6 @@ MTAB cpu_mod[] = {
{ UNIT_MSIZE, (24 * 1024), NULL, "24K", &cpu_set_size }, { UNIT_MSIZE, (24 * 1024), NULL, "24K", &cpu_set_size },
{ UNIT_MSIZE, (28 * 1024), NULL, "28K", &cpu_set_size }, { UNIT_MSIZE, (28 * 1024), NULL, "28K", &cpu_set_size },
{ UNIT_MSIZE, (32 * 1024), NULL, "32K", &cpu_set_size }, { UNIT_MSIZE, (32 * 1024), NULL, "32K", &cpu_set_size },
{ UNIT_MSIZE, (36 * 1024), NULL, "36K", &cpu_set_size }, { UNIT_MSIZE, (36 * 1024), NULL, "36K", &cpu_set_size },
{ UNIT_MSIZE, (40 * 1024), NULL, "40K", &cpu_set_size }, { UNIT_MSIZE, (40 * 1024), NULL, "40K", &cpu_set_size },
{ UNIT_MSIZE, (44 * 1024), NULL, "44K", &cpu_set_size }, { UNIT_MSIZE, (44 * 1024), NULL, "44K", &cpu_set_size },

View file

@ -1,6 +1,6 @@
/* nova_pt.c: NOVA paper tape read/punch simulator /* nova_pt.c: NOVA paper tape read/punch simulator
Copyright (c) 1993-2008, Robert M. Supnik Copyright (c) 1993-2015, Robert M. Supnik
Permission is hereby granted, free of charge, to any person obtaining a Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"), copy of this software and associated documentation files (the "Software"),
@ -26,6 +26,7 @@
ptr paper tape reader ptr paper tape reader
ptp paper tape punch ptp paper tape punch
28-Mar-15 RMS Revised to use sim_printf
04-Jul-07 BKR added PTR and PTP device DISABLE capability, 04-Jul-07 BKR added PTR and PTP device DISABLE capability,
added 7B/8B support PTR and PTP (default is 8B), added 7B/8B support PTR and PTP (default is 8B),
DEV_SET/CLR macros now used, DEV_SET/CLR macros now used,
@ -193,7 +194,7 @@ if ((ptr_unit.flags & UNIT_ATT) == 0) /* attached? */
if ((temp = getc (ptr_unit.fileref)) == EOF) { /* end of file? */ if ((temp = getc (ptr_unit.fileref)) == EOF) { /* end of file? */
if (feof (ptr_unit.fileref)) { if (feof (ptr_unit.fileref)) {
if (ptr_stopioe) if (ptr_stopioe)
printf ("PTR end of file\n"); sim_printf ("PTR end of file\n");
else return SCPE_OK; else return SCPE_OK;
} }
else perror ("PTR I/O error"); else perror ("PTR I/O error");

View file

@ -1,6 +1,6 @@
/* nova_qty.c: NOVA multiplexor (QTY/ALM) simulator /* nova_qty.c: NOVA multiplexor (QTY/ALM) simulator
Copyright (c) 2000-2008, Robert M. Supnik Copyright (c) 2000-2015, Robert M. Supnik
Written by Bruce Ray and used with his gracious permission. Written by Bruce Ray and used with his gracious permission.
Permission is hereby granted, free of charge, to any person obtaining a Permission is hereby granted, free of charge, to any person obtaining a
@ -26,7 +26,9 @@
qty multiplexor: QTY = 4060, ALM = 42xx qty multiplexor: QTY = 4060, ALM = 42xx
04-Jul-07 BKR fixed QTY output line number calculation (affected higher line numbers), 28-Mar-15 RMS Revised to use sim_printf
14-Mar-12 RMS Fixed dangling else clauses
04-Jul-07 BKR Fixed QTY output line number calculation (affected higher line numbers),
25-Mar-04 RMS Updated for V3.2 25-Mar-04 RMS Updated for V3.2
12-Jan-04 BKR Initial release 12-Jan-04 BKR Initial release
includes both original DG "quad" multiplexor (QTY) includes both original DG "quad" multiplexor (QTY)

View file

@ -227,7 +227,7 @@ for ( pos = 0 ; (! done) && ((i=getc(fileref)) != EOF) ; ++pos )
done = 1 ; /* we're done! */ done = 1 ; /* we're done! */
if ( ! (origin & 0x8000) ) if ( ! (origin & 0x8000) )
{ {
printf( "auto start @ %05o \n", (origin & 0x7FFF) ) ; sim_printf( "auto start @ %05o \n", (origin & 0x7FFF) ) ;
} }
break ; break ;
} }
@ -275,8 +275,8 @@ for ( pos = 0 ; (! done) && ((i=getc(fileref)) != EOF) ; ++pos )
if (count == 0) { if (count == 0) {
if ( csum ) if ( csum )
{ {
printf( "checksum error: block start at %d [0x%x] \n", block_start, block_start ) ; sim_printf( "checksum error: block start at %d [0x%x] \n", block_start, block_start ) ;
printf( "calculated: 0%o [0x%4x]\n", csum, csum ) ; sim_printf( "calculated: 0%o [0x%4x]\n", csum, csum ) ;
if ( ! (sim_switches & SWMASK('I')) ) if ( ! (sim_switches & SWMASK('I')) )
return SCPE_CSUM; return SCPE_CSUM;
} }

View file

@ -1,6 +1,6 @@
/* nova_tt.c: NOVA console terminal simulator /* nova_tt.c: NOVA console terminal simulator
Copyright (c) 1993-2008, Robert M. Supnik Copyright (c) 1993-2015, Robert M. Supnik
Permission is hereby granted, free of charge, to any person obtaining a Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"), copy of this software and associated documentation files (the "Software"),
@ -26,6 +26,7 @@
tti terminal input tti terminal input
tto terminal output tto terminal output
31-Mar-15 RMS Backported parity capability from GitHub master
04-Jul-07 BKR fixed Dasher CR/LF swap function in 'tti_svc()', 04-Jul-07 BKR fixed Dasher CR/LF swap function in 'tti_svc()',
DEV_SET/CLR macros now used, DEV_SET/CLR macros now used,
TTO device may now be DISABLED TTO device may now be DISABLED
@ -40,7 +41,6 @@
31-May-01 RMS Added multiconsole support 31-May-01 RMS Added multiconsole support
Notes: Notes:
- TTO output is always masked to 7 bits in this rev
- TTO "Dasher" attribute sends '\b' to console instead of '\031' - TTO "Dasher" attribute sends '\b' to console instead of '\031'
- TTO may be disabled - TTO may be disabled
- TTI "Dasher" attribute swaps <CR> and <LF> - TTI "Dasher" attribute swaps <CR> and <LF>
@ -90,10 +90,10 @@ REG tti_reg[] = {
MTAB ttx_mod[] = { MTAB ttx_mod[] = {
{ UNIT_DASHER, 0, "ANSI", "ANSI", &ttx_setmod }, { UNIT_DASHER, 0, "ANSI", "ANSI", &ttx_setmod },
{ UNIT_DASHER, UNIT_DASHER, "Dasher", "DASHER", &ttx_setmod }, { UNIT_DASHER, UNIT_DASHER, "Dasher", "DASHER", &ttx_setmod },
{ TT_PAR, TT_PAR_EVEN, "Even Parity", "EVEN", &ttx_setpar }, { TT_PAR, TT_PAR_EVEN, "even parity", "EVEN", &ttx_setpar },
{ TT_PAR, TT_PAR_ODD, "Odd Parity", "ODD", &ttx_setpar }, { TT_PAR, TT_PAR_ODD, "odd parity", "ODD", &ttx_setpar },
{ TT_PAR, TT_PAR_MARK, "Mark Parity", "MARK", &ttx_setpar }, { TT_PAR, TT_PAR_MARK, "mark parity", "MARK", &ttx_setpar },
{ TT_PAR, TT_PAR_SPACE, "No Parity", "NONE", &ttx_setpar }, { TT_PAR, TT_PAR_SPACE, "no parity", "NONE", &ttx_setpar },
{ 0 } { 0 }
} ; } ;