By implementing Tandy special handling of the palette:
- fix Starflight background color (reported by HunterZ) - keep Pirates! map background correct Also fix the palette after mode switch on the PCJr. Fixes Frogger II composite mode color attributes (reported by VileRancour). Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3832
This commit is contained in:
parent
f6864ba395
commit
56d19f4f8d
2 changed files with 47 additions and 16 deletions
|
@ -92,6 +92,7 @@ void INT10_SetOverscanBorderColor(Bit8u val) {
|
|||
case TANDY_ARCH_CASE:
|
||||
IO_Read(VGAREG_TDY_RESET);
|
||||
WriteTandyACTL(0x02,val);
|
||||
IO_Write(VGAREG_TDY_ADDRESS, 0); // enable the screen
|
||||
break;
|
||||
case EGAVGA_ARCH_CASE:
|
||||
ResetACTL();
|
||||
|
@ -308,9 +309,37 @@ void INT10_SetBackgroundBorder(Bit8u val) {
|
|||
color_select=(color_select & 0xe0) | (val & 0x1f);
|
||||
real_writeb(BIOSMEM_SEG,BIOSMEM_CURRENT_PAL,color_select);
|
||||
|
||||
if (machine == MCH_CGA || machine == MCH_TANDY)
|
||||
switch (machine) {
|
||||
case MCH_CGA:
|
||||
// only write the color select register
|
||||
IO_Write(0x3d9,color_select);
|
||||
else if (machine == MCH_PCJR) {
|
||||
break;
|
||||
case MCH_TANDY:
|
||||
// TODO handle val == 0x1x, wait for retrace
|
||||
switch(CurMode->mode) {
|
||||
default: // modes 0-5: write to color select and border
|
||||
INT10_SetOverscanBorderColor(val);
|
||||
IO_Write(0x3d9, color_select);
|
||||
break;
|
||||
case 0x06: // 2-color: only write the color select register
|
||||
IO_Write(0x3d9, color_select);
|
||||
break;
|
||||
case 0x07: // Tandy monochrome not implemented
|
||||
break;
|
||||
case 0x08:
|
||||
case 0x09: // 16-color: write to color select, border and pal. index 0
|
||||
INT10_SetOverscanBorderColor(val);
|
||||
INT10_SetSinglePaletteRegister(0, val);
|
||||
IO_Write(0x3d9, color_select);
|
||||
break;
|
||||
case 0x0a: // 4-color highres:
|
||||
// write zero to color select, write palette to indexes 1-3
|
||||
// TODO palette
|
||||
IO_Write(0x3d9, 0);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case MCH_PCJR:
|
||||
IO_Read(VGAREG_TDY_RESET); // reset the flipflop
|
||||
if (vga.mode!=M_TANDY_TEXT) {
|
||||
IO_Write(VGAREG_TDY_ADDRESS, 0x10);
|
||||
|
@ -318,8 +347,8 @@ void INT10_SetBackgroundBorder(Bit8u val) {
|
|||
}
|
||||
IO_Write(VGAREG_TDY_ADDRESS, 0x2); // border color
|
||||
IO_Write(VGAREG_PCJR_DATA, color_select&0xf);
|
||||
}
|
||||
else if (IS_EGAVGA_ARCH) {
|
||||
break;
|
||||
case EGAVGA_ARCH_CASE:
|
||||
val = ((val << 1) & 0x10) | (val & 0x7);
|
||||
/* Always set the overscan color */
|
||||
INT10_SetSinglePaletteRegister( 0x11, val );
|
||||
|
@ -333,6 +362,7 @@ void INT10_SetBackgroundBorder(Bit8u val) {
|
|||
INT10_SetSinglePaletteRegister( 2, val );
|
||||
val+=2;
|
||||
INT10_SetSinglePaletteRegister( 3, val );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue