Map a single 4kB page of video memory that repeats in the 32kB range when in Hercules text mode, making it compatible with MDA. Fixes Future Wars and Operation Stealth install programs on the Hercules machine type.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3900
This commit is contained in:
parent
ef7ddd1504
commit
c0a3903ec0
1 changed files with 16 additions and 1 deletions
|
@ -730,6 +730,20 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
class VGA_HERC_Handler : public PageHandler {
|
||||
public:
|
||||
VGA_HERC_Handler() {
|
||||
flags=PFLAG_READABLE|PFLAG_WRITEABLE;
|
||||
}
|
||||
HostPt GetHostReadPt(Bitu phys_page) {
|
||||
// The 4kB map area is repeated in the 32kB range
|
||||
return &vga.mem.linear[0];
|
||||
}
|
||||
HostPt GetHostWritePt(Bitu phys_page) {
|
||||
return GetHostReadPt( phys_page );
|
||||
}
|
||||
};
|
||||
|
||||
class VGA_Empty_Handler : public PageHandler {
|
||||
public:
|
||||
VGA_Empty_Handler() {
|
||||
|
@ -754,6 +768,7 @@ static struct vg {
|
|||
VGA_UnchainedEGA_Handler uega;
|
||||
VGA_UnchainedVGA_Handler uvga;
|
||||
VGA_PCJR_Handler pcjr;
|
||||
VGA_HERC_Handler herc;
|
||||
VGA_LIN4_Handler lin4;
|
||||
VGA_LFB_Handler lfb;
|
||||
VGA_LFBChanges_Handler lfbchanges;
|
||||
|
@ -789,7 +804,7 @@ void VGA_SetupHandlers(void) {
|
|||
} else {
|
||||
vgapages.mask=0x7fff;
|
||||
/* With hercules in 32kb mode it leaves a memory hole on 0xb800 */
|
||||
MEM_SetPageHandler(VGA_PAGE_B0,8,&vgaph.map);
|
||||
MEM_SetPageHandler(VGA_PAGE_B0,8,&vgaph.herc);
|
||||
MEM_SetPageHandler(VGA_PAGE_B8,8,&vgaph.empty);
|
||||
}
|
||||
goto range_done;
|
||||
|
|
Loading…
Add table
Reference in a new issue