Fixes to hercules emulation, better detection and bank switching
Fixes to tandy emulation, 640x200x16 mode and different sizes bank. EGA/VGA memory changes detection for faster rendering added Renderer does initial pass to check for needing to lock buffer Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2781
This commit is contained in:
parent
667c756775
commit
5660ee1856
16 changed files with 1132 additions and 565 deletions
|
@ -195,6 +195,8 @@ static Bitu INT10_Handler(void) {
|
|||
}
|
||||
break;
|
||||
case 0x11: /* Character generator functions */
|
||||
if (machine<MCH_VGA)
|
||||
break;
|
||||
switch (reg_al) {
|
||||
/* Textmode calls */
|
||||
case 0x00: /* Load user font */
|
||||
|
@ -289,7 +291,8 @@ graphics_chars:
|
|||
}
|
||||
break;
|
||||
case 0x12: /* alternate function select */
|
||||
if (machine<MCH_VGA) break;
|
||||
if (machine<MCH_VGA)
|
||||
break;
|
||||
switch (reg_bl) {
|
||||
case 0x10: /* Get EGA Information */
|
||||
reg_bh=(real_readw(BIOSMEM_SEG,BIOSMEM_CRTC_ADDRESS)==0x3B4);
|
||||
|
|
|
@ -238,7 +238,7 @@ static void FinishSetMode(bool clearmem) {
|
|||
case M_CGA2:
|
||||
case M_TANDY16:
|
||||
for (i=0;i<16*1024;i++) {
|
||||
real_writew(0xb800,i*2,0x0000);
|
||||
real_writew( 0xb800,i*2,0x0000);
|
||||
}
|
||||
break;
|
||||
case M_TEXT:
|
||||
|
@ -307,7 +307,12 @@ bool INT10_SetVideoMode_OTHER(Bitu mode,bool clearmem) {
|
|||
}
|
||||
break;
|
||||
case MCH_HERC:
|
||||
if (mode!=7) return false;
|
||||
if (mode!=7) {
|
||||
//Just the text memory, most games seem to use any random mode to clear the screen
|
||||
for (i=0;i<16*1024;i++)
|
||||
real_writew(0xb000,i*2,0x0120);
|
||||
return false;
|
||||
}
|
||||
CurMode=&Hercules_Mode;
|
||||
break;
|
||||
}
|
||||
|
@ -373,8 +378,10 @@ bool INT10_SetVideoMode_OTHER(Bitu mode,bool clearmem) {
|
|||
case MCH_HERC:
|
||||
IO_WriteB(0x3bf,0x3); //Enable changing all bits
|
||||
IO_WriteB(0x3b8,0x8); //TEXT mode and non-blinking characters
|
||||
IO_WriteB(0x3bf,0x0); //Disable changing all bits
|
||||
VGA_DAC_CombineColor(1,0xf);
|
||||
IO_WriteB(0x3bf,0x0);
|
||||
VGA_DAC_CombineColor(0,0);
|
||||
for ( i = 1; i < 15;i++)
|
||||
VGA_DAC_CombineColor(i,0xf);
|
||||
break;
|
||||
case MCH_CGA:
|
||||
mode_control=mode_control_list[CurMode->mode];
|
||||
|
@ -400,6 +407,12 @@ bool INT10_SetVideoMode_OTHER(Bitu mode,bool clearmem) {
|
|||
default:
|
||||
IO_WriteB(0x3de,0x0);break;
|
||||
}
|
||||
//Clear extended mapping
|
||||
IO_WriteB(0x3da,0x5);
|
||||
IO_WriteB(0x3de,0x0);
|
||||
//Clear monitor mode
|
||||
IO_WriteB(0x3da,0x8);
|
||||
IO_WriteB(0x3de,0x0);
|
||||
crtpage=(CurMode->mode>=0x9) ? 0xf6 : 0x3f;
|
||||
IO_WriteB(0x3df,crtpage);
|
||||
real_writeb(BIOSMEM_SEG,BIOSMEM_CRTCPU_PAGE,crtpage);
|
||||
|
@ -974,7 +987,6 @@ dac_text16:
|
|||
}
|
||||
IO_Write(crtc_base,0x31);IO_Write(crtc_base+1,reg_31); //Enable banked memory and 256k+ access
|
||||
IO_Write(crtc_base,0x58);IO_Write(crtc_base+1,0x3); //Enable 8 mb of linear addressing
|
||||
IO_Write(crtc_base,0x58);IO_Write(crtc_base+1,0x3); //Enable 8 mb of linear addressing
|
||||
|
||||
IO_Write(crtc_base,0x38);IO_Write(crtc_base+1,0x48); //Register lock 1
|
||||
IO_Write(crtc_base,0x39);IO_Write(crtc_base+1,0xa5); //Register lock 2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue