Skip to content

Commit 5190890

Browse files
committed
committing older changes to emu
1 parent 66f5076 commit 5190890

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

emu/apr.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ pulse(Apr *apr, Pulse *p, int t)
8989
{
9090
TPulse *tp, **pp;
9191

92+
// IDEA execute pulse directly if t == 0
93+
// currently this would break stuff, but maybe it can be fixed
94+
9295
assert(apr->pfree);
9396
tp = apr->pfree;
9497
apr->pfree = tp->next;
@@ -1454,7 +1457,7 @@ defpulse(lct0)
14541457

14551458
defpulse(cht9)
14561459
{
1457-
apr->sc = apr->fe; // 6-15
1460+
apr->sc |= apr->fe; // 6-15
14581461
apr->chf5 = 1; // 6-19
14591462
apr->chf7 = 1; // 6-19
14601463
pulse(apr, &at0, 0); // 5-3
@@ -1472,7 +1475,7 @@ defpulse(cht8b)
14721475
{
14731476
apr->chf2 = 0; // 6-19
14741477
apr->chf6 = 0; // 6-19
1475-
apr->fe = apr->c.mb>>30 & 077; // 6-14, 6-15
1478+
apr->fe |= apr->c.mb>>30 & 077; // 6-14, 6-15
14761479
SC_COM; // 6-15
14771480
if(apr->inst == CAO)
14781481
pulse(apr, &st7, 0); // 5-6
@@ -2143,7 +2146,7 @@ defpulse(fdt1)
21432146
defpulse_(fdt0b)
21442147
{
21452148
apr->fdf2 = 0; // 6-22
2146-
apr->sc = apr->fe; // 6-15
2149+
apr->sc |= apr->fe; // 6-15
21472150
apr->nrf2 = 1; // 6-27
21482151
pulse(apr, &fdt1, 100); // 6-22
21492152
}
@@ -2152,7 +2155,7 @@ defpulse_(fdt0a)
21522155
{
21532156
apr->fdf1 = 0; // 6-22
21542157
apr->fdf2 = 1; // 6-22
2155-
apr->sc = 0741; // 6-14
2158+
apr->sc |= 0741; // 6-14
21562159
pulse(apr, apr->c.ar & F0 ? &dst0 : &dst10, 0); // 6-25
21572160
}
21582161

emu/dis340.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,8 @@ makedis(int argc, char *argv[])
10301030
// MACDMP starts breaking if we go too high
10311031
// other programs start breaking if we go too low
10321032
// TODO: gahhhhhhh
1033-
t = (Task){ nil, discycle, dis, 13, 0 };
1033+
// for now i increased the delay in MACDMP slightly
1034+
t = (Task){ nil, discycle, dis, 20, 0 };
10341035
addtask(t);
10351036

10361037
lock(&initlock);

emu/dt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ debug("ILL op %d %d %d\n", nunits, dt->ut_btm_switch, UT_WRTM);
609609

610610
if(UT_WRTM) // 3-14
611611
setstat(dt, RW_ACTIVE);
612-
else if(!UT_DN) // TODO: is this right?
612+
else if(!UT_DN)
613613
setstat(dt, RW_RQ);
614614
}else
615615
/* 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,
795795
// now wait
796796
dbg("starting delay %d\n", dt->delay);
797797
}else
798-
if(!UT_DN && // TODO: is this right?
798+
if(!UT_DN &&
799799
!UT_WRTM) // 3-14
800800
setstat(dt, RW_RQ);
801801
}

emu/pt.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,15 +186,13 @@ wake_ptr(void *dev)
186186

187187
if(bus->devcode == PTR){
188188
if(IOB_STATUS){
189-
//printf("PTR STATUS\n");
190189
if(ptr->motor_on) bus->c12 |= F27;
191190
if(ptr->b) bus->c12 |= F30;
192191
if(ptr->busy) bus->c12 |= F31;
193192
if(ptr->flag) bus->c12 |= F32;
194193
bus->c12 |= ptr->pia & 7;
195194
}
196195
if(IOB_DATAI){
197-
//printf("PTR DATAI\n");
198196
bus->c12 |= ptr->ptr;
199197
ptr->flag = 0;
200198
// actually when DATAI is negated again
@@ -203,7 +201,6 @@ wake_ptr(void *dev)
203201
if(IOB_CONO_CLEAR)
204202
ptr_ic_clr(ptr);
205203
if(IOB_CONO_SET){
206-
//printf("PTR CONO %012lo\n", bus->c12);
207204
/* TODO: schematics don't have this, but code uses it */
208205
if(bus->c12 & F27) ptr_setmotor(ptr, 1);
209206
if(bus->c12 & F30) ptr->b = 1;
@@ -310,7 +307,7 @@ makeptp(int argc, char *argv[])
310307
ptp->fd = -1;
311308

312309
// 63.3 chars per second, value around 60000?
313-
t = (Task){ nil, ptpcycle, ptp, 1000, 0 };
310+
t = (Task){ nil, ptpcycle, ptp, 60000, 0 };
314311
addtask(t);
315312
return &ptp->dev;
316313
}

0 commit comments

Comments
 (0)