(更新:Akabane Jumpei)

ARM9のカードデータ読み関数を修正 その2

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@1401 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
(no author) 2008-05-19 09:39:20 +00:00
parent e79d6836f7
commit 5e8ea60aa9

View File

@ -348,7 +348,7 @@ CardDataReadState HOTSW_ReadCardDataOnGameMode(const void* src, void* dest, u32
CardDataReadState retval = CARD_READ_SUCCESS;
static u8 page_buffer[512];
s32 offset = (u32)src;
u32 offset = (u32)src;
u32 page_offset = (u32)(offset & -512);
u32 buffer_offset = (u32)(offset % 512);
u32 valid_length = 512 - buffer_offset;
@ -413,11 +413,7 @@ static CardDataReadState ReadPageGame(u32 start_addr, void* buf, u32 size)
loop = (size % PAGE_SIZE) ? loop + 1 : loop;
// カードのロック
#ifndef DEBUG_USED_CARD_SLOT_B_
CARD_LockRom(s_CardLockID);
#else
LockExCard(s_CardLockID);
#endif
for(i=0; i<loop; i++){
if(!HOTSW_isGameMode()){
@ -471,11 +467,7 @@ static CardDataReadState ReadPageGame(u32 start_addr, void* buf, u32 size)
OS_SpinWait( OS_NSEC_TO_CPUCYC(100) );
// カードのロック開放(※ロックIDは開放せずに持ち続ける)
#ifndef DEBUG_USED_CARD_SLOT_B_
CARD_UnlockRom(s_CardLockID);
#else
UnlockExCard(s_CardLockID);
#endif
return CARD_READ_SUCCESS;
}