.include "../cpu-z180/z180.def"
.include "../kernel.def"
-; -----------------------------------------------------------------------------
-; Constant used for timer configuration
-; -----------------------------------------------------------------------------
-TIMER_TICK_RATE = 100 ; Hz
-
; -----------------------------------------------------------------------------
; Initialisation code
; -----------------------------------------------------------------------------
; set up system tick timer
xor a
out0 (TIME_TCR), a
- ld hl, #(CPU_CLOCK_KHZ * (1000/20) / TIMER_TICK_RATE) ; timer ticks at PHI/20
+ ld hl, #(CPU_CLOCK_KHZ * (1000/20) / TICKSPERSEC) ; timer ticks at PHI/20
out0 (TIME_RLDR0L), l
out0 (TIME_RLDR0H), h
ld a, #0x11 ; enable downcounting and interrupts for timer 0 only
/* Banks as reported to user space */
#define CONFIG_BANKS 1
-#define TICKSPERSEC 100U /* Ticks per second */
+#define TICKSPERSEC 40U /* Ticks per second */
#define PROGBASE 0x0000 /* also data base */
#define PROGLOAD 0x0100 /* also data base */
#define PROGTOP 0xF000 /* Top of program, base of U_DATA copy */
-#define PROC_SIZE 64 /* Memory needed per process */
+#define PROC_SIZE 64 /* Memory needed per process */
/* WRS: this is probably wrong -- we want to swap the full 64K minus the common code */
/* For now let's just use something and fix this up later when we have a swap device */
; No standard clock speed for the Mark IV board, but this is a common choice.
USE_FANCY_MONITOR .equ 1 ; disabling this saves around approx 0.5KB
CPU_CLOCK_KHZ .equ 36864 ; 18.432MHz * 2
+TICKSPERSEC .equ 40 ; timer interrupt rate (Hz)
PROGBASE .equ 0x0000
PROGLOAD .equ 0x0100
/* Banks as reported to user space */
#define CONFIG_BANKS 1
-#define TICKSPERSEC 100U /* Ticks per second */
+#define TICKSPERSEC 40U /* Ticks per second */
#define PROGBASE 0x0000 /* also data base */
#define PROGLOAD 0x0100 /* also data base */
#define PROGTOP 0xF000 /* Top of program, base of U_DATA copy */
-#define PROC_SIZE 64 /* Memory needed per process */
+#define PROC_SIZE 64 /* Memory needed per process */
/* WRS: this is probably wrong -- we want to swap the full 64K minus the common code */
/* For now let's just use something and fix this up later when we have a swap device */
; (18.432MHz) but this made the machine unstable.
USE_FANCY_MONITOR .equ 1 ; disabling this saves around 0.5KB
CPU_CLOCK_KHZ .equ 16000 ; 16MHz is the stock crystal
+TICKSPERSEC .equ 40 ; timer interrupt rate (Hz)
PROGBASE .equ 0x0000
PROGLOAD .equ 0x0100