?? sys_load.c
字號:
/******************************************************************************
*
* The information contained herein is the exclusive property of
* Sunplus Technology Co. And shall not be distributed, reproduced,
* or disclosed in whole in part without prior written permission.
*
* (C) COPYRIGHT 2005 SUNPLUS TECHNOLOGY CO.
* ALL RIGHTS RESERVED
*
* The entire notice above must be reproduced on all authorized copies.
*
*****************************************************************************/
/******************************************************************************
* Filename: Sys_Load.c
* Author: Robin.xjliu (eMail: xjliu@sunplus.com)
* Tel: 00885-028-87848688-5884
* Date: 2005-11-16
* Description: all kinds of load data ways in this file
* Reference:
* Version history:
*-----------------------------------------------------------------------------
* Version YYYY-MM-DD-INDEX Modified By Description
* 1.0.0 2005-11-16 xjliu Create
*
*****************************************************************************/
#include "Include/Sys_Load.h"
/**
* Sys_Load_SDCard - load data from SD Card
* @pLoadInfo:
*/
void Sys_Load_SDCard(const LOAD_INFO *pLoadInfo, U16 nFileNum)
{
U8 i;
S32 fp;
S32 ret;
fs_init();
ret = fs_mount(0);
if(ret)
while(1);
for(i = 0; i < nFileNum; i ++)
{
fp = open(pLoadInfo[i].path, pLoadInfo[i].sOpenFlag);
read(fp, (void *)pLoadInfo[i].nLoadAddress, pLoadInfo[i].nLength);
close(fp);
}
}
//void Sys_Load_SDCard(void)
/*{
S32 fp;
S32 ret;
S32 g_Text1Index;
fs_init();
ret = fs_mount(0);
if(ret)
while(1);
fp = open(".\\Index_Text1_4.bin", O_CREAT | O_RDONLY);
read(fp, TEXT1_PNT_ADDR, 0x4000);
close(fp);
fp = open(".\\Index_Text2_4.bin", O_CREAT | O_RDONLY);
read(fp, TEXT2_PNT_ADDR, 0x4000);
close(fp);
fp = open(".\\Index_Text3_4.bin", O_CREAT | O_RDONLY);
read(fp, TEXT3_PNT_ADDR, 0x4000);
close(fp);
fp = open(".\\Pixel_Text1_4.bin", O_CREAT | O_RDONLY);
read(fp, TEXT1_PGT_ADDR, 0x100000);
close(fp);
fp = open(".\\Pixel_Text2_4.bin", O_CREAT | O_RDONLY);
read(fp, TEXT2_PGT_ADDR, 0x100000);
close(fp);
fp = open(".\\Pixel_Text3_4.bin", O_CREAT | O_RDONLY);
read(fp, TEXT3_PGT_ADDR, 0x100000);
close(fp);
fp = open(".\\Palette_4.bin", O_CREAT | O_RDONLY);
read(fp, BG_PAL_ADDR, 0x4000);
close(fp);
fp = open(".\\SPPalette_4.bin", O_CREAT | O_RDONLY);
read(fp, SP_PAL_ADDR, 0x4000);
close(fp);
fp = open(".\\TextHeader_4.bin", O_CREAT | O_RDONLY);
read(fp, TEXT_HEADER_ADDR, 0x8000);
close(fp);
fp = open(".\\SpriteHeader_4.bin", O_CREAT | O_RDONLY);
read(fp, SP_HEADER_ADDR, 0x8000);
close(fp);
fp = open(".\\SpriteTab_4.bin", O_CREAT | O_RDONLY);
read(fp, SP_TBL_ADDR, 0x90000);
close(fp);
fp = open(".\\SpriteCell_4.bin", O_CREAT | O_RDONLY);
read(fp, SP_PGT_ADDR, 0x200000);
close(fp);
}*/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -