From 6cc52bd96a1edd02f86f443badb27de632b6c2a6 Mon Sep 17 00:00:00 2001 From: angelosa Date: Tue, 26 Nov 2024 17:08:27 +0100 Subject: nec/pc9801.cpp: fix upper ARTIC port reads --- src/mame/nec/pc9801.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mame/nec/pc9801.cpp b/src/mame/nec/pc9801.cpp index 580d8876022..5105de995a7 100644 --- a/src/mame/nec/pc9801.cpp +++ b/src/mame/nec/pc9801.cpp @@ -1066,9 +1066,15 @@ void pc9801vm_state::dma_access_ctrl_w(offs_t offset, u8 data) // ARTIC device +/* + * [0] read bits 15-0 of the counter device + * [1] read bits 23-8 of the counter device + * + * FreeDOS(98) Kernel will test [1] a whole lot during HMA allocation + */ uint16_t pc9801vm_state::timestamp_r(offs_t offset) { - return (m_maincpu->total_cycles() >> (16 * offset)); + return (m_maincpu->total_cycles() >> (8 * offset)); } void pc9801vm_state::artic_wait_w(u8 data) -- cgit v1.2.3