Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
5467a722
Q
qemu
项目概览
openeuler
/
qemu
通知
10
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Q
qemu
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
5467a722
编写于
4月 25, 2004
作者:
B
bellard
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
disabled S3 VGA
git-svn-id:
svn://svn.savannah.nongnu.org/qemu/trunk@747
c046a42c-6fe2-441c-8c8c-71466251a162
上级
1b8eb456
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
32 addition
and
22 deletion
+32
-22
hw/vga.c
hw/vga.c
+32
-22
未找到文件。
hw/vga.c
浏览文件 @
5467a722
...
...
@@ -30,7 +30,8 @@
//#define DEBUG_S3
//#define DEBUG_BOCHS_VBE
#define CONFIG_S3VGA
/* S3 VGA is deprecated - another graphic card will be emulated */
//#define CONFIG_S3VGA
#define MSR_COLOR_EMULATION 0x01
#define MSR_PAGE_SELECT 0x20
...
...
@@ -335,7 +336,7 @@ static uint32_t vga_ioport_read(void *opaque, uint32_t addr)
static
void
vga_ioport_write
(
void
*
opaque
,
uint32_t
addr
,
uint32_t
val
)
{
VGAState
*
s
=
opaque
;
int
index
,
v
;
int
index
;
/* check port range access depending on color/monochrome mode */
if
((
addr
>=
0x3b0
&&
addr
<=
0x3bf
&&
(
s
->
msr
&
MSR_COLOR_EMULATION
))
||
...
...
@@ -453,15 +454,21 @@ static void vga_ioport_write(void *opaque, uint32_t addr, uint32_t val)
break
;
case
0x31
:
/* update start address */
{
int
v
;
s
->
cr
[
s
->
cr_index
]
=
val
;
v
=
(
val
>>
4
)
&
3
;
s
->
cr
[
0x69
]
=
(
s
->
cr
[
69
]
&
~
0x03
)
|
v
;
}
break
;
case
0x51
:
/* update start address */
{
int
v
;
s
->
cr
[
s
->
cr_index
]
=
val
;
v
=
val
&
3
;
s
->
cr
[
0x69
]
=
(
s
->
cr
[
69
]
&
~
0x0c
)
|
(
v
<<
2
);
}
break
;
#endif
default:
...
...
@@ -716,7 +723,7 @@ static uint32_t vga_mem_readl(uint32_t addr)
}
/* called for accesses between 0xa0000 and 0xc0000 */
static
void
vga_mem_writeb
(
uint32_t
addr
,
uint32_t
val
,
uint32_t
vaddr
)
static
void
vga_mem_writeb
(
uint32_t
addr
,
uint32_t
val
)
{
VGAState
*
s
=
&
vga_state
;
int
memory_map_mode
,
plane
,
write_mode
,
b
,
func_select
;
...
...
@@ -844,18 +851,18 @@ static void vga_mem_writeb(uint32_t addr, uint32_t val, uint32_t vaddr)
}
}
static
void
vga_mem_writew
(
uint32_t
addr
,
uint32_t
val
,
uint32_t
vaddr
)
static
void
vga_mem_writew
(
uint32_t
addr
,
uint32_t
val
)
{
vga_mem_writeb
(
addr
,
val
&
0xff
,
vaddr
);
vga_mem_writeb
(
addr
+
1
,
(
val
>>
8
)
&
0xff
,
vaddr
);
vga_mem_writeb
(
addr
,
val
&
0xff
);
vga_mem_writeb
(
addr
+
1
,
(
val
>>
8
)
&
0xff
);
}
static
void
vga_mem_writel
(
uint32_t
addr
,
uint32_t
val
,
uint32_t
vaddr
)
static
void
vga_mem_writel
(
uint32_t
addr
,
uint32_t
val
)
{
vga_mem_writeb
(
addr
,
val
&
0xff
,
vaddr
);
vga_mem_writeb
(
addr
+
1
,
(
val
>>
8
)
&
0xff
,
vaddr
);
vga_mem_writeb
(
addr
+
2
,
(
val
>>
16
)
&
0xff
,
vaddr
);
vga_mem_writeb
(
addr
+
3
,
(
val
>>
24
)
&
0xff
,
vaddr
);
vga_mem_writeb
(
addr
,
val
&
0xff
);
vga_mem_writeb
(
addr
+
1
,
(
val
>>
8
)
&
0xff
);
vga_mem_writeb
(
addr
+
2
,
(
val
>>
16
)
&
0xff
);
vga_mem_writeb
(
addr
+
3
,
(
val
>>
24
)
&
0xff
);
}
typedef
void
vga_draw_glyph8_func
(
uint8_t
*
d
,
int
linesize
,
...
...
@@ -992,7 +999,7 @@ static int update_palette256(VGAState *s)
static
int
update_basic_params
(
VGAState
*
s
)
{
int
full_update
;
uint32_t
start_addr
,
line_offset
,
line_compare
,
v
;
uint32_t
start_addr
,
line_offset
,
line_compare
;
full_update
=
0
;
...
...
@@ -1006,10 +1013,13 @@ static int update_basic_params(VGAState *s)
/* compute line_offset in bytes */
line_offset
=
s
->
cr
[
0x13
];
#ifdef CONFIG_S3VGA
{
uinr32_t
v
;
v
=
(
s
->
cr
[
0x51
]
>>
4
)
&
3
;
/* S3 extension */
if
(
v
==
0
)
v
=
(
s
->
cr
[
0x43
]
>>
2
)
&
1
;
/* S3 extension */
line_offset
|=
(
v
<<
8
);
}
#endif
line_offset
<<=
3
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录