mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
(更新: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:
parent
e79d6836f7
commit
5e8ea60aa9
@ -348,7 +348,7 @@ CardDataReadState HOTSW_ReadCardDataOnGameMode(const void* src, void* dest, u32
|
|||||||
CardDataReadState retval = CARD_READ_SUCCESS;
|
CardDataReadState retval = CARD_READ_SUCCESS;
|
||||||
|
|
||||||
static u8 page_buffer[512];
|
static u8 page_buffer[512];
|
||||||
s32 offset = (u32)src;
|
u32 offset = (u32)src;
|
||||||
u32 page_offset = (u32)(offset & -512);
|
u32 page_offset = (u32)(offset & -512);
|
||||||
u32 buffer_offset = (u32)(offset % 512);
|
u32 buffer_offset = (u32)(offset % 512);
|
||||||
u32 valid_length = 512 - buffer_offset;
|
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;
|
loop = (size % PAGE_SIZE) ? loop + 1 : loop;
|
||||||
|
|
||||||
// カードのロック
|
// カードのロック
|
||||||
#ifndef DEBUG_USED_CARD_SLOT_B_
|
|
||||||
CARD_LockRom(s_CardLockID);
|
CARD_LockRom(s_CardLockID);
|
||||||
#else
|
|
||||||
LockExCard(s_CardLockID);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for(i=0; i<loop; i++){
|
for(i=0; i<loop; i++){
|
||||||
if(!HOTSW_isGameMode()){
|
if(!HOTSW_isGameMode()){
|
||||||
@ -471,11 +467,7 @@ static CardDataReadState ReadPageGame(u32 start_addr, void* buf, u32 size)
|
|||||||
OS_SpinWait( OS_NSEC_TO_CPUCYC(100) );
|
OS_SpinWait( OS_NSEC_TO_CPUCYC(100) );
|
||||||
|
|
||||||
// カードのロック開放(※ロックIDは開放せずに持ち続ける)
|
// カードのロック開放(※ロックIDは開放せずに持ち続ける)
|
||||||
#ifndef DEBUG_USED_CARD_SLOT_B_
|
|
||||||
CARD_UnlockRom(s_CardLockID);
|
CARD_UnlockRom(s_CardLockID);
|
||||||
#else
|
|
||||||
UnlockExCard(s_CardLockID);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return CARD_READ_SUCCESS;
|
return CARD_READ_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user