KA10: Removed compiler warnings.
This commit is contained in:
parent
4057374c7c
commit
f4d1abd61d
22 changed files with 91 additions and 124 deletions
|
@ -345,7 +345,6 @@ static int auxcpu_interrupt (void)
|
||||||
|
|
||||||
t_stat auxcpu_devio(uint32 dev, uint64 *data)
|
t_stat auxcpu_devio(uint32 dev, uint64 *data)
|
||||||
{
|
{
|
||||||
DEVICE *dptr = &auxcpu_dev;
|
|
||||||
UNIT *uptr = &auxcpu_unit[0];
|
UNIT *uptr = &auxcpu_unit[0];
|
||||||
|
|
||||||
switch(dev & 07) {
|
switch(dev & 07) {
|
||||||
|
|
|
@ -130,7 +130,6 @@ static void dpk_set_ospeed (int port, uint64 data)
|
||||||
static t_stat dpk_devio(uint32 dev, uint64 *data)
|
static t_stat dpk_devio(uint32 dev, uint64 *data)
|
||||||
{
|
{
|
||||||
static int scan = 0;
|
static int scan = 0;
|
||||||
DEVICE *dptr = &dpk_dev;
|
|
||||||
int port;
|
int port;
|
||||||
|
|
||||||
switch(dev & 07) {
|
switch(dev & 07) {
|
||||||
|
|
|
@ -171,8 +171,6 @@ t_stat imx_reset (DEVICE *dptr)
|
||||||
|
|
||||||
t_stat imx_devio(uint32 dev, uint64 *data)
|
t_stat imx_devio(uint32 dev, uint64 *data)
|
||||||
{
|
{
|
||||||
DEVICE *dptr = &imx_dev;
|
|
||||||
|
|
||||||
switch(dev & 07) {
|
switch(dev & 07) {
|
||||||
case CONO|4:
|
case CONO|4:
|
||||||
sim_debug(DEBUG_CONO, &imx_dev, "%06llo\n", *data);
|
sim_debug(DEBUG_CONO, &imx_dev, "%06llo\n", *data);
|
||||||
|
@ -209,12 +207,12 @@ t_stat imx_devio(uint32 dev, uint64 *data)
|
||||||
|
|
||||||
t_stat imx_svc (UNIT *uptr)
|
t_stat imx_svc (UNIT *uptr)
|
||||||
{
|
{
|
||||||
int max_samples;
|
uint64 max_samples;
|
||||||
|
|
||||||
if (status & IMX_PACK) {
|
if (status & IMX_PACK) {
|
||||||
max_samples = 3;
|
max_samples = 3LL;
|
||||||
} else {
|
} else {
|
||||||
max_samples = 1;
|
max_samples = 1LL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (imx_samples < max_samples) {
|
if (imx_samples < max_samples) {
|
||||||
|
|
|
@ -100,8 +100,6 @@ DEVICE mty_dev = {
|
||||||
|
|
||||||
static t_stat mty_devio(uint32 dev, uint64 *data)
|
static t_stat mty_devio(uint32 dev, uint64 *data)
|
||||||
{
|
{
|
||||||
DEVICE *dptr = &mty_dev;
|
|
||||||
TMLN *lp;
|
|
||||||
int line;
|
int line;
|
||||||
uint64 word;
|
uint64 word;
|
||||||
|
|
||||||
|
@ -134,7 +132,6 @@ static t_stat mty_devio(uint32 dev, uint64 *data)
|
||||||
word = *data;
|
word = *data;
|
||||||
sim_debug(DEBUG_DATAIO, &mty_dev, "DATAO line %d -> %012llo\n",
|
sim_debug(DEBUG_DATAIO, &mty_dev, "DATAO line %d -> %012llo\n",
|
||||||
line, word);
|
line, word);
|
||||||
lp = &mty_ldsc[line];
|
|
||||||
mty_output_word[line] = word | MTY_FIRST;
|
mty_output_word[line] = word | MTY_FIRST;
|
||||||
mty_active_bitmask |= 1 << line;
|
mty_active_bitmask |= 1 << line;
|
||||||
sim_activate_abs (&mty_unit[1], 0);
|
sim_activate_abs (&mty_unit[1], 0);
|
||||||
|
@ -142,7 +139,6 @@ static t_stat mty_devio(uint32 dev, uint64 *data)
|
||||||
break;
|
break;
|
||||||
case DATAI:
|
case DATAI:
|
||||||
line = (status & MTY_LINE) >> 12;
|
line = (status & MTY_LINE) >> 12;
|
||||||
lp = &mty_ldsc[line];
|
|
||||||
*data = mty_input_character;
|
*data = mty_input_character;
|
||||||
sim_debug(DEBUG_DATAIO, &mty_dev, "DATAI line %d -> %012llo\n",
|
sim_debug(DEBUG_DATAIO, &mty_dev, "DATAI line %d -> %012llo\n",
|
||||||
line, *data);
|
line, *data);
|
||||||
|
|
|
@ -70,7 +70,6 @@ DEVICE pclk_dev = {
|
||||||
*/
|
*/
|
||||||
t_stat pclk_devio(uint32 dev, uint64 *data)
|
t_stat pclk_devio(uint32 dev, uint64 *data)
|
||||||
{
|
{
|
||||||
DEVICE *dptr = &pclk_dev;
|
|
||||||
time_t t=time(NULL);
|
time_t t=time(NULL);
|
||||||
struct tm *dt;
|
struct tm *dt;
|
||||||
uint64 hour=12, minute=1, seconds=2, milliseconds=3;
|
uint64 hour=12, minute=1, seconds=2, milliseconds=3;
|
||||||
|
|
|
@ -311,7 +311,7 @@ struct disk_t
|
||||||
{
|
{
|
||||||
const char *name; /* Type Name */
|
const char *name; /* Type Name */
|
||||||
int cyl; /* Number of cylinders */
|
int cyl; /* Number of cylinders */
|
||||||
int heads; /* Number of heads/cylinder */
|
uint32 heads; /* Number of heads/cylinder */
|
||||||
int bpt; /* Max bytes per track */
|
int bpt; /* Max bytes per track */
|
||||||
uint8 sen_cnt; /* Number of sense bytes */
|
uint8 sen_cnt; /* Number of sense bytes */
|
||||||
uint8 dev_type; /* Device type code */
|
uint8 dev_type; /* Device type code */
|
||||||
|
@ -335,7 +335,7 @@ disk_type[] =
|
||||||
struct pmp_header
|
struct pmp_header
|
||||||
{
|
{
|
||||||
uint8 devid[8]; /* device header. */
|
uint8 devid[8]; /* device header. */
|
||||||
int heads; /* number of heads per cylinder */
|
uint32 heads; /* number of heads per cylinder */
|
||||||
uint32 tracksize; /* size of track */
|
uint32 tracksize; /* size of track */
|
||||||
uint8 devtype; /* Hex code of last two digits of device type. */
|
uint8 devtype; /* Hex code of last two digits of device type. */
|
||||||
uint8 fileseq; /* always 0. */
|
uint8 fileseq; /* always 0. */
|
||||||
|
@ -968,7 +968,6 @@ pmp_startcmd() {
|
||||||
void
|
void
|
||||||
pmp_adjpos(UNIT * uptr)
|
pmp_adjpos(UNIT * uptr)
|
||||||
{
|
{
|
||||||
uint16 addr = GET_UADDR(uptr->flags);
|
|
||||||
struct pmp_t *data = (struct pmp_t *)(uptr->DATAPTR);
|
struct pmp_t *data = (struct pmp_t *)(uptr->DATAPTR);
|
||||||
uint8 *rec;
|
uint8 *rec;
|
||||||
int pos;
|
int pos;
|
||||||
|
@ -1097,7 +1096,7 @@ t_stat pmp_srv(UNIT * uptr)
|
||||||
goto index;
|
goto index;
|
||||||
}
|
}
|
||||||
uptr->POS ++;
|
uptr->POS ++;
|
||||||
if ((uptr->POS & 0xff) >= disk_type[type].heads) {
|
if ((uint32)(uptr->POS & 0xff) >= disk_type[type].heads) {
|
||||||
sim_debug(DEBUG_DETAIL, dptr, "end cyl unit=%d %02x %d\n",
|
sim_debug(DEBUG_DETAIL, dptr, "end cyl unit=%d %02x %d\n",
|
||||||
unit, state, data->tpos);
|
unit, state, data->tpos);
|
||||||
uptr->SENSE = (SNS_ENDCYL << 8);
|
uptr->SENSE = (SNS_ENDCYL << 8);
|
||||||
|
@ -2138,13 +2137,12 @@ int
|
||||||
pmp_format(UNIT * uptr, int flag) {
|
pmp_format(UNIT * uptr, int flag) {
|
||||||
struct pmp_header hdr;
|
struct pmp_header hdr;
|
||||||
struct pmp_t *data;
|
struct pmp_t *data;
|
||||||
uint16 addr = GET_UADDR(uptr->flags);
|
|
||||||
int type = GET_TYPE(uptr->flags);
|
int type = GET_TYPE(uptr->flags);
|
||||||
int tsize;
|
int tsize;
|
||||||
int cyl;
|
int cyl;
|
||||||
int sector;
|
int sector;
|
||||||
int rec;
|
int rec;
|
||||||
int hd;
|
uint32 hd;
|
||||||
uint32 pos;
|
uint32 pos;
|
||||||
|
|
||||||
if (flag || get_yn("Initialize dasd? [Y] ", TRUE)) {
|
if (flag || get_yn("Initialize dasd? [Y] ", TRUE)) {
|
||||||
|
@ -2227,10 +2225,10 @@ pmp_attach(UNIT * uptr, CONST char *file)
|
||||||
uint16 addr = GET_UADDR(uptr->flags);
|
uint16 addr = GET_UADDR(uptr->flags);
|
||||||
int flag = (sim_switches & SWMASK ('I')) != 0;
|
int flag = (sim_switches & SWMASK ('I')) != 0;
|
||||||
t_stat r;
|
t_stat r;
|
||||||
int i;
|
unsigned int i;
|
||||||
struct pmp_header hdr;
|
struct pmp_header hdr;
|
||||||
struct pmp_t *data;
|
struct pmp_t *data;
|
||||||
int tsize;
|
uint32 tsize;
|
||||||
|
|
||||||
if ((r = attach_unit(uptr, file)) != SCPE_OK)
|
if ((r = attach_unit(uptr, file)) != SCPE_OK)
|
||||||
return r;
|
return r;
|
||||||
|
@ -2248,7 +2246,7 @@ pmp_attach(UNIT * uptr, CONST char *file)
|
||||||
sim_messagef(SCPE_OK, "Drive %03x=%d %d %02x %d\n\r", addr,
|
sim_messagef(SCPE_OK, "Drive %03x=%d %d %02x %d\n\r", addr,
|
||||||
hdr.heads, hdr.tracksize, hdr.devtype, hdr.highcyl);
|
hdr.heads, hdr.tracksize, hdr.devtype, hdr.highcyl);
|
||||||
for (i = 0; disk_type[i].name != 0; i++) {
|
for (i = 0; disk_type[i].name != 0; i++) {
|
||||||
tsize = (disk_type[i].bpt | 0x1ff) + 1;
|
tsize = (uint32)((disk_type[i].bpt | 0x1ff) + 1);
|
||||||
if (hdr.devtype == disk_type[i].dev_type && hdr.tracksize == tsize &&
|
if (hdr.devtype == disk_type[i].dev_type && hdr.tracksize == tsize &&
|
||||||
hdr.heads == disk_type[i].heads && hdr.highcyl == disk_type[i].cyl) {
|
hdr.heads == disk_type[i].heads && hdr.highcyl == disk_type[i].cyl) {
|
||||||
if (GET_TYPE(uptr->flags) != i) {
|
if (GET_TYPE(uptr->flags) != i) {
|
||||||
|
@ -2295,7 +2293,6 @@ pmp_detach(UNIT * uptr)
|
||||||
{
|
{
|
||||||
struct pmp_t *data = (struct pmp_t *)uptr->DATAPTR;
|
struct pmp_t *data = (struct pmp_t *)uptr->DATAPTR;
|
||||||
int type = GET_TYPE(uptr->flags);
|
int type = GET_TYPE(uptr->flags);
|
||||||
uint16 addr = GET_UADDR(uptr->flags);
|
|
||||||
int cmd = uptr->CMD & 0x7f;
|
int cmd = uptr->CMD & 0x7f;
|
||||||
|
|
||||||
if (uptr->CMD & DK_CYL_DIRTY) {
|
if (uptr->CMD & DK_CYL_DIRTY) {
|
||||||
|
@ -2403,7 +2400,6 @@ pmp_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag,
|
||||||
fprintf (st, ".\nEach drive has the following storage capacity:\n\n");
|
fprintf (st, ".\nEach drive has the following storage capacity:\n\n");
|
||||||
for (i = 0; disk_type[i].name != 0; i++) {
|
for (i = 0; disk_type[i].name != 0; i++) {
|
||||||
int32 size = disk_type[i].bpt * disk_type[i].heads * disk_type[i].cyl;
|
int32 size = disk_type[i].bpt * disk_type[i].heads * disk_type[i].cyl;
|
||||||
char sm = 'K';
|
|
||||||
size /= 1024;
|
size /= 1024;
|
||||||
size = (10 * size) / 1024;
|
size = (10 * size) / 1024;
|
||||||
fprintf(st, " %-8s %4d.%1dMB\n", disk_type[i].name, size/10, size%10);
|
fprintf(st, " %-8s %4d.%1dMB\n", disk_type[i].name, size/10, size%10);
|
||||||
|
|
|
@ -359,8 +359,6 @@ static t_stat stk_svc (UNIT *uptr)
|
||||||
|
|
||||||
t_stat stk_devio(uint32 dev, uint64 *data)
|
t_stat stk_devio(uint32 dev, uint64 *data)
|
||||||
{
|
{
|
||||||
DEVICE *dptr = &stk_dev;
|
|
||||||
|
|
||||||
switch(dev & 07) {
|
switch(dev & 07) {
|
||||||
case CONO:
|
case CONO:
|
||||||
status &= ~STK_PIA;
|
status &= ~STK_PIA;
|
||||||
|
|
|
@ -98,7 +98,6 @@ DEVICE tk10_dev = {
|
||||||
|
|
||||||
static t_stat tk10_devio(uint32 dev, uint64 *data)
|
static t_stat tk10_devio(uint32 dev, uint64 *data)
|
||||||
{
|
{
|
||||||
DEVICE *dptr = &tk10_dev;
|
|
||||||
TMLN *lp;
|
TMLN *lp;
|
||||||
int port;
|
int port;
|
||||||
int ch;
|
int ch;
|
||||||
|
|
|
@ -835,7 +835,7 @@ void dte_its(UNIT *uptr) {
|
||||||
if (word == 0)
|
if (word == 0)
|
||||||
cty_done++;
|
cty_done++;
|
||||||
#if (NUM_DEVS_TTY > 0)
|
#if (NUM_DEVS_TTY > 0)
|
||||||
else if (word > 0 && word < tty_desc.lines) {
|
else if (word > 0 && word < (uint64)tty_desc.lines) {
|
||||||
tty_done[word-1] = 1;
|
tty_done[word-1] = 1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -1793,15 +1793,6 @@ t_stat dtei_svc (UNIT *uptr)
|
||||||
/* Handle output of characters to CTY. Started whenever there is output pending */
|
/* Handle output of characters to CTY. Started whenever there is output pending */
|
||||||
t_stat dteo_svc (UNIT *uptr)
|
t_stat dteo_svc (UNIT *uptr)
|
||||||
{
|
{
|
||||||
uint32 base = 0;
|
|
||||||
UNIT *optr = &dte_unit[0];
|
|
||||||
|
|
||||||
#if KI_22BIT
|
|
||||||
#if KL_ITS
|
|
||||||
if (!QITS)
|
|
||||||
#endif
|
|
||||||
base = eb_ptr;
|
|
||||||
#endif
|
|
||||||
/* Flush out any pending CTY output */
|
/* Flush out any pending CTY output */
|
||||||
while(not_empty(&cty_out)) {
|
while(not_empty(&cty_out)) {
|
||||||
char ch = cty_out.buff[cty_out.out_ptr];
|
char ch = cty_out.buff[cty_out.out_ptr];
|
||||||
|
@ -1972,7 +1963,7 @@ const char *dte_description (DEVICE *dptr)
|
||||||
void
|
void
|
||||||
lp20_printline(UNIT *uptr, int nl) {
|
lp20_printline(UNIT *uptr, int nl) {
|
||||||
int trim = 0;
|
int trim = 0;
|
||||||
uint16 data1 = 1;
|
|
||||||
/* Trim off trailing blanks */
|
/* Trim off trailing blanks */
|
||||||
while (uptr->COL >= 0 && lp20_buffer[uptr->COL - 1] == ' ') {
|
while (uptr->COL >= 0 && lp20_buffer[uptr->COL - 1] == ' ') {
|
||||||
uptr->COL--;
|
uptr->COL--;
|
||||||
|
@ -2027,7 +2018,6 @@ t_stat lp20_svc (UNIT *uptr)
|
||||||
char ch;
|
char ch;
|
||||||
uint16 ram_ch;
|
uint16 ram_ch;
|
||||||
uint16 data1[5];
|
uint16 data1[5];
|
||||||
int l = uptr->LINE;
|
|
||||||
|
|
||||||
if ((uptr->flags & UNIT_ATT) == 0)
|
if ((uptr->flags & UNIT_ATT) == 0)
|
||||||
return SCPE_OK;
|
return SCPE_OK;
|
||||||
|
@ -2055,7 +2045,7 @@ t_stat lp20_svc (UNIT *uptr)
|
||||||
while (not_empty(&lp20_queue)) {
|
while (not_empty(&lp20_queue)) {
|
||||||
ch = lp20_queue.buff[lp20_queue.out_ptr];
|
ch = lp20_queue.buff[lp20_queue.out_ptr];
|
||||||
inco(&lp20_queue);
|
inco(&lp20_queue);
|
||||||
ram_ch = lp20_ram[ch];
|
ram_ch = lp20_ram[(int)ch];
|
||||||
|
|
||||||
/* If previous was delimiter or translation do it */
|
/* If previous was delimiter or translation do it */
|
||||||
if (uptr->LPST & DELFLG || (ram_ch &(LP20_RAM_DEL|LP20_RAM_TRN)) != 0) {
|
if (uptr->LPST & DELFLG || (ram_ch &(LP20_RAM_DEL|LP20_RAM_TRN)) != 0) {
|
||||||
|
@ -2283,7 +2273,6 @@ t_stat ttyo_svc (UNIT *uptr)
|
||||||
{
|
{
|
||||||
t_stat r;
|
t_stat r;
|
||||||
int32 ln;
|
int32 ln;
|
||||||
int n = 0;
|
|
||||||
TMLN *lp;
|
TMLN *lp;
|
||||||
|
|
||||||
if ((tty_unit[0].flags & UNIT_ATT) == 0) /* attached? */
|
if ((tty_unit[0].flags & UNIT_ATT) == 0) /* attached? */
|
||||||
|
|
|
@ -713,9 +713,12 @@ uint8 *nia_cpy_from(t_addr addr, uint8 *data, int len)
|
||||||
case 1:
|
case 1:
|
||||||
word = (uint64)(*data++) << 28;
|
word = (uint64)(*data++) << 28;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
word = 0;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
M[addr++] = word;
|
||||||
}
|
}
|
||||||
M[addr++] = word;
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1200,7 +1203,6 @@ int nia_send_pkt(uint64 cmd)
|
||||||
*/
|
*/
|
||||||
t_stat nia_cmd_srv(UNIT * uptr)
|
t_stat nia_cmd_srv(UNIT * uptr)
|
||||||
{
|
{
|
||||||
t_addr free_q = nia_data.unk_hdr;
|
|
||||||
uint64 word1, word2;
|
uint64 word1, word2;
|
||||||
uint32 cmd;
|
uint32 cmd;
|
||||||
int len, i;
|
int len, i;
|
||||||
|
|
120
PDP10/kx10_cpu.c
120
PDP10/kx10_cpu.c
|
@ -1275,8 +1275,6 @@ t_stat null_dev(uint32 dev, uint64 *data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#if KL
|
#if KL
|
||||||
static int timer_irq, timer_flg;
|
|
||||||
|
|
||||||
void
|
void
|
||||||
update_times(int tim)
|
update_times(int tim)
|
||||||
{
|
{
|
||||||
|
@ -2303,7 +2301,6 @@ pg_loop:
|
||||||
*/
|
*/
|
||||||
int page_lookup(t_addr addr, int flag, t_addr *loc, int wr, int cur_context, int fetch) {
|
int page_lookup(t_addr addr, int flag, t_addr *loc, int wr, int cur_context, int fetch) {
|
||||||
int data;
|
int data;
|
||||||
int base = 0;
|
|
||||||
int page = (RMASK & addr) >> 9;
|
int page = (RMASK & addr) >> 9;
|
||||||
int uf = (FLAGS & USER) != 0;
|
int uf = (FLAGS & USER) != 0;
|
||||||
int pub = (FLAGS & PUBLIC) != 0;
|
int pub = (FLAGS & PUBLIC) != 0;
|
||||||
|
@ -2524,7 +2521,7 @@ int Mem_read(int flag, int cur_context, int fetch) {
|
||||||
} else {
|
} else {
|
||||||
if (!page_lookup(AB, flag, &addr, 0, cur_context, fetch))
|
if (!page_lookup(AB, flag, &addr, 0, cur_context, fetch))
|
||||||
return 1;
|
return 1;
|
||||||
if (addr >= (int)MEMSIZE) {
|
if (addr >= MEMSIZE) {
|
||||||
irq_flags |= 02000;
|
irq_flags |= 02000;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -2562,7 +2559,7 @@ int Mem_write(int flag, int cur_context) {
|
||||||
} else {
|
} else {
|
||||||
if (!page_lookup(AB, flag, &addr, 1, cur_context, 0))
|
if (!page_lookup(AB, flag, &addr, 1, cur_context, 0))
|
||||||
return 1;
|
return 1;
|
||||||
if (addr >= (int)MEMSIZE) {
|
if (addr >= MEMSIZE) {
|
||||||
irq_flags |= 02000;
|
irq_flags |= 02000;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -2617,11 +2614,10 @@ int exec_page_lookup(t_addr addr, int wr, t_addr *loc)
|
||||||
|
|
||||||
int Mem_examine_word(int n, int wrd, uint64 *data) {
|
int Mem_examine_word(int n, int wrd, uint64 *data) {
|
||||||
t_addr addr = 0144 + (8 * n) + eb_ptr;
|
t_addr addr = 0144 + (8 * n) + eb_ptr;
|
||||||
int base = 0;
|
|
||||||
|
|
||||||
if (addr >= MEMSIZE)
|
if (addr >= MEMSIZE)
|
||||||
return 1;
|
return 1;
|
||||||
if (M[addr] == 0 || wrd > M[addr])
|
if (M[addr] == 0 || (uint64)wrd > M[addr])
|
||||||
return 1;
|
return 1;
|
||||||
addr = (M[addr+1] + wrd) & RMASK;
|
addr = (M[addr+1] + wrd) & RMASK;
|
||||||
if (exec_page_lookup(addr, 0, &addr))
|
if (exec_page_lookup(addr, 0, &addr))
|
||||||
|
@ -2632,11 +2628,10 @@ int Mem_examine_word(int n, int wrd, uint64 *data) {
|
||||||
|
|
||||||
int Mem_deposit_word(int n, int wrd, uint64 *data) {
|
int Mem_deposit_word(int n, int wrd, uint64 *data) {
|
||||||
t_addr addr = 0146 + (8 * n) + eb_ptr;
|
t_addr addr = 0146 + (8 * n) + eb_ptr;
|
||||||
int base = 0;
|
|
||||||
|
|
||||||
if (addr >= MEMSIZE)
|
if (addr >= MEMSIZE)
|
||||||
return 1;
|
return 1;
|
||||||
if (M[addr] == 0 || wrd > M[addr])
|
if (M[addr] == 0 || (uint64)wrd > M[addr])
|
||||||
return 1;
|
return 1;
|
||||||
addr = (M[addr+1] + wrd) & RMASK;
|
addr = (M[addr+1] + wrd) & RMASK;
|
||||||
if (exec_page_lookup(addr, 1, &addr))
|
if (exec_page_lookup(addr, 1, &addr))
|
||||||
|
@ -2802,7 +2797,6 @@ load_tlb(int uf, int page)
|
||||||
*/
|
*/
|
||||||
int page_lookup(t_addr addr, int flag, t_addr *loc, int wr, int cur_context, int fetch) {
|
int page_lookup(t_addr addr, int flag, t_addr *loc, int wr, int cur_context, int fetch) {
|
||||||
int data;
|
int data;
|
||||||
int base = 0;
|
|
||||||
int page = (RMASK & addr) >> 9;
|
int page = (RMASK & addr) >> 9;
|
||||||
int uf = (FLAGS & USER) != 0;
|
int uf = (FLAGS & USER) != 0;
|
||||||
int pub = (FLAGS & PUBLIC) != 0;
|
int pub = (FLAGS & PUBLIC) != 0;
|
||||||
|
@ -2928,7 +2922,7 @@ int Mem_read(int flag, int cur_context, int fetch) {
|
||||||
read:
|
read:
|
||||||
if (!page_lookup(AB, flag, &addr, 0, cur_context, fetch))
|
if (!page_lookup(AB, flag, &addr, 0, cur_context, fetch))
|
||||||
return 1;
|
return 1;
|
||||||
if (addr >= (int)MEMSIZE) {
|
if (addr >= MEMSIZE) {
|
||||||
nxm_flag = 1;
|
nxm_flag = 1;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -2967,7 +2961,7 @@ int Mem_write(int flag, int cur_context) {
|
||||||
write:
|
write:
|
||||||
if (!page_lookup(AB, flag, &addr, 1, cur_context, 0))
|
if (!page_lookup(AB, flag, &addr, 1, cur_context, 0))
|
||||||
return 1;
|
return 1;
|
||||||
if (addr >= (int)MEMSIZE) {
|
if (addr >= MEMSIZE) {
|
||||||
nxm_flag = 1;
|
nxm_flag = 1;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -2993,12 +2987,12 @@ write:
|
||||||
int its_load_tlb(uint32 reg, int page, uint32 *tlb) {
|
int its_load_tlb(uint32 reg, int page, uint32 *tlb) {
|
||||||
uint64 data;
|
uint64 data;
|
||||||
int len = (reg >> 19) & 0177;
|
int len = (reg >> 19) & 0177;
|
||||||
int entry = (reg & 01777777) + ((page & 0377) >> 1);
|
unsigned int entry = (reg & 01777777) + ((page & 0377) >> 1);
|
||||||
if ((page >> 1) > len) {
|
if ((page >> 1) > len) {
|
||||||
fault_data |= 0200;
|
fault_data |= 0200;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (entry >= (int)MEMSIZE) {
|
if (entry >= MEMSIZE) {
|
||||||
nxm_flag = 1;
|
nxm_flag = 1;
|
||||||
fault_data |= 0400;
|
fault_data |= 0400;
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -3027,7 +3021,6 @@ int its_load_tlb(uint32 reg, int page, uint32 *tlb) {
|
||||||
|
|
||||||
int page_lookup_its(t_addr addr, int flag, t_addr *loc, int wr, int cur_context, int fetch) {
|
int page_lookup_its(t_addr addr, int flag, t_addr *loc, int wr, int cur_context, int fetch) {
|
||||||
uint64 data;
|
uint64 data;
|
||||||
int base = 0;
|
|
||||||
int page = (RMASK & addr) >> 10;
|
int page = (RMASK & addr) >> 10;
|
||||||
int acc;
|
int acc;
|
||||||
int uf = (FLAGS & USER) != 0;
|
int uf = (FLAGS & USER) != 0;
|
||||||
|
@ -3185,7 +3178,7 @@ int Mem_read_its(int flag, int cur_context, int fetch) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (addr >= (int)MEMSIZE) {
|
if (addr >= MEMSIZE) {
|
||||||
nxm_flag = 1;
|
nxm_flag = 1;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -3231,7 +3224,7 @@ int Mem_write_its(int flag, int cur_context) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (addr >= (int)MEMSIZE) {
|
if (addr >= MEMSIZE) {
|
||||||
nxm_flag = 1;
|
nxm_flag = 1;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -3281,7 +3274,6 @@ int page_lookup_bbn(t_addr addr, int flag, t_addr *loc, int wr, int cur_context,
|
||||||
uint32 tlb_data;
|
uint32 tlb_data;
|
||||||
uint64 traps;
|
uint64 traps;
|
||||||
int base = 0;
|
int base = 0;
|
||||||
int trap = 0;
|
|
||||||
int lvl = 0;
|
int lvl = 0;
|
||||||
int page = (RMASK & addr) >> 9;
|
int page = (RMASK & addr) >> 9;
|
||||||
int uf = (FLAGS & USER) != 0;
|
int uf = (FLAGS & USER) != 0;
|
||||||
|
@ -3520,7 +3512,7 @@ int Mem_read_bbn(int flag, int cur_context, int fetch) {
|
||||||
MB = get_reg(AB);
|
MB = get_reg(AB);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (addr >= (int)MEMSIZE) {
|
if (addr >= MEMSIZE) {
|
||||||
nxm_flag = 1;
|
nxm_flag = 1;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -3550,7 +3542,7 @@ int Mem_write_bbn(int flag, int cur_context) {
|
||||||
set_reg(AB, MB);
|
set_reg(AB, MB);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (addr >= (int)MEMSIZE) {
|
if (addr >= MEMSIZE) {
|
||||||
nxm_flag = 1;
|
nxm_flag = 1;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -3609,7 +3601,7 @@ int Mem_read_waits(int flag, int cur_context, int fetch) {
|
||||||
}
|
}
|
||||||
if (!page_lookup_waits(AB, flag, &addr, 0, cur_context, fetch))
|
if (!page_lookup_waits(AB, flag, &addr, 0, cur_context, fetch))
|
||||||
return 1;
|
return 1;
|
||||||
if (addr >= (int)MEMSIZE) {
|
if (addr >= MEMSIZE) {
|
||||||
nxm_flag = 1;
|
nxm_flag = 1;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -3636,7 +3628,7 @@ int Mem_write_waits(int flag, int cur_context) {
|
||||||
}
|
}
|
||||||
if (!page_lookup_waits(AB, flag, &addr, 1, cur_context, 0))
|
if (!page_lookup_waits(AB, flag, &addr, 1, cur_context, 0))
|
||||||
return 1;
|
return 1;
|
||||||
if (addr >= (int)MEMSIZE) {
|
if (addr >= MEMSIZE) {
|
||||||
nxm_flag = 1;
|
nxm_flag = 1;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -3677,7 +3669,7 @@ int Mem_read_ka(int flag, int cur_context, int fetch) {
|
||||||
} else {
|
} else {
|
||||||
if (!page_lookup_ka(AB, flag, &addr, 0, cur_context, fetch))
|
if (!page_lookup_ka(AB, flag, &addr, 0, cur_context, fetch))
|
||||||
return 1;
|
return 1;
|
||||||
if (addr >= (int)MEMSIZE) {
|
if (addr >= MEMSIZE) {
|
||||||
nxm_flag = 1;
|
nxm_flag = 1;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -3703,7 +3695,7 @@ int Mem_write_ka(int flag, int cur_context) {
|
||||||
} else {
|
} else {
|
||||||
if (!page_lookup_ka(AB, flag, &addr, 1, cur_context, 0))
|
if (!page_lookup_ka(AB, flag, &addr, 1, cur_context, 0))
|
||||||
return 1;
|
return 1;
|
||||||
if (addr >= (int)MEMSIZE) {
|
if (addr >= MEMSIZE) {
|
||||||
nxm_flag = 1;
|
nxm_flag = 1;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -3842,7 +3834,7 @@ int Mem_read(int flag, int cur_context, int fetch) {
|
||||||
} else {
|
} else {
|
||||||
if (!page_lookup(AB, flag, &addr, 0, cur_context, fetch))
|
if (!page_lookup(AB, flag, &addr, 0, cur_context, fetch))
|
||||||
return 1;
|
return 1;
|
||||||
if (addr >= (int)MEMSIZE) {
|
if (addr >= MEMSIZE) {
|
||||||
nxm_flag = 1;
|
nxm_flag = 1;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -3868,7 +3860,7 @@ int Mem_write(int flag, int cur_context) {
|
||||||
} else {
|
} else {
|
||||||
if (!page_lookup(AB, flag, &addr, 1, cur_context, 0))
|
if (!page_lookup(AB, flag, &addr, 1, cur_context, 0))
|
||||||
return 1;
|
return 1;
|
||||||
if (addr >= (int)MEMSIZE) {
|
if (addr >= MEMSIZE) {
|
||||||
nxm_flag = 1;
|
nxm_flag = 1;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -3889,7 +3881,7 @@ int Mem_read_nopage() {
|
||||||
if (AB < 020) {
|
if (AB < 020) {
|
||||||
MB = get_reg(AB);
|
MB = get_reg(AB);
|
||||||
} else {
|
} else {
|
||||||
if (AB >= (int)MEMSIZE) {
|
if (AB >= MEMSIZE) {
|
||||||
#if KL
|
#if KL
|
||||||
irq_flags |= 02000;
|
irq_flags |= 02000;
|
||||||
#else
|
#else
|
||||||
|
@ -3912,7 +3904,7 @@ int Mem_write_nopage() {
|
||||||
if (AB < 020) {
|
if (AB < 020) {
|
||||||
set_reg(AB, MB);
|
set_reg(AB, MB);
|
||||||
} else {
|
} else {
|
||||||
if (AB >= (int)MEMSIZE) {
|
if (AB >= MEMSIZE) {
|
||||||
#if KL
|
#if KL
|
||||||
irq_flags |= 02000;
|
irq_flags |= 02000;
|
||||||
#else
|
#else
|
||||||
|
@ -5385,6 +5377,7 @@ dpnorm:
|
||||||
MQ = CCM(MB) + 1; /* Low */
|
MQ = CCM(MB) + 1; /* Low */
|
||||||
/* High */
|
/* High */
|
||||||
#if KL
|
#if KL
|
||||||
|
flag1 = flag3 = 0;
|
||||||
if ((CCM(AR) + ((MQ & SMASK) != 0)) & SMASK) {
|
if ((CCM(AR) + ((MQ & SMASK) != 0)) & SMASK) {
|
||||||
FLAGS |= CRY1;
|
FLAGS |= CRY1;
|
||||||
flag1 = 1;
|
flag1 = 1;
|
||||||
|
@ -5458,6 +5451,7 @@ dpnorm:
|
||||||
MQ = CCM(MQ) + 1;
|
MQ = CCM(MQ) + 1;
|
||||||
if (MQ & SMASK) {
|
if (MQ & SMASK) {
|
||||||
#if KL
|
#if KL
|
||||||
|
flag1 = flag3 = 0;
|
||||||
if ((CCM(get_reg(AC)) + 1) & SMASK) {
|
if ((CCM(get_reg(AC)) + 1) & SMASK) {
|
||||||
FLAGS |= CRY1;
|
FLAGS |= CRY1;
|
||||||
flag1 = 1;
|
flag1 = 1;
|
||||||
|
@ -6464,7 +6458,7 @@ fnormx:
|
||||||
SC--;
|
SC--;
|
||||||
}
|
}
|
||||||
AR &= FMASK;
|
AR &= FMASK;
|
||||||
if ((SC & 01600) != 1600)
|
if ((SC & 01600) != 01600)
|
||||||
fxu_hold_set = 1;
|
fxu_hold_set = 1;
|
||||||
if (AR == (SMASK|EXPO)) {
|
if (AR == (SMASK|EXPO)) {
|
||||||
AR = (AR >> 1) | (AR & SMASK);
|
AR = (AR >> 1) | (AR & SMASK);
|
||||||
|
@ -6833,7 +6827,7 @@ left:
|
||||||
AR = (AR << 1) + (MQ >> 35);
|
AR = (AR << 1) + (MQ >> 35);
|
||||||
MQ &= CMASK; /* low order only has 35 bits */
|
MQ &= CMASK; /* low order only has 35 bits */
|
||||||
if ((IR & 4) == 0) { /* IMUL */
|
if ((IR & 4) == 0) { /* IMUL */
|
||||||
if (AR > flag3 && !pi_cycle) {
|
if (AR > (uint64)flag3 && !pi_cycle) {
|
||||||
FLAGS |= OVR|TRP1;
|
FLAGS |= OVR|TRP1;
|
||||||
check_apr_irq();
|
check_apr_irq();
|
||||||
}
|
}
|
||||||
|
@ -8994,7 +8988,7 @@ do_byte_setup(int n, int wr, int *pos, int *sz)
|
||||||
if (MB & SMASK) { /* Instruction format IFIW */
|
if (MB & SMASK) { /* Instruction format IFIW */
|
||||||
if (MB & BIT1) { /* Illegal index word */
|
if (MB & BIT1) { /* Illegal index word */
|
||||||
fault_data = 024LL << 30 | (((FLAGS & USER) != 0)?SMASK:0) |
|
fault_data = 024LL << 30 | (((FLAGS & USER) != 0)?SMASK:0) |
|
||||||
(temp & RMASK) | ((uint64)sect << 18);
|
AB | ((uint64)sect << 18);
|
||||||
page_fault = 1;
|
page_fault = 1;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -9020,6 +9014,7 @@ do_byte_setup(int n, int wr, int *pos, int *sz)
|
||||||
ind = (MB & BIT1) != 0;
|
ind = (MB & BIT1) != 0;
|
||||||
ix = (MB >> 30) & 017;
|
ix = (MB >> 30) & 017;
|
||||||
AB = MB & (SECTM|RMASK);
|
AB = MB & (SECTM|RMASK);
|
||||||
|
temp = MB;
|
||||||
if (ix) {
|
if (ix) {
|
||||||
temp = get_reg(ix);
|
temp = get_reg(ix);
|
||||||
if ((temp & SMASK) != 0 || (temp & SECTM) == 0) { /* Local index word */
|
if ((temp & SMASK) != 0 || (temp & SECTM) == 0) { /* Local index word */
|
||||||
|
@ -9028,8 +9023,7 @@ do_byte_setup(int n, int wr, int *pos, int *sz)
|
||||||
temp = temp + AB;
|
temp = temp + AB;
|
||||||
temp &= FMASK;
|
temp &= FMASK;
|
||||||
MB = temp;
|
MB = temp;
|
||||||
} else
|
}
|
||||||
temp = MB;
|
|
||||||
sect = cur_sect = (temp >> 18) & 07777;
|
sect = cur_sect = (temp >> 18) & 07777;
|
||||||
AB = temp & RMASK;
|
AB = temp & RMASK;
|
||||||
glb_sect = 1;
|
glb_sect = 1;
|
||||||
|
@ -9372,28 +9366,28 @@ do_xlate(uint32 tbl, uint64 val, int mask)
|
||||||
|
|
||||||
/* Table of powers of 10 for CVTBD opcodes */
|
/* Table of powers of 10 for CVTBD opcodes */
|
||||||
uint64 pow10_tab[22][2] = {
|
uint64 pow10_tab[22][2] = {
|
||||||
/* 0: */ 0000000000000LL, 0000000000001LL,
|
/* 0: */ { 0000000000000LL, 0000000000001LL },
|
||||||
/* 1: */ 0000000000000LL, 0000000000012LL,
|
/* 1: */ { 0000000000000LL, 0000000000012LL },
|
||||||
/* 2: */ 0000000000000LL, 0000000000144LL,
|
/* 2: */ { 0000000000000LL, 0000000000144LL },
|
||||||
/* 3: */ 0000000000000LL, 0000000001750LL,
|
/* 3: */ { 0000000000000LL, 0000000001750LL },
|
||||||
/* 4: */ 0000000000000LL, 0000000023420LL,
|
/* 4: */ { 0000000000000LL, 0000000023420LL },
|
||||||
/* 5: */ 0000000000000LL, 0000000303240LL,
|
/* 5: */ { 0000000000000LL, 0000000303240LL },
|
||||||
/* 6: */ 0000000000000LL, 0000003641100LL,
|
/* 6: */ { 0000000000000LL, 0000003641100LL },
|
||||||
/* 7: */ 0000000000000LL, 0000046113200LL,
|
/* 7: */ { 0000000000000LL, 0000046113200LL },
|
||||||
/* 8: */ 0000000000000LL, 0000575360400LL,
|
/* 8: */ { 0000000000000LL, 0000575360400LL },
|
||||||
/* 9: */ 0000000000000LL, 0007346545000LL,
|
/* 9: */ { 0000000000000LL, 0007346545000LL },
|
||||||
/* 10: */ 0000000000000LL, 0112402762000LL,
|
/* 10: */ { 0000000000000LL, 0112402762000LL },
|
||||||
/* 11: */ 0000000000002LL, 0351035564000LL,
|
/* 11: */ { 0000000000002LL, 0351035564000LL },
|
||||||
/* 12: */ 0000000000035LL, 0032451210000LL,
|
/* 12: */ { 0000000000035LL, 0032451210000LL },
|
||||||
/* 13: */ 0000000000443LL, 0011634520000LL,
|
/* 13: */ { 0000000000443LL, 0011634520000LL },
|
||||||
/* 14: */ 0000000005536LL, 0142036440000LL,
|
/* 14: */ { 0000000005536LL, 0142036440000LL },
|
||||||
/* 15: */ 0000000070657LL, 0324461500000LL,
|
/* 15: */ { 0000000070657LL, 0324461500000LL },
|
||||||
/* 16: */ 0000001070336LL, 0115760200000LL,
|
/* 16: */ { 0000001070336LL, 0115760200000LL },
|
||||||
/* 17: */ 0000013064257LL, 0013542400000LL,
|
/* 17: */ { 0000013064257LL, 0013542400000LL },
|
||||||
/* 18: */ 0000157013326LL, 0164731000000LL,
|
/* 18: */ { 0000157013326LL, 0164731000000LL },
|
||||||
/* 19: */ 0002126162140LL, 0221172000000LL,
|
/* 19: */ { 0002126162140LL, 0221172000000LL },
|
||||||
/* 20: */ 0025536165705LL, 0254304000000LL,
|
/* 20: */ { 0025536165705LL, 0254304000000LL },
|
||||||
/* 21: */ 0330656232670LL, 0273650000000LL
|
/* 21: */ { 0330656232670LL, 0273650000000LL }
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -9784,9 +9778,10 @@ do_extend(uint32 ia)
|
||||||
case 012: /* CVTBDO */
|
case 012: /* CVTBDO */
|
||||||
case 013: /* CVTBDT */
|
case 013: /* CVTBDT */
|
||||||
/* Save E1 */
|
/* Save E1 */
|
||||||
if (IR == 012)
|
if (IR == 012) {
|
||||||
val2 = ((AR & RSIGN) ? LMASK : 0) | (AR & RMASK);
|
val2 = ((AR & RSIGN) ? LMASK : 0) | (AR & RMASK);
|
||||||
else {
|
xlat_sect = cur_sect;
|
||||||
|
} else {
|
||||||
val2 = AB;
|
val2 = AB;
|
||||||
if (QKLB && pc_sect != 0 && glb_sect)
|
if (QKLB && pc_sect != 0 && glb_sect)
|
||||||
xlat_sect = (AR >> 18) & 07777;
|
xlat_sect = (AR >> 18) & 07777;
|
||||||
|
@ -9822,11 +9817,11 @@ do_extend(uint32 ia)
|
||||||
if (f == 0)
|
if (f == 0)
|
||||||
f = 1;
|
f = 1;
|
||||||
/* Check if room to save it */
|
/* Check if room to save it */
|
||||||
if (f > (reg & MANT))
|
if (f > (int)(reg & MANT))
|
||||||
return 0;
|
return 0;
|
||||||
/* Fill out left justify */
|
/* Fill out left justify */
|
||||||
/* If L, fill leading zeros with fill char */
|
/* If L, fill leading zeros with fill char */
|
||||||
while ((reg & SMASK) != 0 && (reg & MANT) > f) {
|
while ((reg & SMASK) != 0 && (int)(reg & MANT) > f) {
|
||||||
if (!store_byte(ext_ac + 3, fill1, 1))
|
if (!store_byte(ext_ac + 3, fill1, 1))
|
||||||
return 0;
|
return 0;
|
||||||
reg = get_reg(ext_ac + 3);
|
reg = get_reg(ext_ac + 3);
|
||||||
|
@ -9875,6 +9870,7 @@ do_extend(uint32 ia)
|
||||||
case 015: /* MOVST */
|
case 015: /* MOVST */
|
||||||
case 016: /* MOVSLJ */
|
case 016: /* MOVSLJ */
|
||||||
get_mask(ext_ac+3, &msk);
|
get_mask(ext_ac+3, &msk);
|
||||||
|
xlat_sect = cur_sect;
|
||||||
if ((((get_reg(ext_ac) & (077LL << 26))| get_reg(ext_ac+3)) & EMASK) != 0)
|
if ((((get_reg(ext_ac) & (077LL << 26))| get_reg(ext_ac+3)) & EMASK) != 0)
|
||||||
return 1;
|
return 1;
|
||||||
if (IR == 014) {
|
if (IR == 014) {
|
||||||
|
@ -10259,7 +10255,9 @@ t_bool build_dev_tab (void)
|
||||||
DEVICE *dptr;
|
DEVICE *dptr;
|
||||||
DIB *dibp;
|
DIB *dibp;
|
||||||
uint32 i, j, d;
|
uint32 i, j, d;
|
||||||
int rh20;
|
#if KL
|
||||||
|
uint32 rh20;
|
||||||
|
#endif
|
||||||
int rh_idx;
|
int rh_idx;
|
||||||
|
|
||||||
/* Set trap offset based on MAOFF flag */
|
/* Set trap offset based on MAOFF flag */
|
||||||
|
@ -10316,7 +10314,9 @@ if (QBBN)
|
||||||
|
|
||||||
|
|
||||||
/* Assign all RH10 & RH20 devices */
|
/* Assign all RH10 & RH20 devices */
|
||||||
|
#if KL
|
||||||
rh20 = 0540;
|
rh20 = 0540;
|
||||||
|
#endif
|
||||||
rh_idx = 0;
|
rh_idx = 0;
|
||||||
for (i = 0; (dptr = rh_devs[i]) != NULL; i++) {
|
for (i = 0; (dptr = rh_devs[i]) != NULL; i++) {
|
||||||
dibp = (DIB *) dptr->ctxt;
|
dibp = (DIB *) dptr->ctxt;
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
|
|
||||||
|
|
||||||
struct disk_formats {
|
struct disk_formats {
|
||||||
uint32 mode;
|
int mode;
|
||||||
const char *name;
|
const char *name;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -341,7 +341,6 @@ static int joy_buttons[JOY_MAX_UNITS * JOY_MAX_BUTTONS];
|
||||||
|
|
||||||
static void dpy_joy_motion(int which, int axis, int value)
|
static void dpy_joy_motion(int which, int axis, int value)
|
||||||
{
|
{
|
||||||
int result = FALSE;
|
|
||||||
if (which < JOY_MAX_UNITS && axis < JOY_MAX_AXES) {
|
if (which < JOY_MAX_UNITS && axis < JOY_MAX_AXES) {
|
||||||
joy_axes[which * JOY_MAX_AXES + axis] = value;
|
joy_axes[which * JOY_MAX_AXES + axis] = value;
|
||||||
}
|
}
|
||||||
|
@ -349,7 +348,6 @@ static void dpy_joy_motion(int which, int axis, int value)
|
||||||
|
|
||||||
static void dpy_joy_button(int which, int button, int state)
|
static void dpy_joy_button(int which, int button, int state)
|
||||||
{
|
{
|
||||||
int result = FALSE;
|
|
||||||
if (which < JOY_MAX_UNITS && button < JOY_MAX_BUTTONS) {
|
if (which < JOY_MAX_UNITS && button < JOY_MAX_BUTTONS) {
|
||||||
joy_buttons[which * JOY_MAX_UNITS + button] = state;
|
joy_buttons[which * JOY_MAX_UNITS + button] = state;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1062,7 +1062,7 @@ dt_boot(int32 unit_num, DEVICE * dptr)
|
||||||
{
|
{
|
||||||
UNIT *uptr = &dptr->units[unit_num];
|
UNIT *uptr = &dptr->units[unit_num];
|
||||||
uint32 *fbuf = (uint32 *) uptr->filebuf; /* file buffer */
|
uint32 *fbuf = (uint32 *) uptr->filebuf; /* file buffer */
|
||||||
uint64 word;
|
uint64 word = 0;
|
||||||
int off;
|
int off;
|
||||||
int wc, addr;
|
int wc, addr;
|
||||||
|
|
||||||
|
@ -1232,7 +1232,6 @@ void dt_flush (UNIT* uptr)
|
||||||
uint16 pdp8b[D8_NBSIZE];
|
uint16 pdp8b[D8_NBSIZE];
|
||||||
uint16 pdp11b[D18_BSIZE];
|
uint16 pdp11b[D18_BSIZE];
|
||||||
uint32 ba, k, *fbuf;
|
uint32 ba, k, *fbuf;
|
||||||
int32 u = uptr - dt_dev.units;
|
|
||||||
|
|
||||||
if (uptr->WRITTEN && uptr->hwmark && ((uptr->flags & UNIT_RO) == 0)) { /* any data? */
|
if (uptr->WRITTEN && uptr->hwmark && ((uptr->flags & UNIT_RO) == 0)) { /* any data? */
|
||||||
rewind (uptr->fileref); /* start of file */
|
rewind (uptr->fileref); /* start of file */
|
||||||
|
|
|
@ -405,7 +405,7 @@ struct imp_device {
|
||||||
struct imp_map port_map[64]; /* Ports to adjust */
|
struct imp_map port_map[64]; /* Ports to adjust */
|
||||||
in_addr_T dhcpip; /* DHCP server address */
|
in_addr_T dhcpip; /* DHCP server address */
|
||||||
uint8 dhcp_state; /* State of DHCP */
|
uint8 dhcp_state; /* State of DHCP */
|
||||||
int dhcp_lease; /* DHCP lease time */
|
uint32 dhcp_lease; /* DHCP lease time */
|
||||||
int dhcp_renew; /* DHCP renew time */
|
int dhcp_renew; /* DHCP renew time */
|
||||||
int dhcp_rebind; /* DHCP rebind time */
|
int dhcp_rebind; /* DHCP rebind time */
|
||||||
int dhcp_wait_time; /* seconds waiting for response */
|
int dhcp_wait_time; /* seconds waiting for response */
|
||||||
|
@ -743,7 +743,6 @@ imp_devirq(uint32 dev, t_addr addr) {
|
||||||
|
|
||||||
t_stat imp_srv(UNIT * uptr)
|
t_stat imp_srv(UNIT * uptr)
|
||||||
{
|
{
|
||||||
DEVICE *dptr = find_dev_from_unit(uptr);
|
|
||||||
int i;
|
int i;
|
||||||
int l;
|
int l;
|
||||||
|
|
||||||
|
@ -1017,7 +1016,6 @@ imp_packet_in(struct imp_device *imp)
|
||||||
if (ip_hdr->ip_dst == imp_data.ip && imp_data.hostip != 0) {
|
if (ip_hdr->ip_dst == imp_data.ip && imp_data.hostip != 0) {
|
||||||
uint8 *payload = (uint8 *)(&imp->rbuffer[pad +
|
uint8 *payload = (uint8 *)(&imp->rbuffer[pad +
|
||||||
(ip_hdr->ip_v_hl & 0xf) * 4]);
|
(ip_hdr->ip_v_hl & 0xf) * 4]);
|
||||||
uint16 chk = ip_hdr->ip_sum;
|
|
||||||
/* If TCP packet update the TCP checksum */
|
/* If TCP packet update the TCP checksum */
|
||||||
if (ip_hdr->ip_p == TCP_PROTO) {
|
if (ip_hdr->ip_p == TCP_PROTO) {
|
||||||
struct tcp *tcp_hdr = (struct tcp *)payload;
|
struct tcp *tcp_hdr = (struct tcp *)payload;
|
||||||
|
@ -2641,7 +2639,7 @@ t_stat imp_reset (DEVICE *dptr)
|
||||||
imp_data.sendq = NULL;
|
imp_data.sendq = NULL;
|
||||||
/* Set up free queue */
|
/* Set up free queue */
|
||||||
p = NULL;
|
p = NULL;
|
||||||
for (i = 0; i < (sizeof(imp_buffer)/sizeof(struct imp_packet)); i++) {
|
for (i = 0; i < (int)(sizeof(imp_buffer)/sizeof(struct imp_packet)); i++) {
|
||||||
imp_buffer[i].next = p;
|
imp_buffer[i].next = p;
|
||||||
p = &imp_buffer[i];
|
p = &imp_buffer[i];
|
||||||
}
|
}
|
||||||
|
|
|
@ -725,7 +725,7 @@ t_stat mt_srv(UNIT * uptr)
|
||||||
}
|
}
|
||||||
uptr->BPOS++;
|
uptr->BPOS++;
|
||||||
uptr->CPOS++;
|
uptr->CPOS++;
|
||||||
if (uptr->BPOS == uptr->hwmark)
|
if (uptr->BPOS == (int32)uptr->hwmark)
|
||||||
uptr->CNTRL |= MT_LASTWD;
|
uptr->CNTRL |= MT_LASTWD;
|
||||||
if (uptr->CPOS == cc_max) {
|
if (uptr->CPOS == cc_max) {
|
||||||
uptr->CPOS = 0;
|
uptr->CPOS = 0;
|
||||||
|
|
|
@ -491,7 +491,6 @@ t_stat rh_devio(uint32 dev, uint64 *data) {
|
||||||
/* Handle KI and KL style interrupt vectors */
|
/* Handle KI and KL style interrupt vectors */
|
||||||
t_addr
|
t_addr
|
||||||
rh_devirq(uint32 dev, t_addr addr) {
|
rh_devirq(uint32 dev, t_addr addr) {
|
||||||
DEVICE *dptr = NULL;
|
|
||||||
struct rh_if *rhc = NULL;
|
struct rh_if *rhc = NULL;
|
||||||
int drive;
|
int drive;
|
||||||
|
|
||||||
|
|
|
@ -277,7 +277,7 @@ t_stat load_dmp (FILE *fileref)
|
||||||
char *p;
|
char *p;
|
||||||
uint32 addr = 074;
|
uint32 addr = 074;
|
||||||
uint64 data;
|
uint64 data;
|
||||||
int high = 0;
|
uint32 high = 0;
|
||||||
|
|
||||||
while (fgets((char *)buffer, 80, fileref) != 0) {
|
while (fgets((char *)buffer, 80, fileref) != 0) {
|
||||||
p = (char *)buffer;
|
p = (char *)buffer;
|
||||||
|
@ -774,6 +774,7 @@ t_stat load_exb (FILE *fileref, int ftype)
|
||||||
return SCPE_OK;
|
return SCPE_OK;
|
||||||
}
|
}
|
||||||
pos = 0;
|
pos = 0;
|
||||||
|
word = 0;
|
||||||
for (; wc > 0; wc--, pos++) {
|
for (; wc > 0; wc--, pos++) {
|
||||||
if (get_exb_byte(fileref, &byt, ftype))
|
if (get_exb_byte(fileref, &byt, ftype))
|
||||||
return SCPE_FMT;
|
return SCPE_FMT;
|
||||||
|
@ -1124,11 +1125,10 @@ static const char *devnam[NUMDEV] = {
|
||||||
t_stat fprint_sym (FILE *of, t_addr addr, t_value *val,
|
t_stat fprint_sym (FILE *of, t_addr addr, t_value *val,
|
||||||
UNIT *uptr, int32 sw)
|
UNIT *uptr, int32 sw)
|
||||||
{
|
{
|
||||||
int32 i, j, c, cflag, ac, xr, y, dev;
|
int32 i, j, c, ac, xr, y, dev;
|
||||||
uint64 inst;
|
uint64 inst;
|
||||||
|
|
||||||
inst = val[0];
|
inst = val[0];
|
||||||
cflag = (uptr == NULL) || (uptr == &cpu_unit[0]);
|
|
||||||
if (sw & SWMASK ('A')) { /* ASCII? */
|
if (sw & SWMASK ('A')) { /* ASCII? */
|
||||||
if (inst > 0377)
|
if (inst > 0377)
|
||||||
return SCPE_ARG;
|
return SCPE_ARG;
|
||||||
|
@ -1250,12 +1250,11 @@ return (ind | (xr << 18) | val);
|
||||||
|
|
||||||
t_stat parse_sym (CONST char *cptr, t_addr addr, UNIT *uptr, t_value *val, int32 sw)
|
t_stat parse_sym (CONST char *cptr, t_addr addr, UNIT *uptr, t_value *val, int32 sw)
|
||||||
{
|
{
|
||||||
int32 cflag, i, j;
|
int32 i, j;
|
||||||
t_value ac, dev;
|
t_value ac, dev;
|
||||||
t_stat r;
|
t_stat r;
|
||||||
char gbuf[CBUFSIZE], cbuf[2*CBUFSIZE];
|
char gbuf[CBUFSIZE], cbuf[2*CBUFSIZE];
|
||||||
|
|
||||||
cflag = (uptr == NULL) || (uptr == &cpu_unit[0]);
|
|
||||||
while (isspace (*cptr)) cptr++;
|
while (isspace (*cptr)) cptr++;
|
||||||
memset (cbuf, '\0', sizeof(cbuf));
|
memset (cbuf, '\0', sizeof(cbuf));
|
||||||
strncpy (cbuf, cptr, sizeof(cbuf)-7);
|
strncpy (cbuf, cptr, sizeof(cbuf)-7);
|
||||||
|
|
|
@ -627,7 +627,7 @@ t_stat tu_srv(UNIT * uptr)
|
||||||
uptr->CPOS = 0;
|
uptr->CPOS = 0;
|
||||||
if (GET_FNC(uptr->CMD) == FNC_READ && rh_write(rhc) == 0) {
|
if (GET_FNC(uptr->CMD) == FNC_READ && rh_write(rhc) == 0) {
|
||||||
tu_error(uptr, MTSE_OK);
|
tu_error(uptr, MTSE_OK);
|
||||||
if (uptr->DATAPTR == uptr->hwmark)
|
if ((uint32)uptr->DATAPTR == uptr->hwmark)
|
||||||
(void)rh_blkend(rhc);
|
(void)rh_blkend(rhc);
|
||||||
rh_finish_op(rhc, 0);
|
rh_finish_op(rhc, 0);
|
||||||
return SCPE_OK;
|
return SCPE_OK;
|
||||||
|
|
|
@ -1072,7 +1072,7 @@ dtc_boot(int32 unit_num, DEVICE * dptr)
|
||||||
{
|
{
|
||||||
UNIT *uptr = &dptr->units[unit_num];
|
UNIT *uptr = &dptr->units[unit_num];
|
||||||
uint32 *fbuf = (uint32 *) uptr->filebuf; /* file buffer */
|
uint32 *fbuf = (uint32 *) uptr->filebuf; /* file buffer */
|
||||||
uint64 word;
|
uint64 word = 0;
|
||||||
int off;
|
int off;
|
||||||
int wc, addr;
|
int wc, addr;
|
||||||
|
|
||||||
|
|
|
@ -388,7 +388,7 @@ t_stat
|
||||||
mtc_srv(UNIT * uptr)
|
mtc_srv(UNIT * uptr)
|
||||||
{
|
{
|
||||||
DEVICE *dptr = find_dev_from_unit(uptr);
|
DEVICE *dptr = find_dev_from_unit(uptr);
|
||||||
int unit = (uptr - dptr->units) & 7;
|
unsigned int unit = (uptr - dptr->units) & 7;
|
||||||
int cmd = (uptr->CNTRL & FUNCTION) >> 8;
|
int cmd = (uptr->CNTRL & FUNCTION) >> 8;
|
||||||
t_mtrlnt reclen;
|
t_mtrlnt reclen;
|
||||||
t_stat r = SCPE_ARG; /* Force error if not set */
|
t_stat r = SCPE_ARG; /* Force error if not set */
|
||||||
|
@ -416,7 +416,7 @@ mtc_srv(UNIT * uptr)
|
||||||
|
|
||||||
/* Check if command pending */
|
/* Check if command pending */
|
||||||
if ((mtc_hold_cmd & CMD_FULL) != 0) {
|
if ((mtc_hold_cmd & CMD_FULL) != 0) {
|
||||||
int u = (mtc_hold_cmd >> 4) & 07;
|
unsigned int u = (mtc_hold_cmd >> 4) & 07;
|
||||||
sim_debug(DEBUG_DETAIL, dptr, "MTC%o New command %o\n", unit, u);
|
sim_debug(DEBUG_DETAIL, dptr, "MTC%o New command %o\n", unit, u);
|
||||||
/* Is it for me? */
|
/* Is it for me? */
|
||||||
if (u == unit) {
|
if (u == unit) {
|
||||||
|
|
|
@ -291,7 +291,6 @@ static const char *slave_description (DEVICE *dptr)
|
||||||
|
|
||||||
t_stat slave_devio(uint32 dev, uint64 *data)
|
t_stat slave_devio(uint32 dev, uint64 *data)
|
||||||
{
|
{
|
||||||
DEVICE *dptr = &slave_dev;
|
|
||||||
UNIT *uptr = &slave_unit[0];
|
UNIT *uptr = &slave_unit[0];
|
||||||
|
|
||||||
switch(dev & 03) {
|
switch(dev & 03) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue