sync to latest DOSBox SVN

This commit is contained in:
dborth 2011-06-22 04:18:55 +00:00
parent 7fda45ac79
commit aa1effc345
243 changed files with 2175 additions and 866 deletions

View File

@ -43,11 +43,11 @@ ALSA_Headers
for Alsa support under linux. Part of the linux kernel sources
Licensed under LGPL
If you want compile from the CVS under a unix system, you'll also need
If you want compile from developer sources (SVN) under a unix system, you'll also need
automake (>=1.6), autoconf(>=2.50). Should be available at http://www.gnu.org
For building on unix systems.
If you are building from the cvs run ./autogen.sh first before doing the following.
If you are building from developer sources run ./autogen.sh first before doing the following.
1. ./configure
2. make
@ -101,4 +101,4 @@ src/ints/bios_keyboard.cpp and go to line 30 and read there how to fix it.
Build instructions for VC++6
Don't use VC++ 6: it creates faulty code in core_normal.cpp
Later Visual Studio versions work fine (vs2003/.net, vs2005, vs2008)
Later Visual Studio versions work fine (vs2003/.net up to vs2010)

View File

@ -305,7 +305,7 @@ AC_SUBST(ALSA_LIBS)
AH_TOP([
/*
* 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

View File

@ -38,7 +38,7 @@ CPPFLAGS="$CPPFLAGS $SDL_CFLAGS"
dnl Check if SDL is 1.2.x (1.3 not supported)
AC_MSG_CHECKING([SDL version only being 1.2.X])
AC_COMPILE_IFELSE([
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#include "SDL.h"
void blah(){
#if SDL_MINOR_VERSION != 2
@ -46,7 +46,7 @@ void blah(){
#endif
;
}
],AC_MSG_RESULT([yes]),[
])],AC_MSG_RESULT([yes]),[
AC_MSG_RESULT([no])
AC_MSG_ERROR([Only libSDL 1.2.X supported])])
@ -82,7 +82,7 @@ AC_CHECK_HEADERS([sys/socket.h netinet/in.h pwd.h], [], [],
])
dnl check for the socklen_t (darwin doesn't always have it)
AC_COMPILE_IFELSE([
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#include <stdio.h>
#ifdef STDC_HEADERS
# include <stdlib.h>
@ -98,7 +98,7 @@ AC_COMPILE_IFELSE([
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
],[],[AC_DEFINE([socklen_t],[int],[Define to `int` if you don't have socklen_t])])
])],[],[AC_DEFINE([socklen_t],[int],[Define to `int` if you don't have socklen_t])])
AC_MSG_CHECKING(if environ can be included)
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
@ -111,13 +111,13 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern char ** environ;]],[[*environ;]])],
[AC_MSG_RESULT(yes);AC_DEFINE(ENVIRON_LINKED,1,[environ can be linked])],AC_MSG_RESULT(no))
AC_MSG_CHECKING([if dirent includes d_type])
AC_COMPILE_IFELSE([
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#include <sys/types.h>
#include <dirent.h>
void blah(){
struct dirent d_test;
d_test.d_type = 0;
}],[AC_MSG_RESULT(yes);AC_DEFINE(DIRENT_HAS_D_TYPE,1,[struct dirent has d_type])],AC_MSG_RESULT(no))
}])],[AC_MSG_RESULT(yes);AC_DEFINE(DIRENT_HAS_D_TYPE,1,[struct dirent has d_type])],AC_MSG_RESULT(no))
dnl Check for powf
@ -146,13 +146,13 @@ CFLAGS="-Werror"
AH_TEMPLATE([C_ATTRIBUTE_ALWAYS_INLINE],[Determines if the compilers supports always_inline attribute.])
AC_MSG_CHECKING(if compiler allows __attribute__((always_inline)) )
AC_COMPILE_IFELSE([ void __attribute__((always_inline)) test(){}
],[ AC_MSG_RESULT(yes);AC_DEFINE(C_ATTRIBUTE_ALWAYS_INLINE)],AC_MSG_RESULT(no))
AC_COMPILE_IFELSE([AC_LANG_SOURCE([ void __attribute__((always_inline)) test(){}
])],[ AC_MSG_RESULT(yes);AC_DEFINE(C_ATTRIBUTE_ALWAYS_INLINE)],AC_MSG_RESULT(no))
AH_TEMPLATE([C_ATTRIBUTE_FASTCALL],[Determines if the compilers supports fastcall attribute.])
AC_MSG_CHECKING(if compiler allows __attribute__((fastcall)) )
AC_COMPILE_IFELSE([ void __attribute__((fastcall)) test(){}
],[ AC_MSG_RESULT(yes);AC_DEFINE(C_ATTRIBUTE_FASTCALL)],AC_MSG_RESULT(no))
AC_COMPILE_IFELSE([AC_LANG_SOURCE([ void __attribute__((fastcall)) test(){}
])],[ AC_MSG_RESULT(yes);AC_DEFINE(C_ATTRIBUTE_FASTCALL)],AC_MSG_RESULT(no))
CFLAGS="$OLDCFLAGS"
@ -439,12 +439,12 @@ AC_CHECK_FUNC([mprotect],[AC_DEFINE(C_HAVE_MPROTECT,1)])
dnl Setpriority
AH_TEMPLATE(C_SET_PRIORITY,[Define to 1 if you have setpriority support])
AC_MSG_CHECKING(for setpriority support)
AC_LINK_IFELSE([
AC_LINK_IFELSE([AC_LANG_SOURCE([
#include <sys/resource.h>
int main(int argc,char * argv[]) {
return setpriority (PRIO_PROCESS, 0,PRIO_MIN+PRIO_MAX);
};
],AC_MSG_RESULT(yes);AC_DEFINE(C_SET_PRIORITY,1),AC_MSG_RESULT(no))
])],AC_MSG_RESULT(yes);AC_DEFINE(C_SET_PRIORITY,1),AC_MSG_RESULT(no))
dnl Some target detection and actions for them

View File

@ -218,7 +218,7 @@ The configuration file controls various settings of
the emulated soundcards and many
.RI "more things. It futher allows acces to " AUTOEXEC.BAT .
.LP
The language file controls all visible ouput of the internal commands and
The language file controls all visible output of the internal commands and
the internal dos.
.RB "See the section " FILES " for more information."
.TP

View File

@ -24,6 +24,7 @@ mixer.h \
modules.h \
mouse.h \
paging.h \
pci_bus.h \
pic.h \
programs.h \
render.h \

View File

@ -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

View File

@ -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
@ -65,6 +65,7 @@ public:
Bit32u sector_size;
Bit32u heads,cylinders,sectors;
Bit32u current_fpos;
};
void updateDPT(void);

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: callback.h,v 1.26 2009-08-23 17:24:54 c2woody Exp $ */
#ifndef DOSBOX_CALLBACK_H
#define DOSBOX_CALLBACK_H
@ -96,6 +95,8 @@ public:
void Install(CallBack_Handler handler,Bitu type,const char* description);
void Install(CallBack_Handler handler,Bitu type,PhysPt addr,const char* description);
void Uninstall();
//Only allocate a callback number
void Allocate(CallBack_Handler handler,const char* description=0);
Bit16u Get_callback() {

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: control.h,v 1.2 2009-05-27 09:15:40 qbix79 Exp $ */
#ifndef DOSBOX_CONTROL_H
#define DOSBOX_CONTROL_H

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: cpu.h,v 1.57 2009-05-27 09:15:40 qbix79 Exp $ */
#ifndef DOSBOX_CPU_H
#define DOSBOX_CPU_H

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: cross.h,v 1.21 2009-03-14 18:02:34 qbix79 Exp $ */
#ifndef DOSBOX_CROSS_H
#define DOSBOX_CROSS_H

View File

@ -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

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: dma.h,v 1.20 2009-07-24 09:56:14 c2woody Exp $ */
#ifndef DOSBOX_DMA_H
#define DOSBOX_DMA_H

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: dos_inc.h,v 1.83 2009-10-28 21:45:12 qbix79 Exp $ */
#ifndef DOSBOX_DOS_INC_H
#define DOSBOX_DOS_INC_H
@ -28,6 +27,8 @@
#include "mem.h"
#endif
#include <stddef.h> //for offsetof
#ifdef _MSC_VER
#pragma pack (1)
#endif
@ -176,8 +177,8 @@ bool DOS_FCBFindFirst(Bit16u seg,Bit16u offset);
bool DOS_FCBFindNext(Bit16u seg,Bit16u offset);
Bit8u DOS_FCBRead(Bit16u seg,Bit16u offset, Bit16u numBlocks);
Bit8u DOS_FCBWrite(Bit16u seg,Bit16u offset,Bit16u numBlocks);
Bit8u DOS_FCBRandomRead(Bit16u seg,Bit16u offset,Bit16u numRec,bool restore);
Bit8u DOS_FCBRandomWrite(Bit16u seg,Bit16u offset,Bit16u numRec,bool restore);
Bit8u DOS_FCBRandomRead(Bit16u seg,Bit16u offset,Bit16u * numRec,bool restore);
Bit8u DOS_FCBRandomWrite(Bit16u seg,Bit16u offset,Bit16u * numRec,bool restore);
bool DOS_FCBGetFileSize(Bit16u seg,Bit16u offset);
bool DOS_FCBDeleteFile(Bit16u seg,Bit16u offset);
bool DOS_FCBRenameFile(Bit16u seg, Bit16u offset);
@ -506,6 +507,7 @@ public:
bool Extended(void);
void GetAttr(Bit8u & attr);
void SetAttr(Bit8u attr);
void SetResultAttr(Bit8u attr);
bool Valid(void);
private:
bool extended;

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: dos_system.h,v 1.47 2009-03-04 21:08:22 c2woody Exp $ */
#ifndef DOSBOX_DOS_SYSTEM_H
#define DOSBOX_DOS_SYSTEM_H
@ -250,7 +249,7 @@ public:
virtual void Activate(void) {};
};
enum { OPEN_READ=0,OPEN_WRITE=1,OPEN_READWRITE=2, DOS_NOT_INHERIT=128};
enum { OPEN_READ=0, OPEN_WRITE=1, OPEN_READWRITE=2, OPEN_READ_NO_MOD=4, DOS_NOT_INHERIT=128};
enum { DOS_SEEK_SET=0,DOS_SEEK_CUR=1,DOS_SEEK_END=2};

View File

@ -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
@ -16,17 +16,16 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: dosbox.h,v 1.32 2009-05-27 09:15:41 qbix79 Exp $ */
#ifndef DOSBOX_DOSBOX_H
#define DOSBOX_DOSBOX_H
#include "config.h"
void E_Exit(const char * message,...) GCC_ATTRIBUTE( __format__(__printf__, 1, 2));
GCC_ATTRIBUTE(noreturn) void E_Exit(const char * message,...) GCC_ATTRIBUTE( __format__(__printf__, 1, 2));
void MSG_Add(const char*,const char*); //add messages to the internal langaugefile
const char* MSG_Get(char const *); //get messages from the internal langaugafile
void MSG_Add(const char*,const char*); //add messages to the internal languagefile
const char* MSG_Get(char const *); //get messages from the internal languagefile
class Section;

View File

@ -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

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: hardware.h,v 1.17 2009-06-23 17:46:05 c2woody Exp $ */
#ifndef DOSBOX_HARDWARE_H
#define DOSBOX_HARDWARE_H

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: inout.h,v 1.13 2009-05-27 09:15:41 qbix79 Exp $ */
#ifndef DOSBOX_INOUT_H
#define DOSBOX_INOUT_H
@ -60,11 +59,13 @@ public:
class IO_ReadHandleObject: private IO_Base{
public:
void Install(Bitu port,IO_ReadHandler * handler,Bitu mask,Bitu range=1);
void Uninstall();
~IO_ReadHandleObject();
};
class IO_WriteHandleObject: private IO_Base{
public:
void Install(Bitu port,IO_WriteHandler * handler,Bitu mask,Bitu range=1);
void Uninstall();
~IO_WriteHandleObject();
};

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: ipx.h,v 1.13 2009-05-27 09:15:41 qbix79 Exp $ */
#ifndef DOSBOX_IPX_H
#define DOSBOX_IPX_H

View File

@ -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

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: joystick.h,v 1.13 2009-05-27 09:15:41 qbix79 Exp $ */
#ifndef DOSBOX_JOYSTICK_H
#define DOSBOX_JOYSTICK_H
void JOYSTICK_Enable(Bitu which,bool enabled);

View File

@ -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

View File

@ -1,3 +1,21 @@
/*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef DOSBOX_LOGGING_H
#define DOSBOX_LOGGING_H
enum LOG_TYPES {
@ -9,6 +27,7 @@ enum LOG_TYPES {
LOG_PIT,LOG_KEYBOARD,LOG_PIC,
LOG_MOUSE,LOG_BIOS,LOG_GUI,LOG_MISC,
LOG_IO,
LOG_PCI,
LOG_MAX
};
@ -47,6 +66,10 @@ struct LOG
void operator()(char const* , double , double , double ) { }
void operator()(char const* , double , double , double , double ) { }
void operator()(char const* , double , double , double , double , double ) { }
void operator()(char const* , double , double , double , double , double , double ) { }
void operator()(char const* , double , double , double , double , double , double , double) { }
void operator()(char const* , char const* ) { }
void operator()(char const* , char const* , double ) { }
@ -55,7 +78,7 @@ struct LOG
void operator()(char const* , double , double, char const* ) { }
void operator()(char const* , char const*, char const*) { }
void operator()(char const* , double , double , double , char const* ) { }
}; //add missing operators to here
//try to avoid anything smaller than bit32...
void GFX_ShowMsg(char const* format,...) GCC_ATTRIBUTE(__format__(__printf__, 1, 2));

View File

@ -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

View File

@ -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

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: mixer.h,v 1.19 2009-04-28 21:48:24 harekiet Exp $ */
#ifndef DOSBOX_MIXER_H
#define DOSBOX_MIXER_H

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: mouse.h,v 1.15 2009-05-27 09:15:41 qbix79 Exp $ */
#ifndef DOSBOX_MOUSE_H

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: paging.h,v 1.33 2009-05-27 09:15:41 qbix79 Exp $ */
#ifndef DOSBOX_PAGING_H
#define DOSBOX_PAGING_H

85
include/pci_bus.h Normal file
View File

@ -0,0 +1,85 @@
/*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef DOSBOX_PCI_H
#define DOSBOX_PCI_H
//#define PCI_FUNCTIONALITY_ENABLED 0
#if defined PCI_FUNCTIONALITY_ENABLED
#define PCI_MAX_PCIDEVICES 10
#define PCI_MAX_PCIFUNCTIONS 8
class PCI_Device {
private:
Bits pci_id, pci_subfunction;
Bit16u vendor_id, device_id;
// subdevices declarations, they will respond to pci functions 1 to 7
// (main device is attached to function 0)
Bitu num_subdevices;
PCI_Device* subdevices[PCI_MAX_PCIFUNCTIONS-1];
public:
PCI_Device(Bit16u vendor, Bit16u device);
Bits PCIId(void) {
return pci_id;
}
Bits PCISubfunction(void) {
return pci_subfunction;
}
Bit16u VendorID(void) {
return vendor_id;
}
Bit16u DeviceID(void) {
return device_id;
}
void SetPCIId(Bitu number, Bits subfct);
bool AddSubdevice(PCI_Device* dev);
void RemoveSubdevice(Bits subfct);
PCI_Device* GetSubdevice(Bits subfct);
Bit16u NumSubdevices(void) {
if (num_subdevices>PCI_MAX_PCIFUNCTIONS-1) return PCI_MAX_PCIFUNCTIONS-1;
return num_subdevices;
}
Bits GetNextSubdeviceNumber(void) {
if (num_subdevices>=PCI_MAX_PCIFUNCTIONS-1) return -1;
return num_subdevices+1;
}
virtual Bits ParseReadRegister(Bit8u regnum)=0;
virtual Bits ParseWriteRegister(Bit8u regnum,Bit8u value)=0;
virtual bool InitializeRegisters(Bit8u registers[256])=0;
};
bool PCI_IsInitialized();
RealPt PCI_GetPModeInterface(void);
#endif
#endif

View File

@ -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

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: programs.h,v 1.19 2009-05-27 09:15:41 qbix79 Exp $ */
#ifndef DOSBOX_PROGRAMS_H
#define DOSBOX_PROGRAMS_H

View File

@ -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
@ -41,7 +41,7 @@
#define FLAG_ID 0x00200000
#define FMASK_TEST (FLAG_CF | FLAG_PF | FLAG_AF | FLAG_ZF | FLAG_SF | FLAG_OF)
#define FMASK_NORMAL (FMASK_TEST | FLAG_DF | FLAG_TF | FLAG_IF | FLAG_AC )
#define FMASK_NORMAL (FMASK_TEST | FLAG_DF | FLAG_TF | FLAG_IF )
#define FMASK_ALL (FMASK_NORMAL | FLAG_IOPL | FLAG_NT)
#define SETFLAGBIT(TYPE,TEST) if (TEST) reg_flags|=FLAG_ ## TYPE; else reg_flags&=~FLAG_ ## TYPE

View File

@ -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

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: serialport.h,v 1.18 2009-09-25 23:40:48 h-a-l-9000 Exp $ */
#ifndef DOSBOX_SERIALPORT_H
#define DOSBOX_SERIALPORT_H

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: setup.h,v 1.41 2009-05-27 09:15:41 qbix79 Exp $ */
#ifndef DOSBOX_SETUP_H
#define DOSBOX_SETUP_H

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: shell.h,v 1.28 2009-07-03 19:36:57 qbix79 Exp $ */
#ifndef DOSBOX_SHELL_H
#define DOSBOX_SHELL_H
@ -88,6 +87,8 @@ public:
void CMD_HELP(char * args);
void CMD_CLS(char * args);
void CMD_COPY(char * args);
void CMD_DATE(char * args);
void CMD_TIME(char * args);
void CMD_DIR(char * args);
void CMD_DELETE(char * args);
void CMD_ECHO(char * args);

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: support.h,v 1.18 2009-05-27 09:15:41 qbix79 Exp $ */
#ifndef DOSBOX_SUPPORT_H
#define DOSBOX_SUPPORT_H

View File

@ -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

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: vga.h,v 1.48 2009-11-03 21:06:59 h-a-l-9000 Exp $ */
#ifndef DOSBOX_VGA_H
#define DOSBOX_VGA_H
@ -173,8 +172,8 @@ typedef struct {
Bit8u curmode;
Bit16u originx, originy;
Bit8u fstackpos, bstackpos;
Bit8u forestack[3];
Bit8u backstack[3];
Bit8u forestack[4];
Bit8u backstack[4];
Bit16u startaddr;
Bit8u posx, posy;
Bit8u mc[64][64];

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: video.h,v 1.26 2009-05-27 09:15:41 qbix79 Exp $ */
#ifndef DOSBOX_VIDEO_H
#define DOSBOX_VIDEO_H

View File

@ -2,7 +2,7 @@
!define VER_MINOR 74
!define APP_NAME "DOSBox ${VER_MAYOR}.${VER_MINOR} Installer"
!define COMP_NAME "DOSBox Team"
!define COPYRIGHT "Copyright © 2002-2010 DOSBox Team"
!define COPYRIGHT "Copyright © 2002-2011 DOSBox Team"
!define DESCRIPTION "DOSBox Installer"
VIProductVersion "${VER_MAYOR}.${VER_MINOR}.0.0"

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: callback.cpp,v 1.42 2009-08-23 17:24:54 c2woody Exp $ */
#include <stdlib.h>
#include <string.h>
@ -65,7 +64,7 @@ void CALLBACK_Idle(void) {
Bit16u oldcs=SegValue(cs);
Bit32u oldeip=reg_eip;
SegSet16(cs,CB_SEG);
reg_eip=call_idle*CB_SIZE;
reg_eip=CB_SOFFSET+call_idle*CB_SIZE;
DOSBOX_RunMachine();
reg_eip=oldeip;
SegSet16(cs,oldcs);
@ -465,7 +464,7 @@ void CALLBACK_RemoveSetup(Bitu callback) {
}
}
CALLBACK_HandlerObject::~CALLBACK_HandlerObject(){
void CALLBACK_HandlerObject::Uninstall(){
if(!installed) return;
if(m_type == CALLBACK_HandlerObject::SETUP) {
if(vectorhandler.installed){
@ -484,6 +483,11 @@ CALLBACK_HandlerObject::~CALLBACK_HandlerObject(){
if(CallBack_Description[m_callback]) delete [] CallBack_Description[m_callback];
CallBack_Description[m_callback] = 0;
CALLBACK_DeAllocate(m_callback);
installed=false;
}
CALLBACK_HandlerObject::~CALLBACK_HandlerObject(){
Uninstall();
}
void CALLBACK_HandlerObject::Install(CallBack_Handler handler,Bitu type,const char* description){
@ -492,7 +496,7 @@ void CALLBACK_HandlerObject::Install(CallBack_Handler handler,Bitu type,const ch
m_type=SETUP;
m_callback=CALLBACK_Allocate();
CALLBACK_Setup(m_callback,handler,type,description);
} else E_Exit("Allready installed");
} else E_Exit("Callback handler object already installed");
}
void CALLBACK_HandlerObject::Install(CallBack_Handler handler,Bitu type,PhysPt addr,const char* description){
if(!installed) {
@ -500,7 +504,7 @@ void CALLBACK_HandlerObject::Install(CallBack_Handler handler,Bitu type,PhysPt a
m_type=SETUP;
m_callback=CALLBACK_Allocate();
CALLBACK_Setup(m_callback,handler,type,addr,description);
} else E_Exit("Allready installed");
} else E_Exit("Callback handler object already installed");
}
void CALLBACK_HandlerObject::Allocate(CallBack_Handler handler,const char* description) {
@ -510,7 +514,7 @@ void CALLBACK_HandlerObject::Allocate(CallBack_Handler handler,const char* descr
m_callback=CALLBACK_Allocate();
CALLBACK_SetDescription(m_callback,description);
CallBack_Handlers[m_callback]=handler;
} else E_Exit("Allready installed");
} else E_Exit("Callback handler object already installed");
}
void CALLBACK_HandlerObject::Set_RealVec(Bit8u vec){

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: core_dyn_x86.cpp,v 1.36 2009-07-20 17:55:52 c2woody Exp $ */
#include "dosbox.h"
@ -61,11 +60,8 @@
#define DYN_PAGE_HASH (4096>>DYN_HASH_SHIFT)
#define DYN_LINKS (16)
#if 0
#define DYN_LOG LOG_MSG
#else
#define DYN_LOG
#endif
//#define DYN_LOG 1 //Turn logging on
#if C_FPU
#define CPU_FPU 1 //Enable FPU escape instructions

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: cache.h,v 1.20 2009-07-12 20:13:05 c2woody Exp $ */
class CacheBlock {
public:

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: decoder.h,v 1.59 2009-10-18 17:52:09 c2woody Exp $ */
#define X86_DYNFPU_DH_ENABLED
#define X86_INLINED_MEMACCESS
@ -2104,7 +2103,9 @@ restart_prefix:
case 0xbf:dyn_mov_ev_gw(true);break;
default:
DYN_LOG("Unhandled dual opcode 0F%02X",dual_code);
#if DYN_LOG
LOG_MSG("Unhandled dual opcode 0F%02X",dual_code);
#endif
goto illegalopcode;
}
}break;
@ -2670,7 +2671,9 @@ restart_prefix:
}}
break;
default:
// DYN_LOG("Dynamic unhandled opcode %X",opcode);
#if DYN_LOG
// LOG_MSG("Dynamic unhandled opcode %X",opcode);
#endif
goto illegalopcode;
}
}

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: dyn_fpu.h,v 1.5 2009-09-23 20:55:19 c2woody Exp $ */
#include "dosbox.h"
#if C_FPU

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: dyn_fpu_dh.h,v 1.7 2009-09-23 20:55:19 c2woody Exp $ */
#include "dosbox.h"
#if C_FPU

View File

@ -1,3 +1,21 @@
/*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
static bool dyn_helper_divb(Bit8u val) {
if (!val) return CPU_PrepareException(0,0);
Bitu quo=reg_ax / val;

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: risc_x86.h,v 1.32 2009-05-27 09:15:41 qbix79 Exp $ */
static void gen_init(void);

View File

@ -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

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: core_dynrec.cpp,v 1.15 2009-08-02 16:52:33 c2woody Exp $ */
#include "dosbox.h"
@ -62,11 +61,9 @@
#define DYN_PAGE_HASH (4096>>DYN_HASH_SHIFT)
#define DYN_LINKS (16)
#if 0
#define DYN_LOG LOG_MSG
#else
#define DYN_LOG
#endif
//#define DYN_LOG 1 //Turn Logging on.
#if C_FPU
#define CPU_FPU 1 //Enable FPU escape instructions

View File

@ -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

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: decoder.h,v 1.8 2009-10-18 17:52:10 c2woody Exp $ */
#include "decoder_basic.h"
@ -242,7 +241,9 @@ restart_prefix:
case 0xbf:dyn_movx_ev_gw(true);break;
default:
// DYN_LOG("Unhandled dual opcode 0F%02X",dual_code);
#if DYN_LOG
// LOG_MSG("Unhandled dual opcode 0F%02X",dual_code);
#endif
goto illegalopcode;
}
break;
@ -579,7 +580,9 @@ restart_prefix:
break;
default:
// DYN_LOG("Dynrec unhandled opcode %X",opcode);
#if DYN_LOG
// LOG_MSG("Dynrec unhandled opcode %X",opcode);
#endif
goto illegalopcode;
}
}

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: decoder_basic.h,v 1.16 2009-10-08 20:01:31 c2woody Exp $ */
/*

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: decoder_opcodes.h,v 1.10 2009-10-18 17:52:10 c2woody Exp $ */
/*

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: dyn_fpu.h,v 1.8 2009-09-23 20:55:19 c2woody Exp $ */
#include "dosbox.h"

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: operators.h,v 1.8 2009-06-25 19:31:43 c2woody Exp $ */
static Bit8u DRC_CALL_CONV dynrec_add_byte(Bit8u op1,Bit8u op2) DRC_FC;

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: risc_armv4le-common.h,v 1.3 2009-05-16 21:52:47 c2woody Exp $ */
/* ARMv4 (little endian) backend by M-HT (common data/functions) */

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: risc_armv4le-o3.h,v 1.6 2009-06-27 12:51:10 c2woody Exp $ */
/* ARMv4 (little endian) backend by M-HT (size-tweaked arm version) */

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: risc_armv4le-s3.h,v 1.6 2009-06-27 12:51:10 c2woody Exp $ */
/* ARMv4 (little endian) backend by M-HT (speed-tweaked arm version) */

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: risc_armv4le-thumb-iw.h,v 1.5 2009-06-27 12:51:10 c2woody Exp $ */
/* ARMv4 (little endian) backend by M-HT (thumb version with data pool, requires -mthumb-interwork switch when compiling dosbox) */

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: risc_armv4le-thumb-niw.h,v 1.5 2009-06-27 12:51:10 c2woody Exp $ */
/* ARMv4 (little endian) backend by M-HT (thumb version with data pool) */

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: risc_armv4le-thumb.h,v 1.6 2009-06-27 12:51:10 c2woody Exp $ */
/* ARMv4 (little endian) backend by M-HT (thumb version) */

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: risc_armv4le.h,v 1.3 2009-05-27 09:15:41 qbix79 Exp $ */
/* ARMv4 (little endian) backend (switcher) by M-HT */

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: risc_mipsel32.h,v 1.6 2009-06-25 19:31:43 c2woody Exp $ */
/* MIPS32 (little endian) backend by crazyc */

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: risc_x64.h,v 1.13 2009-06-25 19:31:43 c2woody Exp $ */
// some configuring defines that specify the capabilities of this architecture
@ -84,7 +83,7 @@ static void gen_mov_regs(HostReg reg_dst,HostReg reg_src) {
}
static INLINE void gen_memaddr(HostReg reg,void* data) {
static INLINE void gen_reg_memaddr(HostReg reg,void* data) {
Bit64s diff = (Bit64s)data-((Bit64s)cache.pos+5);
if ((diff<0x80000000LL) && (diff>-0x80000000LL)) {
cache_addb(0x05+(reg<<3));
@ -98,13 +97,28 @@ static INLINE void gen_memaddr(HostReg reg,void* data) {
}
}
static INLINE void gen_memaddr(Bitu op,void* data,Bitu off) {
Bit64s diff;
diff = (Bit64s)data-((Bit64s)cache.pos+off+5);
if ((diff<0x80000000LL) && (diff>-0x80000000LL)) {
// RIP-relative addressing is offset after the instruction
cache_addb(op+1);
cache_addd((Bit32u)(((Bit64u)diff)&0xffffffffLL));
} else if ((Bit64u)data<0x100000000LL) {
cache_addb(op);
cache_addb(0x25);
cache_addd((Bit32u)(((Bit64u)data)&0xffffffffLL));
} else {
E_Exit("DRC64:Unhandled memory reference");
}
}
// move a 32bit (dword==true) or 16bit (dword==false) value from memory into dest_reg
// 16bit moves may destroy the upper 16bit of the destination register
static void gen_mov_word_to_reg(HostReg dest_reg,void* data,bool dword) {
if (!dword) cache_addb(0x66);
cache_addb(0x8b); // mov reg,[data]
gen_memaddr(dest_reg,data);
gen_reg_memaddr(dest_reg,data);
}
// move a 16bit constant value into dest_reg
@ -125,7 +139,7 @@ static void gen_mov_dword_to_reg_imm(HostReg dest_reg,Bit32u imm) {
static void gen_mov_word_from_reg(HostReg src_reg,void* dest,bool dword) {
if (!dword) cache_addb(0x66);
cache_addb(0x89); // mov [data],reg
gen_memaddr(src_reg,dest);
gen_reg_memaddr(src_reg,dest);
}
// move an 8bit value from memory into dest_reg
@ -134,7 +148,7 @@ static void gen_mov_word_from_reg(HostReg src_reg,void* dest,bool dword) {
// registers might not be directly byte-accessible on some architectures
static void gen_mov_byte_to_reg_low(HostReg dest_reg,void* data) {
cache_addb(0x8a); // mov reg,[data]
gen_memaddr(dest_reg,data);
gen_reg_memaddr(dest_reg,data);
}
// move an 8bit value from memory into dest_reg
@ -144,7 +158,7 @@ static void gen_mov_byte_to_reg_low(HostReg dest_reg,void* data) {
static void gen_mov_byte_to_reg_low_canuseword(HostReg dest_reg,void* data) {
cache_addb(0x66);
cache_addb(0x8b); // mov reg,[data]
gen_memaddr(dest_reg,data);
gen_reg_memaddr(dest_reg,data);
}
// move an 8bit constant value into dest_reg
@ -169,7 +183,7 @@ static void gen_mov_byte_to_reg_low_imm_canuseword(HostReg dest_reg,Bit8u imm) {
// move the lowest 8bit of a register into memory
static void gen_mov_byte_from_reg_low(HostReg src_reg,void* dest) {
cache_addb(0x88); // mov [data],reg
gen_memaddr(src_reg,dest);
gen_reg_memaddr(src_reg,dest);
}
@ -193,7 +207,7 @@ static void gen_extend_word(bool sign,HostReg reg) {
// add a 32bit value from memory to a full register
static void gen_add(HostReg reg,void* op) {
cache_addb(0x03); // add reg,[data]
gen_memaddr(reg,op);
gen_reg_memaddr(reg,op);
}
// add a 32bit constant value to a full register
@ -212,9 +226,8 @@ static void gen_and_imm(HostReg reg,Bit32u imm) {
// move a 32bit constant value into memory
static void gen_mov_direct_dword(void* dest,Bit32u imm) {
cache_addw(0x04c7); // mov [data],imm
cache_addb(0x25);
cache_addd((Bit32u)(((Bit64u)dest)&0xffffffffLL));
cache_addb(0xc7); // mov [data],imm
gen_memaddr(0x04,dest,4);
cache_addd(imm);
}
@ -235,9 +248,8 @@ static void INLINE gen_mov_direct_ptr(void* dest,DRC_PTR_SIZE_IM imm) {
// add an 8bit constant value to a memory value
static void gen_add_direct_byte(void* dest,Bit8s imm) {
cache_addw(0x0483); // add [data],imm
cache_addb(0x25);
cache_addd((Bit32u)(((Bit64u)dest)&0xffffffffLL));
cache_addb(0x83); // add [data],imm
gen_memaddr(0x4,dest,1);
cache_addb(imm);
}
@ -248,18 +260,20 @@ static void gen_add_direct_word(void* dest,Bit32u imm,bool dword) {
return;
}
if (!dword) cache_addb(0x66);
cache_addw(0x0481); // add [data],imm
cache_addb(0x25);
cache_addd((Bit32u)(((Bit64u)dest)&0xffffffffLL));
if (dword) cache_addd((Bit32u)imm);
else cache_addw((Bit16u)imm);
cache_addb(0x81); // add [data],imm
if (dword) {
gen_memaddr(0x4,dest,4); // size of following immediate value
cache_addd((Bit32u)imm);
} else {
gen_memaddr(0x4,dest,2); // size of following immediate value
cache_addw((Bit16u)imm);
}
}
// subtract an 8bit constant value from a memory value
static void gen_sub_direct_byte(void* dest,Bit8s imm) {
cache_addw(0x2c83); // sub [data],imm
cache_addb(0x25);
cache_addd((Bit32u)(((Bit64u)dest)&0xffffffffLL));
cache_addb(0x83); // sub [data],imm
gen_memaddr(0x2c,dest,1);
cache_addb(imm);
}
@ -270,11 +284,14 @@ static void gen_sub_direct_word(void* dest,Bit32u imm,bool dword) {
return;
}
if (!dword) cache_addb(0x66);
cache_addw(0x2c81); // sub [data],imm
cache_addb(0x25);
cache_addd((Bit32u)(((Bit64u)dest)&0xffffffffLL));
if (dword) cache_addd((Bit32u)imm);
else cache_addw((Bit16u)imm);
cache_addw(0x81); // sub [data],imm
if (dword) {
gen_memaddr(0x2c,dest,4); // size of following immediate value
cache_addd((Bit32u)imm);
} else {
gen_memaddr(0x2c,dest,2); // size of following immediate value
cache_addw((Bit16u)imm);
}
}
@ -324,10 +341,18 @@ static INLINE void gen_lea(HostReg dest_reg,Bitu scale,Bits imm) {
// generate a call to a parameterless function
static void INLINE gen_call_function_raw(void * func) {
cache_addb(0x48);
cache_addw(0xec83);
cache_addb(0x08); // sub rsp,0x08 (align stack to 16 byte boundary)
cache_addb(0x48);
cache_addb(0xb8); // mov reg,imm64
cache_addq((Bit64u)func);
cache_addw(0xd0ff);
cache_addb(0x48);
cache_addw(0xc483);
cache_addb(0x08); // add rsp,0x08 (reset alignment)
}
// generate a call to a function with paramcount parameters
@ -350,9 +375,13 @@ static Bit64u INLINE gen_call_function_setup(void * func,Bitu paramcount,bool fa
cache_addw(0xc483); // add rsp,0x08
cache_addb(0x08);
// stack is 16 byte aligned now
cache_addb(0x50); // push rax (==old rsp)
Bit64u proc_addr=(Bit64u)cache.pos;
// returned address relates to where the address is stored in gen_call_function_raw
Bit64u proc_addr=(Bit64u)cache.pos-4;
// Do the actual call to the procedure
cache_addb(0x48);
@ -596,6 +625,8 @@ static void gen_return_function(void) {
#ifdef DRC_FLAGS_INVALIDATION
// called when a call to a function can be replaced by a
// call to a simpler function
// check gen_call_function_raw and gen_call_function_setup
// for the targeted code
static void gen_fill_function_ptr(Bit8u * pos,void* fct_ptr,Bitu flags_type) {
#ifdef DRC_FLAGS_INVALIDATION_DCODE
// try to avoid function calls but rather directly fill in code
@ -604,36 +635,46 @@ static void gen_fill_function_ptr(Bit8u * pos,void* fct_ptr,Bitu flags_type) {
case t_ADDw:
case t_ADDd:
*(Bit32u*)(pos+0)=0xf001f889; // mov eax,edi; add eax,esi
*(Bit32u*)(pos+4)=0x909006eb; // skip
*(Bit32u*)(pos+4)=0x90900eeb; // skip
*(Bit32u*)(pos+8)=0x90909090;
*(Bit32u*)(pos+12)=0x90909090;
*(Bit32u*)(pos+16)=0x90909090;
break;
case t_ORb:
case t_ORw:
case t_ORd:
*(Bit32u*)(pos+0)=0xf009f889; // mov eax,edi; or eax,esi
*(Bit32u*)(pos+4)=0x909006eb; // skip
*(Bit32u*)(pos+4)=0x90900eeb; // skip
*(Bit32u*)(pos+8)=0x90909090;
*(Bit32u*)(pos+12)=0x90909090;
*(Bit32u*)(pos+16)=0x90909090;
break;
case t_ANDb:
case t_ANDw:
case t_ANDd:
*(Bit32u*)(pos+0)=0xf021f889; // mov eax,edi; and eax,esi
*(Bit32u*)(pos+4)=0x909006eb; // skip
*(Bit32u*)(pos+4)=0x90900eeb; // skip
*(Bit32u*)(pos+8)=0x90909090;
*(Bit32u*)(pos+12)=0x90909090;
*(Bit32u*)(pos+16)=0x90909090;
break;
case t_SUBb:
case t_SUBw:
case t_SUBd:
*(Bit32u*)(pos+0)=0xf029f889; // mov eax,edi; sub eax,esi
*(Bit32u*)(pos+4)=0x909006eb; // skip
*(Bit32u*)(pos+4)=0x90900eeb; // skip
*(Bit32u*)(pos+8)=0x90909090;
*(Bit32u*)(pos+12)=0x90909090;
*(Bit32u*)(pos+16)=0x90909090;
break;
case t_XORb:
case t_XORw:
case t_XORd:
*(Bit32u*)(pos+0)=0xf031f889; // mov eax,edi; xor eax,esi
*(Bit32u*)(pos+4)=0x909006eb; // skip
*(Bit32u*)(pos+4)=0x90900eeb; // skip
*(Bit32u*)(pos+8)=0x90909090;
*(Bit32u*)(pos+12)=0x90909090;
*(Bit32u*)(pos+16)=0x90909090;
break;
case t_CMPb:
case t_CMPw:
@ -641,37 +682,45 @@ static void gen_fill_function_ptr(Bit8u * pos,void* fct_ptr,Bitu flags_type) {
case t_TESTb:
case t_TESTw:
case t_TESTd:
*(Bit32u*)(pos+0)=0x90900aeb; // skip
*(Bit32u*)(pos+0)=0x909012eb; // skip
*(Bit32u*)(pos+4)=0x90909090;
*(Bit32u*)(pos+8)=0x90909090;
*(Bit32u*)(pos+12)=0x90909090;
*(Bit32u*)(pos+16)=0x90909090;
break;
case t_INCb:
case t_INCw:
case t_INCd:
*(Bit32u*)(pos+0)=0xc0fff889; // mov eax,edi; inc eax
*(Bit32u*)(pos+4)=0x909006eb; // skip
*(Bit32u*)(pos+4)=0x90900eeb; // skip
*(Bit32u*)(pos+8)=0x90909090;
*(Bit32u*)(pos+12)=0x90909090;
*(Bit32u*)(pos+16)=0x90909090;
break;
case t_DECb:
case t_DECw:
case t_DECd:
*(Bit32u*)(pos+0)=0xc8fff889; // mov eax,edi; dec eax
*(Bit32u*)(pos+4)=0x909006eb; // skip
*(Bit32u*)(pos+4)=0x90900eeb; // skip
*(Bit32u*)(pos+8)=0x90909090;
*(Bit32u*)(pos+12)=0x90909090;
*(Bit32u*)(pos+16)=0x90909090;
break;
case t_NEGb:
case t_NEGw:
case t_NEGd:
*(Bit32u*)(pos+0)=0xd8f7f889; // mov eax,edi; neg eax
*(Bit32u*)(pos+4)=0x909006eb; // skip
*(Bit32u*)(pos+4)=0x90900eeb; // skip
*(Bit32u*)(pos+8)=0x90909090;
*(Bit32u*)(pos+12)=0x90909090;
*(Bit32u*)(pos+16)=0x90909090;
break;
default:
*(Bit64u*)(pos+2)=(Bit64u)fct_ptr; // fill function pointer
*(Bit64u*)(pos+6)=(Bit64u)fct_ptr; // fill function pointer
break;
}
#else
*(Bit64u*)(pos+2)=(Bit64u)fct_ptr;
*(Bit64u*)(pos+6)=(Bit64u)fct_ptr; // fill function pointer
#endif
}
#endif

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: risc_x86.h,v 1.10 2009-06-25 19:31:43 c2woody Exp $ */
// some configuring defines that specify the capabilities of this architecture

View File

@ -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

View File

@ -1,3 +1,21 @@
/*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
{
EAPoint seg_base;
Bit16u off;

View File

@ -1,3 +1,21 @@
/*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
switch (inst.code.load) {
/* General loading */
case L_POPwRM:
@ -482,6 +500,13 @@ l_M_Ed:
case D_ICEBP:
CPU_SW_Interrupt_NoIOPLCheck(1,GetIP());
continue;
case D_RDTSC: {
if (CPU_ArchitectureType<CPU_ARCHTYPE_PENTIUMSLOW) goto illegalopcode;
Bit64s tsc=(Bit64s)(PIC_FullIndex()*(double)CPU_CycleMax);
reg_edx=(Bit32u)(tsc>>32);
reg_eax=(Bit32u)(tsc&0xffffffff);
break;
}
default:
LOG(LOG_CPU,LOG_ERROR)("LOAD:Unhandled code %d opcode %X",inst.code.load,inst.entry);
goto illegalopcode;

View File

@ -1,3 +1,21 @@
/*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#define SaveIP() reg_eip=(Bit32u)(inst.cseip-SegBase(cs));
#define LoadIP() inst.cseip=SegBase(cs)+reg_eip;
#define GetIP() (inst.cseip-SegBase(cs))

View File

@ -1,3 +1,21 @@
/*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* Do the actual opcode */
switch (inst.code.op) {
case t_ADDb: case t_ADDw: case t_ADDd:

View File

@ -1,3 +1,21 @@
/*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* Big ass opcode table normal,double, 66 normal, 66 double */
static OpCode OpCodeTable[1024]={
/* 0x00 - 0x07 */
@ -216,7 +234,7 @@ static OpCode OpCodeTable[1024]={
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
/* 0x130 - 0x137 */
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
{0 ,0 ,0 ,0 },{D_RDTSC ,0 ,0 ,0 },
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
@ -572,7 +590,7 @@ static OpCode OpCodeTable[1024]={
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
/* 0x330 - 0x337 */
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
{0 ,0 ,0 ,0 },{D_RDTSC ,0 ,0 ,0 },
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },

View File

@ -1,3 +1,21 @@
/*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* Write the data from the opcode */
switch (inst.code.save) {
/* Byte */

View File

@ -1,3 +1,21 @@
/*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
{
EAPoint si_base,di_base;
Bitu si_index,di_index;

View File

@ -1,3 +1,21 @@
/*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
enum {
L_N=0,
L_SKIP,
@ -46,6 +64,7 @@ enum {
D_CPUID,
D_HLT,D_CLTS,
D_LOCK,D_ICEBP,
D_RDTSC,
L_ERROR
};

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
@ -879,7 +879,7 @@
{
Bitu port=Fetchb();
if (CPU_IO_Exception(port,2)) RUNEXCEPTION();
reg_al=IO_ReadW(port);
reg_ax=IO_ReadW(port);
break;
}
CASE_B(0xe6) /* OUT Ib,AL */

View File

@ -1,3 +1,21 @@
/*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
enum STRING_OP {
R_OUTSB,R_OUTSW,R_OUTSD,
R_INSB,R_INSW,R_INSD,

View File

@ -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

View File

@ -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

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: core_prefetch.cpp,v 1.3 2009-06-26 16:43:30 c2woody Exp $ */
#include <stdio.h>

View File

@ -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

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: cpu.cpp,v 1.116 2009-03-16 18:10:08 c2woody Exp $ */
#include <assert.h>
#include <sstream>
@ -68,7 +67,7 @@ Bitu CPU_AutoDetermineMode = 0;
Bitu CPU_ArchitectureType = CPU_ARCHTYPE_MIXED;
Bitu CPU_flag_id_toggle=0;
Bitu CPU_extflags_toggle=0; // ID and AC flags may be toggled depending on emulated CPU architecture
Bitu CPU_PrefetchQueueSize=0;
@ -174,7 +173,7 @@ PhysPt SelBase(Bitu sel) {
void CPU_SetFlags(Bitu word,Bitu mask) {
mask|=CPU_flag_id_toggle; // ID-flag can be toggled on cpuid-supporting CPUs
mask|=CPU_extflags_toggle; // ID-flag and AC-flag can be toggled on CPUID-supporting CPUs
reg_flags=(reg_flags & ~mask)|(word & mask)|2;
cpu.direction=1-((reg_flags & FLAG_DF) >> 9);
}
@ -1551,6 +1550,7 @@ void CPU_SET_CRX(Bitu cr,Bitu value) {
switch (cr) {
case 0:
{
value|=CR0_FPUPRESENT;
Bitu changed=cpu.cr0 ^ value;
if (!changed) return;
cpu.cr0=value;
@ -2052,6 +2052,7 @@ static Bits HLT_Decode(void) {
if (reg_eip!=cpu.hlt.eip || SegValue(cs) != cpu.hlt.cs) {
cpudecoder=cpu.hlt.old_decoder;
} else {
CPU_IODelayRemoved += CPU_Cycles;
CPU_Cycles=0;
}
return 0;
@ -2059,6 +2060,7 @@ static Bits HLT_Decode(void) {
void CPU_HLT(Bitu oldeip) {
reg_eip=oldeip;
CPU_IODelayRemoved += CPU_Cycles;
CPU_Cycles=0;
cpu.hlt.cs=SegValue(cs);
cpu.hlt.eip=reg_eip;
@ -2391,8 +2393,9 @@ public:
CPU_ArchitectureType = CPU_ARCHTYPE_PENTIUMSLOW;
}
if (CPU_ArchitectureType>=CPU_ARCHTYPE_486NEWSLOW) CPU_flag_id_toggle=FLAG_ID;
else CPU_flag_id_toggle=0;
if (CPU_ArchitectureType>=CPU_ARCHTYPE_486NEWSLOW) CPU_extflags_toggle=(FLAG_ID|FLAG_AC);
else if (CPU_ArchitectureType>=CPU_ARCHTYPE_486OLDSLOW) CPU_extflags_toggle=(FLAG_AC);
else CPU_extflags_toggle=0;
if(CPU_CycleMax <= 0) CPU_CycleMax = 3000;

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: paging.cpp,v 1.36 2009-05-27 09:15:41 qbix79 Exp $ */
#include <stdlib.h>
#include <assert.h>
@ -44,16 +43,16 @@ Bitu PageHandler::readb(PhysPt addr) {
return 0;
}
Bitu PageHandler::readw(PhysPt addr) {
return
(readb(addr+0) << 0) |
(readb(addr+1) << 8);
Bitu ret = (readb(addr+0) << 0);
ret |= (readb(addr+1) << 8);
return ret;
}
Bitu PageHandler::readd(PhysPt addr) {
return
(readb(addr+0) << 0) |
(readb(addr+1) << 8) |
(readb(addr+2) << 16) |
(readb(addr+3) << 24);
Bitu ret = (readb(addr+0) << 0);
ret |= (readb(addr+1) << 8);
ret |= (readb(addr+2) << 16);
ret |= (readb(addr+3) << 24);
return ret;
}
void PageHandler::writeb(PhysPt addr,Bitu /*val*/) {

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: debug.cpp,v 1.97 2009-04-11 19:49:52 c2woody Exp $ */
#include "dosbox.h"
#if C_DEBUG
@ -1726,6 +1725,9 @@ Bit32u DEBUG_CheckKeys(void) {
}
if (ret<0) return ret;
if (ret>0) {
if (GCC_UNLIKELY(ret >= CB_MAX))
ret = 0;
else
ret = (*CallBack_Handlers[ret])();
if (ret) {
exitLoop=true;
@ -2174,11 +2176,11 @@ CDebugVar* CDebugVar::FindVar(PhysPt pt)
return 0;
};
bool CDebugVar::SaveVars(char* name)
{
bool CDebugVar::SaveVars(char* name) {
if (varList.size()>65535) return false;
FILE* f = fopen(name,"wb+");
if (!f) return false;
if (varList.size()>65535) return false;
// write number of vars
Bit16u num = (Bit16u)varList.size();

View File

@ -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
@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: debug_gui.cpp,v 1.38 2009-05-27 09:15:41 qbix79 Exp $ */
#include "dosbox.h"
@ -146,16 +145,17 @@ static void DrawBars(void) {
attrset(COLOR_PAIR(PAIR_BLACK_BLUE));
}
/* Show the Register bar */
mvaddstr(dbg.win_reg->_begy-1,0, "---(Register Overview )---");
mvaddstr(1-1,0, "---(Register Overview )---");
/* Show the Data Overview bar perhaps with more special stuff in the end */
mvaddstr(dbg.win_data->_begy-1,0,"---(Data Overview Scroll: page up/down)---");
mvaddstr(6-1,0,"---(Data Overview Scroll: page up/down)---");
/* Show the Code Overview perhaps with special stuff in bar too */
mvaddstr(dbg.win_code->_begy-1,0,"---(Code Overview Scroll: up/down )---");
mvaddstr(17-1,0,"---(Code Overview Scroll: up/down )---");
/* Show the Variable Overview bar */
mvaddstr(dbg.win_var->_begy-1,0, "---(Variable Overview )---");
mvaddstr(29-1,0, "---(Variable Overview )---");
/* Show the Output OverView */
mvaddstr(dbg.win_out->_begy-1,0, "---(Output Scroll: home/end )---");
mvaddstr(34-1,0, "---(Output Scroll: home/end )---");
attrset(0);
//Match values with below. So we don't need to touch the internal window structures
}
@ -164,19 +164,19 @@ static void MakeSubWindows(void) {
/* The Std output win should go in bottem */
/* Make all the subwindows */
int win_main_maxy, win_main_maxx; getmaxyx(dbg.win_main,win_main_maxy,win_main_maxx);
int outy=1;
int outy=1; //Match values with above
/* The Register window */
dbg.win_reg=subwin(dbg.win_main,4,win_main_maxx,outy,0);
outy+=5;
outy+=5; // 6
/* The Data Window */
dbg.win_data=subwin(dbg.win_main,10,win_main_maxx,outy,0);
outy+=11;
outy+=11; // 17
/* The Code Window */
dbg.win_code=subwin(dbg.win_main,11,win_main_maxx,outy,0);
outy+=12;
outy+=12; // 29
/* The Variable Window */
dbg.win_var=subwin(dbg.win_main,4,win_main_maxx,outy,0);
outy+=5;
outy+=5; // 34
/* The Output Window */
dbg.win_out=subwin(dbg.win_main,win_main_maxy-outy,win_main_maxx,outy,0);
// dbg.input_y=win_main_maxy-1;
@ -245,6 +245,7 @@ void LOG_StartUp(void) {
loggrp[LOG_MISC].front="MISC";
loggrp[LOG_IO].front="IO";
loggrp[LOG_PCI].front="PCI";
/* Register the log section */
Section_prop * sect=control->AddSection_prop("log",LOG_Init);

View File

@ -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
@ -18,7 +18,6 @@
/* Local Debug Function */
/* $Id: debug_inc.h,v 1.12 2009-05-27 09:15:41 qbix79 Exp $ */
#include <curses.h>
#include "mem.h"

View File

@ -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

View File

@ -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

Some files were not shown because too many files have changed in this diff Show More