PDP10, PDP11, VAX: const cleanup

This commit is contained in:
Mark Pizzolato 2015-02-13 06:18:24 -08:00
parent 68efe4d36a
commit ef9d1adce1
77 changed files with 479 additions and 499 deletions

View file

@ -779,7 +779,7 @@ t_stat show_addr (FILE *st, UNIT *uptr, int32 val, void *desc);
t_stat set_vec (UNIT *uptr, int32 val, char *cptr, void *desc); t_stat set_vec (UNIT *uptr, int32 val, char *cptr, void *desc);
t_stat show_vec (FILE *st, UNIT *uptr, int32 val, void *desc); t_stat show_vec (FILE *st, UNIT *uptr, int32 val, void *desc);
t_stat show_vec_mux (FILE *st, UNIT *uptr, int32 val, void *desc); t_stat show_vec_mux (FILE *st, UNIT *uptr, int32 val, void *desc);
t_stat auto_config (char *name, int32 num); t_stat auto_config (const char *name, int32 num);
#endif #endif

View file

@ -2212,7 +2212,7 @@ AUTO_CON auto_tab[] = {/*c #v am vm fxa fxv */
#define DEV_NEXUS 0 #define DEV_NEXUS 0
#endif #endif
#endif #endif
t_stat auto_config (char *name, int32 nctrl) t_stat auto_config (const char *name, int32 nctrl)
{ {
uint32 csr = IOPAGEBASE + AUTO_CSRBASE; uint32 csr = IOPAGEBASE + AUTO_CSRBASE;
uint32 vec = VEC_Q + AUTO_VECBASE; uint32 vec = VEC_Q + AUTO_VECBASE;

View file

@ -218,8 +218,8 @@ static void update_lpcs (int32 flg);
static void change_rdy (int32 setrdy, int32 clrrdy); static void change_rdy (int32 setrdy, int32 clrrdy);
static int16 evenbits (int16 value); static int16 evenbits (int16 value);
static t_stat lp20_help (FILE *st, struct sim_device *dptr, static t_stat lp20_help (FILE *st, struct sim_device *dptr,
struct sim_unit *uptr, int32 flag, char *cptr); struct sim_unit *uptr, int32 flag, const char *cptr);
static char *lp20_description (DEVICE *dptr); static const char *lp20_description (DEVICE *dptr);
/* DEC standard VFU tape for 'optical' VFU default. /* DEC standard VFU tape for 'optical' VFU default.
* Note that this must be <= DV_SIZE as we copy it into the DAVFU. * Note that this must be <= DV_SIZE as we copy it into the DAVFU.
@ -1279,7 +1279,7 @@ return SCPE_OK;
} }
static t_stat lp20_help (FILE *st, struct sim_device *dptr, static t_stat lp20_help (FILE *st, struct sim_device *dptr,
struct sim_unit *uptr, int32 flag, char *cptr) struct sim_unit *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, fprintf (st,
"The LP20 DMA line printer controller is a UNIBUS device developed by the 36-bit product line.\n" "The LP20 DMA line printer controller is a UNIBUS device developed by the 36-bit product line.\n"
@ -1320,7 +1320,7 @@ fprintf (st,
return SCPE_OK; return SCPE_OK;
} }
static char *lp20_description (DEVICE *dptr) static const char *lp20_description (DEVICE *dptr)
{ {
return "DMA Line Printer controller"; return "DMA Line Printer controller";
} }

View file

@ -267,7 +267,7 @@
/* Data tables */ /* Data tables */
struct cpu_table { struct cpu_table {
char *name; /* model name */ const char *name; /* model name */
uint32 std; /* standard flags */ uint32 std; /* standard flags */
uint32 opt; /* set/clear flags */ uint32 opt; /* set/clear flags */
uint32 maxm; /* max memory */ uint32 maxm; /* max memory */

View file

@ -389,7 +389,7 @@ extern int32 int_req[IPL_HLVL];
#define BLOW_STOP (3) /* shutting down */ #define BLOW_STOP (3) /* shutting down */
/* Card Reader state */ /* Card Reader state */
static char *cardFormat = "unknown"; static const char *cardFormat = "unknown";
static t_bool (*readRtn)(UNIT *, int16 *, char *, char *); static t_bool (*readRtn)(UNIT *, int16 *, char *, char *);
static char ascii_code[4096]; /* 2^12 possible values */ static char ascii_code[4096]; /* 2^12 possible values */
static int currCol; /* current column when reading */ static int currCol; /* current column when reading */
@ -440,7 +440,6 @@ static int32 cddb = 0; /* data, 2nd status */
static int32 cddbs = 0; /* second status bits (or with cddb) */ static int32 cddbs = 0; /* second status bits (or with cddb) */
/* forward references */ /* forward references */
DEVICE cr_dev;
static void setupCardFile (UNIT *, int32); static void setupCardFile (UNIT *, int32);
t_stat cr_rd (int32 *, int32, int32); t_stat cr_rd (int32 *, int32, int32);
t_stat cr_wr (int32, int32, int32); t_stat cr_wr (int32, int32, int32);
@ -460,8 +459,8 @@ t_stat cr_set_eof (UNIT *, int32, char *, void *);
t_stat cr_show_eof (FILE *, UNIT *, int32, void *); t_stat cr_show_eof (FILE *, UNIT *, int32, void *);
t_stat cr_set_trans (UNIT *, int32, char*, void *); t_stat cr_set_trans (UNIT *, int32, char*, void *);
t_stat cr_show_trans (FILE *, UNIT *, int32, void *); t_stat cr_show_trans (FILE *, UNIT *, int32, void *);
static t_stat cr_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); static t_stat cr_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *cr_description (DEVICE *dptr); const char *cr_description (DEVICE *dptr);
/* CR data structures /* CR data structures
@ -1796,7 +1795,7 @@ if (bits)
return; return;
} }
static t_stat cr_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) static t_stat cr_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
char devtype[MAXDESCRIP]; char devtype[MAXDESCRIP];
int32 crtypes; int32 crtypes;
@ -1939,7 +1938,7 @@ fprint_reg_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *cr_description (DEVICE *dptr) const char *cr_description (DEVICE *dptr)
{ {
/* Not thread-safe, but malloc() would be leak. */ /* Not thread-safe, but malloc() would be leak. */
static char desc[MAXDESCRIP+sizeof(" card reader")-1] = ""; static char desc[MAXDESCRIP+sizeof(" card reader")-1] = "";

View file

@ -141,8 +141,8 @@ void dco_clr_int (int32 ln);
void dco_set_int (int32 ln); void dco_set_int (int32 ln);
int32 dco_iack (void); int32 dco_iack (void);
void dcx_reset_ln (int32 ln); void dcx_reset_ln (int32 ln);
t_stat dcx_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat dcx_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *dcx_description (DEVICE *dptr); const char *dcx_description (DEVICE *dptr);
/* DCI data structures /* DCI data structures
@ -632,7 +632,7 @@ dci_dib.lnt = newln * 010; /* upd IO page lnt */
return auto_config (dci_dev.name, newln); /* auto config */ return auto_config (dci_dev.name, newln); /* auto config */
} }
t_stat dcx_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat dcx_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "DC11 Additional Terminal Interfaces (DCI/DCO)\n\n"); fprintf (st, "DC11 Additional Terminal Interfaces (DCI/DCO)\n\n");
fprintf (st, "For very early system programs, the PDP-11 simulator supports up to sixteen\n"); fprintf (st, "For very early system programs, the PDP-11 simulator supports up to sixteen\n");
@ -677,7 +677,7 @@ fprintf (st, "are lost when the simulator shuts down or DCI is detached.\n");
return SCPE_OK; return SCPE_OK;
} }
char *dcx_description (DEVICE *dptr) const char *dcx_description (DEVICE *dptr)
{ {
return (dptr == &dci_dev) ? "DC11 asynchronous line interface - receiver" return (dptr == &dci_dev) ? "DC11 asynchronous line interface - receiver"
: "DC11 asynchronous line interface - transmitter"; : "DC11 asynchronous line interface - transmitter";

View file

@ -311,7 +311,7 @@ typedef struct queuehdr QH;
typedef struct buffer_queue { typedef struct buffer_queue {
QH hdr; /* Forward/Back Buffer pointers */ QH hdr; /* Forward/Back Buffer pointers */
char * name; /* Queue name */ const char * name; /* Queue name */
size_t size; /* Maximum number of entries (0 means no limit) */ size_t size; /* Maximum number of entries (0 means no limit) */
size_t count; /* Current Used Count */ size_t count; /* Current Used Count */
struct dmc_controller *controller; /* back pointer to the containing controller */ struct dmc_controller *controller; /* back pointer to the containing controller */
@ -929,10 +929,10 @@ t_stat dmc_showqueues (FILE* st, UNIT* uptr, int32 val, void* desc);
t_stat dmc_setconnectpoll (UNIT* uptr, int32 val, char* cptr, void* desc); t_stat dmc_setconnectpoll (UNIT* uptr, int32 val, char* cptr, void* desc);
t_stat dmc_showconnectpoll (FILE* st, UNIT* uptr, int32 val, void* desc); t_stat dmc_showconnectpoll (FILE* st, UNIT* uptr, int32 val, void* desc);
t_stat dmc_showddcmp (FILE* st, UNIT* uptr, int32 val, void* desc); t_stat dmc_showddcmp (FILE* st, UNIT* uptr, int32 val, void* desc);
t_stat dmc_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat dmc_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
t_stat dmc_help_attach (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat dmc_help_attach (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *dmc_description (DEVICE *dptr); const char *dmc_description (DEVICE *dptr);
char *dmp_description (DEVICE *dptr); const char *dmp_description (DEVICE *dptr);
int dmc_is_attached (UNIT* uptr); int dmc_is_attached (UNIT* uptr);
int dmc_is_dmc (CTLR *controller); int dmc_is_dmc (CTLR *controller);
int dmc_is_rqi_set (CTLR *controller); int dmc_is_rqi_set (CTLR *controller);
@ -949,7 +949,7 @@ void dmc_clr_modem_dtr (CTLR *controller);
void dmc_process_command (CTLR *controller); void dmc_process_command (CTLR *controller);
t_bool dmc_buffer_fill_receive_buffers (CTLR *controller); t_bool dmc_buffer_fill_receive_buffers (CTLR *controller);
void dmc_start_transfer_buffer (CTLR *controller); void dmc_start_transfer_buffer (CTLR *controller);
void dmc_buffer_queue_init (CTLR *controller, BUFFER_QUEUE *q, char *name, size_t size, BUFFER *buffers); void dmc_buffer_queue_init (CTLR *controller, BUFFER_QUEUE *q, const char *name, size_t size, BUFFER *buffers);
void dmc_buffer_queue_init_all (CTLR *controller); void dmc_buffer_queue_init_all (CTLR *controller);
BUFFER *dmc_buffer_queue_head (BUFFER_QUEUE *q); BUFFER *dmc_buffer_queue_head (BUFFER_QUEUE *q);
BUFFER *dmc_buffer_allocate (CTLR *controller); BUFFER *dmc_buffer_allocate (CTLR *controller);
@ -1653,7 +1653,7 @@ fprintf(st, " TimeRemaining: %d\n", controller->link.TimeRemaining);
return SCPE_OK; return SCPE_OK;
} }
t_stat dmc_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat dmc_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
const char helpString[] = const char helpString[] =
/* The '*'s in the next line represent the standard text width of a help line */ /* The '*'s in the next line represent the standard text width of a help line */
@ -1850,7 +1850,7 @@ sprintf (connectpoll, "%d", DMC_CONNECT_POLL);
return scp_help (st, dptr, uptr, flag, helpString, cptr, devname, devcount, connectpoll); return scp_help (st, dptr, uptr, flag, helpString, cptr, devname, devcount, connectpoll);
} }
t_stat dmc_help_attach (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat dmc_help_attach (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
return dmc_help (st, dptr, uptr, flag, DMC_HLP_ATTACH); return dmc_help (st, dptr, uptr, flag, DMC_HLP_ATTACH);
} }
@ -1918,11 +1918,11 @@ ans &= mask;
return ans; return ans;
} }
void dmc_dumpregsel0(CTLR *controller, int trace_level, char * prefix, uint16 data) void dmc_dumpregsel0(CTLR *controller, int trace_level, const char * prefix, uint16 data)
{ {
char *type_str = ""; const char *type_str = "";
uint16 type = dmc_bitfld(data, DMC_SEL0_V_ITYPE, DMC_SEL0_S_ITYPE); uint16 type = dmc_bitfld(data, DMC_SEL0_V_ITYPE, DMC_SEL0_S_ITYPE);
static char *dmc_types[] = {"XMT BA/CC", "CNTL IN", "HALT", "BASE IN", "RCV BA/CC", "?????", "?????", "?????"}; static const char *dmc_types[] = {"XMT BA/CC", "CNTL IN", "HALT", "BASE IN", "RCV BA/CC", "?????", "?????", "?????"};
if (dmc_is_dmc(controller)) { if (dmc_is_dmc(controller)) {
if (dmc_is_rqi_set(controller)) { if (dmc_is_rqi_set(controller)) {
@ -1965,11 +1965,11 @@ else {
} }
} }
void dmc_dumpregsel2(CTLR *controller, int trace_level, char *prefix, uint16 data) void dmc_dumpregsel2(CTLR *controller, int trace_level, const char *prefix, uint16 data)
{ {
char *type_str = ""; const char *type_str = "";
uint16 type = dmc_bitfld(data, DMC_SEL2_V_CODE, DMC_SEL2_S_CODE); uint16 type = dmc_bitfld(data, DMC_SEL2_V_CODE, DMC_SEL2_S_CODE);
static char *dmc_types[] = {"XMT BA/CC OUT", "CNTL OUT", "?????", "?????", "RCV BA/CC OUT", "?????", "?????", "?????"}; static const char *dmc_types[] = {"XMT BA/CC OUT", "CNTL OUT", "?????", "?????", "RCV BA/CC OUT", "?????", "?????", "?????"};
type_str = dmc_types[type]; type_str = dmc_types[type];
@ -1989,7 +1989,7 @@ sim_debug(
); );
} }
void dmc_dumpregsel4(CTLR *controller, int trace_level, char *prefix, uint16 data) void dmc_dumpregsel4(CTLR *controller, int trace_level, const char *prefix, uint16 data)
{ {
if (dmc_is_rdyi_set(controller)) { if (dmc_is_rdyi_set(controller)) {
sim_debug( sim_debug(
@ -2019,7 +2019,7 @@ else {
} }
} }
void dmc_dumpregsel6(CTLR *controller, int trace_level, char *prefix, uint16 data) void dmc_dumpregsel6(CTLR *controller, int trace_level, const char *prefix, uint16 data)
{ {
if (dmc_is_rdyi_set(controller)) { if (dmc_is_rdyi_set(controller)) {
sim_debug( sim_debug(
@ -2043,7 +2043,7 @@ else {
} }
} }
void dmc_dumpregsel10(CTLR *controller, int trace_level, char *prefix, uint16 data) void dmc_dumpregsel10(CTLR *controller, int trace_level, const char *prefix, uint16 data)
{ {
sim_debug( sim_debug(
trace_level, trace_level,
@ -2090,7 +2090,7 @@ return ans;
void dmc_setreg(CTLR *controller, int reg, uint16 data, int ctx) void dmc_setreg(CTLR *controller, int reg, uint16 data, int ctx)
{ {
char *trace = "Setting"; const char *trace = "Setting";
switch (dmc_getsel(reg)) { switch (dmc_getsel(reg)) {
case 00: case 00:
@ -2554,7 +2554,7 @@ if (active)
return SCPE_OK; return SCPE_OK;
} }
void dmc_buffer_queue_init(CTLR *controller, BUFFER_QUEUE *q, char *name, size_t size, BUFFER *buffers) void dmc_buffer_queue_init(CTLR *controller, BUFFER_QUEUE *q, const char *name, size_t size, BUFFER *buffers)
{ {
q->name = name; q->name = name;
initqueue (&q->hdr, q, size, buffers, sizeof(*buffers)); initqueue (&q->hdr, q, size, buffers, sizeof(*buffers));
@ -2642,7 +2642,7 @@ return ((q->hdr.next == &q->hdr) ? NULL : (BUFFER *)q->hdr.next);
void dmc_queue_control_out(CTLR *controller, uint16 sel6) void dmc_queue_control_out(CTLR *controller, uint16 sel6)
{ {
CONTROL_OUT *control = calloc(1, sizeof(*control)); CONTROL_OUT *control = (CONTROL_OUT *)calloc(1, sizeof(*control));
CONTROL_OUT *last = NULL; CONTROL_OUT *last = NULL;
control->sel6 = sel6; control->sel6 = sel6;
@ -2811,8 +2811,8 @@ else { /* DMP */
if (controller->transfer_type == DMP_C_TYPE_MODE) { if (controller->transfer_type == DMP_C_TYPE_MODE) {
uint16 mode = sel6 & DMP_TYPE_INPUT_MASK; uint16 mode = sel6 & DMP_TYPE_INPUT_MASK;
char * duplex = (mode & 1) ? "Full-Duplex" : "Half-Duplex"; const char * duplex = (mode & 1) ? "Full-Duplex" : "Half-Duplex";
char * config; const char * config;
if (mode & 4) if (mode & 4)
config = "Point-to-point"; config = "Point-to-point";
@ -3856,7 +3856,7 @@ uptr->filename = NULL;
return r; return r;
} }
char *dmc_description (DEVICE *dptr) const char *dmc_description (DEVICE *dptr)
{ {
#if defined (VM_PDP10) #if defined (VM_PDP10)
return "DMR11 Synchronous network controller"; return "DMR11 Synchronous network controller";
@ -3865,7 +3865,7 @@ return "DMC11 Synchronous network controller";
#endif #endif
} }
char *dmp_description (DEVICE *dptr) const char *dmp_description (DEVICE *dptr)
{ {
return (UNIBUS) ? "DMP11 Synchronous network controller" return (UNIBUS) ? "DMP11 Synchronous network controller"
: "DMV11 Synchronous network controller"; : "DMV11 Synchronous network controller";

View file

@ -123,9 +123,9 @@ static t_stat dup_set_W5 (UNIT* uptr, int32 val, char* cptr, void* desc);
static t_stat dup_show_W5 (FILE* st, UNIT* uptr, int32 val, void* desc); static t_stat dup_show_W5 (FILE* st, UNIT* uptr, int32 val, void* desc);
static t_stat dup_set_W6 (UNIT* uptr, int32 val, char* cptr, void* desc); static t_stat dup_set_W6 (UNIT* uptr, int32 val, char* cptr, void* desc);
static t_stat dup_show_W6 (FILE* st, UNIT* uptr, int32 val, void* desc); static t_stat dup_show_W6 (FILE* st, UNIT* uptr, int32 val, void* desc);
static t_stat dup_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); static t_stat dup_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
static t_stat dup_help_attach (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); static t_stat dup_help_attach (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
static char *dup_description (DEVICE *dptr); static const char *dup_description (DEVICE *dptr);
/* RXCSR - 16XXX0 - receiver control/status register */ /* RXCSR - 16XXX0 - receiver control/status register */
@ -472,9 +472,9 @@ DEVICE dpv_dev = {
#define DUPDPTR ((UNIBUS) ? &dup_dev : &dpv_dev) #define DUPDPTR ((UNIBUS) ? &dup_dev : &dpv_dev)
/* Register names for Debug tracing */ /* Register names for Debug tracing */
static char *dup_rd_regs[] = static const char *dup_rd_regs[] =
{"RXCSR ", "RXDBUF", "TXCSR ", "TXDBUF" }; {"RXCSR ", "RXDBUF", "TXCSR ", "TXDBUF" };
static char *dup_wr_regs[] = static const char *dup_wr_regs[] =
{"RXCSR ", "PARCSR", "TXCSR ", "TXDBUF"}; {"RXCSR ", "PARCSR", "TXCSR ", "TXDBUF"};
@ -1466,7 +1466,7 @@ dptr->numunits = newln + 1;
return dup_reset (dptr); /* setup lines and auto config */ return dup_reset (dptr); /* setup lines and auto config */
} }
static t_stat dup_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) static t_stat dup_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
const char helpString[] = const char helpString[] =
/* The '*'s in the next line represent the standard text width of a help line */ /* The '*'s in the next line represent the standard text width of a help line */
@ -1650,12 +1650,12 @@ sprintf (connectpoll, "%d", DUP_CONNECT_POLL);
return scp_help (st, dptr, uptr, flag, helpString, cptr, busname, devcount, connectpoll); return scp_help (st, dptr, uptr, flag, helpString, cptr, busname, devcount, connectpoll);
} }
static t_stat dup_help_attach (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) static t_stat dup_help_attach (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
return dup_help (st, dptr, uptr, flag, DUP_HLP_ATTACH); return dup_help (st, dptr, uptr, flag, DUP_HLP_ATTACH);
} }
static char *dup_description (DEVICE *dptr) static const char *dup_description (DEVICE *dptr)
{ {
return (UNIBUS) ? "DUP11 bit synchronous interface" : return (UNIBUS) ? "DUP11 bit synchronous interface" :
"DPV11 bit synchronous interface"; "DPV11 bit synchronous interface";

View file

@ -278,9 +278,9 @@ t_stat dz_setnl (UNIT *uptr, int32 val, char *cptr, void *desc);
t_stat dz_set_log (UNIT *uptr, int32 val, char *cptr, void *desc); t_stat dz_set_log (UNIT *uptr, int32 val, char *cptr, void *desc);
t_stat dz_set_nolog (UNIT *uptr, int32 val, char *cptr, void *desc); t_stat dz_set_nolog (UNIT *uptr, int32 val, char *cptr, void *desc);
t_stat dz_show_log (FILE *st, UNIT *uptr, int32 val, void *desc); t_stat dz_show_log (FILE *st, UNIT *uptr, int32 val, void *desc);
t_stat dz_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat dz_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
t_stat dz_help_attach (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat dz_help_attach (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *dz_description (DEVICE *dptr); const char *dz_description (DEVICE *dptr);
/* DZ data structures /* DZ data structures
@ -360,9 +360,9 @@ DEVICE dz_dev = {
}; };
/* Register names for Debug tracing */ /* Register names for Debug tracing */
static char *dz_rd_regs[] = static const char *dz_rd_regs[] =
{"CSR ", "RBUF", "TCR ", "MSR " }; {"CSR ", "RBUF", "TCR ", "MSR " };
static char *dz_wr_regs[] = static const char *dz_wr_regs[] =
{"CSR ", "LPR ", "TCR ", "TDR "}; {"CSR ", "LPR ", "TCR ", "TDR "};
/* IO dispatch routines, I/O addresses 177601x0 - 177601x7 */ /* IO dispatch routines, I/O addresses 177601x0 - 177601x7 */
@ -742,7 +742,7 @@ int32 i, ndev;
sim_debug(DBG_TRC, dptr, "dz_reset()\n"); sim_debug(DBG_TRC, dptr, "dz_reset()\n");
if (dz_ldsc == NULL) if (dz_ldsc == NULL)
dz_desc.ldsc = dz_ldsc = calloc (dz_desc.lines, sizeof(*dz_ldsc)); dz_desc.ldsc = dz_ldsc = (TMLN *)calloc (dz_desc.lines, sizeof(*dz_ldsc));
for (i = 0; i < dz_desc.lines/DZ_LINES; i++) /* init muxes */ for (i = 0; i < dz_desc.lines/DZ_LINES; i++) /* init muxes */
dz_clear (i, TRUE); dz_clear (i, TRUE);
dz_rxi = dz_txi = 0; /* clr master int */ dz_rxi = dz_txi = 0; /* clr master int */
@ -831,7 +831,7 @@ if (newln < dz_desc.lines) {
} }
} }
dz_dib.lnt = (newln / DZ_LINES) * IOLN_DZ; /* set length */ dz_dib.lnt = (newln / DZ_LINES) * IOLN_DZ; /* set length */
dz_desc.ldsc = dz_ldsc = realloc(dz_ldsc, newln*sizeof(*dz_ldsc)); dz_desc.ldsc = dz_ldsc = (TMLN *)realloc(dz_ldsc, newln*sizeof(*dz_ldsc));
if (dz_desc.lines < newln) if (dz_desc.lines < newln)
memset (dz_ldsc + dz_desc.lines, 0, sizeof(*dz_ldsc)*(newln-dz_desc.lines)); memset (dz_ldsc + dz_desc.lines, 0, sizeof(*dz_ldsc)*(newln-dz_desc.lines));
dz_desc.lines = newln; dz_desc.lines = newln;
@ -887,9 +887,9 @@ for (i = 0; i < dz_desc.lines; i++) {
return SCPE_OK; return SCPE_OK;
} }
t_stat dz_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat dz_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
char *devtype = (UNIBUS) ? "DZ11" : "DZV11"; const char *devtype = (UNIBUS) ? "DZ11" : "DZV11";
fprintf (st, "%s Terminal Multiplexer (DZ)\n\n", devtype); fprintf (st, "%s Terminal Multiplexer (DZ)\n\n", devtype);
fprintf (st, "The %s is a %d line terminal multiplexor. Up to %d %s's (%d lines) are\n", devtype, DZ_LINES, MAX_DZ_MUXES, devtype, DZ_LINES*MAX_DZ_MUXES); fprintf (st, "The %s is a %d line terminal multiplexor. Up to %d %s's (%d lines) are\n", devtype, DZ_LINES, MAX_DZ_MUXES, devtype, DZ_LINES*MAX_DZ_MUXES);
@ -928,9 +928,9 @@ dz_help_attach (st, dptr, uptr, flag, cptr);
return SCPE_OK; return SCPE_OK;
} }
t_stat dz_help_attach (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat dz_help_attach (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
char *devtype = (UNIBUS) ? "DZ11" : "DZV11"; const char *devtype = (UNIBUS) ? "DZ11" : "DZV11";
tmxr_attach_help (st, dptr, uptr, flag, cptr); tmxr_attach_help (st, dptr, uptr, flag, cptr);
fprintf (st, "The terminal lines perform input and output through Telnet sessions connected\n"); fprintf (st, "The terminal lines perform input and output through Telnet sessions connected\n");
@ -946,7 +946,7 @@ fprintf (st, "status.\n\n");
return SCPE_OK; return SCPE_OK;
} }
char *dz_description (DEVICE *dptr) const char *dz_description (DEVICE *dptr)
{ {
return (UNIBUS) ? "DZ11 8-line terminal multiplexer" : "DZV11 4-line terminal multiplexer"; return (UNIBUS) ? "DZ11 8-line terminal multiplexer" : "DZV11 4-line terminal multiplexer";
} }

View file

@ -479,7 +479,7 @@ BITFIELD hk_mr3_bits[] = {
ENDBITS ENDBITS
}; };
char *hk_regnames[] = { const char *hk_regnames[] = {
"HKCS1", "HKCS1",
"HKWC", "HKWC",
"HKBA", "HKBA",
@ -554,7 +554,6 @@ int16 hk_dif[HK_NUMDR] = { 0 }; /* cylinder diff */
static const uint8 reg_in_drive[16] = { static const uint8 reg_in_drive[16] = {
0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
DEVICE hk_dev;
t_stat hk_rd (int32 *data, int32 PA, int32 access); t_stat hk_rd (int32 *data, int32 PA, int32 access);
t_stat hk_wr (int32 data, int32 PA, int32 access); t_stat hk_wr (int32 data, int32 PA, int32 access);
t_stat hk_svc (UNIT *uptr); t_stat hk_svc (UNIT *uptr);
@ -571,8 +570,8 @@ void hk_err (int32 cs1e, int32 cs2e, int32 drve, int32 drv);
void hk_go (int32 drv); void hk_go (int32 drv);
t_stat hk_set_size (UNIT *uptr, int32 val, char *cptr, void *desc); t_stat hk_set_size (UNIT *uptr, int32 val, char *cptr, void *desc);
t_stat hk_set_bad (UNIT *uptr, int32 val, char *cptr, void *desc); t_stat hk_set_bad (UNIT *uptr, int32 val, char *cptr, void *desc);
t_stat hk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat hk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *hk_description (DEVICE *dptr); const char *hk_description (DEVICE *dptr);
/* HK data structures /* HK data structures
@ -1631,7 +1630,7 @@ return SCPE_NOFNC;
#endif #endif
t_stat hk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat hk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "RK611/RK06,RK07 Cartridge Disk (HK)\n\n"); fprintf (st, "RK611/RK06,RK07 Cartridge Disk (HK)\n\n");
fprintf (st, "RK611 options include the ability to set units write enabled or write locked,\n"); fprintf (st, "RK611 options include the ability to set units write enabled or write locked,\n");
@ -1655,7 +1654,7 @@ fprintf (st, " OS I/O error x report error and stop\n");
return SCPE_OK; return SCPE_OK;
} }
char *hk_description (DEVICE *dptr) const char *hk_description (DEVICE *dptr)
{ {
return "RK611/RK06(7) cartridge disk controller"; return "RK611/RK06(7) cartridge disk controller";
} }

View file

@ -278,7 +278,7 @@ t_stat build_ubus_tab (DEVICE *dptr, DIB *dibp)
int32 i, idx, vec, hivec, ilvl, ibit; int32 i, idx, vec, hivec, ilvl, ibit;
DEVICE *cdptr; DEVICE *cdptr;
size_t j; size_t j;
char *cdname; const char *cdname;
if ((dptr == NULL) || (dibp == NULL)) /* validate args */ if ((dptr == NULL) || (dibp == NULL)) /* validate args */
return SCPE_IERR; return SCPE_IERR;
@ -533,7 +533,7 @@ return SCPE_OK;
typedef struct { typedef struct {
char *dnam[AUTO_MAXC]; const char *dnam[AUTO_MAXC];
int32 numc; int32 numc;
int32 numv; int32 numv;
uint32 amod; uint32 amod;
@ -750,7 +750,7 @@ AUTO_CON auto_tab[] = {/*c #v am vm fxa fxv */
#define DEV_NEXUS 0 #define DEV_NEXUS 0
#endif #endif
#endif #endif
t_stat auto_config (char *name, int32 nctrl) t_stat auto_config (const char *name, int32 nctrl)
{ {
uint32 csr = IOPAGEBASE + AUTO_CSRBASE; uint32 csr = IOPAGEBASE + AUTO_CSRBASE;
uint32 vec = VEC_Q + AUTO_VECBASE; uint32 vec = VEC_Q + AUTO_VECBASE;

View file

@ -36,7 +36,7 @@ t_stat set_vec (UNIT *uptr, int32 arg, char *cptr, void *desc);
t_stat show_vec (FILE *st, UNIT *uptr, int32 arg, void *desc); t_stat show_vec (FILE *st, UNIT *uptr, int32 arg, void *desc);
t_stat show_vec_mux (FILE *st, UNIT *uptr, int32 arg, void *desc); t_stat show_vec_mux (FILE *st, UNIT *uptr, int32 arg, void *desc);
t_stat show_iospace (FILE *st, UNIT *uptr, int32 val, void *desc); t_stat show_iospace (FILE *st, UNIT *uptr, int32 val, void *desc);
t_stat auto_config (char *name, int32 nctrl); t_stat auto_config (const char *name, int32 nctrl);
t_stat pdp11_bad_block (UNIT *uptr, int32 sec, int32 wds); t_stat pdp11_bad_block (UNIT *uptr, int32 sec, int32 wds);
void init_ubus_tab (void); void init_ubus_tab (void);
t_stat build_ubus_tab (DEVICE *dptr, DIB *dibp); t_stat build_ubus_tab (DEVICE *dptr, DIB *dibp);

View file

@ -65,13 +65,12 @@ uint32 ke_MQ = 0;
uint32 ke_SC = 0; uint32 ke_SC = 0;
uint32 ke_SR = 0; uint32 ke_SR = 0;
DEVICE ke_dev;
t_stat ke_rd (int32 *data, int32 PA, int32 access); t_stat ke_rd (int32 *data, int32 PA, int32 access);
t_stat ke_wr (int32 data, int32 PA, int32 access); t_stat ke_wr (int32 data, int32 PA, int32 access);
t_stat ke_reset (DEVICE *dptr); t_stat ke_reset (DEVICE *dptr);
uint32 ke_set_SR (void); uint32 ke_set_SR (void);
t_stat ke_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat ke_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *ke_description (DEVICE *dptr); const char *ke_description (DEVICE *dptr);
#define IOLN_KE 020 #define IOLN_KE 020
@ -353,7 +352,7 @@ ke_MQ = 0;
return auto_config(0, 0); return auto_config(0, 0);
} }
t_stat ke_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat ke_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
const char *const text = const char *const text =
/*567901234567890123456789012345678901234567890123456789012345678901234567890*/ /*567901234567890123456789012345678901234567890123456789012345678901234567890*/
@ -377,7 +376,7 @@ fprint_reg_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *ke_description (DEVICE *dptr) const char *ke_description (DEVICE *dptr)
{ {
return "KE11-A extended arithmetic element"; return "KE11-A extended arithmetic element";
} }

View file

@ -175,8 +175,8 @@ static t_stat kg_wr (int32, int32, int32);
static t_stat kg_reset (DEVICE *); static t_stat kg_reset (DEVICE *);
static void do_poly (int, t_bool); static void do_poly (int, t_bool);
static t_stat set_units (UNIT *, int32, char *, void *); static t_stat set_units (UNIT *, int32, char *, void *);
t_stat kg_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat kg_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *kg_description (DEVICE *dptr); const char *kg_description (DEVICE *dptr);
/* 16-bit rotate right */ /* 16-bit rotate right */
@ -463,7 +463,7 @@ static t_stat set_units (UNIT *u, int32 val, char *s, void *desc)
return (SCPE_OK); return (SCPE_OK);
} }
t_stat kg_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat kg_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
const char *const text = const char *const text =
/*567901234567890123456789012345678901234567890123456789012345678901234567890*/ /*567901234567890123456789012345678901234567890123456789012345678901234567890*/
@ -488,7 +488,7 @@ fprint_reg_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *kg_description (DEVICE *dptr) const char *kg_description (DEVICE *dptr)
{ {
return "KG11-A Communications Arithmetic Option"; return "KG11-A Communications Arithmetic Option";
} }

View file

@ -494,8 +494,8 @@ static t_stat kmc_showLineSpeed (FILE *st, UNIT *txup, int32 val, void *desc);
static t_stat kmc_showStatus (FILE *st, UNIT *up, int32 v, void *dp); static t_stat kmc_showStatus (FILE *st, UNIT *up, int32 v, void *dp);
static t_stat kmc_help (FILE *st, struct sim_device *dptr, static t_stat kmc_help (FILE *st, struct sim_device *dptr,
struct sim_unit *uptr, int32 flag, char *cptr); struct sim_unit *uptr, int32 flag, const char *cptr);
static char *kmc_description (DEVICE *dptr); static const char *kmc_description (DEVICE *dptr);
/* Global data */ /* Global data */
@ -2942,7 +2942,7 @@ t_stat kmc_showStatus (FILE *st, UNIT *up, int32 v, void *dp) {
*/ */
static t_stat kmc_help (FILE *st, struct sim_device *dptr, static t_stat kmc_help (FILE *st, struct sim_device *dptr,
struct sim_unit *uptr, int32 flag, char *cptr) { struct sim_unit *uptr, int32 flag, const char *cptr) {
const char *const text = const char *const text =
" The KMC11-A is a general purpose microprocessor that is used in\n" " The KMC11-A is a general purpose microprocessor that is used in\n"
" several DEC products. The KDP is an emulation of one of those\n" " several DEC products. The KDP is an emulation of one of those\n"
@ -3071,6 +3071,6 @@ static t_stat kmc_help (FILE *st, struct sim_device *dptr,
/* Description of this device. /* Description of this device.
* Conventionally last function in the file. * Conventionally last function in the file.
*/ */
static char *kmc_description (DEVICE *dptr) { static const char *kmc_description (DEVICE *dptr) {
return "KMC11-A Synchronous line controller supporting only COMM IOP/DUP microcode"; return "KMC11-A Synchronous line controller supporting only COMM IOP/DUP microcode";
} }

View file

@ -56,15 +56,14 @@ extern int32 int_req[IPL_HLVL];
int32 lpt_csr = 0; /* control/status */ int32 lpt_csr = 0; /* control/status */
int32 lpt_stopioe = 0; /* stop on error */ int32 lpt_stopioe = 0; /* stop on error */
DEVICE lpt_dev;
t_stat lpt_rd (int32 *data, int32 PA, int32 access); t_stat lpt_rd (int32 *data, int32 PA, int32 access);
t_stat lpt_wr (int32 data, int32 PA, int32 access); t_stat lpt_wr (int32 data, int32 PA, int32 access);
t_stat lpt_svc (UNIT *uptr); t_stat lpt_svc (UNIT *uptr);
t_stat lpt_reset (DEVICE *dptr); t_stat lpt_reset (DEVICE *dptr);
t_stat lpt_attach (UNIT *uptr, char *ptr); t_stat lpt_attach (UNIT *uptr, char *ptr);
t_stat lpt_detach (UNIT *uptr); t_stat lpt_detach (UNIT *uptr);
t_stat lpt_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat lpt_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *lpt_description (DEVICE *dptr); const char *lpt_description (DEVICE *dptr);
/* LPT data structures /* LPT data structures
@ -204,7 +203,7 @@ lpt_csr = lpt_csr | CSR_ERR;
return detach_unit (uptr); return detach_unit (uptr);
} }
t_stat lpt_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat lpt_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Line Printer (LPT)\n\n"); fprintf (st, "Line Printer (LPT)\n\n");
fprintf (st, "The line printer (LPT) writes data to a disk file. The POS register specifies\n"); fprintf (st, "The line printer (LPT) writes data to a disk file. The POS register specifies\n");
@ -221,7 +220,7 @@ fprintf (st, " OS I/O error x report error and stop\n");
return SCPE_OK; return SCPE_OK;
} }
char *lpt_description (DEVICE *dptr) const char *lpt_description (DEVICE *dptr)
{ {
return (UNIBUS) ? "LP11 line printer" : return (UNIBUS) ? "LP11 line printer" :
"LPV11 line printer"; "LPV11 line printer";

View file

@ -136,7 +136,6 @@ uint32 pclk_ctr = 0; /* counter */
static uint32 rate[4] = { 100000, 10000, 60, 10 }; /* ticks per second */ static uint32 rate[4] = { 100000, 10000, 60, 10 }; /* ticks per second */
static uint32 xtim[4] = { 10, 100, 16667, 100000 }; /* nominal time delay */ static uint32 xtim[4] = { 10, 100, 16667, 100000 }; /* nominal time delay */
DEVICE pclk_dev;
t_stat pclk_rd (int32 *data, int32 PA, int32 access); t_stat pclk_rd (int32 *data, int32 PA, int32 access);
t_stat pclk_wr (int32 data, int32 PA, int32 access); t_stat pclk_wr (int32 data, int32 PA, int32 access);
t_stat pclk_svc (UNIT *uptr); t_stat pclk_svc (UNIT *uptr);

View file

@ -58,21 +58,20 @@ int32 ptr_stopioe = 0; /* stop on error */
int32 ptp_csr = 0; /* control/status */ int32 ptp_csr = 0; /* control/status */
int32 ptp_stopioe = 0; /* stop on error */ int32 ptp_stopioe = 0; /* stop on error */
DEVICE ptr_dev, ptp_dev;
t_stat ptr_rd (int32 *data, int32 PA, int32 access); t_stat ptr_rd (int32 *data, int32 PA, int32 access);
t_stat ptr_wr (int32 data, int32 PA, int32 access); t_stat ptr_wr (int32 data, int32 PA, int32 access);
t_stat ptr_svc (UNIT *uptr); t_stat ptr_svc (UNIT *uptr);
t_stat ptr_reset (DEVICE *dptr); t_stat ptr_reset (DEVICE *dptr);
t_stat ptr_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat ptr_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *ptr_description (DEVICE *dptr); const char *ptr_description (DEVICE *dptr);
t_stat ptr_attach (UNIT *uptr, char *ptr); t_stat ptr_attach (UNIT *uptr, char *ptr);
t_stat ptr_detach (UNIT *uptr); t_stat ptr_detach (UNIT *uptr);
t_stat ptp_rd (int32 *data, int32 PA, int32 access); t_stat ptp_rd (int32 *data, int32 PA, int32 access);
t_stat ptp_wr (int32 data, int32 PA, int32 access); t_stat ptp_wr (int32 data, int32 PA, int32 access);
t_stat ptp_svc (UNIT *uptr); t_stat ptp_svc (UNIT *uptr);
t_stat ptp_reset (DEVICE *dptr); t_stat ptp_reset (DEVICE *dptr);
t_stat ptp_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat ptp_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *ptp_description (DEVICE *dptr); const char *ptp_description (DEVICE *dptr);
t_stat ptp_attach (UNIT *uptr, char *ptr); t_stat ptp_attach (UNIT *uptr, char *ptr);
t_stat ptp_detach (UNIT *uptr); t_stat ptp_detach (UNIT *uptr);
@ -95,6 +94,7 @@ UNIT ptr_unit = {
SERIAL_IN_WAIT SERIAL_IN_WAIT
}; };
extern DEVICE ptr_dev;
REG ptr_reg[] = { REG ptr_reg[] = {
{ GRDATAD (BUF, ptr_unit.buf, DEV_RDX, 8, 0, "last data item processed") }, { GRDATAD (BUF, ptr_unit.buf, DEV_RDX, 8, 0, "last data item processed") },
{ GRDATAD (CSR, ptr_csr, DEV_RDX, 16, 0, "control/status register") }, { GRDATAD (CSR, ptr_csr, DEV_RDX, 16, 0, "control/status register") },
@ -380,7 +380,7 @@ ptp_csr = ptp_csr | CSR_ERR;
return detach_unit (uptr); return detach_unit (uptr);
} }
t_stat ptr_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat ptr_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "PC11 Paper Tape Reader (PTR)\n\n"); fprintf (st, "PC11 Paper Tape Reader (PTR)\n\n");
fprintf (st, "The paper tape reader (PTR) reads data from a disk file. The POS register\n"); fprintf (st, "The paper tape reader (PTR) reads data from a disk file. The POS register\n");
@ -399,12 +399,12 @@ fprintf (st, " OS I/O error x report error and stop\n");
return SCPE_OK; return SCPE_OK;
} }
char *ptr_description (DEVICE *dptr) const char *ptr_description (DEVICE *dptr)
{ {
return "PC11 paper tape reader"; return "PC11 paper tape reader";
} }
t_stat ptp_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat ptp_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "PC11 Paper Tape Punch (PTP)\n\n"); fprintf (st, "PC11 Paper Tape Punch (PTP)\n\n");
fprintf (st, "The paper tape punch (PTP) writes data to a disk file. The POS register\n"); fprintf (st, "The paper tape punch (PTP) writes data to a disk file. The POS register\n");
@ -421,7 +421,7 @@ fprintf (st, " OS I/O error x report error and stop\n");
return SCPE_OK; return SCPE_OK;
} }
char *ptp_description (DEVICE *dptr) const char *ptp_description (DEVICE *dptr)
{ {
return "PC11 paper tape punch"; return "PC11 paper tape punch";
} }

View file

@ -164,7 +164,6 @@ static uint32 rc_stopioe = 1; /* stop on error */
/* forward references */ /* forward references */
DEVICE rc_dev;
static t_stat rc_rd (int32 *, int32, int32); static t_stat rc_rd (int32 *, int32, int32);
static t_stat rc_wr (int32, int32, int32); static t_stat rc_wr (int32, int32, int32);
static t_stat rc_svc (UNIT *); static t_stat rc_svc (UNIT *);
@ -172,7 +171,7 @@ static t_stat rc_reset (DEVICE *);
static t_stat rc_attach (UNIT *, char *); static t_stat rc_attach (UNIT *, char *);
static t_stat rc_set_size (UNIT *, int32, char *, void *); static t_stat rc_set_size (UNIT *, int32, char *, void *);
static uint32 update_rccs (uint32, uint32); static uint32 update_rccs (uint32, uint32);
static char *rc_description (DEVICE *dptr); static const char *rc_description (DEVICE *dptr);
/* RC11 data structures /* RC11 data structures
@ -592,7 +591,7 @@ static t_stat rc_set_size (UNIT *uptr, int32 val, char *cptr, void *desc)
return (SCPE_OK); return (SCPE_OK);
} }
static char *rc_description (DEVICE *dptr) static const char *rc_description (DEVICE *dptr)
{ {
return "RC11/RS64 fixed head disk controller"; return "RC11/RS64 fixed head disk controller";
} }

View file

@ -125,7 +125,6 @@ uint32 rf_time = 10; /* inter-word time */
uint32 rf_burst = 1; /* burst mode flag */ uint32 rf_burst = 1; /* burst mode flag */
uint32 rf_stopioe = 1; /* stop on error */ uint32 rf_stopioe = 1; /* stop on error */
DEVICE rf_dev;
t_stat rf_rd (int32 *data, int32 PA, int32 access); t_stat rf_rd (int32 *data, int32 PA, int32 access);
t_stat rf_wr (int32 data, int32 PA, int32 access); t_stat rf_wr (int32 data, int32 PA, int32 access);
int32 rf_inta (void); int32 rf_inta (void);
@ -135,8 +134,8 @@ t_stat rf_boot (int32 unitno, DEVICE *dptr);
t_stat rf_attach (UNIT *uptr, char *cptr); t_stat rf_attach (UNIT *uptr, char *cptr);
t_stat rf_set_size (UNIT *uptr, int32 val, char *cptr, void *desc); t_stat rf_set_size (UNIT *uptr, int32 val, char *cptr, void *desc);
uint32 update_rfcs (uint32 newcs, uint32 newdae); uint32 update_rfcs (uint32 newcs, uint32 newdae);
t_stat rf_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat rf_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *rf_description (DEVICE *dptr); const char *rf_description (DEVICE *dptr);
/* RF11 data structures /* RF11 data structures
@ -508,7 +507,7 @@ uptr->flags = uptr->flags & ~UNIT_AUTO;
return SCPE_OK; return SCPE_OK;
} }
t_stat rf_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat rf_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
const char *text2, *text3; const char *text2, *text3;
const char *const text = const char *const text =
@ -567,7 +566,7 @@ fprintf (st, "%s", text3);
return SCPE_OK; return SCPE_OK;
} }
char *rf_description (DEVICE *dptr) const char *rf_description (DEVICE *dptr)
{ {
return "RF11-A Fixed Head Disk controller"; return "RF11-A Fixed Head Disk controller";
} }

View file

@ -179,8 +179,8 @@ void mba_clr_int (uint32 mb);
void mba_upd_cs1 (uint32 set, uint32 clr, uint32 mb); void mba_upd_cs1 (uint32 set, uint32 clr, uint32 mb);
void mba_set_cs2 (uint32 flg, uint32 mb); void mba_set_cs2 (uint32 flg, uint32 mb);
int32 mba_map_pa (int32 pa, int32 *ofs); int32 mba_map_pa (int32 pa, int32 *ofs);
t_stat rh_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat rh_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *rh_description (DEVICE *dptr); const char *rh_description (DEVICE *dptr);
extern uint32 Map_Addr (uint32 ba); extern uint32 Map_Addr (uint32 ba);
@ -921,7 +921,7 @@ if (dibp->ack[0]) /* set abort dispatch */
return SCPE_OK; return SCPE_OK;
} }
t_stat rh_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat rh_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
const char *const text = const char *const text =
/*567901234567890123456789012345678901234567890123456789012345678901234567890*/ /*567901234567890123456789012345678901234567890123456789012345678901234567890*/
@ -945,7 +945,7 @@ fprint_reg_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *rh_description (DEVICE *dptr) const char *rh_description (DEVICE *dptr)
{ {
if (dptr == &mba_dev[0]) if (dptr == &mba_dev[0])
return "RH70/RH11 Massbus adapter (for RP)"; return "RH70/RH11 Massbus adapter (for RP)";

View file

@ -282,7 +282,7 @@ int32 rk_stopioe = 1; /* stop on error */
int32 rk_swait = 10; /* seek time */ int32 rk_swait = 10; /* seek time */
int32 rk_rwait = 10; /* rotate time */ int32 rk_rwait = 10; /* rotate time */
char *rk_regnames[] = { const char *rk_regnames[] = {
"RKDS", "RKDS",
"RKER", "RKER",
"RKCS", "RKCS",
@ -302,7 +302,6 @@ int32 *rk_regs[] = {
&rkda, &rkda,
}; };
DEVICE rk_dev;
t_stat rk_rd (int32 *data, int32 PA, int32 access); t_stat rk_rd (int32 *data, int32 PA, int32 access);
t_stat rk_wr (int32 data, int32 PA, int32 access); t_stat rk_wr (int32 data, int32 PA, int32 access);
int32 rk_inta (void); int32 rk_inta (void);
@ -312,8 +311,8 @@ void rk_go (void);
void rk_set_done (int32 error); void rk_set_done (int32 error);
void rk_clr_done (void); void rk_clr_done (void);
t_stat rk_boot (int32 unitno, DEVICE *dptr); t_stat rk_boot (int32 unitno, DEVICE *dptr);
t_stat rk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat rk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *rk_description (DEVICE *dptr); const char *rk_description (DEVICE *dptr);
DEBTAB rk_deb[] = { DEBTAB rk_deb[] = {
{ "OPS", RKDEB_OPS }, { "OPS", RKDEB_OPS },
@ -906,7 +905,7 @@ cpu_set_boot (BOOT_ENTRY);
return SCPE_OK; return SCPE_OK;
} }
t_stat rk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat rk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
const char *const text = const char *const text =
/*567901234567890123456789012345678901234567890123456789012345678901234567890*/ /*567901234567890123456789012345678901234567890123456789012345678901234567890*/
@ -954,7 +953,7 @@ fprintf (st, " OS I/O error x report error and stop\n");
return SCPE_OK; return SCPE_OK;
} }
char *rk_description (DEVICE *dptr) const char *rk_description (DEVICE *dptr)
{ {
return "RK11/RKV11 cartridge disk controller"; return "RK11/RKV11 cartridge disk controller";
} }

View file

@ -240,7 +240,6 @@ int32 rl_rwait = 10; /* rotate wait */
int32 rl_stopioe = 1; /* stop on error */ int32 rl_stopioe = 1; /* stop on error */
/* forward references */ /* forward references */
DEVICE rl_dev;
t_stat rl_rd (int32 *data, int32 PA, int32 access); t_stat rl_rd (int32 *data, int32 PA, int32 access);
t_stat rl_wr (int32 data, int32 PA, int32 access); t_stat rl_wr (int32 data, int32 PA, int32 access);
t_stat rl_svc (UNIT *uptr); t_stat rl_svc (UNIT *uptr);
@ -261,8 +260,8 @@ t_stat rl_show_dstate (FILE *, UNIT *, int32, void *);
t_stat rl_set_ctrl (UNIT *uptr, int32 val, char *cptr, void *desc); t_stat rl_set_ctrl (UNIT *uptr, int32 val, char *cptr, void *desc);
#endif #endif
t_stat rl_show_ctrl (FILE *st, UNIT *uptr, int32 val, void *desc); t_stat rl_show_ctrl (FILE *st, UNIT *uptr, int32 val, void *desc);
t_stat rl_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat rl_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *rl_description (DEVICE *dptr); const char *rl_description (DEVICE *dptr);
/* RL11 data structures /* RL11 data structures
@ -1147,7 +1146,7 @@ t_stat rl_set_ctrl (UNIT *uptr, int32 val, char *cptr, void *desc)
/* SHOW RL will display the controller type */ /* SHOW RL will display the controller type */
t_stat rl_show_ctrl (FILE *st, UNIT *uptr, int32 val, void *desc) t_stat rl_show_ctrl (FILE *st, UNIT *uptr, int32 val, void *desc)
{ {
char *s = "RLV12"; const char *s = "RLV12";
if (UNIBUS) if (UNIBUS)
s = "RL11"; s = "RL11";
@ -1231,7 +1230,7 @@ return SCPE_NOFNC;
#endif #endif
t_stat rl_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat rl_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "RL11/RL01/RL02 Cartridge Disk (RL)\n\n"); fprintf (st, "RL11/RL01/RL02 Cartridge Disk (RL)\n\n");
fprintf (st, "RL11 options include the ability to set units write enabled or write locked,\n"); fprintf (st, "RL11 options include the ability to set units write enabled or write locked,\n");
@ -1254,7 +1253,7 @@ fprintf (st, " OS I/O error x report error and stop\n");
return SCPE_OK; return SCPE_OK;
} }
char *rl_description (DEVICE *dptr) const char *rl_description (DEVICE *dptr)
{ {
return (UNIBUS) ? "RL11/RL01(2) cartridge disk controller" : return (UNIBUS) ? "RL11/RL01(2) cartridge disk controller" :
"RLV12/RL01(2) cartridge disk controller"; "RLV12/RL01(2) cartridge disk controller";

View file

@ -537,7 +537,7 @@ struct drvtyp {
int32 size; /* #blocks */ int32 size; /* #blocks */
int32 devtype; /* device type */ int32 devtype; /* device type */
int32 ctrl; /* ctrl type */ int32 ctrl; /* ctrl type */
char *name; /* device type name */ const char *name; /* device type name */
}; };
static struct drvtyp drv_tab[] = { static struct drvtyp drv_tab[] = {
@ -583,8 +583,8 @@ t_stat rp_go (int32 drv);
t_stat rp_set_size (UNIT *uptr, int32 val, char *cptr, void *desc); t_stat rp_set_size (UNIT *uptr, int32 val, char *cptr, void *desc);
t_stat rp_set_bad (UNIT *uptr, int32 val, char *cptr, void *desc); t_stat rp_set_bad (UNIT *uptr, int32 val, char *cptr, void *desc);
int32 rp_abort (void); int32 rp_abort (void);
t_stat rp_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat rp_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *rp_description (DEVICE *dptr); const char *rp_description (DEVICE *dptr);
/* RP data structures /* RP data structures
@ -716,7 +716,7 @@ DEVICE rp_dev = {
&rp_description &rp_description
}; };
char *rp_regnam[] = const char *rp_regnam[] =
{ {
"RP_CS1", /* 0 */ "RP_CS1", /* 0 */
"RP_DS", /* 1 */ "RP_DS", /* 1 */
@ -1189,13 +1189,13 @@ if (!uptr->io_complete) { /* Top End (I/O Initiation) Processing */
awc = (wc + (RP_NUMWD - 1)) & ~(RP_NUMWD - 1); awc = (wc + (RP_NUMWD - 1)) & ~(RP_NUMWD - 1);
for (i = wc; i < awc; i++) /* fill buf */ for (i = wc; i < awc; i++) /* fill buf */
rpxb[drv][i] = 0; rpxb[drv][i] = 0;
sim_disk_data_trace (uptr, (void *)rpxb[drv], da/RP_NUMWD, awc, "sim_disk_wrsect-WR", DBG_DAT & dptr->dctrl, DBG_REQ); sim_disk_data_trace (uptr, (uint8 *)rpxb[drv], da/RP_NUMWD, awc, "sim_disk_wrsect-WR", DBG_DAT & dptr->dctrl, DBG_REQ);
sim_disk_wrsect_a (uptr, da/RP_NUMWD, (void *)rpxb[drv], NULL, awc/RP_NUMWD, rp_io_complete); sim_disk_wrsect_a (uptr, da/RP_NUMWD, (uint8 *)rpxb[drv], NULL, awc/RP_NUMWD, rp_io_complete);
return SCPE_OK; return SCPE_OK;
} /* end if wr */ } /* end if wr */
else { /* read or wchk */ else { /* read or wchk */
awc = (wc + (RP_NUMWD - 1)) & ~(RP_NUMWD - 1); awc = (wc + (RP_NUMWD - 1)) & ~(RP_NUMWD - 1);
sim_disk_rdsect_a (uptr, da/RP_NUMWD, (void *)rpxb[drv], (t_seccnt*)&uptr->sectsread, awc/RP_NUMWD, rp_io_complete); sim_disk_rdsect_a (uptr, da/RP_NUMWD, (uint8 *)rpxb[drv], (t_seccnt*)&uptr->sectsread, awc/RP_NUMWD, rp_io_complete);
return SCPE_OK; return SCPE_OK;
} /* end if read */ } /* end if read */
@ -1493,7 +1493,7 @@ return SCPE_NOFNC;
#endif #endif
t_stat rp_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat rp_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "RP04/05/06/07, RM02/03/05/80 Disk Pack Drives (RP)\n\n"); fprintf (st, "RP04/05/06/07, RM02/03/05/80 Disk Pack Drives (RP)\n\n");
fprintf (st, "The RP controller implements the Massbus family of large disk drives. RP\n"); fprintf (st, "The RP controller implements the Massbus family of large disk drives. RP\n");
@ -1518,7 +1518,7 @@ sim_disk_attach_help (st, dptr, uptr, flag, cptr);
return SCPE_OK; return SCPE_OK;
} }
char *rp_description (DEVICE *dptr) const char *rp_description (DEVICE *dptr)
{ {
return "RP04/05/06/07 RM02/03/05/80 Massbus disk controller"; return "RP04/05/06/07 RM02/03/05/80 Massbus disk controller";
} }

View file

@ -695,7 +695,7 @@ struct drvtyp {
uint16 mod; /* MSCP model */ uint16 mod; /* MSCP model */
int32 med; /* MSCP media */ int32 med; /* MSCP media */
int32 flgs; /* flags */ int32 flgs; /* flags */
char *name; /* name */ const char *name; /* name */
}; };
#define RQ_DRV(d) \ #define RQ_DRV(d) \
@ -734,7 +734,7 @@ static struct drvtyp drv_tab[] = {
struct ctlrtyp { struct ctlrtyp {
uint32 uqpm; /* port model */ uint32 uqpm; /* port model */
uint16 model; /* controller model */ uint16 model; /* controller model */
char *name; /* name */ const char *name; /* name */
}; };
#define RQ_CTLR(d) \ #define RQ_CTLR(d) \
@ -802,7 +802,7 @@ DEBTAB rq_debug[] = {
{0} {0}
}; };
static char *rq_cmdname[] = { static const char *rq_cmdname[] = {
"", /* 0 */ "", /* 0 */
"ABO", /* 1 b: abort */ "ABO", /* 1 b: abort */
"GCS", /* 2 b: get command status */ "GCS", /* 2 b: get command status */
@ -833,8 +833,6 @@ static char *rq_cmdname[] = {
"AVA", /* 64 b: unit now avail */ "AVA", /* 64 b: unit now avail */
}; };
DEVICE rq_dev, rqb_dev, rqc_dev, rqd_dev;
t_stat rq_rd (int32 *data, int32 PA, int32 access); t_stat rq_rd (int32 *data, int32 PA, int32 access);
t_stat rq_wr (int32 data, int32 PA, int32 access); t_stat rq_wr (int32 data, int32 PA, int32 access);
t_stat rq_svc (UNIT *uptr); t_stat rq_svc (UNIT *uptr);
@ -852,8 +850,8 @@ t_stat rq_show_ctype (FILE *st, UNIT *uptr, int32 val, void *desc);
t_stat rq_show_wlk (FILE *st, UNIT *uptr, int32 val, void *desc); t_stat rq_show_wlk (FILE *st, UNIT *uptr, int32 val, void *desc);
t_stat rq_show_ctrl (FILE *st, UNIT *uptr, int32 val, void *desc); t_stat rq_show_ctrl (FILE *st, UNIT *uptr, int32 val, void *desc);
t_stat rq_show_unitq (FILE *st, UNIT *uptr, int32 val, void *desc); t_stat rq_show_unitq (FILE *st, UNIT *uptr, int32 val, void *desc);
t_stat rq_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat rq_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *rq_description (DEVICE *dptr); const char *rq_description (DEVICE *dptr);
t_bool rq_step4 (MSC *cp); t_bool rq_step4 (MSC *cp);
t_bool rq_mscp (MSC *cp, uint16 pkt, t_bool q); t_bool rq_mscp (MSC *cp, uint16 pkt, t_bool q);
@ -2166,23 +2164,23 @@ if (!uptr->io_complete) { /* Top End (I/O Initiation) Processing */
if (cmd == OP_ERS) { /* erase? */ if (cmd == OP_ERS) { /* erase? */
wwc = ((tbc + (RQ_NUMBY - 1)) & ~(RQ_NUMBY - 1)) >> 1; wwc = ((tbc + (RQ_NUMBY - 1)) & ~(RQ_NUMBY - 1)) >> 1;
memset (uptr->rqxb, 0, wwc * sizeof(uint16)); /* clr buf */ memset (uptr->rqxb, 0, wwc * sizeof(uint16)); /* clr buf */
sim_disk_data_trace(uptr, uptr->rqxb, bl, wwc << 1, "sim_disk_wrsect-ERS", DBG_DAT & rq_devmap[cp->cnum]->dctrl, DBG_REQ); sim_disk_data_trace(uptr, (uint8 *)uptr->rqxb, bl, wwc << 1, "sim_disk_wrsect-ERS", DBG_DAT & rq_devmap[cp->cnum]->dctrl, DBG_REQ);
err = sim_disk_wrsect_a (uptr, bl, uptr->rqxb, NULL, (wwc << 1) / RQ_NUMBY, rq_io_complete); err = sim_disk_wrsect_a (uptr, bl, (uint8 *)uptr->rqxb, NULL, (wwc << 1) / RQ_NUMBY, rq_io_complete);
} }
else if (cmd == OP_WR) { /* write? */ else if (cmd == OP_WR) { /* write? */
t = rq_readw (ba, tbc, ma, uptr->rqxb); /* fetch buffer */ t = rq_readw (ba, tbc, ma, (uint16 *)uptr->rqxb);/* fetch buffer */
if ((abc = tbc - t)) { /* any xfer? */ if ((abc = tbc - t)) { /* any xfer? */
wwc = ((abc + (RQ_NUMBY - 1)) & ~(RQ_NUMBY - 1)) >> 1; wwc = ((abc + (RQ_NUMBY - 1)) & ~(RQ_NUMBY - 1)) >> 1;
for (i = (abc >> 1); i < wwc; i++) for (i = (abc >> 1); i < wwc; i++)
((uint16 *)(uptr->rqxb))[i] = 0; ((uint16 *)(uptr->rqxb))[i] = 0;
sim_disk_data_trace(uptr, uptr->rqxb, bl, wwc << 1, "sim_disk_wrsect-WR", DBG_DAT & rq_devmap[cp->cnum]->dctrl, DBG_REQ); sim_disk_data_trace(uptr, (uint8 *)uptr->rqxb, bl, wwc << 1, "sim_disk_wrsect-WR", DBG_DAT & rq_devmap[cp->cnum]->dctrl, DBG_REQ);
err = sim_disk_wrsect_a (uptr, bl, uptr->rqxb, NULL, (wwc << 1) / RQ_NUMBY, rq_io_complete); err = sim_disk_wrsect_a (uptr, bl, (uint8 *)uptr->rqxb, NULL, (wwc << 1) / RQ_NUMBY, rq_io_complete);
} }
} }
else { /* OP_RD & OP_CMP */ else { /* OP_RD & OP_CMP */
err = sim_disk_rdsect_a (uptr, bl, uptr->rqxb, NULL, (tbc + RQ_NUMBY - 1) / RQ_NUMBY, rq_io_complete); err = sim_disk_rdsect_a (uptr, bl, (uint8 *)uptr->rqxb, NULL, (tbc + RQ_NUMBY - 1) / RQ_NUMBY, rq_io_complete);
} /* end else read */ } /* end else read */
return SCPE_OK; /* done for now until callback */ return SCPE_OK; /* done for now until callback */
} }
@ -2193,7 +2191,7 @@ else { /* Bottom End (After I/O processing) */
} }
else if (cmd == OP_WR) { /* write? */ else if (cmd == OP_WR) { /* write? */
t = rq_readw (ba, tbc, ma, uptr->rqxb); /* fetch buffer */ t = rq_readw (ba, tbc, ma, (uint16 *)uptr->rqxb);/* fetch buffer */
abc = tbc - t; /* any xfer? */ abc = tbc - t; /* any xfer? */
if (t) { /* nxm? */ if (t) { /* nxm? */
PUTP32 (pkt, RW_WBCL, bc - abc); /* adj bc */ PUTP32 (pkt, RW_WBCL, bc - abc); /* adj bc */
@ -2205,9 +2203,9 @@ else { /* Bottom End (After I/O processing) */
} }
else { else {
sim_disk_data_trace(uptr, uptr->rqxb, bl, tbc, "sim_disk_rdsect", DBG_DAT & rq_devmap[cp->cnum]->dctrl, DBG_REQ); sim_disk_data_trace(uptr, (uint8 *)uptr->rqxb, bl, tbc, "sim_disk_rdsect", DBG_DAT & rq_devmap[cp->cnum]->dctrl, DBG_REQ);
if ((cmd == OP_RD) && !err) { /* read? */ if ((cmd == OP_RD) && !err) { /* read? */
if ((t = rq_writew (ba, tbc, ma, uptr->rqxb))) {/* store, nxm? */ if ((t = rq_writew (ba, tbc, ma, (uint16 *)uptr->rqxb))) {/* store, nxm? */
PUTP32 (pkt, RW_WBCL, bc - (tbc - t)); /* adj bc */ PUTP32 (pkt, RW_WBCL, bc - (tbc - t)); /* adj bc */
PUTP32 (pkt, RW_WBAL, ba + (tbc - t)); /* adj ba */ PUTP32 (pkt, RW_WBAL, ba + (tbc - t)); /* adj ba */
if (rq_hbe (cp, uptr)) /* post err log */ if (rq_hbe (cp, uptr)) /* post err log */
@ -3147,7 +3145,7 @@ if (val & RQ_SH_UN) {
return SCPE_OK; return SCPE_OK;
} }
t_stat rq_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat rq_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "UDA50 MSCP Disk Controller (%s)\n\n", dptr->name); fprintf (st, "UDA50 MSCP Disk Controller (%s)\n\n", dptr->name);
fprintf (st, "The simulator implements four MSCP disk controllers, RQ, RQB, RQC, RQD.\n"); fprintf (st, "The simulator implements four MSCP disk controllers, RQ, RQB, RQC, RQD.\n");
@ -3184,7 +3182,7 @@ sim_disk_attach_help (st, dptr, uptr, flag, cptr);
return SCPE_OK; return SCPE_OK;
} }
char *rq_description (DEVICE *dptr) const char *rq_description (DEVICE *dptr)
{ {
static char buf[80]; static char buf[80];

View file

@ -186,8 +186,8 @@ void rs_update_ds (uint16 flg, int32 drv);
t_stat rs_go (int32 drv); t_stat rs_go (int32 drv);
t_stat rs_set_size (UNIT *uptr, int32 val, char *cptr, void *desc); t_stat rs_set_size (UNIT *uptr, int32 val, char *cptr, void *desc);
int32 rs_abort (void); int32 rs_abort (void);
t_stat rs_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat rs_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *rs_description (DEVICE *dptr); const char *rs_description (DEVICE *dptr);
/* RS data structures /* RS data structures
@ -695,7 +695,7 @@ cpu_set_boot (BOOT_ENTRY);
return SCPE_OK; return SCPE_OK;
} }
t_stat rs_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat rs_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "RS03/RS04 Massbus disk controller (RS)\n\n"); fprintf (st, "RS03/RS04 Massbus disk controller (RS)\n\n");
fprintf (st, "The RS controller implements the Massbus family fixed head disks. RS\n"); fprintf (st, "The RS controller implements the Massbus family fixed head disks. RS\n");
@ -715,7 +715,7 @@ fprintf (st, "errors cannot occur.\n");
return SCPE_OK; return SCPE_OK;
} }
char *rs_description (DEVICE *dptr) const char *rs_description (DEVICE *dptr)
{ {
return "RS03/RS04 Massbus disk controller"; return "RS03/RS04 Massbus disk controller";
} }

View file

@ -126,7 +126,6 @@ uint8 rx_buf[RX_NUMBY] = { 0 }; /* sector buffer */
int32 rx_bptr = 0; /* buffer pointer */ int32 rx_bptr = 0; /* buffer pointer */
int32 rx_enb = 1; /* device enable */ int32 rx_enb = 1; /* device enable */
DEVICE rx_dev;
t_stat rx_rd (int32 *data, int32 PA, int32 access); t_stat rx_rd (int32 *data, int32 PA, int32 access);
t_stat rx_wr (int32 data, int32 PA, int32 access); t_stat rx_wr (int32 data, int32 PA, int32 access);
t_stat rx_svc (UNIT *uptr); t_stat rx_svc (UNIT *uptr);

View file

@ -157,7 +157,6 @@ int32 ry_swait = 10; /* seek, per track */
int32 ry_xwait = 1; /* tr set time */ int32 ry_xwait = 1; /* tr set time */
uint8 rx2xb[RY_NUMBY] = { 0 }; /* sector buffer */ uint8 rx2xb[RY_NUMBY] = { 0 }; /* sector buffer */
DEVICE ry_dev;
t_stat ry_rd (int32 *data, int32 PA, int32 access); t_stat ry_rd (int32 *data, int32 PA, int32 access);
t_stat ry_wr (int32 data, int32 PA, int32 access); t_stat ry_wr (int32 data, int32 PA, int32 access);
t_stat ry_svc (UNIT *uptr); t_stat ry_svc (UNIT *uptr);
@ -166,8 +165,8 @@ t_stat ry_boot (int32 unitno, DEVICE *dptr);
void ry_done (int32 esr_flags, uint8 new_ecode); void ry_done (int32 esr_flags, uint8 new_ecode);
t_stat ry_set_size (UNIT *uptr, int32 val, char *cptr, void *desc); t_stat ry_set_size (UNIT *uptr, int32 val, char *cptr, void *desc);
t_stat ry_attach (UNIT *uptr, char *cptr); t_stat ry_attach (UNIT *uptr, char *cptr);
t_stat ry_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat ry_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *ry_description (DEVICE *dptr); const char *ry_description (DEVICE *dptr);
/* RY11 data structures /* RY11 data structures
@ -714,7 +713,7 @@ return SCPE_NOFNC;
#endif #endif
t_stat ry_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat ry_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "RX211/RX02 Floppy Disk\n\n"); fprintf (st, "RX211/RX02 Floppy Disk\n\n");
fprintf (st, "RX211 options include the ability to set units write enabled or write locked,\n"); fprintf (st, "RX211 options include the ability to set units write enabled or write locked,\n");
@ -736,7 +735,7 @@ fprintf (st, "errors cannot occur.\n");
return SCPE_OK; return SCPE_OK;
} }
char *ry_description (DEVICE *dptr) const char *ry_description (DEVICE *dptr)
{ {
return (UNIBUS) ? "RX211 floppy disk controller" : return (UNIBUS) ? "RX211 floppy disk controller" :
"RXV21 floppy disk controller"; "RXV21 floppy disk controller";

View file

@ -125,7 +125,6 @@ static uint8 ta_fnc_tab[TACS_M_FNC + 1] = {
OP_REV , OP_FWD, OP_FWD, 0 OP_REV , OP_FWD, OP_FWD, 0
}; };
DEVICE ta_dev;
t_stat ta_rd (int32 *data, int32 PA, int32 access); t_stat ta_rd (int32 *data, int32 PA, int32 access);
t_stat ta_wr (int32 data, int32 PA, int32 access); t_stat ta_wr (int32 data, int32 PA, int32 access);
t_stat ta_svc (UNIT *uptr); t_stat ta_svc (UNIT *uptr);
@ -139,8 +138,8 @@ UNIT *ta_busy (void);
void ta_set_tr (void); void ta_set_tr (void);
uint32 ta_updsta (UNIT *uptr); uint32 ta_updsta (UNIT *uptr);
uint32 ta_crc (uint8 *buf, uint32 cnt); uint32 ta_crc (uint8 *buf, uint32 cnt);
t_stat ta_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat ta_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *ta_description (DEVICE *dptr); const char *ta_description (DEVICE *dptr);
/* TA data structures /* TA data structures
@ -671,7 +670,7 @@ cpu_set_boot (BOOT_ENTRY);
return SCPE_OK; return SCPE_OK;
} }
t_stat ta_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat ta_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
const char *const text = const char *const text =
/*567901234567890123456789012345678901234567890123456789012345678901234567890*/ /*567901234567890123456789012345678901234567890123456789012345678901234567890*/
@ -698,7 +697,7 @@ sim_tape_attach_help (st, dptr, uptr, flag, cptr);
return SCPE_OK; return SCPE_OK;
} }
char *ta_description (DEVICE *dptr) const char *ta_description (DEVICE *dptr)
{ {
return "TA11/TA60 Cassette Tape"; return "TA11/TA60 Cassette Tape";
} }

View file

@ -289,7 +289,6 @@ int32 dt_substate = 0;
int32 dt_logblk = 0; int32 dt_logblk = 0;
int32 dt_stopoffr = 0; int32 dt_stopoffr = 0;
DEVICE dt_dev;
t_stat dt_rd (int32 *data, int32 PA, int32 access); t_stat dt_rd (int32 *data, int32 PA, int32 access);
t_stat dt_wr (int32 data, int32 PA, int32 access); t_stat dt_wr (int32 data, int32 PA, int32 access);
t_stat dt_svc (UNIT *uptr); t_stat dt_svc (UNIT *uptr);
@ -309,8 +308,8 @@ void dt_stopunit (UNIT *uptr);
int32 dt_comobv (int32 val); int32 dt_comobv (int32 val);
int32 dt_csum (UNIT *uptr, int32 blk); int32 dt_csum (UNIT *uptr, int32 blk);
int32 dt_gethdr (UNIT *uptr, int32 blk, int32 relpos); int32 dt_gethdr (UNIT *uptr, int32 blk, int32 relpos);
t_stat dt_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat dt_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *dt_description (DEVICE *dptr); const char *dt_description (DEVICE *dptr);
/* DT data structures /* DT data structures
@ -1367,7 +1366,7 @@ uptr->capac = DT_CAPAC; /* default size */
return detach_unit (uptr); return detach_unit (uptr);
} }
t_stat dt_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat dt_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
const char *text2; const char *text2;
const char *const text = const char *const text =
@ -1515,7 +1514,7 @@ fprintf (st, "%s", text2);
return SCPE_OK; return SCPE_OK;
} }
char *dt_description (DEVICE *dptr) const char *dt_description (DEVICE *dptr)
{ {
return "TC11/TU56 DECtape controller"; return "TC11/TU56 DECtape controller";
} }

View file

@ -166,7 +166,6 @@ int32 tm_rdl = 0; /* read lines */
int32 tm_time = 10; /* record latency */ int32 tm_time = 10; /* record latency */
int32 tm_stopioe = 1; /* stop on error */ int32 tm_stopioe = 1; /* stop on error */
DEVICE tm_dev;
t_stat tm_rd (int32 *data, int32 PA, int32 access); t_stat tm_rd (int32 *data, int32 PA, int32 access);
t_stat tm_wr (int32 data, int32 PA, int32 access); t_stat tm_wr (int32 data, int32 PA, int32 access);
t_stat tm_svc (UNIT *uptr); t_stat tm_svc (UNIT *uptr);
@ -179,8 +178,8 @@ int32 tm_updcsta (UNIT *uptr);
void tm_set_done (void); void tm_set_done (void);
t_stat tm_map_err (UNIT *uptr, t_stat st); t_stat tm_map_err (UNIT *uptr, t_stat st);
t_stat tm_vlock (UNIT *uptr, int32 val, char *cptr, void *desc); t_stat tm_vlock (UNIT *uptr, int32 val, char *cptr, void *desc);
t_stat tm_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat tm_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *tm_description (DEVICE *dptr); const char *tm_description (DEVICE *dptr);
/* MT data structures /* MT data structures
@ -736,7 +735,7 @@ cpu_set_boot (BOOT_ENTRY);
return SCPE_OK; return SCPE_OK;
} }
t_stat tm_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat tm_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
const char *text2; const char *text2;
const char *const text = const char *const text =
@ -789,7 +788,7 @@ sim_tape_attach_help (st, dptr, uptr, flag, cptr);
return SCPE_OK; return SCPE_OK;
} }
char *tm_description (DEVICE *dptr) const char *tm_description (DEVICE *dptr)
{ {
return "TM11 Magnet Tape controller"; return "TM11 Magnet Tape controller";
} }

View file

@ -233,7 +233,7 @@ struct drvtyp {
uint16 cver; uint16 cver;
uint16 fver; uint16 fver;
uint16 uver; uint16 uver;
char *name; const char *name;
}; };
static struct drvtyp drv_tab[] = { static struct drvtyp drv_tab[] = {
@ -309,7 +309,7 @@ static uint32 tq_cmf[64] = {
0, 0, 0, 0, 0, 0, 0, 0 0, 0, 0, 0, 0, 0, 0, 0
}; };
static char *tq_cmdname[] = { static const char *tq_cmdname[] = {
"", /* 0 */ "", /* 0 */
"ABO", /* 1 b: abort */ "ABO", /* 1 b: abort */
"GCS", /* 2 b: get command status */ "GCS", /* 2 b: get command status */
@ -342,8 +342,6 @@ static char *tq_cmdname[] = {
/* Forward references */ /* Forward references */
DEVICE tq_dev;
t_stat tq_rd (int32 *data, int32 PA, int32 access); t_stat tq_rd (int32 *data, int32 PA, int32 access);
t_stat tq_wr (int32 data, int32 PA, int32 access); t_stat tq_wr (int32 data, int32 PA, int32 access);
int32 tq_inta (void); int32 tq_inta (void);
@ -358,8 +356,8 @@ t_stat tq_show_ctrl (FILE *st, UNIT *uptr, int32 val, void *desc);
t_stat tq_show_unitq (FILE *st, UNIT *uptr, int32 val, void *desc); t_stat tq_show_unitq (FILE *st, UNIT *uptr, int32 val, void *desc);
t_stat tq_set_type (UNIT *uptr, int32 val, char *cptr, void *desc); t_stat tq_set_type (UNIT *uptr, int32 val, char *cptr, void *desc);
t_stat tq_show_type (FILE *st, UNIT *uptr, int32 val, void *desc); t_stat tq_show_type (FILE *st, UNIT *uptr, int32 val, void *desc);
static t_stat tq_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); static t_stat tq_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *tq_description (DEVICE *dptr); const char *tq_description (DEVICE *dptr);
t_bool tq_step4 (void); t_bool tq_step4 (void);
t_bool tq_mscp (uint16 pkt, t_bool q); t_bool tq_mscp (uint16 pkt, t_bool q);
@ -2392,9 +2390,9 @@ fprintf (st, "%s (%dMB)", drv_tab[tq_typ].name, (uint32) (drv_tab[tq_typ].cap >>
return SCPE_OK; return SCPE_OK;
} }
static t_stat tq_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) static t_stat tq_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
char *devtype = UNIBUS ? "TUK50" : "TQK50"; const char *devtype = UNIBUS ? "TUK50" : "TQK50";
fprintf (st, "%s (TQ)\n\n", tq_description (dptr)); fprintf (st, "%s (TQ)\n\n", tq_description (dptr));
fprintf (st, "The TQ controller simulates the %s TMSCP disk controller. TQ options\n", devtype); fprintf (st, "The TQ controller simulates the %s TMSCP disk controller. TQ options\n", devtype);
@ -2413,7 +2411,7 @@ sim_tape_attach_help (st, dptr, uptr, flag, cptr);
return SCPE_OK; return SCPE_OK;
} }
char *tq_description (DEVICE *dptr) const char *tq_description (DEVICE *dptr)
{ {
return (UNIBUS) ? "TUK50 TMSCP magnetic tape controller" : return (UNIBUS) ? "TUK50 TMSCP magnetic tape controller" :
"TQK50 TMSCP magnetic tape controller"; "TQK50 TMSCP magnetic tape controller";

View file

@ -285,7 +285,6 @@ int32 ts_bcmd = 0; /* boot cmd */
int32 ts_time = 10; /* record latency */ int32 ts_time = 10; /* record latency */
static uint16 cpy_buf[MAX_PLNT]; /* copy buffer */ static uint16 cpy_buf[MAX_PLNT]; /* copy buffer */
DEVICE ts_dev;
t_stat ts_rd (int32 *data, int32 PA, int32 access); t_stat ts_rd (int32 *data, int32 PA, int32 access);
t_stat ts_wr (int32 data, int32 PA, int32 access); t_stat ts_wr (int32 data, int32 PA, int32 access);
t_stat ts_svc (UNIT *uptr); t_stat ts_svc (UNIT *uptr);
@ -298,8 +297,8 @@ int32 ts_updxs0 (int32 t);
void ts_cmpendcmd (int32 s0, int32 s1); void ts_cmpendcmd (int32 s0, int32 s1);
void ts_endcmd (int32 ssf, int32 xs0f, int32 msg); void ts_endcmd (int32 ssf, int32 xs0f, int32 msg);
int32 ts_map_status (t_stat st); int32 ts_map_status (t_stat st);
t_stat ts_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat ts_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *ts_description (DEVICE *dptr); const char *ts_description (DEVICE *dptr);
/* TS data structures /* TS data structures
@ -1191,7 +1190,7 @@ return SCPE_NOFNC;
} }
#endif #endif
t_stat ts_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat ts_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "TS11 Magnetic Tape (TS)\n\n"); fprintf (st, "TS11 Magnetic Tape (TS)\n\n");
fprint_set_help (st, dptr); fprint_set_help (st, dptr);
@ -1212,7 +1211,7 @@ sim_tape_attach_help (st, dptr, uptr, flag, cptr);
return SCPE_OK; return SCPE_OK;
} }
char *ts_description (DEVICE *dptr) const char *ts_description (DEVICE *dptr)
{ {
return (UNIBUS) ? "TS11 magnetic tape controller" : return (UNIBUS) ? "TS11 magnetic tape controller" :
"TSV11/TSV05 magnetic tape controller "; "TSV11/TSV05 magnetic tape controller ";

View file

@ -233,7 +233,7 @@ static int32 fmt_test[16] = { /* fmt valid */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0
}; };
static int32 dt_map[3] = { DT_TU16, DT_TU45, DT_TU77 }; static int32 dt_map[3] = { DT_TU16, DT_TU45, DT_TU77 };
static char *tu_fname[CS1_N_FNC] = { static const char *tu_fname[CS1_N_FNC] = {
"NOP", "UNLD", "2", "REW", "FCLR", "5", "6", "7", "NOP", "UNLD", "2", "REW", "FCLR", "5", "6", "7",
"RIP", "11", "ERASE", "WREOF", "SPCF", "SPCR", "16", "17", "RIP", "11", "ERASE", "WREOF", "SPCF", "SPCR", "16", "17",
"20", "21", "22", "23", "WRCHKF", "25", "26", "WRCHKR", "20", "21", "22", "23", "WRCHKF", "25", "26", "WRCHKR",
@ -249,8 +249,8 @@ t_stat tu_detach (UNIT *uptr);
t_stat tu_boot (int32 unitno, DEVICE *dptr); t_stat tu_boot (int32 unitno, DEVICE *dptr);
t_stat tu_set_fmtr (UNIT *uptr, int32 val, char *cptr, void *desc); t_stat tu_set_fmtr (UNIT *uptr, int32 val, char *cptr, void *desc);
t_stat tu_show_fmtr (FILE *st, UNIT *uptr, int32 val, void *desc); t_stat tu_show_fmtr (FILE *st, UNIT *uptr, int32 val, void *desc);
t_stat tu_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat tu_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *tu_description (DEVICE *dptr); const char *tu_description (DEVICE *dptr);
t_stat tu_go (int32 drv); t_stat tu_go (int32 drv);
int32 tu_abort (void); int32 tu_abort (void);
void tu_set_er (int32 flg); void tu_set_er (int32 flg);
@ -1065,7 +1065,7 @@ return SCPE_NOFNC;
#endif #endif
t_stat tu_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat tu_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "TM02/TM03/TE16/TU45/TU77 Magnetic Tapes\n\n"); fprintf (st, "TM02/TM03/TE16/TU45/TU77 Magnetic Tapes\n\n");
fprintf (st, "The TU controller implements the Massbus family of 800/1600bpi magnetic tape\n"); fprintf (st, "The TU controller implements the Massbus family of 800/1600bpi magnetic tape\n");
@ -1088,7 +1088,7 @@ fprintf (st, " OS I/O error parity error; if STOP_IOE, stop\n");
return SCPE_OK; return SCPE_OK;
} }
char *tu_description (DEVICE *dptr) const char *tu_description (DEVICE *dptr)
{ {
return "TM03 tape formatter"; return "TM03 tape formatter";
} }

View file

@ -345,9 +345,9 @@ static t_stat vh_setnl (UNIT *uptr, int32 val, char *cptr, void *desc);
static t_stat vh_set_log (UNIT *uptr, int32 val, char *cptr, void *desc); static t_stat vh_set_log (UNIT *uptr, int32 val, char *cptr, void *desc);
static t_stat vh_set_nolog (UNIT *uptr, int32 val, char *cptr, void *desc); static t_stat vh_set_nolog (UNIT *uptr, int32 val, char *cptr, void *desc);
static t_stat vh_show_log (FILE *st, UNIT *uptr, int32 val, void *desc); static t_stat vh_show_log (FILE *st, UNIT *uptr, int32 val, void *desc);
static t_stat vh_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); static t_stat vh_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
static t_stat vh_help_attach (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); static t_stat vh_help_attach (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
static char *vh_description (DEVICE *dptr); static const char *vh_description (DEVICE *dptr);
/* SIMH I/O Structures */ /* SIMH I/O Structures */
@ -464,13 +464,13 @@ DEVICE vh_dev = {
}; };
/* Register names for Debug tracing */ /* Register names for Debug tracing */
static char *vh_rd_dhv_regs[] = static const char *vh_rd_dhv_regs[] =
{"CSR ", "RBUF ", "LPR ", "STAT ", "LNCTRL", "TBFAD1", "TBFAD2", "TBFCNT" }; {"CSR ", "RBUF ", "LPR ", "STAT ", "LNCTRL", "TBFAD1", "TBFAD2", "TBFCNT" };
static char *vh_wr_dhv_regs[] = static const char *vh_wr_dhv_regs[] =
{"CSR ", "TXCHAR", "LPR ", "STAT ", "LNCTRL", "TBFAD1", "TBFAD2", "TBFCNT" }; {"CSR ", "TXCHAR", "LPR ", "STAT ", "LNCTRL", "TBFAD1", "TBFAD2", "TBFCNT" };
static char *vh_rd_dhu_regs[] = static const char *vh_rd_dhu_regs[] =
{"CSR ", "RBUF ", "LPR ", "FIFOSZ", "LNCTRL", "TBFAD1", "TBFAD2", "TBFCNT" }; {"CSR ", "RBUF ", "LPR ", "FIFOSZ", "LNCTRL", "TBFAD1", "TBFAD2", "TBFCNT" };
static char *vh_wr_dhu_regs[] = static const char *vh_wr_dhu_regs[] =
{"CSR ", "RXTIMR", "LPR ", "FIFODT", "LNCTRL", "TBFAD1", "TBFAD2", "TBFCNT" }; {"CSR ", "RXTIMR", "LPR ", "FIFODT", "LNCTRL", "TBFAD1", "TBFAD2", "TBFCNT" };
/* Interrupt routines */ /* Interrupt routines */
@ -1557,9 +1557,9 @@ for (i = 0; i < vh_desc.lines; i++) {
return SCPE_OK; return SCPE_OK;
} }
static t_stat vh_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) static t_stat vh_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
char *devtype = (UNIBUS) ? "DH11" : "DHQ11"; const char *devtype = (UNIBUS) ? "DH11" : "DHQ11";
fprintf (st, "%s Terminal Multiplexer (%s)\n\n", devtype, dptr->name); fprintf (st, "%s Terminal Multiplexer (%s)\n\n", devtype, dptr->name);
fprintf (st, "The %s is an %d-line terminal multiplexer for %s systems. Up to %d %s's\n", devtype, VH_LINES, (UNIBUS) ? "Unibus" : "Qbus", VH_MUXES, devtype); fprintf (st, "The %s is an %d-line terminal multiplexer for %s systems. Up to %d %s's\n", devtype, VH_LINES, (UNIBUS) ? "Unibus" : "Qbus", VH_MUXES, devtype);
@ -1612,15 +1612,15 @@ vh_help_attach (st, dptr, uptr, flag, cptr);
return SCPE_OK; return SCPE_OK;
} }
static t_stat vh_help_attach (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) static t_stat vh_help_attach (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
char *devtype = (UNIBUS) ? "DH11" : "DHQ11"; const char *devtype = (UNIBUS) ? "DH11" : "DHQ11";
fprintf (st, "%s %s Terminal Multiplexer Attach Help\n\n", devtype, dptr->name); fprintf (st, "%s %s Terminal Multiplexer Attach Help\n\n", devtype, dptr->name);
return tmxr_attach_help (st, dptr, uptr, 1, cptr); return tmxr_attach_help (st, dptr, uptr, 1, cptr);
} }
static char *vh_description (DEVICE *dptr) static const char *vh_description (DEVICE *dptr)
{ {
return (UNIBUS) ? "DH11 16-line Terminal Multiplexer" : "DHQ11 8-line Terminal Multiplexer"; return (UNIBUS) ? "DH11 16-line Terminal Multiplexer" : "DHQ11 8-line Terminal Multiplexer";
} }

View file

@ -302,8 +302,8 @@ int32 xq_int (void);
void xq_csr_set_clr(CTLR* xq, uint16 set_bits, uint16 clear_bits); void xq_csr_set_clr(CTLR* xq, uint16 set_bits, uint16 clear_bits);
void xq_show_debug_bdl(CTLR* xq, uint32 bdl_ba); void xq_show_debug_bdl(CTLR* xq, uint32 bdl_ba);
t_stat xq_boot (int32 unitno, DEVICE *dptr); t_stat xq_boot (int32 unitno, DEVICE *dptr);
t_stat xq_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat xq_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *xq_description (DEVICE *dptr); const char *xq_description (DEVICE *dptr);
struct xq_device xqa = { struct xq_device xqa = {
xqa_read_callback, /* read callback routine */ xqa_read_callback, /* read callback routine */
@ -709,7 +709,7 @@ t_stat xq_set_stats (UNIT* uptr, int32 val, char* cptr, void* desc)
t_stat xq_show_stats (FILE* st, UNIT* uptr, int32 val, void* desc) t_stat xq_show_stats (FILE* st, UNIT* uptr, int32 val, void* desc)
{ {
char* fmt = " %-15s%d\n"; const char* fmt = " %-15s%d\n";
CTLR* xq = xq_unit2ctlr(uptr); CTLR* xq = xq_unit2ctlr(uptr);
fprintf(st, "XQ Ethernet statistics:\n"); fprintf(st, "XQ Ethernet statistics:\n");
@ -1499,7 +1499,7 @@ t_stat xq_process_xbdl(CTLR* xq)
/* add to transmit buffer, making sure it's not too big */ /* add to transmit buffer, making sure it's not too big */
if ((xq->var->write_buffer.len + b_length) > sizeof(xq->var->write_buffer.msg)) { if ((xq->var->write_buffer.len + b_length) > sizeof(xq->var->write_buffer.msg)) {
xq->var->write_buffer.oversize = realloc (xq->var->write_buffer.oversize, xq->var->write_buffer.len + b_length); xq->var->write_buffer.oversize = (uint8*)realloc (xq->var->write_buffer.oversize, xq->var->write_buffer.len + b_length);
if (xq->var->write_buffer.len <= sizeof(xq->var->write_buffer.msg)) if (xq->var->write_buffer.len <= sizeof(xq->var->write_buffer.msg))
memcpy (xq->var->write_buffer.oversize, xq->var->write_buffer.msg, xq->var->write_buffer.len); memcpy (xq->var->write_buffer.oversize, xq->var->write_buffer.msg, xq->var->write_buffer.len);
} }
@ -1865,7 +1865,7 @@ t_stat xq_process_turbo_xbdl(CTLR* xq)
/* add to transmit buffer, accomodating it if it is too big */ /* add to transmit buffer, accomodating it if it is too big */
if ((xq->var->write_buffer.len + b_length) > sizeof(xq->var->write_buffer.msg)) { if ((xq->var->write_buffer.len + b_length) > sizeof(xq->var->write_buffer.msg)) {
xq->var->write_buffer.oversize = realloc (xq->var->write_buffer.oversize, xq->var->write_buffer.len + b_length); xq->var->write_buffer.oversize = (uint8*)realloc (xq->var->write_buffer.oversize, xq->var->write_buffer.len + b_length);
if (xq->var->write_buffer.len <= sizeof(xq->var->write_buffer.msg)) if (xq->var->write_buffer.len <= sizeof(xq->var->write_buffer.msg))
memcpy (xq->var->write_buffer.oversize, xq->var->write_buffer.msg, xq->var->write_buffer.len); memcpy (xq->var->write_buffer.oversize, xq->var->write_buffer.msg, xq->var->write_buffer.len);
} }
@ -3074,7 +3074,7 @@ return SCPE_NOFNC;
#endif #endif
} }
t_stat xq_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat xq_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
const char helpString[] = const char helpString[] =
/* The '*'s in the next line represent the standard text width of a help line */ /* The '*'s in the next line represent the standard text width of a help line */
@ -3311,7 +3311,7 @@ const char helpString[] =
return scp_help (st, dptr, uptr, flag, helpString, cptr); return scp_help (st, dptr, uptr, flag, helpString, cptr);
} }
char *xq_description (DEVICE *dptr) const char *xq_description (DEVICE *dptr)
{ {
return (dptr == &xq_dev) ? "DELQA/DEQNA Ethernet controller" return (dptr == &xq_dev) ? "DELQA/DEQNA Ethernet controller"
: "Second DELQA/DEQNA Ethernet controller"; : "Second DELQA/DEQNA Ethernet controller";

View file

@ -130,8 +130,8 @@ void xu_process_receive(CTLR* xu);
void xu_dump_rxring(CTLR* xu); void xu_dump_rxring(CTLR* xu);
void xu_dump_txring(CTLR* xu); void xu_dump_txring(CTLR* xu);
t_stat xu_show_filters (FILE* st, UNIT* uptr, int32 val, void* desc); t_stat xu_show_filters (FILE* st, UNIT* uptr, int32 val, void* desc);
t_stat xu_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat xu_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *xu_description (DEVICE *dptr); const char *xu_description (DEVICE *dptr);
#define IOLN_XU 010 #define IOLN_XU 010
@ -395,7 +395,7 @@ t_stat xu_set_stats (UNIT* uptr, int32 val, char* cptr, void* desc)
t_stat xu_show_stats (FILE* st, UNIT* uptr, int32 val, void* desc) t_stat xu_show_stats (FILE* st, UNIT* uptr, int32 val, void* desc)
{ {
char* fmt = " %-26s%d\n"; const char* fmt = " %-26s%d\n";
CTLR* xu = xu_unit2ctlr(uptr); CTLR* xu = xu_unit2ctlr(uptr);
struct xu_stats* stats = &xu->var->stats; struct xu_stats* stats = &xu->var->stats;
@ -873,7 +873,7 @@ int32 xu_command(CTLR* xu)
uint16* mac_w = (uint16*) xu->var->mac; uint16* mac_w = (uint16*) xu->var->mac;
static const ETH_MAC zeros = {0,0,0,0,0,0}; static const ETH_MAC zeros = {0,0,0,0,0,0};
static const ETH_MAC mcast_load_server = {0xAB, 0x00, 0x00, 0x01, 0x00, 0x00}; static const ETH_MAC mcast_load_server = {0xAB, 0x00, 0x00, 0x01, 0x00, 0x00};
static char* command[] = { static const char* command[] = {
"NO-OP", "NO-OP",
"Start Microaddress", "Start Microaddress",
"Read Default Physical Address", "Read Default Physical Address",
@ -1499,10 +1499,9 @@ void xu_process_transmit(CTLR* xu)
void xu_port_command (CTLR* xu) void xu_port_command (CTLR* xu)
{ {
char* msg;
int command = xu->var->pcsr0 & PCSR0_PCMD; int command = xu->var->pcsr0 & PCSR0_PCMD;
int state = xu->var->pcsr1 & PCSR1_STATE; int state = xu->var->pcsr1 & PCSR1_STATE;
static char* commands[] = { static const char* commands[] = {
"NO-OP", "NO-OP",
"GET PCBB", "GET PCBB",
"GET CMD", "GET CMD",
@ -1589,8 +1588,7 @@ void xu_port_command (CTLR* xu)
case CMD_BOOT: /* BOOT */ case CMD_BOOT: /* BOOT */
/* not implemented */ /* not implemented */
msg = "%s: BOOT command not implemented!\n"; sim_printf ("%s: BOOT command not implemented!\n", xu->dev->name);
sim_printf (msg, xu->dev->name);
xu->var->pcsr0 |= PCSR0_PCEI; xu->var->pcsr0 |= PCSR0_PCEI;
break; break;
@ -1883,7 +1881,7 @@ void xu_dump_txring (CTLR* xu)
} }
} }
t_stat xu_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat xu_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "DELUA/DEUNA Unibus Ethernet Controllers (XU, XUB)\n\n"); fprintf (st, "DELUA/DEUNA Unibus Ethernet Controllers (XU, XUB)\n\n");
fprintf (st, "The simulator implements two DELUA/DEUNA Unibus Ethernet controllers (XU, XUB).\n"); fprintf (st, "The simulator implements two DELUA/DEUNA Unibus Ethernet controllers (XU, XUB).\n");
@ -1906,7 +1904,7 @@ fprintf (st, "card, and \"Feel the Power!\" :-)\n");
return SCPE_OK; return SCPE_OK;
} }
char *xu_description (DEVICE *dptr) const char *xu_description (DEVICE *dptr)
{ {
return "DEUNA/DELUA Ethernet controller"; return "DEUNA/DELUA Ethernet controller";
} }

View file

@ -88,11 +88,11 @@ t_stat clk_svc (UNIT *uptr);
t_stat tti_reset (DEVICE *dptr); t_stat tti_reset (DEVICE *dptr);
t_stat tto_reset (DEVICE *dptr); t_stat tto_reset (DEVICE *dptr);
t_stat clk_reset (DEVICE *dptr); t_stat clk_reset (DEVICE *dptr);
char *tti_description (DEVICE *dptr); const char *tti_description (DEVICE *dptr);
char *tto_description (DEVICE *dptr); const char *tto_description (DEVICE *dptr);
char *clk_description (DEVICE *dptr); const char *clk_description (DEVICE *dptr);
t_stat tti_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat tti_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
t_stat tto_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat tto_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
void txdb_func (int32 data); void txdb_func (int32 data);
extern int32 sysd_hlt_enb (void); extern int32 sysd_hlt_enb (void);
@ -368,7 +368,7 @@ sim_activate_abs (&tti_unit, KBD_WAIT (tti_unit.wait, tmr_poll));
return SCPE_OK; return SCPE_OK;
} }
t_stat tti_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat tti_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Console Terminal Input (TTI)\n\n"); fprintf (st, "Console Terminal Input (TTI)\n\n");
fprintf (st, "The terminal input (TTI) polls the console keyboard for input.\n\n"); fprintf (st, "The terminal input (TTI) polls the console keyboard for input.\n\n");
@ -378,7 +378,7 @@ fprint_reg_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *tti_description (DEVICE *dptr) const char *tti_description (DEVICE *dptr)
{ {
return "console terminal input"; return "console terminal input";
} }
@ -417,7 +417,7 @@ sim_cancel (&tto_unit); /* deactivate unit */
return SCPE_OK; return SCPE_OK;
} }
t_stat tto_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat tto_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Console Terminal Output (TTO)\n\n"); fprintf (st, "Console Terminal Output (TTO)\n\n");
fprintf (st, "The terminal output (TTO) writes to the simulator console.\n\n"); fprintf (st, "The terminal output (TTO) writes to the simulator console.\n\n");
@ -427,7 +427,7 @@ fprint_reg_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *tto_description (DEVICE *dptr) const char *tto_description (DEVICE *dptr)
{ {
return "console terminal output"; return "console terminal output";
} }
@ -468,7 +468,7 @@ tmxr_poll = t * TMXR_MULT; /* set mux poll */
return SCPE_OK; return SCPE_OK;
} }
char *clk_description (DEVICE *dptr) const char *clk_description (DEVICE *dptr)
{ {
return "100hz clock tick"; return "100hz clock tick";
} }

