Skip to content

Commit 7b02503

Browse files
committed
cardEngine_arm7: Remove unneeded code
1 parent a753f54 commit 7b02503

File tree

1 file changed

+1
-35
lines changed

1 file changed

+1
-35
lines changed

cardengine_arm7/source/cardEngine.c

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,6 @@ vu32* volatile sharedAddr = (vu32*)0x027FFB08;
4343
static aFile romFile;
4444
static aFile savFile;
4545

46-
static bool delayRan = false;
47-
48-
static bool timeoutRun = true;
49-
static int timeoutTimer = 0;
50-
5146
static int softResetTimer = 0;
5247

5348
bool ndmaUsed = false;
@@ -172,8 +167,6 @@ void cardRead_arm9() {
172167
dbg_hexa(marker);
173168
#endif
174169

175-
timeoutRun = false; // If card read received, do not show error screen
176-
177170
cardReadLED(true); // When a file is loading, turn on LED for card read indicator
178171
fileRead(dst,romFile,src,len);
179172
cardReadLED(false); // After loading is done, turn off LED for card read indicator
@@ -188,12 +181,6 @@ void cardRead_arm9() {
188181
#endif
189182
}
190183

191-
void cardRead_delay() {
192-
for(int i = 0; i < 30*60; i++) {
193-
i2cWriteRegister(0x4A, 0x63, 0x00); // Revert power LED to normal (used for delay)
194-
}
195-
}
196-
197184
void runCardEngineCheck (void) {
198185
//dbg_printf("runCardEngineCheck\n");
199186
#ifdef DEBUG
@@ -211,21 +198,7 @@ void runCardEngineCheck (void) {
211198
softResetTimer++;
212199
}
213200

214-
if (timeoutRun) {
215-
u8 setting = i2cReadRegister(0x4A, 0x73);
216-
if(setting == 0x01) {
217-
timeoutTimer += 1;
218-
if (timeoutTimer == 60*2) {
219-
memcpy((u32*)0x02000300,sr_data_error,0x020);
220-
i2cWriteRegister(0x4a,0x70,0x01);
221-
i2cWriteRegister(0x4a,0x11,0x01); // If on loading/white screen for a while, the game is incompatible, so show an error screen
222-
}
223-
} else {
224-
timeoutRun = false;
225-
}
226-
}
227-
228-
if(tryLockMutex()) {
201+
if(tryLockMutex()) {
229202
initLogging();
230203

231204
//nocashMessage("runCardEngineCheck mutex ok");
@@ -240,11 +213,6 @@ void runCardEngineCheck (void) {
240213
{
241214
cardRead_arm9();
242215
*(vu32*)(0x027FFB14) = 0;
243-
244-
if(!delayRan) {
245-
cardRead_delay();
246-
delayRan = true;
247-
}
248216
}
249217
unlockMutex();
250218
}
@@ -419,8 +387,6 @@ bool cardRead (u32 dma, u32 src, void *dst, u32 len) {
419387
dbg_hexa(len);
420388
#endif
421389

422-
timeoutRun = false; // Do not show error screen
423-
424390
cardReadLED(true); // When a file is loading, turn on LED for card read indicator
425391
//ndmaUsed = false;
426392
fileRead(dst,romFile,src,len);

0 commit comments

Comments
 (0)