1
0
mirror of https://github.com/open-simh/simh.git synced 2026-04-26 04:07:23 +00:00

Imlac: Make display rate adjustable.

This commit is contained in:
Lars Brinkhoff
2025-06-23 08:49:30 +02:00
committed by Paul Koning
parent 29b8125aca
commit 8a31996d18

View File

@@ -41,6 +41,7 @@ static uint16 BLOCK = 0;
static uint16 MIT8K; static uint16 MIT8K;
static uint16 SGR; static uint16 SGR;
static uint16 SYNC = 1; static uint16 SYNC = 1;
static uint16 HZ = 40;
/* Function declaration. */ /* Function declaration. */
static uint16 dp_iot (uint16, uint16); static uint16 dp_iot (uint16, uint16);
@@ -95,6 +96,7 @@ static UNIT sync_unit = {
static REG sync_reg[] = { static REG sync_reg[] = {
{ ORDATAD (SYNC, SYNC, 1, "Flag") }, { ORDATAD (SYNC, SYNC, 1, "Flag") },
{ ORDATAD (HZ, HZ, 1, "Frequency") },
{ NULL } { NULL }
}; };
@@ -485,7 +487,7 @@ dp_reset(DEVICE * uptr)
static t_stat static t_stat
sync_svc (UNIT *uptr) sync_svc (UNIT *uptr)
{ {
sim_debug (DBG, &sync_dev, "40 Hz sync\n"); sim_debug (DBG, &sync_dev, "Display sync (%d Hz)\n", HZ);
SYNC = 1; SYNC = 1;
if (SYNC && HALT) if (SYNC && HALT)
flag_on (FLAG_SYNC); flag_on (FLAG_SYNC);
@@ -500,7 +502,7 @@ sync_iot (uint16 insn, uint16 AC)
sim_debug (DBG, &sync_dev, "Clear flag\n"); sim_debug (DBG, &sync_dev, "Clear flag\n");
SYNC = 0; SYNC = 0;
flag_off (FLAG_SYNC); flag_off (FLAG_SYNC);
sim_activate_after (&sync_unit, 25000); sim_activate_after (&sync_unit, 1000000 / HZ);
} }
if ((insn & 0772) == 0072) { /* IOS */ if ((insn & 0772) == 0072) { /* IOS */
} }