View file

@ -567,7 +567,7 @@ fprintf (st, (sys_model ? "VAXstation I" : "MicroVAX I"));
return SCPE_OK; return SCPE_OK;
} }
t_stat cpu_model_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat cpu_model_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Initial memory size is 4MB.\n\n"); fprintf (st, "Initial memory size is 4MB.\n\n");
fprintf (st, "The simulator is booted with the BOOT command:\n\n"); fprintf (st, "The simulator is booted with the BOOT command:\n\n");

View file

@ -90,8 +90,8 @@ t_stat set_autocon (UNIT *uptr, int32 val, char *cptr, void *desc);
t_stat show_autocon (FILE *st, UNIT *uptr, int32 val, void *desc); t_stat show_autocon (FILE *st, UNIT *uptr, int32 val, void *desc);
t_stat show_iospace (FILE *st, UNIT *uptr, int32 val, void *desc); t_stat show_iospace (FILE *st, UNIT *uptr, int32 val, void *desc);
t_stat qba_show_virt (FILE *of, UNIT *uptr, int32 val, void *desc); t_stat qba_show_virt (FILE *of, UNIT *uptr, int32 val, void *desc);
t_stat qba_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat qba_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *qba_description (DEVICE *dptr); const char *qba_description (DEVICE *dptr);
/* Qbus adapter data structures /* Qbus adapter data structures
@ -746,7 +746,7 @@ fprintf (of, "Invalid argument\n");
return SCPE_OK; return SCPE_OK;
} }
t_stat qba_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat qba_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Qbus Adapter (QBA)\n\n"); fprintf (st, "Qbus Adapter (QBA)\n\n");
fprintf (st, "The Qbus adapter (QBA) simulates the CQBIC Qbus adapter chip.\n"); fprintf (st, "The Qbus adapter (QBA) simulates the CQBIC Qbus adapter chip.\n");
@ -760,7 +760,7 @@ fprint_reg_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *qba_description (DEVICE *dptr) const char *qba_description (DEVICE *dptr)
{ {
return "Qbus adapter"; return "Qbus adapter";
} }

View file

@ -65,11 +65,11 @@ t_stat clk_svc (UNIT *uptr);
t_stat tti_reset (DEVICE *dptr); t_stat tti_reset (DEVICE *dptr);
t_stat tto_reset (DEVICE *dptr); t_stat tto_reset (DEVICE *dptr);
t_stat clk_reset (DEVICE *dptr); t_stat clk_reset (DEVICE *dptr);
char *tti_description (DEVICE *dptr); const char *tti_description (DEVICE *dptr);
char *tto_description (DEVICE *dptr); const char *tto_description (DEVICE *dptr);
char *clk_description (DEVICE *dptr); const char *clk_description (DEVICE *dptr);
t_stat tti_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat tti_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
t_stat tto_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat tto_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
extern int32 sysd_hlt_enb (void); extern int32 sysd_hlt_enb (void);
@ -303,7 +303,7 @@ sim_activate_abs (&tti_unit, KBD_WAIT (tti_unit.wait, tmr_poll));
return SCPE_OK; return SCPE_OK;
} }
t_stat tti_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat tti_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Console Terminal Input (TTI)\n\n"); fprintf (st, "Console Terminal Input (TTI)\n\n");
fprintf (st, "The terminal input (TTI) polls the console keyboard for input.\n\n"); fprintf (st, "The terminal input (TTI) polls the console keyboard for input.\n\n");
@ -318,7 +318,7 @@ fprint_reg_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *tti_description (DEVICE *dptr) const char *tti_description (DEVICE *dptr)
{ {
return "console terminal input"; return "console terminal input";
} }
@ -357,7 +357,7 @@ sim_cancel (&tto_unit); /* deactivate unit */
return SCPE_OK; return SCPE_OK;
} }
t_stat tto_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat tto_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Console Terminal Output (TTO)\n\n"); fprintf (st, "Console Terminal Output (TTO)\n\n");
fprintf (st, "The terminal output (TTO) writes to the simulator console.\n\n"); fprintf (st, "The terminal output (TTO) writes to the simulator console.\n\n");
@ -367,7 +367,7 @@ fprint_reg_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *tto_description (DEVICE *dptr) const char *tto_description (DEVICE *dptr)
{ {
return "console terminal output"; return "console terminal output";
} }
@ -409,7 +409,7 @@ tmxr_poll = t * TMXR_MULT; /* set mux poll */
return SCPE_OK; return SCPE_OK;
} }
char *clk_description (DEVICE *dptr) const char *clk_description (DEVICE *dptr)
{ {
return "100hz clock tick"; return "100hz clock tick";
} }

