1
0
Fork 0

initialize private dos segment early; move int33 handler out of rom (Kippesoep)

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2874
This commit is contained in:
Sebastian Strohhäcker 2007-06-06 15:44:40 +00:00
parent def259b02e
commit 131553c479
3 changed files with 10 additions and 8 deletions

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: dos_inc.h,v 1.65 2007-01-08 20:36:53 qbix79 Exp $ */
/* $Id: dos_inc.h,v 1.66 2007-06-06 15:44:40 c2woody Exp $ */
#ifndef DOSBOX_DOS_INC_H
#define DOSBOX_DOS_INC_H
@ -85,6 +85,9 @@ enum { RETURN_EXIT=0,RETURN_CTRLC=1,RETURN_ABORT=2,RETURN_TSR=3};
#define DOS_SDA_OFS 0
#define DOS_MEM_START 0x102 //First Segment that DOS can use
#define DOS_PRIVATE_SEGMENT 0xc800
#define DOS_PRIVATE_SEGMENT_END 0xd000
/* internal Dos Tables */
extern DOS_File * Files[DOS_FILES];

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: dos_tables.cpp,v 1.26 2007-01-08 20:36:53 qbix79 Exp $ */
/* $Id: dos_tables.cpp,v 1.27 2007-06-06 15:44:40 c2woody Exp $ */
#include "dosbox.h"
#include "mem.h"
@ -40,10 +40,10 @@ RealPt DOS_TableLowCase;
static Bitu call_casemap;
static Bit16u dos_memseg;
static Bit16u dos_memseg=DOS_PRIVATE_SEGMENT;
Bit16u DOS_GetMemory(Bit16u pages) {
if (pages+dos_memseg>=0xd000) {
if (pages+dos_memseg>=DOS_PRIVATE_SEGMENT_END) {
E_Exit("DOS:Not enough memory for internal tables");
}
Bit16u page=dos_memseg;
@ -73,7 +73,6 @@ static Bit8u country_info[0x22] = {
};
void DOS_SetupTables(void) {
dos_memseg=0xc800;
Bit16u seg,seg2;Bitu i;
dos.tables.mediaid=RealMake(DOS_GetMemory(4),0);
dos.tables.tempdta=RealMake(DOS_GetMemory(4),0);

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: mouse.cpp,v 1.67 2007-06-03 16:46:33 c2woody Exp $ */
/* $Id: mouse.cpp,v 1.68 2007-06-06 15:44:40 c2woody Exp $ */
#include <string.h>
#include <math.h>
@ -961,8 +961,8 @@ Bitu MOUSE_UserInt_CB_Handler(void) {
void MOUSE_Init(Section* sec) {
// Callback for mouse interrupt 0x33
call_int33=CALLBACK_Allocate();
RealPt i33loc=RealMake(CB_SEG+1,(call_int33*CB_SIZE)-0x10);
// RealPt i33loc=RealMake(DOS_GetMemory(0x1)-1,0x10); // need another location
// RealPt i33loc=RealMake(CB_SEG+1,(call_int33*CB_SIZE)-0x10);
RealPt i33loc=RealMake(DOS_GetMemory(0x1)-1,0x10);
CALLBACK_Setup(call_int33,&INT33_Handler,CB_MOUSE,Real2Phys(i33loc),"Mouse");
// Wasteland needs low(seg(int33))!=0 and low(ofs(int33))!=0
real_writed(0,0x33<<2,i33loc);