1
0
Fork 0

Support writing palette register data to dynamic save area if pointer is non-zero on mode changes. Fixes CV 2.2 (thanks for the help ripsaw)

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3982
This commit is contained in:
Peter Veenstra 2016-05-10 14:38:39 +00:00
parent 36f12b5670
commit 9fc2c31a97
2 changed files with 11 additions and 1 deletions

View file

@ -715,6 +715,8 @@ static void INT10_Seg40Init(void) {
real_writeb(BIOSMEM_SEG,BIOSMEM_MODESET_CTL,0x51);
// Set the default MSR
real_writeb(BIOSMEM_SEG,BIOSMEM_CURRENT_MSR,0x09);
// Set the pointer to video save pointer table
real_writed(BIOSMEM_SEG,BIOSMEM_VS_POINTER,int10.rom.video_save_pointers);
}

View file

@ -491,7 +491,6 @@ static void FinishSetMode(bool clearmem) {
// this is an index into the dcc table:
if (IS_VGA_ARCH) real_writeb(BIOSMEM_SEG,BIOSMEM_DCC_INDEX,0x0b);
real_writed(BIOSMEM_SEG,BIOSMEM_VS_POINTER,int10.rom.video_save_pointers);
// Set cursor shape
if (CurMode->type==M_TEXT) {
@ -1321,6 +1320,15 @@ dac_text16:
vga.config.pel_panning = 0;
IO_Write(0x3c0,0x20); //Disable palette access
}
/* Write palette register data to dynamic save area if pointer is non-zero */
RealPt vsavept=real_readd(BIOSMEM_SEG,BIOSMEM_VS_POINTER);
RealPt dsapt=real_readd(RealSeg(vsavept),RealOff(vsavept)+4);
if (dsapt) {
for (Bit8u ct=0;ct<0x10;ct++) {
real_writeb(RealSeg(dsapt),RealOff(dsapt)+ct,att_data[ct]);
}
real_writeb(RealSeg(dsapt),RealOff(dsapt)+0x10,0); // overscan
}
/* Setup some special stuff for different modes */
Bit8u feature=real_readb(BIOSMEM_SEG,BIOSMEM_INITIAL_MODE);
switch (CurMode->type) {