View file

@ -157,18 +157,18 @@ t_stat rom_dep (t_value val, t_addr exta, UNIT *uptr, int32 sw);
t_stat rom_reset (DEVICE *dptr); t_stat rom_reset (DEVICE *dptr);
t_stat rom_set_diag (UNIT *uptr, int32 val, char *cptr, void *desc); t_stat rom_set_diag (UNIT *uptr, int32 val, char *cptr, void *desc);
t_stat rom_show_diag (FILE *st, UNIT *uptr, int32 val, void *desc); t_stat rom_show_diag (FILE *st, UNIT *uptr, int32 val, void *desc);
t_stat rom_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat rom_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *rom_description (DEVICE *dptr); const char *rom_description (DEVICE *dptr);
t_stat nvr_ex (t_value *vptr, t_addr exta, UNIT *uptr, int32 sw); t_stat nvr_ex (t_value *vptr, t_addr exta, UNIT *uptr, int32 sw);
t_stat nvr_dep (t_value val, t_addr exta, UNIT *uptr, int32 sw); t_stat nvr_dep (t_value val, t_addr exta, UNIT *uptr, int32 sw);
t_stat nvr_reset (DEVICE *dptr); t_stat nvr_reset (DEVICE *dptr);
t_stat nvr_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat nvr_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
t_stat nvr_attach (UNIT *uptr, char *cptr); t_stat nvr_attach (UNIT *uptr, char *cptr);
t_stat nvr_detach (UNIT *uptr); t_stat nvr_detach (UNIT *uptr);
char *nvr_description (DEVICE *dptr); const char *nvr_description (DEVICE *dptr);
t_stat sysd_reset (DEVICE *dptr); t_stat sysd_reset (DEVICE *dptr);
t_stat sysd_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat sysd_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *sysd_description (DEVICE *dptr); const char *sysd_description (DEVICE *dptr);
int32 rom_rd (int32 pa); int32 rom_rd (int32 pa);
int32 nvr_rd (int32 pa); int32 nvr_rd (int32 pa);
@ -416,7 +416,7 @@ if (rom == NULL)
return SCPE_OK; return SCPE_OK;
} }
t_stat rom_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat rom_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Read-only memory (ROM)\n\n"); fprintf (st, "Read-only memory (ROM)\n\n");
fprintf (st, "The boot ROM consists of a single unit, simulating the 64KB boot ROM. It has\n"); fprintf (st, "The boot ROM consists of a single unit, simulating the 64KB boot ROM. It has\n");
@ -440,7 +440,7 @@ fprintf (st, " SET CPU DIAG=FULL Run full diagnostics\n\n");
return SCPE_OK; return SCPE_OK;
} }
char *rom_description (DEVICE *dptr) const char *rom_description (DEVICE *dptr)
{ {
return "read-only memory"; return "read-only memory";
} }
@ -530,7 +530,7 @@ if (nvr == NULL)
return SCPE_OK; return SCPE_OK;
} }
t_stat nvr_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat nvr_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Non-volatile Memory (NVR)\n\n"); fprintf (st, "Non-volatile Memory (NVR)\n\n");
fprintf (st, "The NVR simulates %d bytes of battery-backed up memory.\n", NVRSIZE); fprintf (st, "The NVR simulates %d bytes of battery-backed up memory.\n", NVRSIZE);
@ -585,7 +585,7 @@ if ((uptr->flags & UNIT_ATT) == 0) {
return r; return r;
} }
char *nvr_description (DEVICE *dptr) const char *nvr_description (DEVICE *dptr)
{ {
return "non-volatile memory"; return "non-volatile memory";
} }
@ -1035,7 +1035,7 @@ sim_vm_cmd = vax630_cmd;
return SCPE_OK; return SCPE_OK;
} }
char *sysd_description (DEVICE *dptr) const char *sysd_description (DEVICE *dptr)
{ {
return "system devices"; return "system devices";
} }
@ -1090,7 +1090,7 @@ fprintf (st, (sys_model ? "VAXstation II" : "MicroVAX II"));
return SCPE_OK; return SCPE_OK;
} }
t_stat cpu_model_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat cpu_model_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Initial memory size is 16MB.\n\n"); fprintf (st, "Initial memory size is 16MB.\n\n");
fprintf (st, "The CPU supports the BOOT command and is the only VAX device to do so. Note\n"); fprintf (st, "The CPU supports the BOOT command and is the only VAX device to do so. Note\n");

View file

@ -215,14 +215,14 @@ t_stat tmr_svc (UNIT *uptr);
t_stat tti_reset (DEVICE *dptr); t_stat tti_reset (DEVICE *dptr);
t_stat tto_reset (DEVICE *dptr); t_stat tto_reset (DEVICE *dptr);
t_stat clk_reset (DEVICE *dptr); t_stat clk_reset (DEVICE *dptr);
char *tti_description (DEVICE *dptr); const char *tti_description (DEVICE *dptr);
char *tto_description (DEVICE *dptr); const char *tto_description (DEVICE *dptr);
char *clk_description (DEVICE *dptr); const char *clk_description (DEVICE *dptr);
char *tmr_description (DEVICE *dptr); const char *tmr_description (DEVICE *dptr);
char *td_description (DEVICE *dptr); const char *td_description (DEVICE *dptr);
t_stat tti_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat tti_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
t_stat tto_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat tto_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
t_stat clk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat clk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
t_stat clk_attach (UNIT *uptr, char *cptr); t_stat clk_attach (UNIT *uptr, char *cptr);
t_stat clk_detach (UNIT *uptr); t_stat clk_detach (UNIT *uptr);
t_stat tmr_reset (DEVICE *dptr); t_stat tmr_reset (DEVICE *dptr);
@ -697,7 +697,7 @@ sim_activate_abs (&tti_unit, KBD_WAIT (tti_unit.wait, tmr_poll));
return SCPE_OK; return SCPE_OK;
} }
t_stat tti_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat tti_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Console Terminal Input (TTI)\n\n"); fprintf (st, "Console Terminal Input (TTI)\n\n");
fprintf (st, "The terminal input (TTI) polls the console keyboard for input.\n\n"); fprintf (st, "The terminal input (TTI) polls the console keyboard for input.\n\n");
@ -707,7 +707,7 @@ fprint_reg_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *tti_description (DEVICE *dptr) const char *tti_description (DEVICE *dptr)
{ {
return "console terminal input"; return "console terminal input";
} }
@ -745,7 +745,7 @@ sim_cancel (&tto_unit); /* deactivate unit */
return SCPE_OK; return SCPE_OK;
} }
t_stat tto_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat tto_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Console Terminal Output (TTO)\n\n"); fprintf (st, "Console Terminal Output (TTO)\n\n");
fprintf (st, "The terminal output (TTO) writes to the simulator console.\n\n"); fprintf (st, "The terminal output (TTO) writes to the simulator console.\n\n");
@ -755,7 +755,7 @@ fprint_reg_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *tto_description (DEVICE *dptr) const char *tto_description (DEVICE *dptr)
{ {
return "console terminal output"; return "console terminal output";
} }
@ -922,7 +922,7 @@ if (clk_unit.filebuf == NULL) { /* make sure the TODR is
return SCPE_OK; return SCPE_OK;
} }
t_stat clk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat clk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Real-Time Clock (%s)\n\n", dptr->name); fprintf (st, "Real-Time Clock (%s)\n\n", dptr->name);
fprintf (st, "The real-time clock autocalibrates; the clock interval is adjusted up or down\n"); fprintf (st, "The real-time clock autocalibrates; the clock interval is adjusted up or down\n");
@ -953,7 +953,7 @@ fprint_reg_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *clk_description (DEVICE *dptr) const char *clk_description (DEVICE *dptr)
{ {
return "time of year clock"; return "time of year clock";
} }
@ -1000,7 +1000,7 @@ todr_resync (); /* resync TODR */
return SCPE_OK; return SCPE_OK;
} }
char *tmr_description (DEVICE *dptr) const char *tmr_description (DEVICE *dptr)
{ {
return "interval timer"; return "interval timer";
} }
@ -1284,7 +1284,7 @@ sim_cancel (&td_dev.units[1]);
return SCPE_OK; return SCPE_OK;
} }
char *td_description (DEVICE *dptr) const char *td_description (DEVICE *dptr)
{ {
return "Console TU58 cartridge"; return "Console TU58 cartridge";
} }

View file

@ -672,7 +672,7 @@ fprintf (st, "VAX 11/730");
return SCPE_OK; return SCPE_OK;
} }
t_stat cpu_model_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat cpu_model_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Initial memory size is 2MB.\n\n"); fprintf (st, "Initial memory size is 2MB.\n\n");
fprintf (st, "The simulator is booted with the BOOT command:\n\n"); fprintf (st, "The simulator is booted with the BOOT command:\n\n");

View file

@ -763,7 +763,7 @@ fprintf (st, "VAX 11/750");
return SCPE_OK; return SCPE_OK;
} }
t_stat cpu_model_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat cpu_model_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Initial memory size is 2MB.\n\n"); fprintf (st, "Initial memory size is 2MB.\n\n");
fprintf (st, "The simulator is booted with the BOOT command:\n\n"); fprintf (st, "The simulator is booted with the BOOT command:\n\n");

View file

@ -213,12 +213,12 @@ t_stat tmr_svc (UNIT *uptr);
t_stat tti_reset (DEVICE *dptr); t_stat tti_reset (DEVICE *dptr);
t_stat tto_reset (DEVICE *dptr); t_stat tto_reset (DEVICE *dptr);
t_stat clk_reset (DEVICE *dptr); t_stat clk_reset (DEVICE *dptr);
char *tti_description (DEVICE *dptr); const char *tti_description (DEVICE *dptr);
char *tto_description (DEVICE *dptr); const char *tto_description (DEVICE *dptr);
char *clk_description (DEVICE *dptr); const char *clk_description (DEVICE *dptr);
t_stat tti_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat tti_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
t_stat tto_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat tto_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
t_stat clk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat clk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
t_stat clk_attach (UNIT *uptr, char *cptr); t_stat clk_attach (UNIT *uptr, char *cptr);
t_stat clk_detach (UNIT *uptr); t_stat clk_detach (UNIT *uptr);
t_stat tmr_reset (DEVICE *dptr); t_stat tmr_reset (DEVICE *dptr);
@ -693,7 +693,7 @@ csi_int = 0;
return SCPE_OK; return SCPE_OK;
} }
t_stat tti_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat tti_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Console Terminal Input (TTI)\n\n"); fprintf (st, "Console Terminal Input (TTI)\n\n");
fprintf (st, "The terminal input (TTI) polls the console keyboard for input.\n\n"); fprintf (st, "The terminal input (TTI) polls the console keyboard for input.\n\n");
@ -703,7 +703,7 @@ fprint_reg_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *tti_description (DEVICE *dptr) const char *tti_description (DEVICE *dptr)
{ {
return "console terminal input"; return "console terminal input";
} }
@ -742,7 +742,7 @@ sim_cancel (&tto_unit); /* deactivate unit */
return SCPE_OK; return SCPE_OK;
} }
t_stat tto_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat tto_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Console Terminal Output (TTO)\n\n"); fprintf (st, "Console Terminal Output (TTO)\n\n");
fprintf (st, "The terminal output (TTO) writes to the simulator console.\n\n"); fprintf (st, "The terminal output (TTO) writes to the simulator console.\n\n");
@ -752,7 +752,7 @@ fprint_reg_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *tto_description (DEVICE *dptr) const char *tto_description (DEVICE *dptr)
{ {
return "console terminal output"; return "console terminal output";
} }
@ -919,7 +919,7 @@ if (clk_unit.filebuf == NULL) { /* make sure the TODR is
return SCPE_OK; return SCPE_OK;
} }
t_stat clk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat clk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Real-Time Clock (%s)\n\n", dptr->name); fprintf (st, "Real-Time Clock (%s)\n\n", dptr->name);
fprintf (st, "The real-time clock autocalibrates; the clock interval is adjusted up or down\n"); fprintf (st, "The real-time clock autocalibrates; the clock interval is adjusted up or down\n");
@ -950,7 +950,7 @@ fprint_reg_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *clk_description (DEVICE *dptr) const char *clk_description (DEVICE *dptr)
{ {
return "time of year clock"; return "time of year clock";
} }

View file

@ -848,7 +848,7 @@ fprintf (st, "VAX 11/%s", (sys_model ? "785" : "780"));
return SCPE_OK; return SCPE_OK;
} }
t_stat cpu_model_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat cpu_model_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Initial memory size is 8MB.\n\n"); fprintf (st, "Initial memory size is 8MB.\n\n");
fprintf (st, "The simulator is booted with the BOOT command:\n\n"); fprintf (st, "The simulator is booted with the BOOT command:\n\n");

View file

@ -229,14 +229,14 @@ t_stat tmr_svc (UNIT *uptr);
t_stat tti_reset (DEVICE *dptr); t_stat tti_reset (DEVICE *dptr);
t_stat tto_reset (DEVICE *dptr); t_stat tto_reset (DEVICE *dptr);
t_stat clk_reset (DEVICE *dptr); t_stat clk_reset (DEVICE *dptr);
char *tti_description (DEVICE *dptr); const char *tti_description (DEVICE *dptr);
char *tto_description (DEVICE *dptr); const char *tto_description (DEVICE *dptr);
char *clk_description (DEVICE *dptr); const char *clk_description (DEVICE *dptr);
char *tmr_description (DEVICE *dptr); const char *tmr_description (DEVICE *dptr);
char *fl_description (DEVICE *dptr); const char *fl_description (DEVICE *dptr);
t_stat tti_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat tti_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
t_stat tto_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat tto_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
t_stat clk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat clk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
t_stat clk_attach (UNIT *uptr, char *cptr); t_stat clk_attach (UNIT *uptr, char *cptr);
t_stat clk_detach (UNIT *uptr); t_stat clk_detach (UNIT *uptr);
t_stat tmr_reset (DEVICE *dptr); t_stat tmr_reset (DEVICE *dptr);
@ -510,7 +510,7 @@ sim_activate (&tti_unit, KBD_WAIT (tti_unit.wait, tmr_poll));
return SCPE_OK; return SCPE_OK;
} }
t_stat tti_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat tti_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Console Terminal Input (TTI)\n\n"); fprintf (st, "Console Terminal Input (TTI)\n\n");
fprintf (st, "The terminal input (TTI) polls the console keyboard for input.\n\n"); fprintf (st, "The terminal input (TTI) polls the console keyboard for input.\n\n");
@ -520,7 +520,7 @@ fprint_reg_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *tti_description (DEVICE *dptr) const char *tti_description (DEVICE *dptr)
{ {
return "console terminal input"; return "console terminal input";
} }
@ -559,7 +559,7 @@ sim_cancel (&tto_unit); /* deactivate unit */
return SCPE_OK; return SCPE_OK;
} }
t_stat tto_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat tto_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Console Terminal Output (TTO)\n\n"); fprintf (st, "Console Terminal Output (TTO)\n\n");
fprintf (st, "The terminal output (TTO) writes to the simulator console.\n\n"); fprintf (st, "The terminal output (TTO) writes to the simulator console.\n\n");
@ -569,7 +569,7 @@ fprint_reg_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *tto_description (DEVICE *dptr) const char *tto_description (DEVICE *dptr)
{ {
return "console terminal output"; return "console terminal output";
} }
@ -736,7 +736,7 @@ if (clk_unit.filebuf == NULL) { /* make sure the TODR is
return SCPE_OK; return SCPE_OK;
} }
t_stat clk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat clk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Real-Time Clock (%s)\n\n", dptr->name); fprintf (st, "Real-Time Clock (%s)\n\n", dptr->name);
fprintf (st, "The real-time clock autocalibrates; the clock interval is adjusted up or down\n"); fprintf (st, "The real-time clock autocalibrates; the clock interval is adjusted up or down\n");
@ -767,7 +767,7 @@ fprint_reg_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *clk_description (DEVICE *dptr) const char *clk_description (DEVICE *dptr)
{ {
return "time of year clock"; return "time of year clock";
} }
@ -815,7 +815,7 @@ todr_resync (); /* resync TODR */
return SCPE_OK; return SCPE_OK;
} }
char *tmr_description (DEVICE *dptr) const char *tmr_description (DEVICE *dptr)
{ {
return "interval timer"; return "interval timer";
} }
@ -1167,7 +1167,7 @@ comm_region[COMM_GH] = 1;
return SCPE_OK; return SCPE_OK;
} }
char *fl_description (DEVICE *dptr) const char *fl_description (DEVICE *dptr)
{ {
return "console floppy"; return "console floppy";
} }

View file

@ -184,8 +184,8 @@ extern uint32 nexus_req[NEXUS_HLVL];
t_stat uba_svc (UNIT *uptr); t_stat uba_svc (UNIT *uptr);
t_stat uba_reset (DEVICE *dptr); t_stat uba_reset (DEVICE *dptr);
t_stat uba_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat uba_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *uba_description (DEVICE *dptr); const char *uba_description (DEVICE *dptr);
t_stat uba_ex (t_value *vptr, t_addr exta, UNIT *uptr, int32 sw); t_stat uba_ex (t_value *vptr, t_addr exta, UNIT *uptr, int32 sw);
t_stat uba_dep (t_value val, t_addr exta, UNIT *uptr, int32 sw); t_stat uba_dep (t_value val, t_addr exta, UNIT *uptr, int32 sw);
t_stat uba_rdreg (int32 *val, int32 pa, int32 mode); t_stat uba_rdreg (int32 *val, int32 pa, int32 mode);
@ -935,7 +935,7 @@ uba_cnf = UBACNF_UBIC;
return SCPE_OK; return SCPE_OK;
} }
t_stat uba_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat uba_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Unibus Adapter (UBA)\n\n"); fprintf (st, "Unibus Adapter (UBA)\n\n");
fprintf (st, "The Unibus adapter (UBA) simulates the DW780.\n"); fprintf (st, "The Unibus adapter (UBA) simulates the DW780.\n");
@ -949,7 +949,7 @@ fprint_reg_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *uba_description (DEVICE *dptr) const char *uba_description (DEVICE *dptr)
{ {
return "Unibus adapter"; return "Unibus adapter";
} }

View file

@ -255,8 +255,8 @@ extern uint32 nexus_req[NEXUS_HLVL];
extern UNIT cpu_unit; extern UNIT cpu_unit;
t_stat mba_reset (DEVICE *dptr); t_stat mba_reset (DEVICE *dptr);
t_stat mba_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat mba_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *mba_description (DEVICE *dptr); const char *mba_description (DEVICE *dptr);
t_stat mba_rdreg (int32 *val, int32 pa, int32 mode); t_stat mba_rdreg (int32 *val, int32 pa, int32 mode);
t_stat mba_wrreg (int32 val, int32 pa, int32 lnt); t_stat mba_wrreg (int32 val, int32 pa, int32 lnt);
t_bool mba_map_addr (uint32 va, uint32 *ma, uint32 mb); t_bool mba_map_addr (uint32 va, uint32 *ma, uint32 mb);
@ -857,7 +857,7 @@ if (mbabort[mb]) /* reset device */
return SCPE_OK; return SCPE_OK;
} }
t_stat mba_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat mba_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Massbus Adapters (MBA0, MBA1)\n\n"); fprintf (st, "Massbus Adapters (MBA0, MBA1)\n\n");
fprintf (st, "The Massbus adapters (MBA0, MBA1) simulate RH780's. MBA0 is assigned to the\n"); fprintf (st, "The Massbus adapters (MBA0, MBA1) simulate RH780's. MBA0 is assigned to the\n");
@ -868,7 +868,7 @@ fprint_reg_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *mba_description (DEVICE *dptr) const char *mba_description (DEVICE *dptr)
{ {
static char buf[64]; static char buf[64];

View file

@ -855,7 +855,7 @@ fprintf (st, "VAX %s", (sys_model ? "8650" : "8600"));
return SCPE_OK; return SCPE_OK;
} }
t_stat cpu_model_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat cpu_model_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Initial memory size is 32MB.\n\n"); fprintf (st, "Initial memory size is 32MB.\n\n");
fprintf (st, "The simulator is booted with the BOOT command:\n\n"); fprintf (st, "The simulator is booted with the BOOT command:\n\n");

View file

@ -245,14 +245,14 @@ t_stat rlcs_svc (UNIT *uptr);
t_stat tti_reset (DEVICE *dptr); t_stat tti_reset (DEVICE *dptr);
t_stat tto_reset (DEVICE *dptr); t_stat tto_reset (DEVICE *dptr);
t_stat clk_reset (DEVICE *dptr); t_stat clk_reset (DEVICE *dptr);
char *tti_description (DEVICE *dptr); const char *tti_description (DEVICE *dptr);
char *tto_description (DEVICE *dptr); const char *tto_description (DEVICE *dptr);
char *clk_description (DEVICE *dptr); const char *clk_description (DEVICE *dptr);
char *tmr_description (DEVICE *dptr); const char *tmr_description (DEVICE *dptr);
char *rlcs_description (DEVICE *dptr); const char *rlcs_description (DEVICE *dptr);
t_stat tti_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat tti_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
t_stat tto_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat tto_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
t_stat clk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat clk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
t_stat clk_attach (UNIT *uptr, char *cptr); t_stat clk_attach (UNIT *uptr, char *cptr);
t_stat clk_detach (UNIT *uptr); t_stat clk_detach (UNIT *uptr);
t_stat tmr_reset (DEVICE *dptr); t_stat tmr_reset (DEVICE *dptr);
@ -631,7 +631,7 @@ sim_activate_abs (&tti_unit[ID_CT], KBD_WAIT (tti_unit[ID_CT].wait, tmr_poll));
return SCPE_OK; return SCPE_OK;
} }
t_stat tti_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat tti_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Console Terminal Input (TTI)\n\n"); fprintf (st, "Console Terminal Input (TTI)\n\n");
fprintf (st, "The terminal input (TTI) polls the console keyboard for input.\n\n"); fprintf (st, "The terminal input (TTI) polls the console keyboard for input.\n\n");
@ -641,7 +641,7 @@ fprint_reg_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *tti_description (DEVICE *dptr) const char *tti_description (DEVICE *dptr)
{ {
return "console terminal input"; return "console terminal input";
} }
@ -693,7 +693,7 @@ sim_cancel (&tto_unit[ID_LC]);
return SCPE_OK; return SCPE_OK;
} }
t_stat tto_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat tto_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Console Terminal Output (TTO)\n\n"); fprintf (st, "Console Terminal Output (TTO)\n\n");
fprintf (st, "The terminal output (TTO) writes to the simulator console.\n\n"); fprintf (st, "The terminal output (TTO) writes to the simulator console.\n\n");
@ -703,7 +703,7 @@ fprint_reg_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *tto_description (DEVICE *dptr) const char *tto_description (DEVICE *dptr)
{ {
return "console terminal output"; return "console terminal output";
} }
@ -870,7 +870,7 @@ if (clk_unit.filebuf == NULL) { /* make sure the TODR is
return SCPE_OK; return SCPE_OK;
} }
t_stat clk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat clk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Real-Time Clock (%s)\n\n", dptr->name); fprintf (st, "Real-Time Clock (%s)\n\n", dptr->name);
fprintf (st, "The real-time clock autocalibrates; the clock interval is adjusted up or down\n"); fprintf (st, "The real-time clock autocalibrates; the clock interval is adjusted up or down\n");
@ -901,7 +901,7 @@ fprint_reg_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *clk_description (DEVICE *dptr) const char *clk_description (DEVICE *dptr)
{ {
return "time of year clock"; return "time of year clock";
} }
@ -948,7 +948,7 @@ todr_resync (); /* resync TODR */
return SCPE_OK; return SCPE_OK;
} }
char *tmr_description (DEVICE *dptr) const char *tmr_description (DEVICE *dptr)
{ {
return "interval timer"; return "interval timer";
} }
@ -1230,7 +1230,7 @@ sim_cancel (&rlcs_unit); /* deactivate unit */
return SCPE_OK; return SCPE_OK;
} }
char *rlcs_description (DEVICE *dptr) const char *rlcs_description (DEVICE *dptr)
{ {
return "Console RL02 disk"; return "Console RL02 disk";
} }

View file

@ -395,7 +395,7 @@ t_stat cpu_show_hist (FILE *st, UNIT *uptr, int32 val, void *desc);
t_stat cpu_show_virt (FILE *st, UNIT *uptr, int32 val, void *desc); t_stat cpu_show_virt (FILE *st, UNIT *uptr, int32 val, void *desc);
t_stat cpu_set_idle (UNIT *uptr, int32 val, char *cptr, void *desc); t_stat cpu_set_idle (UNIT *uptr, int32 val, char *cptr, void *desc);
t_stat cpu_show_idle (FILE *st, UNIT *uptr, int32 val, void *desc); t_stat cpu_show_idle (FILE *st, UNIT *uptr, int32 val, void *desc);
char *cpu_description (DEVICE *dptr); const char *cpu_description (DEVICE *dptr);
int32 cpu_get_vsw (int32 sw); int32 cpu_get_vsw (int32 sw);
static SIM_INLINE int32 get_istr (int32 lnt, int32 acc); static SIM_INLINE int32 get_istr (int32 lnt, int32 acc);
int32 ReadOcta (int32 va, int32 *opnd, int32 j, int32 acc); int32 ReadOcta (int32 va, int32 *opnd, int32 j, int32 acc);
@ -534,7 +534,7 @@ fprintf (st, "model=");
return cpu_print_model (st); return cpu_print_model (st);
} }
char *cpu_description (DEVICE *dptr) const char *cpu_description (DEVICE *dptr)
{ {
static char buf[80]; static char buf[80];
uint32 min_mem = 4096, max_mem = 0; uint32 min_mem = 4096, max_mem = 0;
@ -3523,7 +3523,7 @@ return more;
} }
struct os_idle { struct os_idle {
char *name; const char *name;
uint32 mask; uint32 mask;
}; };
@ -3598,7 +3598,7 @@ if (r != SCPE_OK) {
return SCPE_OK; return SCPE_OK;
} }
t_stat cpu_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat cpu_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "The ");cpu_print_model (st);fprintf (st, " CPU help\n\n"); fprintf (st, "The ");cpu_print_model (st);fprintf (st, " CPU help\n\n");
fprintf (st, "CPU options include the size of main memory.\n\n"); fprintf (st, "CPU options include the size of main memory.\n\n");

View file

@ -758,7 +758,7 @@ extern t_stat cpu_load_bootcode (const char *filename, const unsigned char *buil
extern t_stat cpu_print_model (FILE *st); extern t_stat cpu_print_model (FILE *st);
extern t_stat cpu_show_model (FILE *st, UNIT *uptr, int32 val, void *desc); extern t_stat cpu_show_model (FILE *st, UNIT *uptr, int32 val, void *desc);
extern t_stat cpu_set_model (UNIT *uptr, int32 val, char *cptr, void *desc); extern t_stat cpu_set_model (UNIT *uptr, int32 val, char *cptr, void *desc);
extern t_stat cpu_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); extern t_stat cpu_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
extern t_stat cpu_model_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); extern t_stat cpu_model_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
#endif /* _VAX_DEFS_H */ #endif /* _VAX_DEFS_H */

View file

@ -136,8 +136,8 @@ t_stat set_autocon (UNIT *uptr, int32 val, char *cptr, void *desc);
t_stat show_autocon (FILE *st, UNIT *uptr, int32 val, void *desc); t_stat show_autocon (FILE *st, UNIT *uptr, int32 val, void *desc);
t_stat show_iospace (FILE *st, UNIT *uptr, int32 val, void *desc); t_stat show_iospace (FILE *st, UNIT *uptr, int32 val, void *desc);
t_stat qba_show_virt (FILE *of, UNIT *uptr, int32 val, void *desc); t_stat qba_show_virt (FILE *of, UNIT *uptr, int32 val, void *desc);
t_stat qba_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat qba_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *qba_description (DEVICE *dptr); const char *qba_description (DEVICE *dptr);
/* Qbus adapter data structures /* Qbus adapter data structures
@ -924,7 +924,7 @@ fprintf (of, "Invalid argument\n");
return SCPE_OK; return SCPE_OK;
} }
t_stat qba_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat qba_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Qbus Adapter (QBA)\n\n"); fprintf (st, "Qbus Adapter (QBA)\n\n");
fprintf (st, "The Qbus adapter (QBA) simulates the CQBIC Qbus adapter chip.\n"); fprintf (st, "The Qbus adapter (QBA) simulates the CQBIC Qbus adapter chip.\n");
@ -938,7 +938,7 @@ fprint_reg_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *qba_description (DEVICE *dptr) const char *qba_description (DEVICE *dptr)
{ {
return "Qbus adapter"; return "Qbus adapter";
} }

View file

@ -170,7 +170,6 @@ uint8 lk_rbuf[10]; /* receive buffer */
int32 lk_rbuf_p = 0; /* receive buffer ptr */ int32 lk_rbuf_p = 0; /* receive buffer ptr */
int32 lk_mode[16]; /* mode of each key group */ int32 lk_mode[16]; /* mode of each key group */
DEVICE lk_dev;
t_stat lk_wr (uint8 c); t_stat lk_wr (uint8 c);
t_stat lk_rd (uint8 *c); t_stat lk_rd (uint8 *c);
t_stat lk_reset (DEVICE *dptr); t_stat lk_reset (DEVICE *dptr);
@ -830,5 +829,5 @@ switch (mode) {
} }
#else /* defined(VAX_620) */ #else /* defined(VAX_620) */
static char *dummy_declaration = "Something to compile"; static const char *dummy_declaration = "Something to compile";
#endif /* !defined(VAX_620) */ #endif /* !defined(VAX_620) */

View file

@ -120,12 +120,12 @@ t_stat clk_reset (DEVICE *dptr);
t_stat clk_attach (UNIT *uptr, char *cptr); t_stat clk_attach (UNIT *uptr, char *cptr);
t_stat clk_detach (UNIT *uptr); t_stat clk_detach (UNIT *uptr);
t_stat todr_resync (void); t_stat todr_resync (void);
char *tti_description (DEVICE *dptr); const char *tti_description (DEVICE *dptr);
char *tto_description (DEVICE *dptr); const char *tto_description (DEVICE *dptr);
char *clk_description (DEVICE *dptr); const char *clk_description (DEVICE *dptr);
t_stat tti_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat tti_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
t_stat tto_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat tto_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
t_stat clk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat clk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
extern int32 sysd_hlt_enb (void); extern int32 sysd_hlt_enb (void);
extern int32 fault_PC; extern int32 fault_PC;
@ -366,7 +366,7 @@ sim_activate (&tti_unit, KBD_WAIT (tti_unit.wait, tmr_poll));
return SCPE_OK; return SCPE_OK;
} }
t_stat tti_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat tti_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Console Terminal Input (TTI)\n\n"); fprintf (st, "Console Terminal Input (TTI)\n\n");
fprintf (st, "The terminal input (TTI) polls the console keyboard for input.\n\n"); fprintf (st, "The terminal input (TTI) polls the console keyboard for input.\n\n");
@ -381,7 +381,7 @@ fprint_reg_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *tti_description (DEVICE *dptr) const char *tti_description (DEVICE *dptr)
{ {
return "console terminal input"; return "console terminal input";
} }
@ -420,7 +420,7 @@ sim_cancel (&tto_unit); /* deactivate unit */
return SCPE_OK; return SCPE_OK;
} }
t_stat tto_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat tto_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Console Terminal Output (TTO)\n\n"); fprintf (st, "Console Terminal Output (TTO)\n\n");
fprintf (st, "The terminal output (TTO) writes to the simulator console.\n\n"); fprintf (st, "The terminal output (TTO) writes to the simulator console.\n\n");
@ -430,7 +430,7 @@ fprint_reg_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *tto_description (DEVICE *dptr) const char *tto_description (DEVICE *dptr)
{ {
return "console terminal output"; return "console terminal output";
} }
@ -559,7 +559,7 @@ if (clk_unit.filebuf == NULL) { /* make sure the TODR is
return SCPE_OK; return SCPE_OK;
} }
t_stat clk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat clk_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Real-Time Clock (%s)\n\n", dptr->name); fprintf (st, "Real-Time Clock (%s)\n\n", dptr->name);
fprintf (st, "The real-time clock autocalibrates; the clock interval is adjusted up or down\n"); fprintf (st, "The real-time clock autocalibrates; the clock interval is adjusted up or down\n");
@ -590,7 +590,7 @@ fprint_reg_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *clk_description (DEVICE *dptr) const char *clk_description (DEVICE *dptr)
{ {
return "time of year clock"; return "time of year clock";
} }

View file

@ -238,24 +238,24 @@ static uint32 rom_delay = 0;
t_stat rom_ex (t_value *vptr, t_addr exta, UNIT *uptr, int32 sw); t_stat rom_ex (t_value *vptr, t_addr exta, UNIT *uptr, int32 sw);
t_stat rom_dep (t_value val, t_addr exta, UNIT *uptr, int32 sw); t_stat rom_dep (t_value val, t_addr exta, UNIT *uptr, int32 sw);
t_stat rom_reset (DEVICE *dptr); t_stat rom_reset (DEVICE *dptr);
t_stat rom_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat rom_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *rom_description (DEVICE *dptr); const char *rom_description (DEVICE *dptr);
t_stat nvr_ex (t_value *vptr, t_addr exta, UNIT *uptr, int32 sw); t_stat nvr_ex (t_value *vptr, t_addr exta, UNIT *uptr, int32 sw);
t_stat nvr_dep (t_value val, t_addr exta, UNIT *uptr, int32 sw); t_stat nvr_dep (t_value val, t_addr exta, UNIT *uptr, int32 sw);
t_stat nvr_reset (DEVICE *dptr); t_stat nvr_reset (DEVICE *dptr);
t_stat nvr_attach (UNIT *uptr, char *cptr); t_stat nvr_attach (UNIT *uptr, char *cptr);
t_stat nvr_detach (UNIT *uptr); t_stat nvr_detach (UNIT *uptr);
t_stat nvr_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat nvr_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *nvr_description (DEVICE *dptr); const char *nvr_description (DEVICE *dptr);
t_stat csi_reset (DEVICE *dptr); t_stat csi_reset (DEVICE *dptr);
char *csi_description (DEVICE *dptr); const char *csi_description (DEVICE *dptr);
t_stat cso_reset (DEVICE *dptr); t_stat cso_reset (DEVICE *dptr);
t_stat cso_svc (UNIT *uptr); t_stat cso_svc (UNIT *uptr);
char *cso_description (DEVICE *dptr); const char *cso_description (DEVICE *dptr);
t_stat tmr_svc (UNIT *uptr); t_stat tmr_svc (UNIT *uptr);
t_stat sysd_reset (DEVICE *dptr); t_stat sysd_reset (DEVICE *dptr);
t_stat sysd_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat sysd_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *sysd_description (DEVICE *dptr); const char *sysd_description (DEVICE *dptr);
int32 rom_rd (int32 pa); int32 rom_rd (int32 pa);
int32 nvr_rd (int32 pa); int32 nvr_rd (int32 pa);
@ -610,7 +610,7 @@ if (rom == NULL)
return SCPE_OK; return SCPE_OK;
} }
t_stat rom_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat rom_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Read-only memory (ROM)\n\n"); fprintf (st, "Read-only memory (ROM)\n\n");
fprintf (st, "The boot ROM consists of a single unit, simulating the 128KB boot ROM. It\n"); fprintf (st, "The boot ROM consists of a single unit, simulating the 128KB boot ROM. It\n");
@ -629,7 +629,7 @@ fprint_set_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *rom_description (DEVICE *dptr) const char *rom_description (DEVICE *dptr)
{ {
return "read-only memory"; return "read-only memory";
} }
@ -727,7 +727,7 @@ if ((uptr->flags & UNIT_ATT) == 0)
return r; return r;
} }
t_stat nvr_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat nvr_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Non-volatile Memory (NVR)\n\n"); fprintf (st, "Non-volatile Memory (NVR)\n\n");
fprintf (st, "The NVR consists of a single unit, simulating 1KB of battery-backed up memory\n"); fprintf (st, "The NVR consists of a single unit, simulating 1KB of battery-backed up memory\n");
@ -740,7 +740,7 @@ fprintf (st, "Successfully loading an NVR image clears the SSC battery-low indic
return SCPE_OK; return SCPE_OK;
} }
char *nvr_description (DEVICE *dptr) const char *nvr_description (DEVICE *dptr)
{ {
return "non-volatile memory"; return "non-volatile memory";
} }
@ -777,7 +777,7 @@ CLR_INT (CSI);
return SCPE_OK; return SCPE_OK;
} }
char *csi_description (DEVICE *dptr) const char *csi_description (DEVICE *dptr)
{ {
return "console storage input"; return "console storage input";
} }
@ -833,7 +833,7 @@ sim_cancel (&cso_unit); /* deactivate unit */
return SCPE_OK; return SCPE_OK;
} }
char *cso_description (DEVICE *dptr) const char *cso_description (DEVICE *dptr)
{ {
return "console storage output"; return "console storage output";
} }
@ -1788,7 +1788,7 @@ ssc_otp = 0;
return SCPE_OK; return SCPE_OK;
} }
t_stat sysd_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat sysd_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "System Devices (SYSD)\n\n"); fprintf (st, "System Devices (SYSD)\n\n");
fprintf (st, "The system devices are the system-specific facilities implemented in the CVAX\n"); fprintf (st, "The system devices are the system-specific facilities implemented in the CVAX\n");
@ -1808,7 +1808,7 @@ fprintf (st, "setting the flag. The default value is set.\n");
return SCPE_OK; return SCPE_OK;
} }
char *sysd_description (DEVICE *dptr) const char *sysd_description (DEVICE *dptr)
{ {
return "system devices"; return "system devices";
} }
@ -1857,7 +1857,7 @@ fprintf (st, "%s 3900 (KA655)", (sys_model ? "MicroVAX" : "VAXServer"));
return SCPE_OK; return SCPE_OK;
} }
t_stat cpu_model_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat cpu_model_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Notes on memory size:\n\n"); fprintf (st, "Notes on memory size:\n\n");
fprintf (st, "- The real KA655 CPU only supported 16MB to 64MB of memory. The simulator\n"); fprintf (st, "- The real KA655 CPU only supported 16MB to 64MB of memory. The simulator\n");

View file

@ -231,7 +231,6 @@ uint32 *vc_buf = NULL; /* Video memory */
uint32 *vc_lines = NULL; /* Video Display Lines */ uint32 *vc_lines = NULL; /* Video Display Lines */
uint8 vc_cur[256]; /* Cursor image */ uint8 vc_cur[256]; /* Cursor image */
DEVICE vc_dev;
t_stat vc_rd (int32 *data, int32 PA, int32 access); t_stat vc_rd (int32 *data, int32 PA, int32 access);
t_stat vc_wr (int32 data, int32 PA, int32 access); t_stat vc_wr (int32 data, int32 PA, int32 access);
t_stat vc_svc (UNIT *uptr); t_stat vc_svc (UNIT *uptr);
@ -244,8 +243,8 @@ void vc_setint (int32 src);
int32 vc_inta (void); int32 vc_inta (void);
void vc_clrint (int32 src); void vc_clrint (int32 src);
void vc_uart_int (uint32 set); void vc_uart_int (uint32 set);
t_stat vc_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat vc_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *vc_description (DEVICE *dptr); const char *vc_description (DEVICE *dptr);
/* QVSS data structures /* QVSS data structures
@ -355,7 +354,7 @@ UART2681 vc_uart = {
{ { &lk_wr, &lk_rd }, { &vs_wr, &vs_rd } } { { &lk_wr, &lk_rd }, { &vs_wr, &vs_rd } }
}; };
char *vc_regnames[] = { const char *vc_regnames[] = {
"CSR", /* +0 */ "CSR", /* +0 */
"CUR-X", /* +2 */ "CUR-X", /* +2 */
"MPOS", /* +4 */ "MPOS", /* +4 */
@ -391,7 +390,7 @@ char *vc_regnames[] = {
"", /* +62 spare */ "", /* +62 spare */
}; };
char *vc_crtc_regnames[] = { const char *vc_crtc_regnames[] = {
"HTOT", /* Horizontal Total The total number of character times in a line, minus 1 */ "HTOT", /* Horizontal Total The total number of character times in a line, minus 1 */
"HDSP", /* Horizontal Displayed The total number of displayed characters in a line. */ "HDSP", /* Horizontal Displayed The total number of displayed characters in a line. */
"HPOS", /* HSYNC Position Defines the number of character times until HSYNC (horizontal sync). */ "HPOS", /* HSYNC Position Defines the number of character times until HSYNC (horizontal sync). */
@ -1081,7 +1080,7 @@ else
return SCPE_OK; return SCPE_OK;
} }
t_stat vc_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat vc_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "VCB01 Monochrome Video Subsystem (%s)\n\n", dptr->name); fprintf (st, "VCB01 Monochrome Video Subsystem (%s)\n\n", dptr->name);
fprintf (st, "Use the Control-Right-Shift key combination to regain focus from the simulated\n"); fprintf (st, "Use the Control-Right-Shift key combination to regain focus from the simulated\n");
@ -1092,11 +1091,11 @@ fprint_reg_help (st, dptr);
return SCPE_OK; return SCPE_OK;
} }
char *vc_description (DEVICE *dptr) const char *vc_description (DEVICE *dptr)
{ {
return "VCB01 Monochrome Graphics Adapter"; return "VCB01 Monochrome Graphics Adapter";
} }
#else /* defined(VAX_620) */ #else /* defined(VAX_620) */
static char *dummy_declaration = "Something to compile"; static const char *dummy_declaration = "Something to compile";
#endif /* !defined(VAX_620) */ #endif /* !defined(VAX_620) */

View file

@ -72,7 +72,6 @@ t_bool vs_m = 0; /* Middle button state *
t_bool vs_r = 0; /* Right button state */ t_bool vs_r = 0; /* Right button state */
uint8 vs_buf[10]; uint8 vs_buf[10];
DEVICE vs_dev;
t_stat vs_wr (uint8 c); t_stat vs_wr (uint8 c);
t_stat vs_rd (uint8 *c); t_stat vs_rd (uint8 *c);
t_stat vs_reset (DEVICE *dptr); t_stat vs_reset (DEVICE *dptr);
@ -241,5 +240,5 @@ if (vs_state == VSXXX_IDLE) {
} }
#else /* defined(VAX_620) */ #else /* defined(VAX_620) */
static char *dummy_declaration = "Something to compile"; static const char *dummy_declaration = "Something to compile";
#endif /* !defined(VAX_620) */ #endif /* !defined(VAX_620) */

View file

@ -109,8 +109,8 @@ int32 wtc_mode = WTC_MODE_VMS;
t_stat wtc_set (UNIT *uptr, int32 val, char *cptr, void *desc); t_stat wtc_set (UNIT *uptr, int32 val, char *cptr, void *desc);
t_stat wtc_show (FILE *st, UNIT *uptr, int32 val, void *desc); t_stat wtc_show (FILE *st, UNIT *uptr, int32 val, void *desc);
t_stat wtc_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat wtc_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *wtc_description (DEVICE *dptr); const char *wtc_description (DEVICE *dptr);
t_stat wtc_reset (DEVICE *dptr); t_stat wtc_reset (DEVICE *dptr);
void wtc_set_valid (void); void wtc_set_valid (void);
void wtc_set_invalid (void); void wtc_set_invalid (void);
@ -301,7 +301,7 @@ void wtc_set_invalid (void)
wtc_csrd &= ~WTC_CSRD_VRT; wtc_csrd &= ~WTC_CSRD_VRT;
} }
t_stat wtc_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat wtc_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "Watch Chip (WTC)\n\n"); fprintf (st, "Watch Chip (WTC)\n\n");
fprintf (st, "The WTC simulates the MC146818 watch chip. It recognizes the following options:\n\n"); fprintf (st, "The WTC simulates the MC146818 watch chip. It recognizes the following options:\n\n");
@ -314,7 +314,7 @@ fprintf (st, "verify that the time reported is valid. The default mode is VMS.\
return SCPE_OK; return SCPE_OK;
} }
char *wtc_description (DEVICE *dptr) const char *wtc_description (DEVICE *dptr)
{ {
return "watch chip"; return "watch chip";
} }

81
scp.c
View file

