中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net  论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

游客:  注册 | 登录 | 命令行 | 搜索 | 上传 | 帮助 »
作者:
标题: 设置120赫兹屏幕刷新率代码 上一主题 | 下一主题
blackoil
初级用户





积分 58
发帖 18
注册 2005-11-26
来自 广州
状态 离线
『楼 主』:  设置120赫兹屏幕刷新率代码

SetVESA_Mode: mov ax,0x4F02 mov bx,[VideoMode] push ds pop es mov di,CRTC int 0x10 int 0x20 VideoMode dw VESA_Mode_640x480x16M | VESA_Bit_LFB | VESA_Bit_CRTC CRTC dw 848 dw 680 dw 744 dw 518 dw 483 dw 487 db 0 dd 52500000 ;pixel clock dw 12000 ;120hz refresh rate times 40 db 0


2006-11-5 11:24
查看资料  发送邮件  发短消息  网志   编辑帖子  回复  引用回复
zyl910
中级用户





积分 282
发帖 126
注册 2006-5-17
状态 离线
『第 2 楼』:  

CRTCInfoBlock struc HorizontalTotal dw ? ; Horizontal total in pixels HorizontalSyncStart dw ? ; Horizontal sync start in pixels HorizontalSyncEnd dw ? ; Horizontal sync end in pixels VerticalTotal dw ? ; Vertical total in lines VerticalSyncStart dw ? ; Vertical sync start in lines VerticalSyncEnd dw ? ; Vertical sync end in lines Flags db ? ; Flags (Interlaced, Double Scan etc) PixelClock dd ? ; Pixel clock in units of Hz RefreshRate dw ? ; Refresh rate in units of 0.01 Hz Reserved db 40 dup (?) ; remainder of ModeInfoBlock CRTCInfoBlock ends




人类存在的目的就是试图理解人类为何存在
2006-11-5 13:01
查看资料  发送邮件  访问主页  发短消息  网志   编辑帖子  回复  引用回复
zyl910
中级用户





积分 282
发帖 126
注册 2006-5-17
状态 离线
『第 3 楼』:  

我一直不清楚 水平/垂直总量、回扫时间、消隐时间 这些参数是怎么推算出来的 望大虾指点




人类存在的目的就是试图理解人类为何存在
2006-11-5 13:04
查看资料  发送邮件  访问主页  发短消息  网志   编辑帖子  回复  引用回复
blackoil
初级用户





积分 58
发帖 18
注册 2005-11-26
来自 广州
状态 离线
『第 4 楼』:  

在google输入 Generate mode timings cvt.c 可以找到 www.uruk.org/~erich/projects/c ... 电子束回扫需要时间,单位用像素计量。比所设分辨率大的数值包括回扫的时间


2006-11-5 22:45
查看资料  发送邮件  发短消息  网志   编辑帖子  回复  引用回复
zyl910
中级用户





积分 282
发帖 126
注册 2006-5-17
状态 离线
『第 5 楼』:  

Thanks! 研究中




人类存在的目的就是试图理解人类为何存在
2006-11-6 05:58
查看资料  发送邮件  访问主页  发短消息  网志   编辑帖子  回复  引用回复
x2wei
初级用户





积分 44
发帖 17
注册 2006-4-24
状态 离线
『第 6 楼』:  楼上的兄弟搞清了写个小程序出来,给大家试试呀:)共同学

楼主写的asm有点不明白:( VideoMode dw VESA_Mode_640x480x16M | VESA_Bit_LFB | VESA_Bit_CRTC ? times 40 db 0 ?


2006-11-8 21:06
查看资料  发送邮件  发短消息  网志   编辑帖子  回复  引用回复
zyl910
中级用户





积分 282
发帖 126
注册 2006-5-17
状态 离线
『第 7 楼』:  

对于: CRTC dw 848 dw 680 dw 744 dw 518 dw 483 dw 487 db 0 dd 52500000 ;pixel clock dw 12000 ;120hz refresh rate times 40 db 0 这个是CRTCInfoBlock结构: CRTCInfoBlock struc HorizontalTotal dw ? ; Horizontal total in pixels HorizontalSyncStart dw ? ; Horizontal sync start in pixels HorizontalSyncEnd dw ? ; Horizontal sync end in pixels VerticalTotal dw ? ; Vertical total in lines VerticalSyncStart dw ? ; Vertical sync start in lines VerticalSyncEnd dw ? ; Vertical sync end in lines Flags db ? ; Flags (Interlaced, Double Scan etc) PixelClock dd ? ; Pixel clock in units of Hz RefreshRate dw ? ; Refresh rate in units of 0.01 Hz Reserved db 40 dup (?) ; remainder of ModeInfoBlock CRTCInfoBlock ends 至于 VideoMode dw VESA_Mode_640x480x16M | VESA_Bit_LFB | VESA_Bit_CRTC 这是VBE显示模式,估计这些常数是: VESA_Mode_640x480x16M = 112h VESA_Bit_LFB = 4000h VESA_Bit_CRTC = 0800h 这个程序利用了VBE 3.0的一些特性:
Function 02h - Set VBE Mode Input: AX = 4F02h Set VBE Mode BX = Desired Mode to set D0-D8 = Mode number D9-D10 = Reserved (must be 0) D11 = 0 Use current default refresh rate = 1 Use user specified CRTC values for refresh rate D12-13 Reserved for VBE/AF (must be 0) D14 = 0 Use windowed frame buffer model = 1 Use linear/flat frame buffer model D15 = 0 Clear display memory = 1 Don't clear display memory ES:DI= Pointer to CRTCInfoBlock structure Output: AX = VBE Return Status Note: All other registers are preserved. The CRTC information block has the following structure: CRTCInfoBlock struc HorizontalTotal dw ? ; Horizontal total in pixels HorizontalSyncStart dw ? ; Horizontal sync start in pixels HorizontalSyncEnd dw ? ; Horizontal sync end in pixels VerticalTotal dw ? ; Vertical total in lines VerticalSyncStart dw ? ; Vertical sync start in lines VerticalSyncEnd dw ? ; Vertical sync end in lines Flags db ? ; Flags (Interlaced, Double Scan etc) PixelClock dd ? ; Pixel clock in units of Hz RefreshRate dw ? ; Refresh rate in units of 0.01 Hz Reserved db 40 dup (?) ; remainder of ModeInfoBlock CRTCInfoBlock ends The Flags field defines the following flags that modify the operation of the mode as follows: D0 = Double Scan Mode Enable 0 = Graphics mode is not double scanned 1 = Graphics mode is double scanned D1 = Interlaced Mode Enable 0 = Graphics mode is non-interlaced 1 = Graphics mode is interlaced D2 = Horizontal sync polarity 0 = Horizontal sync polarity is positive (+) 1 = Horizontal sync polarity is negative (-) D3 = Vertical sync polarity 0 = Vertical sync polarity is positive (+) 1 = Vertical sync polarity is negative (-)
VBE 3.0: www.vesa.org/public/VBE/vbe3.pdf




人类存在的目的就是试图理解人类为何存在
2006-11-8 22:07
查看资料  发送邮件  访问主页  发短消息  网志   编辑帖子  回复  引用回复
blackoil
初级用户





积分 58
发帖 18
注册 2005-11-26
来自 广州
状态 离线
『第 8 楼』:  

我用了自己的编译器的语法 times 40 db 0 就是 40 个字节的0


2006-11-12 05:53
查看资料  发送邮件  发短消息  网志   编辑帖子  回复  引用回复

请注意:您目前尚未注册或登录,请您注册登录以使用论坛的各项功能,例如发表和回复帖子等。


可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题



论坛跳转: