|
在eboot中是可以实现的,只要参考一下nk.bin就可以了,我实现了,但是在应用层,我还没有实现,现在我可以把图片识别到了,现在就是把整个图片显示出来的问题了,lpDest=0x80200000,往这个地址拷贝数据,1K就出问题了,只是少量数据,就没有问题,所以把eboot logo能识别,但是后面的数据块很多没有写进去。不知道怎么解决了
- ......
- pBinFile = (UINT8*)MapViewOfFile (hFileMap, FILE_MAP_READ, 0, 0, dwFileSize);
- ......
- lpDest = MapMemAddr (dwImageStart, dwRecAddr);
- pBinFile +=sizeof(DWORD);
- // lpDest+=sizeof(DWORD);
- memcpy(lpDest,pBinFile,dwRecLen);
- pBinFile +=dwRecLen;
- memcpy((LPBYTE) &dwRecAddr,pBinFile,sizeof(DWORD));
- pBinFile +=sizeof(DWORD);
- memcpy((LPBYTE) &dwRecLen,pBinFile,sizeof(DWORD));
- pBinFile +=sizeof(DWORD);
- memcpy((LPBYTE) &dwRecChk,pBinFile,sizeof(DWORD));
- lpDest = MapMemAddr (dwImageStart, dwRecAddr);
- pBinFile +=sizeof(DWORD);
- memcpy(lpDest,pBinFile,0x400);
- DWORD image_addr=dwRecAddr+0x400;
- pBinFile +=0x400;
- lpDest = MapMemAddr (dwImageStart, image_addr);
- memcpy(lpDest,pBinFile,0x400);
- for(int m=0; m<4;++m )
- {pBinFile +=0x400;
- image_addr+=0x400;
- lpDest = MapMemAddr (dwImageStart, image_addr);
- memcpy(lpDest,pBinFile,0x400);
- }
-
- #endif
- //dwImageStart=MapMemAddr(dwImageStart,dwImageStart);
- *pdwImageStart =dwImageStart;
- *pdwImageLeng = dwImageLength;
复制代码 |
|