From 2233eb66625580d03ea124240a9cd943f8bb5766 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Strohh=C3=A4cker?= Date: Fri, 4 Nov 2005 21:22:06 +0000 Subject: [PATCH] correct trap-flag handling in rep_movs instructions (fixes J-Bird booter); handle reading of zero sectors through int13 correctly (fixes Metropolis booter) Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2367 --- src/cpu/core_normal/string.h | 1 + src/ints/bios_disk.cpp | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/cpu/core_normal/string.h b/src/cpu/core_normal/string.h index 33ce3d58..a2639eb4 100644 --- a/src/cpu/core_normal/string.h +++ b/src/cpu/core_normal/string.h @@ -34,6 +34,7 @@ static void DoString(STRING_OP type) { CPU_Cycles=0; LOADIP; //RESET IP to the start } else { + if ((count<=1) && (CPU_Cycles<=1)) CPU_Cycles--; /* Won't interrupt scas and cmps instruction since they can interrupt themselves */ count_left=0; } diff --git a/src/ints/bios_disk.cpp b/src/ints/bios_disk.cpp index 6608ad6b..8c2feb91 100644 --- a/src/ints/bios_disk.cpp +++ b/src/ints/bios_disk.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: bios_disk.cpp,v 1.23 2005-10-22 10:28:57 c2woody Exp $ */ +/* $Id: bios_disk.cpp,v 1.24 2005-11-04 21:22:06 c2woody Exp $ */ #include "dosbox.h" #include "callback.h" @@ -318,6 +318,11 @@ static Bitu INT13_DiskHandler(void) { } break; case 0x2: /* Read sectors */ + if (reg_al==0) { + reg_ah = 0x01; + CALLBACK_SCF(true); + return CBRET_NONE; + } if(driveInactive(drivenum)) { reg_ah = 0xff; CALLBACK_SCF(true); @@ -368,6 +373,11 @@ static Bitu INT13_DiskHandler(void) { CALLBACK_SCF(false); break; case 0x04: /* Verify sectors */ + if (reg_al==0) { + reg_ah = 0x01; + CALLBACK_SCF(true); + return CBRET_NONE; + } if(driveInactive(drivenum)) return CBRET_NONE; /* TODO: Finish coding this section */