no message
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1312
This commit is contained in:
parent
7b27e666f2
commit
55591a56da
18 changed files with 246 additions and 41 deletions
|
@ -24,7 +24,7 @@
|
|||
typedef Bitu (*CallBack_Handler)(void);
|
||||
extern CallBack_Handler CallBack_Handlers[];
|
||||
|
||||
enum { CB_RETF,CB_IRET,CB_IRET_STI };
|
||||
enum { CB_RETF,CB_IRET,CB_IRET_STI,CB_IRET_ONLY };
|
||||
|
||||
#define CB_MAX 1024
|
||||
#define CB_SEG 0xC800
|
||||
|
|
|
@ -1091,10 +1091,14 @@ restart:
|
|||
flags.type=t_CF;
|
||||
break;
|
||||
case 0xfa: /* CLI */
|
||||
SETFLAGBIT(IF,false);
|
||||
// if (DPMI_IsActive()) DPMI_SetVirtualIntFlag(false);
|
||||
// else
|
||||
SETFLAGBIT(IF,false);
|
||||
break;
|
||||
case 0xfb: /* STI */
|
||||
SETFLAGBIT(IF,true);
|
||||
// if (DPMI_IsActive()) DPMI_SetVirtualIntFlag(true);
|
||||
// else
|
||||
SETFLAGBIT(IF,true);
|
||||
#ifdef CPU_PIC_CHECK
|
||||
if (GETFLAG(IF) && PIC_IRQCheck) goto decode_end;
|
||||
#endif
|
||||
|
|
|
@ -368,10 +368,14 @@ l_M_Ed:
|
|||
else reg_edx=0;
|
||||
goto nextopcode;
|
||||
case D_CLI:
|
||||
SETFLAGBIT(IF,false);
|
||||
// if (DPMI_IsActive()) DPMI_SetVirtualIntFlag(false);
|
||||
// else
|
||||
SETFLAGBIT(IF,false);
|
||||
goto nextopcode;
|
||||
case D_STI:
|
||||
SETFLAGBIT(IF,true);
|
||||
// if (DPMI_IsActive()) DPMI_SetVirtualIntFlag(true);
|
||||
// else
|
||||
SETFLAGBIT(IF,true);
|
||||
if (GETFLAG(IF) && PIC_IRQCheck) {
|
||||
LEAVECORE;
|
||||
return CBRET_NONE;
|
||||
|
|
|
@ -369,6 +369,14 @@ bool CBreakpoint::CheckIntBreakpoint(PhysPt adr, Bit8u intNr, Bit16u ahValue)
|
|||
} else
|
||||
ignoreAddressOnce = 0;
|
||||
|
||||
// TEMP
|
||||
static bool once = false;
|
||||
if (!once) {
|
||||
if ((intNr==0x21) && (reg_ah==0x3f) && (reg_cx==8450)) {
|
||||
once = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// Search matching breakpoint
|
||||
std::list<CBreakpoint*>::iterator i;
|
||||
CBreakpoint* bp;
|
||||
|
@ -629,8 +637,10 @@ static void DrawRegisters(void) {
|
|||
|
||||
oldflags=flags.word;
|
||||
|
||||
if (cpu.pmode) mvwprintw(dbg.win_reg,0,76,"Prot");
|
||||
else mvwprintw(dbg.win_reg,0,76,"Real");
|
||||
if (cpu.pmode) {
|
||||
if (cpu.code.big) mvwprintw(dbg.win_reg,0,76,"Pr32");
|
||||
else mvwprintw(dbg.win_reg,0,76,"Pr16");
|
||||
} else mvwprintw(dbg.win_reg,0,76,"Real");
|
||||
|
||||
// Selector info, if available
|
||||
if ((cpu.pmode) && curSelectorName[0]) {
|
||||
|
@ -877,6 +887,13 @@ bool ParseCommand(char* str)
|
|||
return true;
|
||||
}
|
||||
|
||||
found = strstr(str,"SR ");
|
||||
if (found) { // Set register value
|
||||
found+=2;
|
||||
if (ChangeRegister(found)) DEBUG_ShowMsg("DEBUG: Set Register success.");
|
||||
else DEBUG_ShowMsg("DEBUG: Set Register failure.");
|
||||
return true;
|
||||
}
|
||||
found = strstr(str,"BP ");
|
||||
if (found) { // Add new breakpoint
|
||||
found+=3;
|
||||
|
@ -958,13 +975,6 @@ bool ParseCommand(char* str)
|
|||
DEBUG_ShowMsg("DEBUG: Logfile LOGCPU.TXT created.");
|
||||
return true;
|
||||
}
|
||||
found = strstr(str,"SR ");
|
||||
if (found) { // Set register value
|
||||
found+=2;
|
||||
if (ChangeRegister(found)) DEBUG_ShowMsg("DEBUG: Set Register success.");
|
||||
else DEBUG_ShowMsg("DEBUG: Set Register failure.");
|
||||
return true;
|
||||
}
|
||||
found = strstr(str,"SM ");
|
||||
if (found) { // Set memory with following values
|
||||
found+=3;
|
||||
|
@ -1614,7 +1624,7 @@ void SaveMemory(Bit16u seg, Bit16u ofs1, Bit32s num)
|
|||
|
||||
#if C_HEAVY_DEBUG
|
||||
|
||||
const Bit32u LOGCPUMAX = 20000;
|
||||
const Bit32u LOGCPUMAX = 100000;
|
||||
|
||||
static Bit16u logCpuCS [LOGCPUMAX];
|
||||
static Bit32u logCpuEIP[LOGCPUMAX];
|
||||
|
@ -1669,8 +1679,168 @@ bool DEBUG_HeavyIsBreakpoint(void)
|
|||
skipFirstInstruction = false;
|
||||
return false;
|
||||
}
|
||||
PhysPt where = SegPhys(cs)+reg_eip;
|
||||
|
||||
static bool once = false;
|
||||
static Bit8u oldValue = 0;
|
||||
|
||||
/* if (!once && (mem_readb(0x276000)==205)) {
|
||||
LOG(LOG_MISC,LOG_ERROR)("Changed to 205");
|
||||
DEBUG_HeavyWriteLogInstruction();
|
||||
once = true;
|
||||
exitLoop = true;
|
||||
DEBUG_Enable();
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
if (cpu.pmode) {
|
||||
|
||||
if ((SegValue(cs)==0x010F) && (reg_eip==0x45941)) {
|
||||
LOG(LOG_MISC,LOG_ERROR)("REP MOVSB DS:ESI=%04X:%08X ES:EDI=%04X:%08X ECX=%08X",SegValue(ds),reg_esi,SegValue(es),reg_edi,reg_ecx);
|
||||
}
|
||||
|
||||
Descriptor desc;
|
||||
if (cpu.gdt.GetDescriptor(0x10F,desc)) {
|
||||
Bit8u newValue = mem_readb(desc.GetBase()+0x45941);
|
||||
if (oldValue!=newValue) {
|
||||
LOG(LOG_MISC,LOG_ERROR)("Value changed from %02X to %02X",oldValue,newValue);
|
||||
DEBUG_HeavyWriteLogInstruction();
|
||||
once = true;
|
||||
exitLoop = true;
|
||||
DEBUG_Enable();
|
||||
oldValue = newValue;
|
||||
return true;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
/* if (!once && cpu.pmode) {
|
||||
// if (mem_readw(0x779e64+0x2A5A)==0x05d4) {
|
||||
if (mem_readw(0x74cef0+0x0786)==0x05d4) {
|
||||
LOG(LOG_MISC,LOG_ERROR)("Compare value set to 0x05d4");
|
||||
DEBUG_HeavyWriteLogInstruction();
|
||||
once = true;
|
||||
exitLoop = true;
|
||||
DEBUG_Enable();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Descriptor desc;
|
||||
if (!once && cpu.gdt.GetDescriptor(0x43c,desc)) {
|
||||
// if (mem_readw(desc.GetBase()+0x97B4)==0x018C) {
|
||||
if (mem_readw(desc.GetBase()+0x2E10)==0x0000) {
|
||||
LOG(LOG_MISC,LOG_ERROR)("Index set ot 0x018C");
|
||||
//once = true;
|
||||
mem_writew(desc.GetBase()+0x2E10,0x0010);
|
||||
exitLoop = true;
|
||||
DEBUG_Enable();
|
||||
return true;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/* static Bitu lastval = 0;
|
||||
// if (mem_readd(0x11F000+0xB856)!=lastval) {
|
||||
if (mem_readd(0x11F000)!=lastval) {
|
||||
// lastval = mem_readd(0x11F000+0xB856);
|
||||
lastval = mem_readd(0x11F000);
|
||||
LOG(LOG_MISC,LOG_ERROR)("Changed to %08X",lastval);
|
||||
if (lastval==0) {
|
||||
DEBUG_HeavyWriteLogInstruction();
|
||||
exitLoop = true;
|
||||
DEBUG_Enable();
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
if (cpu.pmode) {
|
||||
if (mem_readd(SegPhys(cs)+reg_eip)==0) {
|
||||
DEBUG_HeavyWriteLogInstruction();
|
||||
exitLoop = true;
|
||||
DEBUG_Enable();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
*/
|
||||
/* if (cpu.pmode) {
|
||||
if ((SegValue(cs)==0x397) && (reg_eip==0x23B)) {
|
||||
DEBUG_HeavyWriteLogInstruction();
|
||||
exitLoop = true;
|
||||
DEBUG_Enable();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
*/
|
||||
/* if (cpu.pmode) {
|
||||
if (mem_readd(0x23602c)==0x00236030) {
|
||||
DEBUG_HeavyWriteLogInstruction();
|
||||
exitLoop = true;
|
||||
DEBUG_Enable();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
*/
|
||||
// if (!once && cpu.pmode) {
|
||||
|
||||
/* if (mem_readw(0x007f6904+2)==0xFEF0) {
|
||||
DEBUG_HeavyWriteLogInstruction();
|
||||
exitLoop = true;
|
||||
DEBUG_Enable();
|
||||
once = true;
|
||||
return true;
|
||||
};
|
||||
|
||||
/* Descriptor desc;
|
||||
if (cpu.gdt.GetDescriptor(0x0514,desc) && desc.saved.seg.p) {
|
||||
// if (desc.GetBase()!=0) { //6EEC1F1) {
|
||||
if (mem_readw(desc.GetBase()+0x000095a4)==0x006F) { //6EEC1F1) {
|
||||
DEBUG_HeavyWriteLogInstruction();
|
||||
exitLoop = true;
|
||||
DEBUG_Enable();
|
||||
once = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
/* if ((SegValue(cs)==0x01B) && (reg_eip==0x018C) && (reg_ax==0x0267)) {
|
||||
DEBUG_HeavyWriteLogInstruction();
|
||||
exitLoop = true;
|
||||
DEBUG_Enable();
|
||||
once = true;
|
||||
return true;
|
||||
}*/
|
||||
/* if ((SegValue(cs)==0x01B) && (reg_eip==0x018C) && (((reg_cx<<16)+reg_dx)==0x20)) {
|
||||
DEBUG_HeavyWriteLogInstruction();
|
||||
exitLoop = true;
|
||||
DEBUG_Enable();
|
||||
once = true;
|
||||
return true;
|
||||
}*/
|
||||
// }
|
||||
|
||||
/* if (!once && cpu.pmode) {
|
||||
if ((SegValue(cs)==0x001B) && (reg_eip==0x018C) && (reg_ax==0x0008) && (((reg_cx<<16)+reg_dx)==0x20)) {
|
||||
DEBUG_HeavyWriteLogInstruction();
|
||||
exitLoop = true;
|
||||
DEBUG_Enable();
|
||||
once = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/* if (SegValue(es)==0xFD5D) {
|
||||
DEBUG_HeavyWriteLogInstruction();
|
||||
exitLoop = true;
|
||||
DEBUG_Enable();
|
||||
return true;
|
||||
};
|
||||
*/
|
||||
|
||||
PhysPt where = SegPhys(cs)+reg_eip;
|
||||
if (CBreakpoint::CheckBreakpoint(SegValue(cs),reg_eip)) {
|
||||
// exitLoop = true;
|
||||
// DEBUG_Enable();
|
||||
|
|
|
@ -196,7 +196,7 @@ void LOG_StartUp(void) {
|
|||
|
||||
/* Register the log section */
|
||||
Section_prop * sect=control->AddSection_prop("log",LOG_Init);
|
||||
sect->Add_string("logfile","");
|
||||
sect->Add_string("logfile","log.txt");
|
||||
char buf[1024];
|
||||
for (Bitu i=1;i<LOG_MAX;i++) {
|
||||
strcpy(buf,loggrp[i].front);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: dos.cpp,v 1.53 2003-10-02 18:00:54 qbix79 Exp $ */
|
||||
/* $Id: dos.cpp,v 1.54 2003-10-13 19:44:46 finsterr Exp $ */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -38,6 +38,8 @@ Bit8u dos_copybuf[0x10000];
|
|||
static Bitu call_20,call_21,call_25,call_26,call_27,call_28,call_29;
|
||||
static Bitu call_casemap;
|
||||
|
||||
void DEBUG_HeavyWriteLogInstruction(void);
|
||||
|
||||
void DOS_SetError(Bit16u code) {
|
||||
dos.errorcode=code;
|
||||
}
|
||||
|
@ -48,6 +50,8 @@ static Bitu DOS_21Handler(void) {
|
|||
DOS_PSP psp(dos.psp);
|
||||
psp.SetStack(RealMake(SegValue(ss),reg_sp));
|
||||
|
||||
LOG(LOG_MISC,LOG_ERROR)("DOS: Call %04X %04X %04X %04X",reg_ax,reg_bx,reg_cx,reg_dx);
|
||||
|
||||
char name1[DOSNAMEBUF+1];
|
||||
char name2[DOSNAMEBUF+1];
|
||||
switch (reg_ah) {
|
||||
|
@ -270,6 +274,8 @@ static Bitu DOS_21Handler(void) {
|
|||
dos.dta=RealMakeSeg(ds,reg_dx);
|
||||
DOS_PSP psp(dos.psp);
|
||||
psp.SetDTA(dos.dta);
|
||||
DOS_DTA dta(dos.dta);
|
||||
LOG(LOG_MISC,LOG_ERROR)("DOS:1A:Set DTA %04X:%04X (ID:%04X)",SegValue(ds),reg_dx,dta.GetDirID());
|
||||
}
|
||||
break;
|
||||
case 0x25: /* Set Interrupt Vector */
|
||||
|
@ -321,6 +327,7 @@ static Bitu DOS_21Handler(void) {
|
|||
case 0x2f: /* Get Disk Transfer Area */
|
||||
SegSet16(es,RealSeg(dos.dta));
|
||||
reg_bx=RealOff(dos.dta);
|
||||
LOG(LOG_DOSMISC,LOG_ERROR)("DOS:2F:Get DTA: %04X:%04X",SegValue(es),reg_bx);
|
||||
break;
|
||||
case 0x30: /* Get DOS Version */
|
||||
if (reg_al==0) reg_bh=0xFF; /* Fake Microsoft DOS */
|
||||
|
@ -331,6 +338,7 @@ static Bitu DOS_21Handler(void) {
|
|||
case 0x31: /* Terminate and stay resident */
|
||||
//TODO First get normal files executing
|
||||
// Important: This service does not set the carry flag!
|
||||
LOG(LOG_DOSMISC,LOG_ERROR)("DOS:Terminated.");
|
||||
DOS_ResizeMemory(dos.psp,®_dx);
|
||||
DOS_Terminate(true);
|
||||
dos.return_code=reg_al;
|
||||
|
@ -527,7 +535,7 @@ static Bitu DOS_21Handler(void) {
|
|||
break;
|
||||
case 0x01: /* Set */
|
||||
LOG(LOG_MISC,LOG_ERROR)("DOS:Set File Attributes for %s not supported",name1);
|
||||
CALLBACK_SCF(false);
|
||||
CALLBACK_SCF(true);
|
||||
break;
|
||||
default:
|
||||
LOG(LOG_MISC,LOG_ERROR)("DOS:0x43:Illegal subfunction %2X",reg_al);
|
||||
|
@ -618,6 +626,8 @@ static Bitu DOS_21Handler(void) {
|
|||
case 0x4c: /* EXIT Terminate with return code */
|
||||
|
||||
{
|
||||
DEBUG_HeavyWriteLogInstruction();
|
||||
LOG(LOG_DOSMISC,LOG_ERROR)("DOS:Terminated 0x4C.");
|
||||
if (DOS_Terminate(false)) {
|
||||
/* This can't ever return false normally */
|
||||
} else {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: dos_ioctl.cpp,v 1.13 2003-09-30 08:56:52 qbix79 Exp $ */
|
||||
/* $Id: dos_ioctl.cpp,v 1.14 2003-10-13 19:44:46 finsterr Exp $ */
|
||||
|
||||
#include <string.h>
|
||||
#include "dosbox.h"
|
||||
|
@ -28,6 +28,7 @@
|
|||
bool DOS_IOCTL(void) {
|
||||
Bitu handle;Bit8u drive;
|
||||
if (reg_al<8) { /* call 0-7 use a file handle */
|
||||
Bitu what = reg_bx;
|
||||
handle=RealHandle(reg_bx);
|
||||
if (handle>=DOS_FILES) {
|
||||
DOS_SetError(DOSERR_INVALID_HANDLE);
|
||||
|
|
|
@ -186,7 +186,7 @@ void DOSBOX_Init(void) {
|
|||
secprop->AddInitFunction(&IO_Init);
|
||||
secprop->AddInitFunction(&PAGING_Init);
|
||||
secprop->AddInitFunction(&MEM_Init);
|
||||
secprop->Add_int("memsize",8); //We Default to 8 mb seems okay for now
|
||||
secprop->Add_int("memsize",16); //We Default to 8 mb seems okay for now
|
||||
secprop->AddInitFunction(&CALLBACK_Init);
|
||||
secprop->AddInitFunction(&PIC_Init);
|
||||
secprop->AddInitFunction(&PROGRAMS_Init);
|
||||
|
@ -198,10 +198,10 @@ void DOSBOX_Init(void) {
|
|||
secprop->Add_int("frameskip",0);
|
||||
secprop->Add_bool("keepsmall",false);
|
||||
secprop->Add_string("snapshots","snaps");
|
||||
secprop->Add_string("scaler","none");
|
||||
secprop->Add_string("scaler","scale2x");
|
||||
|
||||
secprop=control->AddSection_prop("cpu",&CPU_Init);
|
||||
secprop->Add_int("cycles",1800);
|
||||
secprop->Add_int("cycles",8000);
|
||||
#if C_FPU
|
||||
secprop->AddInitFunction(&FPU_Init);
|
||||
#endif
|
||||
|
@ -270,7 +270,7 @@ void DOSBOX_Init(void) {
|
|||
secprop->Add_hex("comport",2);
|
||||
secprop->Add_int("listenport",23);
|
||||
#endif
|
||||
|
||||
|
||||
// Mscdex
|
||||
secprop->AddInitFunction(&MSCDEX_Init);
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: sdlmain.cpp,v 1.45 2003-09-30 08:59:18 qbix79 Exp $ */
|
||||
/* $Id: sdlmain.cpp,v 1.46 2003-10-13 19:44:46 finsterr Exp $ */
|
||||
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
|
@ -284,7 +284,7 @@ static void GUI_StartUp(Section * sec) {
|
|||
Section_prop * section=static_cast<Section_prop *>(sec);
|
||||
sdl.active=false;
|
||||
sdl.full_screen=false;
|
||||
sdl.nowait=section->Get_bool("nowait");
|
||||
sdl.nowait=false; //section->Get_bool("nowait");
|
||||
sdl.mouse.locked=false;
|
||||
sdl.mouse.requestlock=false;
|
||||
sdl.mouse.autoenable=section->Get_bool("autolock");
|
||||
|
@ -300,7 +300,7 @@ static void GUI_StartUp(Section * sec) {
|
|||
/* Initialize screen for first time */
|
||||
GFX_SetSize(640,400,8,0,0,0);
|
||||
SDL_EnableKeyRepeat(250,30);
|
||||
SDL_EnableUNICODE(1);
|
||||
SDL_EnableUNICODE(0);
|
||||
/* Get some Keybinds */
|
||||
KEYBOARD_AddEvent(KBD_f9,KBD_MOD_CTRL,KillSwitch);
|
||||
KEYBOARD_AddEvent(KBD_f10,KBD_MOD_CTRL,CaptureMouse);
|
||||
|
|
|
@ -212,7 +212,7 @@ INLINE void ResetDMA8(DMA_CHANNEL * chan) {
|
|||
chan->address=(chan->page << 16)+chan->base_address;
|
||||
chan->current_count=chan->base_count+1;
|
||||
chan->current_address=chan->base_address;
|
||||
LOG(LOG_DMA,LOG_NORMAL)("Setup at address %X:%X count %X",chan->page<<12,chan->base_address,chan->current_count);
|
||||
// LOG(LOG_DMA,LOG_NORMAL)("Setup at address %X:%X count %X",chan->page<<12,chan->base_address,chan->current_count);
|
||||
}
|
||||
|
||||
Bitu DMA_8_Read(Bitu dmachan,Bit8u * buffer,Bitu count) {
|
||||
|
|
|
@ -24,7 +24,9 @@ IO_WriteBlock IO_WriteTable[IO_MAX];
|
|||
|
||||
void IO_Write(Bitu num,Bit8u val) {
|
||||
if (num<IO_MAX) IO_WriteTable[num].handler(num,val);
|
||||
else LOG(LOG_IO,LOG_WARN)("IO:Out or range write %X2 to port %4X",val,num);
|
||||
else {
|
||||
LOG(LOG_IO,LOG_WARN)("IO:Out or range write %X2 to port %4X",val,num);
|
||||
}
|
||||
}
|
||||
|
||||
Bit8u IO_Read(Bitu num) {
|
||||
|
|
|
@ -242,14 +242,20 @@ void mem_memcpy(PhysPt dest,PhysPt src,Bitu size) {
|
|||
void MEM_BlockRead(PhysPt pt,void * data,Bitu size) {
|
||||
Bit8u * write=(Bit8u *) data;
|
||||
while (size--) {
|
||||
*write++=mem_readb_inline(pt++);
|
||||
// *write++=mem_readb_inline(pt++);
|
||||
*write = mem_readb(pt);
|
||||
write++;
|
||||
pt++;
|
||||
}
|
||||
}
|
||||
|
||||
void MEM_BlockWrite(PhysPt pt,void * data,Bitu size) {
|
||||
Bit8u * read=(Bit8u *) data;
|
||||
while (size--) {
|
||||
mem_writeb_inline(pt++,*read++);
|
||||
// mem_writeb_inline(pt++,*read++);
|
||||
mem_writeb(pt,*read);
|
||||
pt++;
|
||||
read++;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -810,7 +816,7 @@ HostPt MEM_GetBlockPage(void) {
|
|||
memory.block.cur_page+=4096;
|
||||
} else {
|
||||
AllocBlock * newblock=new AllocBlock;
|
||||
memset(newblock,0,sizeof(AllocBlock)); //zero new allocated memory
|
||||
memset(newblock,0xcd,sizeof(AllocBlock)); //zero new allocated memory
|
||||
newblock->next=memory.block.cur_block;
|
||||
memory.block.cur_block=newblock;
|
||||
|
||||
|
@ -830,6 +836,11 @@ static void MEM_ShutDown(Section * sec) {
|
|||
}
|
||||
}
|
||||
|
||||
void MEM_SetRemainingMem(Bitu remaining)
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
void MEM_Init(Section * sec) {
|
||||
Bitu i;
|
||||
Section_prop * section=static_cast<Section_prop *>(sec);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: timer.cpp,v 1.16 2003-09-01 20:16:59 qbix79 Exp $ */
|
||||
/* $Id: timer.cpp,v 1.17 2003-10-13 19:44:47 finsterr Exp $ */
|
||||
|
||||
#include "dosbox.h"
|
||||
#include "inout.h"
|
||||
|
@ -116,7 +116,7 @@ static void write_latch(Bit32u port,Bit8u val) {
|
|||
case 0x00: /* Timer hooked to IRQ 0 */
|
||||
PIC_RemoveEvents(PIT0_Event);
|
||||
PIC_AddEvent(PIT0_Event,p->micro);
|
||||
LOG(LOG_PIT,LOG_NORMAL)("PIT 0 Timer at %.3g Hz mode %d",PIT_TICK_RATE/(double)p->cntr,(Bit32u)p->mode);
|
||||
// LOG(LOG_PIT,LOG_NORMAL)("PIT 0 Timer at %.3g Hz mode %d",PIT_TICK_RATE/(double)p->cntr,(Bit32u)p->mode);
|
||||
break;
|
||||
case 0x02: /* Timer hooked to PC-Speaker */
|
||||
// LOG(LOG_PIT,"PIT 2 Timer at %.3g Hz mode %d",PIT_TICK_RATE/(double)p->cntr,p->mode);
|
||||
|
|
|
@ -839,7 +839,7 @@ Bitu DPMI::RealModeCallback(void)
|
|||
reg_eip = RealOff(CALLBACK_RealPointer(callback.rmCallbackReturn));
|
||||
// call protected mode func
|
||||
SetVirtualIntFlag(false);
|
||||
SETFLAGBIT(IF,false);
|
||||
// SETFLAGBIT(IF,false);
|
||||
SETFLAGBIT(TF,false);
|
||||
CPU_Push32(flags.word);
|
||||
CPU_CALL(dpmi.client.bit32,dpmi.rmCallback[num].codeSelector,dpmi.rmCallback[num].codeOffset);
|
||||
|
@ -900,7 +900,7 @@ Bitu DPMI::CallRealIRETFrame(void)
|
|||
SegSet16(cs,RealSeg(CALLBACK_RealPointer(callback.rmIntFrameReturn)));
|
||||
reg_ip = RealOff(CALLBACK_RealPointer(callback.rmIntFrameReturn));
|
||||
SetVirtualIntFlag(false);
|
||||
SETFLAGBIT(IF,false);
|
||||
// SETFLAGBIT(IF,false);
|
||||
SETFLAGBIT(TF,false);
|
||||
CPU_CALL(false,newCS,newIP);
|
||||
return 0;
|
||||
|
|
|
@ -438,6 +438,7 @@ static Bit8u MemoryRegion(void) {
|
|||
|
||||
static Bitu INT67_Handler(void) {
|
||||
Bitu i;
|
||||
LOG(LOG_MISC,LOG_ERROR)("EMS: Call %04X %04X %04X %04X",reg_ax,reg_bx,reg_cx,reg_dx);
|
||||
switch (reg_ah) {
|
||||
case 0x40: /* Get Status */
|
||||
reg_ah=EMM_NO_ERROR;
|
||||
|
|
|
@ -107,6 +107,7 @@ static INLINE bool InvalidHandle(Bitu handle) {
|
|||
|
||||
Bitu XMS_QueryFreeMemory(Bit16u& largestFree, Bit16u& totalFree) {
|
||||
/* Scan the tree for free memory and find largest free block */
|
||||
|
||||
totalFree=(Bit16u)(MEM_FreeTotal()*4);
|
||||
largestFree=(Bit16u)(MEM_FreeLargest()*4);
|
||||
if (!totalFree) return XMS_OUT_OF_SPACE;
|
||||
|
@ -245,7 +246,7 @@ static bool multiplex_xms(void) {
|
|||
};
|
||||
|
||||
Bitu XMS_Handler(void) {
|
||||
// LOG(LOG_MISC,LOG_ERROR)("XMS: CALL %02X",reg_ah);
|
||||
LOG(LOG_MISC,LOG_ERROR)("XMS: CALL %02X",reg_ah);
|
||||
switch (reg_ah) {
|
||||
|
||||
case XMS_GET_VERSION: /* 00 */
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#define VERSION "0.60"
|
||||
|
||||
/* Define to 1 to enable internal debugger, requires libcurses */
|
||||
#define C_DEBUG 0
|
||||
#define C_DEBUG 1
|
||||
|
||||
/* Define to 1 to enable screenshots, requires libpng */
|
||||
#define C_SSHOT 1
|
||||
|
@ -12,7 +12,7 @@
|
|||
#define C_MODEM 1
|
||||
|
||||
/* Enable some heavy debugging options */
|
||||
#define C_HEAVY_DEBUG 0
|
||||
#define C_HEAVY_DEBUG 1
|
||||
|
||||
/* Enable memory function inlining in */
|
||||
#define C_CORE_INLINE 0
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: shell_cmds.cpp,v 1.29 2003-10-11 12:16:35 qbix79 Exp $ */
|
||||
/* $Id: shell_cmds.cpp,v 1.30 2003-10-13 19:44:47 finsterr Exp $ */
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
@ -265,7 +265,8 @@ void DOS_Shell::CMD_DIR(char * args) {
|
|||
WriteOut(MSG_Get("SHELL_CMD_DIR_INTRO"),path);
|
||||
|
||||
DOS_DTA dta(dos.dta);
|
||||
bool ret=DOS_FindFirst(args,0xffff & ~DOS_ATTR_VOLUME);
|
||||
// bool ret=DOS_FindFirst(args,0xffff & ~DOS_ATTR_VOLUME);
|
||||
bool ret=DOS_FindFirst(args,0xffff);
|
||||
if (!ret) {
|
||||
WriteOut(MSG_Get("SHELL_CMD_FILE_NOT_FOUND"),args);
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue