mirror of
https://github.com/simh/simh.git
synced 2026-04-17 00:36:00 +00:00
PDP11, PDP8: Allow console input to configure parity and KSR mode
This commit is contained in:
@@ -55,6 +55,7 @@ t_stat tto_svc (UNIT *uptr);
|
||||
t_stat tti_reset (DEVICE *dptr);
|
||||
t_stat tto_reset (DEVICE *dptr);
|
||||
t_stat tty_set_mode (UNIT *uptr, int32 val, CONST char *cptr, void *desc);
|
||||
t_stat tty_set_parity (UNIT *uptr, int32 val, CONST char *cptr, void *desc);
|
||||
const char *tti_description (DEVICE *dptr);
|
||||
const char *tto_description (DEVICE *dptr);
|
||||
|
||||
@@ -81,10 +82,15 @@ REG tti_reg[] = {
|
||||
};
|
||||
|
||||
MTAB tti_mod[] = {
|
||||
{ TT_MODE, TT_MODE_KSR, "KSR", "KSR", &tty_set_mode },
|
||||
{ TT_MODE, TT_MODE_7B, "7b", "7B", &tty_set_mode },
|
||||
{ TT_MODE, TT_MODE_8B, "8b", "8B", &tty_set_mode },
|
||||
{ TT_MODE, TT_MODE_7P, "7b", NULL, NULL },
|
||||
{ MTAB_XTD|MTAB_VDV, TT_MODE_KSR, NULL, "KSR", &tty_set_mode, NULL, NULL, "KSR teletype mode" },
|
||||
{ MTAB_XTD|MTAB_VDV, TT_MODE_7B, NULL, "7B", &tty_set_mode, NULL, NULL, "7 bit mode" },
|
||||
{ MTAB_XTD|MTAB_VDV, TT_MODE_8B, NULL, "8B", &tty_set_mode, NULL, NULL, "8 bit mode" },
|
||||
{ MTAB_XTD|MTAB_VDV, TT_MODE_7P, NULL, "7P", &tty_set_mode, NULL, NULL, "7 bit mode - non printing suppressed" },
|
||||
{ MTAB_XTD|MTAB_VDV, TT_PAR_SPACE, NULL, "SPACE", &tty_set_parity, NULL, NULL, "Space Parity" },
|
||||
{ MTAB_XTD|MTAB_VDV, TT_PAR_MARK, NULL, "MARK", &tty_set_parity, NULL, NULL, "Mark Parity" },
|
||||
{ MTAB_XTD|MTAB_VDV, TT_PAR_EVEN, NULL, "EVEN", &tty_set_parity, NULL, NULL, "Even Parity" },
|
||||
{ MTAB_XTD|MTAB_VDV, TT_PAR_ODD, NULL, "ODD", &tty_set_parity, NULL, NULL, "Odd Parity" },
|
||||
{ MTAB_XTD|MTAB_VDV, 0, "MODE", NULL, NULL, &sim_tt_show_modepar, NULL, "Mode and Parity" },
|
||||
{ MTAB_XTD|MTAB_VDV, 0, "DEVNO", NULL, NULL, &show_dev, NULL },
|
||||
{ 0 }
|
||||
};
|
||||
@@ -123,10 +129,15 @@ REG tto_reg[] = {
|
||||
};
|
||||
|
||||
MTAB tto_mod[] = {
|
||||
{ TT_MODE, TT_MODE_KSR, "KSR", "KSR", &tty_set_mode },
|
||||
{ TT_MODE, TT_MODE_7B, "7b", "7B", &tty_set_mode },
|
||||
{ TT_MODE, TT_MODE_8B, "8b", "8B", &tty_set_mode },
|
||||
{ TT_MODE, TT_MODE_7P, "7p", "7P", &tty_set_mode },
|
||||
{ MTAB_XTD|MTAB_VDV, TT_MODE_KSR, NULL, "KSR", &tty_set_mode, NULL, NULL, "KSR teletype mode" },
|
||||
{ MTAB_XTD|MTAB_VDV, TT_MODE_7B, NULL, "7B", &tty_set_mode, NULL, NULL, "7 bit mode" },
|
||||
{ MTAB_XTD|MTAB_VDV, TT_MODE_8B, NULL, "8B", &tty_set_mode, NULL, NULL, "8 bit mode" },
|
||||
{ MTAB_XTD|MTAB_VDV, TT_MODE_7P, NULL, "7P", &tty_set_mode, NULL, NULL, "7 bit mode - non printing suppressed" },
|
||||
{ MTAB_XTD|MTAB_VDV, TT_PAR_SPACE, NULL, "SPACE", &tty_set_parity, NULL, NULL, "Space Parity" },
|
||||
{ MTAB_XTD|MTAB_VDV, TT_PAR_MARK, NULL, "MARK", &tty_set_parity, NULL, NULL, "Mark Parity" },
|
||||
{ MTAB_XTD|MTAB_VDV, TT_PAR_EVEN, NULL, "EVEN", &tty_set_parity, NULL, NULL, "Even Parity" },
|
||||
{ MTAB_XTD|MTAB_VDV, TT_PAR_ODD, NULL, "ODD", &tty_set_parity, NULL, NULL, "Odd Parity" },
|
||||
{ MTAB_XTD|MTAB_VDV, 0, "MODE", NULL, NULL, &sim_tt_show_modepar, NULL, "Mode and Parity" },
|
||||
{ MTAB_XTD|MTAB_VDV, 0, "DEVNO", NULL, NULL, &show_dev },
|
||||
{ 0 }
|
||||
};
|
||||
@@ -285,8 +296,17 @@ return SCPE_OK;
|
||||
|
||||
t_stat tty_set_mode (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
|
||||
{
|
||||
tti_unit.flags = (tti_unit.flags & ~TT_MODE) | val;
|
||||
tto_unit.flags = (tto_unit.flags & ~TT_MODE) | val;
|
||||
sim_tt_set_mode (&tti_unit, val, cptr, desc);
|
||||
sim_tt_set_mode (&tto_unit, val, cptr, desc);
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
t_stat tty_set_parity (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
|
||||
{
|
||||
sim_tt_set_parity (&tti_unit, val, cptr, desc);
|
||||
sim_tt_set_parity (&tto_unit, val, cptr, desc);
|
||||
tti_unit.flags = (tti_unit.flags & ~TT_PAR) | val;
|
||||
tto_unit.flags = (tto_unit.flags & ~TT_PAR) | val;
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user