From 772f3001ac3bd2d05d149e99f2fb8cd3454adab5 Mon Sep 17 00:00:00 2001 From: "crediar@rypp.net" Date: Wed, 18 Jul 2012 14:57:28 +0000 Subject: [PATCH] We are still looking for competent contributors (JPN and 480p results especially) for our compatibility list ( http://crediar.no-ip.com/gc ) Please come to #DM on efnet if you want to help! updated DM to version 2.2 *Added code to prevent drives going into sleep mode git-svn-id: svn://localhost/Users/andi/Downloads/code/trunk@19 be6c1b03-d731-4111-a574-e37d80d43941 --- dip.c | 13 ++++++++++++- dip.h | 1 + global.h | 4 ++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/dip.c b/dip.c index bfbfb78..a547222 100644 --- a/dip.c +++ b/dip.c @@ -44,6 +44,8 @@ void DIInit( void ) write32( DI_SCONFIG, 0xFF ); write32( DI_SCOVER, 0 ); + + write32( HW_TIMER, 0 ); } u32 DIUpdateRegisters( void ) { @@ -307,7 +309,9 @@ u32 DIUpdateRegisters( void ) write32( HW_ARMIRQFLAG, read32(HW_ARMIRQFLAG) ); set32( 0x0d80000C, (1<<2) ); } - + + write32( HW_TIMER, 0 ); + } break; default: { @@ -326,5 +330,12 @@ u32 DIUpdateRegisters( void ) } } + if( (u64)read32(HW_TIMER) >= 2 * 60 * 243000000LL / 128 ) + { + USBStorage_Read_Sectors( 23, 1, (void*)0x1000 ); + + write32( HW_TIMER, 0 ); + } + return 0; } diff --git a/dip.h b/dip.h index fb8ea88..78dde4c 100644 --- a/dip.h +++ b/dip.h @@ -13,6 +13,7 @@ #include "Config.h" #include "DVD.h" #include "elf.h" +#include "usbstorage.h" enum opcodes { diff --git a/global.h b/global.h index 2140ed2..2c540b5 100644 --- a/global.h +++ b/global.h @@ -14,8 +14,8 @@ #define REALNAND 1 #define PADHOOK 1 -#define CONFIG_VERSION 0x00000001 -#define DM_VERSION 0x00020001 +#define CONFIG_VERSION 0x00000002 +#define DM_VERSION 0x00020002 #define DI_SUCCESS 1 #define DI_ERROR 2