From 832f1bf0d4e98465161fdbafccb96a57fa59084a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Strohh=C3=A4cker?= Date: Fri, 22 Apr 2011 14:18:00 +0000 Subject: [PATCH] add compatibility POST chaining, certain game exiting should look better now (ripsaw, sort of fixes a hangup with Astro Dodge) Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3698 --- include/bios.h | 3 ++- src/ints/bios.cpp | 14 +++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/include/bios.h b/include/bios.h index 8f722d6d..d03eef54 100644 --- a/include/bios.h +++ b/include/bios.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2010 The DOSBox Team + * Copyright (C) 2002-2011 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -106,6 +106,7 @@ #define BIOS_DEFAULT_IRQ0_LOCATION (RealMake(0xf000,0xfea5)) #define BIOS_DEFAULT_IRQ1_LOCATION (RealMake(0xf000,0xe987)) #define BIOS_DEFAULT_IRQ2_LOCATION (RealMake(0xf000,0xff55)) +#define BIOS_DEFAULT_RESET_LOCATION (RealMake(0xf000,0xe05b)) /* maximum of scancodes handled by keyboard bios routines */ #define MAX_SCAN_CODE 0x58 diff --git a/src/ints/bios.cpp b/src/ints/bios.cpp index 1f1d20ba..bf5eda52 100644 --- a/src/ints/bios.cpp +++ b/src/ints/bios.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2010 The DOSBox Team + * Copyright (C) 2002-2011 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -911,10 +911,14 @@ public: callback[10].Set_RealVec(0x18); RealPt rptr = callback[10].Get_RealPointer(); RealSetVec(0x19,rptr); - // set system BIOS entry point too - phys_writeb(0xFFFF0,0xEA); // FARJMP - phys_writew(0xFFFF1,RealOff(rptr)); // offset - phys_writew(0xFFFF3,RealSeg(rptr)); // segment + // power on selftest routine location + phys_writeb(Real2Phys(BIOS_DEFAULT_RESET_LOCATION)+0,0xEA); // FARJMP + phys_writew(Real2Phys(BIOS_DEFAULT_RESET_LOCATION)+1,RealOff(rptr)); // offset + phys_writew(Real2Phys(BIOS_DEFAULT_RESET_LOCATION)+3,RealSeg(rptr)); // segment + // reset jump (directed to POST) + phys_writeb(0xFFFF0,0xEA); // FARJMP + phys_writew(0xFFFF1,RealOff(BIOS_DEFAULT_RESET_LOCATION)); // offset + phys_writew(0xFFFF3,RealSeg(BIOS_DEFAULT_RESET_LOCATION)); // segment /* Irq 2 */ Bitu call_irq2=CALLBACK_Allocate();