1
0
mirror of https://github.com/aap/pdp6.git synced 2026-04-03 04:38:10 +00:00

emu: fixes for serial console

This commit is contained in:
aap
2019-03-23 18:14:48 +01:00
parent a341e26b31
commit 6dba7a1b87
2 changed files with 4356 additions and 5405 deletions

View File

@@ -133,6 +133,20 @@ talkserial(int fd, Apr *apr, Ptr *ptr)
buf[n++] = 0100;
break;
}
if(apr->sw_power == 0){
buf[1] = 0;
buf[2] = 0;
buf[3] = 0;
buf[5] = 0;
buf[6] = 0;
buf[7] = 0;
buf[9] = 0;
buf[10] = 0;
buf[11] = 0;
buf[13] = 0;
buf[14] = 0;
buf[15] = 0;
}
sw = !sw;
writen(fd, buf, n);
}
@@ -178,16 +192,23 @@ threadmain(int argc, char *argv[])
exit(1);
}
dofile("init.ini");
rtcchan = chancreate(sizeof(RtcMsg), 20);
if(dofile("init.ini"))
defaultconfig();
apr = (Apr*)getdevice("apr");
ptr = (Ptr*)getdevice("ptr");
if(apr == nil || ptr == nil)
err("need APR, PTR");
cmdchans[0] = chancreate(sizeof(char*), 1);
cmdchans[1] = chancreate(sizeof(void*), 1);
t = (Task){ nil, readcmdchan, cmdchans, 10, 0 };
addtask(t);
threadcreate(simthread, nil);
threadcreate(cmdthread, cmdchans);
threadcreate(rtcthread, nil);
if(panelfile){
fd = open(panelfile, O_RDWR);

9738
emu/mem_0

File diff suppressed because it is too large Load Diff