fix reading vga sequencer data port for invalid indices, thanks to vasyl (see sf bug #1173098);
fixes some svga detection routines (Grandest Fleet 2, sf bug #1723717) Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2861
This commit is contained in:
parent
49b1c72548
commit
89c9f7d9ad
2 changed files with 6 additions and 3 deletions
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: vga_s3.cpp,v 1.6 2007-01-08 19:45:40 qbix79 Exp $ */
|
||||
/* $Id: vga_s3.cpp,v 1.7 2007-05-28 16:29:11 c2woody Exp $ */
|
||||
|
||||
#include "dosbox.h"
|
||||
#include "inout.h"
|
||||
|
@ -375,6 +375,7 @@ Bitu SVGA_S3_ReadCRTC( Bitu reg, Bitu iolen) {
|
|||
}
|
||||
|
||||
void SVGA_S3_WriteSEQ(Bitu reg,Bitu val,Bitu iolen) {
|
||||
if (reg>0x8 && vga.s3.pll.lock!=0x6) return;
|
||||
switch (reg) {
|
||||
case 0x08:
|
||||
vga.s3.pll.lock=val;
|
||||
|
@ -405,6 +406,10 @@ void SVGA_S3_WriteSEQ(Bitu reg,Bitu val,Bitu iolen) {
|
|||
|
||||
Bitu SVGA_S3_ReadSEQ(Bitu reg,Bitu iolen) {
|
||||
/* S3 specific group */
|
||||
if (reg>0x8 && vga.s3.pll.lock!=0x6) {
|
||||
if (reg<0x1b) return 0;
|
||||
else return reg;
|
||||
}
|
||||
switch (reg) {
|
||||
case 0x08: /* PLL Unlock */
|
||||
return vga.s3.pll.lock;
|
||||
|
|
|
@ -31,7 +31,6 @@ void write_p3c4(Bitu port,Bitu val,Bitu iolen) {
|
|||
};
|
||||
|
||||
void write_p3c5(Bitu port,Bitu val,Bitu iolen) {
|
||||
if (seq(index)>0x8 && vga.s3.pll.lock!=0x6) return;
|
||||
// LOG_MSG("SEQ WRITE reg %X val %X",seq(index),val);
|
||||
switch(seq(index)) {
|
||||
case 0: /* Reset */
|
||||
|
@ -114,7 +113,6 @@ void write_p3c5(Bitu port,Bitu val,Bitu iolen) {
|
|||
|
||||
Bitu read_p3c5(Bitu port,Bitu iolen) {
|
||||
// LOG_MSG("VGA:SEQ:Read from index %2X",seq(index));
|
||||
if (seq(index)>0x8 && vga.s3.pll.lock!=0x6) return seq(index);
|
||||
switch(seq(index)) {
|
||||
case 0: /* Reset */
|
||||
return seq(reset);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue