Fix correct releasing of paging links
new phys_read/write functions Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1474
This commit is contained in:
parent
3655cc0cc6
commit
f90b1c310d
1 changed files with 16 additions and 1 deletions
|
@ -40,7 +40,7 @@ struct AllocBlock {
|
|||
};
|
||||
|
||||
struct LinkBlock {
|
||||
Bit8u used;
|
||||
Bitu used;
|
||||
Bit32u pages[MAX_LINKS];
|
||||
};
|
||||
|
||||
|
@ -156,6 +156,7 @@ void MEM_SetPageHandler(Bitu phys_page,Bitu pages,PageHandler * handler) {
|
|||
|
||||
void MEM_UnlinkPages(void) {
|
||||
PAGING_ClearTLBEntries(memory.links.used,memory.links.pages);
|
||||
memory.links.used=0;
|
||||
}
|
||||
|
||||
Bitu mem_strlen(PhysPt pt) {
|
||||
|
@ -495,6 +496,8 @@ void phys_writed(PhysPt addr,Bit32u val) {
|
|||
Bit32u MEM_PhysReadD(Bitu addr) {
|
||||
Bitu page=addr >> 12;
|
||||
Bitu index=(addr & 4095);
|
||||
if (page>memory.pages)
|
||||
E_Exit("Reading from illegal page");
|
||||
HostPt block=memory.hostpts[page];
|
||||
if (!block) {
|
||||
E_Exit("Reading from empty page");
|
||||
|
@ -502,6 +505,18 @@ Bit32u MEM_PhysReadD(Bitu addr) {
|
|||
return host_readd(block+index);
|
||||
}
|
||||
|
||||
void MEM_PhysWriteD(Bitu addr,Bit32u val) {
|
||||
Bitu page=addr >> 12;
|
||||
Bitu index=(addr & 4095);
|
||||
if (page>memory.pages)
|
||||
E_Exit("Writing from illegal page");
|
||||
HostPt block=memory.hostpts[page];
|
||||
if (!block) {
|
||||
E_Exit("Writing to empty page");
|
||||
}
|
||||
host_writed(block+index,val);
|
||||
}
|
||||
|
||||
|
||||
static void write_p92(Bit32u port,Bit8u val) {
|
||||
// Bit 0 = system reset (switch back to real mode)
|
||||
|
|
Loading…
Add table
Reference in a new issue