1
0
mirror of https://github.com/aap/pdp6.git synced 2026-03-31 03:32:27 +00:00

committing older changes to emu

This commit is contained in:
aap
2024-04-14 17:34:19 +02:00
parent 66f5076d93
commit 5190890e4a
4 changed files with 12 additions and 11 deletions

View File

@@ -89,6 +89,9 @@ pulse(Apr *apr, Pulse *p, int t)
{
TPulse *tp, **pp;
// IDEA execute pulse directly if t == 0
// currently this would break stuff, but maybe it can be fixed
assert(apr->pfree);
tp = apr->pfree;
apr->pfree = tp->next;
@@ -1454,7 +1457,7 @@ defpulse(lct0)
defpulse(cht9)
{
apr->sc = apr->fe; // 6-15
apr->sc |= apr->fe; // 6-15
apr->chf5 = 1; // 6-19
apr->chf7 = 1; // 6-19
pulse(apr, &at0, 0); // 5-3
@@ -1472,7 +1475,7 @@ defpulse(cht8b)
{
apr->chf2 = 0; // 6-19
apr->chf6 = 0; // 6-19
apr->fe = apr->c.mb>>30 & 077; // 6-14, 6-15
apr->fe |= apr->c.mb>>30 & 077; // 6-14, 6-15
SC_COM; // 6-15
if(apr->inst == CAO)
pulse(apr, &st7, 0); // 5-6
@@ -2143,7 +2146,7 @@ defpulse(fdt1)
defpulse_(fdt0b)
{
apr->fdf2 = 0; // 6-22
apr->sc = apr->fe; // 6-15
apr->sc |= apr->fe; // 6-15
apr->nrf2 = 1; // 6-27
pulse(apr, &fdt1, 100); // 6-22
}
@@ -2152,7 +2155,7 @@ defpulse_(fdt0a)
{
apr->fdf1 = 0; // 6-22
apr->fdf2 = 1; // 6-22
apr->sc = 0741; // 6-14
apr->sc |= 0741; // 6-14
pulse(apr, apr->c.ar & F0 ? &dst0 : &dst10, 0); // 6-25
}

View File

@@ -1030,7 +1030,8 @@ makedis(int argc, char *argv[])
// MACDMP starts breaking if we go too high
// other programs start breaking if we go too low
// TODO: gahhhhhhh
t = (Task){ nil, discycle, dis, 13, 0 };
// for now i increased the delay in MACDMP slightly
t = (Task){ nil, discycle, dis, 20, 0 };
addtask(t);
lock(&initlock);

View File

@@ -609,7 +609,7 @@ debug("ILL op %d %d %d\n", nunits, dt->ut_btm_switch, UT_WRTM);
if(UT_WRTM) // 3-14
setstat(dt, RW_ACTIVE);
else if(!UT_DN) // TODO: is this right?
else if(!UT_DN)
setstat(dt, RW_RQ);
}else
/* Don't move during delay.
@@ -795,7 +795,7 @@ dbg("SEL/%o GO/%o REV/%o TIME/%o FCN/%o\n", dt->ut_units_select,
// now wait
dbg("starting delay %d\n", dt->delay);
}else
if(!UT_DN && // TODO: is this right?
if(!UT_DN &&
!UT_WRTM) // 3-14
setstat(dt, RW_RQ);
}

View File

@@ -186,7 +186,6 @@ wake_ptr(void *dev)
if(bus->devcode == PTR){
if(IOB_STATUS){
//printf("PTR STATUS\n");
if(ptr->motor_on) bus->c12 |= F27;
if(ptr->b) bus->c12 |= F30;
if(ptr->busy) bus->c12 |= F31;
@@ -194,7 +193,6 @@ wake_ptr(void *dev)
bus->c12 |= ptr->pia & 7;
}
if(IOB_DATAI){
//printf("PTR DATAI\n");
bus->c12 |= ptr->ptr;
ptr->flag = 0;
// actually when DATAI is negated again
@@ -203,7 +201,6 @@ wake_ptr(void *dev)
if(IOB_CONO_CLEAR)
ptr_ic_clr(ptr);
if(IOB_CONO_SET){
//printf("PTR CONO %012lo\n", bus->c12);
/* TODO: schematics don't have this, but code uses it */
if(bus->c12 & F27) ptr_setmotor(ptr, 1);
if(bus->c12 & F30) ptr->b = 1;
@@ -310,7 +307,7 @@ makeptp(int argc, char *argv[])
ptp->fd = -1;
// 63.3 chars per second, value around 60000?
t = (Task){ nil, ptpcycle, ptp, 1000, 0 };
t = (Task){ nil, ptpcycle, ptp, 60000, 0 };
addtask(t);
return &ptp->dev;
}