KA10: Fixed some WAITS issues with III display.

This commit is contained in:
Richard Cornwell 2020-10-31 11:54:03 -04:00
parent 0d6f1ce362
commit 4d03ac67f6
2 changed files with 11 additions and 5 deletions

View file

@ -40,6 +40,7 @@
#define MAR u4
#define PIA u5
#define POS u6
#define CYCLE us9
/* CONO Bits */
#define SET_PIA 000000010 /* Set if this bit is zero */
@ -307,7 +308,7 @@ const char *iii_description (DEVICE *dptr);
DIB iii_dib = { III_DEVNUM, 1, iii_devio, NULL};
UNIT iii_unit[] = {
{UDATA (&iii_svc, UNIT_IDLE, 0) },
{UDATA (&iii_svc, 0, 0) },
{ 0 }
};
@ -396,7 +397,12 @@ iii_svc (UNIT *uptr)
int i, j, ch;
float ch_sz;
iii_cycle(10, 0);
if (uptr->CYCLE > 20) {
iii_cycle(300, 0);
uptr->CYCLE = 0;
} else {
uptr->CYCLE++;
}
/* Extract X,Y,Bright and Size */
sz = (uptr->POS & CSIZE) >> CSIZE_V;
@ -615,7 +621,7 @@ skip_up:
uptr->MAR, iii_instr);
uptr->MAR++;
uptr->MAR &= RMASK;
sim_activate(uptr, 50);
sim_activate_after(uptr, 60);
}
if (((uptr->STATUS >> 3) & (uptr->STATUS & (WRAP_MSK|EDGE_MSK|LIGH_MSK))) != 0)

View file

@ -1407,7 +1407,7 @@ sense_end:
sim_debug(DEBUG_DETAIL, dptr, "seek unit=%d %d %d\n", unit, trk, buf[5]);
/* Check if seek valid */
if ((buf[0] | buf[1] | buf[4]) != 0 || trk > disk_type[type].cyl
if ((buf[0] | buf[1] | buf[4]) != 0 || trk >= disk_type[type].cyl
|| buf[5] >= disk_type[type].heads) {
uptr->LASTCMD = cmd;
uptr->CMD &= ~(0xff);
@ -2161,7 +2161,7 @@ pmp_format(UNIT * uptr, int flag) {
data->tsize = hdr.tracksize;
if ((data->cbuf = (uint8 *)calloc(tsize, sizeof(uint8))) == 0)
return 1;
for (cyl = 0; cyl <= disk_type[type].cyl; cyl++) {
for (cyl = 0; cyl < disk_type[type].cyl; cyl++) {
pos = 0;
for (hd = 0; hd < disk_type[type].heads; hd++) {
uint32 cpos = pos;