DreamColor屏幕硬校色探究

Commercial and Consumer Notebook PC

Moderator: xyevolve

Forum rules
1. 本版是定位于惠普笔记本电脑的技术讨论区。
2. 本版鼓励发帖共同讨论技术问题,不鼓励站内信件私下交流,独知知不如众知知。
3. 本版允许转贴或引用他人的作品,但必须声明原作者信息。
4. 本版禁止发表出售、求购、或其他非技术讨论等帖子。
5. 本版宁缺毋滥,严禁灌水,包括但不限于任何与所讨论主题无关的回复,无意义字符,直接复制其他回复等。
6. 本站附件仅限个人使用,请在下载后24小时内删除,本站不对其造成的结果负任何责任,请自行评估风险。

DreamColor屏幕硬校色探究

Post # 1 by csersoft2 » 2017-08-06 10:04

最近在研究怎么把其他校色仪生成的ICC,写入DC屏幕的解码板里去。
就下载了个HP DreamColor Calibration Solution玩玩,发现里面有个可疑的dll名为DreamColorDLL.dll感觉可能存在写入硬件解码板的接口。
于是把它逆向了,不过暂时没弄清楚这个玩意怎么用。
调用方式以及声明文件push到github上了:https://github.com/csersoft/DCLib_Test
下面是目前解析出的接口:
public: __thiscall CDreamColorDLLApp::CDreamColorDLLApp(void)
public: __thiscall CDreamColorDLLApp::~CDreamColorDLLApp(void)
public: bool __thiscall CDreamColorDLLApp::CalibratePrescription(struct Prescription *)
public: enum DC_ERROR __thiscall CDreamColorDLLApp::CheckErrorReturn(void)
public: enum DC_ERROR __thiscall CDreamColorDLLApp::CheckPrescriptionGamut(struct Prescription *)
public: void __thiscall CDreamColorDLLApp::ForceUSBConnection(void)
public: short __thiscall CDreamColorDLLApp::GetBackLightHours(short)
public: bool __thiscall CDreamColorDLLApp::GetBackLightYxy(double *,double *,double *)
public: bool __thiscall CDreamColorDLLApp::GetColorSpaceName(short,char *)
public: bool __thiscall CDreamColorDLLApp::GetColorTempFrom_xy(double *,double,double)
public: int __thiscall CDreamColorDLLApp::GetCurrentColorSpace(void)
public: bool __thiscall CDreamColorDLLApp::GetDaylightColorTemp_xy(double,double *,double *)
public: bool __thiscall CDreamColorDLLApp::GetDisplayEDIDName(char *)
public: int __thiscall CDreamColorDLLApp::GetDisplayIndex(void)
public: bool __thiscall CDreamColorDLLApp::GetDisplayMaxLum(double *)
public: bool __thiscall CDreamColorDLLApp::GetDisplayName(unsigned long,unsigned long,char *)
public: int __thiscall CDreamColorDLLApp::GetDisplayTypeFromIndexList(int)
public: bool __thiscall CDreamColorDLLApp::GetFactoryPrescription(short,struct Prescription *)
public: int __thiscall CDreamColorDLLApp::GetNumberOfColorSpaces(short)
public: int __thiscall CDreamColorDLLApp::GetNumberOfPrescriptions(void)
public: bool __thiscall CDreamColorDLLApp::GetObiWanSerialNumber(char *,int)
public: enum DC_ERROR __thiscall CDreamColorDLLApp::GetPrescription(short,struct Prescription *)
public: bool __thiscall CDreamColorDLLApp::GetSerialNumber(unsigned long,unsigned long,char *)
public: bool __thiscall CDreamColorDLLApp::GetSerialNumber(char *)
public: bool __thiscall CDreamColorDLLApp::IsFactoryName(char *)
public: bool __thiscall CDreamColorDLLApp::IsThisDisplayDreamColor2(unsigned long,unsigned long)
public: bool __thiscall CDreamColorDLLApp::IsThisDisplayDreamColor(unsigned long,unsigned long)
public: bool __thiscall CDreamColorDLLApp::OpenDCMulitpledisplays(int *)
public: int __thiscall CDreamColorDLLApp::OpenDCdisplay(void)
public: bool __thiscall CDreamColorDLLApp::ResetFactoryPrescription(short,struct Prescription *)
public: bool __thiscall CDreamColorDLLApp::SelectColorSpace(short)
public: bool __thiscall CDreamColorDLLApp::SetBackLightHours(int,int)
public: bool __thiscall CDreamColorDLLApp::SetBackLightYxy(double,double,double)
public: bool __thiscall CDreamColorDLLApp::SetCalibrator(void *)
public: bool __thiscall CDreamColorDLLApp::SetDisplayIndex(int,bool)
public: bool __thiscall CDreamColorDLLApp::SetDisplayIndex(int,bool,int)
public: bool __thiscall CDreamColorDLLApp::SetPrescription(short,struct Prescription *)
public: void __thiscall CDreamColorDLLApp::TestBacklight(void)
public: bool __thiscall CDreamColorDLLApp::TestUSBConnection(void)
public: bool __thiscall CDreamColorDLLApp::TestUSBConnectionWithSerialNumber(char const *)
private: int __thiscall CDreamColorDLLApp::InitializePrescriptions(void)
private: bool __thiscall CDreamColorDLLApp::isXP(void)

csersoft2
新注册用户
 
Posts: 43
Joined: 2017-03-14

Re: DreamColor屏幕硬校色探究

Post # 2 by HEUNG » 2017-08-06 14:22

You do not have the required permissions to view the files attached to this post.
谢谢楼主分享,感兴趣的话可以研究一下附件中的这个dreamcolor校验工具。

DC2FCAL.zip
HEUNG
荣誉版主
 
Posts: 229
Joined: 2011-01-26

Re: DreamColor屏幕硬校色探究

Post # 3 by csersoft2 » 2017-08-06 15:47

HEUNG wrote:谢谢楼主分享,感兴趣的话可以研究一下附件中的这个dreamcolor校验工具。

DC2FCAL.zip

感谢分享,请问这个工具的作用是?
csersoft2
新注册用户
 
Posts: 43
Joined: 2017-03-14

Re: DreamColor屏幕硬校色探究

Post # 4 by MUDBOY » 2017-08-06 16:14

看起来像是工厂的批量校验程序哟
提倡分享之精神, 技术问题请在相关版面直接发帖, 站内短信恕不答复.
I don't answer private messages on topics of public interest, because it defeats the whole purpose of a message board.
User avatar
MUDBOY
创始人
 
Posts: 3742
Joined: 2010-12-28

Re: DreamColor屏幕硬校色探究

Post # 5 by csersoft2 » 2017-08-06 18:14

逆向DreamColorDLL时,发现一个可以函数,会输出部分提示,不知有没有懂得,这些提示看起来像是在写入硬件校色数据吗?
Code: Select all
int __thiscall sub_1002EF40(void *this, __int16 a2)
{
  _WORD *v3; // [sp+20h] [bp-1FCh]@1
  char v4; // [sp+24h] [bp-1F8h]@42
  FILE *v5; // [sp+118h] [bp-104h]@47
  char v6; // [sp+11Ch] [bp-100h]@42
  bool v7; // [sp+213h] [bp-9h]@3
  FILE *v8; // [sp+214h] [bp-8h]@1
  int v9; // [sp+218h] [bp-4h]@35

  v3 = this;
  v8 = fopen("CalibratePrescription.txt", "wt");
  if ( v8 )
    fprintf(v8, "Inside CalibratePrescription for  presc index : %d\n", a2);
  v7 = 0;
  v7 = sub_10032D80(*((_DWORD *)v3 + 723), a2) != 0;
  if ( v8 && !v7 )
    fprintf(v8, "SelectColorSpace failed \n");
  v7 = sub_10033370(*((_DWORD *)v3 + 723)) != 0;
  if ( v8 && !v7 )
    fprintf(v8, "DisableColorProcessing failed \n");
  sub_1002CBD0(v3);
  if ( v8 )
    fprintf(v8, "CopyPrescriptionArray2GMArray done \n");
  v3[3] = a2;
  if ( v8 )
    fprintf(v8, "Before EnablePatternGenerator for display index : %d\n", *((_DWORD *)v3 + 723));
  v7 = sub_100331A0(*((_DWORD *)v3 + 723)) != 0;
  if ( v8 && !v7 )
    fprintf(v8, "EnablePatternGenerator failed \n");
  if ( v8 )
    fprintf(v8, "After EnablePatternGenerator for display index : %d\n", *((_DWORD *)v3 + 723));
  sub_1002E610(*(float *)&v3[39 * v3[3] + 1471], *(float *)&v3[39 * v3[3] + 1473], *(float *)&v3[39 * v3[3] + 1475]);
  if ( v8 )
    fprintf(v8, "After SetDisplayArbitraryYxy for display index : %d\n", *((_DWORD *)v3 + 723));
  v7 = sub_10033120(*((_DWORD *)v3 + 723)) != 0;
  if ( v8 && !v7 )
    fprintf(v8, "DisablePatternGenerator failed \n");
  if ( v8 )
    fprintf(v8, "After DisablePatternGenerator for display index : %d\n", *((_DWORD *)v3 + 723));
  v7 = sub_10033A60(*((_DWORD *)v3 + 723), v3 + 1850) != 0;
  if ( v8 && !v7 )
    fprintf(v8, "GetCurrentBackLight failed \n");
  sub_1002F720(v3 + 1850, v3 + 409764);
  v7 = sub_100331A0(*((_DWORD *)v3 + 723)) != 0;
  if ( v8 && !v7 )
    fprintf(v8, "EnablePatternGenerator failed \n");
  if ( v8 )
  {
    fprintf(v8, "After EnablePatternGenerator for display index : %d\n", *((_DWORD *)v3 + 723));
    fprintf(v8, "luminance Low[%x] Luminance High[%x]\n", *((_BYTE *)v3 + 3706), *((_BYTE *)v3 + 3707));
  }
  sub_1002D760(1);
  if ( v8 )
    fprintf(v8, "After MeasureDisplayPrimaries for display index : %d\n", *((_DWORD *)v3 + 723));
  v9 = 815752;
  sub_10031890(v3 + 1888);
  sub_1002DC10(v3);
  if ( v8 )
    fprintf(v8, "After MeasureDisplayTransferFunction for display index : %d\n", *((_DWORD *)v3 + 723));
  v3[88712] = 18;
  sub_10031080(v3 + 1888);
  sub_10031FF0(v3[3]);
  v7 = sub_10033120(*((_DWORD *)v3 + 723)) != 0;
  if ( v8 && !v7 )
    fprintf(v8, "DisablePatternGenerator failed \n");
  if ( v8 )
    fprintf(v8, "After DisablePatternGenerator for display index : %d\n", *((_DWORD *)v3 + 723));
  sub_1002FF40(&v6, v3[3]);
  sub_1002F8A0(&v6, (int)(v3 + 409764));
  sub_1002F9B0(v3 + 142096, v3 + 409764);
  sub_1002FA10(v3 + 88712, v3 + 409764);
  qmemcpy(&v6, (const void *)sub_1002FF40(&v4, v3[3]), 0xF0u);
  sub_10030700(&v6, v3 + 409764);
  v7 = sub_10033A60(*((_DWORD *)v3 + 723), v3 + 1850) != 0;
  if ( v8 && !v7 )
    fprintf(v8, "GetCurrentBackLight failed \n");
  if ( v8 )
  {
    fprintf(v8, "After GetCurrentBackLight for display index : %d\n", *((_DWORD *)v3 + 723));
    fprintf(v8, "luminance Low[%x] Luminance High[%x]\n", *((_BYTE *)v3 + 3706), *((_BYTE *)v3 + 3707));
  }
  sub_1002F720(v3 + 1850, v3 + 409764);
  v5 = fopen("memoryimage.bin", "wb");
  if ( v5 )
  {
    fwrite(v3 + 409764, 1u, 0x3076u, v5);
    fclose(v5);
  }
  v7 = sub_1002EE10(v3[3], v3 + 409764);
  if ( v8 && !v7 )
    fprintf(v8, "UploadMemoryImage failed \n");
  if ( v8 )
  {
    fprintf(v8, "After UploadMemoryImage for display index : %d\n", *((_DWORD *)v3 + 723));
    fprintf(v8, "luminance Low[%x] Luminance High[%x]\n", *((_BYTE *)v3 + 3706), *((_BYTE *)v3 + 3707));
  }
  sub_10032E00(*((_DWORD *)v3 + 723));
  if ( v8 )
    fprintf(v8, "After ApplyColorSpace for display index : %d\n", *((_DWORD *)v3 + 723));
  sub_10032E70(*((_DWORD *)v3 + 723));
  if ( v8 )
    fprintf(v8, "After SaveColorSpace for display index : %d\n", *((_DWORD *)v3 + 723));
  sub_100332F0(*((_DWORD *)v3 + 723));
  return fclose(v8);
}
csersoft2
新注册用户
 
Posts: 43
Joined: 2017-03-14

Re: DreamColor屏幕硬校色探究

Post # 6 by 月光宝石 » 2017-09-02 20:11

好久没上来居然又看到了几篇研究的,我也就看看硬件,编程完全不懂
月光宝石
新注册用户
 
Posts: 11
Joined: 2015-11-21

Re: DreamColor屏幕硬校色探究

Post # 7 by 月光宝石 » 2017-09-02 21:34

51nb有人读取原装的解码板flash数据,刷到组装的dc解码里。然后在硬件校色,效果应该不错
https://forum.51nb.com/forum.php?mod=viewthread&tid=1797677&extra=&page=1
文件怎么发
月光宝石
新注册用户
 
Posts: 11
Joined: 2015-11-21

Re: DreamColor屏幕硬校色探究

Post # 8 by csersoft2 » 2017-09-04 7:46

月光宝石 wrote:51nb有人读取原装的解码板flash数据,刷到组装的dc解码里。然后在硬件校色,效果应该不错
https://forum.51nb.com/forum.php?mod=viewthread&tid=1797677&extra=&page=1
文件怎么发


DC2屏幕严重偏红很可能不是校色数据的问题,而是屏幕老化!!!
我之前那个DC2的屏就是偏色严重,型号也是LP156WF3-SLB3,换了个同型号的,颜色立马正常。

另外有一点就是,刷解码板数据,肯定还有更好更便捷地方法(通过软件),只是目前没研究出来而已。
csersoft2
新注册用户
 
Posts: 43
Joined: 2017-03-14

Re: DreamColor屏幕硬校色探究

Post # 9 by 月光宝石 » 2017-09-04 17:49

那这种屏幕背光偏色估计就已经超出i1pro的校色能力了吧,这种硬件损耗的估计也不太容易校回来了
月光宝石
新注册用户
 
Posts: 11
Joined: 2015-11-21

Re: DreamColor屏幕硬校色探究

Post # 10 by hanyer » 2017-09-15 15:21

一直找不到DC校色仪,只能用红蜘蛛隔一段时间较一次,好在还算方便

hanyer
注册用户
 
Posts: 58
Joined: 2016-08-26

Next

Return to Laptops & Tablets

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], Google [Bot] and 51 guests