From 4ae0de84c69151882cbc9e0e61496f06a886ab1d Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Sun, 17 Jul 2022 17:30:20 -1000 Subject: [PATCH] SCP: Double the initial & pre-calibrated instructions/cycles per second. uint32 gives us an extra bit and negative instruction rates are not meaningful. --- scp.h | 2 +- sim_timer.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scp.h b/scp.h index 2c3299cd..0e2de905 100644 --- a/scp.h +++ b/scp.h @@ -380,7 +380,7 @@ extern t_value (*sim_vm_pc_value) (void); extern t_bool (*sim_vm_is_subroutine_call) (t_addr **ret_addrs); extern void (*sim_vm_reg_update) (REG *rptr, uint32 idx, t_value prev_val, t_value new_val); extern const char **sim_clock_precalibrate_commands; -extern int32 sim_vm_initial_ips; /* base estimate of simulated instructions per second */ +extern uint32 sim_vm_initial_ips; /* base estimate of simulated instructions per second */ extern const char *sim_vm_interval_units; /* Simulator can change this - default "instructions" */ extern const char *sim_vm_step_unit; /* Simulator can change this - default "instruction" */ diff --git a/sim_timer.c b/sim_timer.c index 0b0d7514..70987d34 100644 --- a/sim_timer.c +++ b/sim_timer.c @@ -150,9 +150,9 @@ return real_sim_os_ms_sleep (msec); t_bool sim_idle_enab = FALSE; /* global flag */ volatile t_bool sim_idle_wait = FALSE; /* global flag */ -int32 sim_vm_initial_ips = SIM_INITIAL_IPS; +uint32 sim_vm_initial_ips = SIM_INITIAL_IPS; -static int32 sim_precalibrate_ips = SIM_INITIAL_IPS; +static uint32 sim_precalibrate_ips = SIM_INITIAL_IPS; static int32 sim_calb_tmr = -1; /* the system calibrated timer */ static int32 sim_calb_tmr_last = -1; /* shadow value when at sim> prompt */ static double sim_inst_per_sec_last = 0; /* shadow value when at sim> prompt */