diff --git a/src/dos/dos_programs.cpp b/src/dos/dos_programs.cpp index 3432341d..aa83df83 100644 --- a/src/dos/dos_programs.cpp +++ b/src/dos/dos_programs.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: dos_programs.cpp,v 1.49 2005-12-19 20:39:51 c2woody Exp $ */ +/* $Id: dos_programs.cpp,v 1.50 2006-01-05 14:14:52 c2woody Exp $ */ #include #include @@ -471,12 +471,17 @@ public: WriteOut(MSG_Get("PROGRAM_BOOT_BOOT"), drive); for(i=0;i<512;i++) real_writeb(0, 0x7c00 + i, bootarea.rawdata[i]); + /* revector some dos-allocated interrupts */ + real_writed(0,0x01*4,0xf000ff53); + real_writed(0,0x03*4,0xf000ff53); + SegSet16(cs, 0); reg_ip = 0x7c00; SegSet16(ds, 0); - SegSet16(ss, 0);//Buckrogers Booter - reg_esp = 0x400; SegSet16(es, 0); + /* set up stack at a safe place */ + SegSet16(ss, 0x7000); + reg_esp = 0xfffe; reg_esi = 0; reg_ecx = 1; reg_ebp = 0; diff --git a/src/ints/bios.cpp b/src/ints/bios.cpp index 8eb2e430..49a1717d 100644 --- a/src/ints/bios.cpp +++ b/src/ints/bios.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: bios.cpp,v 1.55 2005-12-20 21:33:02 c2woody Exp $ */ +/* $Id: bios.cpp,v 1.56 2006-01-05 14:14:53 c2woody Exp $ */ #include "dosbox.h" #include "mem.h" @@ -984,6 +984,11 @@ public: size_extended=IO_Read(0x71); IO_Write(0x70,0x31); size_extended|=(IO_Read(0x71) << 8); + + phys_writeb(0xfff53,0xcf); /* bios default interrupt vector location */ + phys_writeb(0xfe987,0xea); /* original IRQ1 location (Defender booter) */ + phys_writed(0xfe988,RealGetVec(0x09)); + if (machine==MCH_PCJR) PIC_AddEvent(RAMRefresh_Event,RAM_REFRESH_DELAY); } ~BIOS(){