add banked tlb (crazyc)
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3007
This commit is contained in:
parent
733a0244db
commit
72199985fa
9 changed files with 275 additions and 125 deletions
|
@ -16,6 +16,8 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: core_dyn_x86.cpp,v 1.33 2007-10-05 17:45:52 c2woody Exp $ */
|
||||
|
||||
#include "dosbox.h"
|
||||
|
||||
#if (C_DYNAMIC_X86)
|
||||
|
@ -346,8 +348,7 @@ run_block:
|
|||
case BR_Link2:
|
||||
{
|
||||
Bitu temp_ip=SegPhys(cs)+reg_eip;
|
||||
Bitu temp_page=temp_ip >> 12;
|
||||
CodePageHandler * temp_handler=(CodePageHandler *)paging.tlb.handler[temp_page];
|
||||
CodePageHandler * temp_handler=(CodePageHandler *)get_tlb_handler(temp_ip);
|
||||
if (temp_handler->flags & PFLAG_HASCODE) {
|
||||
block=temp_handler->FindCacheBlock(temp_ip & 4095);
|
||||
if (!block) goto restart_core;
|
||||
|
|
|
@ -69,7 +69,7 @@ public:
|
|||
Bits index=1+(end>>DYN_HASH_SHIFT);
|
||||
bool is_current_block=false;
|
||||
Bit32u ip_point=SegPhys(cs)+reg_eip;
|
||||
ip_point=((paging.tlb.phys_page[ip_point>>12]-phys_page)<<12)+(ip_point&0xfff);
|
||||
ip_point=(PAGING_GetPhysicalPage(ip_point)-(phys_page<<12))+(ip_point&0xfff);
|
||||
while (index>=0) {
|
||||
Bitu map=0;
|
||||
for (Bitu count=start;count<=end;count++) map+=write_map[count];
|
||||
|
|
|
@ -54,8 +54,7 @@ static bool MakeCodePage(Bitu lin_addr,CodePageHandler * &cph) {
|
|||
Bit8u rdval;
|
||||
//Ensure page contains memory:
|
||||
if (GCC_UNLIKELY(mem_readb_checked(lin_addr,&rdval))) return true;
|
||||
Bitu lin_page=lin_addr >> 12;
|
||||
PageHandler * handler=paging.tlb.handler[lin_page];
|
||||
PageHandler * handler=get_tlb_handler(lin_addr);
|
||||
if (handler->flags & PFLAG_HASCODE) {
|
||||
cph=( CodePageHandler *)handler;
|
||||
return false;
|
||||
|
@ -64,6 +63,7 @@ static bool MakeCodePage(Bitu lin_addr,CodePageHandler * &cph) {
|
|||
LOG_MSG("DYNX86:Can't run code in this page");
|
||||
cph=0; return false;
|
||||
}
|
||||
Bitu lin_page=lin_addr >> 12;
|
||||
Bitu phys_page=lin_page;
|
||||
if (!PAGING_MakePhysPage(phys_page)) {
|
||||
LOG_MSG("DYNX86:Can't find physpage");
|
||||
|
@ -176,9 +176,9 @@ static INLINE void decode_increase_wmapmask(Bitu size) {
|
|||
|
||||
static bool decode_fetchb_imm(Bitu & val) {
|
||||
if (decode.page.index<4096) {
|
||||
Bitu index=(decode.code>>12);
|
||||
if (paging.tlb.read[index]) {
|
||||
val=(Bitu)(paging.tlb.read[index]+decode.code);
|
||||
HostPt tlb_addr=get_tlb_read(decode.code);
|
||||
if (tlb_addr) {
|
||||
val=(Bitu)(tlb_addr+decode.code);
|
||||
decode_increase_wmapmask(1);
|
||||
decode.code++;
|
||||
decode.page.index++;
|
||||
|
@ -190,9 +190,9 @@ static bool decode_fetchb_imm(Bitu & val) {
|
|||
}
|
||||
static bool decode_fetchw_imm(Bitu & val) {
|
||||
if (decode.page.index<4095) {
|
||||
Bitu index=(decode.code>>12);
|
||||
if (paging.tlb.read[index]) {
|
||||
val=(Bitu)(paging.tlb.read[index]+decode.code);
|
||||
HostPt tlb_addr=get_tlb_read(decode.code);
|
||||
if (tlb_addr) {
|
||||
val=(Bitu)(tlb_addr+decode.code);
|
||||
decode_increase_wmapmask(2);
|
||||
decode.code+=2;
|
||||
decode.page.index+=2;
|
||||
|
@ -204,9 +204,9 @@ static bool decode_fetchw_imm(Bitu & val) {
|
|||
}
|
||||
static bool decode_fetchd_imm(Bitu & val) {
|
||||
if (decode.page.index<4093) {
|
||||
Bitu index=(decode.code>>12);
|
||||
if (paging.tlb.read[index]) {
|
||||
val=(Bitu)(paging.tlb.read[index]+decode.code);
|
||||
HostPt tlb_addr=get_tlb_read(decode.code);
|
||||
if (tlb_addr) {
|
||||
val=(Bitu)(tlb_addr+decode.code);
|
||||
decode_increase_wmapmask(4);
|
||||
decode.code+=4;
|
||||
decode.page.index+=4;
|
||||
|
@ -462,7 +462,7 @@ static void dyn_read_intro(DynReg * addr,bool release_addr=true) {
|
|||
}
|
||||
|
||||
bool mem_readb_checked_dcx86(PhysPt address) {
|
||||
return paging.tlb.handler[address>>12]->readb_checked(address, (Bit8u*)(&core_dyn.readdata));
|
||||
return get_tlb_handler(address)->readb_checked(address, (Bit8u*)(&core_dyn.readdata));
|
||||
}
|
||||
|
||||
static void dyn_read_byte(DynReg * addr,DynReg * dst,Bitu high) {
|
||||
|
@ -543,12 +543,12 @@ static void dyn_read_byte_release(DynReg * addr,DynReg * dst,Bitu high) {
|
|||
|
||||
bool mem_readd_checked_dcx86(PhysPt address) {
|
||||
if ((address & 0xfff)<0xffd) {
|
||||
Bitu index=(address>>12);
|
||||
if (paging.tlb.read[index]) {
|
||||
core_dyn.readdata=host_readd(paging.tlb.read[index]+address);
|
||||
HostPt tlb_addr=get_tlb_read(address);
|
||||
if (tlb_addr) {
|
||||
core_dyn.readdata=host_readd(tlb_addr+address);
|
||||
return false;
|
||||
} else {
|
||||
return paging.tlb.handler[index]->readd_checked(address, &core_dyn.readdata);
|
||||
return get_tlb_handler(address)->readd_checked(address, &core_dyn.readdata);
|
||||
}
|
||||
} else return mem_unalignedreadd_checked(address, &core_dyn.readdata);
|
||||
}
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: core_dynrec.cpp,v 1.8 2007-10-05 17:45:52 c2woody Exp $ */
|
||||
|
||||
#include "dosbox.h"
|
||||
|
||||
#if (C_DYNREC)
|
||||
|
@ -151,8 +153,7 @@ CacheBlockDynRec * LinkBlocks(BlockReturn ret) {
|
|||
CacheBlockDynRec * block=NULL;
|
||||
// the last instruction was a control flow modifying instruction
|
||||
Bitu temp_ip=SegPhys(cs)+reg_eip;
|
||||
Bitu temp_page=temp_ip >> 12;
|
||||
CodePageHandlerDynRec * temp_handler=(CodePageHandlerDynRec *)paging.tlb.handler[temp_page];
|
||||
CodePageHandlerDynRec * temp_handler=(CodePageHandlerDynRec *)get_tlb_handler(temp_ip);
|
||||
if (temp_handler->flags & PFLAG_HASCODE) {
|
||||
// see if the target is an already translated block
|
||||
block=temp_handler->FindCacheBlock(temp_ip & 4095);
|
||||
|
|
|
@ -117,7 +117,7 @@ public:
|
|||
bool is_current_block=false; // if the current block is modified, it has to be exited as soon as possible
|
||||
|
||||
Bit32u ip_point=SegPhys(cs)+reg_eip;
|
||||
ip_point=((paging.tlb.phys_page[ip_point>>12]-phys_page)<<12)+(ip_point&0xfff);
|
||||
ip_point=(PAGING_GetPhysicalPage(ip_point)-(phys_page<<12))+(ip_point&0xfff);
|
||||
while (index>=0) {
|
||||
Bitu map=0;
|
||||
// see if there is still some code in the range
|
||||
|
|
|
@ -132,9 +132,7 @@ static bool MakeCodePage(Bitu lin_addr,CodePageHandlerDynRec * &cph) {
|
|||
//Ensure page contains memory:
|
||||
if (GCC_UNLIKELY(mem_readb_checked(lin_addr,&rdval))) return true;
|
||||
|
||||
Bitu lin_page=lin_addr >> 12;
|
||||
|
||||
PageHandler * handler=paging.tlb.handler[lin_page];
|
||||
PageHandler * handler=get_tlb_handler(lin_addr);
|
||||
if (handler->flags & PFLAG_HASCODE) {
|
||||
// this is a codepage handler, and the one that we're looking for
|
||||
cph=(CodePageHandlerDynRec *)handler;
|
||||
|
@ -145,6 +143,7 @@ static bool MakeCodePage(Bitu lin_addr,CodePageHandlerDynRec * &cph) {
|
|||
cph=0;
|
||||
return false;
|
||||
}
|
||||
Bitu lin_page=lin_addr>>12;
|
||||
Bitu phys_page=lin_page;
|
||||
// find the physical page that the linear page is mapped to
|
||||
if (!PAGING_MakePhysPage(phys_page)) {
|
||||
|
@ -280,10 +279,10 @@ static bool decode_fetchb_imm(Bitu & val) {
|
|||
if (GCC_UNLIKELY(decode.page.index>=4096)) {
|
||||
decode_advancepage();
|
||||
}
|
||||
Bitu index=(decode.code>>12);
|
||||
HostPt tlb_addr=get_tlb_read(decode.code);
|
||||
// see if position is directly accessible
|
||||
if (paging.tlb.read[index]) {
|
||||
val=(Bitu)(paging.tlb.read[index]+decode.code);
|
||||
if (tlb_addr) {
|
||||
val=(Bitu)(tlb_addr+decode.code);
|
||||
decode_increase_wmapmask(1);
|
||||
decode.code++;
|
||||
decode.page.index++;
|
||||
|
@ -298,10 +297,10 @@ static bool decode_fetchb_imm(Bitu & val) {
|
|||
// otherwise val contains the current value read from the position
|
||||
static bool decode_fetchw_imm(Bitu & val) {
|
||||
if (decode.page.index<4095) {
|
||||
Bitu index=(decode.code>>12);
|
||||
HostPt tlb_addr=get_tlb_read(decode.code);
|
||||
// see if position is directly accessible
|
||||
if (paging.tlb.read[index]) {
|
||||
val=(Bitu)(paging.tlb.read[index]+decode.code);
|
||||
if (tlb_addr) {
|
||||
val=(Bitu)(tlb_addr+decode.code);
|
||||
decode_increase_wmapmask(2);
|
||||
decode.code+=2;
|
||||
decode.page.index+=2;
|
||||
|
@ -317,10 +316,10 @@ static bool decode_fetchw_imm(Bitu & val) {
|
|||
// otherwise val contains the current value read from the position
|
||||
static bool decode_fetchd_imm(Bitu & val) {
|
||||
if (decode.page.index<4093) {
|
||||
Bitu index=(decode.code>>12);
|
||||
HostPt tlb_addr=get_tlb_read(decode.code);
|
||||
// see if position is directly accessible
|
||||
if (paging.tlb.read[index]) {
|
||||
val=(Bitu)(paging.tlb.read[index]+decode.code);
|
||||
if (tlb_addr) {
|
||||
val=(Bitu)(tlb_addr+decode.code);
|
||||
decode_increase_wmapmask(4);
|
||||
decode.code+=4;
|
||||
decode.page.index+=4;
|
||||
|
@ -565,65 +564,65 @@ static void dyn_check_exception(HostReg reg) {
|
|||
|
||||
bool DRC_CALL_CONV mem_readb_checked_drc(PhysPt address) DRC_FC;
|
||||
bool DRC_CALL_CONV mem_readb_checked_drc(PhysPt address) {
|
||||
Bitu index=(address>>12);
|
||||
if (paging.tlb.read[index]) {
|
||||
*((Bit8u*)(&core_dynrec.readdata))=host_readb(paging.tlb.read[index]+address);
|
||||
HostPt tlb_addr=get_tlb_read(address);
|
||||
if (tlb_addr) {
|
||||
*((Bit8u*)(&core_dynrec.readdata))=host_readb(tlb_addr+address);
|
||||
return false;
|
||||
} else {
|
||||
return paging.tlb.handler[index]->readb_checked(address, (Bit8u*)(&core_dynrec.readdata));
|
||||
return get_tlb_handler(address)->readb_checked(address, (Bit8u*)(&core_dynrec.readdata));
|
||||
}
|
||||
}
|
||||
|
||||
bool DRC_CALL_CONV mem_writeb_checked_drc(PhysPt address,Bit8u val) DRC_FC;
|
||||
bool DRC_CALL_CONV mem_writeb_checked_drc(PhysPt address,Bit8u val) {
|
||||
Bitu index=(address>>12);
|
||||
if (paging.tlb.write[index]) {
|
||||
host_writeb(paging.tlb.write[index]+address,val);
|
||||
HostPt tlb_addr=get_tlb_write(address);
|
||||
if (tlb_addr) {
|
||||
host_writeb(tlb_addr+address,val);
|
||||
return false;
|
||||
} else return paging.tlb.handler[index]->writeb_checked(address,val);
|
||||
} else return get_tlb_handler(address)->writeb_checked(address,val);
|
||||
}
|
||||
|
||||
bool DRC_CALL_CONV mem_readw_checked_drc(PhysPt address) DRC_FC;
|
||||
bool DRC_CALL_CONV mem_readw_checked_drc(PhysPt address) {
|
||||
if ((address & 0xfff)<0xfff) {
|
||||
Bitu index=(address>>12);
|
||||
if (paging.tlb.read[index]) {
|
||||
*((Bit16u*)(&core_dynrec.readdata))=host_readw(paging.tlb.read[index]+address);
|
||||
HostPt tlb_addr=get_tlb_read(address);
|
||||
if (tlb_addr) {
|
||||
*((Bit16u*)(&core_dynrec.readdata))=host_readw(tlb_addr+address);
|
||||
return false;
|
||||
} else return paging.tlb.handler[index]->readw_checked(address, (Bit16u*)(&core_dynrec.readdata));
|
||||
} else return get_tlb_handler(address)->readw_checked(address, (Bit16u*)(&core_dynrec.readdata));
|
||||
} else return mem_unalignedreadw_checked(address, ((Bit16u*)(&core_dynrec.readdata)));
|
||||
}
|
||||
|
||||
bool DRC_CALL_CONV mem_readd_checked_drc(PhysPt address) DRC_FC;
|
||||
bool DRC_CALL_CONV mem_readd_checked_drc(PhysPt address) {
|
||||
if ((address & 0xfff)<0xffd) {
|
||||
Bitu index=(address>>12);
|
||||
if (paging.tlb.read[index]) {
|
||||
*((Bit32u*)(&core_dynrec.readdata))=host_readd(paging.tlb.read[index]+address);
|
||||
HostPt tlb_addr=get_tlb_read(address);
|
||||
if (tlb_addr) {
|
||||
*((Bit32u*)(&core_dynrec.readdata))=host_readd(tlb_addr+address);
|
||||
return false;
|
||||
} else return paging.tlb.handler[index]->readd_checked(address, (Bit32u*)(&core_dynrec.readdata));
|
||||
} else return get_tlb_handler(address)->readd_checked(address, (Bit32u*)(&core_dynrec.readdata));
|
||||
} else return mem_unalignedreadd_checked(address, ((Bit32u*)(&core_dynrec.readdata)));
|
||||
}
|
||||
|
||||
bool DRC_CALL_CONV mem_writew_checked_drc(PhysPt address,Bit16u val) DRC_FC;
|
||||
bool DRC_CALL_CONV mem_writew_checked_drc(PhysPt address,Bit16u val) {
|
||||
if ((address & 0xfff)<0xfff) {
|
||||
Bitu index=(address>>12);
|
||||
if (paging.tlb.write[index]) {
|
||||
host_writew(paging.tlb.write[index]+address,val);
|
||||
HostPt tlb_addr=get_tlb_write(address);
|
||||
if (tlb_addr) {
|
||||
host_writew(tlb_addr+address,val);
|
||||
return false;
|
||||
} else return paging.tlb.handler[index]->writew_checked(address,val);
|
||||
} else return get_tlb_handler(address)->writew_checked(address,val);
|
||||
} else return mem_unalignedwritew_checked(address,val);
|
||||
}
|
||||
|
||||
bool DRC_CALL_CONV mem_writed_checked_drc(PhysPt address,Bit32u val) DRC_FC;
|
||||
bool DRC_CALL_CONV mem_writed_checked_drc(PhysPt address,Bit32u val) {
|
||||
if ((address & 0xfff)<0xffd) {
|
||||
Bitu index=(address>>12);
|
||||
if (paging.tlb.write[index]) {
|
||||
host_writed(paging.tlb.write[index]+address,val);
|
||||
HostPt tlb_addr=get_tlb_write(address);
|
||||
if (tlb_addr) {
|
||||
host_writed(tlb_addr+address,val);
|
||||
return false;
|
||||
} else return paging.tlb.handler[index]->writed_checked(address,val);
|
||||
} else return get_tlb_handler(address)->writed_checked(address,val);
|
||||
} else return mem_unalignedwrited_checked(address,val);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: paging.cpp,v 1.28 2007-10-05 17:45:52 c2woody Exp $ */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
@ -317,6 +319,7 @@ Bitu PAGING_GetDirBase(void) {
|
|||
return paging.cr3;
|
||||
}
|
||||
|
||||
#if defined(USE_FULL_TLB)
|
||||
void PAGING_InitTLB(void) {
|
||||
for (Bitu i=0;i<TLB_SIZE;i++) {
|
||||
paging.tlb.read[i]=0;
|
||||
|
@ -345,6 +348,17 @@ void PAGING_UnlinkPages(Bitu lin_page,Bitu pages) {
|
|||
}
|
||||
}
|
||||
|
||||
void PAGING_MapPage(Bitu lin_page,Bitu phys_page) {
|
||||
if (lin_page<LINK_START) {
|
||||
paging.firstmb[lin_page]=phys_page;
|
||||
paging.tlb.read[lin_page]=0;
|
||||
paging.tlb.write[lin_page]=0;
|
||||
paging.tlb.handler[lin_page]=&init_page_handler;
|
||||
} else {
|
||||
PAGING_LinkPage(lin_page,phys_page);
|
||||
}
|
||||
}
|
||||
|
||||
void PAGING_LinkPage(Bitu lin_page,Bitu phys_page) {
|
||||
PageHandler * handler=MEM_GetPageHandler(phys_page);
|
||||
Bitu lin_base=lin_page << 12;
|
||||
|
@ -366,17 +380,84 @@ void PAGING_LinkPage(Bitu lin_page,Bitu phys_page) {
|
|||
paging.tlb.handler[lin_page]=handler;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static INLINE void InitTLBInt(tlb_entry *bank) {
|
||||
for (Bitu i=0;i<TLB_SIZE;i++) {
|
||||
bank[i].read=0;
|
||||
bank[i].write=0;
|
||||
bank[i].handler=&init_page_handler;
|
||||
}
|
||||
}
|
||||
|
||||
void PAGING_InitTLBBank(tlb_entry **bank) {
|
||||
*bank = (tlb_entry *)malloc(sizeof(tlb_entry)*TLB_SIZE);
|
||||
if(!*bank) E_Exit("Out of Memory");
|
||||
InitTLBInt(*bank);
|
||||
}
|
||||
|
||||
void PAGING_InitTLB(void) {
|
||||
InitTLBInt(paging.tlbh);
|
||||
paging.links.used=0;
|
||||
}
|
||||
|
||||
void PAGING_ClearTLB(void) {
|
||||
Bit32u * entries=&paging.links.entries[0];
|
||||
for (;paging.links.used>0;paging.links.used--) {
|
||||
Bitu page=*entries++;
|
||||
tlb_entry *entry = get_tlb_entry(page<<12);
|
||||
entry->read=0;
|
||||
entry->write=0;
|
||||
entry->handler=&init_page_handler;
|
||||
}
|
||||
paging.links.used=0;
|
||||
}
|
||||
|
||||
void PAGING_UnlinkPages(Bitu lin_page,Bitu pages) {
|
||||
tlb_entry *entry = get_tlb_entry(lin_page<<12);
|
||||
for (;pages>0;pages--) {
|
||||
entry->read=0;
|
||||
entry->write=0;
|
||||
entry->handler=&init_page_handler;
|
||||
}
|
||||
}
|
||||
|
||||
void PAGING_MapPage(Bitu lin_page,Bitu phys_page) {
|
||||
if (lin_page<LINK_START) {
|
||||
paging.firstmb[lin_page]=phys_page;
|
||||
paging.tlb.read[lin_page]=0;
|
||||
paging.tlb.write[lin_page]=0;
|
||||
paging.tlb.handler[lin_page]=&init_page_handler;
|
||||
paging.tlbh[lin_page].read=0;
|
||||
paging.tlbh[lin_page].write=0;
|
||||
paging.tlbh[lin_page].handler=&init_page_handler;
|
||||
} else {
|
||||
PAGING_LinkPage(lin_page,phys_page);
|
||||
}
|
||||
}
|
||||
|
||||
void PAGING_LinkPage(Bitu lin_page,Bitu phys_page) {
|
||||
PageHandler * handler=MEM_GetPageHandler(phys_page);
|
||||
Bitu lin_base=lin_page << 12;
|
||||
if (lin_page>=(TLB_SIZE*(TLB_BANKS+1)) || phys_page>=(TLB_SIZE*(TLB_BANKS+1)))
|
||||
E_Exit("Illegal page");
|
||||
|
||||
if (paging.links.used>=PAGING_LINKS) {
|
||||
LOG(LOG_PAGING,LOG_NORMAL)("Not enough paging links, resetting cache");
|
||||
PAGING_ClearTLB();
|
||||
}
|
||||
|
||||
tlb_entry *entry = get_tlb_entry(lin_base);
|
||||
entry->phys_page=phys_page;
|
||||
if (handler->flags & PFLAG_READABLE) entry->read=handler->GetHostReadPt(phys_page)-lin_base;
|
||||
else entry->read=0;
|
||||
if (handler->flags & PFLAG_WRITEABLE) entry->write=handler->GetHostWritePt(phys_page)-lin_base;
|
||||
else entry->write=0;
|
||||
|
||||
paging.links.entries[paging.links.used++]=lin_page;
|
||||
entry->handler=handler;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
void PAGING_SetDirBase(Bitu cr3) {
|
||||
paging.cr3=cr3;
|
||||
|
||||
|
@ -392,10 +473,8 @@ void PAGING_Enable(bool enabled) {
|
|||
/* If paging is disable we work from a default paging table */
|
||||
if (paging.enabled==enabled) return;
|
||||
paging.enabled=enabled;
|
||||
if (!enabled) {
|
||||
// LOG(LOG_PAGING,LOG_NORMAL)("Disabled");
|
||||
} else {
|
||||
if (cpudecoder==CPU_Core_Simple_Run) {
|
||||
if (enabled) {
|
||||
if (GCC_UNLIKELY(cpudecoder==CPU_Core_Simple_Run)) {
|
||||
// LOG_MSG("CPU core simple won't run this game,switching to normal");
|
||||
cpudecoder=CPU_Core_Normal_Run;
|
||||
CPU_CycleLeft+=CPU_Cycles;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: debug.cpp,v 1.88 2007-06-12 20:22:07 c2woody Exp $ */
|
||||
/* $Id: debug.cpp,v 1.89 2007-10-05 17:45:53 c2woody Exp $ */
|
||||
|
||||
#include "dosbox.h"
|
||||
#if C_DEBUG
|
||||
|
@ -674,7 +674,7 @@ static void DrawData(void) {
|
|||
else mvwprintw (dbg.win_data,1+y,0,"%04X:%08X ",dataSeg,add);
|
||||
for (int x=0; x<16; x++) {
|
||||
address = GetAddress(dataSeg,add);
|
||||
if (!(paging.tlb.handler[address >> 12]->flags & PFLAG_INIT)) {
|
||||
if (!(get_tlb_handler(address)->flags & PFLAG_INIT)) {
|
||||
ch = mem_readb(address);
|
||||
} else ch = 0;
|
||||
mvwprintw (dbg.win_data,1+y,14+3*x,"%02X",ch);
|
||||
|
@ -1344,7 +1344,7 @@ char* AnalyzeInstruction(char* inst, bool saveSelector)
|
|||
pos++;
|
||||
};
|
||||
Bit32u address = GetAddress(seg,adr);
|
||||
if (!(paging.tlb.handler[address >> 12]->flags & PFLAG_INIT)) {
|
||||
if (!(get_tlb_handler(address)->flags & PFLAG_INIT)) {
|
||||
static char outmask[] = "%s:[%04X]=%02X";
|
||||
|
||||
if (cpu.pmode) outmask[6] = '8';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue