mirror of
https://github.com/prirun/p50em.git
synced 2026-02-27 08:49:17 +00:00
In-progress work on an option / functionality to _not_ arbitrarily
strip off mark parity on AMLC lines. Also, now that they can oocur in the output data stream, manage escaping of telnet IAC characters. THIS WORK IS NOT COMPLETE OR FUNCTIONAL YET.
This commit is contained in:
31
devamlc.h
31
devamlc.h
@@ -991,6 +991,7 @@ int devamlc (int class, int func, int device) {
|
||||
if (dc[dx].xmitenabled & BITMASK16(lx+1)) {
|
||||
int n, maxn;
|
||||
unsigned short qtop, qbot, qseg, qmask, qents;
|
||||
short hasiac; /* This buffer contains an escaped IAC */
|
||||
ea_t qentea, qcbea;
|
||||
n = 0;
|
||||
qcbea = dc[dx].baseaddr + lx*4;
|
||||
@@ -1019,12 +1020,35 @@ int devamlc (int class, int func, int device) {
|
||||
precludes the use of TTY8BIT mode... */
|
||||
|
||||
n = 0;
|
||||
hasiac = 0;
|
||||
for (i=0; i < maxn; i++) {
|
||||
unsigned short utemp;
|
||||
utemp = get16mem(qentea);
|
||||
qentea = (qentea & ~qmask) | ((qentea+1) & qmask);
|
||||
/* qentea = (qentea & ~qmask) | ((qentea+1) & qmask); */
|
||||
//printf("Device %o, line %d, entry=%o (%c)\n", device, lx, utemp, utemp & 0x7f);
|
||||
#ifdef NOMASKAMLC
|
||||
if (((utemp & 0xff) == 0xff) && (dc[dx].ctype[lx] != CT_SERIAL))
|
||||
{
|
||||
if (n != 0)
|
||||
break; /* Clear the buffer before handling IAC */
|
||||
else
|
||||
{
|
||||
buf[n++] = 0xFF;
|
||||
buf[n++] = 0xFF;
|
||||
hasiac = 1;
|
||||
qentea = (qentea & ~qmask) | ((qentea+1) & qmask);
|
||||
break; /* Now ship _just_ the IAC */
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
buf[n++] = utemp & 0xFF;
|
||||
qentea = (qentea & ~qmask) | ((qentea+1) & qmask);
|
||||
}
|
||||
#else
|
||||
/* None of the IAC handling matters if we splatter parity */
|
||||
buf[n++] = utemp & 0x7F;
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -1089,7 +1113,10 @@ int devamlc (int class, int func, int device) {
|
||||
used and Unix buffers get full so writes can't
|
||||
complete */
|
||||
|
||||
qtop = (qtop & ~qmask) | ((qtop+nw) & qmask);
|
||||
if (hasiac)
|
||||
qtop = (qtop & ~qmask) | ((qtop+1) & qmask);
|
||||
else
|
||||
qtop = (qtop & ~qmask) | ((qtop+nw) & qmask);
|
||||
put16io(qtop, qcbea);
|
||||
if (nw > maxxmit)
|
||||
maxxmit = nw;
|
||||
|
||||
4
em.c
4
em.c
@@ -2383,8 +2383,8 @@ static ea_t apea(unsigned short *bitarg) {
|
||||
iwea = ea;
|
||||
ea = ip;
|
||||
TRACE(T_EAAP, " After indirect, AP ea = %o/%o, bit=%d %s\n", ea>>16, ea & 0xFFFF, bit, searchloadmap(ea,' '));
|
||||
if (ea & 0x80000000)
|
||||
fault(POINTERFAULT, ea>>16, iwea);
|
||||
// if (ea & 0x80000000)
|
||||
// fault(POINTERFAULT, ea>>16, iwea);
|
||||
}
|
||||
if (bitarg != NULL)
|
||||
*bitarg = bit;
|
||||
|
||||
9
makefile
9
makefile
@@ -33,7 +33,7 @@ trace: $(em_deps) $(all_deps)
|
||||
|
||||
# the fixed clock rate build is useful for making problems reproduceable.
|
||||
#
|
||||
# If the emulator crashes on a specific program, run it at the end of
|
||||
# If the emulator crashes on a specific program, run it at the end of
|
||||
# PRIMOS.COMI to get a more consistent instruction count for the
|
||||
# failure, then enable tracing a little before that with -trace <IC - 100>
|
||||
|
||||
@@ -41,5 +41,12 @@ trace: $(em_deps) $(all_deps)
|
||||
fixed: $(em_deps) $(all_deps)
|
||||
$(CC) -DREV=\"${REV}\" ${CFLAGS} -DFIXEDCLOCK -DNOIDLE -DFAST -O em.c -o em
|
||||
|
||||
# Experimental "don't mask off the high bit on amlc lines" build
|
||||
#
|
||||
# Let's see if this is breaking e.g. ymodem file transfers.
|
||||
|
||||
nomaskamlc: $(em_deps) $(all_deps)
|
||||
$(CC) -DREV=\"${REV}\" -DNOMASKAMLC ${CFLAGS} -DNOTRACE -DFAST -O -Winline -Wno-return-type em.c -o em.nomaskamlc
|
||||
|
||||
clean:
|
||||
rm -f $(em_objs)
|
||||
|
||||
Reference in New Issue
Block a user