aboutsummaryrefslogtreecommitdiff
path: root/src/consts.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/consts.rs')
-rw-r--r--src/consts.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/consts.rs b/src/consts.rs
new file mode 100644
index 0000000..dd06796
--- /dev/null
+++ b/src/consts.rs
@@ -0,0 +1,12 @@
+pub const PROGRAM_START_ADDRESS: u16 = 0x0;
+pub const STACK_START_ADDRESS: u16 = 0x0;
+
+pub const SPEEDUP_FACTOR: f64 = 1.0;
+
+pub const DISPLAY_UPDATE_RATE: u64 = 60; // Hertz
+pub const DISPLAY_UPDATE_SLEEP_TIME_MICROS: u64 =
+ ((1000000 / DISPLAY_UPDATE_RATE) as f64 / SPEEDUP_FACTOR) as u64;
+
+pub const CPU_CLOCK_SPEED: u64 = 4_194_304;
+pub const CPU_CYCLE_LENGTH_NANOS: u64 =
+ ((1_000_000_000 / CPU_CLOCK_SPEED) as f64 / SPEEDUP_FACTOR) as u64;