H316: Updated H316 and IMP documentation and addition of IMP modem loopback functionality and testing (from Bob Armstrong)
This commit is contained in:
parent
8810571d7e
commit
c1aa85d944
7 changed files with 87 additions and 23 deletions
|
@ -155,8 +155,8 @@
|
|||
LINKNO 32 link number for h316_udp module
|
||||
BPS 32 simulated bps for UDP delay calculations
|
||||
actual baud rate for physical COM ports
|
||||
LLOOP 1 local loopback enabled
|
||||
RLOOP 1 remote loopback enabled
|
||||
ILOOP 1 interface (local) loopback enabled
|
||||
RLOOP 1 remote (line) loopback enabled
|
||||
|
||||
Most of these values will be found in the Modem Information Data Block (aka
|
||||
"MIDB") but a few are stored elsewhere (e.g. IRQ/IEN are in the CPU's dev_int
|
||||
|
@ -165,7 +165,7 @@
|
|||
TODO
|
||||
|
||||
Implement checksum handling
|
||||
Implement local/remote loopback
|
||||
Implement remote loopback
|
||||
*/
|
||||
#ifdef VM_IMPTIP
|
||||
#include "h316_defs.h" // H316 emulator definitions
|
||||
|
@ -247,8 +247,8 @@ UNIT mi5_unit = MI_UNIT(5);
|
|||
{ DRDATA (TXTOT, mi##N##_db.txtotal, 32), REG_RO + PV_LEFT }, \
|
||||
{ DRDATA (LINK, mi##N##_db.link, 32), REG_RO + PV_LEFT }, \
|
||||
{ DRDATA (BPS, mi##N##_db.bps, 32), REG_NZ + PV_LEFT }, \
|
||||
{ FLDATA (LLOOP, mi##N##_db.lloop, 0), PV_RZRO }, \
|
||||
{ FLDATA (ILOOP, mi##N##_db.iloop, 0), PV_RZRO }, \
|
||||
{ FLDATA (LLOOP, mi##N##_db.lloop, 0), REG_RO + PV_RZRO }, \
|
||||
{ FLDATA (ILOOP, mi##N##_db.iloop, 0), REG_RO + PV_RZRO }, \
|
||||
{ NULL } \
|
||||
}
|
||||
REG mi1_reg[] = MI_REG(1), mi2_reg[] = MI_REG(2);
|
||||
|
@ -258,8 +258,10 @@ REG mi5_reg[] = MI_REG(5);
|
|||
// Modem Device Modifiers ...
|
||||
// These are the modifiers simh uses for the "SET MIn" and "SHOW MIn" commands.
|
||||
#define MI_MOD(N) { \
|
||||
{ MTAB_XTD|MTAB_VDV, 1, "LOOPBACK", "LOCALLOOP", &mi_set_loopback, &mi_show_loopback, NULL }, \
|
||||
{ MTAB_XTD|MTAB_VDV, 0, NULL, "NOLOCALLOOP", &mi_set_loopback, NULL, NULL }, \
|
||||
{ MTAB_XTD|MTAB_VDV, 0, "LOOPBACK", "LOOPINTERFACE", &mi_set_loopback, &mi_show_loopback, NULL }, \
|
||||
{ MTAB_XTD|MTAB_VDV, 1, NULL, "NOLOOPINTERFACE", &mi_set_loopback, NULL, NULL }, \
|
||||
{ MTAB_XTD|MTAB_VDV, 2, NULL, "LOOPLINE", &mi_set_loopback, NULL, NULL }, \
|
||||
{ MTAB_XTD|MTAB_VDV, 3, NULL, "NOLOOPLINE", &mi_set_loopback, NULL, NULL }, \
|
||||
{ 0 } \
|
||||
}
|
||||
MTAB mi1_mod[] = MI_MOD(1), mi2_mod[] = MI_MOD(2);
|
||||
|
@ -731,13 +733,23 @@ t_stat mi_detach (UNIT *uptr)
|
|||
|
||||
t_stat mi_set_loopback (UNIT *uptr, int32 val, char *cptr, void *desc)
|
||||
{
|
||||
t_stat ret; uint16 line = uptr->mline;
|
||||
t_stat ret = SCPE_OK; uint16 line = uptr->mline;
|
||||
|
||||
switch (val) {
|
||||
case 0: // LOOPINTERFACE
|
||||
case 1: // NOLOOPINTERFACE
|
||||
PMIDB(line)->iloop = (val == 0) ? 1 : 0;
|
||||
break;
|
||||
case 2: // LOOPLINE
|
||||
case 3: // NOLOOPLINE
|
||||
if (PMIDB(line)->link == NOLINK)
|
||||
return SCPE_UNATT;
|
||||
val = (val == 2) ? 1 : 0;
|
||||
ret = udp_set_link_loopback (PDEVICE(line), PMIDB(line)->link, val);
|
||||
if (ret == SCPE_OK)
|
||||
PMIDB(line)->lloop = val;
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -746,9 +758,9 @@ t_stat mi_show_loopback (FILE *st, UNIT *uptr, int32 val, void *desc)
|
|||
uint16 line = uptr->mline;
|
||||
|
||||
if (PMIDB(line)->iloop)
|
||||
fprintf (st, ", Internal Loopback");
|
||||
fprintf (st, "Interface (local) Loopback");
|
||||
if (PMIDB(line)->lloop)
|
||||
fprintf (st, ", Local Loopback");
|
||||
fprintf (st, "Line (remote) Loopback");
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,15 +11,15 @@ do impcode.cmd
|
|||
|
||||
; Start up the modem links!
|
||||
SET MI1 ENABLED
|
||||
DEPOSIT MI1 ILOOP 1
|
||||
SET MI1 LOOPINTERFACE
|
||||
SET MI2 ENABLED
|
||||
DEPOSIT MI2 ILOOP 1
|
||||
SET MI2 LOOPINTERFACE
|
||||
SET MI3 ENABLED
|
||||
DEPOSIT MI3 ILOOP 1
|
||||
SET MI3 LOOPINTERFACE
|
||||
SET MI4 ENABLED
|
||||
DEPOSIT MI4 ILOOP 1
|
||||
SET MI4 LOOPINTERFACE
|
||||
SET MI5 ENABLED
|
||||
DEPOSIT MI5 ILOOP 1
|
||||
SET MI5 LOOPINTERFACE
|
||||
|
||||
; And we're done ..
|
||||
echo Type GO to start ...
|
||||
|
|
|
@ -14,7 +14,7 @@ SET MI1 DISABLED
|
|||
SET MI2 DISABLED
|
||||
SET MI3 DISABLED
|
||||
SET MI4 ENABLED
|
||||
DEPOSIT MI4 ILOOP 1
|
||||
SET MI4 LOOPINTERFACE
|
||||
SET MI5 DISABLED
|
||||
|
||||
; And we're done ..
|
||||
|
|
22
H316/tests/imploop4l.cmd
Normal file
22
H316/tests/imploop4l.cmd
Normal file
|
@ -0,0 +1,22 @@
|
|||
;; *** IMP LINE FOUR (ONLY!) LOOPBACK TEST ***
|
||||
|
||||
; Set the simulator configuration ...
|
||||
echo IMP line four loopback test...
|
||||
do impconfig.cmd
|
||||
SET IMP NUM=2
|
||||
|
||||
; Load the IMP code ...
|
||||
echo Loading IMP code ...
|
||||
do impcode.cmd
|
||||
|
||||
; Start up the modem links!
|
||||
SET MI1 DISABLED
|
||||
SET MI2 DISABLED
|
||||
SET MI3 DISABLED
|
||||
SET MI4 ENABLED
|
||||
ATTACH MI4 4424:4434
|
||||
SET MI4 LOOPLINE
|
||||
SET MI5 DISABLED
|
||||
|
||||
; And we're done ..
|
||||
echo Type GO to start ...
|
30
H316/tests/imploopl.cmd
Normal file
30
H316/tests/imploopl.cmd
Normal file
|
@ -0,0 +1,30 @@
|
|||
;; *** IMP FIVE MODEM LINE LOOPBACK TEST ***
|
||||
|
||||
; Set the simulator configuration ...
|
||||
echo IMP five modem line interface loopback test...
|
||||
do impconfig.cmd
|
||||
SET IMP NUM=2
|
||||
|
||||
; Load the IMP code ...
|
||||
echo Loading IMP code ...
|
||||
do impcode.cmd
|
||||
|
||||
; Start up the modem links!
|
||||
SET MI1 ENABLED
|
||||
ATTACH MI1 4421:4431
|
||||
SET MI1 LOOPLINE
|
||||
SET MI2 ENABLED
|
||||
ATTACH MI2 4422:4432
|
||||
SET MI2 LOOPLINE
|
||||
SET MI3 ENABLED
|
||||
ATTACH MI3 4423:4433
|
||||
SET MI3 LOOPLINE
|
||||
SET MI4 ENABLED
|
||||
ATTACH MI4 4424:4434
|
||||
SET MI4 LOOPLINE
|
||||
SET MI5 ENABLED
|
||||
ATTACH MI5 4425:4435
|
||||
SET MI5 LOOPLINE
|
||||
|
||||
; And we're done ..
|
||||
echo Type GO to start ...
|
BIN
doc/h316_doc.doc
BIN
doc/h316_doc.doc
Binary file not shown.
BIN
doc/h316_imp.doc
BIN
doc/h316_imp.doc
Binary file not shown.
Loading…
Add table
Reference in a new issue