From 491ce6c39e20813c14b44de319604c9419e96c21 Mon Sep 17 00:00:00 2001 From: User65-87-11 Date: Mon, 15 Dec 2025 16:05:44 +0200 Subject: [PATCH] disk_1308 nlc-- double decrement 0->ff fix --- src/disk.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/disk.c b/src/disk.c index 0328fbd1..ea7e82c2 100644 --- a/src/disk.c +++ b/src/disk.c @@ -295,7 +295,14 @@ disk_1308(struct bregs *regs, struct drive_s *drive_fl) } else if (regs->dl < EXTSTART_CD) { // Hard drive count = GET_BDA(hdcount); - nlc--; // last sector reserved + + //is [nlc--] actually needed in an emulator? + //when emulated CYL=1 Hard drive then double decrement causes ff to be returned by int 13h ah=08h + + // if(nlc > 0) + // nlc--; + + } else { // Not supported on CDROM disk_ret(regs, DISK_RET_EPARAM);