@ -453,7 +453,7 @@ void int_handler (int signal);
t_stat set_prompt (int32 flag, char *cptr); t_stat set_prompt (int32 flag, char *cptr);
t_stat sim_set_asynch (int32 flag, char *cptr); t_stat sim_set_asynch (int32 flag, char *cptr);
t_stat sim_set_environment (int32 flag, char *cptr); t_stat sim_set_environment (int32 flag, char *cptr);
static char *get_dbg_verb (uint32 dbits, DEVICE* dptr); static const char *get_dbg_verb (uint32 dbits, DEVICE* dptr);
/* Global data */ /* Global data */
@ -533,8 +533,8 @@ const char save_vercur[] = "V3.5";
const char save_ver32[] = "V3.2"; const char save_ver32[] = "V3.2";
const char save_ver30[] = "V3.0"; const char save_ver30[] = "V3.0";
const struct scp_error { const struct scp_error {
char *code; const char *code;
char *message; const char *message;
} scp_errors[1+SCPE_MAX_ERR-SCPE_BASE] = } scp_errors[1+SCPE_MAX_ERR-SCPE_BASE] =
{{"NXM", "Address space exceeded"}, {{"NXM", "Address space exceeded"},
{"UNATT", "Unit not attached"}, {"UNATT", "Unit not attached"},
@ -1850,7 +1850,7 @@ argc = ccommand (&argv);
#endif #endif
/* Make sure that argv has at least 10 elements and that it ends in a NULL pointer */ /* Make sure that argv has at least 10 elements and that it ends in a NULL pointer */
targv = calloc (1+MAX(10, argc), sizeof(*targv)); targv = (char **)calloc (1+MAX(10, argc), sizeof(*targv));
for (i=0; i<argc; i++) for (i=0; i<argc; i++)
targv[i] = argv[i]; targv[i] = argv[i];
argv = targv; argv = targv;
@ -2092,7 +2092,7 @@ for (cmdp = sim_vm_cmd; cmdp && (cmdp->name != NULL); cmdp++) {
if (cmdp->help) { if (cmdp->help) {
if (cmd_cnt >= cmd_size) { if (cmd_cnt >= cmd_size) {
cmd_size += 20; cmd_size += 20;
hlp_cmdp = realloc (hlp_cmdp, sizeof(*hlp_cmdp)*cmd_size); hlp_cmdp = (CTAB **)realloc (hlp_cmdp, sizeof(*hlp_cmdp)*cmd_size);
} }
hlp_cmdp[cmd_cnt] = cmdp; hlp_cmdp[cmd_cnt] = cmdp;
++cmd_cnt; ++cmd_cnt;
@ -2104,7 +2104,7 @@ for (cmdp = cmd_table; cmdp && (cmdp->name != NULL); cmdp++) {
if (cmdp->help && (!sim_vm_cmd || !find_ctab (sim_vm_cmd, cmdp->name))) { if (cmdp->help && (!sim_vm_cmd || !find_ctab (sim_vm_cmd, cmdp->name))) {
if (cmd_cnt >= cmd_size) { if (cmd_cnt >= cmd_size) {
cmd_size += 20; cmd_size += 20;
hlp_cmdp = realloc (hlp_cmdp, sizeof(*hlp_cmdp)*cmd_size); hlp_cmdp = (CTAB **)realloc (hlp_cmdp, sizeof(*hlp_cmdp)*cmd_size);
} }
hlp_cmdp[cmd_cnt] = cmdp; hlp_cmdp[cmd_cnt] = cmdp;
++cmd_cnt; ++cmd_cnt;
@ -3178,7 +3178,7 @@ if (!strcmp (gbuf, "NOT")) { /* Conditional Inversion
if (*cptr == '"') { /* quoted string comparison? */ if (*cptr == '"') { /* quoted string comparison? */
char op[CBUFSIZE]; char op[CBUFSIZE];
static struct { static struct {
char *op; const char *op;
int aval; int aval;
int bval; int bval;
t_bool invert; t_bool invert;
@ -5343,14 +5343,14 @@ return SCPE_OK;
/* Get device display name */ /* Get device display name */
char *sim_dname (DEVICE *dptr) const char *sim_dname (DEVICE *dptr)
{ {
return (dptr->lname? dptr->lname: dptr->name); return (dptr->lname? dptr->lname: dptr->name);
} }
/* Get unit display name */ /* Get unit display name */
char *sim_uname (UNIT *uptr) const char *sim_uname (UNIT *uptr)
{ {
DEVICE *d = find_dev_from_unit(uptr); DEVICE *d = find_dev_from_unit(uptr);
static AIO_TLS char uname[CBUFSIZE]; static AIO_TLS char uname[CBUFSIZE];
@ -6984,13 +6984,13 @@ return (c & 0x80) ? 0 : isalnum (c);
/* get_yn yes/no question /* get_yn yes/no question
Inputs: Inputs:
cptr = pointer to question ques = pointer to question
deflt = default answer deflt = default answer
Outputs: Outputs:
result = true if yes, false if no result = true if yes, false if no
*/ */
t_stat get_yn (char *ques, t_stat deflt) t_stat get_yn (const char *ques, t_stat deflt)
{ {
char cbuf[CBUFSIZE], *cptr; char cbuf[CBUFSIZE], *cptr;
@ -7185,7 +7185,7 @@ while (iptr[1]) { /* Skip trailing quote */
break; break;
case 'x': case 'x':
if (1) { if (1) {
static char *hex_digits = "0123456789ABCDEF"; static const char *hex_digits = "0123456789ABCDEF";
const char *c; const char *c;
++iptr; ++iptr;
@ -7253,7 +7253,7 @@ t_bool single_quote_found = FALSE;
char quote = '"'; char quote = '"';
char *tptr, *optr; char *tptr, *optr;
optr = malloc (4*size + 3); optr = (char *)malloc (4*size + 3);
if (optr == NULL) if (optr == NULL)
return NULL; return NULL;
tptr = optr; tptr = optr;
@ -7356,7 +7356,7 @@ return NULL;
DEVICE *find_unit (const char *cptr, UNIT **uptr) DEVICE *find_unit (const char *cptr, UNIT **uptr)
{ {
uint32 i, u; uint32 i, u;
char *nptr; const char *nptr;
const char *tptr; const char *tptr;
t_stat r; t_stat r;
DEVICE *dptr; DEVICE *dptr;
@ -7592,14 +7592,14 @@ sim_schaptr = NULL; /* no search */
sim_stabr.logic = sim_staba.logic = SCH_OR; /* default search params */ sim_stabr.logic = sim_staba.logic = SCH_OR; /* default search params */
sim_stabr.boolop = sim_staba.boolop = SCH_GE; sim_stabr.boolop = sim_staba.boolop = SCH_GE;
sim_stabr.count = 1; sim_stabr.count = 1;
sim_stabr.mask = realloc (sim_stabr.mask, sim_emax * sizeof(*sim_stabr.mask)); sim_stabr.mask = (t_value *)realloc (sim_stabr.mask, sim_emax * sizeof(*sim_stabr.mask));
memset (sim_stabr.mask, 0, sim_emax * sizeof(*sim_stabr.mask)); memset (sim_stabr.mask, 0, sim_emax * sizeof(*sim_stabr.mask));
sim_stabr.comp = realloc (sim_stabr.comp, sim_emax * sizeof(*sim_stabr.comp)); sim_stabr.comp = (t_value *)realloc (sim_stabr.comp, sim_emax * sizeof(*sim_stabr.comp));
memset (sim_stabr.comp, 0, sim_emax * sizeof(*sim_stabr.comp)); memset (sim_stabr.comp, 0, sim_emax * sizeof(*sim_stabr.comp));
sim_staba.count = sim_emax; sim_staba.count = sim_emax;
sim_staba.mask = realloc (sim_staba.mask, sim_emax * sizeof(*sim_staba.mask)); sim_staba.mask = (t_value *)realloc (sim_staba.mask, sim_emax * sizeof(*sim_staba.mask));
memset (sim_staba.mask, 0, sim_emax * sizeof(*sim_staba.mask)); memset (sim_staba.mask, 0, sim_emax * sizeof(*sim_staba.mask));
sim_staba.comp = realloc (sim_staba.comp, sim_emax * sizeof(*sim_staba.comp)); sim_staba.comp = (t_value *)realloc (sim_staba.comp, sim_emax * sizeof(*sim_staba.comp));
memset (sim_staba.comp, 0, sim_emax * sizeof(*sim_staba.comp)); memset (sim_staba.comp, 0, sim_emax * sizeof(*sim_staba.comp));
sim_dfdev = sim_dflt_dev; sim_dfdev = sim_dflt_dev;
sim_dfunit = sim_dfdev->units; sim_dfunit = sim_dfdev->units;
@ -7658,9 +7658,10 @@ return cptr;
cp = pointer to final '.' if match, NULL if not cp = pointer to final '.' if match, NULL if not
*/ */
char *match_ext (char *fnam, char *ext) char *match_ext (char *fnam, const char *ext)
{ {
char *pptr, *fptr, *eptr; char *pptr, *fptr;
const char *eptr;
if ((fnam == NULL) || (ext == NULL)) /* bad arguments? */ if ((fnam == NULL) || (ext == NULL)) /* bad arguments? */
return NULL; return NULL;
@ -7727,9 +7728,9 @@ for (logop = cmpop = -1; (c = *cptr++); ) { /* loop thru clauses */
} /* end for */ } /* end for */
if (schptr->count != 1) { if (schptr->count != 1) {
free (schptr->mask); free (schptr->mask);
schptr->mask = calloc (sim_emax, sizeof(*schptr->mask)); schptr->mask = (t_value *)calloc (sim_emax, sizeof(*schptr->mask));
free (schptr->comp); free (schptr->comp);
schptr->comp = calloc (sim_emax, sizeof(*schptr->comp)); schptr->comp = (t_value *)calloc (sim_emax, sizeof(*schptr->comp));
} }
if (logop >= 0) { if (logop >= 0) {
schptr->logic = logop; schptr->logic = logop;
@ -7766,8 +7767,8 @@ const char logstr[] = "|&^", cmpstr[] = "=!><";
if (*cptr == 0) /* check for clause */ if (*cptr == 0) /* check for clause */
return NULL; return NULL;
logval = calloc (sim_emax, sizeof(*logval)); logval = (t_value *)calloc (sim_emax, sizeof(*logval));
cmpval = calloc (sim_emax, sizeof(*cmpval)); cmpval = (t_value *)calloc (sim_emax, sizeof(*cmpval));
for (logop = cmpop = -1; (c = *cptr++); ) { /* loop thru clauses */ for (logop = cmpop = -1; (c = *cptr++); ) { /* loop thru clauses */
if ((sptr = strchr (logstr, c))) { /* check for mask */ if ((sptr = strchr (logstr, c))) { /* check for mask */
logop = (int32)(sptr - logstr); logop = (int32)(sptr - logstr);
@ -7802,9 +7803,9 @@ for (logop = cmpop = -1; (c = *cptr++); ) { /* loop thru clauses */
if (schptr->count != (1 - reason)) { if (schptr->count != (1 - reason)) {
schptr->count = 1 - reason; schptr->count = 1 - reason;
free (schptr->mask); free (schptr->mask);
schptr->mask = calloc (sim_emax, sizeof(*schptr->mask)); schptr->mask = (t_value *)calloc (sim_emax, sizeof(*schptr->mask));
free (schptr->comp); free (schptr->comp);
schptr->comp = calloc (sim_emax, sizeof(*schptr->comp)); schptr->comp = (t_value *)calloc (sim_emax, sizeof(*schptr->comp));
} }
if (logop >= 0) { if (logop >= 0) {
schptr->logic = logop; schptr->logic = logop;
@ -7837,7 +7838,7 @@ int32 ret = 0;
if (schptr == NULL) if (schptr == NULL)
return ret; return ret;
val = malloc (schptr->count * sizeof (*values)); val = (t_value *)malloc (schptr->count * sizeof (*values));
for (i=0; i<(int32)schptr->count; i++) { for (i=0; i<(int32)schptr->count; i++) {
val[i] = values[i]; val[i] = values[i];
@ -8697,7 +8698,7 @@ return sim_brk_act[sim_do_depth] = sim_brk_act_buf[sim_do_depth] = NULL;
void sim_brk_setact (const char *action) void sim_brk_setact (const char *action)
{ {
if (action) { if (action) {
sim_brk_act_buf[sim_do_depth] = realloc (sim_brk_act_buf[sim_do_depth], strlen (action) + 1); sim_brk_act_buf[sim_do_depth] = (char *)realloc (sim_brk_act_buf[sim_do_depth], strlen (action) + 1);
strcpy (sim_brk_act_buf[sim_do_depth], action); strcpy (sim_brk_act_buf[sim_do_depth], action);
sim_brk_act[sim_do_depth] = sim_brk_act_buf[sim_do_depth]; sim_brk_act[sim_do_depth] = sim_brk_act_buf[sim_do_depth];
} }
@ -8917,7 +8918,7 @@ if (switches & EXP_TYP_REGEX) {
res = regcomp (&re, (char *)match_buf, REG_EXTENDED | ((switches & EXP_TYP_REGEX_I) ? REG_ICASE : 0)); res = regcomp (&re, (char *)match_buf, REG_EXTENDED | ((switches & EXP_TYP_REGEX_I) ? REG_ICASE : 0));
if (res) { if (res) {
size_t err_size = regerror (res, &re, NULL, 0); size_t err_size = regerror (res, &re, NULL, 0);
char *err_buf = calloc (err_size+1, 1); char *err_buf = (char *)calloc (err_size+1, 1);
regerror (res, &re, err_buf, err_size); regerror (res, &re, err_buf, err_size);
sim_messagef (SCPE_ARG, "Regular Expression Error: %s\n", err_buf); sim_messagef (SCPE_ARG, "Regular Expression Error: %s\n", err_buf);
@ -9086,7 +9087,7 @@ for (i=0; i < exp->size; i++) {
else { else {
if (strlen ((char *)exp->buf) != exp->buf_ins) { /* Nul characters in buffer? */ if (strlen ((char *)exp->buf) != exp->buf_ins) { /* Nul characters in buffer? */
size_t off; size_t off;
tstr = malloc (exp->buf_ins + 1); tstr = (char *)malloc (exp->buf_ins + 1);
tstr[0] = '\0'; tstr[0] = '\0';
for (off=0; off < exp->buf_ins; off += 1 + strlen ((char *)&exp->buf[off])) for (off=0; off < exp->buf_ins; off += 1 + strlen ((char *)&exp->buf[off]))
@ -9095,7 +9096,7 @@ for (i=0; i < exp->size; i++) {
} }
} }
++regex_checks; ++regex_checks;
matches = calloc ((ep->regex.re_nsub + 1), sizeof(*matches)); matches = (regmatch_t *)calloc ((ep->regex.re_nsub + 1), sizeof(*matches));
if (sim_deb && exp->dptr && (exp->dptr->dctrl & exp->dbit)) { if (sim_deb && exp->dptr && (exp->dptr->dctrl & exp->dbit)) {
char *estr = sim_encode_quoted_string (exp->buf, exp->buf_ins); char *estr = sim_encode_quoted_string (exp->buf, exp->buf_ins);
sim_debug (exp->dbit, exp->dptr, "Checking String: %s\n", estr); sim_debug (exp->dbit, exp->dptr, "Checking String: %s\n", estr);
@ -9104,7 +9105,7 @@ for (i=0; i < exp->size; i++) {
} }
if (!regexec (&ep->regex, cbuf, ep->regex.re_nsub + 1, matches, REG_NOTBOL)) { if (!regexec (&ep->regex, cbuf, ep->regex.re_nsub + 1, matches, REG_NOTBOL)) {
size_t j; size_t j;
char *buf = malloc (1 + exp->buf_ins); char *buf = (char *)malloc (1 + exp->buf_ins);
for (j=0; j<ep->regex.re_nsub + 1; j++) { for (j=0; j<ep->regex.re_nsub + 1; j++) {
char env_name[32]; char env_name[32];
@ -9239,7 +9240,7 @@ if (snd->extoff != 0) {
} }
if (snd->insoff+size > snd->bufsize) { if (snd->insoff+size > snd->bufsize) {
snd->bufsize = snd->insoff+size; snd->bufsize = snd->insoff+size;
snd->buffer = realloc(snd->buffer, snd->bufsize); snd->buffer = (uint8 *)realloc(snd->buffer, snd->bufsize);
} }
memcpy(snd->buffer+snd->insoff, data, size); memcpy(snd->buffer+snd->insoff, data, size);
snd->insoff += size; snd->insoff += size;
@ -9361,10 +9362,10 @@ int32 debug_unterm = 0;
/* Finds debug phrase matching bitmask from from device DEBTAB table */ /* Finds debug phrase matching bitmask from from device DEBTAB table */
static char *get_dbg_verb (uint32 dbits, DEVICE* dptr) static const char *get_dbg_verb (uint32 dbits, DEVICE* dptr)
{ {
static char *debtab_none = "DEBTAB_ISNULL"; static const char *debtab_none = "DEBTAB_ISNULL";
static char *debtab_nomatch = "DEBTAB_NOMATCH"; static const char *debtab_nomatch = "DEBTAB_NOMATCH";
int32 offset = 0; int32 offset = 0;
if (dptr->debflags == 0) if (dptr->debflags == 0)
@ -9384,7 +9385,7 @@ return debtab_nomatch;
static const char *sim_debug_prefix (uint32 dbits, DEVICE* dptr) static const char *sim_debug_prefix (uint32 dbits, DEVICE* dptr)
{ {
char* debug_type = get_dbg_verb (dbits, dptr); const char* debug_type = get_dbg_verb (dbits, dptr);
char tim_t[32] = ""; char tim_t[32] = "";
char tim_a[32] = ""; char tim_a[32] = "";
char pc_s[64] = ""; char pc_s[64] = "";
@ -9442,7 +9443,7 @@ for (i = fields-1; i >= 0; i--) { /* print xlation, transition
fprintf(stream, "%s%c ", bitdefs[i].name, debug_bstates[off]); fprintf(stream, "%s%c ", bitdefs[i].name, debug_bstates[off]);
} }
else { else {
char *delta = ""; const char *delta = "";
mask = 0xFFFFFFFF >> (32-bitdefs[i].width); mask = 0xFFFFFFFF >> (32-bitdefs[i].width);
value = (uint32)((after >> bitdefs[i].offset) & mask); value = (uint32)((after >> bitdefs[i].offset) & mask);
@ -10279,7 +10280,7 @@ TOPIC *topic = &top;
int failed; int failed;
size_t match; size_t match;
size_t i; size_t i;
char *p; const char *p;
t_bool flat_help = FALSE; t_bool flat_help = FALSE;
char cbuf [CBUFSIZE], gbuf[CBUFSIZE]; char cbuf [CBUFSIZE], gbuf[CBUFSIZE];
@ -10539,7 +10540,7 @@ fp = sim_fopen (helpfile, "r");
if (fp == NULL) { if (fp == NULL) {
if (sim_argv && *sim_argv[0]) { if (sim_argv && *sim_argv[0]) {
char fbuf[(4*PATH_MAX)+1]; /* PATH_MAX is ridiculously small on some platforms */ char fbuf[(4*PATH_MAX)+1]; /* PATH_MAX is ridiculously small on some platforms */
char *d = NULL; const char *d = NULL;
/* Try to find a path from argv[0]. This won't always /* Try to find a path from argv[0]. This won't always
* work (one reason files are probably not a good idea), * work (one reason files are probably not a good idea),

8
scp.h
View file

@ -122,9 +122,9 @@ t_stat assign_device (DEVICE *dptr, char *cptr);
t_stat deassign_device (DEVICE *dptr); t_stat deassign_device (DEVICE *dptr);
t_stat reset_all (uint32 start_device); t_stat reset_all (uint32 start_device);
t_stat reset_all_p (uint32 start_device); t_stat reset_all_p (uint32 start_device);
char *sim_dname (DEVICE *dptr); const char *sim_dname (DEVICE *dptr);
char *sim_uname (UNIT *dptr); const char *sim_uname (UNIT *dptr);
t_stat get_yn (char *ques, t_stat deflt); t_stat get_yn (const char *ques, t_stat deflt);
int sim_isspace (char c); int sim_isspace (char c);
int sim_islower (char c); int sim_islower (char c);
int sim_isalpha (char c); int sim_isalpha (char c);
@ -177,7 +177,7 @@ t_stat sim_exp_clrall (EXPECT *exp);
t_stat sim_exp_show (FILE *st, EXPECT *exp, const char *match); t_stat sim_exp_show (FILE *st, EXPECT *exp, const char *match);
t_stat sim_exp_showall (FILE *st, EXPECT *exp); t_stat sim_exp_showall (FILE *st, EXPECT *exp);
t_stat sim_exp_check (EXPECT *exp, uint8 data); t_stat sim_exp_check (EXPECT *exp, uint8 data);
char *match_ext (char *fnam, char *ext); char *match_ext (char *fnam, const char *ext);
t_stat show_version (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat show_version (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr);
t_stat set_dev_debug (DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat set_dev_debug (DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr);
t_stat show_dev_debug (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat show_dev_debug (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr);

View file

@ -38,7 +38,7 @@
======================================================================================= =======================================================================================
*/ */
struct ROM_File_Descriptor { struct ROM_File_Descriptor {
char *BinaryName; char *IncludeFileName; size_t expected_size; unsigned int checksum; char *ArrayName;} ROMs[] = { const char *BinaryName; const char *IncludeFileName; size_t expected_size; unsigned int checksum; const char *ArrayName;} ROMs[] = {
{"VAX/ka655x.bin", "VAX/vax_ka655x_bin.h", 131072, 0xFF7673B6, "vax_ka655x_bin"}, {"VAX/ka655x.bin", "VAX/vax_ka655x_bin.h", 131072, 0xFF7673B6, "vax_ka655x_bin"},
{"VAX/ka620.bin", "VAX/vax_ka620_bin.h", 65536, 0xFF7F930F, "vax_ka620_bin"}, {"VAX/ka620.bin", "VAX/vax_ka620_bin.h", 65536, 0xFF7F930F, "vax_ka620_bin"},
{"VAX/ka630.bin", "VAX/vax_ka630_bin.h", 65536, 0xFF7F73EF, "vax_ka630_bin"}, {"VAX/ka630.bin", "VAX/vax_ka630_bin.h", 65536, 0xFF7F73EF, "vax_ka630_bin"},
@ -144,6 +144,7 @@ unsigned char *ROMData = NULL;
unsigned int checksum = 0; unsigned int checksum = 0;
char *c; char *c;
int i; int i;
char cleaned_rom_filename[512];
char include_filename[512]; char include_filename[512];
char array_name[512]; char array_name[512];
@ -167,9 +168,11 @@ fclose (rFile);
for (i=0; i<statb.st_size; ++i) for (i=0; i<statb.st_size; ++i)
checksum += ROMData[i]; checksum += ROMData[i];
checksum = ~checksum; checksum = ~checksum;
while ((c = strchr (rom_filename, '\\'))) strncpy (cleaned_rom_filename, rom_filename, sizeof(cleaned_rom_filename)-2);
cleaned_rom_filename[sizeof(cleaned_rom_filename)-1] = '\0';
while ((c = strchr (cleaned_rom_filename, '\\')))
*c = '/'; *c = '/';
strcpy (array_name, rom_filename); strcpy (array_name, cleaned_rom_filename);
for (c=array_name; *c; ++c) for (c=array_name; *c; ++c)
if (isupper(*c)) if (isupper(*c))
*c = (char)tolower(*c); *c = (char)tolower(*c);
@ -177,7 +180,7 @@ if ((c = strchr (array_name, '.')))
*c = '_'; *c = '_';
if ((c = strchr (array_name, '/'))) if ((c = strchr (array_name, '/')))
*c = '_'; *c = '_';
sprintf (include_filename, "%s.h", rom_filename); sprintf (include_filename, "%s.h", cleaned_rom_filename);
if ((c = strrchr (include_filename, '/'))) if ((c = strrchr (include_filename, '/')))
sprintf (c+1, "%s.h", array_name); sprintf (c+1, "%s.h", array_name);
else else

View file

@ -376,7 +376,7 @@ typedef uint32 t_addr;
/* Device data structure */ /* Device data structure */
struct sim_device { struct sim_device {
char *name; /* name */ const char *name; /* name */
struct sim_unit *units; /* units */ struct sim_unit *units; /* units */
struct sim_reg *registers; /* registers */ struct sim_reg *registers; /* registers */
struct sim_mtab *modifiers; /* modifiers */ struct sim_mtab *modifiers; /* modifiers */
@ -404,13 +404,13 @@ struct sim_device {
/* mem size routine */ /* mem size routine */
char *lname; /* logical name */ char *lname; /* logical name */
t_stat (*help)(FILE *st, struct sim_device *dptr, t_stat (*help)(FILE *st, struct sim_device *dptr,
struct sim_unit *uptr, int32 flag, char *cptr); struct sim_unit *uptr, int32 flag, const char *cptr);
/* help */ /* help */
t_stat (*attach_help)(FILE *st, struct sim_device *dptr, t_stat (*attach_help)(FILE *st, struct sim_device *dptr,
struct sim_unit *uptr, int32 flag, char *cptr); struct sim_unit *uptr, int32 flag, const char *cptr);
/* attach help */ /* attach help */
void *help_ctx; /* Context available to help routines */ void *help_ctx; /* Context available to help routines */
char *(*description)(struct sim_device *dptr); const char *(*description)(struct sim_device *dptr);
/* Device Description */ /* Device Description */
}; };
@ -540,7 +540,7 @@ struct sim_unit {
#define UNIT_S_DF_TAPE 3 /* Bits Reserved for Tape Density */ #define UNIT_S_DF_TAPE 3 /* Bits Reserved for Tape Density */
struct sim_bitfield { struct sim_bitfield {
char *name; /* field name */ const char *name; /* field name */
uint32 offset; /* starting bit */ uint32 offset; /* starting bit */
uint32 width; /* width */ uint32 width; /* width */
const char **valuenames; /* map of values to strings */ const char **valuenames; /* map of values to strings */
@ -550,13 +550,13 @@ struct sim_bitfield {
/* Register data structure */ /* Register data structure */
struct sim_reg { struct sim_reg {
char *name; /* name */ const char *name; /* name */
void *loc; /* location */ void *loc; /* location */
uint32 radix; /* radix */ uint32 radix; /* radix */
uint32 width; /* width */ uint32 width; /* width */
uint32 offset; /* starting bit */ uint32 offset; /* starting bit */
uint32 depth; /* save depth */ uint32 depth; /* save depth */
char *desc; /* description */ const char *desc; /* description */
struct sim_bitfield *fields; /* bit fields */ struct sim_bitfield *fields; /* bit fields */
uint32 flags; /* flags */ uint32 flags; /* flags */
uint32 qptr; /* circ q ptr */ uint32 qptr; /* circ q ptr */
@ -576,7 +576,7 @@ struct sim_reg {
/* Command tables, base and alternate formats */ /* Command tables, base and alternate formats */
struct sim_ctab { struct sim_ctab {
char *name; /* name */ const char *name; /* name */
t_stat (*action)(int32 flag, char *cptr); t_stat (*action)(int32 flag, char *cptr);
/* action routine */ /* action routine */
int32 arg; /* argument */ int32 arg; /* argument */
@ -587,19 +587,19 @@ struct sim_ctab {
}; };
struct sim_c1tab { struct sim_c1tab {
char *name; /* name */ const char *name; /* name */
t_stat (*action)(struct sim_device *dptr, struct sim_unit *uptr, t_stat (*action)(struct sim_device *dptr, struct sim_unit *uptr,
int32 flag, char *cptr); /* action routine */ int32 flag, char *cptr); /* action routine */
int32 arg; /* argument */ int32 arg; /* argument */
char *help; /* help string */ const char *help; /* help string */
}; };
struct sim_shtab { struct sim_shtab {
char *name; /* name */ const char *name; /* name */
t_stat (*action)(FILE *st, struct sim_device *dptr, t_stat (*action)(FILE *st, struct sim_device *dptr,
struct sim_unit *uptr, int32 flag, char *cptr); struct sim_unit *uptr, int32 flag, char *cptr);
int32 arg; /* argument */ int32 arg; /* argument */
char *help; /* help string */ const char *help; /* help string */
}; };
/* Modifier table - only extended entries have disp, reg, or flags */ /* Modifier table - only extended entries have disp, reg, or flags */
@ -607,8 +607,8 @@ struct sim_shtab {
struct sim_mtab { struct sim_mtab {
uint32 mask; /* mask */ uint32 mask; /* mask */
uint32 match; /* match */ uint32 match; /* match */
char *pstring; /* print string */ const char *pstring; /* print string */
char *mstring; /* match string */ const char *mstring; /* match string */
t_stat (*valid)(struct sim_unit *up, int32 v, char *cp, void *dp); t_stat (*valid)(struct sim_unit *up, int32 v, char *cp, void *dp);
/* validation routine */ /* validation routine */
t_stat (*disp)(FILE *st, struct sim_unit *up, int32 v, void *dp); t_stat (*disp)(FILE *st, struct sim_unit *up, int32 v, void *dp);
@ -616,7 +616,7 @@ struct sim_mtab {
void *desc; /* value descriptor */ void *desc; /* value descriptor */
/* REG * if MTAB_VAL */ /* REG * if MTAB_VAL */
/* int * if not */ /* int * if not */
char *help; /* help string */ const char *help; /* help string */
}; };
@ -705,9 +705,9 @@ struct sim_send {
/* Debug table */ /* Debug table */
struct sim_debtab { struct sim_debtab {
char *name; /* control name */ const char *name; /* control name */
uint32 mask; /* control bit */ uint32 mask; /* control bit */
char *desc; /* description */ const char *desc; /* description */
}; };
/* Deprecated Debug macros. Use sim_debug() */ /* Deprecated Debug macros. Use sim_debug() */
@ -835,7 +835,7 @@ typedef struct sim_bitfield BITFIELD;
/* This replaces any references to "assert()" which should never be invoked */ /* This replaces any references to "assert()" which should never be invoked */
/* with an expression which causes side effects (i.e. must be executed for */ /* with an expression which causes side effects (i.e. must be executed for */
/* the program to work correctly) */ /* the program to work correctly) */
#define ASSURE(_Expression) if (!(_Expression)) {char *_exp = #_Expression; char *_file = __FILE__; \ #define ASSURE(_Expression) if (!(_Expression)) {const char *_exp = #_Expression; const char *_file = __FILE__; \
fprintf(stderr, "%s failed at %s line %d\n", _exp, _file, __LINE__); \ fprintf(stderr, "%s failed at %s line %d\n", _exp, _file, __LINE__); \
if (sim_log) fprintf(sim_log, "%s failed at %s line %d\n", _exp, _file, __LINE__); \ if (sim_log) fprintf(sim_log, "%s failed at %s line %d\n", _exp, _file, __LINE__); \
if (sim_deb) fprintf(sim_deb, "%s failed at %s line %d\n", _exp, _file, __LINE__); \ if (sim_deb) fprintf(sim_deb, "%s failed at %s line %d\n", _exp, _file, __LINE__); \

View file

@ -292,7 +292,7 @@ static char *HostPathToVhdPath (const char *szHostPath, char *szVhdPath, size_t
static char *VhdPathToHostPath (const char *szVhdPath, char *szHostPath, size_t HostPathSize); static char *VhdPathToHostPath (const char *szVhdPath, char *szHostPath, size_t HostPathSize);
struct sim_disk_fmt { struct sim_disk_fmt {
char *name; /* name */ const char *name; /* name */
int32 uflags; /* unit flags */ int32 uflags; /* unit flags */
int32 fmtval; /* Format type value */ int32 fmtval; /* Format type value */
t_stat (*impl_fnc)(void); /* Implemented Test Function */ t_stat (*impl_fnc)(void); /* Implemented Test Function */
@ -367,7 +367,7 @@ return SCPE_OK;
t_stat sim_disk_show_capac (FILE *st, UNIT *uptr, int32 val, void *desc) t_stat sim_disk_show_capac (FILE *st, UNIT *uptr, int32 val, void *desc)
{ {
struct disk_context *ctx = (struct disk_context *)uptr->disk_ctx; struct disk_context *ctx = (struct disk_context *)uptr->disk_ctx;
char *cap_units = "B"; const char *cap_units = "B";
DEVICE *dptr = find_dev_from_unit (uptr); DEVICE *dptr = find_dev_from_unit (uptr);
t_offset capac = ((t_offset)uptr->capac)*((dptr->flags & DEV_SECTORS) ? 512 : 1); t_offset capac = ((t_offset)uptr->capac)*((dptr->flags & DEV_SECTORS) ? 512 : 1);
@ -1215,7 +1215,7 @@ if (close_function (fileref) == EOF)
return SCPE_OK; return SCPE_OK;
} }
t_stat sim_disk_attach_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat sim_disk_attach_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "%s Disk Attach Help\n\n", dptr->name); fprintf (st, "%s Disk Attach Help\n\n", dptr->name);
@ -1443,7 +1443,7 @@ for (i = 4; i < wds; i++)
buf[i] = 0177777u; buf[i] = 0177777u;
da = (uptr->capac*((dptr->flags & DEV_SECTORS) ? 512 : 1)) - (sec * wds); da = (uptr->capac*((dptr->flags & DEV_SECTORS) ? 512 : 1)) - (sec * wds);
for (i = 0; (i < sec) && (i < 10); i++, da += wds) for (i = 0; (i < sec) && (i < 10); i++, da += wds)
if (sim_disk_wrsect (uptr, (t_lba)(da/wds), (void *)buf, NULL, 1)) { if (sim_disk_wrsect (uptr, (t_lba)(da/wds), (uint8 *)buf, NULL, 1)) {
free (buf); free (buf);
return SCPE_IOERR; return SCPE_IOERR;
} }

View file

@ -67,7 +67,7 @@ typedef void (*DISK_PCALLBACK)(UNIT *unit, t_stat status);
t_stat sim_disk_attach (UNIT *uptr, char *cptr, size_t sector_size, size_t xfer_element_size, t_bool dontautosize, t_stat sim_disk_attach (UNIT *uptr, char *cptr, size_t sector_size, size_t xfer_element_size, t_bool dontautosize,
uint32 debugbit, const char *drivetype, uint32 pdp11_tracksize, int completion_delay); uint32 debugbit, const char *drivetype, uint32 pdp11_tracksize, int completion_delay);
t_stat sim_disk_detach (UNIT *uptr); t_stat sim_disk_detach (UNIT *uptr);
t_stat sim_disk_attach_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat sim_disk_attach_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
t_stat sim_disk_rdsect (UNIT *uptr, t_lba lba, uint8 *buf, t_seccnt *sectsread, t_seccnt sects); t_stat sim_disk_rdsect (UNIT *uptr, t_lba lba, uint8 *buf, t_seccnt *sectsread, t_seccnt sects);
t_stat sim_disk_rdsect_a (UNIT *uptr, t_lba lba, uint8 *buf, t_seccnt *sectsread, t_seccnt sects, DISK_PCALLBACK callback); t_stat sim_disk_rdsect_a (UNIT *uptr, t_lba lba, uint8 *buf, t_seccnt *sectsread, t_seccnt sects, DISK_PCALLBACK callback);
t_stat sim_disk_wrsect (UNIT *uptr, t_lba lba, uint8 *buf, t_seccnt *sectswritten, t_seccnt sects); t_stat sim_disk_wrsect (UNIT *uptr, t_lba lba, uint8 *buf, t_seccnt *sectswritten, t_seccnt sects);

View file

@ -511,7 +511,7 @@ void eth_setcrc(ETH_DEV* dev, int need_crc)
dev->need_crc = need_crc; dev->need_crc = need_crc;
} }
void eth_packet_trace_ex(ETH_DEV* dev, const uint8 *msg, int len, char* txt, int detail, uint32 reason) void eth_packet_trace_ex(ETH_DEV* dev, const uint8 *msg, int len, const char* txt, int detail, uint32 reason)
{ {
if (dev->dptr->dctrl & reason) { if (dev->dptr->dctrl & reason) {
char src[20]; char src[20];
@ -557,12 +557,12 @@ void eth_packet_trace_ex(ETH_DEV* dev, const uint8 *msg, int len, char* txt, int
} }
} }
void eth_packet_trace(ETH_DEV* dev, const uint8 *msg, int len, char* txt) void eth_packet_trace(ETH_DEV* dev, const uint8 *msg, int len, const char* txt)
{ {
eth_packet_trace_ex(dev, msg, len, txt, 0, dev->dbit); eth_packet_trace_ex(dev, msg, len, txt, 0, dev->dbit);
} }
void eth_packet_trace_detail(ETH_DEV* dev, const uint8 *msg, int len, char* txt) void eth_packet_trace_detail(ETH_DEV* dev, const uint8 *msg, int len, const char* txt)
{ {
eth_packet_trace_ex(dev, msg, len, txt, 1 , dev->dbit); eth_packet_trace_ex(dev, msg, len, txt, 1 , dev->dbit);
} }
@ -851,7 +851,7 @@ t_stat eth_open(ETH_DEV* dev, char* name, DEVICE* dptr, uint32 dbit)
{return SCPE_NOFNC;} {return SCPE_NOFNC;}
t_stat eth_close (ETH_DEV* dev) t_stat eth_close (ETH_DEV* dev)
{return SCPE_NOFNC;} {return SCPE_NOFNC;}
t_stat eth_attach_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat eth_attach_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "%s attach help\n\n", dptr->name); fprintf (st, "%s attach help\n\n", dptr->name);
fprintf (st, "This simulator was not built with ethernet device support\n"); fprintf (st, "This simulator was not built with ethernet device support\n");
@ -958,7 +958,7 @@ static HINSTANCE hLib = 0; /* handle to DLL */
static void *hLib = 0; /* handle to Library */ static void *hLib = 0; /* handle to Library */
#endif #endif
static int lib_loaded = 0; /* 0=not loaded, 1=loaded, 2=library load failed, 3=Func load failed */ static int lib_loaded = 0; /* 0=not loaded, 1=loaded, 2=library load failed, 3=Func load failed */
static char* lib_name = static const char* lib_name =
#if defined(_WIN32) || defined(__CYGWIN__) #if defined(_WIN32) || defined(__CYGWIN__)
"wpcap.dll"; "wpcap.dll";
#elif defined(__APPLE__) #elif defined(__APPLE__)
@ -968,7 +968,7 @@ static char* lib_name =
#define __STR(tok) __STR_QUOTE(tok) #define __STR(tok) __STR_QUOTE(tok)
"libpcap." __STR(HAVE_DLOPEN); "libpcap." __STR(HAVE_DLOPEN);
#endif #endif
static char* no_pcap = static const char* no_pcap =
#if defined(_WIN32) || defined(__CYGWIN__) #if defined(_WIN32) || defined(__CYGWIN__)
"wpcap load failure"; "wpcap load failure";
#else #else
@ -1003,7 +1003,7 @@ static char* (*p_pcap_lib_version) (void);
/* load function pointer from DLL */ /* load function pointer from DLL */
typedef int (*_func)(); typedef int (*_func)();
static void load_function(char* function, _func* func_ptr) { static void load_function(const char* function, _func* func_ptr) {
#ifdef _WIN32 #ifdef _WIN32
*func_ptr = (_func)((size_t)GetProcAddress(hLib, function)); *func_ptr = (_func)((size_t)GetProcAddress(hLib, function));
#else #else
@ -1441,7 +1441,7 @@ static void eth_get_nic_hw_addr(ETH_DEV* dev, char *devname)
char command[1024]; char command[1024];
FILE *f; FILE *f;
int i; int i;
char *patterns[] = { const char *patterns[] = {
"grep [0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]", "grep [0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]",
"egrep [0-9a-fA-F]?[0-9a-fA-F]:[0-9a-fA-F]?[0-9a-fA-F]:[0-9a-fA-F]?[0-9a-fA-F]:[0-9a-fA-F]?[0-9a-fA-F]:[0-9a-fA-F]?[0-9a-fA-F]:[0-9a-fA-F]?[0-9a-fA-F]", "egrep [0-9a-fA-F]?[0-9a-fA-F]:[0-9a-fA-F]?[0-9a-fA-F]:[0-9a-fA-F]?[0-9a-fA-F]:[0-9a-fA-F]?[0-9a-fA-F]:[0-9a-fA-F]?[0-9a-fA-F]:[0-9a-fA-F]?[0-9a-fA-F]",
NULL}; NULL};
@ -2160,7 +2160,7 @@ _eth_remove_from_open_list (dev);
return SCPE_OK; return SCPE_OK;
} }
t_stat eth_attach_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat eth_attach_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "%s attach help\n\n", dptr->name); fprintf (st, "%s attach help\n\n", dptr->name);
fprintf (st, " sim> SHOW ETHERNET\n"); fprintf (st, " sim> SHOW ETHERNET\n");
@ -2333,7 +2333,7 @@ static void
_eth_error(ETH_DEV* dev, const char* where) _eth_error(ETH_DEV* dev, const char* where)
{ {
char msg[64]; char msg[64];
char *netname = ""; const char *netname = "";
time_t now; time_t now;
time(&now); time(&now);
@ -3490,21 +3490,21 @@ if (dev->eth_api == ETH_API_PCAP) {
if (pcap_lookupnet(dev->name, &bpf_subnet, &bpf_netmask, errbuf)<0) if (pcap_lookupnet(dev->name, &bpf_subnet, &bpf_netmask, errbuf)<0)
bpf_netmask = 0; bpf_netmask = 0;
/* compile filter string */ /* compile filter string */
if ((status = pcap_compile(dev->handle, &bpf, buf, 1, bpf_netmask)) < 0) { if ((status = pcap_compile((pcap_t*)dev->handle, &bpf, buf, 1, bpf_netmask)) < 0) {
sprintf(errbuf, "%s", pcap_geterr(dev->handle)); sprintf(errbuf, "%s", pcap_geterr((pcap_t*)dev->handle));
sim_printf("Eth: pcap_compile error: %s\r\n", errbuf); sim_printf("Eth: pcap_compile error: %s\r\n", errbuf);
/* show erroneous BPF string */ /* show erroneous BPF string */
sim_printf ("Eth: BPF string is: |%s|\r\n", buf); sim_printf ("Eth: BPF string is: |%s|\r\n", buf);
} }
else { else {
/* apply compiled filter string */ /* apply compiled filter string */
if ((status = pcap_setfilter(dev->handle, &bpf)) < 0) { if ((status = pcap_setfilter((pcap_t*)dev->handle, &bpf)) < 0) {
sprintf(errbuf, "%s", pcap_geterr(dev->handle)); sprintf(errbuf, "%s", pcap_geterr((pcap_t*)dev->handle));
sim_printf("Eth: pcap_setfilter error: %s\r\n", errbuf); sim_printf("Eth: pcap_setfilter error: %s\r\n", errbuf);
} }
else { else {
/* Save BPF filter string */ /* Save BPF filter string */
dev->bpf_filter = realloc(dev->bpf_filter, 1 + strlen(buf)); dev->bpf_filter = (char *)realloc(dev->bpf_filter, 1 + strlen(buf));
strcpy (dev->bpf_filter, buf); strcpy (dev->bpf_filter, buf);
#ifdef USE_SETNONBLOCK #ifdef USE_SETNONBLOCK
/* set file non-blocking */ /* set file non-blocking */

View file

@ -320,7 +320,7 @@ typedef struct eth_device ETH_DEV;
t_stat eth_open (ETH_DEV* dev, char* name, /* open ethernet interface */ t_stat eth_open (ETH_DEV* dev, char* name, /* open ethernet interface */
DEVICE* dptr, uint32 dbit); DEVICE* dptr, uint32 dbit);
t_stat eth_close (ETH_DEV* dev); /* close ethernet interface */ t_stat eth_close (ETH_DEV* dev); /* close ethernet interface */
t_stat eth_attach_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat eth_attach_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
t_stat eth_write (ETH_DEV* dev, ETH_PACK* packet, /* write sychronous packet; */ t_stat eth_write (ETH_DEV* dev, ETH_PACK* packet, /* write sychronous packet; */
ETH_PCALLBACK routine); /* callback when done */ ETH_PCALLBACK routine); /* callback when done */
int eth_read (ETH_DEV* dev, ETH_PACK* packet, /* read single packet; */ int eth_read (ETH_DEV* dev, ETH_PACK* packet, /* read single packet; */
@ -343,8 +343,8 @@ t_stat eth_clr_async (ETH_DEV* dev); /* set read behavior to
t_stat eth_set_throttle (ETH_DEV* dev, uint32 time, uint32 burst, uint32 delay); /* set transmit throttle parameters */ t_stat eth_set_throttle (ETH_DEV* dev, uint32 time, uint32 burst, uint32 delay); /* set transmit throttle parameters */
uint32 eth_crc32(uint32 crc, const void* vbuf, size_t len); /* Compute Ethernet Autodin II CRC for buffer */ uint32 eth_crc32(uint32 crc, const void* vbuf, size_t len); /* Compute Ethernet Autodin II CRC for buffer */
void eth_packet_trace (ETH_DEV* dev, const uint8 *msg, int len, char* txt); /* trace ethernet packet header+crc */ void eth_packet_trace (ETH_DEV* dev, const uint8 *msg, int len, const char* txt); /* trace ethernet packet header+crc */
void eth_packet_trace_ex (ETH_DEV* dev, const uint8 *msg, int len, char* txt, int detail, uint32 reason); /* trace ethernet packet */ void eth_packet_trace_ex (ETH_DEV* dev, const uint8 *msg, int len, const char* txt, int detail, uint32 reason); /* trace ethernet packet */
t_stat eth_show (FILE* st, UNIT* uptr, /* show ethernet devices */ t_stat eth_show (FILE* st, UNIT* uptr, /* show ethernet devices */
int32 val, void* desc); int32 val, void* desc);
t_stat eth_show_devices (FILE* st, DEVICE *dptr, /* show ethernet devices */ t_stat eth_show_devices (FILE* st, DEVICE *dptr, /* show ethernet devices */

View file

@ -213,7 +213,7 @@ for (i=0; i<serial_open_device_count; ++i)
an error message if desired, rather than printing this generic error message. an error message if desired, rather than printing this generic error message.
*/ */
static void sim_error_serial (char *routine, int error) static void sim_error_serial (const char *routine, int error)
{ {
sim_printf ("Serial: %s fails with error %d\n", routine, error); sim_printf ("Serial: %s fails with error %d\n", routine, error);
return; return;
@ -391,7 +391,7 @@ SERHANDLE sim_open_serial (char *name, TMLN *lp, t_stat *stat)
char temp1[1024], devname [1024]; char temp1[1024], devname [1024];
char *savname = name; char *savname = name;
SERHANDLE port = INVALID_HANDLE; SERHANDLE port = INVALID_HANDLE;
char *config; const char *config;
t_stat status; t_stat status;
config = get_glyph_nc (name, devname, ';'); /* separate port name from optional config params */ config = get_glyph_nc (name, devname, ';'); /* separate port name from optional config params */
@ -1282,7 +1282,7 @@ else { /* read succeeded */
remaining = read_count - 1; /* stop search one char from end of string */ remaining = read_count - 1; /* stop search one char from end of string */
while (remaining > 0 && /* still characters to search? */ while (remaining > 0 && /* still characters to search? */
(bptr = memchr (cptr, '\377', remaining))) { /* search for start of PARMRK sequence */ (bptr = (char*)memchr (cptr, '\377', remaining))) {/* search for start of PARMRK sequence */
remaining = remaining - (bptr - cptr) - 1; /* calc characters remaining */ remaining = remaining - (bptr - cptr) - 1; /* calc characters remaining */
if (*(bptr + 1) == '\377') { /* is it a \377 \377 sequence? */ if (*(bptr + 1) == '\377') { /* is it a \377 \377 sequence? */

View file

@ -151,7 +151,7 @@ static struct sock_errors {
}; };
char *sim_get_err_sock (const char *emsg) const char *sim_get_err_sock (const char *emsg)
{ {
int err = WSAGetLastError (); int err = WSAGetLastError ();
int i; int i;

View file

@ -126,7 +126,7 @@ int sim_check_conn (SOCKET sock, int rd);
int sim_read_sock (SOCKET sock, char *buf, int nbytes); int sim_read_sock (SOCKET sock, char *buf, int nbytes);
int sim_write_sock (SOCKET sock, const char *msg, int nbytes); int sim_write_sock (SOCKET sock, const char *msg, int nbytes);
void sim_close_sock (SOCKET sock); void sim_close_sock (SOCKET sock);
char *sim_get_err_sock (const char *emsg); const char *sim_get_err_sock (const char *emsg);
SOCKET sim_err_sock (SOCKET sock, const char *emsg); SOCKET sim_err_sock (SOCKET sock, const char *emsg);
int sim_getnames_sock (SOCKET sock, char **socknamebuf, char **peernamebuf); int sim_getnames_sock (SOCKET sock, char **socknamebuf, char **peernamebuf);
void sim_init_sock (void); void sim_init_sock (void);

View file

@ -97,7 +97,7 @@
#endif #endif
struct sim_tape_fmt { struct sim_tape_fmt {
char *name; /* name */ const char *name; /* name */
int32 uflags; /* unit flags */ int32 uflags; /* unit flags */
t_addr bot; /* bot test */ t_addr bot; /* bot test */
}; };
@ -533,7 +533,7 @@ uptr->io_flush = NULL;
return SCPE_OK; return SCPE_OK;
} }
t_stat sim_tape_attach_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat sim_tape_attach_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
fprintf (st, "%s Tape Attach Help\n\n", dptr->name); fprintf (st, "%s Tape Attach Help\n\n", dptr->name);
if (0 == (uptr-dptr->units)) { if (0 == (uptr-dptr->units)) {

View file

@ -151,7 +151,7 @@ typedef void (*TAPE_PCALLBACK)(UNIT *unit, t_stat status);
t_stat sim_tape_attach_ex (UNIT *uptr, char *cptr, uint32 dbit, int completion_delay); t_stat sim_tape_attach_ex (UNIT *uptr, char *cptr, uint32 dbit, int completion_delay);
t_stat sim_tape_attach (UNIT *uptr, char *cptr); t_stat sim_tape_attach (UNIT *uptr, char *cptr);
t_stat sim_tape_detach (UNIT *uptr); t_stat sim_tape_detach (UNIT *uptr);
t_stat sim_tape_attach_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat sim_tape_attach_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
t_stat sim_tape_rdrecf (UNIT *uptr, uint8 *buf, t_mtrlnt *bc, t_mtrlnt max); t_stat sim_tape_rdrecf (UNIT *uptr, uint8 *buf, t_mtrlnt *bc, t_mtrlnt max);
t_stat sim_tape_rdrecf_a (UNIT *uptr, uint8 *buf, t_mtrlnt *bc, t_mtrlnt max, TAPE_PCALLBACK callback); t_stat sim_tape_rdrecf_a (UNIT *uptr, uint8 *buf, t_mtrlnt *bc, t_mtrlnt max, TAPE_PCALLBACK callback);
t_stat sim_tape_rdrecr (UNIT *uptr, uint8 *buf, t_mtrlnt *bc, t_mtrlnt max); t_stat sim_tape_rdrecr (UNIT *uptr, uint8 *buf, t_mtrlnt *bc, t_mtrlnt max);

View file

@ -3643,7 +3643,7 @@ return sim_clock_coschedule_tmr (uptr, tmr, interval);
/* Generic Multiplexer attach help */ /* Generic Multiplexer attach help */
t_stat tmxr_attach_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr) t_stat tmxr_attach_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
{ {
TMXR *mux = (TMXR *)dptr->help_ctx; TMXR *mux = (TMXR *)dptr->help_ctx;
t_bool single_line = FALSE; /* default to Multi-Line help */ t_bool single_line = FALSE; /* default to Multi-Line help */
@ -4374,7 +4374,7 @@ return SCPE_OK;
static struct { static struct {
u_char value; u_char value;
char *name; const char *name;
} tn_chars[] = } tn_chars[] =
{ {
{TN_IAC, "TN_IAC"}, /* protocol delim */ {TN_IAC, "TN_IAC"}, /* protocol delim */

View file

@ -206,7 +206,7 @@ t_stat tmxr_close_master (TMXR *mp);
t_stat tmxr_connection_poll_interval (TMXR *mp, uint32 seconds); t_stat tmxr_connection_poll_interval (TMXR *mp, uint32 seconds);
t_stat tmxr_attach_ex (TMXR *mp, UNIT *uptr, char *cptr, t_bool async); t_stat tmxr_attach_ex (TMXR *mp, UNIT *uptr, char *cptr, t_bool async);
t_stat tmxr_detach (TMXR *mp, UNIT *uptr); t_stat tmxr_detach (TMXR *mp, UNIT *uptr);
t_stat tmxr_attach_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr); t_stat tmxr_attach_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
char *tmxr_line_attach_string(TMLN *lp); char *tmxr_line_attach_string(TMLN *lp);
t_stat tmxr_set_modem_control_passthru (TMXR *mp); t_stat tmxr_set_modem_control_passthru (TMXR *mp);
t_stat tmxr_clear_modem_control_passthru (TMXR *mp); t_stat tmxr_clear_modem_control_passthru (TMXR *mp);

View file

@ -1183,9 +1183,9 @@ static char *eventtypes[] = {
"" ""
}; };
#else #else
static char *eventtypes[SDL_LASTEVENT]; static const char *eventtypes[SDL_LASTEVENT];
#endif #endif
static char *windoweventtypes[256]; static const char *windoweventtypes[256];
static t_bool initialized = FALSE; static t_bool initialized = FALSE;
if (!initialized) { if (!initialized) {
@ -1604,7 +1604,7 @@ for (i = 0; i < SDL_GetNumRenderDrivers(); ++i) {
} }
else { else {
uint32 j, k; uint32 j, k;
static struct {uint32 format; char *name;} PixelFormats[] = { static struct {uint32 format; const char *name;} PixelFormats[] = {
{SDL_PIXELFORMAT_INDEX1LSB, "Index1LSB"}, {SDL_PIXELFORMAT_INDEX1LSB, "Index1LSB"},
{SDL_PIXELFORMAT_INDEX1MSB, "Index1MSB"}, {SDL_PIXELFORMAT_INDEX1MSB, "Index1MSB"},
{SDL_PIXELFORMAT_INDEX4LSB, "Index4LSB"}, {SDL_PIXELFORMAT_INDEX4LSB, "Index4LSB"},
@ -1677,7 +1677,7 @@ if (vid_active) {
fprintf (st, " Currently Active Renderer: %s\n", info.name); fprintf (st, " Currently Active Renderer: %s\n", info.name);
} }
if (1) { if (1) {
static char *hints[] = { static const char *hints[] = {
#if defined (SDL_HINT_FRAMEBUFFER_ACCELERATION) #if defined (SDL_HINT_FRAMEBUFFER_ACCELERATION)
SDL_HINT_FRAMEBUFFER_ACCELERATION , SDL_HINT_FRAMEBUFFER_ACCELERATION ,
#endif #endif
@ -1889,5 +1889,5 @@ return SCPE_OK;
#endif /* defined(HAVE_LIBSDL) */ #endif /* defined(HAVE_LIBSDL) */
#else /* !defined(USE_SIM_VIDEO) */ #else /* !defined(USE_SIM_VIDEO) */
static char *dummy_declaration = "Something to compile"; static const char *dummy_declaration = "Something to compile";
#endif /* defined(USE_SIM_VIDEO) */ #endif /* defined(USE_SIM_VIDEO) */