mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-05-08 19:32:39 +08:00
Cleanup VGA other code
This commit is contained in:
parent
4c67f61244
commit
223342c2a8
@ -943,6 +943,7 @@ static inline unsigned char *pc98_vram_256bank_from_window(const unsigned int b)
|
||||
bool J3_IsCga4Dcga();
|
||||
void UpdateCGAFromSaveState(void);
|
||||
void INT10_PC98_CurMode_Relocate(void);
|
||||
unsigned int VGA_ComplexityCheck_ODDEVEN(void);
|
||||
void VGA_VsyncUpdateMode(VGA_Vsync vsyncmode);
|
||||
uint32_t GetReportedVideoMemorySize(void);
|
||||
extern void VGA_TweakUserVsyncOffset(float val);
|
||||
|
@ -28,233 +28,223 @@
|
||||
|
||||
static bool index9warned=false;
|
||||
|
||||
static void write_p3ce(Bitu port,Bitu val,Bitu iolen) {
|
||||
(void)port;//UNUSED
|
||||
(void)iolen;//UNUSED
|
||||
static void write_p3ce(Bitu /*port*/,Bitu val,Bitu /*iolen*/) {
|
||||
gfx(index)=val & 0x0f;
|
||||
}
|
||||
|
||||
static Bitu read_p3ce(Bitu port,Bitu iolen) {
|
||||
(void)port;//UNUSED
|
||||
(void)iolen;//UNUSED
|
||||
static Bitu read_p3ce(Bitu /*port*/,Bitu /*iolen*/) {
|
||||
return gfx(index);
|
||||
}
|
||||
|
||||
unsigned int VGA_ComplexityCheck_ODDEVEN(void);
|
||||
|
||||
static void write_p3cf(Bitu port,Bitu val,Bitu iolen) {
|
||||
static void write_p3cf(Bitu /*port*/,Bitu val,Bitu iolen) {
|
||||
unsigned int cmplx = 0;
|
||||
|
||||
(void)port;//UNUSED
|
||||
(void)iolen;//UNUSED
|
||||
switch (gfx(index)) {
|
||||
case 0: /* Set/Reset Register */
|
||||
gfx(set_reset)=val & 0x0f;
|
||||
vga.config.full_set_reset=FillTable[val & 0x0f];
|
||||
vga.config.full_enable_and_set_reset=vga.config.full_set_reset &
|
||||
vga.config.full_enable_set_reset;
|
||||
/*
|
||||
0 If in Write Mode 0 and bit 0 of 3CEh index 1 is set a write to
|
||||
display memory will set all the bits in plane 0 of the byte to this
|
||||
bit, if the corresponding bit is set in the Map Mask Register (3CEh
|
||||
index 8).
|
||||
1 Same for plane 1 and bit 1 of 3CEh index 1.
|
||||
2 Same for plane 2 and bit 2 of 3CEh index 1.
|
||||
3 Same for plane 3 and bit 3 of 3CEh index 1.
|
||||
*/
|
||||
// LOG_DEBUG("Set Reset = %2X",val);
|
||||
break;
|
||||
case 1: /* Enable Set/Reset Register */
|
||||
gfx(enable_set_reset)=val & 0x0f;
|
||||
vga.config.full_enable_set_reset=FillTable[val & 0x0f];
|
||||
vga.config.full_not_enable_set_reset=~vga.config.full_enable_set_reset;
|
||||
vga.config.full_enable_and_set_reset=vga.config.full_set_reset &
|
||||
vga.config.full_enable_set_reset;
|
||||
cmplx |= vga.complexity.setf(VGACMPLX_SETRESET,(val & 0xF) != 0);
|
||||
if (cmplx != 0) VGA_SetupHandlers();
|
||||
break;
|
||||
case 2: /* Color Compare Register */
|
||||
gfx(color_compare)=val & 0x0f;
|
||||
/*
|
||||
0-3 In Read Mode 1 each pixel at the address of the byte read is compared
|
||||
to this color and the corresponding bit in the output set to 1 if
|
||||
they match, 0 if not. The Color Don't Care Register (3CEh index 7)
|
||||
can exclude bitplanes from the comparison.
|
||||
*/
|
||||
vga.config.color_compare=val & 0xf;
|
||||
// LOG_DEBUG("Color Compare = %2X",val);
|
||||
break;
|
||||
case 3: /* Data Rotate */
|
||||
gfx(data_rotate)=(uint8_t)val;
|
||||
vga.config.data_rotate=(uint8_t)val & 7;
|
||||
vga.config.raster_op=((uint8_t)val>>3) & 3;
|
||||
cmplx |= vga.complexity.setf(VGACMPLX_ROPROT,vga.config.data_rotate != 0 || vga.config.raster_op != 0);
|
||||
if (cmplx != 0) VGA_SetupHandlers();
|
||||
/*
|
||||
0-2 Number of positions to rotate data right before it is written to
|
||||
display memory. Only active in Write Mode 0.
|
||||
3-4 In Write Mode 2 this field controls the relation between the data
|
||||
written from the CPU, the data latched from the previous read and the
|
||||
data written to display memory:
|
||||
0: CPU Data is written unmodified
|
||||
1: CPU data is ANDed with the latched data
|
||||
2: CPU data is ORed with the latch data.
|
||||
3: CPU data is XORed with the latched data.
|
||||
*/
|
||||
break;
|
||||
case 4: /* Read Map Select Register */
|
||||
/* 0-1 number of the plane Read Mode 0 will read from */
|
||||
gfx(read_map_select)=val & 0x03;
|
||||
vga.config.read_map_select=val & 0x03;
|
||||
// LOG_DEBUG("Read Map %2X",val);
|
||||
break;
|
||||
case 5: /* Mode Register */
|
||||
if ((gfx(mode) ^ val) & 0xf0) {
|
||||
gfx(mode)=(uint8_t)val;
|
||||
VGA_DetermineMode();
|
||||
cmplx |= VGA_ComplexityCheck_ODDEVEN();
|
||||
} else gfx(mode)=(uint8_t)val;
|
||||
vga.config.write_mode=(uint8_t)val & 3;
|
||||
vga.config.read_mode=((uint8_t)val >> 3) & 1;
|
||||
cmplx |= vga.complexity.setf(VGACMPLX_COLORDONTCARE,gfx(color_dont_care) != 0 && vga.config.read_mode == 1);
|
||||
cmplx |= vga.complexity.setf(VGACMPLX_WRITEMODE,vga.config.write_mode != 0);
|
||||
cmplx |= vga.complexity.setf(VGACMPLX_READMODE,vga.config.read_mode != 0);
|
||||
if (cmplx != 0) VGA_SetupHandlers();
|
||||
// LOG_DEBUG("Write Mode %d Read Mode %d val %d",vga.config.write_mode,vga.config.read_mode,val);
|
||||
/*
|
||||
0-1 Write Mode: Controls how data from the CPU is transformed before
|
||||
being written to display memory:
|
||||
0: Mode 0 works as a Read-Modify-Write operation.
|
||||
First a read access loads the data latches of the VGA with the
|
||||
value in video memory at the addressed location. Then a write
|
||||
access will provide the destination address and the CPU data
|
||||
byte. The data written is modified by the function code in the
|
||||
Data Rotate register (3CEh index 3) as a function of the CPU
|
||||
data and the latches, then data is rotated as specified by the
|
||||
same register.
|
||||
1: Mode 1 is used for video to video transfers.
|
||||
A read access will load the data latches with the contents of
|
||||
the addressed byte of video memory. A write access will write
|
||||
the contents of the latches to the addressed byte. Thus a single
|
||||
MOVSB instruction can copy all pixels in the source address byte
|
||||
to the destination address.
|
||||
2: Mode 2 writes a color to all pixels in the addressed byte of
|
||||
video memory. Bit 0 of the CPU data is written to plane 0 et
|
||||
cetera. Individual bits can be enabled or disabled through the
|
||||
Bit Mask register (3CEh index 8).
|
||||
3: Mode 3 can be used to fill an area with a color and pattern. The
|
||||
CPU data is rotated according to 3CEh index 3 bits 0-2 and anded
|
||||
with the Bit Mask Register (3CEh index 8). For each bit in the
|
||||
result the corresponding pixel is set to the color in the
|
||||
Set/Reset Register (3CEh index 0 bits 0-3) if the bit is set and
|
||||
to the contents of the processor latch if the bit is clear.
|
||||
3 Read Mode
|
||||
0: Data is read from one of 4 bit planes depending on the Read Map
|
||||
Select Register (3CEh index 4).
|
||||
1: Data returned is a comparison between the 8 pixels occupying the
|
||||
read byte and the color in the Color Compare Register (3CEh
|
||||
index 2). A bit is set if the color of the corresponding pixel
|
||||
matches the register.
|
||||
4 Enables Odd/Even mode if set (See 3C4h index 4 bit 2).
|
||||
5 Enables CGA style 4 color pixels using even/odd bit pairs if set.
|
||||
6 Enables 256 color mode if set.
|
||||
*/
|
||||
break;
|
||||
case 6: /* Miscellaneous Register */
|
||||
if ((gfx(miscellaneous) ^ val) & 0x0c) {
|
||||
gfx(miscellaneous)=(uint8_t)val;
|
||||
VGA_DetermineMode();
|
||||
} else gfx(miscellaneous)=(uint8_t)val;
|
||||
VGA_ComplexityCheck_ODDEVEN();
|
||||
VGA_SetupHandlers();
|
||||
/*
|
||||
0 Indicates Graphics Mode if set, Alphanumeric mode else.
|
||||
1 Enables Odd/Even mode if set.
|
||||
2-3 Memory Mapping:
|
||||
0: use A000h-BFFFh
|
||||
1: use A000h-AFFFh VGA Graphics modes
|
||||
2: use B000h-B7FFh Monochrome modes
|
||||
3: use B800h-BFFFh CGA modes
|
||||
*/
|
||||
break;
|
||||
case 7: /* Color Don't Care Register */
|
||||
gfx(color_dont_care)=val & 0x0f;
|
||||
cmplx |= vga.complexity.setf(VGACMPLX_COLORDONTCARE,gfx(color_dont_care) != 0 && vga.config.read_mode == 1);
|
||||
if (cmplx != 0) VGA_SetupHandlers();
|
||||
/*
|
||||
0 Ignore bit plane 0 in Read mode 1 if clear.
|
||||
1 Ignore bit plane 1 in Read mode 1 if clear.
|
||||
2 Ignore bit plane 2 in Read mode 1 if clear.
|
||||
3 Ignore bit plane 3 in Read mode 1 if clear.
|
||||
*/
|
||||
vga.config.color_dont_care=val & 0xf;
|
||||
// LOG_DEBUG("Color don't care = %2X",val);
|
||||
break;
|
||||
case 8: /* Bit Mask Register */
|
||||
gfx(bit_mask)=(uint8_t)val;
|
||||
vga.config.full_bit_mask=ExpandTable[val];
|
||||
cmplx |= vga.complexity.setf(VGACMPLX_BITMASK,vga.config.full_bit_mask != 0xFFFFFFFFu); // at least one bit will be masked off?
|
||||
|
||||
/* check for unusual use of the bit mask register in chained 320x200x256 mode and switch to the slow & accurate emulation */
|
||||
if (vga.mode == M_VGA && vga.config.chained)
|
||||
VGA_SetupHandlers();
|
||||
else if (cmplx != 0)
|
||||
VGA_SetupHandlers();
|
||||
|
||||
// LOG_DEBUG("Bit mask %2X",val);
|
||||
/*
|
||||
0-7 Each bit if set enables writing to the corresponding bit of a byte in
|
||||
display memory.
|
||||
*/
|
||||
break;
|
||||
default:
|
||||
if (svga.write_p3cf) {
|
||||
svga.write_p3cf(gfx(index), val, iolen);
|
||||
case 0: /* Set/Reset Register */
|
||||
gfx(set_reset)=val & 0x0f;
|
||||
vga.config.full_set_reset=FillTable[val & 0x0f];
|
||||
vga.config.full_enable_and_set_reset=vga.config.full_set_reset &
|
||||
vga.config.full_enable_set_reset;
|
||||
/*
|
||||
0 If in Write Mode 0 and bit 0 of 3CEh index 1 is set a write to
|
||||
display memory will set all the bits in plane 0 of the byte to this
|
||||
bit, if the corresponding bit is set in the Map Mask Register (3CEh
|
||||
index 8).
|
||||
1 Same for plane 1 and bit 1 of 3CEh index 1.
|
||||
2 Same for plane 2 and bit 2 of 3CEh index 1.
|
||||
3 Same for plane 3 and bit 3 of 3CEh index 1.
|
||||
*/
|
||||
// LOG_DEBUG("Set Reset = %2X",val);
|
||||
break;
|
||||
}
|
||||
if (gfx(index) == 9 && !index9warned) {
|
||||
LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:3CF:Write %2X to illegal index 9",(int)val);
|
||||
index9warned=true;
|
||||
case 1: /* Enable Set/Reset Register */
|
||||
gfx(enable_set_reset)=val & 0x0f;
|
||||
vga.config.full_enable_set_reset=FillTable[val & 0x0f];
|
||||
vga.config.full_not_enable_set_reset=~vga.config.full_enable_set_reset;
|
||||
vga.config.full_enable_and_set_reset=vga.config.full_set_reset &
|
||||
vga.config.full_enable_set_reset;
|
||||
cmplx |= vga.complexity.setf(VGACMPLX_SETRESET,(val & 0xF) != 0);
|
||||
if (cmplx != 0) VGA_SetupHandlers();
|
||||
break;
|
||||
case 2: /* Color Compare Register */
|
||||
gfx(color_compare)=val & 0x0f;
|
||||
/*
|
||||
0-3 In Read Mode 1 each pixel at the address of the byte read is compared
|
||||
to this color and the corresponding bit in the output set to 1 if
|
||||
they match, 0 if not. The Color Don't Care Register (3CEh index 7)
|
||||
can exclude bitplanes from the comparison.
|
||||
*/
|
||||
vga.config.color_compare=val & 0xf;
|
||||
// LOG_DEBUG("Color Compare = %2X",val);
|
||||
break;
|
||||
case 3: /* Data Rotate */
|
||||
gfx(data_rotate)=(uint8_t)val;
|
||||
vga.config.data_rotate=(uint8_t)val & 7;
|
||||
vga.config.raster_op=((uint8_t)val>>3) & 3;
|
||||
cmplx |= vga.complexity.setf(VGACMPLX_ROPROT,vga.config.data_rotate != 0 || vga.config.raster_op != 0);
|
||||
if (cmplx != 0) VGA_SetupHandlers();
|
||||
/*
|
||||
0-2 Number of positions to rotate data right before it is written to
|
||||
display memory. Only active in Write Mode 0.
|
||||
3-4 In Write Mode 2 this field controls the relation between the data
|
||||
written from the CPU, the data latched from the previous read and the
|
||||
data written to display memory:
|
||||
0: CPU Data is written unmodified
|
||||
1: CPU data is ANDed with the latched data
|
||||
2: CPU data is ORed with the latch data.
|
||||
3: CPU data is XORed with the latched data.
|
||||
*/
|
||||
break;
|
||||
case 4: /* Read Map Select Register */
|
||||
/* 0-1 number of the plane Read Mode 0 will read from */
|
||||
gfx(read_map_select)=val & 0x03;
|
||||
vga.config.read_map_select=val & 0x03;
|
||||
// LOG_DEBUG("Read Map %2X",val);
|
||||
break;
|
||||
case 5: /* Mode Register */
|
||||
if ((gfx(mode) ^ val) & 0xf0) {
|
||||
gfx(mode)=(uint8_t)val;
|
||||
VGA_DetermineMode();
|
||||
cmplx |= VGA_ComplexityCheck_ODDEVEN();
|
||||
} else gfx(mode)=(uint8_t)val;
|
||||
vga.config.write_mode=(uint8_t)val & 3;
|
||||
vga.config.read_mode=((uint8_t)val >> 3) & 1;
|
||||
cmplx |= vga.complexity.setf(VGACMPLX_COLORDONTCARE,gfx(color_dont_care) != 0 && vga.config.read_mode == 1);
|
||||
cmplx |= vga.complexity.setf(VGACMPLX_WRITEMODE,vga.config.write_mode != 0);
|
||||
cmplx |= vga.complexity.setf(VGACMPLX_READMODE,vga.config.read_mode != 0);
|
||||
if (cmplx != 0) VGA_SetupHandlers();
|
||||
// LOG_DEBUG("Write Mode %d Read Mode %d val %d",vga.config.write_mode,vga.config.read_mode,val);
|
||||
/*
|
||||
0-1 Write Mode: Controls how data from the CPU is transformed before
|
||||
being written to display memory:
|
||||
0: Mode 0 works as a Read-Modify-Write operation.
|
||||
First a read access loads the data latches of the VGA with the
|
||||
value in video memory at the addressed location. Then a write
|
||||
access will provide the destination address and the CPU data
|
||||
byte. The data written is modified by the function code in the
|
||||
Data Rotate register (3CEh index 3) as a function of the CPU
|
||||
data and the latches, then data is rotated as specified by the
|
||||
same register.
|
||||
1: Mode 1 is used for video to video transfers.
|
||||
A read access will load the data latches with the contents of
|
||||
the addressed byte of video memory. A write access will write
|
||||
the contents of the latches to the addressed byte. Thus a single
|
||||
MOVSB instruction can copy all pixels in the source address byte
|
||||
to the destination address.
|
||||
2: Mode 2 writes a color to all pixels in the addressed byte of
|
||||
video memory. Bit 0 of the CPU data is written to plane 0 et
|
||||
cetera. Individual bits can be enabled or disabled through the
|
||||
Bit Mask register (3CEh index 8).
|
||||
3: Mode 3 can be used to fill an area with a color and pattern. The
|
||||
CPU data is rotated according to 3CEh index 3 bits 0-2 and anded
|
||||
with the Bit Mask Register (3CEh index 8). For each bit in the
|
||||
result the corresponding pixel is set to the color in the
|
||||
Set/Reset Register (3CEh index 0 bits 0-3) if the bit is set and
|
||||
to the contents of the processor latch if the bit is clear.
|
||||
3 Read Mode
|
||||
0: Data is read from one of 4 bit planes depending on the Read Map
|
||||
Select Register (3CEh index 4).
|
||||
1: Data returned is a comparison between the 8 pixels occupying the
|
||||
read byte and the color in the Color Compare Register (3CEh
|
||||
index 2). A bit is set if the color of the corresponding pixel
|
||||
matches the register.
|
||||
4 Enables Odd/Even mode if set (See 3C4h index 4 bit 2).
|
||||
5 Enables CGA style 4 color pixels using even/odd bit pairs if set.
|
||||
6 Enables 256 color mode if set.
|
||||
*/
|
||||
break;
|
||||
case 6: /* Miscellaneous Register */
|
||||
if ((gfx(miscellaneous) ^ val) & 0x0c) {
|
||||
gfx(miscellaneous)=(uint8_t)val;
|
||||
VGA_DetermineMode();
|
||||
} else gfx(miscellaneous)=(uint8_t)val;
|
||||
VGA_ComplexityCheck_ODDEVEN();
|
||||
VGA_SetupHandlers();
|
||||
/*
|
||||
0 Indicates Graphics Mode if set, Alphanumeric mode else.
|
||||
1 Enables Odd/Even mode if set.
|
||||
2-3 Memory Mapping:
|
||||
0: use A000h-BFFFh
|
||||
1: use A000h-AFFFh VGA Graphics modes
|
||||
2: use B000h-B7FFh Monochrome modes
|
||||
3: use B800h-BFFFh CGA modes
|
||||
*/
|
||||
break;
|
||||
case 7: /* Color Don't Care Register */
|
||||
gfx(color_dont_care)=val & 0x0f;
|
||||
cmplx |= vga.complexity.setf(VGACMPLX_COLORDONTCARE,gfx(color_dont_care) != 0 && vga.config.read_mode == 1);
|
||||
if (cmplx != 0) VGA_SetupHandlers();
|
||||
/*
|
||||
0 Ignore bit plane 0 in Read mode 1 if clear.
|
||||
1 Ignore bit plane 1 in Read mode 1 if clear.
|
||||
2 Ignore bit plane 2 in Read mode 1 if clear.
|
||||
3 Ignore bit plane 3 in Read mode 1 if clear.
|
||||
*/
|
||||
vga.config.color_dont_care=val & 0xf;
|
||||
// LOG_DEBUG("Color don't care = %2X",val);
|
||||
break;
|
||||
case 8: /* Bit Mask Register */
|
||||
gfx(bit_mask)=(uint8_t)val;
|
||||
vga.config.full_bit_mask=ExpandTable[val];
|
||||
cmplx |= vga.complexity.setf(VGACMPLX_BITMASK,vga.config.full_bit_mask != 0xFFFFFFFFu); // at least one bit will be masked off?
|
||||
|
||||
/* check for unusual use of the bit mask register in chained 320x200x256 mode and switch to the slow & accurate emulation */
|
||||
if (vga.mode == M_VGA && vga.config.chained)
|
||||
VGA_SetupHandlers();
|
||||
else if (cmplx != 0)
|
||||
VGA_SetupHandlers();
|
||||
|
||||
// LOG_DEBUG("Bit mask %2X",val);
|
||||
/*
|
||||
0-7 Each bit if set enables writing to the corresponding bit of a byte in
|
||||
display memory.
|
||||
*/
|
||||
break;
|
||||
default:
|
||||
if (svga.write_p3cf) {
|
||||
svga.write_p3cf(gfx(index), val, iolen);
|
||||
break;
|
||||
}
|
||||
if (gfx(index) == 9 && !index9warned) {
|
||||
LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:3CF:Write %2X to illegal index 9",(int)val);
|
||||
index9warned=true;
|
||||
break;
|
||||
}
|
||||
LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:3CF:Write %2X to illegal index %2X",(int)val,(int)gfx(index));
|
||||
break;
|
||||
}
|
||||
LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:3CF:Write %2X to illegal index %2X",(int)val,(int)gfx(index));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static Bitu read_p3cf(Bitu port,Bitu iolen) {
|
||||
(void)port;//UNUSED
|
||||
(void)iolen;//UNUSED
|
||||
switch (gfx(index)) {
|
||||
case 0: /* Set/Reset Register */
|
||||
return gfx(set_reset);
|
||||
case 1: /* Enable Set/Reset Register */
|
||||
return gfx(enable_set_reset);
|
||||
case 2: /* Color Compare Register */
|
||||
return gfx(color_compare);
|
||||
case 3: /* Data Rotate */
|
||||
return gfx(data_rotate);
|
||||
case 4: /* Read Map Select Register */
|
||||
return gfx(read_map_select);
|
||||
case 5: /* Mode Register */
|
||||
return gfx(mode);
|
||||
case 6: /* Miscellaneous Register */
|
||||
return gfx(miscellaneous);
|
||||
case 7: /* Color Don't Care Register */
|
||||
return gfx(color_dont_care);
|
||||
case 8: /* Bit Mask Register */
|
||||
return gfx(bit_mask);
|
||||
default:
|
||||
if (svga.read_p3cf)
|
||||
return svga.read_p3cf(gfx(index), iolen);
|
||||
LOG(LOG_VGAMISC,LOG_NORMAL)("Reading from illegal index %2X in port %4X",(int)static_cast<uint32_t>(gfx(index)),(int)port);
|
||||
break;
|
||||
case 0: /* Set/Reset Register */
|
||||
return gfx(set_reset);
|
||||
case 1: /* Enable Set/Reset Register */
|
||||
return gfx(enable_set_reset);
|
||||
case 2: /* Color Compare Register */
|
||||
return gfx(color_compare);
|
||||
case 3: /* Data Rotate */
|
||||
return gfx(data_rotate);
|
||||
case 4: /* Read Map Select Register */
|
||||
return gfx(read_map_select);
|
||||
case 5: /* Mode Register */
|
||||
return gfx(mode);
|
||||
case 6: /* Miscellaneous Register */
|
||||
return gfx(miscellaneous);
|
||||
case 7: /* Color Don't Care Register */
|
||||
return gfx(color_dont_care);
|
||||
case 8: /* Bit Mask Register */
|
||||
return gfx(bit_mask);
|
||||
default:
|
||||
if (svga.read_p3cf)
|
||||
return svga.read_p3cf(gfx(index), iolen);
|
||||
|
||||
LOG(LOG_VGAMISC,LOG_NORMAL)("Reading from illegal index %2X in port %4X",(int)static_cast<uint32_t>(gfx(index)),(int)port);
|
||||
break;
|
||||
}
|
||||
return 0; /* Compiler happy */
|
||||
|
||||
return 0; /* Compiler happy */
|
||||
}
|
||||
|
||||
|
||||
|
||||
void VGA_SetupGFX(void) {
|
||||
if (IS_EGAVGA_ARCH) {
|
||||
IO_RegisterWriteHandler(0x3ce,write_p3ce,IO_MB);
|
||||
@ -267,10 +257,10 @@ void VGA_SetupGFX(void) {
|
||||
}
|
||||
|
||||
void VGA_UnsetupGFX(void) {
|
||||
IO_FreeWriteHandler(0x3ce,IO_MB);
|
||||
IO_FreeReadHandler(0x3ce,IO_MB);
|
||||
IO_FreeWriteHandler(0x3cf,IO_MB);
|
||||
IO_FreeReadHandler(0x3cf,IO_MB);
|
||||
IO_FreeWriteHandler(0x3ce,IO_MB);
|
||||
IO_FreeReadHandler(0x3ce,IO_MB);
|
||||
IO_FreeWriteHandler(0x3cf,IO_MB);
|
||||
IO_FreeReadHandler(0x3cf,IO_MB);
|
||||
}
|
||||
|
||||
// save state support
|
||||
|
Loading…
x
Reference in New Issue
Block a user