diff --git a/src/machine/m_pcjr.c b/src/machine/m_pcjr.c index 156471176..608b32bba 100644 --- a/src/machine/m_pcjr.c +++ b/src/machine/m_pcjr.c @@ -8,7 +8,7 @@ * * Emulation of the IBM PCjr. * - * Version: @(#)m_pcjr.c 1.0.9 2018/09/19 + * Version: @(#)m_pcjr.c 1.0.10 2018/11/02 * * Authors: Sarah Walker, * Miran Grca, @@ -27,6 +27,7 @@ #include #define HAVE_STDARG_H #include "../86box.h" +#include "../cpu/cpu.h" #include "../io.h" #include "../nmi.h" #include "../pic.h" @@ -749,6 +750,12 @@ machine_pcjr_init(const machine_t *model) pit_init(); pit_set_out_func(&pit, 0, pit_irq0_timer_pcjr); + cpu_set(); + if (machines[machine].cpu[cpu_manufacturer].cpus[cpu_effective].cpu_type >= CPU_286) + setrtcconst(machines[machine].cpu[cpu_manufacturer].cpus[cpu_effective].rspeed); + else + setrtcconst(14318184.0); + if (serial_enabled[0]) serial_setup(1, 0x2f8, 3); @@ -763,6 +770,7 @@ machine_pcjr_init(const machine_t *model) device_add_ex(&pcjr_device, pcjr); /* Initialize the keyboard. */ + keyboard_scan = 1; key_queue_start = key_queue_end = 0; io_sethandler(0x0060, 4, kbd_read, NULL, NULL, kbd_write, NULL, NULL, pcjr);